@taico/taico 0.0.2 → 0.0.4

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 (181) hide show
  1. package/dist/agents/agent.entity.d.ts +2 -0
  2. package/dist/agents/agent.entity.js +10 -0
  3. package/dist/agents/agent.entity.js.map +1 -1
  4. package/dist/agents/agents.controller.js +6 -0
  5. package/dist/agents/agents.controller.js.map +1 -1
  6. package/dist/agents/agents.service.d.ts +1 -0
  7. package/dist/agents/agents.service.js +36 -7
  8. package/dist/agents/agents.service.js.map +1 -1
  9. package/dist/agents/dto/agent-response.dto.d.ts +3 -0
  10. package/dist/agents/dto/agent-response.dto.js +46 -9
  11. package/dist/agents/dto/agent-response.dto.js.map +1 -1
  12. package/dist/agents/dto/create-agent.dto.d.ts +3 -0
  13. package/dist/agents/dto/create-agent.dto.js +37 -5
  14. package/dist/agents/dto/create-agent.dto.js.map +1 -1
  15. package/dist/agents/dto/patch-agent.dto.d.ts +3 -0
  16. package/dist/agents/dto/patch-agent.dto.js +37 -5
  17. package/dist/agents/dto/patch-agent.dto.js.map +1 -1
  18. package/dist/agents/dto/service/agents.service.types.d.ts +9 -2
  19. package/dist/agents/enums/agent-type.enum.d.ts +1 -0
  20. package/dist/agents/enums/agent-type.enum.js +2 -0
  21. package/dist/agents/enums/agent-type.enum.js.map +1 -1
  22. package/dist/app-init/agent/code-reviewer.agent.js +1 -0
  23. package/dist/app-init/agent/code-reviewer.agent.js.map +1 -1
  24. package/dist/app-init/agent/prompts.d.ts +3 -3
  25. package/dist/app-init/agent/prompts.js +10 -9
  26. package/dist/app-init/agent/prompts.js.map +1 -1
  27. package/dist/app-init/agent/qwen3-coder-next.d.ts +2 -0
  28. package/dist/app-init/agent/qwen3-coder-next.js +22 -0
  29. package/dist/app-init/agent/qwen3-coder-next.js.map +1 -0
  30. package/dist/app-init/app-init.runner.js +7 -0
  31. package/dist/app-init/app-init.runner.js.map +1 -1
  32. package/dist/app.module.js +4 -3
  33. package/dist/app.module.js.map +1 -1
  34. package/dist/authorization-server/authorization.controller.d.ts +1 -0
  35. package/dist/authorization-server/authorization.controller.js +13 -1
  36. package/dist/authorization-server/authorization.controller.js.map +1 -1
  37. package/dist/authorization-server/authorization.service.js.map +1 -1
  38. package/dist/authorization-server/client-registration.service.d.ts +1 -0
  39. package/dist/authorization-server/client-registration.service.js +41 -3
  40. package/dist/authorization-server/client-registration.service.js.map +1 -1
  41. package/dist/authorization-server/dto/consent-metadata-response.dto.d.ts +1 -1
  42. package/dist/authorization-server/dto/consent-metadata-response.dto.js +1 -1
  43. package/dist/authorization-server/dto/consent-metadata-response.dto.js.map +1 -1
  44. package/dist/authorization-server/errors/web-auth.errors.d.ts +16 -0
  45. package/dist/authorization-server/errors/web-auth.errors.js +33 -0
  46. package/dist/authorization-server/errors/web-auth.errors.js.map +1 -0
  47. package/dist/authorization-server/web-auth.service.js +11 -2
  48. package/dist/authorization-server/web-auth.service.js.map +1 -1
  49. package/dist/config/env.config.d.ts +0 -2
  50. package/dist/config/env.config.js +8 -31
  51. package/dist/config/env.config.js.map +1 -1
  52. package/dist/context/context.module.js +2 -0
  53. package/dist/context/context.module.js.map +1 -1
  54. package/dist/context/context.service.d.ts +3 -1
  55. package/dist/context/context.service.js +11 -2
  56. package/dist/context/context.service.js.map +1 -1
  57. package/dist/context/errors/context.errors.d.ts +4 -0
  58. package/dist/context/errors/context.errors.js +8 -1
  59. package/dist/context/errors/context.errors.js.map +1 -1
  60. package/dist/discovery/discovery.controller.d.ts +4 -2
  61. package/dist/discovery/discovery.controller.js +30 -2
  62. package/dist/discovery/discovery.controller.js.map +1 -1
  63. package/dist/discovery/dto/protected-resource-metadata-response.dto.d.ts +7 -0
  64. package/dist/discovery/dto/protected-resource-metadata-response.dto.js +60 -0
  65. package/dist/discovery/dto/protected-resource-metadata-response.dto.js.map +1 -0
  66. package/dist/errors/http/error-catalog.js +18 -0
  67. package/dist/errors/http/error-catalog.js.map +1 -1
  68. package/dist/identity-provider/actor.controller.d.ts +2 -0
  69. package/dist/identity-provider/actor.controller.js +31 -0
  70. package/dist/identity-provider/actor.controller.js.map +1 -1
  71. package/dist/identity-provider/actor.service.js +1 -0
  72. package/dist/identity-provider/actor.service.js.map +1 -1
  73. package/dist/identity-provider/dto/search-actors-query.dto.d.ts +5 -0
  74. package/dist/identity-provider/dto/search-actors-query.dto.js +60 -0
  75. package/dist/identity-provider/dto/search-actors-query.dto.js.map +1 -0
  76. package/dist/main.js +30 -5
  77. package/dist/main.js.map +1 -1
  78. package/dist/meta/meta.service.js +25 -3
  79. package/dist/meta/meta.service.js.map +1 -1
  80. package/dist/{context/migrations/1765060392-AddNestedPageSchema.d.ts → migrations/1700000000000-BaselineSchema.d.ts} +1 -1
  81. package/dist/migrations/1700000000000-BaselineSchema.js +480 -0
  82. package/dist/migrations/1700000000000-BaselineSchema.js.map +1 -0
  83. package/dist/{mcp-registry/migrations/1733964000000-AddProvidedIdToMcpConnections.d.ts → migrations/1700000000001-UpdateAgentTypeConstraint.d.ts} +2 -1
  84. package/dist/migrations/1700000000001-UpdateAgentTypeConstraint.js +142 -0
  85. package/dist/migrations/1700000000001-UpdateAgentTypeConstraint.js.map +1 -0
  86. package/dist/public/assets/index-BCPnRhO0.js +11 -0
  87. package/dist/public/assets/index-_FDBdUKK.css +1 -0
  88. package/dist/public/beta/assets/index-S66NF8rC.js +85 -0
  89. package/dist/public/beta/index.html +1 -1
  90. package/dist/public/icons/cockatoo.png +0 -0
  91. package/dist/public/icons/qwen.png +0 -0
  92. package/dist/public/index.html +2 -2
  93. package/dist/search/search.service.js +10 -1
  94. package/dist/search/search.service.js.map +1 -1
  95. package/dist/search/search.types.d.ts +1 -0
  96. package/dist/tasks/artefact.entity.d.ts +12 -0
  97. package/dist/tasks/artefact.entity.js +67 -0
  98. package/dist/tasks/artefact.entity.js.map +1 -0
  99. package/dist/tasks/dto/artefact-response.dto.d.ts +11 -0
  100. package/dist/tasks/dto/artefact-response.dto.js +75 -0
  101. package/dist/tasks/dto/artefact-response.dto.js.map +1 -0
  102. package/dist/tasks/dto/create-artefact.dto.d.ts +4 -0
  103. package/dist/tasks/dto/create-artefact.dto.js +38 -0
  104. package/dist/tasks/dto/create-artefact.dto.js.map +1 -0
  105. package/dist/tasks/dto/service/tasks.service.types.d.ts +12 -0
  106. package/dist/tasks/dto/task-response.dto.d.ts +2 -0
  107. package/dist/tasks/dto/task-response.dto.js +11 -0
  108. package/dist/tasks/dto/task-response.dto.js.map +1 -1
  109. package/dist/tasks/errors/tasks.errors.d.ts +8 -0
  110. package/dist/tasks/errors/tasks.errors.js +15 -1
  111. package/dist/tasks/errors/tasks.errors.js.map +1 -1
  112. package/dist/tasks/events/tasks.events.d.ts +5 -0
  113. package/dist/tasks/events/tasks.events.js +8 -1
  114. package/dist/tasks/events/tasks.events.js.map +1 -1
  115. package/dist/tasks/task.entity.d.ts +2 -0
  116. package/dist/tasks/task.entity.js +6 -0
  117. package/dist/tasks/task.entity.js.map +1 -1
  118. package/dist/tasks/tasks.controller.d.ts +3 -0
  119. package/dist/tasks/tasks.controller.js +27 -0
  120. package/dist/tasks/tasks.controller.js.map +1 -1
  121. package/dist/tasks/tasks.gateway.d.ts +2 -1
  122. package/dist/tasks/tasks.gateway.js +23 -0
  123. package/dist/tasks/tasks.gateway.js.map +1 -1
  124. package/dist/tasks/tasks.mcp.gateway.js +28 -1
  125. package/dist/tasks/tasks.mcp.gateway.js.map +1 -1
  126. package/dist/tasks/tasks.module.js +2 -1
  127. package/dist/tasks/tasks.module.js.map +1 -1
  128. package/dist/tasks/tasks.service.d.ts +6 -2
  129. package/dist/tasks/tasks.service.js +68 -4
  130. package/dist/tasks/tasks.service.js.map +1 -1
  131. package/dist/threads/dto/append-thread-state.dto.d.ts +3 -0
  132. package/dist/threads/dto/append-thread-state.dto.js +28 -0
  133. package/dist/threads/dto/append-thread-state.dto.js.map +1 -0
  134. package/dist/threads/dto/create-thread.dto.d.ts +1 -0
  135. package/dist/threads/dto/create-thread.dto.js +9 -0
  136. package/dist/threads/dto/create-thread.dto.js.map +1 -1
  137. package/dist/threads/dto/service/threads.service.types.d.ts +3 -1
  138. package/dist/threads/dto/thread-response.dto.d.ts +2 -1
  139. package/dist/threads/dto/thread-response.dto.js +12 -5
  140. package/dist/threads/dto/thread-response.dto.js.map +1 -1
  141. package/dist/threads/dto/thread-state-response.dto.d.ts +3 -0
  142. package/dist/threads/dto/thread-state-response.dto.js +25 -0
  143. package/dist/threads/dto/thread-state-response.dto.js.map +1 -0
  144. package/dist/threads/dto/update-thread-state.dto.d.ts +3 -0
  145. package/dist/threads/dto/update-thread-state.dto.js +28 -0
  146. package/dist/threads/dto/update-thread-state.dto.js.map +1 -0
  147. package/dist/threads/thread.entity.d.ts +4 -0
  148. package/dist/threads/thread.entity.js +22 -0
  149. package/dist/threads/thread.entity.js.map +1 -1
  150. package/dist/threads/threads-state.service.spec.d.ts +1 -0
  151. package/dist/threads/threads-state.service.spec.js +415 -0
  152. package/dist/threads/threads-state.service.spec.js.map +1 -0
  153. package/dist/threads/threads.controller.d.ts +7 -0
  154. package/dist/threads/threads.controller.js +79 -0
  155. package/dist/threads/threads.controller.js.map +1 -1
  156. package/dist/threads/threads.module.js +2 -0
  157. package/dist/threads/threads.module.js.map +1 -1
  158. package/dist/threads/threads.service.d.ts +9 -2
  159. package/dist/threads/threads.service.js +149 -22
  160. package/dist/threads/threads.service.js.map +1 -1
  161. package/dist/threads/threads.service.spec.d.ts +1 -0
  162. package/dist/threads/threads.service.spec.js +431 -0
  163. package/dist/threads/threads.service.spec.js.map +1 -0
  164. package/dist/tsconfig.tsbuildinfo +1 -1
  165. package/package.json +6 -4
  166. package/dist/context/migrations/1765060392-AddNestedPageSchema.js +0 -61
  167. package/dist/context/migrations/1765060392-AddNestedPageSchema.js.map +0 -1
  168. package/dist/llm-helper/llm-helper.module.d.ts +0 -2
  169. package/dist/llm-helper/llm-helper.module.js +0 -21
  170. package/dist/llm-helper/llm-helper.module.js.map +0 -1
  171. package/dist/llm-helper/llm-helper.service.d.ts +0 -9
  172. package/dist/llm-helper/llm-helper.service.js +0 -71
  173. package/dist/llm-helper/llm-helper.service.js.map +0 -1
  174. package/dist/mcp-registry/migrations/1733964000000-AddProvidedIdToMcpConnections.js +0 -25
  175. package/dist/mcp-registry/migrations/1733964000000-AddProvidedIdToMcpConnections.js.map +0 -1
  176. package/dist/mcp-registry/migrations/1734184000000-AddUrlToMcpServers.d.ts +0 -5
  177. package/dist/mcp-registry/migrations/1734184000000-AddUrlToMcpServers.js +0 -19
  178. package/dist/mcp-registry/migrations/1734184000000-AddUrlToMcpServers.js.map +0 -1
  179. package/dist/public/assets/index-CQNjiEI4.css +0 -1
  180. package/dist/public/assets/index-DAZtEION.js +0 -11
  181. package/dist/public/beta/assets/index-BakZ6bA-.js +0 -85
@@ -1,85 +0,0 @@
1
- var rd=e=>{throw TypeError(e)};var id=(e,t,n)=>t.has(e)||rd("Cannot "+n);var le=(e,t,n)=>(id(e,t,"read from private field"),n?n.call(e):t.get(e)),xn=(e,t,n)=>t.has(e)?rd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Tt=(e,t,n,r)=>(id(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var cs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hh={exports:{}},Bs={},Wh={exports:{}},ee={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var oo=Symbol.for("react.element"),ox=Symbol.for("react.portal"),sx=Symbol.for("react.fragment"),lx=Symbol.for("react.strict_mode"),ax=Symbol.for("react.profiler"),ux=Symbol.for("react.provider"),cx=Symbol.for("react.context"),dx=Symbol.for("react.forward_ref"),fx=Symbol.for("react.suspense"),hx=Symbol.for("react.memo"),px=Symbol.for("react.lazy"),od=Symbol.iterator;function mx(e){return e===null||typeof e!="object"?null:(e=od&&e[od]||e["@@iterator"],typeof e=="function"?e:null)}var Vh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qh=Object.assign,Gh={};function Kr(e,t,n){this.props=e,this.context=t,this.refs=Gh,this.updater=n||Vh}Kr.prototype.isReactComponent={};Kr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Kr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Kh(){}Kh.prototype=Kr.prototype;function bu(e,t,n){this.props=e,this.context=t,this.refs=Gh,this.updater=n||Vh}var Nu=bu.prototype=new Kh;Nu.constructor=bu;qh(Nu,Kr.prototype);Nu.isPureReactComponent=!0;var sd=Array.isArray,Qh=Object.prototype.hasOwnProperty,Tu={current:null},Yh={key:!0,ref:!0,__self:!0,__source:!0};function Xh(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)Qh.call(t,r)&&!Yh.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:oo,type:e,key:o,ref:s,props:i,_owner:Tu.current}}function gx(e,t){return{$$typeof:oo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ju(e){return typeof e=="object"&&e!==null&&e.$$typeof===oo}function yx(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ld=/\/+/g;function ml(e,t){return typeof e=="object"&&e!==null&&e.key!=null?yx(""+e.key):t.toString(36)}function Vo(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case oo:case ox:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+ml(s,0):r,sd(i)?(n="",e!=null&&(n=e.replace(ld,"$&/")+"/"),Vo(i,t,n,"",function(c){return c})):i!=null&&(ju(i)&&(i=gx(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(ld,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",sd(e))for(var l=0;l<e.length;l++){o=e[l];var u=r+ml(o,l);s+=Vo(o,t,n,u,i)}else if(u=mx(e),typeof u=="function")for(e=u.call(e),l=0;!(o=e.next()).done;)o=o.value,u=r+ml(o,l++),s+=Vo(o,t,n,u,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function vo(e,t,n){if(e==null)return e;var r=[],i=0;return Vo(e,r,"","",function(o){return t.call(n,o,i++)}),r}function xx(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var qe={current:null},qo={transition:null},vx={ReactCurrentDispatcher:qe,ReactCurrentBatchConfig:qo,ReactCurrentOwner:Tu};function Jh(){throw Error("act(...) is not supported in production builds of React.")}ee.Children={map:vo,forEach:function(e,t,n){vo(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return vo(e,function(){t++}),t},toArray:function(e){return vo(e,function(t){return t})||[]},only:function(e){if(!ju(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ee.Component=Kr;ee.Fragment=sx;ee.Profiler=ax;ee.PureComponent=bu;ee.StrictMode=lx;ee.Suspense=fx;ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vx;ee.act=Jh;ee.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=qh({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=Tu.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)Qh.call(t,u)&&!Yh.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&l!==void 0?l[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:oo,type:e.type,key:i,ref:o,props:r,_owner:s}};ee.createContext=function(e){return e={$$typeof:cx,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:ux,_context:e},e.Consumer=e};ee.createElement=Xh;ee.createFactory=function(e){var t=Xh.bind(null,e);return t.type=e,t};ee.createRef=function(){return{current:null}};ee.forwardRef=function(e){return{$$typeof:dx,render:e}};ee.isValidElement=ju;ee.lazy=function(e){return{$$typeof:px,_payload:{_status:-1,_result:e},_init:xx}};ee.memo=function(e,t){return{$$typeof:hx,type:e,compare:t===void 0?null:t}};ee.startTransition=function(e){var t=qo.transition;qo.transition={};try{e()}finally{qo.transition=t}};ee.unstable_act=Jh;ee.useCallback=function(e,t){return qe.current.useCallback(e,t)};ee.useContext=function(e){return qe.current.useContext(e)};ee.useDebugValue=function(){};ee.useDeferredValue=function(e){return qe.current.useDeferredValue(e)};ee.useEffect=function(e,t){return qe.current.useEffect(e,t)};ee.useId=function(){return qe.current.useId()};ee.useImperativeHandle=function(e,t,n){return qe.current.useImperativeHandle(e,t,n)};ee.useInsertionEffect=function(e,t){return qe.current.useInsertionEffect(e,t)};ee.useLayoutEffect=function(e,t){return qe.current.useLayoutEffect(e,t)};ee.useMemo=function(e,t){return qe.current.useMemo(e,t)};ee.useReducer=function(e,t,n){return qe.current.useReducer(e,t,n)};ee.useRef=function(e){return qe.current.useRef(e)};ee.useState=function(e){return qe.current.useState(e)};ee.useSyncExternalStore=function(e,t,n){return qe.current.useSyncExternalStore(e,t,n)};ee.useTransition=function(){return qe.current.useTransition()};ee.version="18.3.1";Wh.exports=ee;var k=Wh.exports;/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var kx=k,wx=Symbol.for("react.element"),Sx=Symbol.for("react.fragment"),Cx=Object.prototype.hasOwnProperty,Ex=kx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,bx={key:!0,ref:!0,__self:!0,__source:!0};function Zh(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Cx.call(t,r)&&!bx.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:wx,type:e,key:o,ref:s,props:i,_owner:Ex.current}}Bs.Fragment=Sx;Bs.jsx=Zh;Bs.jsxs=Zh;Hh.exports=Bs;var a=Hh.exports,ep={exports:{}},dt={},tp={exports:{}},np={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(C,B){var w=C.length;C.push(B);e:for(;0<w;){var J=w-1>>>1,se=C[J];if(0<i(se,B))C[J]=B,C[w]=se,w=J;else break e}}function n(C){return C.length===0?null:C[0]}function r(C){if(C.length===0)return null;var B=C[0],w=C.pop();if(w!==B){C[0]=w;e:for(var J=0,se=C.length,N=se>>>1;J<N;){var Se=2*(J+1)-1,nt=C[Se],ue=Se+1,mt=C[ue];if(0>i(nt,w))ue<se&&0>i(mt,nt)?(C[J]=mt,C[ue]=w,J=ue):(C[J]=nt,C[Se]=w,J=Se);else if(ue<se&&0>i(mt,w))C[J]=mt,C[ue]=w,J=ue;else break e}}return B}function i(C,B){var w=C.sortIndex-B.sortIndex;return w!==0?w:C.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var u=[],c=[],f=1,d=null,h=3,p=!1,g=!1,v=!1,S=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(C){for(var B=n(c);B!==null;){if(B.callback===null)r(c);else if(B.startTime<=C)r(c),B.sortIndex=B.expirationTime,t(u,B);else break;B=n(c)}}function T(C){if(v=!1,x(C),!g)if(n(u)!==null)g=!0,O(j);else{var B=n(c);B!==null&&L(T,B.startTime-C)}}function j(C,B){g=!1,v&&(v=!1,y(D),D=-1),p=!0;var w=h;try{for(x(B),d=n(u);d!==null&&(!(d.expirationTime>B)||C&&!P());){var J=d.callback;if(typeof J=="function"){d.callback=null,h=d.priorityLevel;var se=J(d.expirationTime<=B);B=e.unstable_now(),typeof se=="function"?d.callback=se:d===n(u)&&r(u),x(B)}else r(u);d=n(u)}if(d!==null)var N=!0;else{var Se=n(c);Se!==null&&L(T,Se.startTime-B),N=!1}return N}finally{d=null,h=w,p=!1}}var E=!1,_=null,D=-1,R=5,b=-1;function P(){return!(e.unstable_now()-b<R)}function q(){if(_!==null){var C=e.unstable_now();b=C;var B=!0;try{B=_(!0,C)}finally{B?V():(E=!1,_=null)}}else E=!1}var V;if(typeof m=="function")V=function(){m(q)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,G=H.port2;H.port1.onmessage=q,V=function(){G.postMessage(null)}}else V=function(){S(q,0)};function O(C){_=C,E||(E=!0,V())}function L(C,B){D=S(function(){C(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,O(j))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(C){switch(h){case 1:case 2:case 3:var B=3;break;default:B=h}var w=h;h=B;try{return C()}finally{h=w}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,B){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var w=h;h=C;try{return B()}finally{h=w}},e.unstable_scheduleCallback=function(C,B,w){var J=e.unstable_now();switch(typeof w=="object"&&w!==null?(w=w.delay,w=typeof w=="number"&&0<w?J+w:J):w=J,C){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=w+se,C={id:f++,callback:B,priorityLevel:C,startTime:w,expirationTime:se,sortIndex:-1},w>J?(C.sortIndex=w,t(c,C),n(u)===null&&C===n(c)&&(v?(y(D),D=-1):v=!0,L(T,w-J))):(C.sortIndex=se,t(u,C),g||p||(g=!0,O(j))),C},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(C){var B=h;return function(){var w=h;h=B;try{return C.apply(this,arguments)}finally{h=w}}}})(np);tp.exports=np;var Nx=tp.exports;/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var Tx=k,ut=Nx;function F(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var rp=new Set,Fi={};function cr(e,t){Br(e,t),Br(e+"Capture",t)}function Br(e,t){for(Fi[e]=t,e=0;e<t.length;e++)rp.add(t[e])}var un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ca=Object.prototype.hasOwnProperty,jx=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ad={},ud={};function _x(e){return ca.call(ud,e)?!0:ca.call(ad,e)?!1:jx.test(e)?ud[e]=!0:(ad[e]=!0,!1)}function Ix(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Ax(e,t,n,r){if(t===null||typeof t>"u"||Ix(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ge(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Le={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Le[e]=new Ge(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Le[t]=new Ge(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Le[e]=new Ge(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Le[e]=new Ge(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Le[e]=new Ge(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Le[e]=new Ge(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Le[e]=new Ge(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Le[e]=new Ge(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Le[e]=new Ge(e,5,!1,e.toLowerCase(),null,!1,!1)});var _u=/[\-:]([a-z])/g;function Iu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(_u,Iu);Le[t]=new Ge(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(_u,Iu);Le[t]=new Ge(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(_u,Iu);Le[t]=new Ge(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Le[e]=new Ge(e,1,!1,e.toLowerCase(),null,!1,!1)});Le.xlinkHref=new Ge("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Le[e]=new Ge(e,1,!1,e.toLowerCase(),null,!0,!0)});function Au(e,t,n,r){var i=Le.hasOwnProperty(t)?Le[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Ax(t,n,i,r)&&(n=null),r||i===null?_x(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var pn=Tx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ko=Symbol.for("react.element"),kr=Symbol.for("react.portal"),wr=Symbol.for("react.fragment"),Ru=Symbol.for("react.strict_mode"),da=Symbol.for("react.profiler"),ip=Symbol.for("react.provider"),op=Symbol.for("react.context"),Pu=Symbol.for("react.forward_ref"),fa=Symbol.for("react.suspense"),ha=Symbol.for("react.suspense_list"),Du=Symbol.for("react.memo"),wn=Symbol.for("react.lazy"),sp=Symbol.for("react.offscreen"),cd=Symbol.iterator;function oi(e){return e===null||typeof e!="object"?null:(e=cd&&e[cd]||e["@@iterator"],typeof e=="function"?e:null)}var ke=Object.assign,gl;function xi(e){if(gl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);gl=t&&t[1]||""}return`
34
- `+gl+e}var yl=!1;function xl(e,t){if(!e||yl)return"";yl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
35
- `),o=r.stack.split(`
36
- `),s=i.length-1,l=o.length-1;1<=s&&0<=l&&i[s]!==o[l];)l--;for(;1<=s&&0<=l;s--,l--)if(i[s]!==o[l]){if(s!==1||l!==1)do if(s--,l--,0>l||i[s]!==o[l]){var u=`
37
- `+i[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=l);break}}}finally{yl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?xi(e):""}function Rx(e){switch(e.tag){case 5:return xi(e.type);case 16:return xi("Lazy");case 13:return xi("Suspense");case 19:return xi("SuspenseList");case 0:case 2:case 15:return e=xl(e.type,!1),e;case 11:return e=xl(e.type.render,!1),e;case 1:return e=xl(e.type,!0),e;default:return""}}function pa(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case wr:return"Fragment";case kr:return"Portal";case da:return"Profiler";case Ru:return"StrictMode";case fa:return"Suspense";case ha:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case op:return(e.displayName||"Context")+".Consumer";case ip:return(e._context.displayName||"Context")+".Provider";case Pu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Du:return t=e.displayName||null,t!==null?t:pa(e.type)||"Memo";case wn:t=e._payload,e=e._init;try{return pa(e(t))}catch{}}return null}function Px(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pa(t);case 8:return t===Ru?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Mn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Dx(e){var t=lp(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wo(e){e._valueTracker||(e._valueTracker=Dx(e))}function ap(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=lp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ds(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 ma(e,t){var n=t.checked;return ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function dd(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Mn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function up(e,t){t=t.checked,t!=null&&Au(e,"checked",t,!1)}function ga(e,t){up(e,t);var n=Mn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ya(e,t.type,n):t.hasOwnProperty("defaultValue")&&ya(e,t.type,Mn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function fd(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ya(e,t,n){(t!=="number"||ds(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var vi=Array.isArray;function Rr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Mn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function xa(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(F(91));return ke({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function hd(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(F(92));if(vi(n)){if(1<n.length)throw Error(F(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Mn(n)}}function cp(e,t){var n=Mn(t.value),r=Mn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function pd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function dp(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function va(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?dp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var So,fp=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(So=So||document.createElement("div"),So.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=So.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ci={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Lx=["Webkit","ms","Moz","O"];Object.keys(Ci).forEach(function(e){Lx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ci[t]=Ci[e]})});function hp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ci.hasOwnProperty(e)&&Ci[e]?(""+t).trim():t+"px"}function pp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=hp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Ox=ke({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ka(e,t){if(t){if(Ox[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(F(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(F(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(F(61))}if(t.style!=null&&typeof t.style!="object")throw Error(F(62))}}function wa(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Sa=null;function Lu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ca=null,Pr=null,Dr=null;function md(e){if(e=ao(e)){if(typeof Ca!="function")throw Error(F(280));var t=e.stateNode;t&&(t=Vs(t),Ca(e.stateNode,e.type,t))}}function mp(e){Pr?Dr?Dr.push(e):Dr=[e]:Pr=e}function gp(){if(Pr){var e=Pr,t=Dr;if(Dr=Pr=null,md(e),t)for(e=0;e<t.length;e++)md(t[e])}}function yp(e,t){return e(t)}function xp(){}var vl=!1;function vp(e,t,n){if(vl)return e(t,n);vl=!0;try{return yp(e,t,n)}finally{vl=!1,(Pr!==null||Dr!==null)&&(xp(),gp())}}function Mi(e,t){var n=e.stateNode;if(n===null)return null;var r=Vs(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(F(231,t,typeof n));return n}var Ea=!1;if(un)try{var si={};Object.defineProperty(si,"passive",{get:function(){Ea=!0}}),window.addEventListener("test",si,si),window.removeEventListener("test",si,si)}catch{Ea=!1}function Fx(e,t,n,r,i,o,s,l,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var Ei=!1,fs=null,hs=!1,ba=null,zx={onError:function(e){Ei=!0,fs=e}};function Mx(e,t,n,r,i,o,s,l,u){Ei=!1,fs=null,Fx.apply(zx,arguments)}function Bx(e,t,n,r,i,o,s,l,u){if(Mx.apply(this,arguments),Ei){if(Ei){var c=fs;Ei=!1,fs=null}else throw Error(F(198));hs||(hs=!0,ba=c)}}function dr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function kp(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 gd(e){if(dr(e)!==e)throw Error(F(188))}function Ux(e){var t=e.alternate;if(!t){if(t=dr(e),t===null)throw Error(F(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return gd(i),e;if(o===r)return gd(i),t;o=o.sibling}throw Error(F(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(F(189))}}if(n.alternate!==r)throw Error(F(190))}if(n.tag!==3)throw Error(F(188));return n.stateNode.current===n?e:t}function wp(e){return e=Ux(e),e!==null?Sp(e):null}function Sp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Sp(e);if(t!==null)return t;e=e.sibling}return null}var Cp=ut.unstable_scheduleCallback,yd=ut.unstable_cancelCallback,$x=ut.unstable_shouldYield,Hx=ut.unstable_requestPaint,Ce=ut.unstable_now,Wx=ut.unstable_getCurrentPriorityLevel,Ou=ut.unstable_ImmediatePriority,Ep=ut.unstable_UserBlockingPriority,ps=ut.unstable_NormalPriority,Vx=ut.unstable_LowPriority,bp=ut.unstable_IdlePriority,Us=null,Qt=null;function qx(e){if(Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(Us,e,void 0,(e.current.flags&128)===128)}catch{}}var Ot=Math.clz32?Math.clz32:Qx,Gx=Math.log,Kx=Math.LN2;function Qx(e){return e>>>=0,e===0?32:31-(Gx(e)/Kx|0)|0}var Co=64,Eo=4194304;function ki(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ms(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=ki(l):(o&=s,o!==0&&(r=ki(o)))}else s=n&~i,s!==0?r=ki(s):o!==0&&(r=ki(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ot(t),i=1<<n,r|=e[n],t&=~i;return r}function Yx(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Xx(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-Ot(o),l=1<<s,u=i[s];u===-1?(!(l&n)||l&r)&&(i[s]=Yx(l,t)):u<=t&&(e.expiredLanes|=l),o&=~l}}function Na(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Np(){var e=Co;return Co<<=1,!(Co&4194240)&&(Co=64),e}function kl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function so(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ot(t),e[t]=n}function Jx(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Ot(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Fu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ae=0;function Tp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var jp,zu,_p,Ip,Ap,Ta=!1,bo=[],In=null,An=null,Rn=null,Bi=new Map,Ui=new Map,En=[],Zx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function xd(e,t){switch(e){case"focusin":case"focusout":In=null;break;case"dragenter":case"dragleave":An=null;break;case"mouseover":case"mouseout":Rn=null;break;case"pointerover":case"pointerout":Bi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ui.delete(t.pointerId)}}function li(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=ao(t),t!==null&&zu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function ev(e,t,n,r,i){switch(t){case"focusin":return In=li(In,e,t,n,r,i),!0;case"dragenter":return An=li(An,e,t,n,r,i),!0;case"mouseover":return Rn=li(Rn,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Bi.set(o,li(Bi.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Ui.set(o,li(Ui.get(o)||null,e,t,n,r,i)),!0}return!1}function Rp(e){var t=Xn(e.target);if(t!==null){var n=dr(t);if(n!==null){if(t=n.tag,t===13){if(t=kp(n),t!==null){e.blockedOn=t,Ap(e.priority,function(){_p(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 Go(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ja(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Sa=r,n.target.dispatchEvent(r),Sa=null}else return t=ao(n),t!==null&&zu(t),e.blockedOn=n,!1;t.shift()}return!0}function vd(e,t,n){Go(e)&&n.delete(t)}function tv(){Ta=!1,In!==null&&Go(In)&&(In=null),An!==null&&Go(An)&&(An=null),Rn!==null&&Go(Rn)&&(Rn=null),Bi.forEach(vd),Ui.forEach(vd)}function ai(e,t){e.blockedOn===t&&(e.blockedOn=null,Ta||(Ta=!0,ut.unstable_scheduleCallback(ut.unstable_NormalPriority,tv)))}function $i(e){function t(i){return ai(i,e)}if(0<bo.length){ai(bo[0],e);for(var n=1;n<bo.length;n++){var r=bo[n];r.blockedOn===e&&(r.blockedOn=null)}}for(In!==null&&ai(In,e),An!==null&&ai(An,e),Rn!==null&&ai(Rn,e),Bi.forEach(t),Ui.forEach(t),n=0;n<En.length;n++)r=En[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<En.length&&(n=En[0],n.blockedOn===null);)Rp(n),n.blockedOn===null&&En.shift()}var Lr=pn.ReactCurrentBatchConfig,gs=!0;function nv(e,t,n,r){var i=ae,o=Lr.transition;Lr.transition=null;try{ae=1,Mu(e,t,n,r)}finally{ae=i,Lr.transition=o}}function rv(e,t,n,r){var i=ae,o=Lr.transition;Lr.transition=null;try{ae=4,Mu(e,t,n,r)}finally{ae=i,Lr.transition=o}}function Mu(e,t,n,r){if(gs){var i=ja(e,t,n,r);if(i===null)Il(e,t,r,ys,n),xd(e,r);else if(ev(i,e,t,n,r))r.stopPropagation();else if(xd(e,r),t&4&&-1<Zx.indexOf(e)){for(;i!==null;){var o=ao(i);if(o!==null&&jp(o),o=ja(e,t,n,r),o===null&&Il(e,t,r,ys,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else Il(e,t,r,null,n)}}var ys=null;function ja(e,t,n,r){if(ys=null,e=Lu(r),e=Xn(e),e!==null)if(t=dr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=kp(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 ys=e,null}function Pp(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Wx()){case Ou:return 1;case Ep:return 4;case ps:case Vx:return 16;case bp:return 536870912;default:return 16}default:return 16}}var jn=null,Bu=null,Ko=null;function Dp(){if(Ko)return Ko;var e,t=Bu,n=t.length,r,i="value"in jn?jn.value:jn.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return Ko=i.slice(e,1<r?1-r:void 0)}function Qo(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 No(){return!0}function kd(){return!1}function ft(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?No:kd,this.isPropagationStopped=kd,this}return ke(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=No)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=No)},persist:function(){},isPersistent:No}),t}var Qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uu=ft(Qr),lo=ke({},Qr,{view:0,detail:0}),iv=ft(lo),wl,Sl,ui,$s=ke({},lo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$u,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"?(wl=e.screenX-ui.screenX,Sl=e.screenY-ui.screenY):Sl=wl=0,ui=e),wl)},movementY:function(e){return"movementY"in e?e.movementY:Sl}}),wd=ft($s),ov=ke({},$s,{dataTransfer:0}),sv=ft(ov),lv=ke({},lo,{relatedTarget:0}),Cl=ft(lv),av=ke({},Qr,{animationName:0,elapsedTime:0,pseudoElement:0}),uv=ft(av),cv=ke({},Qr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),dv=ft(cv),fv=ke({},Qr,{data:0}),Sd=ft(fv),hv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pv={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"},mv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=mv[e])?!!t[e]:!1}function $u(){return gv}var yv=ke({},lo,{key:function(e){if(e.key){var t=hv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?pv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$u,charCode:function(e){return e.type==="keypress"?Qo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),xv=ft(yv),vv=ke({},$s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cd=ft(vv),kv=ke({},lo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$u}),wv=ft(kv),Sv=ke({},Qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Cv=ft(Sv),Ev=ke({},$s,{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}),bv=ft(Ev),Nv=[9,13,27,32],Hu=un&&"CompositionEvent"in window,bi=null;un&&"documentMode"in document&&(bi=document.documentMode);var Tv=un&&"TextEvent"in window&&!bi,Lp=un&&(!Hu||bi&&8<bi&&11>=bi),Ed=" ",bd=!1;function Op(e,t){switch(e){case"keyup":return Nv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sr=!1;function jv(e,t){switch(e){case"compositionend":return Fp(t);case"keypress":return t.which!==32?null:(bd=!0,Ed);case"textInput":return e=t.data,e===Ed&&bd?null:e;default:return null}}function _v(e,t){if(Sr)return e==="compositionend"||!Hu&&Op(e,t)?(e=Dp(),Ko=Bu=jn=null,Sr=!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 Lp&&t.locale!=="ko"?null:t.data;default:return null}}var Iv={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 Nd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Iv[e.type]:t==="textarea"}function zp(e,t,n,r){mp(r),t=xs(t,"onChange"),0<t.length&&(n=new Uu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ni=null,Hi=null;function Av(e){Qp(e,0)}function Hs(e){var t=br(e);if(ap(t))return e}function Rv(e,t){if(e==="change")return t}var Mp=!1;if(un){var El;if(un){var bl="oninput"in document;if(!bl){var Td=document.createElement("div");Td.setAttribute("oninput","return;"),bl=typeof Td.oninput=="function"}El=bl}else El=!1;Mp=El&&(!document.documentMode||9<document.documentMode)}function jd(){Ni&&(Ni.detachEvent("onpropertychange",Bp),Hi=Ni=null)}function Bp(e){if(e.propertyName==="value"&&Hs(Hi)){var t=[];zp(t,Hi,e,Lu(e)),vp(Av,t)}}function Pv(e,t,n){e==="focusin"?(jd(),Ni=t,Hi=n,Ni.attachEvent("onpropertychange",Bp)):e==="focusout"&&jd()}function Dv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Hs(Hi)}function Lv(e,t){if(e==="click")return Hs(t)}function Ov(e,t){if(e==="input"||e==="change")return Hs(t)}function Fv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:Fv;function Wi(e,t){if(Mt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ca.call(t,i)||!Mt(e[i],t[i]))return!1}return!0}function _d(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Id(e,t){var n=_d(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_d(n)}}function Up(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Up(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $p(){for(var e=window,t=ds();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ds(e.document)}return t}function Wu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function zv(e){var t=$p(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Up(n.ownerDocument.documentElement,n)){if(r!==null&&Wu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Id(n,o);var s=Id(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Mv=un&&"documentMode"in document&&11>=document.documentMode,Cr=null,_a=null,Ti=null,Ia=!1;function Ad(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ia||Cr==null||Cr!==ds(r)||(r=Cr,"selectionStart"in r&&Wu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ti&&Wi(Ti,r)||(Ti=r,r=xs(_a,"onSelect"),0<r.length&&(t=new Uu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Cr)))}function To(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Er={animationend:To("Animation","AnimationEnd"),animationiteration:To("Animation","AnimationIteration"),animationstart:To("Animation","AnimationStart"),transitionend:To("Transition","TransitionEnd")},Nl={},Hp={};un&&(Hp=document.createElement("div").style,"AnimationEvent"in window||(delete Er.animationend.animation,delete Er.animationiteration.animation,delete Er.animationstart.animation),"TransitionEvent"in window||delete Er.transitionend.transition);function Ws(e){if(Nl[e])return Nl[e];if(!Er[e])return e;var t=Er[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Hp)return Nl[e]=t[n];return e}var Wp=Ws("animationend"),Vp=Ws("animationiteration"),qp=Ws("animationstart"),Gp=Ws("transitionend"),Kp=new Map,Rd="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Un(e,t){Kp.set(e,t),cr(t,[e])}for(var Tl=0;Tl<Rd.length;Tl++){var jl=Rd[Tl],Bv=jl.toLowerCase(),Uv=jl[0].toUpperCase()+jl.slice(1);Un(Bv,"on"+Uv)}Un(Wp,"onAnimationEnd");Un(Vp,"onAnimationIteration");Un(qp,"onAnimationStart");Un("dblclick","onDoubleClick");Un("focusin","onFocus");Un("focusout","onBlur");Un(Gp,"onTransitionEnd");Br("onMouseEnter",["mouseout","mouseover"]);Br("onMouseLeave",["mouseout","mouseover"]);Br("onPointerEnter",["pointerout","pointerover"]);Br("onPointerLeave",["pointerout","pointerover"]);cr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));cr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));cr("onBeforeInput",["compositionend","keypress","textInput","paste"]);cr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));cr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));cr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wi="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(" "),$v=new Set("cancel close invalid load scroll toggle".split(" ").concat(wi));function Pd(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Bx(r,t,void 0,e),e.currentTarget=null}function Qp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],u=l.instance,c=l.currentTarget;if(l=l.listener,u!==o&&i.isPropagationStopped())break e;Pd(i,l,c),o=u}else for(s=0;s<r.length;s++){if(l=r[s],u=l.instance,c=l.currentTarget,l=l.listener,u!==o&&i.isPropagationStopped())break e;Pd(i,l,c),o=u}}}if(hs)throw e=ba,hs=!1,ba=null,e}function pe(e,t){var n=t[La];n===void 0&&(n=t[La]=new Set);var r=e+"__bubble";n.has(r)||(Yp(t,e,2,!1),n.add(r))}function _l(e,t,n){var r=0;t&&(r|=4),Yp(n,e,r,t)}var jo="_reactListening"+Math.random().toString(36).slice(2);function Vi(e){if(!e[jo]){e[jo]=!0,rp.forEach(function(n){n!=="selectionchange"&&($v.has(n)||_l(n,!1,e),_l(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jo]||(t[jo]=!0,_l("selectionchange",!1,t))}}function Yp(e,t,n,r){switch(Pp(t)){case 1:var i=nv;break;case 4:i=rv;break;default:i=Mu}n=i.bind(null,t,n,e),i=void 0,!Ea||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Il(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;s=s.return}for(;l!==null;){if(s=Xn(l),s===null)return;if(u=s.tag,u===5||u===6){r=o=s;continue e}l=l.parentNode}}r=r.return}vp(function(){var c=o,f=Lu(n),d=[];e:{var h=Kp.get(e);if(h!==void 0){var p=Uu,g=e;switch(e){case"keypress":if(Qo(n)===0)break e;case"keydown":case"keyup":p=xv;break;case"focusin":g="focus",p=Cl;break;case"focusout":g="blur",p=Cl;break;case"beforeblur":case"afterblur":p=Cl;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":p=wd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=sv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=wv;break;case Wp:case Vp:case qp:p=uv;break;case Gp:p=Cv;break;case"scroll":p=iv;break;case"wheel":p=bv;break;case"copy":case"cut":case"paste":p=dv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Cd}var v=(t&4)!==0,S=!v&&e==="scroll",y=v?h!==null?h+"Capture":null:h;v=[];for(var m=c,x;m!==null;){x=m;var T=x.stateNode;if(x.tag===5&&T!==null&&(x=T,y!==null&&(T=Mi(m,y),T!=null&&v.push(qi(m,T,x)))),S)break;m=m.return}0<v.length&&(h=new p(h,g,null,n,f),d.push({event:h,listeners:v}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==Sa&&(g=n.relatedTarget||n.fromElement)&&(Xn(g)||g[cn]))break e;if((p||h)&&(h=f.window===f?f:(h=f.ownerDocument)?h.defaultView||h.parentWindow:window,p?(g=n.relatedTarget||n.toElement,p=c,g=g?Xn(g):null,g!==null&&(S=dr(g),g!==S||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=c),p!==g)){if(v=wd,T="onMouseLeave",y="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(v=Cd,T="onPointerLeave",y="onPointerEnter",m="pointer"),S=p==null?h:br(p),x=g==null?h:br(g),h=new v(T,m+"leave",p,n,f),h.target=S,h.relatedTarget=x,T=null,Xn(f)===c&&(v=new v(y,m+"enter",g,n,f),v.target=x,v.relatedTarget=S,T=v),S=T,p&&g)t:{for(v=p,y=g,m=0,x=v;x;x=yr(x))m++;for(x=0,T=y;T;T=yr(T))x++;for(;0<m-x;)v=yr(v),m--;for(;0<x-m;)y=yr(y),x--;for(;m--;){if(v===y||y!==null&&v===y.alternate)break t;v=yr(v),y=yr(y)}v=null}else v=null;p!==null&&Dd(d,h,p,v,!1),g!==null&&S!==null&&Dd(d,S,g,v,!0)}}e:{if(h=c?br(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var j=Rv;else if(Nd(h))if(Mp)j=Ov;else{j=Dv;var E=Pv}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(j=Lv);if(j&&(j=j(e,c))){zp(d,j,n,f);break e}E&&E(e,h,c),e==="focusout"&&(E=h._wrapperState)&&E.controlled&&h.type==="number"&&ya(h,"number",h.value)}switch(E=c?br(c):window,e){case"focusin":(Nd(E)||E.contentEditable==="true")&&(Cr=E,_a=c,Ti=null);break;case"focusout":Ti=_a=Cr=null;break;case"mousedown":Ia=!0;break;case"contextmenu":case"mouseup":case"dragend":Ia=!1,Ad(d,n,f);break;case"selectionchange":if(Mv)break;case"keydown":case"keyup":Ad(d,n,f)}var _;if(Hu)e:{switch(e){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else Sr?Op(e,n)&&(D="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(Lp&&n.locale!=="ko"&&(Sr||D!=="onCompositionStart"?D==="onCompositionEnd"&&Sr&&(_=Dp()):(jn=f,Bu="value"in jn?jn.value:jn.textContent,Sr=!0)),E=xs(c,D),0<E.length&&(D=new Sd(D,e,null,n,f),d.push({event:D,listeners:E}),_?D.data=_:(_=Fp(n),_!==null&&(D.data=_)))),(_=Tv?jv(e,n):_v(e,n))&&(c=xs(c,"onBeforeInput"),0<c.length&&(f=new Sd("onBeforeInput","beforeinput",null,n,f),d.push({event:f,listeners:c}),f.data=_))}Qp(d,t)})}function qi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function xs(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Mi(e,n),o!=null&&r.unshift(qi(e,o,i)),o=Mi(e,t),o!=null&&r.push(qi(e,o,i))),e=e.return}return r}function yr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Dd(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var l=n,u=l.alternate,c=l.stateNode;if(u!==null&&u===r)break;l.tag===5&&c!==null&&(l=c,i?(u=Mi(n,o),u!=null&&s.unshift(qi(n,u,l))):i||(u=Mi(n,o),u!=null&&s.push(qi(n,u,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Hv=/\r\n?/g,Wv=/\u0000|\uFFFD/g;function Ld(e){return(typeof e=="string"?e:""+e).replace(Hv,`
38
- `).replace(Wv,"")}function _o(e,t,n){if(t=Ld(t),Ld(e)!==t&&n)throw Error(F(425))}function vs(){}var Aa=null,Ra=null;function Pa(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Da=typeof setTimeout=="function"?setTimeout:void 0,Vv=typeof clearTimeout=="function"?clearTimeout:void 0,Od=typeof Promise=="function"?Promise:void 0,qv=typeof queueMicrotask=="function"?queueMicrotask:typeof Od<"u"?function(e){return Od.resolve(null).then(e).catch(Gv)}:Da;function Gv(e){setTimeout(function(){throw e})}function Al(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),$i(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);$i(t)}function Pn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Fd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Yr=Math.random().toString(36).slice(2),Kt="__reactFiber$"+Yr,Gi="__reactProps$"+Yr,cn="__reactContainer$"+Yr,La="__reactEvents$"+Yr,Kv="__reactListeners$"+Yr,Qv="__reactHandles$"+Yr;function Xn(e){var t=e[Kt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[cn]||n[Kt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Fd(e);e!==null;){if(n=e[Kt])return n;e=Fd(e)}return t}e=n,n=e.parentNode}return null}function ao(e){return e=e[Kt]||e[cn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function br(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(F(33))}function Vs(e){return e[Gi]||null}var Oa=[],Nr=-1;function $n(e){return{current:e}}function me(e){0>Nr||(e.current=Oa[Nr],Oa[Nr]=null,Nr--)}function he(e,t){Nr++,Oa[Nr]=e.current,e.current=t}var Bn={},Ue=$n(Bn),Je=$n(!1),rr=Bn;function Ur(e,t){var n=e.type.contextTypes;if(!n)return Bn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ze(e){return e=e.childContextTypes,e!=null}function ks(){me(Je),me(Ue)}function zd(e,t,n){if(Ue.current!==Bn)throw Error(F(168));he(Ue,t),he(Je,n)}function Xp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(F(108,Px(e)||"Unknown",i));return ke({},n,r)}function ws(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bn,rr=Ue.current,he(Ue,e),he(Je,Je.current),!0}function Md(e,t,n){var r=e.stateNode;if(!r)throw Error(F(169));n?(e=Xp(e,t,rr),r.__reactInternalMemoizedMergedChildContext=e,me(Je),me(Ue),he(Ue,e)):me(Je),he(Je,n)}var rn=null,qs=!1,Rl=!1;function Jp(e){rn===null?rn=[e]:rn.push(e)}function Yv(e){qs=!0,Jp(e)}function Hn(){if(!Rl&&rn!==null){Rl=!0;var e=0,t=ae;try{var n=rn;for(ae=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}rn=null,qs=!1}catch(i){throw rn!==null&&(rn=rn.slice(e+1)),Cp(Ou,Hn),i}finally{ae=t,Rl=!1}}return null}var Tr=[],jr=0,Ss=null,Cs=0,yt=[],xt=0,ir=null,on=1,sn="";function Kn(e,t){Tr[jr++]=Cs,Tr[jr++]=Ss,Ss=e,Cs=t}function Zp(e,t,n){yt[xt++]=on,yt[xt++]=sn,yt[xt++]=ir,ir=e;var r=on;e=sn;var i=32-Ot(r)-1;r&=~(1<<i),n+=1;var o=32-Ot(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,on=1<<32-Ot(t)+i|n<<i|r,sn=o+e}else on=1<<o|n<<i|r,sn=e}function Vu(e){e.return!==null&&(Kn(e,1),Zp(e,1,0))}function qu(e){for(;e===Ss;)Ss=Tr[--jr],Tr[jr]=null,Cs=Tr[--jr],Tr[jr]=null;for(;e===ir;)ir=yt[--xt],yt[xt]=null,sn=yt[--xt],yt[xt]=null,on=yt[--xt],yt[xt]=null}var lt=null,st=null,ge=!1,Dt=null;function em(e,t){var n=wt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Bd(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,lt=e,st=Pn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,lt=e,st=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ir!==null?{id:on,overflow:sn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=wt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,lt=e,st=null,!0):!1;default:return!1}}function Fa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function za(e){if(ge){var t=st;if(t){var n=t;if(!Bd(e,t)){if(Fa(e))throw Error(F(418));t=Pn(n.nextSibling);var r=lt;t&&Bd(e,t)?em(r,n):(e.flags=e.flags&-4097|2,ge=!1,lt=e)}}else{if(Fa(e))throw Error(F(418));e.flags=e.flags&-4097|2,ge=!1,lt=e}}}function Ud(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;lt=e}function Io(e){if(e!==lt)return!1;if(!ge)return Ud(e),ge=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Pa(e.type,e.memoizedProps)),t&&(t=st)){if(Fa(e))throw tm(),Error(F(418));for(;t;)em(e,t),t=Pn(t.nextSibling)}if(Ud(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){st=Pn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}st=null}}else st=lt?Pn(e.stateNode.nextSibling):null;return!0}function tm(){for(var e=st;e;)e=Pn(e.nextSibling)}function $r(){st=lt=null,ge=!1}function Gu(e){Dt===null?Dt=[e]:Dt.push(e)}var Xv=pn.ReactCurrentBatchConfig;function ci(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(F(309));var r=n.stateNode}if(!r)throw Error(F(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var l=i.refs;s===null?delete l[o]:l[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(F(284));if(!n._owner)throw Error(F(290,e))}return e}function Ao(e,t){throw e=Object.prototype.toString.call(t),Error(F(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $d(e){var t=e._init;return t(e._payload)}function nm(e){function t(y,m){if(e){var x=y.deletions;x===null?(y.deletions=[m],y.flags|=16):x.push(m)}}function n(y,m){if(!e)return null;for(;m!==null;)t(y,m),m=m.sibling;return null}function r(y,m){for(y=new Map;m!==null;)m.key!==null?y.set(m.key,m):y.set(m.index,m),m=m.sibling;return y}function i(y,m){return y=Fn(y,m),y.index=0,y.sibling=null,y}function o(y,m,x){return y.index=x,e?(x=y.alternate,x!==null?(x=x.index,x<m?(y.flags|=2,m):x):(y.flags|=2,m)):(y.flags|=1048576,m)}function s(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,m,x,T){return m===null||m.tag!==6?(m=Ml(x,y.mode,T),m.return=y,m):(m=i(m,x),m.return=y,m)}function u(y,m,x,T){var j=x.type;return j===wr?f(y,m,x.props.children,T,x.key):m!==null&&(m.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===wn&&$d(j)===m.type)?(T=i(m,x.props),T.ref=ci(y,m,x),T.return=y,T):(T=ns(x.type,x.key,x.props,null,y.mode,T),T.ref=ci(y,m,x),T.return=y,T)}function c(y,m,x,T){return m===null||m.tag!==4||m.stateNode.containerInfo!==x.containerInfo||m.stateNode.implementation!==x.implementation?(m=Bl(x,y.mode,T),m.return=y,m):(m=i(m,x.children||[]),m.return=y,m)}function f(y,m,x,T,j){return m===null||m.tag!==7?(m=nr(x,y.mode,T,j),m.return=y,m):(m=i(m,x),m.return=y,m)}function d(y,m,x){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Ml(""+m,y.mode,x),m.return=y,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case ko:return x=ns(m.type,m.key,m.props,null,y.mode,x),x.ref=ci(y,null,m),x.return=y,x;case kr:return m=Bl(m,y.mode,x),m.return=y,m;case wn:var T=m._init;return d(y,T(m._payload),x)}if(vi(m)||oi(m))return m=nr(m,y.mode,x,null),m.return=y,m;Ao(y,m)}return null}function h(y,m,x,T){var j=m!==null?m.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return j!==null?null:l(y,m,""+x,T);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case ko:return x.key===j?u(y,m,x,T):null;case kr:return x.key===j?c(y,m,x,T):null;case wn:return j=x._init,h(y,m,j(x._payload),T)}if(vi(x)||oi(x))return j!==null?null:f(y,m,x,T,null);Ao(y,x)}return null}function p(y,m,x,T,j){if(typeof T=="string"&&T!==""||typeof T=="number")return y=y.get(x)||null,l(m,y,""+T,j);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case ko:return y=y.get(T.key===null?x:T.key)||null,u(m,y,T,j);case kr:return y=y.get(T.key===null?x:T.key)||null,c(m,y,T,j);case wn:var E=T._init;return p(y,m,x,E(T._payload),j)}if(vi(T)||oi(T))return y=y.get(x)||null,f(m,y,T,j,null);Ao(m,T)}return null}function g(y,m,x,T){for(var j=null,E=null,_=m,D=m=0,R=null;_!==null&&D<x.length;D++){_.index>D?(R=_,_=null):R=_.sibling;var b=h(y,_,x[D],T);if(b===null){_===null&&(_=R);break}e&&_&&b.alternate===null&&t(y,_),m=o(b,m,D),E===null?j=b:E.sibling=b,E=b,_=R}if(D===x.length)return n(y,_),ge&&Kn(y,D),j;if(_===null){for(;D<x.length;D++)_=d(y,x[D],T),_!==null&&(m=o(_,m,D),E===null?j=_:E.sibling=_,E=_);return ge&&Kn(y,D),j}for(_=r(y,_);D<x.length;D++)R=p(_,y,D,x[D],T),R!==null&&(e&&R.alternate!==null&&_.delete(R.key===null?D:R.key),m=o(R,m,D),E===null?j=R:E.sibling=R,E=R);return e&&_.forEach(function(P){return t(y,P)}),ge&&Kn(y,D),j}function v(y,m,x,T){var j=oi(x);if(typeof j!="function")throw Error(F(150));if(x=j.call(x),x==null)throw Error(F(151));for(var E=j=null,_=m,D=m=0,R=null,b=x.next();_!==null&&!b.done;D++,b=x.next()){_.index>D?(R=_,_=null):R=_.sibling;var P=h(y,_,b.value,T);if(P===null){_===null&&(_=R);break}e&&_&&P.alternate===null&&t(y,_),m=o(P,m,D),E===null?j=P:E.sibling=P,E=P,_=R}if(b.done)return n(y,_),ge&&Kn(y,D),j;if(_===null){for(;!b.done;D++,b=x.next())b=d(y,b.value,T),b!==null&&(m=o(b,m,D),E===null?j=b:E.sibling=b,E=b);return ge&&Kn(y,D),j}for(_=r(y,_);!b.done;D++,b=x.next())b=p(_,y,D,b.value,T),b!==null&&(e&&b.alternate!==null&&_.delete(b.key===null?D:b.key),m=o(b,m,D),E===null?j=b:E.sibling=b,E=b);return e&&_.forEach(function(q){return t(y,q)}),ge&&Kn(y,D),j}function S(y,m,x,T){if(typeof x=="object"&&x!==null&&x.type===wr&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case ko:e:{for(var j=x.key,E=m;E!==null;){if(E.key===j){if(j=x.type,j===wr){if(E.tag===7){n(y,E.sibling),m=i(E,x.props.children),m.return=y,y=m;break e}}else if(E.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===wn&&$d(j)===E.type){n(y,E.sibling),m=i(E,x.props),m.ref=ci(y,E,x),m.return=y,y=m;break e}n(y,E);break}else t(y,E);E=E.sibling}x.type===wr?(m=nr(x.props.children,y.mode,T,x.key),m.return=y,y=m):(T=ns(x.type,x.key,x.props,null,y.mode,T),T.ref=ci(y,m,x),T.return=y,y=T)}return s(y);case kr:e:{for(E=x.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===x.containerInfo&&m.stateNode.implementation===x.implementation){n(y,m.sibling),m=i(m,x.children||[]),m.return=y,y=m;break e}else{n(y,m);break}else t(y,m);m=m.sibling}m=Bl(x,y.mode,T),m.return=y,y=m}return s(y);case wn:return E=x._init,S(y,m,E(x._payload),T)}if(vi(x))return g(y,m,x,T);if(oi(x))return v(y,m,x,T);Ao(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,m!==null&&m.tag===6?(n(y,m.sibling),m=i(m,x),m.return=y,y=m):(n(y,m),m=Ml(x,y.mode,T),m.return=y,y=m),s(y)):n(y,m)}return S}var Hr=nm(!0),rm=nm(!1),Es=$n(null),bs=null,_r=null,Ku=null;function Qu(){Ku=_r=bs=null}function Yu(e){var t=Es.current;me(Es),e._currentValue=t}function Ma(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Or(e,t){bs=e,Ku=_r=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Xe=!0),e.firstContext=null)}function Ct(e){var t=e._currentValue;if(Ku!==e)if(e={context:e,memoizedValue:t,next:null},_r===null){if(bs===null)throw Error(F(308));_r=e,bs.dependencies={lanes:0,firstContext:e}}else _r=_r.next=e;return t}var Jn=null;function Xu(e){Jn===null?Jn=[e]:Jn.push(e)}function im(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Xu(t)):(n.next=i.next,i.next=n),t.interleaved=n,dn(e,r)}function dn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Sn=!1;function Ju(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function om(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ln(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Dn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,oe&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,dn(e,n)}return i=r.interleaved,i===null?(t.next=t,Xu(r)):(t.next=i.next,i.next=t),r.interleaved=t,dn(e,n)}function Yo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Fu(e,n)}}function Hd(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ns(e,t,n,r){var i=e.updateQueue;Sn=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var u=l,c=u.next;u.next=null,s===null?o=c:s.next=c,s=u;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==s&&(l===null?f.firstBaseUpdate=c:l.next=c,f.lastBaseUpdate=u))}if(o!==null){var d=i.baseState;s=0,f=c=u=null,l=o;do{var h=l.lane,p=l.eventTime;if((r&h)===h){f!==null&&(f=f.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,v=l;switch(h=t,p=n,v.tag){case 1:if(g=v.payload,typeof g=="function"){d=g.call(p,d,h);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,h=typeof g=="function"?g.call(p,d,h):g,h==null)break e;d=ke({},d,h);break e;case 2:Sn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[l]:h.push(l))}else p={eventTime:p,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(c=f=p,u=d):f=f.next=p,s|=h;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;h=l,l=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(f===null&&(u=d),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);sr|=s,e.lanes=s,e.memoizedState=d}}function Wd(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(F(191,i));i.call(r)}}}var uo={},Yt=$n(uo),Ki=$n(uo),Qi=$n(uo);function Zn(e){if(e===uo)throw Error(F(174));return e}function Zu(e,t){switch(he(Qi,t),he(Ki,e),he(Yt,uo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:va(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=va(t,e)}me(Yt),he(Yt,t)}function Wr(){me(Yt),me(Ki),me(Qi)}function sm(e){Zn(Qi.current);var t=Zn(Yt.current),n=va(t,e.type);t!==n&&(he(Ki,e),he(Yt,n))}function ec(e){Ki.current===e&&(me(Yt),me(Ki))}var xe=$n(0);function Ts(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Pl=[];function tc(){for(var e=0;e<Pl.length;e++)Pl[e]._workInProgressVersionPrimary=null;Pl.length=0}var Xo=pn.ReactCurrentDispatcher,Dl=pn.ReactCurrentBatchConfig,or=0,ve=null,_e=null,Ae=null,js=!1,ji=!1,Yi=0,Jv=0;function Fe(){throw Error(F(321))}function nc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Mt(e[n],t[n]))return!1;return!0}function rc(e,t,n,r,i,o){if(or=o,ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xo.current=e===null||e.memoizedState===null?nk:rk,e=n(r,i),ji){o=0;do{if(ji=!1,Yi=0,25<=o)throw Error(F(301));o+=1,Ae=_e=null,t.updateQueue=null,Xo.current=ik,e=n(r,i)}while(ji)}if(Xo.current=_s,t=_e!==null&&_e.next!==null,or=0,Ae=_e=ve=null,js=!1,t)throw Error(F(300));return e}function ic(){var e=Yi!==0;return Yi=0,e}function Ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ae===null?ve.memoizedState=Ae=e:Ae=Ae.next=e,Ae}function Et(){if(_e===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Ae===null?ve.memoizedState:Ae.next;if(t!==null)Ae=t,_e=e;else{if(e===null)throw Error(F(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},Ae===null?ve.memoizedState=Ae=e:Ae=Ae.next=e}return Ae}function Xi(e,t){return typeof t=="function"?t(e):t}function Ll(e){var t=Et(),n=t.queue;if(n===null)throw Error(F(311));n.lastRenderedReducer=e;var r=_e,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var l=s=null,u=null,c=o;do{var f=c.lane;if((or&f)===f)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(l=u=d,s=r):u=u.next=d,ve.lanes|=f,sr|=f}c=c.next}while(c!==null&&c!==o);u===null?s=r:u.next=l,Mt(r,t.memoizedState)||(Xe=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,ve.lanes|=o,sr|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ol(e){var t=Et(),n=t.queue;if(n===null)throw Error(F(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Mt(o,t.memoizedState)||(Xe=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function lm(){}function am(e,t){var n=ve,r=Et(),i=t(),o=!Mt(r.memoizedState,i);if(o&&(r.memoizedState=i,Xe=!0),r=r.queue,oc(dm.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Ae!==null&&Ae.memoizedState.tag&1){if(n.flags|=2048,Ji(9,cm.bind(null,n,r,i,t),void 0,null),Re===null)throw Error(F(349));or&30||um(n,t,i)}return i}function um(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ve.updateQueue,t===null?(t={lastEffect:null,stores:null},ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function cm(e,t,n,r){t.value=n,t.getSnapshot=r,fm(t)&&hm(e)}function dm(e,t,n){return n(function(){fm(t)&&hm(e)})}function fm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Mt(e,n)}catch{return!0}}function hm(e){var t=dn(e,1);t!==null&&Ft(t,e,1,-1)}function Vd(e){var t=Ht();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Xi,lastRenderedState:e},t.queue=e,e=e.dispatch=tk.bind(null,ve,e),[t.memoizedState,e]}function Ji(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ve.updateQueue,t===null?(t={lastEffect:null,stores:null},ve.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function pm(){return Et().memoizedState}function Jo(e,t,n,r){var i=Ht();ve.flags|=e,i.memoizedState=Ji(1|t,n,void 0,r===void 0?null:r)}function Gs(e,t,n,r){var i=Et();r=r===void 0?null:r;var o=void 0;if(_e!==null){var s=_e.memoizedState;if(o=s.destroy,r!==null&&nc(r,s.deps)){i.memoizedState=Ji(t,n,o,r);return}}ve.flags|=e,i.memoizedState=Ji(1|t,n,o,r)}function qd(e,t){return Jo(8390656,8,e,t)}function oc(e,t){return Gs(2048,8,e,t)}function mm(e,t){return Gs(4,2,e,t)}function gm(e,t){return Gs(4,4,e,t)}function ym(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function xm(e,t,n){return n=n!=null?n.concat([e]):null,Gs(4,4,ym.bind(null,t,e),n)}function sc(){}function vm(e,t){var n=Et();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&nc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function km(e,t){var n=Et();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&nc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function wm(e,t,n){return or&21?(Mt(n,t)||(n=Np(),ve.lanes|=n,sr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Xe=!0),e.memoizedState=n)}function Zv(e,t){var n=ae;ae=n!==0&&4>n?n:4,e(!0);var r=Dl.transition;Dl.transition={};try{e(!1),t()}finally{ae=n,Dl.transition=r}}function Sm(){return Et().memoizedState}function ek(e,t,n){var r=On(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Cm(e))Em(t,n);else if(n=im(e,t,n,r),n!==null){var i=Ve();Ft(n,e,r,i),bm(n,t,r)}}function tk(e,t,n){var r=On(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cm(e))Em(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,Mt(l,s)){var u=t.interleaved;u===null?(i.next=i,Xu(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=im(e,t,i,r),n!==null&&(i=Ve(),Ft(n,e,r,i),bm(n,t,r))}}function Cm(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function Em(e,t){ji=js=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bm(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Fu(e,n)}}var _s={readContext:Ct,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useInsertionEffect:Fe,useLayoutEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useMutableSource:Fe,useSyncExternalStore:Fe,useId:Fe,unstable_isNewReconciler:!1},nk={readContext:Ct,useCallback:function(e,t){return Ht().memoizedState=[e,t===void 0?null:t],e},useContext:Ct,useEffect:qd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Jo(4194308,4,ym.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Jo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Jo(4,2,e,t)},useMemo:function(e,t){var n=Ht();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ht();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ek.bind(null,ve,e),[r.memoizedState,e]},useRef:function(e){var t=Ht();return e={current:e},t.memoizedState=e},useState:Vd,useDebugValue:sc,useDeferredValue:function(e){return Ht().memoizedState=e},useTransition:function(){var e=Vd(!1),t=e[0];return e=Zv.bind(null,e[1]),Ht().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ve,i=Ht();if(ge){if(n===void 0)throw Error(F(407));n=n()}else{if(n=t(),Re===null)throw Error(F(349));or&30||um(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,qd(dm.bind(null,r,o,e),[e]),r.flags|=2048,Ji(9,cm.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ht(),t=Re.identifierPrefix;if(ge){var n=sn,r=on;n=(r&~(1<<32-Ot(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Jv++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},rk={readContext:Ct,useCallback:vm,useContext:Ct,useEffect:oc,useImperativeHandle:xm,useInsertionEffect:mm,useLayoutEffect:gm,useMemo:km,useReducer:Ll,useRef:pm,useState:function(){return Ll(Xi)},useDebugValue:sc,useDeferredValue:function(e){var t=Et();return wm(t,_e.memoizedState,e)},useTransition:function(){var e=Ll(Xi)[0],t=Et().memoizedState;return[e,t]},useMutableSource:lm,useSyncExternalStore:am,useId:Sm,unstable_isNewReconciler:!1},ik={readContext:Ct,useCallback:vm,useContext:Ct,useEffect:oc,useImperativeHandle:xm,useInsertionEffect:mm,useLayoutEffect:gm,useMemo:km,useReducer:Ol,useRef:pm,useState:function(){return Ol(Xi)},useDebugValue:sc,useDeferredValue:function(e){var t=Et();return _e===null?t.memoizedState=e:wm(t,_e.memoizedState,e)},useTransition:function(){var e=Ol(Xi)[0],t=Et().memoizedState;return[e,t]},useMutableSource:lm,useSyncExternalStore:am,useId:Sm,unstable_isNewReconciler:!1};function It(e,t){if(e&&e.defaultProps){t=ke({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ba(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ks={isMounted:function(e){return(e=e._reactInternals)?dr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ve(),i=On(e),o=ln(r,i);o.payload=t,n!=null&&(o.callback=n),t=Dn(e,o,i),t!==null&&(Ft(t,e,i,r),Yo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ve(),i=On(e),o=ln(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Dn(e,o,i),t!==null&&(Ft(t,e,i,r),Yo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ve(),r=On(e),i=ln(n,r);i.tag=2,t!=null&&(i.callback=t),t=Dn(e,i,r),t!==null&&(Ft(t,e,r,n),Yo(t,e,r))}};function Gd(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!Wi(n,r)||!Wi(i,o):!0}function Nm(e,t,n){var r=!1,i=Bn,o=t.contextType;return typeof o=="object"&&o!==null?o=Ct(o):(i=Ze(t)?rr:Ue.current,r=t.contextTypes,o=(r=r!=null)?Ur(e,i):Bn),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ks,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Kd(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ks.enqueueReplaceState(t,t.state,null)}function Ua(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ju(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Ct(o):(o=Ze(t)?rr:Ue.current,i.context=Ur(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Ba(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Ks.enqueueReplaceState(i,i.state,null),Ns(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Vr(e,t){try{var n="",r=t;do n+=Rx(r),r=r.return;while(r);var i=n}catch(o){i=`
39
- Error generating stack: `+o.message+`
40
- `+o.stack}return{value:e,source:t,stack:i,digest:null}}function Fl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function $a(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ok=typeof WeakMap=="function"?WeakMap:Map;function Tm(e,t,n){n=ln(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){As||(As=!0,Ja=r),$a(e,t)},n}function jm(e,t,n){n=ln(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){$a(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){$a(e,t),typeof r!="function"&&(Ln===null?Ln=new Set([this]):Ln.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Qd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ok;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=vk.bind(null,e,t,n),t.then(e,e))}function Yd(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Xd(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ln(-1,1),t.tag=2,Dn(n,t,1))),n.lanes|=1),e)}var sk=pn.ReactCurrentOwner,Xe=!1;function He(e,t,n,r){t.child=e===null?rm(t,null,n,r):Hr(t,e.child,n,r)}function Jd(e,t,n,r,i){n=n.render;var o=t.ref;return Or(t,i),r=rc(e,t,n,r,o,i),n=ic(),e!==null&&!Xe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,fn(e,t,i)):(ge&&n&&Vu(t),t.flags|=1,He(e,t,r,i),t.child)}function Zd(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!pc(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,_m(e,t,o,r,i)):(e=ns(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Wi,n(s,r)&&e.ref===t.ref)return fn(e,t,i)}return t.flags|=1,e=Fn(o,r),e.ref=t.ref,e.return=t,t.child=e}function _m(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Wi(o,r)&&e.ref===t.ref)if(Xe=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Xe=!0);else return t.lanes=e.lanes,fn(e,t,i)}return Ha(e,t,n,r,i)}function Im(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},he(Ar,ot),ot|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,he(Ar,ot),ot|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,he(Ar,ot),ot|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,he(Ar,ot),ot|=r;return He(e,t,i,n),t.child}function Am(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ha(e,t,n,r,i){var o=Ze(n)?rr:Ue.current;return o=Ur(t,o),Or(t,i),n=rc(e,t,n,r,o,i),r=ic(),e!==null&&!Xe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,fn(e,t,i)):(ge&&r&&Vu(t),t.flags|=1,He(e,t,n,i),t.child)}function ef(e,t,n,r,i){if(Ze(n)){var o=!0;ws(t)}else o=!1;if(Or(t,i),t.stateNode===null)Zo(e,t),Nm(t,n,r),Ua(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var u=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Ct(c):(c=Ze(n)?rr:Ue.current,c=Ur(t,c));var f=n.getDerivedStateFromProps,d=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||u!==c)&&Kd(t,s,r,c),Sn=!1;var h=t.memoizedState;s.state=h,Ns(t,r,s,i),u=t.memoizedState,l!==r||h!==u||Je.current||Sn?(typeof f=="function"&&(Ba(t,n,f,r),u=t.memoizedState),(l=Sn||Gd(t,n,l,r,h,u,c))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=c,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,om(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:It(t.type,l),s.props=c,d=t.pendingProps,h=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=Ct(u):(u=Ze(n)?rr:Ue.current,u=Ur(t,u));var p=n.getDerivedStateFromProps;(f=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==d||h!==u)&&Kd(t,s,r,u),Sn=!1,h=t.memoizedState,s.state=h,Ns(t,r,s,i);var g=t.memoizedState;l!==d||h!==g||Je.current||Sn?(typeof p=="function"&&(Ba(t,n,p,r),g=t.memoizedState),(c=Sn||Gd(t,n,c,r,h,g,u)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,g,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,g,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),s.props=r,s.state=g,s.context=u,r=c):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Wa(e,t,n,r,o,i)}function Wa(e,t,n,r,i,o){Am(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&Md(t,n,!1),fn(e,t,o);r=t.stateNode,sk.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Hr(t,e.child,null,o),t.child=Hr(t,null,l,o)):He(e,t,l,o),t.memoizedState=r.state,i&&Md(t,n,!0),t.child}function Rm(e){var t=e.stateNode;t.pendingContext?zd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&zd(e,t.context,!1),Zu(e,t.containerInfo)}function tf(e,t,n,r,i){return $r(),Gu(i),t.flags|=256,He(e,t,n,r),t.child}var Va={dehydrated:null,treeContext:null,retryLane:0};function qa(e){return{baseLanes:e,cachePool:null,transitions:null}}function Pm(e,t,n){var r=t.pendingProps,i=xe.current,o=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),he(xe,i&1),e===null)return za(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Xs(s,r,0,null),e=nr(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=qa(n),t.memoizedState=Va,e):lc(t,s));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return lk(e,t,s,r,l,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,l=i.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Fn(i,u),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=Fn(l,o):(o=nr(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?qa(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=Va,r}return o=e.child,e=o.sibling,r=Fn(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function lc(e,t){return t=Xs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ro(e,t,n,r){return r!==null&&Gu(r),Hr(t,e.child,null,n),e=lc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lk(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=Fl(Error(F(422))),Ro(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Xs({mode:"visible",children:r.children},i,0,null),o=nr(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Hr(t,e.child,null,s),t.child.memoizedState=qa(s),t.memoizedState=Va,o);if(!(t.mode&1))return Ro(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(F(419)),r=Fl(o,r,void 0),Ro(e,t,s,r)}if(l=(s&e.childLanes)!==0,Xe||l){if(r=Re,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,dn(e,i),Ft(r,e,i,-1))}return hc(),r=Fl(Error(F(421))),Ro(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=kk.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,st=Pn(i.nextSibling),lt=t,ge=!0,Dt=null,e!==null&&(yt[xt++]=on,yt[xt++]=sn,yt[xt++]=ir,on=e.id,sn=e.overflow,ir=t),t=lc(t,r.children),t.flags|=4096,t)}function nf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ma(e.return,t,n)}function zl(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Dm(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(He(e,t,r.children,n),r=xe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nf(e,n,t);else if(e.tag===19)nf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(he(xe,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ts(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),zl(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ts(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}zl(t,!0,n,null,o);break;case"together":zl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Zo(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function fn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),sr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(F(153));if(t.child!==null){for(e=t.child,n=Fn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Fn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ak(e,t,n){switch(t.tag){case 3:Rm(t),$r();break;case 5:sm(t);break;case 1:Ze(t.type)&&ws(t);break;case 4:Zu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;he(Es,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(he(xe,xe.current&1),t.flags|=128,null):n&t.child.childLanes?Pm(e,t,n):(he(xe,xe.current&1),e=fn(e,t,n),e!==null?e.sibling:null);he(xe,xe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Dm(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),he(xe,xe.current),r)break;return null;case 22:case 23:return t.lanes=0,Im(e,t,n)}return fn(e,t,n)}var Lm,Ga,Om,Fm;Lm=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ga=function(){};Om=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Zn(Yt.current);var o=null;switch(n){case"input":i=ma(e,i),r=ma(e,r),o=[];break;case"select":i=ke({},i,{value:void 0}),r=ke({},r,{value:void 0}),o=[];break;case"textarea":i=xa(e,i),r=xa(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=vs)}ka(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var l=i[c];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Fi.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var u=r[c];if(l=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(u!=null||l!=null))if(c==="style")if(l){for(s in l)!l.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&l[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(o||(o=[]),o.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(o=o||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Fi.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&pe("scroll",e),o||l===u||(o=[])):(o=o||[]).push(c,u))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};Fm=function(e,t,n,r){n!==r&&(t.flags|=4)};function di(e,t){if(!ge)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function uk(e,t,n){var r=t.pendingProps;switch(qu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return Ze(t.type)&&ks(),ze(t),null;case 3:return r=t.stateNode,Wr(),me(Je),me(Ue),tc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Io(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Dt!==null&&(tu(Dt),Dt=null))),Ga(e,t),ze(t),null;case 5:ec(t);var i=Zn(Qi.current);if(n=t.type,e!==null&&t.stateNode!=null)Om(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(F(166));return ze(t),null}if(e=Zn(Yt.current),Io(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Kt]=t,r[Gi]=o,e=(t.mode&1)!==0,n){case"dialog":pe("cancel",r),pe("close",r);break;case"iframe":case"object":case"embed":pe("load",r);break;case"video":case"audio":for(i=0;i<wi.length;i++)pe(wi[i],r);break;case"source":pe("error",r);break;case"img":case"image":case"link":pe("error",r),pe("load",r);break;case"details":pe("toggle",r);break;case"input":dd(r,o),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},pe("invalid",r);break;case"textarea":hd(r,o),pe("invalid",r)}ka(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&_o(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&_o(r.textContent,l,e),i=["children",""+l]):Fi.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&pe("scroll",r)}switch(n){case"input":wo(r),fd(r,o,!0);break;case"textarea":wo(r),pd(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=vs)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=dp(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Kt]=t,e[Gi]=r,Lm(e,t,!1,!1),t.stateNode=e;e:{switch(s=wa(n,r),n){case"dialog":pe("cancel",e),pe("close",e),i=r;break;case"iframe":case"object":case"embed":pe("load",e),i=r;break;case"video":case"audio":for(i=0;i<wi.length;i++)pe(wi[i],e);i=r;break;case"source":pe("error",e),i=r;break;case"img":case"image":case"link":pe("error",e),pe("load",e),i=r;break;case"details":pe("toggle",e),i=r;break;case"input":dd(e,r),i=ma(e,r),pe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ke({},r,{value:void 0}),pe("invalid",e);break;case"textarea":hd(e,r),i=xa(e,r),pe("invalid",e);break;default:i=r}ka(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var u=l[o];o==="style"?pp(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&fp(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&zi(e,u):typeof u=="number"&&zi(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Fi.hasOwnProperty(o)?u!=null&&o==="onScroll"&&pe("scroll",e):u!=null&&Au(e,o,u,s))}switch(n){case"input":wo(e),fd(e,r,!1);break;case"textarea":wo(e),pd(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Mn(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Rr(e,!!r.multiple,o,!1):r.defaultValue!=null&&Rr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=vs)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ze(t),null;case 6:if(e&&t.stateNode!=null)Fm(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(F(166));if(n=Zn(Qi.current),Zn(Yt.current),Io(t)){if(r=t.stateNode,n=t.memoizedProps,r[Kt]=t,(o=r.nodeValue!==n)&&(e=lt,e!==null))switch(e.tag){case 3:_o(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&_o(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Kt]=t,t.stateNode=r}return ze(t),null;case 13:if(me(xe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ge&&st!==null&&t.mode&1&&!(t.flags&128))tm(),$r(),t.flags|=98560,o=!1;else if(o=Io(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(F(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(F(317));o[Kt]=t}else $r(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ze(t),o=!1}else Dt!==null&&(tu(Dt),Dt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||xe.current&1?Ie===0&&(Ie=3):hc())),t.updateQueue!==null&&(t.flags|=4),ze(t),null);case 4:return Wr(),Ga(e,t),e===null&&Vi(t.stateNode.containerInfo),ze(t),null;case 10:return Yu(t.type._context),ze(t),null;case 17:return Ze(t.type)&&ks(),ze(t),null;case 19:if(me(xe),o=t.memoizedState,o===null)return ze(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)di(o,!1);else{if(Ie!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Ts(e),s!==null){for(t.flags|=128,di(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return he(xe,xe.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ce()>qr&&(t.flags|=128,r=!0,di(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ts(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),di(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!ge)return ze(t),null}else 2*Ce()-o.renderingStartTime>qr&&n!==1073741824&&(t.flags|=128,r=!0,di(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ce(),t.sibling=null,n=xe.current,he(xe,r?n&1|2:n&1),t):(ze(t),null);case 22:case 23:return fc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ot&1073741824&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),null;case 24:return null;case 25:return null}throw Error(F(156,t.tag))}function ck(e,t){switch(qu(t),t.tag){case 1:return Ze(t.type)&&ks(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wr(),me(Je),me(Ue),tc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ec(t),null;case 13:if(me(xe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));$r()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return me(xe),null;case 4:return Wr(),null;case 10:return Yu(t.type._context),null;case 22:case 23:return fc(),null;case 24:return null;default:return null}}var Po=!1,Me=!1,dk=typeof WeakSet=="function"?WeakSet:Set,K=null;function Ir(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){we(e,t,r)}else n.current=null}function Ka(e,t,n){try{n()}catch(r){we(e,t,r)}}var rf=!1;function fk(e,t){if(Aa=gs,e=$p(),Wu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,u=-1,c=0,f=0,d=e,h=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(l=s+i),d!==o||r!==0&&d.nodeType!==3||(u=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++c===i&&(l=s),h===o&&++f===r&&(u=s),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ra={focusedElem:e,selectionRange:n},gs=!1,K=t;K!==null;)if(t=K,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,S=g.memoizedState,y=t.stateNode,m=y.getSnapshotBeforeUpdate(t.elementType===t.type?v:It(t.type,v),S);y.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(F(163))}}catch(T){we(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return g=rf,rf=!1,g}function _i(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Ka(t,n,o)}i=i.next}while(i!==r)}}function Qs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Qa(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function zm(e){var t=e.alternate;t!==null&&(e.alternate=null,zm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Kt],delete t[Gi],delete t[La],delete t[Kv],delete t[Qv])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Mm(e){return e.tag===5||e.tag===3||e.tag===4}function of(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ya(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=vs));else if(r!==4&&(e=e.child,e!==null))for(Ya(e,t,n),e=e.sibling;e!==null;)Ya(e,t,n),e=e.sibling}function Xa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Xa(e,t,n),e=e.sibling;e!==null;)Xa(e,t,n),e=e.sibling}var Pe=null,Rt=!1;function vn(e,t,n){for(n=n.child;n!==null;)Bm(e,t,n),n=n.sibling}function Bm(e,t,n){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(Us,n)}catch{}switch(n.tag){case 5:Me||Ir(n,t);case 6:var r=Pe,i=Rt;Pe=null,vn(e,t,n),Pe=r,Rt=i,Pe!==null&&(Rt?(e=Pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pe.removeChild(n.stateNode));break;case 18:Pe!==null&&(Rt?(e=Pe,n=n.stateNode,e.nodeType===8?Al(e.parentNode,n):e.nodeType===1&&Al(e,n),$i(e)):Al(Pe,n.stateNode));break;case 4:r=Pe,i=Rt,Pe=n.stateNode.containerInfo,Rt=!0,vn(e,t,n),Pe=r,Rt=i;break;case 0:case 11:case 14:case 15:if(!Me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Ka(n,t,s),i=i.next}while(i!==r)}vn(e,t,n);break;case 1:if(!Me&&(Ir(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){we(n,t,l)}vn(e,t,n);break;case 21:vn(e,t,n);break;case 22:n.mode&1?(Me=(r=Me)||n.memoizedState!==null,vn(e,t,n),Me=r):vn(e,t,n);break;default:vn(e,t,n)}}function sf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new dk),t.forEach(function(r){var i=wk.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function jt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:Pe=l.stateNode,Rt=!1;break e;case 3:Pe=l.stateNode.containerInfo,Rt=!0;break e;case 4:Pe=l.stateNode.containerInfo,Rt=!0;break e}l=l.return}if(Pe===null)throw Error(F(160));Bm(o,s,i),Pe=null,Rt=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(c){we(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Um(t,e),t=t.sibling}function Um(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(jt(t,e),$t(e),r&4){try{_i(3,e,e.return),Qs(3,e)}catch(v){we(e,e.return,v)}try{_i(5,e,e.return)}catch(v){we(e,e.return,v)}}break;case 1:jt(t,e),$t(e),r&512&&n!==null&&Ir(n,n.return);break;case 5:if(jt(t,e),$t(e),r&512&&n!==null&&Ir(n,n.return),e.flags&32){var i=e.stateNode;try{zi(i,"")}catch(v){we(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,l=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&up(i,o),wa(l,s);var c=wa(l,o);for(s=0;s<u.length;s+=2){var f=u[s],d=u[s+1];f==="style"?pp(i,d):f==="dangerouslySetInnerHTML"?fp(i,d):f==="children"?zi(i,d):Au(i,f,d,c)}switch(l){case"input":ga(i,o);break;case"textarea":cp(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?Rr(i,!!o.multiple,p,!1):h!==!!o.multiple&&(o.defaultValue!=null?Rr(i,!!o.multiple,o.defaultValue,!0):Rr(i,!!o.multiple,o.multiple?[]:"",!1))}i[Gi]=o}catch(v){we(e,e.return,v)}}break;case 6:if(jt(t,e),$t(e),r&4){if(e.stateNode===null)throw Error(F(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(v){we(e,e.return,v)}}break;case 3:if(jt(t,e),$t(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{$i(t.containerInfo)}catch(v){we(e,e.return,v)}break;case 4:jt(t,e),$t(e);break;case 13:jt(t,e),$t(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(cc=Ce())),r&4&&sf(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(Me=(c=Me)||f,jt(t,e),Me=c):jt(t,e),$t(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(K=e,f=e.child;f!==null;){for(d=K=f;K!==null;){switch(h=K,p=h.child,h.tag){case 0:case 11:case 14:case 15:_i(4,h,h.return);break;case 1:Ir(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(v){we(r,n,v)}}break;case 5:Ir(h,h.return);break;case 22:if(h.memoizedState!==null){af(d);continue}}p!==null?(p.return=h,K=p):af(d)}f=f.sibling}e:for(f=null,d=e;;){if(d.tag===5){if(f===null){f=d;try{i=d.stateNode,c?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=d.stateNode,u=d.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=hp("display",s))}catch(v){we(e,e.return,v)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(v){we(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:jt(t,e),$t(e),r&4&&sf(e);break;case 21:break;default:jt(t,e),$t(e)}}function $t(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Mm(n)){var r=n;break e}n=n.return}throw Error(F(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(zi(i,""),r.flags&=-33);var o=of(e);Xa(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,l=of(e);Ya(e,l,s);break;default:throw Error(F(161))}}catch(u){we(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function hk(e,t,n){K=e,$m(e)}function $m(e,t,n){for(var r=(e.mode&1)!==0;K!==null;){var i=K,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||Po;if(!s){var l=i.alternate,u=l!==null&&l.memoizedState!==null||Me;l=Po;var c=Me;if(Po=s,(Me=u)&&!c)for(K=i;K!==null;)s=K,u=s.child,s.tag===22&&s.memoizedState!==null?uf(i):u!==null?(u.return=s,K=u):uf(i);for(;o!==null;)K=o,$m(o),o=o.sibling;K=i,Po=l,Me=c}lf(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,K=o):lf(e)}}function lf(e){for(;K!==null;){var t=K;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Me||Qs(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Me)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:It(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Wd(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Wd(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&$i(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(F(163))}Me||t.flags&512&&Qa(t)}catch(h){we(t,t.return,h)}}if(t===e){K=null;break}if(n=t.sibling,n!==null){n.return=t.return,K=n;break}K=t.return}}function af(e){for(;K!==null;){var t=K;if(t===e){K=null;break}var n=t.sibling;if(n!==null){n.return=t.return,K=n;break}K=t.return}}function uf(e){for(;K!==null;){var t=K;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Qs(4,t)}catch(u){we(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){we(t,i,u)}}var o=t.return;try{Qa(t)}catch(u){we(t,o,u)}break;case 5:var s=t.return;try{Qa(t)}catch(u){we(t,s,u)}}}catch(u){we(t,t.return,u)}if(t===e){K=null;break}var l=t.sibling;if(l!==null){l.return=t.return,K=l;break}K=t.return}}var pk=Math.ceil,Is=pn.ReactCurrentDispatcher,ac=pn.ReactCurrentOwner,St=pn.ReactCurrentBatchConfig,oe=0,Re=null,be=null,De=0,ot=0,Ar=$n(0),Ie=0,Zi=null,sr=0,Ys=0,uc=0,Ii=null,Ye=null,cc=0,qr=1/0,nn=null,As=!1,Ja=null,Ln=null,Do=!1,_n=null,Rs=0,Ai=0,Za=null,es=-1,ts=0;function Ve(){return oe&6?Ce():es!==-1?es:es=Ce()}function On(e){return e.mode&1?oe&2&&De!==0?De&-De:Xv.transition!==null?(ts===0&&(ts=Np()),ts):(e=ae,e!==0||(e=window.event,e=e===void 0?16:Pp(e.type)),e):1}function Ft(e,t,n,r){if(50<Ai)throw Ai=0,Za=null,Error(F(185));so(e,n,r),(!(oe&2)||e!==Re)&&(e===Re&&(!(oe&2)&&(Ys|=n),Ie===4&&bn(e,De)),et(e,r),n===1&&oe===0&&!(t.mode&1)&&(qr=Ce()+500,qs&&Hn()))}function et(e,t){var n=e.callbackNode;Xx(e,t);var r=ms(e,e===Re?De:0);if(r===0)n!==null&&yd(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&yd(n),t===1)e.tag===0?Yv(cf.bind(null,e)):Jp(cf.bind(null,e)),qv(function(){!(oe&6)&&Hn()}),n=null;else{switch(Tp(r)){case 1:n=Ou;break;case 4:n=Ep;break;case 16:n=ps;break;case 536870912:n=bp;break;default:n=ps}n=Ym(n,Hm.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Hm(e,t){if(es=-1,ts=0,oe&6)throw Error(F(327));var n=e.callbackNode;if(Fr()&&e.callbackNode!==n)return null;var r=ms(e,e===Re?De:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ps(e,r);else{t=r;var i=oe;oe|=2;var o=Vm();(Re!==e||De!==t)&&(nn=null,qr=Ce()+500,tr(e,t));do try{yk();break}catch(l){Wm(e,l)}while(!0);Qu(),Is.current=o,oe=i,be!==null?t=0:(Re=null,De=0,t=Ie)}if(t!==0){if(t===2&&(i=Na(e),i!==0&&(r=i,t=eu(e,i))),t===1)throw n=Zi,tr(e,0),bn(e,r),et(e,Ce()),n;if(t===6)bn(e,r);else{if(i=e.current.alternate,!(r&30)&&!mk(i)&&(t=Ps(e,r),t===2&&(o=Na(e),o!==0&&(r=o,t=eu(e,o))),t===1))throw n=Zi,tr(e,0),bn(e,r),et(e,Ce()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(F(345));case 2:Qn(e,Ye,nn);break;case 3:if(bn(e,r),(r&130023424)===r&&(t=cc+500-Ce(),10<t)){if(ms(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Ve(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Da(Qn.bind(null,e,Ye,nn),t);break}Qn(e,Ye,nn);break;case 4:if(bn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Ot(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=Ce()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*pk(r/1960))-r,10<r){e.timeoutHandle=Da(Qn.bind(null,e,Ye,nn),r);break}Qn(e,Ye,nn);break;case 5:Qn(e,Ye,nn);break;default:throw Error(F(329))}}}return et(e,Ce()),e.callbackNode===n?Hm.bind(null,e):null}function eu(e,t){var n=Ii;return e.current.memoizedState.isDehydrated&&(tr(e,t).flags|=256),e=Ps(e,t),e!==2&&(t=Ye,Ye=n,t!==null&&tu(t)),e}function tu(e){Ye===null?Ye=e:Ye.push.apply(Ye,e)}function mk(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Mt(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function bn(e,t){for(t&=~uc,t&=~Ys,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ot(t),r=1<<n;e[n]=-1,t&=~r}}function cf(e){if(oe&6)throw Error(F(327));Fr();var t=ms(e,0);if(!(t&1))return et(e,Ce()),null;var n=Ps(e,t);if(e.tag!==0&&n===2){var r=Na(e);r!==0&&(t=r,n=eu(e,r))}if(n===1)throw n=Zi,tr(e,0),bn(e,t),et(e,Ce()),n;if(n===6)throw Error(F(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Qn(e,Ye,nn),et(e,Ce()),null}function dc(e,t){var n=oe;oe|=1;try{return e(t)}finally{oe=n,oe===0&&(qr=Ce()+500,qs&&Hn())}}function lr(e){_n!==null&&_n.tag===0&&!(oe&6)&&Fr();var t=oe;oe|=1;var n=St.transition,r=ae;try{if(St.transition=null,ae=1,e)return e()}finally{ae=r,St.transition=n,oe=t,!(oe&6)&&Hn()}}function fc(){ot=Ar.current,me(Ar)}function tr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Vv(n)),be!==null)for(n=be.return;n!==null;){var r=n;switch(qu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ks();break;case 3:Wr(),me(Je),me(Ue),tc();break;case 5:ec(r);break;case 4:Wr();break;case 13:me(xe);break;case 19:me(xe);break;case 10:Yu(r.type._context);break;case 22:case 23:fc()}n=n.return}if(Re=e,be=e=Fn(e.current,null),De=ot=t,Ie=0,Zi=null,uc=Ys=sr=0,Ye=Ii=null,Jn!==null){for(t=0;t<Jn.length;t++)if(n=Jn[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}Jn=null}return e}function Wm(e,t){do{var n=be;try{if(Qu(),Xo.current=_s,js){for(var r=ve.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}js=!1}if(or=0,Ae=_e=ve=null,ji=!1,Yi=0,ac.current=null,n===null||n.return===null){Ie=1,Zi=t,be=null;break}e:{var o=e,s=n.return,l=n,u=t;if(t=De,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,f=l,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var h=f.alternate;h?(f.updateQueue=h.updateQueue,f.memoizedState=h.memoizedState,f.lanes=h.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=Yd(s);if(p!==null){p.flags&=-257,Xd(p,s,l,o,t),p.mode&1&&Qd(o,c,t),t=p,u=c;var g=t.updateQueue;if(g===null){var v=new Set;v.add(u),t.updateQueue=v}else g.add(u);break e}else{if(!(t&1)){Qd(o,c,t),hc();break e}u=Error(F(426))}}else if(ge&&l.mode&1){var S=Yd(s);if(S!==null){!(S.flags&65536)&&(S.flags|=256),Xd(S,s,l,o,t),Gu(Vr(u,l));break e}}o=u=Vr(u,l),Ie!==4&&(Ie=2),Ii===null?Ii=[o]:Ii.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var y=Tm(o,u,t);Hd(o,y);break e;case 1:l=u;var m=o.type,x=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Ln===null||!Ln.has(x)))){o.flags|=65536,t&=-t,o.lanes|=t;var T=jm(o,l,t);Hd(o,T);break e}}o=o.return}while(o!==null)}Gm(n)}catch(j){t=j,be===n&&n!==null&&(be=n=n.return);continue}break}while(!0)}function Vm(){var e=Is.current;return Is.current=_s,e===null?_s:e}function hc(){(Ie===0||Ie===3||Ie===2)&&(Ie=4),Re===null||!(sr&268435455)&&!(Ys&268435455)||bn(Re,De)}function Ps(e,t){var n=oe;oe|=2;var r=Vm();(Re!==e||De!==t)&&(nn=null,tr(e,t));do try{gk();break}catch(i){Wm(e,i)}while(!0);if(Qu(),oe=n,Is.current=r,be!==null)throw Error(F(261));return Re=null,De=0,Ie}function gk(){for(;be!==null;)qm(be)}function yk(){for(;be!==null&&!$x();)qm(be)}function qm(e){var t=Qm(e.alternate,e,ot);e.memoizedProps=e.pendingProps,t===null?Gm(e):be=t,ac.current=null}function Gm(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=ck(n,t),n!==null){n.flags&=32767,be=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ie=6,be=null;return}}else if(n=uk(n,t,ot),n!==null){be=n;return}if(t=t.sibling,t!==null){be=t;return}be=t=e}while(t!==null);Ie===0&&(Ie=5)}function Qn(e,t,n){var r=ae,i=St.transition;try{St.transition=null,ae=1,xk(e,t,n,r)}finally{St.transition=i,ae=r}return null}function xk(e,t,n,r){do Fr();while(_n!==null);if(oe&6)throw Error(F(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(F(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Jx(e,o),e===Re&&(be=Re=null,De=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Do||(Do=!0,Ym(ps,function(){return Fr(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=St.transition,St.transition=null;var s=ae;ae=1;var l=oe;oe|=4,ac.current=null,fk(e,n),Um(n,e),zv(Ra),gs=!!Aa,Ra=Aa=null,e.current=n,hk(n),Hx(),oe=l,ae=s,St.transition=o}else e.current=n;if(Do&&(Do=!1,_n=e,Rs=i),o=e.pendingLanes,o===0&&(Ln=null),qx(n.stateNode),et(e,Ce()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(As)throw As=!1,e=Ja,Ja=null,e;return Rs&1&&e.tag!==0&&Fr(),o=e.pendingLanes,o&1?e===Za?Ai++:(Ai=0,Za=e):Ai=0,Hn(),null}function Fr(){if(_n!==null){var e=Tp(Rs),t=St.transition,n=ae;try{if(St.transition=null,ae=16>e?16:e,_n===null)var r=!1;else{if(e=_n,_n=null,Rs=0,oe&6)throw Error(F(331));var i=oe;for(oe|=4,K=e.current;K!==null;){var o=K,s=o.child;if(K.flags&16){var l=o.deletions;if(l!==null){for(var u=0;u<l.length;u++){var c=l[u];for(K=c;K!==null;){var f=K;switch(f.tag){case 0:case 11:case 15:_i(8,f,o)}var d=f.child;if(d!==null)d.return=f,K=d;else for(;K!==null;){f=K;var h=f.sibling,p=f.return;if(zm(f),f===c){K=null;break}if(h!==null){h.return=p,K=h;break}K=p}}}var g=o.alternate;if(g!==null){var v=g.child;if(v!==null){g.child=null;do{var S=v.sibling;v.sibling=null,v=S}while(v!==null)}}K=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,K=s;else e:for(;K!==null;){if(o=K,o.flags&2048)switch(o.tag){case 0:case 11:case 15:_i(9,o,o.return)}var y=o.sibling;if(y!==null){y.return=o.return,K=y;break e}K=o.return}}var m=e.current;for(K=m;K!==null;){s=K;var x=s.child;if(s.subtreeFlags&2064&&x!==null)x.return=s,K=x;else e:for(s=m;K!==null;){if(l=K,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Qs(9,l)}}catch(j){we(l,l.return,j)}if(l===s){K=null;break e}var T=l.sibling;if(T!==null){T.return=l.return,K=T;break e}K=l.return}}if(oe=i,Hn(),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(Us,e)}catch{}r=!0}return r}finally{ae=n,St.transition=t}}return!1}function df(e,t,n){t=Vr(n,t),t=Tm(e,t,1),e=Dn(e,t,1),t=Ve(),e!==null&&(so(e,1,t),et(e,t))}function we(e,t,n){if(e.tag===3)df(e,e,n);else for(;t!==null;){if(t.tag===3){df(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ln===null||!Ln.has(r))){e=Vr(n,e),e=jm(t,e,1),t=Dn(t,e,1),e=Ve(),t!==null&&(so(t,1,e),et(t,e));break}}t=t.return}}function vk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ve(),e.pingedLanes|=e.suspendedLanes&n,Re===e&&(De&n)===n&&(Ie===4||Ie===3&&(De&130023424)===De&&500>Ce()-cc?tr(e,0):uc|=n),et(e,t)}function Km(e,t){t===0&&(e.mode&1?(t=Eo,Eo<<=1,!(Eo&130023424)&&(Eo=4194304)):t=1);var n=Ve();e=dn(e,t),e!==null&&(so(e,t,n),et(e,n))}function kk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Km(e,n)}function wk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(F(314))}r!==null&&r.delete(t),Km(e,n)}var Qm;Qm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Je.current)Xe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Xe=!1,ak(e,t,n);Xe=!!(e.flags&131072)}else Xe=!1,ge&&t.flags&1048576&&Zp(t,Cs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Zo(e,t),e=t.pendingProps;var i=Ur(t,Ue.current);Or(t,n),i=rc(null,t,r,e,i,n);var o=ic();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ze(r)?(o=!0,ws(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ju(t),i.updater=Ks,t.stateNode=i,i._reactInternals=t,Ua(t,r,e,n),t=Wa(null,t,r,!0,o,n)):(t.tag=0,ge&&o&&Vu(t),He(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Zo(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Ck(r),e=It(r,e),i){case 0:t=Ha(null,t,r,e,n);break e;case 1:t=ef(null,t,r,e,n);break e;case 11:t=Jd(null,t,r,e,n);break e;case 14:t=Zd(null,t,r,It(r.type,e),n);break e}throw Error(F(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:It(r,i),Ha(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:It(r,i),ef(e,t,r,i,n);case 3:e:{if(Rm(t),e===null)throw Error(F(387));r=t.pendingProps,o=t.memoizedState,i=o.element,om(e,t),Ns(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Vr(Error(F(423)),t),t=tf(e,t,r,n,i);break e}else if(r!==i){i=Vr(Error(F(424)),t),t=tf(e,t,r,n,i);break e}else for(st=Pn(t.stateNode.containerInfo.firstChild),lt=t,ge=!0,Dt=null,n=rm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($r(),r===i){t=fn(e,t,n);break e}He(e,t,r,n)}t=t.child}return t;case 5:return sm(t),e===null&&za(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Pa(r,i)?s=null:o!==null&&Pa(r,o)&&(t.flags|=32),Am(e,t),He(e,t,s,n),t.child;case 6:return e===null&&za(t),null;case 13:return Pm(e,t,n);case 4:return Zu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Hr(t,null,r,n):He(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:It(r,i),Jd(e,t,r,i,n);case 7:return He(e,t,t.pendingProps,n),t.child;case 8:return He(e,t,t.pendingProps.children,n),t.child;case 12:return He(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,he(Es,r._currentValue),r._currentValue=s,o!==null)if(Mt(o.value,s)){if(o.children===i.children&&!Je.current){t=fn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=ln(-1,n&-n),u.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?u.next=u:(u.next=f.next,f.next=u),c.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Ma(o.return,n,t),l.lanes|=n;break}u=u.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(F(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Ma(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}He(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Or(t,n),i=Ct(i),r=r(i),t.flags|=1,He(e,t,r,n),t.child;case 14:return r=t.type,i=It(r,t.pendingProps),i=It(r.type,i),Zd(e,t,r,i,n);case 15:return _m(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:It(r,i),Zo(e,t),t.tag=1,Ze(r)?(e=!0,ws(t)):e=!1,Or(t,n),Nm(t,r,i),Ua(t,r,i,n),Wa(null,t,r,!0,e,n);case 19:return Dm(e,t,n);case 22:return Im(e,t,n)}throw Error(F(156,t.tag))};function Ym(e,t){return Cp(e,t)}function Sk(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wt(e,t,n,r){return new Sk(e,t,n,r)}function pc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ck(e){if(typeof e=="function")return pc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Pu)return 11;if(e===Du)return 14}return 2}function Fn(e,t){var n=e.alternate;return n===null?(n=wt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ns(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")pc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case wr:return nr(n.children,i,o,t);case Ru:s=8,i|=8;break;case da:return e=wt(12,n,t,i|2),e.elementType=da,e.lanes=o,e;case fa:return e=wt(13,n,t,i),e.elementType=fa,e.lanes=o,e;case ha:return e=wt(19,n,t,i),e.elementType=ha,e.lanes=o,e;case sp:return Xs(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ip:s=10;break e;case op:s=9;break e;case Pu:s=11;break e;case Du:s=14;break e;case wn:s=16,r=null;break e}throw Error(F(130,e==null?e:typeof e,""))}return t=wt(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function nr(e,t,n,r){return e=wt(7,e,r,t),e.lanes=n,e}function Xs(e,t,n,r){return e=wt(22,e,r,t),e.elementType=sp,e.lanes=n,e.stateNode={isHidden:!1},e}function Ml(e,t,n){return e=wt(6,e,null,t),e.lanes=n,e}function Bl(e,t,n){return t=wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ek(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=kl(0),this.expirationTimes=kl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kl(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function mc(e,t,n,r,i,o,s,l,u){return e=new Ek(e,t,n,l,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=wt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ju(o),e}function bk(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:kr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Xm(e){if(!e)return Bn;e=e._reactInternals;e:{if(dr(e)!==e||e.tag!==1)throw Error(F(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ze(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(F(171))}if(e.tag===1){var n=e.type;if(Ze(n))return Xp(e,n,t)}return t}function Jm(e,t,n,r,i,o,s,l,u){return e=mc(n,r,!0,e,i,o,s,l,u),e.context=Xm(null),n=e.current,r=Ve(),i=On(n),o=ln(r,i),o.callback=t??null,Dn(n,o,i),e.current.lanes=i,so(e,i,r),et(e,r),e}function Js(e,t,n,r){var i=t.current,o=Ve(),s=On(i);return n=Xm(n),t.context===null?t.context=n:t.pendingContext=n,t=ln(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Dn(i,t,s),e!==null&&(Ft(e,i,s,o),Yo(e,i,s)),s}function Ds(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ff(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gc(e,t){ff(e,t),(e=e.alternate)&&ff(e,t)}function Nk(){return null}var Zm=typeof reportError=="function"?reportError:function(e){console.error(e)};function yc(e){this._internalRoot=e}Zs.prototype.render=yc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(F(409));Js(e,t,null,null)};Zs.prototype.unmount=yc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;lr(function(){Js(null,e,null,null)}),t[cn]=null}};function Zs(e){this._internalRoot=e}Zs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ip();e={blockedOn:null,target:e,priority:t};for(var n=0;n<En.length&&t!==0&&t<En[n].priority;n++);En.splice(n,0,e),n===0&&Rp(e)}};function xc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function el(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function hf(){}function Tk(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var c=Ds(s);o.call(c)}}var s=Jm(t,r,e,0,null,!1,!1,"",hf);return e._reactRootContainer=s,e[cn]=s.current,Vi(e.nodeType===8?e.parentNode:e),lr(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var c=Ds(u);l.call(c)}}var u=mc(e,0,!1,null,null,!1,!1,"",hf);return e._reactRootContainer=u,e[cn]=u.current,Vi(e.nodeType===8?e.parentNode:e),lr(function(){Js(t,u,n,r)}),u}function tl(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var l=i;i=function(){var u=Ds(s);l.call(u)}}Js(t,s,e,i)}else s=Tk(n,t,e,i,r);return Ds(s)}jp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ki(t.pendingLanes);n!==0&&(Fu(t,n|1),et(t,Ce()),!(oe&6)&&(qr=Ce()+500,Hn()))}break;case 13:lr(function(){var r=dn(e,1);if(r!==null){var i=Ve();Ft(r,e,1,i)}}),gc(e,1)}};zu=function(e){if(e.tag===13){var t=dn(e,134217728);if(t!==null){var n=Ve();Ft(t,e,134217728,n)}gc(e,134217728)}};_p=function(e){if(e.tag===13){var t=On(e),n=dn(e,t);if(n!==null){var r=Ve();Ft(n,e,t,r)}gc(e,t)}};Ip=function(){return ae};Ap=function(e,t){var n=ae;try{return ae=e,t()}finally{ae=n}};Ca=function(e,t,n){switch(t){case"input":if(ga(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Vs(r);if(!i)throw Error(F(90));ap(r),ga(r,i)}}}break;case"textarea":cp(e,n);break;case"select":t=n.value,t!=null&&Rr(e,!!n.multiple,t,!1)}};yp=dc;xp=lr;var jk={usingClientEntryPoint:!1,Events:[ao,br,Vs,mp,gp,dc]},fi={findFiberByHostInstance:Xn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},_k={bundleType:fi.bundleType,version:fi.version,rendererPackageName:fi.rendererPackageName,rendererConfig:fi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:pn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=wp(e),e===null?null:e.stateNode},findFiberByHostInstance:fi.findFiberByHostInstance||Nk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Lo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Lo.isDisabled&&Lo.supportsFiber)try{Us=Lo.inject(_k),Qt=Lo}catch{}}dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jk;dt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!xc(t))throw Error(F(200));return bk(e,t,null,n)};dt.createRoot=function(e,t){if(!xc(e))throw Error(F(299));var n=!1,r="",i=Zm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=mc(e,1,!1,null,null,n,!1,r,i),e[cn]=t.current,Vi(e.nodeType===8?e.parentNode:e),new yc(t)};dt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(F(188)):(e=Object.keys(e).join(","),Error(F(268,e)));return e=wp(t),e=e===null?null:e.stateNode,e};dt.flushSync=function(e){return lr(e)};dt.hydrate=function(e,t,n){if(!el(t))throw Error(F(200));return tl(null,e,t,!0,n)};dt.hydrateRoot=function(e,t,n){if(!xc(e))throw Error(F(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=Zm;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=Jm(t,null,e,1,n??null,i,!1,o,s),e[cn]=t.current,Vi(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Zs(t)};dt.render=function(e,t,n){if(!el(t))throw Error(F(200));return tl(null,e,t,!1,n)};dt.unmountComponentAtNode=function(e){if(!el(e))throw Error(F(40));return e._reactRootContainer?(lr(function(){tl(null,null,e,!1,function(){e._reactRootContainer=null,e[cn]=null})}),!0):!1};dt.unstable_batchedUpdates=dc;dt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!el(n))throw Error(F(200));if(e==null||e._reactInternals===void 0)throw Error(F(38));return tl(e,t,n,!1,r)};dt.version="18.3.1-next-f1338f8080-20240426";function eg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eg)}catch(e){console.error(e)}}eg(),ep.exports=dt;var Ik=ep.exports,tg,pf=Ik;tg=pf.createRoot,pf.hydrateRoot;/**
41
- * react-router v7.11.0
42
- *
43
- * Copyright (c) Remix Software Inc.
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE.md file in the root directory of this source tree.
47
- *
48
- * @license MIT
49
- */var mf="popstate";function Ak(e={}){function t(r,i){let{pathname:o,search:s,hash:l}=r.location;return nu("",{pathname:o,search:s,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:eo(i)}return Pk(t,n,null,e)}function ye(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ct(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Rk(){return Math.random().toString(36).substring(2,10)}function gf(e,t){return{usr:e.state,key:e.key,idx:t}}function nu(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Xr(t):t,state:n,key:t&&t.key||r||Rk()}}function eo({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Xr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Pk(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,l="POP",u=null,c=f();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function f(){return(s.state||{idx:null}).idx}function d(){l="POP";let S=f(),y=S==null?null:S-c;c=S,u&&u({action:l,location:v.location,delta:y})}function h(S,y){l="PUSH";let m=nu(v.location,S,y);c=f()+1;let x=gf(m,c),T=v.createHref(m);try{s.pushState(x,"",T)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(T)}o&&u&&u({action:l,location:v.location,delta:1})}function p(S,y){l="REPLACE";let m=nu(v.location,S,y);c=f();let x=gf(m,c),T=v.createHref(m);s.replaceState(x,"",T),o&&u&&u({action:l,location:v.location,delta:0})}function g(S){return Dk(S)}let v={get action(){return l},get location(){return e(i,s)},listen(S){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(mf,d),u=S,()=>{i.removeEventListener(mf,d),u=null}},createHref(S){return t(i,S)},createURL:g,encodeLocation(S){let y=g(S);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:p,go(S){return s.go(S)}};return v}function Dk(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),ye(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:eo(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function ng(e,t,n="/"){return Lk(e,t,n,!1)}function Lk(e,t,n,r){let i=typeof t=="string"?Xr(t):t,o=hn(i.pathname||"/",n);if(o==null)return null;let s=rg(e);Ok(s);let l=null;for(let u=0;l==null&&u<s.length;++u){let c=Gk(o);l=Vk(s[u],c,r)}return l}function rg(e,t=[],n=[],r="",i=!1){let o=(s,l,u=i,c)=>{let f={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&u)return;ye(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let d=an([r,f.relativePath]),h=n.concat(f);s.children&&s.children.length>0&&(ye(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),rg(s.children,t,h,d,u)),!(s.path==null&&!s.index)&&t.push({path:d,score:Hk(d,s.index),routesMeta:h})};return e.forEach((s,l)=>{var u;if(s.path===""||!((u=s.path)!=null&&u.includes("?")))o(s,l);else for(let c of ig(s.path))o(s,l,!0,c)}),t}function ig(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=ig(r.join("/")),l=[];return l.push(...s.map(u=>u===""?o:[o,u].join("/"))),i&&l.push(...s),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function Ok(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Wk(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Fk=/^:[\w-]+$/,zk=3,Mk=2,Bk=1,Uk=10,$k=-2,yf=e=>e==="*";function Hk(e,t){let n=e.split("/"),r=n.length;return n.some(yf)&&(r+=$k),t&&(r+=Mk),n.filter(i=>!yf(i)).reduce((i,o)=>i+(Fk.test(o)?zk:o===""?Bk:Uk),r)}function Wk(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Vk(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",s=[];for(let l=0;l<r.length;++l){let u=r[l],c=l===r.length-1,f=o==="/"?t:t.slice(o.length)||"/",d=Ls({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},f),h=u.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Ls({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},f)),!d)return null;Object.assign(i,d.params),s.push({params:i,pathname:an([o,d.pathname]),pathnameBase:Xk(an([o,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(o=an([o,d.pathnameBase]))}return s}function Ls(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=qk(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((c,{paramName:f,isOptional:d},h)=>{if(f==="*"){let g=l[h]||"";s=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const p=l[h];return d&&!p?c[f]=void 0:c[f]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:e}}function qk(e,t=!1,n=!0){ct(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,u)=>(r.push({paramName:l,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Gk(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ct(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function hn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var og=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kk=e=>og.test(e);function Qk(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Xr(e):e,o;if(n)if(Kk(n))o=n;else{if(n.includes("//")){let s=n;n=n.replace(/\/\/+/g,"/"),ct(!1,`Pathnames cannot have embedded double slashes - normalizing ${s} -> ${n}`)}n.startsWith("/")?o=xf(n.substring(1),"/"):o=xf(n,t)}else o=t;return{pathname:o,search:Jk(r),hash:Zk(i)}}function xf(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Ul(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Yk(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function vc(e){let t=Yk(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function kc(e,t,n,r=!1){let i;typeof e=="string"?i=Xr(e):(i={...e},ye(!i.pathname||!i.pathname.includes("?"),Ul("?","pathname","search",i)),ye(!i.pathname||!i.pathname.includes("#"),Ul("#","pathname","hash",i)),ye(!i.search||!i.search.includes("#"),Ul("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,l;if(s==null)l=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),d-=1;i.pathname=h.join("/")}l=d>=0?t[d]:"/"}let u=Qk(i,l),c=s&&s!=="/"&&s.endsWith("/"),f=(o||s===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||f)&&(u.pathname+="/"),u}var an=e=>e.join("/").replace(/\/\/+/g,"/"),Xk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Jk=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Zk=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,ew=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function tw(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function nw(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var sg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function lg(e,t){let n=e;if(typeof n!="string"||!og.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(sg)try{let o=new URL(window.location.href),s=n.startsWith("//")?new URL(o.protocol+n):new URL(n),l=hn(s.pathname,t);s.origin===o.origin&&l!=null?n=l+s.search+s.hash:i=!0}catch{ct(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ag=["POST","PUT","PATCH","DELETE"];new Set(ag);var rw=["GET",...ag];new Set(rw);var Jr=k.createContext(null);Jr.displayName="DataRouter";var nl=k.createContext(null);nl.displayName="DataRouterState";var iw=k.createContext(!1),ug=k.createContext({isTransitioning:!1});ug.displayName="ViewTransition";var ow=k.createContext(new Map);ow.displayName="Fetchers";var sw=k.createContext(null);sw.displayName="Await";var ht=k.createContext(null);ht.displayName="Navigation";var co=k.createContext(null);co.displayName="Location";var bt=k.createContext({outlet:null,matches:[],isDataRoute:!1});bt.displayName="Route";var wc=k.createContext(null);wc.displayName="RouteError";var cg="REACT_ROUTER_ERROR",lw="REDIRECT",aw="ROUTE_ERROR_RESPONSE";function uw(e){if(e.startsWith(`${cg}:${lw}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function cw(e){if(e.startsWith(`${cg}:${aw}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new ew(t.status,t.statusText,t.data)}catch{}}function dw(e,{relative:t}={}){ye(Zr(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=k.useContext(ht),{hash:i,pathname:o,search:s}=fo(e,{relative:t}),l=o;return n!=="/"&&(l=o==="/"?n:an([n,o])),r.createHref({pathname:l,search:s,hash:i})}function Zr(){return k.useContext(co)!=null}function pt(){return ye(Zr(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(co).location}var dg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function fg(e){k.useContext(ht).static||k.useLayoutEffect(e)}function Oe(){let{isDataRoute:e}=k.useContext(bt);return e?Nw():fw()}function fw(){ye(Zr(),"useNavigate() may be used only in the context of a <Router> component.");let e=k.useContext(Jr),{basename:t,navigator:n}=k.useContext(ht),{matches:r}=k.useContext(bt),{pathname:i}=pt(),o=JSON.stringify(vc(r)),s=k.useRef(!1);return fg(()=>{s.current=!0}),k.useCallback((u,c={})=>{if(ct(s.current,dg),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=kc(u,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:an([t,f.pathname])),(c.replace?n.replace:n.push)(f,c.state,c)},[t,n,o,i,e])}var hw=k.createContext(null);function pw(e){let t=k.useContext(bt).outlet;return k.useMemo(()=>t&&k.createElement(hw.Provider,{value:e},t),[t,e])}function fr(){let{matches:e}=k.useContext(bt),t=e[e.length-1];return t?t.params:{}}function fo(e,{relative:t}={}){let{matches:n}=k.useContext(bt),{pathname:r}=pt(),i=JSON.stringify(vc(n));return k.useMemo(()=>kc(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function mw(e,t){return hg(e,t)}function hg(e,t,n,r,i){var m;ye(Zr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=k.useContext(ht),{matches:s}=k.useContext(bt),l=s[s.length-1],u=l?l.params:{},c=l?l.pathname:"/",f=l?l.pathnameBase:"/",d=l&&l.route;{let x=d&&d.path||"";mg(c,!d||x.endsWith("*")||x.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${x}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
50
-
51
- Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let h=pt(),p;if(t){let x=typeof t=="string"?Xr(t):t;ye(f==="/"||((m=x.pathname)==null?void 0:m.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${x.pathname}" was given in the \`location\` prop.`),p=x}else p=h;let g=p.pathname||"/",v=g;if(f!=="/"){let x=f.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(x.length).join("/")}let S=ng(e,{pathname:v});ct(d||S!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),ct(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=kw(S&&S.map(x=>Object.assign({},x,{params:Object.assign({},u,x.params),pathname:an([f,o.encodeLocation?o.encodeLocation(x.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?f:an([f,o.encodeLocation?o.encodeLocation(x.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathnameBase])})),s,n,r,i);return t&&y?k.createElement(co.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},y):y}function gw(){let e=bw(),t=tw(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:o},"ErrorBoundary")," or"," ",k.createElement("code",{style:o},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:i},n):null,s)}var yw=k.createElement(gw,null),pg=class extends k.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=cw(e.digest);n&&(e=n)}let t=e!==void 0?k.createElement(bt.Provider,{value:this.props.routeContext},k.createElement(wc.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?k.createElement(xw,{error:e},t):t}};pg.contextType=iw;var $l=new WeakMap;function xw({children:e,error:t}){let{basename:n}=k.useContext(ht);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=uw(t.digest);if(r){let i=$l.get(t);if(i)throw i;let o=lg(r.location,n);if(sg&&!$l.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw $l.set(t,s),s}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function vw({routeContext:e,match:t,children:n}){let r=k.useContext(Jr);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),k.createElement(bt.Provider,{value:e},n)}function kw(e,t=[],n=null,r=null,i=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=n==null?void 0:n.errors;if(s!=null){let f=o.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);ye(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,u=-1;if(n)for(let f=0;f<o.length;f++){let d=o[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=f),d.route.id){let{loaderData:h,errors:p}=n,g=d.route.loader&&!h.hasOwnProperty(d.route.id)&&(!p||p[d.route.id]===void 0);if(d.route.lazy||g){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}let c=n&&r?(f,d)=>{var h,p;r(f,{location:n.location,params:((p=(h=n.matches)==null?void 0:h[0])==null?void 0:p.params)??{},unstable_pattern:nw(n.matches),errorInfo:d})}:void 0;return o.reduceRight((f,d,h)=>{let p,g=!1,v=null,S=null;n&&(p=s&&d.route.id?s[d.route.id]:void 0,v=d.route.errorElement||yw,l&&(u<0&&h===0?(mg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,S=null):u===h&&(g=!0,S=d.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,h+1)),m=()=>{let x;return p?x=v:g?x=S:d.route.Component?x=k.createElement(d.route.Component,null):d.route.element?x=d.route.element:x=f,k.createElement(vw,{match:d,routeContext:{outlet:f,matches:y,isDataRoute:n!=null},children:x})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?k.createElement(pg,{location:n.location,revalidation:n.revalidation,component:v,error:p,children:m(),routeContext:{outlet:null,matches:y,isDataRoute:!0},onError:c}):m()},null)}function Sc(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ww(e){let t=k.useContext(Jr);return ye(t,Sc(e)),t}function Sw(e){let t=k.useContext(nl);return ye(t,Sc(e)),t}function Cw(e){let t=k.useContext(bt);return ye(t,Sc(e)),t}function Cc(e){let t=Cw(e),n=t.matches[t.matches.length-1];return ye(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Ew(){return Cc("useRouteId")}function bw(){var r;let e=k.useContext(wc),t=Sw("useRouteError"),n=Cc("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function Nw(){let{router:e}=ww("useNavigate"),t=Cc("useNavigate"),n=k.useRef(!1);return fg(()=>{n.current=!0}),k.useCallback(async(i,o={})=>{ct(n.current,dg),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var vf={};function mg(e,t,n){!t&&!vf[e]&&(vf[e]=!0,ct(!1,n))}k.memo(Tw);function Tw({routes:e,future:t,state:n,onError:r}){return hg(e,void 0,n,r,t)}function jw({to:e,replace:t,state:n,relative:r}){ye(Zr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=k.useContext(ht);ct(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=k.useContext(bt),{pathname:s}=pt(),l=Oe(),u=kc(e,vc(o),s,r==="path"),c=JSON.stringify(u);return k.useEffect(()=>{l(JSON.parse(c),{replace:t,state:n,relative:r})},[l,c,r,t,n]),null}function Ec(e){return pw(e.context)}function je(e){ye(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function _w({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1,unstable_useTransitions:s}){ye(!Zr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),u=k.useMemo(()=>({basename:l,navigator:i,static:o,unstable_useTransitions:s,future:{}}),[l,i,o,s]);typeof n=="string"&&(n=Xr(n));let{pathname:c="/",search:f="",hash:d="",state:h=null,key:p="default"}=n,g=k.useMemo(()=>{let v=hn(c,l);return v==null?null:{location:{pathname:v,search:f,hash:d,state:h,key:p},navigationType:r}},[l,c,f,d,h,p,r]);return ct(g!=null,`<Router basename="${l}"> is not able to match the URL "${c}${f}${d}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:k.createElement(ht.Provider,{value:u},k.createElement(co.Provider,{children:t,value:g}))}function Iw({children:e,location:t}){return mw(ru(e),t)}function ru(e,t=[]){let n=[];return k.Children.forEach(e,(r,i)=>{if(!k.isValidElement(r))return;let o=[...t,i];if(r.type===k.Fragment){n.push.apply(n,ru(r.props.children,o));return}ye(r.type===je,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ye(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=ru(r.props.children,o)),n.push(s)}),n}var rs="get",is="application/x-www-form-urlencoded";function rl(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Aw(e){return rl(e)&&e.tagName.toLowerCase()==="button"}function Rw(e){return rl(e)&&e.tagName.toLowerCase()==="form"}function Pw(e){return rl(e)&&e.tagName.toLowerCase()==="input"}function Dw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Lw(e,t){return e.button===0&&(!t||t==="_self")&&!Dw(e)}function iu(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function Ow(e,t){let n=iu(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}var Oo=null;function Fw(){if(Oo===null)try{new FormData(document.createElement("form"),0),Oo=!1}catch{Oo=!0}return Oo}var zw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Hl(e){return e!=null&&!zw.has(e)?(ct(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${is}"`),null):e}function Mw(e,t){let n,r,i,o,s;if(Rw(e)){let l=e.getAttribute("action");r=l?hn(l,t):null,n=e.getAttribute("method")||rs,i=Hl(e.getAttribute("enctype"))||is,o=new FormData(e)}else if(Aw(e)||Pw(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||l.getAttribute("action");if(r=u?hn(u,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||rs,i=Hl(e.getAttribute("formenctype"))||Hl(l.getAttribute("enctype"))||is,o=new FormData(l,e),!Fw()){let{name:c,type:f,value:d}=e;if(f==="image"){let h=c?`${c}.`:"";o.append(`${h}x`,"0"),o.append(`${h}y`,"0")}else c&&o.append(c,d)}}else{if(rl(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=rs,r=null,i=is,s=e}return o&&i==="text/plain"&&(s=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function bc(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Bw(e,t,n){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${n}`:t&&hn(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function Uw(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function $w(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Hw(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let s=await Uw(o,n);return s.links?s.links():[]}return[]}));return Gw(r.flat(1).filter($w).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function kf(e,t,n,r,i,o){let s=(u,c)=>n[c]?u.route.id!==n[c].route.id:!0,l=(u,c)=>{var f;return n[c].pathname!==u.pathname||((f=n[c].route.path)==null?void 0:f.endsWith("*"))&&n[c].params["*"]!==u.params["*"]};return o==="assets"?t.filter((u,c)=>s(u,c)||l(u,c)):o==="data"?t.filter((u,c)=>{var d;let f=r.routes[u.route.id];if(!f||!f.hasLoader)return!1;if(s(u,c)||l(u,c))return!0;if(u.route.shouldRevalidate){let h=u.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function Ww(e,t,{includeHydrateFallback:n}={}){return Vw(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let o=[i.module];return i.clientActionModule&&(o=o.concat(i.clientActionModule)),i.clientLoaderModule&&(o=o.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(o=o.concat(i.hydrateFallbackModule)),i.imports&&(o=o.concat(i.imports)),o}).flat(1))}function Vw(e){return[...new Set(e)]}function qw(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Gw(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify(qw(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}function gg(){let e=k.useContext(Jr);return bc(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Kw(){let e=k.useContext(nl);return bc(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Nc=k.createContext(void 0);Nc.displayName="FrameworkContext";function yg(){let e=k.useContext(Nc);return bc(e,"You must render this element inside a <HydratedRouter> element"),e}function Qw(e,t){let n=k.useContext(Nc),[r,i]=k.useState(!1),[o,s]=k.useState(!1),{onFocus:l,onBlur:u,onMouseEnter:c,onMouseLeave:f,onTouchStart:d}=t,h=k.useRef(null);k.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let v=y=>{y.forEach(m=>{s(m.isIntersecting)})},S=new IntersectionObserver(v,{threshold:.5});return h.current&&S.observe(h.current),()=>{S.disconnect()}}},[e]),k.useEffect(()=>{if(r){let v=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(v)}}},[r]);let p=()=>{i(!0)},g=()=>{i(!1),s(!1)};return n?e!=="intent"?[o,h,{}]:[o,h,{onFocus:hi(l,p),onBlur:hi(u,g),onMouseEnter:hi(c,p),onMouseLeave:hi(f,g),onTouchStart:hi(d,p)}]:[!1,h,{}]}function hi(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Yw({page:e,...t}){let{router:n}=gg(),r=k.useMemo(()=>ng(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?k.createElement(Jw,{page:e,matches:r,...t}):null}function Xw(e){let{manifest:t,routeModules:n}=yg(),[r,i]=k.useState([]);return k.useEffect(()=>{let o=!1;return Hw(e,t,n).then(s=>{o||i(s)}),()=>{o=!0}},[e,t,n]),r}function Jw({page:e,matches:t,...n}){let r=pt(),{manifest:i,routeModules:o}=yg(),{basename:s}=gg(),{loaderData:l,matches:u}=Kw(),c=k.useMemo(()=>kf(e,t,u,i,r,"data"),[e,t,u,i,r]),f=k.useMemo(()=>kf(e,t,u,i,r,"assets"),[e,t,u,i,r]),d=k.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,v=!1;if(t.forEach(y=>{var x;let m=i.routes[y.route.id];!m||!m.hasLoader||(!c.some(T=>T.route.id===y.route.id)&&y.route.id in l&&((x=o[y.route.id])!=null&&x.shouldRevalidate)||m.hasClientLoader?v=!0:g.add(y.route.id))}),g.size===0)return[];let S=Bw(e,s,"data");return v&&g.size>0&&S.searchParams.set("_routes",t.filter(y=>g.has(y.route.id)).map(y=>y.route.id).join(",")),[S.pathname+S.search]},[s,l,r,i,c,t,e,o]),h=k.useMemo(()=>Ww(f,i),[f,i]),p=Xw(f);return k.createElement(k.Fragment,null,d.map(g=>k.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),h.map(g=>k.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),p.map(({key:g,link:v})=>k.createElement("link",{key:g,nonce:n.nonce,...v})))}function Zw(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var e1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{e1&&(window.__reactRouterVersion="7.11.0")}catch{}function t1({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=k.useRef();i.current==null&&(i.current=Ak({window:r,v5Compat:!0}));let o=i.current,[s,l]=k.useState({action:o.action,location:o.location}),u=k.useCallback(c=>{n===!1?l(c):k.startTransition(()=>l(c))},[n]);return k.useLayoutEffect(()=>o.listen(u),[o,u]),k.createElement(_w,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:o,unstable_useTransitions:n})}var xg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ar=k.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:s,state:l,target:u,to:c,preventScrollReset:f,viewTransition:d,unstable_defaultShouldRevalidate:h,...p},g){let{basename:v,unstable_useTransitions:S}=k.useContext(ht),y=typeof c=="string"&&xg.test(c),m=lg(c,v);c=m.to;let x=dw(c,{relative:i}),[T,j,E]=Qw(r,p),_=i1(c,{replace:s,state:l,target:u,preventScrollReset:f,relative:i,viewTransition:d,unstable_defaultShouldRevalidate:h,unstable_useTransitions:S});function D(b){t&&t(b),b.defaultPrevented||_(b)}let R=k.createElement("a",{...p,...E,href:m.absoluteURL||x,onClick:m.isExternal||o?t:D,ref:Zw(g,j),target:u,"data-discover":!y&&n==="render"?"true":void 0});return T&&!y?k.createElement(k.Fragment,null,R,k.createElement(Yw,{page:x})):R});ar.displayName="Link";var ou=k.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:s,viewTransition:l,children:u,...c},f){let d=fo(s,{relative:c.relative}),h=pt(),p=k.useContext(nl),{navigator:g,basename:v}=k.useContext(ht),S=p!=null&&c1(d)&&l===!0,y=g.encodeLocation?g.encodeLocation(d).pathname:d.pathname,m=h.pathname,x=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(m=m.toLowerCase(),x=x?x.toLowerCase():null,y=y.toLowerCase()),x&&v&&(x=hn(x,v)||x);const T=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let j=m===y||!i&&m.startsWith(y)&&m.charAt(T)==="/",E=x!=null&&(x===y||!i&&x.startsWith(y)&&x.charAt(y.length)==="/"),_={isActive:j,isPending:E,isTransitioning:S},D=j?t:void 0,R;typeof r=="function"?R=r(_):R=[r,j?"active":null,E?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let b=typeof o=="function"?o(_):o;return k.createElement(ar,{...c,"aria-current":D,className:R,ref:f,style:b,to:s,viewTransition:l},typeof u=="function"?u(_):u)});ou.displayName="NavLink";var n1=k.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:s=rs,action:l,onSubmit:u,relative:c,preventScrollReset:f,viewTransition:d,unstable_defaultShouldRevalidate:h,...p},g)=>{let{unstable_useTransitions:v}=k.useContext(ht),S=a1(),y=u1(l,{relative:c}),m=s.toLowerCase()==="get"?"get":"post",x=typeof l=="string"&&xg.test(l),T=j=>{if(u&&u(j),j.defaultPrevented)return;j.preventDefault();let E=j.nativeEvent.submitter,_=(E==null?void 0:E.getAttribute("formmethod"))||s,D=()=>S(E||j.currentTarget,{fetcherKey:t,method:_,navigate:n,replace:i,state:o,relative:c,preventScrollReset:f,viewTransition:d,unstable_defaultShouldRevalidate:h});v&&n!==!1?k.startTransition(()=>D()):D()};return k.createElement("form",{ref:g,method:m,action:y,onSubmit:r?u:T,...p,"data-discover":!x&&e==="render"?"true":void 0})});n1.displayName="Form";function r1(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function vg(e){let t=k.useContext(Jr);return ye(t,r1(e)),t}function i1(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:l,unstable_useTransitions:u}={}){let c=Oe(),f=pt(),d=fo(e,{relative:o});return k.useCallback(h=>{if(Lw(h,t)){h.preventDefault();let p=n!==void 0?n:eo(f)===eo(d),g=()=>c(e,{replace:p,state:r,preventScrollReset:i,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:l});u?k.startTransition(()=>g()):g()}},[f,c,d,n,r,t,e,i,o,s,l,u])}function o1(e){ct(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=k.useRef(iu(e)),n=k.useRef(!1),r=pt(),i=k.useMemo(()=>Ow(r.search,n.current?null:t.current),[r.search]),o=Oe(),s=k.useCallback((l,u)=>{const c=iu(typeof l=="function"?l(new URLSearchParams(i)):l);n.current=!0,o("?"+c,u)},[o,i]);return[i,s]}var s1=0,l1=()=>`__${String(++s1)}__`;function a1(){let{router:e}=vg("useSubmit"),{basename:t}=k.useContext(ht),n=Ew(),r=e.fetch,i=e.navigate;return k.useCallback(async(o,s={})=>{let{action:l,method:u,encType:c,formData:f,body:d}=Mw(o,t);if(s.navigate===!1){let h=s.fetcherKey||l1();await r(h,n,s.action||l,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:f,body:d,formMethod:s.method||u,formEncType:s.encType||c,flushSync:s.flushSync})}else await i(s.action||l,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:f,body:d,formMethod:s.method||u,formEncType:s.encType||c,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,i,t,n])}function u1(e,{relative:t}={}){let{basename:n}=k.useContext(ht),r=k.useContext(bt);ye(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...fo(e||".",{relative:t})},s=pt();if(e==null){o.search=s.search;let l=new URLSearchParams(o.search),u=l.getAll("index");if(u.some(f=>f==="")){l.delete("index"),u.filter(d=>d).forEach(d=>l.append("index",d));let f=l.toString();o.search=f?`?${f}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:an([n,o.pathname])),eo(o)}function c1(e,{relative:t}={}){let n=k.useContext(ug);ye(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=vg("useViewTransitionState"),i=fo(e,{relative:t});if(!n.isTransitioning)return!1;let o=hn(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=hn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ls(i.pathname,s)!=null||Ls(i.pathname,o)!=null}const d1="/beta";class wf extends Error{constructor(t,n,r){super(r),this.name="ApiError",this.url=n.url,this.status=n.status,this.statusText=n.statusText,this.body=n.body,this.request=t}}class f1 extends Error{constructor(t){super(t),this.name="CancelError"}get isCancelled(){return!0}}var qt,Gt,At,Nn,er,Mr,Tn;class h1{constructor(t){xn(this,qt);xn(this,Gt);xn(this,At);xn(this,Nn);xn(this,er);xn(this,Mr);xn(this,Tn);Tt(this,qt,!1),Tt(this,Gt,!1),Tt(this,At,!1),Tt(this,Nn,[]),Tt(this,er,new Promise((n,r)=>{Tt(this,Mr,n),Tt(this,Tn,r);const i=l=>{le(this,qt)||le(this,Gt)||le(this,At)||(Tt(this,qt,!0),le(this,Mr)&&le(this,Mr).call(this,l))},o=l=>{le(this,qt)||le(this,Gt)||le(this,At)||(Tt(this,Gt,!0),le(this,Tn)&&le(this,Tn).call(this,l))},s=l=>{le(this,qt)||le(this,Gt)||le(this,At)||le(this,Nn).push(l)};return Object.defineProperty(s,"isResolved",{get:()=>le(this,qt)}),Object.defineProperty(s,"isRejected",{get:()=>le(this,Gt)}),Object.defineProperty(s,"isCancelled",{get:()=>le(this,At)}),t(i,o,s)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(t,n){return le(this,er).then(t,n)}catch(t){return le(this,er).catch(t)}finally(t){return le(this,er).finally(t)}cancel(){if(!(le(this,qt)||le(this,Gt)||le(this,At))){if(Tt(this,At,!0),le(this,Nn).length)try{for(const t of le(this,Nn))t()}catch(t){console.warn("Cancellation threw an error",t);return}le(this,Nn).length=0,le(this,Tn)&&le(this,Tn).call(this,new f1("Request aborted"))}}get isCancelled(){return le(this,At)}}qt=new WeakMap,Gt=new WeakMap,At=new WeakMap,Nn=new WeakMap,er=new WeakMap,Mr=new WeakMap,Tn=new WeakMap;const M={BASE:"",VERSION:"1.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var Sf;(e=>{(t=>{t.HUMAN="human",t.AGENT="agent"})(e.type||(e.type={}))})(Sf||(Sf={}));var Cf;(e=>{(t=>{t.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.OTHER="other"})(e.type||(e.type={}))})(Cf||(Cf={}));var Wt;(e=>{(t=>{t.NOT_STARTED="not_started",t.USER_CONSENT_REJECTED="USER_CONSENT_REJECTED",t.MCP_AUTH_FLOW_STARTED="mcp_auth_flow_started",t.MCP_AUTH_FLOW_COMPLETED="mcp_auth_flow_completed",t.CONNECTIONS_FLOW_STARTED="connections_flow_started",t.CONNECTIONS_FLOW_COMPLETED="connections_flow_completed",t.AUTHORIZATION_CODE_ISSUED="authorization_code_issued",t.AUTHORIZATION_CODE_EXCHANGED="authorization_code_exchanged"})(e.status||(e.status={}))})(Wt||(Wt={}));var Ef;(e=>{(t=>{t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.status||(e.status={}))})(Ef||(Ef={}));var bf;(e=>{(t=>{t.NONE="none",t.CLIENT_SECRET_BASIC="client_secret_basic"})(e.token_endpoint_auth_method||(e.token_endpoint_auth_method={}))})(bf||(bf={}));var Cn;(e=>{(t=>{t.PENDING="pending",t.AUTHORIZED="authorized",t.FAILED="failed"})(e.status||(e.status={}))})(Cn||(Cn={}));var Nf;(e=>{(t=>{t.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.OTHER="other"})(e.type||(e.type={}))})(Nf||(Nf={}));var Tf;(e=>{(t=>{t.CLIENT_NOT_REGISTERED="CLIENT_NOT_REGISTERED",t.CLIENT_REGISTERED="CLIENT_REGISTERED",t.AUTHORIZATION_REQUEST_STARTED="AUTHORIZATION_REQUEST_STARTED",t.USER_CONSENT_OK="USER_CONSENT_OK",t.USER_CONSENT_REJECTED="USER_CONSENT_REJECTED",t.WAITING_ON_DOWNSTREAM_AUTH="WAITING_ON_DOWNSTREAM_AUTH",t.AUTHORIZATION_CODE_ISSUED="AUTHORIZATION_CODE_ISSUED",t.AUTHORIZATION_CODE_EXCHANGED="AUTHORIZATION_CODE_EXCHANGED"})(e.status||(e.status={}))})(Tf||(Tf={}));var jf;(e=>{(t=>{t.ACCESS_TOKEN="access_token",t.REFRESH_TOKEN="refresh_token"})(e.token_type_hint||(e.token_type_hint={}))})(jf||(jf={}));var _f;(e=>{(t=>{t.BEARER="Bearer"})(e.token_type||(e.token_type={}))})(_f||(_f={}));var Ri;(e=>{(t=>{t.CLIENT_NOT_REGISTERED="CLIENT_NOT_REGISTERED",t.CLIENT_REGISTERED="CLIENT_REGISTERED",t.AUTHORIZATION_REQUEST_STARTED="AUTHORIZATION_REQUEST_STARTED",t.USER_CONSENT_OK="USER_CONSENT_OK",t.USER_CONSENT_REJECTED="USER_CONSENT_REJECTED",t.WAITING_ON_DOWNSTREAM_AUTH="WAITING_ON_DOWNSTREAM_AUTH",t.AUTHORIZATION_CODE_ISSUED="AUTHORIZATION_CODE_ISSUED",t.AUTHORIZATION_CODE_EXCHANGED="AUTHORIZATION_CODE_EXCHANGED"})(e.status||(e.status={}))})(Ri||(Ri={}));var If;(e=>{(t=>{t.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.OTHER="other"})(e.type||(e.type={}))})(If||(If={}));var Af;(e=>{(t=>{t.NONE="none",t.CLIENT_SECRET_BASIC="client_secret_basic"})(e.token_endpoint_auth_method||(e.token_endpoint_auth_method={}))})(Af||(Af={}));var su;(e=>{(t=>{t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.status||(e.status={}))})(su||(su={}));var Rf;(e=>{(t=>{t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.status||(e.status={}))})(Rf||(Rf={}));var Pf;(e=>{(t=>{t.URN_IETF_PARAMS_OAUTH_GRANT_TYPE_TOKEN_EXCHANGE="urn:ietf:params:oauth:grant-type:token-exchange"})(e.grant_type||(e.grant_type={})),(t=>{t.URN_IETF_PARAMS_OAUTH_TOKEN_TYPE_ACCESS_TOKEN="urn:ietf:params:oauth:token-type:access_token"})(e.subject_token_type||(e.subject_token_type={}))})(Pf||(Pf={}));var Df;(e=>{(t=>{t.AUTHORIZATION_CODE="authorization_code",t.REFRESH_TOKEN="refresh_token"})(e.grant_type||(e.grant_type={}))})(Df||(Df={}));var Lf;(e=>{(t=>{t.BEARER="Bearer"})(e.token_type||(e.token_type={}))})(Lf||(Lf={}));var Of;(e=>{(t=>{t.ADMIN="admin",t.STANDARD="standard"})(e.role||(e.role={}))})(Of||(Of={}));const Tc=e=>e!=null,ho=e=>typeof e=="string",Wl=e=>ho(e)&&e!=="",jc=e=>typeof e=="object"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.arrayBuffer=="function"&&typeof e.constructor=="function"&&typeof e.constructor.name=="string"&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),kg=e=>e instanceof FormData,p1=e=>{try{return btoa(e)}catch{return Buffer.from(e).toString("base64")}},m1=e=>{const t=[],n=(i,o)=>{t.push(`${encodeURIComponent(i)}=${encodeURIComponent(String(o))}`)},r=(i,o)=>{Tc(o)&&(Array.isArray(o)?o.forEach(s=>{r(i,s)}):typeof o=="object"?Object.entries(o).forEach(([s,l])=>{r(`${i}[${s}]`,l)}):n(i,o))};return Object.entries(e).forEach(([i,o])=>{r(i,o)}),t.length>0?`?${t.join("&")}`:""},g1=(e,t)=>{const n=encodeURI,r=t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,(o,s)=>{var l;return(l=t.path)!=null&&l.hasOwnProperty(s)?n(String(t.path[s])):o}),i=`${e.BASE}${r}`;return t.query?`${i}${m1(t.query)}`:i},y1=e=>{if(e.formData){const t=new FormData,n=(r,i)=>{ho(i)||jc(i)?t.append(r,i):t.append(r,JSON.stringify(i))};return Object.entries(e.formData).filter(([r,i])=>Tc(i)).forEach(([r,i])=>{Array.isArray(i)?i.forEach(o=>n(r,o)):n(r,i)}),t}},Fo=async(e,t)=>t,x1=async(e,t)=>{const[n,r,i,o]=await Promise.all([Fo(t,e.TOKEN),Fo(t,e.USERNAME),Fo(t,e.PASSWORD),Fo(t,e.HEADERS)]),s=Object.entries({Accept:"application/json",...o,...t.headers}).filter(([l,u])=>Tc(u)).reduce((l,[u,c])=>({...l,[u]:String(c)}),{});if(Wl(n)&&(s.Authorization=`Bearer ${n}`),Wl(r)&&Wl(i)){const l=p1(`${r}:${i}`);s.Authorization=`Basic ${l}`}return t.body!==void 0&&(t.mediaType?s["Content-Type"]=t.mediaType:jc(t.body)?s["Content-Type"]=t.body.type||"application/octet-stream":ho(t.body)?s["Content-Type"]="text/plain":kg(t.body)||(s["Content-Type"]="application/json")),new Headers(s)},v1=e=>{var t;if(e.body!==void 0)return(t=e.mediaType)!=null&&t.includes("/json")?JSON.stringify(e.body):ho(e.body)||jc(e.body)||kg(e.body)?e.body:JSON.stringify(e.body)},k1=async(e,t,n,r,i,o,s)=>{const l=new AbortController,u={headers:o,body:r??i,method:t.method,signal:l.signal};return s(()=>l.abort()),await fetch(n,u)},w1=(e,t)=>{if(t){const n=e.headers.get(t);if(ho(n))return n}},S1=async e=>{if(e.status!==204)try{const t=e.headers.get("Content-Type");if(t)return["application/json","application/problem+json"].some(i=>t.toLowerCase().startsWith(i))?await e.json():await e.text()}catch(t){console.error(t)}},C1=(e,t)=>{const r={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",...e.errors}[t.status];if(r)throw new wf(e,t,r);if(!t.ok){const i=t.status??"unknown",o=t.statusText??"unknown",s=(()=>{try{return JSON.stringify(t.body,null,2)}catch{return}})();throw new wf(e,t,`Generic Error: status: ${i}; status text: ${o}; body: ${s}`)}},U=(e,t)=>new h1(async(n,r,i)=>{try{const o=g1(e,t),s=y1(t),l=v1(t),u=await x1(e,t);if(!i.isCancelled){const c=await k1(e,t,o,l,s,u,i),f=await S1(c),d=w1(c,t.responseHeader),h={url:o,ok:c.ok,status:c.status,statusText:c.statusText,body:d??f};C1(t,h),n(h.body)}}catch(o){r(o)}});class Vl{static agentsControllerCreateAgent(t){return U(M,{method:"POST",url:"/api/v1/agents",body:t,mediaType:"application/json"})}static agentsControllerListAgents(t,n=1,r=20){return U(M,{method:"GET",url:"/api/v1/agents",query:{isActive:t,page:n,limit:r}})}static agentsControllerGetAgentBySlug(t){return U(M,{method:"GET",url:"/api/v1/agents/{slug}",path:{slug:t}})}static agentsControllerPatchAgent(t,n){return U(M,{method:"PATCH",url:"/api/v1/agents/{actorId}",path:{actorId:t},body:n,mediaType:"application/json"})}static agentsControllerDeleteAgent(t){return U(M,{method:"DELETE",url:"/api/v1/agents/{actorId}",path:{actorId:t}})}}class E1{static authJourneysControllerGetAuthJourneys(t){return U(M,{method:"GET",url:"/api/v1/auth-journeys/servers/{serverId}",path:{serverId:t},errors:{404:"Server not found"}})}}class b1{static clientRegistrationControllerRegisterClient(t,n,r){return U(M,{method:"POST",url:"/api/v1/auth/clients/register/mcp/{serverId}/{version}",path:{serverId:t,version:n},body:r,mediaType:"application/json",errors:{400:"Invalid client metadata (missing fields, invalid redirect URIs, unsupported grant types, or PKCE not configured)",409:"A client with this name is already registered"}})}static clientRegistrationControllerGetClient(t){return U(M,{method:"GET",url:"/api/v1/auth/clients/{clientId}",path:{clientId:t},errors:{404:"Client not found"}})}static clientRegistrationControllerListClients(){return U(M,{method:"GET",url:"/api/v1/auth/clients"})}static authorizationControllerAuthorize(t,n,r,i,o,s,l,u,c,f){return U(M,{method:"GET",url:"/api/v1/auth/authorize/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:u,version:c},query:{response_type:t,scope:f,client_id:n,code_challenge:r,code_challenge_method:i,redirect_uri:o,state:s,resource:l},errors:{302:"Redirects to consent screen with authorization request ID",400:"Invalid authorization request parameters",404:"MCP server or client not found"}})}static authorizationControllerAuthorizeConsent(t,n,r){return U(M,{method:"POST",url:"/api/v1/auth/authorize/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:t,version:n},body:r,mediaType:"application/json",errors:{302:"Redirects to client redirect_uri with authorization code or error",400:"Invalid consent decision or flow state",401:"Authorization flow has already been used",404:"Authorization flow not found"}})}static authorizationControllerGetConsentMetadata(t){return U(M,{method:"GET",url:"/api/v1/auth/consent/{flowId}",path:{flowId:t},errors:{401:"Authentication required to access consent metadata",404:"Authorization flow not found"}})}static authorizationControllerToken(t,n,r){return U(M,{method:"POST",url:"/api/v1/auth/token/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:t,version:n},body:r,mediaType:"application/json",errors:{400:"Invalid token request parameters",401:"Invalid authorization code, code_verifier, or expired code"}})}static authorizationControllerIntrospect(t,n,r){return U(M,{method:"POST",url:"/api/v1/auth/introspect/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:t,version:n},body:r,mediaType:"application/json",errors:{400:"Invalid introspection request parameters"}})}static authorizationControllerTokenExchange(t,n,r){return U(M,{method:"POST",url:"/api/v1/auth/token-exchange/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:t,version:n},body:r,mediaType:"application/json",errors:{400:"Invalid token exchange request parameters",401:"Invalid or expired MCP JWT",403:"Insufficient scope - requested scope not entitled",404:"Connection not found"}})}static authorizationControllerCallback(t,n,r,i,o){return U(M,{method:"GET",url:"/api/v1/auth/callback",query:{code:t,state:n,error:r,scope:i,error_description:o},errors:{302:"Redirects to next step in the authorization flow",400:"Invalid callback parameters or state",404:"Connection flow not found for provided state"}})}static authorizationControllerGetScopes(){return U(M,{method:"GET",url:"/api/v1/auth/scopes"})}}class _t{static contextControllerCreateBlock(t){return U(M,{method:"POST",url:"/api/v1/context/blocks",body:t,mediaType:"application/json",errors:{400:"Invalid input data"}})}static contextControllerListBlocks(t){return U(M,{method:"GET",url:"/api/v1/context/blocks",query:{tag:t}})}static contextControllerGetBlockTree(){return U(M,{method:"GET",url:"/api/v1/context/blocks/tree"})}static contextControllerGetBlock(t){return U(M,{method:"GET",url:"/api/v1/context/blocks/{id}",path:{id:t}})}static contextControllerUpdateBlock(t,n){return U(M,{method:"PATCH",url:"/api/v1/context/blocks/{id}",path:{id:t},body:n,mediaType:"application/json",errors:{400:"No update fields provided"}})}static contextControllerDeleteBlock(t){return U(M,{method:"DELETE",url:"/api/v1/context/blocks/{id}",path:{id:t}})}static contextControllerAppendToBlock(t,n){return U(M,{method:"POST",url:"/api/v1/context/blocks/{id}/append",path:{id:t},body:n,mediaType:"application/json"})}static contextControllerReorderBlock(t,n){return U(M,{method:"PATCH",url:"/api/v1/context/blocks/{id}/reorder",path:{id:t},body:n,mediaType:"application/json"})}static contextControllerMoveBlock(t,n){return U(M,{method:"PATCH",url:"/api/v1/context/blocks/{id}/move",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Circular reference detected or parent not found"}})}static contextControllerAddTagToBlock(t,n){return U(M,{method:"POST",url:"/api/v1/context/blocks/{id}/tags",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data"}})}static contextControllerRemoveTagFromBlock(t,n){return U(M,{method:"DELETE",url:"/api/v1/context/blocks/{id}/tags/{tagId}",path:{id:t,tagId:n}})}static contextControllerHandleMcpGet(){return U(M,{method:"GET",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPost(){return U(M,{method:"POST",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPut(){return U(M,{method:"PUT",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpDelete(){return U(M,{method:"DELETE",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPatch(){return U(M,{method:"PATCH",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpOptions(){return U(M,{method:"OPTIONS",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpHead(){return U(M,{method:"HEAD",url:"/api/v1/context/blocks/mcp"})}}class wg{static metaControllerCreateTag(t){return U(M,{method:"POST",url:"/api/v1/meta/tags",body:t,mediaType:"application/json",errors:{400:"Invalid input data"}})}static metaControllerGetAllTags(){return U(M,{method:"GET",url:"/api/v1/meta/tags"})}static metaControllerGetTagColors(){return U(M,{method:"GET",url:"/api/v1/meta/tags/colors"})}static metaControllerDeleteTag(t){return U(M,{method:"DELETE",url:"/api/v1/meta/tags/{tagId}",path:{tagId:t},errors:{404:"Tag not found"}})}}class Lt{static tasksControllerCreateTask(t){return U(M,{method:"POST",url:"/api/v1/tasks/tasks",body:t,mediaType:"application/json",errors:{400:"Invalid input data"}})}static tasksControllerListTasks(t,n,r,i=1,o=20){return U(M,{method:"GET",url:"/api/v1/tasks/tasks",query:{assignee:t,sessionId:n,tag:r,page:i,limit:o}})}static tasksControllerUpdateTask(t,n){return U(M,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerDeleteTask(t){return U(M,{method:"DELETE",url:"/api/v1/tasks/tasks/{id}",path:{id:t},errors:{404:"Task not found"}})}static tasksControllerGetTask(t){return U(M,{method:"GET",url:"/api/v1/tasks/tasks/{id}",path:{id:t},errors:{404:"Task not found"}})}static tasksControllerAssignTask(t,n){return U(M,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/assign",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerAssignTaskToMe(t){return U(M,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/assign-to-me",path:{id:t},errors:{404:"Task not found"}})}static tasksControllerSearchTasks(t,n=10,r=.3){return U(M,{method:"GET",url:"/api/v1/tasks/tasks/search/query",query:{query:t,limit:n,threshold:r}})}static tasksControllerAddComment(t,n){return U(M,{method:"POST",url:"/api/v1/tasks/tasks/{id}/comments",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerChangeStatus(t,n){return U(M,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/status",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid status transition or comment required",404:"Task not found"}})}static tasksControllerAddTagToTask(t,n){return U(M,{method:"POST",url:"/api/v1/tasks/tasks/{id}/tags",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerRemoveTagFromTask(t,n){return U(M,{method:"DELETE",url:"/api/v1/tasks/tasks/{id}/tags/{tagId}",path:{id:t,tagId:n},errors:{404:"Task not found"}})}static tasksControllerCreateInputRequest(t,n){return U(M,{method:"POST",url:"/api/v1/tasks/tasks/{id}/input-requests",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerAnswerInputRequest(t,n,r){return U(M,{method:"POST",url:"/api/v1/tasks/tasks/{id}/input-requests/{inputRequestId}/answer",path:{id:t,inputRequestId:n},body:r,mediaType:"application/json",errors:{400:"Invalid input data",404:"Input request not found"}})}static tasksControllerHandleMcpGet(){return U(M,{method:"GET",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPost(){return U(M,{method:"POST",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPut(){return U(M,{method:"PUT",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpDelete(){return U(M,{method:"DELETE",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPatch(){return U(M,{method:"PATCH",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpOptions(){return U(M,{method:"OPTIONS",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpHead(){return U(M,{method:"HEAD",url:"/api/v1/tasks/tasks/mcp"})}}class Ke{static mcpRegistryControllerCreateServer(t){return U(M,{method:"POST",url:"/api/v1/mcp/servers",body:t,mediaType:"application/json",errors:{409:"Server with providedId already exists"}})}static mcpRegistryControllerListServers(t,n){return U(M,{method:"GET",url:"/api/v1/mcp/servers",query:{page:t,limit:n}})}static mcpRegistryControllerGetServer(t){return U(M,{method:"GET",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:t},errors:{404:"Server not found"}})}static mcpRegistryControllerUpdateServer(t,n){return U(M,{method:"PATCH",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:t},body:n,mediaType:"application/json",errors:{404:"Server not found"}})}static mcpRegistryControllerDeleteServer(t){return U(M,{method:"DELETE",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:t},errors:{404:"Server not found",409:"Server has dependencies"}})}static mcpRegistryControllerCreateScopes(t,n){return U(M,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/scopes",path:{serverId:t},body:n,mediaType:"application/json",errors:{404:"Server not found",409:"Scope already exists"}})}static mcpRegistryControllerListScopes(t){return U(M,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes",path:{serverId:t},errors:{404:"Server not found"}})}static mcpRegistryControllerGetScope(t,n){return U(M,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}",path:{serverId:t,scopeId:n},errors:{404:"Scope not found"}})}static mcpRegistryControllerDeleteScope(t,n){return U(M,{method:"DELETE",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}",path:{serverId:t,scopeId:n},errors:{404:"Scope not found",409:"Scope has mappings"}})}static mcpRegistryControllerCreateConnection(t,n){return U(M,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/connections",path:{serverId:t},body:n,mediaType:"application/json",errors:{404:"Server not found",409:"Connection name conflict"}})}static mcpRegistryControllerListConnections(t){return U(M,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/connections",path:{serverId:t},errors:{404:"Server not found"}})}static mcpRegistryControllerGetConnection(t){return U(M,{method:"GET",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:t},errors:{404:"Connection not found"}})}static mcpRegistryControllerUpdateConnection(t,n){return U(M,{method:"PATCH",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:t},body:n,mediaType:"application/json",errors:{404:"Connection not found",409:"Connection name conflict"}})}static mcpRegistryControllerDeleteConnection(t){return U(M,{method:"DELETE",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:t},errors:{404:"Connection not found",409:"Connection has mappings"}})}static mcpRegistryControllerCreateMapping(t,n){return U(M,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/mappings",path:{serverId:t},body:n,mediaType:"application/json",errors:{400:"Invalid mapping",404:"Scope or connection not found"}})}static mcpRegistryControllerListMappings(t,n){return U(M,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}/mappings",path:{serverId:t,scopeId:n},errors:{404:"Scope not found"}})}static mcpRegistryControllerDeleteMapping(t){return U(M,{method:"DELETE",url:"/api/v1/mcp/mappings/{mappingId}",path:{mappingId:t},errors:{404:"Mapping not found"}})}}class pi{static webAuthControllerLogin(t){return U(M,{method:"POST",url:"/api/v1/auth/login",body:t,mediaType:"application/json",errors:{401:"Invalid credentials"}})}static webAuthControllerRefresh(){return U(M,{method:"POST",url:"/api/v1/auth/refresh",errors:{401:"Invalid or expired refresh token"}})}static webAuthControllerLogout(){return U(M,{method:"POST",url:"/api/v1/auth/logout"})}static webAuthControllerMe(){return U(M,{method:"GET",url:"/api/v1/auth/me",errors:{401:"Not authenticated"}})}static webAuthControllerChangePassword(t){return U(M,{method:"POST",url:"/api/v1/auth/change-password",body:t,mediaType:"application/json",errors:{401:"Not authenticated or current password is incorrect"}})}}const Sg=()=>"",Cg=e=>e,hr=Sg();M.BASE=hr;M.CREDENTIALS="include";M.BASE=hr;const Eg=k.createContext(void 0);function N1({children:e}){const[t,n]=k.useState(null),[r,i]=k.useState(!0);k.useEffect(()=>{pi.webAuthControllerMe().then(c=>{console.log("found me"),n(c)}).catch(()=>{console.log("not me"),n(null)}).finally(()=>{i(!1)})},[]),k.useEffect(()=>{if(!t)return;const c=setInterval(async()=>{try{const f=await pi.webAuthControllerRefresh();n(f.user)}catch(f){console.error("Token refresh failed:",f),n(null)}},8*60*1e3);return()=>clearInterval(c)},[t]);const u={user:t,isAuthenticated:!!t,isLoading:r,login:async(c,f)=>{const d=await pi.webAuthControllerLogin({email:c,password:f});n(d.user)},logout:async()=>{try{await pi.webAuthControllerLogout()}finally{n(null)}},refreshAuth:async()=>{const c=await pi.webAuthControllerRefresh();n(c.user)}};return a.jsx(Eg.Provider,{value:u,children:e})}function _c(){const e=k.useContext(Eg);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}function T1({children:e}){const{isAuthenticated:t,isLoading:n}=_c(),r=pt();return n?a.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)"},children:a.jsx("div",{style:{color:"white",fontSize:"18px",fontWeight:"600"},children:"Loading..."})}):t?a.jsx(a.Fragment,{children:e}):a.jsx(jw,{to:"/login",state:{from:r},replace:!0})}function j1(){var p,g;const[e,t]=k.useState(""),[n,r]=k.useState(""),[i,o]=k.useState(""),[s,l]=k.useState(!1),{login:u}=_c(),c=Oe(),d=((g=(p=pt().state)==null?void 0:p.from)==null?void 0:g.pathname)||"/",h=async v=>{v.preventDefault(),l(!0),o("");try{await u(e,n),c(d,{replace:!0})}catch{o("Invalid email or password")}finally{l(!1)}};return a.jsx("div",{className:"login-page",children:a.jsx("div",{className:"login-container",children:a.jsxs("div",{className:"login-card",children:[a.jsxs("div",{className:"login-header",children:[a.jsx("h1",{className:"login-title",children:"Welcome Back"}),a.jsx("p",{className:"login-subtitle",children:"Sign in to your account"})]}),a.jsxs("form",{onSubmit:h,className:"login-form",children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"email",className:"form-label",children:"Email"}),a.jsx("input",{id:"email",type:"email",value:e,onChange:v=>t(v.target.value),className:"form-input",placeholder:"you@example.com",required:!0,disabled:s,autoComplete:"email"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"password",className:"form-label",children:"Password"}),a.jsx("input",{id:"password",type:"password",value:n,onChange:v=>r(v.target.value),className:"form-input",placeholder:"••••••••",required:!0,disabled:s,autoComplete:"current-password"})]}),i&&a.jsx("div",{className:"login-error",children:i}),a.jsx("button",{type:"submit",className:"login-button",disabled:s,children:s?"Signing in...":"Sign In"})]})]})})})}function _1({collapsed:e}){const t=[{name:"Home",path:"/",icon:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),a.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]})},{name:"Agents",path:"/agents",icon:"🤖"},{name:"Tasks",path:"/tasks",icon:"📋"},{name:"Context",path:"/context",icon:"📚"},{name:"Tools",path:"/mcp-registry",icon:"🔧"}];return a.jsxs("nav",{className:"sidebar-nav-container",children:[a.jsx("div",{className:"sidebar-nav-main",children:t.map(n=>a.jsxs(ou,{to:n.path,className:({isActive:r})=>`sidebar-nav-link ${r?"active":""} ${e?"collapsed":""}`,end:n.path==="/",children:[a.jsx("div",{className:"sidebar-nav-icon",children:typeof n.icon=="string"?a.jsx("span",{children:n.icon}):n.icon}),a.jsx("span",{className:"nav-link-text",children:n.name})]},n.path))}),a.jsx("div",{className:"sidebar-nav-bottom",children:a.jsxs(ou,{to:"/logout",className:({isActive:n})=>`sidebar-nav-link ${n?"active":""} ${e?"collapsed":""}`,end:!0,children:[a.jsx("div",{className:"sidebar-nav-icon",children:a.jsx("span",{children:"🔓"})}),a.jsx("span",{className:"nav-link-text",children:"Logout"})]},"213")})]})}const I1=768;function to(){return window.innerWidth<I1}function A1(){const[e,t]=k.useState(()=>to());return k.useEffect(()=>{const n=()=>{t(to())};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}const Ff="app-nav-collapsed";function R1(){const[e,t]=k.useState(()=>{const r=localStorage.getItem(Ff);return r!==null?r==="true":to()});k.useEffect(()=>{localStorage.setItem(Ff,String(e))},[e]);const n=()=>{t(!e)};return a.jsxs("div",{className:"root-layout",children:[a.jsxs("aside",{className:`sidebar-app-nav ${e?"collapsed":""}`,children:[a.jsx("nav",{className:"sidebar-content",children:a.jsx(_1,{collapsed:e})}),a.jsx("button",{className:"sidebar-toggle",onClick:n,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:e?"→":"←"})]}),a.jsx("div",{className:"root-layout-main",children:a.jsx(Ec,{})})]})}function pr(e){const t=k.useRef(null);k.useEffect(()=>(t.current=document.title,document.title=e,()=>{t.current!==null&&(document.title=t.current)}),[e])}function P1(){pr("taico — Home");const e=[{name:"Tasks",description:"Manage and track your tasks across different stages with our Kanban board.",path:"/tasks",icon:"📋",color:"#3b82f6"},{name:"Context",description:"Create, edit, and organize your knowledge base with our wiki platform.",path:"/context",icon:"📚",color:"#10b981"},{name:"Tools",description:"Manage Model Context Protocol servers, scopes, and OAuth connections.",path:"/mcp-registry",icon:"🔧",color:"#8b5cf6"}];return a.jsx("div",{className:"home-page",children:a.jsxs("div",{className:"home-container",children:[a.jsxs("header",{className:"home-header",children:[a.jsx("h1",{className:"home-title",children:"taico"}),a.jsx("p",{className:"home-subtitle",children:"Your all-in-one platform for task management, knowledge organization, and protocol integration"})]}),a.jsx("div",{className:"apps-grid",children:e.map(t=>a.jsxs(ar,{to:t.path,className:"app-card",style:{"--app-color":t.color},children:[a.jsx("div",{className:"app-icon",children:t.icon}),a.jsx("h2",{className:"app-name",children:t.name}),a.jsx("p",{className:"app-description",children:t.description}),a.jsx("div",{className:"app-arrow",children:"→"})]},t.path))}),a.jsx("footer",{className:"home-footer",children:a.jsx("p",{children:"Built with React + TypeScript + Vite"})})]})})}const bg=({tag:e,onRemove:t,small:n=!1})=>{const r=e.color||"#6B7280";return a.jsxs("span",{className:`tag-badge ${n?"tag-badge-small":""}`,style:{backgroundColor:r,color:"#ffffff",padding:n?"1px 4px":"2px 6px",borderRadius:"3px",fontSize:n?"0.65rem":"0.7rem",fontWeight:"500",display:"inline-flex",alignItems:"center",gap:"2px",marginRight:"4px",marginBottom:"4px"},children:[e.name,t&&a.jsx("button",{onClick:i=>{i.stopPropagation(),t()},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:n?"0.75rem":"0.85rem",lineHeight:"1"},"aria-label":`Remove ${e.name} tag`,children:"×"})]})};function D1({task:e,onClick:t}){var i,o;const n=s=>{const l=new Date(s);return(new Date().getTime()-l.getTime())/(1e3*60*60)<24?l.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}):l.toLocaleDateString("en-US",{month:"short",day:"numeric"})},r=((i=e.comments)==null?void 0:i.length)??0;return a.jsxs("div",{className:"task-card",onClick:t,children:[a.jsx("h3",{className:"task-card-title",children:e.name}),a.jsx("p",{className:"task-card-description",children:e.description}),e.tags&&e.tags.length>0&&a.jsx("div",{style:{marginTop:"8px",marginBottom:"8px"},children:e.tags.map(s=>a.jsx(bg,{tag:s,small:!0},s.name))}),a.jsx("div",{className:"task-card-divider"}),a.jsxs("div",{className:"task-card-footer",children:[a.jsxs("div",{className:"task-card-assignee",children:[e.assignee?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"assignee-emoji",children:"👤"}),a.jsx("span",{className:"assignee-name",children:((o=e.assigneeActor)==null?void 0:o.displayName)||"unassigned"})]}):a.jsx("span",{className:"unassigned-text",children:"Unassigned"}),r>0?a.jsxs("span",{className:"comment-count","aria-label":`${r} comments`,children:["💬 ",r]}):null]}),a.jsx("div",{className:"task-card-date",children:n(e.updatedAt)})]})]})}M.BASE=hr;function Ng(){const[e,t]=k.useState([]),n=k.useCallback((i,o="info")=>{const s=Date.now();t(l=>[...l,{id:s,message:i,type:o}])},[]),r=k.useCallback(i=>{t(o=>o.filter(s=>s.id!==i))},[]);return{toasts:e,showToast:n,removeToast:r}}function Tg({message:e,type:t="info",onClose:n,duration:r=3e3}){return k.useEffect(()=>{const i=setTimeout(n,r);return()=>clearTimeout(i)},[n,r]),a.jsxs("div",{className:`toast toast-${t}`,children:[a.jsx("span",{children:e}),a.jsx("button",{onClick:n,className:"toast-close","aria-label":"Close",children:"×"})]})}const Ic=({value:e,onChange:t,placeholder:n="Type to add tags..."})=>{const[r,i]=k.useState(""),[o,s]=k.useState([]),[l,u]=k.useState(!1),[c,f]=k.useState(-1),[d,h]=k.useState([]),p=k.useRef(null),g=k.useRef(null);k.useEffect(()=>{(async()=>{try{const x=await wg.metaControllerGetAllTags();h(x)}catch(x){console.error("Failed to load tags:",x)}})()},[]),k.useEffect(()=>{const x=setTimeout(()=>{if(r.trim().length>0){const T=r.trim().toLowerCase(),j=d.filter(E=>E.name.toLowerCase().includes(T)&&!e.includes(E.name));s(j),u(!0)}else s([]),u(!1)},150);return()=>clearTimeout(x)},[r,e,d]),k.useEffect(()=>{const m=x=>{g.current&&!g.current.contains(x.target)&&u(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);const v=m=>{var T;const x=m.trim();x&&!e.includes(x)&&t([...e,x]),i(""),s([]),u(!1),f(-1),(T=p.current)==null||T.focus()},S=m=>{t(e.filter(x=>x!==m))},y=m=>{m.key==="Tab"&&r.trim()||m.key==="Enter"&&r.trim()?(m.preventDefault(),c>=0&&o[c]?v(o[c].name):v(r)):m.key==="ArrowDown"?(m.preventDefault(),f(x=>x<o.length-1?x+1:x)):m.key==="ArrowUp"?(m.preventDefault(),f(x=>x>0?x-1:-1)):m.key==="Escape"?(u(!1),f(-1)):m.key==="Backspace"&&!r&&e.length>0&&t(e.slice(0,-1))};return a.jsxs("div",{ref:g,style:{position:"relative"},children:[a.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",padding:"6px",border:"1px solid #ddd",borderRadius:"4px",minHeight:"38px",cursor:"text"},onClick:()=>{var m;return(m=p.current)==null?void 0:m.focus()},children:[e.map(m=>{const x=d.find(j=>j.name===m),T=(x==null?void 0:x.color)||"#3B82F6";return a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"2px",backgroundColor:T,color:"white",padding:"2px 6px",borderRadius:"3px",fontSize:"0.7rem",fontWeight:"500"},children:[m,a.jsx("button",{type:"button",onClick:j=>{j.stopPropagation(),S(m)},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:"0.85rem",lineHeight:"1"},children:"×"})]},m)}),a.jsx("input",{ref:p,type:"text",value:r,onChange:m=>i(m.target.value),onKeyDown:y,onFocus:()=>r&&u(!0),placeholder:e.length===0?n:"",style:{flex:"1",minWidth:"120px",border:"none",outline:"none",fontSize:"0.875rem",padding:"2px"}})]}),l&&o.length>0&&a.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:"2px",maxHeight:"200px",overflowY:"auto",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:1e3},children:o.map((m,x)=>a.jsxs("div",{onClick:()=>v(m.name),style:{padding:"8px 12px",cursor:"pointer",backgroundColor:x===c?"#EFF6FF":"white",display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:()=>f(x),children:[a.jsx("span",{style:{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:m.color||"#6B7280"}}),a.jsx("span",{style:{fontSize:"0.875rem"},children:m.name})]},m.name))}),l&&r&&o.length===0&&a.jsxs("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:"2px",padding:"8px 12px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:1e3,fontSize:"0.875rem",color:"#6B7280"},children:['Press Tab or Enter to create "',r,'"']})]})};function L1({key:e,defaultValue:t,debounceMs:n=500}){const[r,i]=k.useState(()=>{try{const l=localStorage.getItem(e);if(l)return JSON.parse(l)}catch(l){console.error("Error loading draft from localStorage:",l)}return t}),o=k.useRef(void 0);return k.useEffect(()=>(o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{try{localStorage.setItem(e,JSON.stringify(r))}catch(l){console.error("Error saving draft to localStorage:",l)}},n),()=>{o.current&&clearTimeout(o.current)}),[r,e,n]),[r,i,()=>{try{localStorage.removeItem(e),i(t)}catch(l){console.error("Error clearing draft from localStorage:",l)}}]}const O1={name:"",description:"",assignee:"",sessionId:"",tagNames:[],dependsOnIds:[]};function F1({onClose:e}){const{toasts:t,showToast:n,removeToast:r}=Ng(),[i,o,s]=L1({key:"create-task-draft",defaultValue:O1}),[l,u]=k.useState(!1),{name:c,description:f,assignee:d,sessionId:h,tagNames:p,dependsOnIds:g}=i,v=(y,m)=>{o({...i,[y]:m})};k.useEffect(()=>{const y=m=>{m.key==="Escape"&&e()};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[e]);const S=async y=>{var m;y.preventDefault(),u(!0);try{await Lt.tasksControllerCreateTask({name:c,description:f,...d&&{assignee:d},...h&&{sessionId:h},...p.length>0&&{tagNames:p},...g.length>0&&{dependsOnIds:g}}),s(),e()}catch(x){const T=((m=x==null?void 0:x.body)==null?void 0:m.detail)||(x==null?void 0:x.message)||"Failed to create task";n(`Error: ${T}`,"error"),console.error(x)}finally{u(!1)}};return a.jsx("div",{className:"modal-overlay",onClick:e,children:a.jsxs("div",{className:"modal-content",onClick:y=>y.stopPropagation(),children:[a.jsxs("div",{className:"modal-header",children:[a.jsx("h2",{children:"Create New Task"}),a.jsx("button",{onClick:e,className:"btn-close",children:"×"})]}),a.jsxs("form",{onSubmit:S,children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"name",children:"Title *"}),a.jsx("input",{id:"name",type:"text",value:c,onChange:y=>v("name",y.target.value),required:!0,placeholder:"Enter task name"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"description",children:"Description *"}),a.jsx("textarea",{id:"description",value:f,onChange:y=>v("description",y.target.value),required:!0,placeholder:"Enter task description",rows:4})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"assignee",children:"Assigned to"}),a.jsx("input",{id:"assignee",type:"text",value:d,onChange:y=>v("assignee",y.target.value),placeholder:"Agent name or assignee"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"sessionId",children:"Session ID"}),a.jsx("input",{id:"sessionId",type:"text",value:h,onChange:y=>v("sessionId",y.target.value),placeholder:"Agent session ID"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"tags",children:"Tags"}),a.jsx(Ic,{value:p,onChange:y=>v("tagNames",y),placeholder:"Type to add tags..."})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"dependsOn",children:"Depends On (Task IDs)"}),a.jsx("input",{id:"dependsOn",type:"text",value:g.join(", "),onChange:y=>v("dependsOnIds",y.target.value.split(",").map(m=>m.trim()).filter(m=>m)),placeholder:"Enter task IDs separated by commas"})]}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:e,className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",disabled:l,children:l?"Creating...":"Create Task"})]})]}),t.map(y=>a.jsx(Tg,{message:y.message,type:y.type,onClose:()=>r(y.id)},y.id))]})})}const re=su.status;function jg({task:e,onClose:t,onUpdate:n}){var R,b,P,q;const[r,i]=k.useState(e.description),[o,s]=k.useState((R=e.assigneeActor)==null?void 0:R.id),[l,u]=k.useState(e.sessionId||""),[c,f]=k.useState(((b=e.tags)==null?void 0:b.map(V=>V.name))||[]),[d,h]=k.useState(""),[p,g]=k.useState(""),[v,S]=k.useState(!1),[y,m]=k.useState("");k.useEffect(()=>{const V=H=>{H.key==="Escape"&&t()};return document.addEventListener("keydown",V),()=>{document.removeEventListener("keydown",V)}},[t]);const x=async()=>{var V;if(r!==e.description)try{const H=await Lt.tasksControllerUpdateTask(e.id,{description:r});n(H),m("")}catch(H){console.error("Failed to update task:",H);const G=((V=H==null?void 0:H.body)==null?void 0:V.detail)||(H==null?void 0:H.message)||"Failed to update description";m(G)}},T=async()=>{console.log("NOT IMPLEMENTED - ASSIGNEE STRUCTURE CHANGED")},j=async()=>{var V;if(d.trim())try{await Lt.tasksControllerAddComment(e.id,{content:d});const H=await Lt.tasksControllerGetTask(e.id);n(H),h(""),m("")}catch(H){console.error("Failed to add comment:",H);const G=((V=H==null?void 0:H.body)==null?void 0:V.detail)||(H==null?void 0:H.message)||"Failed to add comment";m(G)}},E=async V=>{var H;try{const G={status:V};V===re.DONE&&p.trim()&&(G.comment=p);const O=await Lt.tasksControllerChangeStatus(e.id,G);n(O),g(""),m("")}catch(G){console.error("Failed to change status:",G);const O=((H=G==null?void 0:G.body)==null?void 0:H.detail)||(G==null?void 0:G.message)||"Failed to change status";m(O)}},_=async()=>{var V;try{await Lt.tasksControllerDeleteTask(e.id),t()}catch(H){console.error("Failed to delete task:",H);const G=((V=H==null?void 0:H.body)==null?void 0:V.detail)||(H==null?void 0:H.message)||"Failed to delete task";m(G)}},D=async V=>{var H,G;f(V);try{const O=await Lt.tasksControllerUpdateTask(e.id,{tagNames:V});n(O),m("")}catch(O){console.error("Failed to update tags:",O);const L=((H=O==null?void 0:O.body)==null?void 0:H.detail)||(O==null?void 0:O.message)||"Failed to update tags";m(L),f(((G=e.tags)==null?void 0:G.map(C=>C.name))||[])}};return a.jsx("div",{className:"modal-overlay",onClick:t,children:a.jsxs("div",{className:"modal-content task-detail",onClick:V=>V.stopPropagation(),children:[a.jsxs("div",{className:"modal-header",children:[a.jsx("h2",{children:e.name}),a.jsx("button",{onClick:t,className:"btn-close",children:"×"})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h3",{children:"Description"}),a.jsx("textarea",{value:r,onChange:V=>i(V.target.value),onBlur:x,placeholder:"Enter task description...",className:"description-textarea"})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h3",{children:"Status"}),y&&a.jsxs("div",{className:"error-message",children:[a.jsx("strong",{children:"Error:"})," ",y]}),a.jsxs("div",{className:"status-buttons",children:[a.jsx("button",{onClick:()=>E(re.NOT_STARTED),className:`status-btn ${e.status===re.NOT_STARTED?"active status-not-started":""}`,children:"Not Started"}),a.jsx("button",{onClick:()=>E(re.IN_PROGRESS),className:`status-btn ${e.status===re.IN_PROGRESS?"active status-in-progress":""}`,children:"In Progress"}),a.jsx("button",{onClick:()=>E(re.FOR_REVIEW),className:`status-btn ${e.status===re.FOR_REVIEW?"active status-for-review":""}`,children:"For Review"}),a.jsx("button",{onClick:()=>E(re.DONE),className:`status-btn ${e.status===re.DONE?"active status-done":""}`,children:"Done"})]})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h3",{children:"Assignee & Session"}),a.jsxs("div",{className:"assignee-form",children:[a.jsxs("div",{className:"form-row",children:[a.jsxs("div",{className:"form-field",children:[a.jsx("label",{children:"Assignee"}),a.jsx("input",{type:"text",value:e.assignee?`@${e.assignee.slug}`:"@",onChange:V=>s(V.target.value),placeholder:"Enter assignee name"})]}),a.jsxs("div",{className:"form-field",children:[a.jsx("label",{children:"Session ID"}),a.jsx("input",{type:"text",value:l,onChange:V=>u(V.target.value),placeholder:"Enter session ID"})]})]}),a.jsx("button",{onClick:T,className:"btn-primary",children:"Update Assignment"})]})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h3",{children:"Tags"}),a.jsx(Ic,{value:c,onChange:D,placeholder:"Type to add tags..."})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h3",{children:"Task Info"}),a.jsxs("div",{className:"task-info-grid",children:[a.jsxs("div",{className:"info-item",children:[a.jsx("label",{children:"Created By"}),a.jsxs("span",{children:["@",e.createdByActor.slug]})]}),e.dependsOnIds&&e.dependsOnIds.length>0&&a.jsxs("div",{className:"info-item",children:[a.jsx("label",{children:"Depends On"}),a.jsx("div",{className:"dependency-list",children:e.dependsOnIds.map(V=>a.jsx("span",{className:"dependency-id",children:V},V))})]})]})]}),a.jsxs("div",{className:"detail-section",children:[a.jsxs("h3",{children:["Comments (",((P=e.comments)==null?void 0:P.length)||0,")"]}),a.jsx("div",{className:"comments-list",children:(q=e.comments)==null?void 0:q.map(V=>a.jsxs("div",{className:"comment",children:[a.jsx("strong",{children:V.commenterName}),a.jsx("p",{children:V.content}),a.jsx("span",{className:"comment-date",children:new Date(V.createdAt).toLocaleString()})]},V.id))}),a.jsxs("div",{className:"add-comment",children:[a.jsx("textarea",{placeholder:"Add a comment...",value:d,onChange:V=>h(V.target.value),rows:3}),a.jsx("button",{onClick:j,className:"btn-primary",children:"Add Comment"})]})]}),a.jsx("div",{className:"detail-section",children:a.jsxs("div",{className:"task-actions",children:[e.status===re.FOR_REVIEW&&a.jsxs("div",{className:"review-shortcuts",children:[a.jsx("button",{onClick:()=>E(re.DONE),className:"btn-review-done",children:"✓ Done"}),a.jsx("button",{onClick:()=>E(re.IN_PROGRESS),className:"btn-review-needs-work",children:"← Needs work"})]}),v?a.jsxs("div",{className:"delete-confirm",children:[a.jsx("button",{onClick:_,className:"btn-danger",children:"Confirm Delete"}),a.jsx("button",{onClick:()=>S(!1),className:"btn-secondary",children:"Cancel"})]}):a.jsx("button",{onClick:()=>S(!0),className:"btn-danger",children:"Delete Task"})]})})]})})}function no(){return a.jsx(ar,{to:"/",className:"home-link",title:"Back to Home",children:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),a.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]})})}const Jt=Object.create(null);Jt.open="0";Jt.close="1";Jt.ping="2";Jt.pong="3";Jt.message="4";Jt.upgrade="5";Jt.noop="6";const os=Object.create(null);Object.keys(Jt).forEach(e=>{os[Jt[e]]=e});const lu={type:"error",data:"parser error"},_g=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ig=typeof ArrayBuffer=="function",Ag=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Ac=({type:e,data:t},n,r)=>_g&&t instanceof Blob?n?r(t):zf(t,r):Ig&&(t instanceof ArrayBuffer||Ag(t))?n?r(t):zf(new Blob([t]),r):r(Jt[e]+(t||"")),zf=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Mf(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ql;function z1(e,t){if(_g&&e.data instanceof Blob)return e.data.arrayBuffer().then(Mf).then(t);if(Ig&&(e.data instanceof ArrayBuffer||Ag(e.data)))return t(Mf(e.data));Ac(e,!1,n=>{ql||(ql=new TextEncoder),t(ql.encode(n))})}const Bf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Si=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Bf.length;e++)Si[Bf.charCodeAt(e)]=e;const M1=e=>{let t=e.length*.75,n=e.length,r,i=0,o,s,l,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),f=new Uint8Array(c);for(r=0;r<n;r+=4)o=Si[e.charCodeAt(r)],s=Si[e.charCodeAt(r+1)],l=Si[e.charCodeAt(r+2)],u=Si[e.charCodeAt(r+3)],f[i++]=o<<2|s>>4,f[i++]=(s&15)<<4|l>>2,f[i++]=(l&3)<<6|u&63;return c},B1=typeof ArrayBuffer=="function",Rc=(e,t)=>{if(typeof e!="string")return{type:"message",data:Rg(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:U1(e.substring(1),t)}:os[n]?e.length>1?{type:os[n],data:e.substring(1)}:{type:os[n]}:lu},U1=(e,t)=>{if(B1){const n=M1(e);return Rg(n,t)}else return{base64:!0,data:e}},Rg=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Pg="",$1=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{Ac(o,!1,l=>{r[s]=l,++i===n&&t(r.join(Pg))})})},H1=(e,t)=>{const n=e.split(Pg),r=[];for(let i=0;i<n.length;i++){const o=Rc(n[i],t);if(r.push(o),o.type==="error")break}return r};function W1(){return new TransformStream({transform(e,t){z1(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let Gl;function zo(e){return e.reduce((t,n)=>t+n.length,0)}function Mo(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function V1(e,t){Gl||(Gl=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(s,l){for(n.push(s);;){if(r===0){if(zo(n)<1)break;const u=Mo(n,1);o=(u[0]&128)===128,i=u[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(zo(n)<2)break;const u=Mo(n,2);i=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),r=3}else if(r===2){if(zo(n)<8)break;const u=Mo(n,8),c=new DataView(u.buffer,u.byteOffset,u.length),f=c.getUint32(0);if(f>Math.pow(2,21)-1){l.enqueue(lu);break}i=f*Math.pow(2,32)+c.getUint32(4),r=3}else{if(zo(n)<i)break;const u=Mo(n,i);l.enqueue(Rc(o?u:Gl.decode(u),t)),r=0}if(i===0||i>e){l.enqueue(lu);break}}}})}const Dg=4;function Ne(e){if(e)return q1(e)}function q1(e){for(var t in Ne.prototype)e[t]=Ne.prototype[t];return e}Ne.prototype.on=Ne.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ne.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ne.prototype.off=Ne.prototype.removeListener=Ne.prototype.removeAllListeners=Ne.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Ne.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};Ne.prototype.emitReserved=Ne.prototype.emit;Ne.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ne.prototype.hasListeners=function(e){return!!this.listeners(e).length};const il=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),vt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),G1="arraybuffer";function Lg(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const K1=vt.setTimeout,Q1=vt.clearTimeout;function ol(e,t){t.useNativeTimers?(e.setTimeoutFn=K1.bind(vt),e.clearTimeoutFn=Q1.bind(vt)):(e.setTimeoutFn=vt.setTimeout.bind(vt),e.clearTimeoutFn=vt.clearTimeout.bind(vt))}const Y1=1.33;function X1(e){return typeof e=="string"?J1(e):Math.ceil((e.byteLength||e.size)*Y1)}function J1(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Og(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Z1(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function e0(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}class t0 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Pc extends Ne{constructor(t){super(),this.writable=!1,ol(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new t0(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Rc(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Z1(t);return n.length?"?"+n:""}}class n0 extends Pc{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};H1(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,$1(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Og()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Fg=!1;try{Fg=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const r0=Fg;function i0(){}class o0 extends n0{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Xt extends Ne{constructor(t,n,r){super(),this.createRequest=t,ol(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=Lg(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Xt.requestsCount++,Xt.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=i0,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Xt.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Xt.requestsCount=0;Xt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Uf);else if(typeof addEventListener=="function"){const e="onpagehide"in vt?"pagehide":"unload";addEventListener(e,Uf,!1)}}function Uf(){for(let e in Xt.requests)Xt.requests.hasOwnProperty(e)&&Xt.requests[e].abort()}const s0=function(){const e=zg({xdomain:!1});return e&&e.responseType!==null}();class l0 extends o0{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=s0&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Xt(zg,this.uri(),t)}}function zg(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||r0))return new XMLHttpRequest}catch{}if(!t)try{return new vt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Mg=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class a0 extends Pc{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Mg?{}:Lg(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;Ac(r,this.supportsBinary,o=>{try{this.doWrite(r,o)}catch{}i&&il(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Og()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Kl=vt.WebSocket||vt.MozWebSocket;class u0 extends a0{createSocket(t,n,r){return Mg?new Kl(t,n,r):n?new Kl(t,n):new Kl(t)}doWrite(t,n){this.ws.send(n)}}class c0 extends Pc{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=V1(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=W1();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const o=()=>{r.read().then(({done:l,value:u})=>{l||(this.onPacket(u),o())}).catch(l=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&il(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const d0={websocket:u0,webtransport:c0,polling:l0},f0=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,h0=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function au(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=f0.exec(e||""),o={},s=14;for(;s--;)o[h0[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=p0(o,o.path),o.queryKey=m0(o,o.query),o}function p0(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function m0(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}const uu=typeof addEventListener=="function"&&typeof removeEventListener=="function",ss=[];uu&&addEventListener("offline",()=>{ss.forEach(e=>e())},!1);class zn extends Ne{constructor(t,n){if(super(),this.binaryType=G1,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=au(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=au(n.host).host);ol(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=e0(this.opts.query)),uu&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ss.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Dg,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&zn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",zn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=X1(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,il(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(zn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),uu&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=ss.indexOf(this._offlineEventListener);r!==-1&&ss.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}zn.protocol=Dg;class g0 extends zn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;zn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;zn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=n.name,this.emitReserved("upgradeError",h)}}))};function o(){r||(r=!0,f(),n.close(),n=null)}const s=d=>{const h=new Error("probe error: "+d);h.transport=n.name,o(),this.emitReserved("upgradeError",h)};function l(){s("transport closed")}function u(){s("socket closed")}function c(d){n&&d.name!==n.name&&o()}const f=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",l),this.off("close",u),this.off("upgrading",c)};n.once("open",i),n.once("error",s),n.once("close",l),this.once("close",u),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let y0=class extends g0{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>d0[i]).filter(i=>!!i)),super(t,r)}};function x0(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=au(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const v0=typeof ArrayBuffer=="function",k0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Bg=Object.prototype.toString,w0=typeof Blob=="function"||typeof Blob<"u"&&Bg.call(Blob)==="[object BlobConstructor]",S0=typeof File=="function"||typeof File<"u"&&Bg.call(File)==="[object FileConstructor]";function Dc(e){return v0&&(e instanceof ArrayBuffer||k0(e))||w0&&e instanceof Blob||S0&&e instanceof File}function ls(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(ls(e[n]))return!0;return!1}if(Dc(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return ls(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ls(e[n]))return!0;return!1}function C0(e){const t=[],n=e.data,r=e;return r.data=cu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function cu(e,t){if(!e)return e;if(Dc(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=cu(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=cu(e[r],t));return n}return e}function E0(e,t){return e.data=du(e.data,t),delete e.attachments,e}function du(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=du(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=du(e[n],t));return e}const b0=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],N0=5;var ne;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(ne||(ne={}));class T0{constructor(t){this.replacer=t}encode(t){return(t.type===ne.EVENT||t.type===ne.ACK)&&ls(t)?this.encodeAsBinary({type:t.type===ne.EVENT?ne.BINARY_EVENT:ne.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===ne.BINARY_EVENT||t.type===ne.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=C0(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function $f(e){return Object.prototype.toString.call(e)==="[object Object]"}class Lc extends Ne{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===ne.BINARY_EVENT;r||n.type===ne.BINARY_ACK?(n.type=r?ne.EVENT:ne.ACK,this.reconstructor=new j0(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Dc(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(ne[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ne.BINARY_EVENT||r.type===ne.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const s=t.substring(o,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(Lc.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case ne.CONNECT:return $f(n);case ne.DISCONNECT:return n===void 0;case ne.CONNECT_ERROR:return typeof n=="string"||$f(n);case ne.EVENT:case ne.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&b0.indexOf(n[0])===-1);case ne.ACK:case ne.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class j0{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=E0(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const _0=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Lc,Encoder:T0,get PacketType(){return ne},protocol:N0},Symbol.toStringTag,{value:"Module"}));function Pt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const I0=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Ug extends Ne{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Pt(t,"open",this.onopen.bind(this)),Pt(t,"packet",this.onpacket.bind(this)),Pt(t,"error",this.onerror.bind(this)),Pt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,o;if(I0.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const s={type:ne.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,d=n.pop();this._registerAckCallback(f,d),s.id=f}const l=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,u=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!l||(u?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},i),s=(...l)=>{this.io.clearTimeoutFn(o),n.apply(this,l)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((r,i)=>{const o=(s,l)=>s?i(s):r(l);o.withError=!0,n.push(o),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>(this._queue[0],i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:ne.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case ne.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ne.EVENT:case ne.BINARY_EVENT:this.onevent(t);break;case ne.ACK:case ne.BINARY_ACK:this.onack(t);break;case ne.DISCONNECT:this.ondisconnect();break;case ne.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:ne.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ne.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function ei(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}ei.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};ei.prototype.reset=function(){this.attempts=0};ei.prototype.setMin=function(e){this.ms=e};ei.prototype.setMax=function(e){this.max=e};ei.prototype.setJitter=function(e){this.jitter=e};class fu extends Ne{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,ol(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new ei({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||_0;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new y0(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Pt(n,"open",function(){r.onopen(),t&&t()}),o=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=Pt(n,"error",o);if(this._timeout!==!1){const l=this._timeout,u=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},l);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Pt(t,"ping",this.onping.bind(this)),Pt(t,"data",this.ondata.bind(this)),Pt(t,"error",this.onerror.bind(this)),Pt(t,"close",this.onclose.bind(this)),Pt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){il(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Ug(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const mi={};function Pi(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=x0(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=mi[i]&&o in mi[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let u;return l?u=new fu(r,t):(mi[i]||(mi[i]=new fu(r,t)),u=mi[i]),n.query&&!t.query&&(t.query=n.queryKey),u.socket(n.path,t)}Object.assign(Pi,{Manager:fu,Socket:Ug,io:Pi,connect:Pi});const A0=Cg("/tasks"),$g=()=>{const[e,t]=k.useState(!1),[n,r]=k.useState(null),[i,o]=k.useState([]),[s,l]=k.useState(null),[u,c]=k.useState(!1);k.useEffect(()=>(d(),h(),()=>{s&&s.disconnect()}),[]);const f=p=>[...p].sort((g,v)=>{const S=new Date(g.updatedAt).getTime();return new Date(v.updatedAt).getTime()-S}),d=async()=>{t(!0),r(null);try{const p=await Lt.tasksControllerListTasks();o(f(p.items))}catch(p){r(p instanceof Error?p.message:"Failed to load tasks")}finally{t(!1)}},h=()=>{const p=Pi(A0,{transports:["websocket","polling"],withCredentials:!0});return p.on("connect",()=>{console.log("Connected to websocket"),p.emit("tasks.subscribe",{},g=>{g.ok?(console.log(g),console.log("Subscribed to room:",g.room),c(!0)):(console.error("Failed to subscribe to room"),c(!1))}),d()}),p.on("disconnect",()=>{console.log("WebSocket disconnected"),c(!1)}),p.on("task.created",g=>{o(v=>v.some(S=>S.id===g.id)?v:f([g,...v]))}),p.on("task.updated",g=>{o(v=>f(v.map(S=>S.id===g.id?g:S)))}),p.on("task.deleted",({taskId:g})=>{o(v=>v.filter(S=>S.id!==g))}),p.on("task.assigned",g=>{o(v=>f(v.map(S=>S.id===g.id?g:S)))}),p.on("task.commented",async g=>{try{const v=await Lt.tasksControllerGetTask(g.taskId);o(S=>S.findIndex(m=>m.id===v.id)===-1?f([v,...S]):f(S.map(m=>m.id===v.id?v:m)))}catch(v){console.error("Failed to refresh task after comment",v)}}),p.on("input.request.answered",async g=>{try{const v=await Lt.tasksControllerGetTask(g.taskId);o(S=>S.findIndex(m=>m.id===v.id)===-1?f([v,...S]):f(S.map(m=>m.id===v.id?v:m)))}catch(v){console.error("Failed to refresh task after input request answer",v)}}),p.on("task.status_changed",g=>{o(v=>f(v.map(S=>S.id===g.id?g:S)))}),l(p),()=>{p.close()}};return{isLoading:e,error:n,tasks:i,isConnected:u}};function R0(){const{tasks:e,isConnected:t}=$g(),[n,r]=k.useState(null),[i,o]=k.useState(!1);pr("Tasks");const s={[re.NOT_STARTED]:e.filter(l=>l.status===re.NOT_STARTED),[re.IN_PROGRESS]:e.filter(l=>l.status===re.IN_PROGRESS),[re.FOR_REVIEW]:e.filter(l=>l.status===re.FOR_REVIEW),[re.DONE]:e.filter(l=>l.status===re.DONE)};return a.jsxs("div",{className:"task-board",children:[a.jsxs("div",{className:"task-board-header",children:[a.jsxs("div",{children:[a.jsx("h1",{children:"Tasks"}),a.jsx("p",{className:"subtitle",children:"Manage and track your tasks across different stages"})]}),a.jsxs("div",{className:"header-actions",children:[a.jsx(no,{}),a.jsx("span",{className:`status-indicator ${t?"connected":"disconnected"}`,children:t?"● Connected":"○ Disconnected"})]})]}),a.jsx("div",{className:"kanban-board",children:Object.entries(s).map(([l,u])=>a.jsxs("div",{className:`kanban-column column-${l.replace(" ","-")}`,children:[a.jsxs("div",{className:"column-header",children:[a.jsx("h2",{children:l.toUpperCase()}),a.jsx("span",{className:"task-count",children:u.length})]}),a.jsxs("div",{className:"column-content",children:[l===re.NOT_STARTED&&a.jsx("button",{onClick:()=>o(!0),className:"btn-add-task",children:"+ Add New Task"}),u.map(c=>a.jsx(D1,{task:c,onClick:()=>r(c)},c.id))]})]},l))}),i&&a.jsx(F1,{onClose:()=>o(!1)}),n&&a.jsx(jg,{task:n,onClose:()=>r(null),onUpdate:l=>r(l)})]})}function P0(){const[e,t]=k.useState(!1),n=pt(),r=()=>t(!e),i=()=>t(!1),o=[{name:"Home",path:"/",icon:a.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),a.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]}),color:"#8e8e93"},{name:"Tasks",path:"/tasks",icon:"📋",color:"#3b82f6"},{name:"Context",path:"/context",icon:"📚",color:"#10b981"},{name:"Tools",path:"/mcp-registry",icon:"🔧",color:"#8b5cf6"},{name:"Logout",path:"/logout",icon:"🔒"}];return a.jsxs(a.Fragment,{children:[a.jsx("button",{className:"hamburger-button",onClick:r,"aria-label":"Menu",children:a.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),a.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),a.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),e&&a.jsx("div",{className:"hamburger-overlay",onClick:i}),a.jsxs("div",{className:`hamburger-drawer ${e?"open":""}`,children:[a.jsxs("div",{className:"hamburger-header",children:[a.jsx("h2",{children:"Menu"}),a.jsx("button",{className:"hamburger-close",onClick:i,"aria-label":"Close menu",children:a.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),a.jsx("nav",{className:"hamburger-nav",children:o.map(s=>{const l=n.pathname===s.path||s.path!=="/"&&n.pathname.startsWith(s.path);return a.jsxs(ar,{to:s.path,className:`hamburger-nav-item ${l?"active":""}`,onClick:i,children:[a.jsx("div",{className:"hamburger-nav-icon",style:{color:s.color},children:typeof s.icon=="string"?a.jsx("span",{className:"hamburger-emoji",children:s.icon}):s.icon}),a.jsx("span",{className:"hamburger-nav-label",children:s.name}),l&&a.jsx("svg",{className:"hamburger-nav-check",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("polyline",{points:"20 6 9 17 4 12"})})]},s.path)})})]})]})}const D0=[re.NOT_STARTED,re.IN_PROGRESS,re.FOR_REVIEW,re.DONE],Bo={[re.NOT_STARTED]:{label:"Queued",icon:"○",sublabel:"Ideas + intake"},[re.IN_PROGRESS]:{label:"Building",icon:"▣",sublabel:"Actively running"},[re.FOR_REVIEW]:{label:"Review",icon:"◆",sublabel:"Needs eyeballs"},[re.DONE]:{label:"Shipped",icon:"▴",sublabel:"Mission complete"}};function L0(){const{tasks:e,isConnected:t}=$g(),[n,r]=k.useState(null),[i,o]=k.useState(!1),[s,l]=k.useState(re.NOT_STARTED);pr("Tasks");const u=k.useMemo(()=>e.reduce((d,h)=>(d[h.status]=d[h.status]?[...d[h.status],h]:[h],d),{[re.NOT_STARTED]:[],[re.IN_PROGRESS]:[],[re.FOR_REVIEW]:[],[re.DONE]:[]}),[e]),c=u[s]??[],f=d=>{const h=new Date(d),g=Math.round((new Date().getTime()-h.getTime())/(1e3*60));if(g<60)return`${Math.max(g,1)}m ago`;const v=Math.round(g/60);return v<24?`${v}h ago`:h.toLocaleDateString("en-US",{month:"short",day:"numeric"})};return a.jsxs("div",{className:"task-board-mobile",children:[a.jsxs("div",{className:"matrix-frame",children:[a.jsxs("header",{className:"matrix-header",children:[a.jsx(P0,{}),a.jsx("div",{className:"matrix-header-copy",children:a.jsx("h1",{children:"Tasks"})}),a.jsxs("div",{className:"matrix-connection",children:[a.jsx("span",{className:`matrix-connection-dot ${t?"online":"offline"}`,"aria-hidden":!0}),a.jsx("span",{children:t?"":"offline"})]})]}),a.jsxs("section",{className:"matrix-status-panel",children:[a.jsxs("div",{children:[a.jsx("h2",{children:Bo[s].label}),a.jsx("p",{className:"matrix-status-sub",children:Bo[s].sublabel})]}),a.jsxs("div",{className:"matrix-status-count",children:[a.jsx("span",{className:"matrix-count-number",children:c.length}),a.jsx("span",{className:"matrix-count-text",children:"tasks"})]})]}),a.jsxs("section",{className:"matrix-task-feed",children:[c.length===0&&a.jsxs("div",{className:"matrix-empty-state",children:[a.jsx("p",{children:"No entries in this lane."}),s===re.NOT_STARTED&&a.jsx("button",{type:"button",className:"matrix-link",onClick:()=>o(!0),children:"create the first task"})]}),c.map(d=>a.jsxs("article",{className:"matrix-task-card",onClick:()=>r(d),children:[a.jsxs("div",{className:"matrix-task-meta-row",children:[a.jsxs("span",{className:"matrix-task-id",children:["#",d.id.slice(0,6).toUpperCase()]}),a.jsx("span",{className:"matrix-task-updated",children:f(d.updatedAt)})]}),a.jsx("h3",{children:d.name}),a.jsx("p",{children:d.description}),d.tags&&d.tags.length>0&&a.jsx("div",{className:"matrix-task-tags",children:d.tags.map(h=>a.jsx(bg,{tag:h,small:!0},h.name))}),a.jsxs("div",{className:"matrix-task-footer",children:[a.jsx("span",{children:d.assignee?`Assigned: ${d.assignee}`:"Unassigned"}),d.comments&&d.comments.length>0&&a.jsxs("span",{children:["💬 ",d.comments.length]})]})]},d.id))]})]}),a.jsx("nav",{className:"matrix-bottom-nav","aria-label":"Task status navigation",children:D0.map(d=>a.jsxs("button",{className:`matrix-nav-item ${d===s?"active":""}`,onClick:()=>l(d),type:"button",children:[a.jsx("span",{className:"matrix-nav-icon",children:Bo[d].icon}),a.jsx("span",{className:"matrix-nav-label",children:Bo[d].label}),a.jsx("span",{className:"matrix-nav-count",children:u[d].length})]},d))}),a.jsx("button",{type:"button",className:"matrix-fab",onClick:()=>o(!0),"aria-label":"Create task",children:"➕"}),n&&a.jsx(jg,{task:n,onClose:()=>r(null),onUpdate:d=>r(d)}),i&&a.jsx(O0,{onClose:()=>o(!1)})]})}function O0({onClose:e}){const{toasts:t,showToast:n,removeToast:r}=Ng(),[i,o]=k.useState(""),[s,l]=k.useState(""),[u,c]=k.useState(""),[f,d]=k.useState(""),[h,p]=k.useState([]),[g,v]=k.useState(""),[S,y]=k.useState(!1),m=async x=>{var T;if(x.preventDefault(),!i.trim()||!s.trim()){n("Name and description are required","error");return}y(!0);try{const j=g.split(",").map(E=>E.trim()).filter(Boolean);await Lt.tasksControllerCreateTask({name:i,description:s,...u&&{assignee:u},...f&&{sessionId:f},...h.length>0&&{tagNames:h},...j.length>0&&{dependsOnIds:j}}),e()}catch(j){const E=((T=j==null?void 0:j.body)==null?void 0:T.detail)||(j==null?void 0:j.message)||"Failed to create task";n(E,"error")}finally{y(!1)}};return a.jsx("div",{className:"mobile-create-overlay",onClick:e,children:a.jsxs("div",{className:"mobile-create-panel",onClick:x=>x.stopPropagation(),children:[a.jsxs("header",{className:"mobile-create-header",children:[a.jsxs("div",{children:[a.jsx("p",{className:"matrix-status-label",children:"New task payload"}),a.jsx("h2",{children:"Compose"})]}),a.jsx("button",{type:"button",className:"matrix-link",onClick:e,children:"close"})]}),a.jsxs("form",{className:"mobile-create-form",onSubmit:m,children:[a.jsxs("label",{children:[a.jsx("span",{children:"Title *"}),a.jsx("input",{type:"text",value:i,onChange:x=>o(x.target.value),placeholder:"Ship a feature",required:!0})]}),a.jsxs("label",{children:[a.jsx("span",{children:"Description *"}),a.jsx("textarea",{value:s,onChange:x=>l(x.target.value),placeholder:"Outline what needs to happen",rows:4,required:!0})]}),a.jsxs("label",{children:[a.jsx("span",{children:"Assignee"}),a.jsx("input",{type:"text",value:u,onChange:x=>c(x.target.value),placeholder:"agent or human"})]}),a.jsxs("label",{children:[a.jsx("span",{children:"Session ID"}),a.jsx("input",{type:"text",value:f,onChange:x=>d(x.target.value),placeholder:"link a running session"})]}),a.jsxs("div",{className:"mobile-form-control",children:[a.jsx("span",{children:"Tags"}),a.jsx(Ic,{value:h,onChange:p,placeholder:"ops, agents, ui"})]}),a.jsxs("label",{children:[a.jsx("span",{children:"Depends on task IDs"}),a.jsx("input",{type:"text",value:g,onChange:x=>v(x.target.value),placeholder:"comma separated"})]}),a.jsx("button",{type:"submit",className:"matrix-submit",disabled:S,children:S?"Transmitting…":"Create Task"})]}),t.map(x=>a.jsx(Tg,{message:x.message,type:x.type,onClose:()=>r(x.id)},x.id))]})})}function Hg(e,t){return t?e.id===t?!0:e.children?e.children.some(n=>Hg(n,t)):!1:!1}const F0=k.memo(function e({page:t,level:n,isActive:r,currentPageId:i,onPageClick:o,onAddChild:s}){const l=t.children&&t.children.length>0,u=l&&Hg(t,i),[c,f]=k.useState(u);k.useEffect(()=>{u&&f(!0)},[u]);const d=v=>{v.stopPropagation(),f(!c)},h=v=>{v.preventDefault(),o(t.id)},p=v=>{v.preventDefault(),v.stopPropagation(),s(t.id)},g=k.useMemo(()=>l?[...t.children].sort((v,S)=>v.order-S.order):[],[l,t.children]);return a.jsxs("div",{className:"page-tree-item",children:[a.jsxs("div",{className:`tree-item-content ${r?"active":""}`,style:{paddingLeft:`${n*20}px`},children:[l?a.jsx("button",{className:"tree-toggle",onClick:d,"aria-label":c?"Collapse":"Expand","aria-expanded":c,children:c?"▼":"▶"}):a.jsx("span",{className:"tree-spacer"}),a.jsx("a",{href:"#",className:"tree-item-link",onClick:h,"aria-current":r?"page":void 0,children:t.title}),a.jsx("button",{className:"tree-item-add-child",onClick:p,"aria-label":`Add child page to ${t.title}`,title:"Add child page",children:"+"})]}),c&&l&&a.jsx("div",{className:"tree-item-children",children:g.map(v=>a.jsx(e,{page:v,level:n+1,isActive:v.id===i,currentPageId:i,onPageClick:o,onAddChild:s},v.id))})]})});function z0({pages:e,currentPageId:t,onPageClick:n}){const r=Oe(),i=k.useMemo(()=>[...e].sort((s,l)=>s.order-l.order),[e]),o=s=>{r(`/context/page/${s}/new`)};return a.jsx("div",{className:"page-tree",children:i.map(s=>a.jsx(F0,{page:s,level:0,isActive:s.id===t,currentPageId:t,onPageClick:n,onAddChild:o},s.id))})}M.BASE=hr;const M0=Cg("/context"),po=()=>{const[e,t]=k.useState([]),[n,r]=k.useState(null),[i,o]=k.useState(!1),[s,l]=k.useState(!1),[u,c]=k.useState(!1),[f,d]=k.useState(!1),[h,p]=k.useState(!1),[g,v]=k.useState(null),[S,y]=k.useState(null),[m,x]=k.useState(!1),T=k.useCallback(async()=>{o(!0),v(null);try{const O=await _t.contextControllerListBlocks();t(O.items)}catch(O){v(O instanceof Error?O.message:"Failed to load wiki pages")}finally{o(!1)}},[]),j=k.useCallback(async O=>{l(!0),v(null),r(null);try{const L=await _t.contextControllerGetBlock(O);r(L)}catch(L){v(L instanceof Error?L.message:"Failed to fetch wiki page")}finally{l(!1)}},[]),E=k.useCallback(async O=>{c(!0),v(null);try{const L=await _t.contextControllerCreateBlock(O);return t(C=>{const B=C.filter(w=>w.id!==L.id);return[{id:L.id,title:L.title,createdBy:L.createdBy,createdByActorId:L.createdByActorId,tags:L.tags,parentId:L.parentId,order:L.order,createdAt:L.createdAt,updatedAt:L.updatedAt},...B]}),r(L),L}catch(L){throw v(L instanceof Error?L.message:"Failed to create wiki page"),L}finally{c(!1)}},[]),_=k.useCallback(O=>{j(O)},[j]),D=k.useCallback(async(O,L)=>{d(!0),v(null);try{const C=await _t.contextControllerUpdateBlock(O,L);return t(B=>B.map(w=>w.id===O?{id:C.id,title:C.title,createdBy:C.createdBy,createdByActorId:C.createdByActorId,tags:C.tags,parentId:C.parentId,order:C.order,createdAt:C.createdAt,updatedAt:C.updatedAt}:w)),(n==null?void 0:n.id)===O&&r(C),C}catch(C){throw v(C instanceof Error?C.message:"Failed to update page"),C}finally{d(!1)}},[n]),R=k.useCallback(async O=>{p(!0),v(null);try{await _t.contextControllerDeleteBlock(O),t(L=>L.filter(C=>C.id!==O)),(n==null?void 0:n.id)===O&&r(null)}catch(L){throw v(L instanceof Error?L.message:"Failed to delete page"),L}finally{p(!1)}},[n]),b=k.useCallback(async(O,L)=>{d(!0),v(null);try{const C=await _t.contextControllerAppendToBlock(O,{content:L});return(n==null?void 0:n.id)===O&&r(C),C}catch(C){throw v(C instanceof Error?C.message:"Failed to append content"),C}finally{d(!1)}},[n]),P=k.useCallback(async(O,L)=>{v(null);try{const C=await _t.contextControllerAddTagToBlock(O,L);return t(B=>B.map(w=>w.id===O?{id:C.id,title:C.title,createdBy:C.createdBy,createdByActorId:C.createdByActorId,tags:C.tags,parentId:C.parentId,order:C.order,createdAt:C.createdAt,updatedAt:C.updatedAt}:w)),(n==null?void 0:n.id)===O&&r(C),C}catch(C){throw v(C instanceof Error?C.message:"Failed to add tag"),C}},[n]),q=k.useCallback(async(O,L)=>{v(null);try{const C=await _t.contextControllerRemoveTagFromBlock(O,L);return t(B=>B.map(w=>w.id===O?{id:C.id,title:C.title,createdBy:C.createdBy,createdByActorId:C.createdByActorId,tags:C.tags,parentId:C.parentId,order:C.order,createdAt:C.createdAt,updatedAt:C.updatedAt}:w)),(n==null?void 0:n.id)===O&&r(C),C}catch(C){throw v(C instanceof Error?C.message:"Failed to remove tag"),C}},[n]),V=k.useCallback(async()=>{v(null);try{return await _t.contextControllerGetBlockTree()}catch(O){throw v(O instanceof Error?O.message:"Failed to fetch page tree"),O}},[]),H=k.useCallback(async(O,L)=>{v(null);try{const C=await _t.contextControllerReorderBlock(O,{newOrder:L});return t(B=>B.map(w=>w.id===O?{id:C.id,title:C.title,createdBy:C.createdBy,createdByActorId:C.createdByActorId,tags:C.tags,parentId:C.parentId,order:C.order,createdAt:C.createdAt,updatedAt:C.updatedAt}:w)),(n==null?void 0:n.id)===O&&r(C),C}catch(C){throw v(C instanceof Error?C.message:"Failed to reorder page"),C}},[n]),G=k.useCallback(async(O,L)=>{v(null);try{const C=await _t.contextControllerMoveBlock(O,{newParentId:L});return t(B=>B.map(w=>w.id===O?{id:C.id,title:C.title,createdBy:C.createdBy,createdByActorId:C.createdByActorId,tags:C.tags,parentId:C.parentId,order:C.order,createdAt:C.createdAt,updatedAt:C.updatedAt}:w)),(n==null?void 0:n.id)===O&&r(C),C}catch(C){throw v(C instanceof Error?C.message:"Failed to move page"),C}},[n]);return k.useEffect(()=>{const O=Pi(M0,{transports:["websocket","polling"],withCredentials:!0});return O.on("connect",()=>{console.log("Connected to Context websocket"),O.emit("context.subscribe",{},L=>{L.ok?(console.log(L),console.log("Subscribed to room:",L.room),x(!0)):(console.error("Failed to subscribe to room"),x(!1))}),x(!0),T()}),O.on("disconnect",()=>{console.log("Context WebSocket disconnected"),x(!1)}),O.on("page.created",L=>{t(C=>C.some(B=>B.id===L.id)?C:[{id:L.id,title:L.title,createdBy:L.createdBy,createdByActorId:L.createdByActorId,tags:L.tags,parentId:L.parentId,order:L.order,createdAt:L.createdAt,updatedAt:L.updatedAt},...C])}),O.on("page.updated",L=>{t(C=>C.map(B=>B.id===L.id?{id:L.id,title:L.title,createdBy:L.createdBy,createdByActorId:L.createdByActorId,tags:L.tags,parentId:L.parentId,order:L.order,createdAt:L.createdAt,updatedAt:L.updatedAt}:B)),(n==null?void 0:n.id)===L.id&&r(L)}),O.on("page.deleted",({pageId:L})=>{t(C=>C.filter(B=>B.id!==L)),(n==null?void 0:n.id)===L&&r(null)}),y(O),()=>{O.disconnect()}},[T,n==null?void 0:n.id]),k.useEffect(()=>{T()},[T]),{pages:e,selectedPage:n,isLoadingList:i,isLoadingPage:s,isCreating:u,isUpdating:f,isDeleting:h,error:g,isConnected:m,socket:S,loadPages:T,createPage:E,selectPage:_,updatePage:D,appendToPage:b,deletePage:R,addTagToPage:P,removeTagFromPage:q,getPageTree:V,reorderPage:H,movePage:G}},Hf="context-sidebar-collapsed";function B0(){const{pageId:e}=fr(),t=Oe(),{getPageTree:n,isConnected:r,socket:i}=po(),[o,s]=k.useState([]),[l,u]=k.useState(!1),[c,f]=k.useState(()=>{const g=localStorage.getItem(Hf);return g!==null?g==="true":to()});k.useEffect(()=>{localStorage.setItem(Hf,String(c))},[c]);const d=k.useCallback(async()=>{u(!0);try{const g=await n();s(g)}catch(g){console.error("Failed to load page tree:",g)}finally{u(!1)}},[n]);k.useEffect(()=>{d()},[d]),k.useEffect(()=>{if(!i)return;const g=()=>{d()},v=()=>{d()},S=()=>{d()};return i.on("page.created",g),i.on("page.updated",v),i.on("page.deleted",S),()=>{i.off("page.created",g),i.off("page.updated",v),i.off("page.deleted",S)}},[i,d]);const h=k.useCallback(g=>{t(`/context/page/${g}`)},[t]),p=()=>{f(!c)};return a.jsxs("div",{className:"context-with-sidebar",children:[a.jsxs("aside",{className:`sidebar-app-specific ${c?"collapsed":""}`,children:[a.jsxs("nav",{className:"sidebar-content",children:[c&&a.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"8px"},children:a.jsx("span",{className:`context-status-dot ${r?"connected":"disconnected"}`,title:r?"WebSocket connected":"WebSocket disconnected","aria-label":r?"WebSocket connected":"WebSocket disconnected"})}),!c&&a.jsxs("div",{children:[a.jsxs("div",{className:"context-sidebar-header",children:[a.jsxs("h2",{className:"context-sidebar-title",children:["📚 Context",a.jsx("span",{className:`context-status-dot ${r?"connected":"disconnected"}`,title:r?"WebSocket connected":"WebSocket disconnected","aria-label":r?"WebSocket connected":"WebSocket disconnected"})]}),a.jsx("button",{className:"context-button primary context-sidebar-new-page",type:"button",onClick:()=>t("/context/new"),title:"Create new page",children:"+ New page"})]}),l&&a.jsx("div",{className:"context-status",children:"Loading pages…"}),o.length>0&&a.jsx(z0,{pages:o,currentPageId:e,onPageClick:h}),o.length===0&&!l&&a.jsx("div",{className:"context-empty-sidebar",children:a.jsx("span",{children:"No pages yet"})})]})]}),a.jsx("button",{className:"sidebar-toggle",onClick:p,"aria-label":c?"Expand sidebar":"Collapse sidebar",children:c?"→":"←"})]}),a.jsx("main",{className:"context-content",children:a.jsx(Ec,{})})]})}const Wg=({tag:e,onRemove:t,small:n=!1})=>{const r=e.color||"#6B7280";return a.jsxs("span",{className:`tag-badge ${n?"tag-badge-small":""}`,style:{backgroundColor:r,color:"#ffffff",padding:n?"1px 4px":"2px 6px",borderRadius:"3px",fontSize:n?"0.65rem":"0.7rem",fontWeight:"500",display:"inline-flex",alignItems:"center",gap:"2px",marginRight:"4px",marginBottom:"4px"},children:[e.name,t&&a.jsx("button",{onClick:i=>{i.stopPropagation(),t()},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:n?"0.75rem":"0.85rem",lineHeight:"1"},"aria-label":`Remove ${e.name} tag`,children:"×"})]})};function U0(){const e=Oe(),{pages:t,isLoadingList:n}=po();return n?a.jsx("div",{className:"context-welcome",children:a.jsx("p",{children:"Loading pages..."})}):t.length===0?a.jsxs("div",{className:"context-welcome",children:[a.jsx("h2",{children:"Context"}),a.jsx("br",{}),a.jsx("button",{className:"context-button primary",type:"button",onClick:()=>e("/context/new"),title:"Create new page",children:"+ New page"})]}):a.jsxs("div",{className:"context-content",style:{padding:"24px"},children:[a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"},children:[a.jsx("h2",{style:{margin:0},children:"All Pages"}),a.jsx("button",{className:"context-button primary",type:"button",onClick:()=>e("/context/new"),title:"Create new page",children:"+ New page"})]}),a.jsx("div",{className:"context-grid",children:t.map(r=>a.jsxs("div",{className:"context-card",onClick:()=>e(`/context/page/${r.id}`),style:{cursor:"pointer"},children:[a.jsx("h3",{children:r.title}),r.tags&&r.tags.length>0&&a.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:r.tags.map(i=>a.jsx(Wg,{tag:i},i.name))}),a.jsxs("div",{className:"context-card-meta",children:[a.jsxs("span",{children:["By ",r.createdBy||"unknown"]}),a.jsxs("span",{children:["Created ",new Date(r.createdAt).toLocaleDateString()]}),r.updatedAt!==r.createdAt&&a.jsxs("span",{children:["Updated ",new Date(r.updatedAt).toLocaleDateString()]})]})]},r.id))})]})}const $0=({value:e,onChange:t,placeholder:n="Type to add tags..."})=>{const[r,i]=k.useState(""),[o,s]=k.useState([]),[l,u]=k.useState(!1),[c,f]=k.useState(-1),[d,h]=k.useState([]),p=k.useRef(null),g=k.useRef(null);k.useEffect(()=>{(async()=>{try{const x=await wg.metaControllerGetAllTags();h(x)}catch(x){console.error("Failed to load tags:",x)}})()},[]),k.useEffect(()=>{const x=setTimeout(()=>{if(r.trim().length>0){const T=r.trim().toLowerCase(),j=d.filter(E=>E.name.toLowerCase().includes(T)&&!e.includes(E.name));s(j),u(!0)}else s([]),u(!1)},150);return()=>clearTimeout(x)},[r,e,d]),k.useEffect(()=>{const m=x=>{g.current&&!g.current.contains(x.target)&&u(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);const v=m=>{var T;const x=m.trim();x&&!e.includes(x)&&t([...e,x]),i(""),s([]),u(!1),f(-1),(T=p.current)==null||T.focus()},S=m=>{t(e.filter(x=>x!==m))},y=m=>{m.key==="Tab"&&r.trim()||m.key==="Enter"&&r.trim()?(m.preventDefault(),c>=0&&o[c]?v(o[c].name):v(r)):m.key==="ArrowDown"?(m.preventDefault(),f(x=>x<o.length-1?x+1:x)):m.key==="ArrowUp"?(m.preventDefault(),f(x=>x>0?x-1:-1)):m.key==="Escape"?(u(!1),f(-1)):m.key==="Backspace"&&!r&&e.length>0&&t(e.slice(0,-1))};return a.jsxs("div",{ref:g,style:{position:"relative"},children:[a.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",padding:"6px",border:"1px solid #ddd",borderRadius:"4px",minHeight:"38px",cursor:"text"},onClick:()=>{var m;return(m=p.current)==null?void 0:m.focus()},children:[e.map(m=>{const x=d.find(j=>j.name===m),T=(x==null?void 0:x.color)||"#3B82F6";return a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"2px",backgroundColor:T,color:"white",padding:"2px 6px",borderRadius:"3px",fontSize:"0.7rem",fontWeight:"500"},children:[m,a.jsx("button",{type:"button",onClick:j=>{j.stopPropagation(),S(m)},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:"0.85rem",lineHeight:"1"},children:"×"})]},m)}),a.jsx("input",{ref:p,type:"text",value:r,onChange:m=>i(m.target.value),onKeyDown:y,onFocus:()=>r&&u(!0),placeholder:e.length===0?n:"",style:{flex:"1",minWidth:"120px",border:"none",outline:"none",fontSize:"0.875rem",padding:"2px"}})]}),l&&o.length>0&&a.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:"2px",maxHeight:"200px",overflowY:"auto",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:1e3},children:o.map((m,x)=>a.jsxs("div",{onClick:()=>v(m.name),style:{padding:"8px 12px",cursor:"pointer",backgroundColor:x===c?"#EFF6FF":"white",display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:()=>f(x),children:[a.jsx("span",{style:{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:m.color||"#6B7280"}}),a.jsx("span",{style:{fontSize:"0.875rem"},children:m.name})]},m.name))}),l&&r&&o.length===0&&a.jsxs("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:"2px",padding:"8px 12px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:1e3,fontSize:"0.875rem",color:"#6B7280"},children:['Press Tab or Enter to create "',r,'"']})]})};function H0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const W0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,V0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,q0={};function Wf(e,t){return(q0.jsx?V0:W0).test(e)}const G0=/[ \t\n\f\r]/g;function K0(e){return typeof e=="object"?e.type==="text"?Vf(e.value):!1:Vf(e)}function Vf(e){return e.replace(G0,"")===""}class mo{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}mo.prototype.normal={};mo.prototype.property={};mo.prototype.space=void 0;function Vg(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new mo(n,r,t)}function hu(e){return e.toLowerCase()}class tt{constructor(t,n){this.attribute=n,this.property=t}}tt.prototype.attribute="";tt.prototype.booleanish=!1;tt.prototype.boolean=!1;tt.prototype.commaOrSpaceSeparated=!1;tt.prototype.commaSeparated=!1;tt.prototype.defined=!1;tt.prototype.mustUseProperty=!1;tt.prototype.number=!1;tt.prototype.overloadedBoolean=!1;tt.prototype.property="";tt.prototype.spaceSeparated=!1;tt.prototype.space=void 0;let Q0=0;const X=mr(),Ee=mr(),pu=mr(),z=mr(),fe=mr(),zr=mr(),it=mr();function mr(){return 2**++Q0}const mu=Object.freeze(Object.defineProperty({__proto__:null,boolean:X,booleanish:Ee,commaOrSpaceSeparated:it,commaSeparated:zr,number:z,overloadedBoolean:pu,spaceSeparated:fe},Symbol.toStringTag,{value:"Module"})),Ql=Object.keys(mu);class Oc extends tt{constructor(t,n,r,i){let o=-1;if(super(t,n),qf(this,"space",i),typeof r=="number")for(;++o<Ql.length;){const s=Ql[o];qf(this,Ql[o],(r&mu[s])===mu[s])}}}Oc.prototype.defined=!0;function qf(e,t,n){n&&(e[t]=n)}function ti(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Oc(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[hu(r)]=r,n[hu(o.attribute)]=r}return new mo(t,n,e.space)}const qg=ti({properties:{ariaActiveDescendant:null,ariaAtomic:Ee,ariaAutoComplete:null,ariaBusy:Ee,ariaChecked:Ee,ariaColCount:z,ariaColIndex:z,ariaColSpan:z,ariaControls:fe,ariaCurrent:null,ariaDescribedBy:fe,ariaDetails:null,ariaDisabled:Ee,ariaDropEffect:fe,ariaErrorMessage:null,ariaExpanded:Ee,ariaFlowTo:fe,ariaGrabbed:Ee,ariaHasPopup:null,ariaHidden:Ee,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:fe,ariaLevel:z,ariaLive:null,ariaModal:Ee,ariaMultiLine:Ee,ariaMultiSelectable:Ee,ariaOrientation:null,ariaOwns:fe,ariaPlaceholder:null,ariaPosInSet:z,ariaPressed:Ee,ariaReadOnly:Ee,ariaRelevant:null,ariaRequired:Ee,ariaRoleDescription:fe,ariaRowCount:z,ariaRowIndex:z,ariaRowSpan:z,ariaSelected:Ee,ariaSetSize:z,ariaSort:null,ariaValueMax:z,ariaValueMin:z,ariaValueNow:z,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Gg(e,t){return t in e?e[t]:t}function Kg(e,t){return Gg(e,t.toLowerCase())}const Y0=ti({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:zr,acceptCharset:fe,accessKey:fe,action:null,allow:null,allowFullScreen:X,allowPaymentRequest:X,allowUserMedia:X,alt:null,as:null,async:X,autoCapitalize:null,autoComplete:fe,autoFocus:X,autoPlay:X,blocking:fe,capture:null,charSet:null,checked:X,cite:null,className:fe,cols:z,colSpan:null,content:null,contentEditable:Ee,controls:X,controlsList:fe,coords:z|zr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:X,defer:X,dir:null,dirName:null,disabled:X,download:pu,draggable:Ee,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:X,formTarget:null,headers:fe,height:z,hidden:pu,high:z,href:null,hrefLang:null,htmlFor:fe,httpEquiv:fe,id:null,imageSizes:null,imageSrcSet:null,inert:X,inputMode:null,integrity:null,is:null,isMap:X,itemId:null,itemProp:fe,itemRef:fe,itemScope:X,itemType:fe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:X,low:z,manifest:null,max:null,maxLength:z,media:null,method:null,min:null,minLength:z,multiple:X,muted:X,name:null,nonce:null,noModule:X,noValidate:X,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:X,optimum:z,pattern:null,ping:fe,placeholder:null,playsInline:X,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:X,referrerPolicy:null,rel:fe,required:X,reversed:X,rows:z,rowSpan:z,sandbox:fe,scope:null,scoped:X,seamless:X,selected:X,shadowRootClonable:X,shadowRootDelegatesFocus:X,shadowRootMode:null,shape:null,size:z,sizes:null,slot:null,span:z,spellCheck:Ee,src:null,srcDoc:null,srcLang:null,srcSet:null,start:z,step:null,style:null,tabIndex:z,target:null,title:null,translate:null,type:null,typeMustMatch:X,useMap:null,value:Ee,width:z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:fe,axis:null,background:null,bgColor:null,border:z,borderColor:null,bottomMargin:z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:X,declare:X,event:null,face:null,frame:null,frameBorder:null,hSpace:z,leftMargin:z,link:null,longDesc:null,lowSrc:null,marginHeight:z,marginWidth:z,noResize:X,noHref:X,noShade:X,noWrap:X,object:null,profile:null,prompt:null,rev:null,rightMargin:z,rules:null,scheme:null,scrolling:Ee,standby:null,summary:null,text:null,topMargin:z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:X,disableRemotePlayback:X,prefix:null,property:null,results:z,security:null,unselectable:null},space:"html",transform:Kg}),X0=ti({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:it,accentHeight:z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:z,amplitude:z,arabicForm:null,ascent:z,attributeName:null,attributeType:null,azimuth:z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:z,by:null,calcMode:null,capHeight:z,className:fe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:z,diffuseConstant:z,direction:null,display:null,dur:null,divisor:z,dominantBaseline:null,download:X,dx:null,dy:null,edgeMode:null,editable:null,elevation:z,enableBackground:null,end:null,event:null,exponent:z,externalResourcesRequired:null,fill:null,fillOpacity:z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:zr,g2:zr,glyphName:zr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:z,horizOriginX:z,horizOriginY:z,id:null,ideographic:z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:z,k:z,k1:z,k2:z,k3:z,k4:z,kernelMatrix:it,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:z,overlineThickness:z,paintOrder:null,panose1:null,path:null,pathLength:z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:fe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:z,pointsAtY:z,pointsAtZ:z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:it,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:it,rev:it,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:it,requiredFeatures:it,requiredFonts:it,requiredFormats:it,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:z,specularExponent:z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:z,strikethroughThickness:z,string:null,stroke:null,strokeDashArray:it,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:z,strokeOpacity:z,strokeWidth:null,style:null,surfaceScale:z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:it,tabIndex:z,tableValues:null,target:null,targetX:z,targetY:z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:it,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:z,underlineThickness:z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:z,values:null,vAlphabetic:z,vMathematical:z,vectorEffect:null,vHanging:z,vIdeographic:z,version:null,vertAdvY:z,vertOriginX:z,vertOriginY:z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Gg}),Qg=ti({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Yg=ti({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Kg}),Xg=ti({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),J0={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Z0=/[A-Z]/g,Gf=/-[a-z]/g,eS=/^data[-\w.:]+$/i;function tS(e,t){const n=hu(t);let r=t,i=tt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&eS.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Gf,rS);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Gf.test(o)){let s=o.replace(Z0,nS);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Oc}return new i(r,t)}function nS(e){return"-"+e.toLowerCase()}function rS(e){return e.charAt(1).toUpperCase()}const iS=Vg([qg,Y0,Qg,Yg,Xg],"html"),Fc=Vg([qg,X0,Qg,Yg,Xg],"svg");function oS(e){return e.join(" ").trim()}var zc={},Kf=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,sS=/\n/g,lS=/^\s*/,aS=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,uS=/^:\s*/,cS=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,dS=/^[;\s]*/,fS=/^\s+|\s+$/g,hS=`
52
- `,Qf="/",Yf="*",Yn="",pS="comment",mS="declaration";function gS(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(g){var v=g.match(sS);v&&(n+=v.length);var S=g.lastIndexOf(hS);r=~S?g.length-S:r+g.length}function o(){var g={line:n,column:r};return function(v){return v.position=new s(g),c(),v}}function s(g){this.start=g,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function l(g){var v=new Error(t.source+":"+n+":"+r+": "+g);if(v.reason=g,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function u(g){var v=g.exec(e);if(v){var S=v[0];return i(S),e=e.slice(S.length),v}}function c(){u(lS)}function f(g){var v;for(g=g||[];v=d();)v!==!1&&g.push(v);return g}function d(){var g=o();if(!(Qf!=e.charAt(0)||Yf!=e.charAt(1))){for(var v=2;Yn!=e.charAt(v)&&(Yf!=e.charAt(v)||Qf!=e.charAt(v+1));)++v;if(v+=2,Yn===e.charAt(v-1))return l("End of comment missing");var S=e.slice(2,v-2);return r+=2,i(S),e=e.slice(v),r+=2,g({type:pS,comment:S})}}function h(){var g=o(),v=u(aS);if(v){if(d(),!u(uS))return l("property missing ':'");var S=u(cS),y=g({type:mS,property:Xf(v[0].replace(Kf,Yn)),value:S?Xf(S[0].replace(Kf,Yn)):Yn});return u(dS),y}}function p(){var g=[];f(g);for(var v;v=h();)v!==!1&&(g.push(v),f(g));return g}return c(),p()}function Xf(e){return e?e.replace(fS,Yn):Yn}var yS=gS,xS=cs&&cs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zc,"__esModule",{value:!0});zc.default=kS;const vS=xS(yS);function kS(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,vS.default)(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:s,value:l}=o;i?t(s,l,o):l&&(n=n||{},n[s]=l)}),n}var sl={};Object.defineProperty(sl,"__esModule",{value:!0});sl.camelCase=void 0;var wS=/^--[a-zA-Z0-9_-]+$/,SS=/-([a-z])/g,CS=/^[^-]+$/,ES=/^-(webkit|moz|ms|o|khtml)-/,bS=/^-(ms)-/,NS=function(e){return!e||CS.test(e)||wS.test(e)},TS=function(e,t){return t.toUpperCase()},Jf=function(e,t){return"".concat(t,"-")},jS=function(e,t){return t===void 0&&(t={}),NS(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(bS,Jf):e=e.replace(ES,Jf),e.replace(SS,TS))};sl.camelCase=jS;var _S=cs&&cs.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},IS=_S(zc),AS=sl;function gu(e,t){var n={};return!e||typeof e!="string"||(0,IS.default)(e,function(r,i){r&&i&&(n[(0,AS.camelCase)(r,t)]=i)}),n}gu.default=gu;var RS=gu;const PS=$h(RS),Jg=Zg("end"),Mc=Zg("start");function Zg(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function DS(e){const t=Mc(e),n=Jg(e);if(t&&n)return{start:t,end:n}}function Di(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Zf(e.position):"start"in e||"end"in e?Zf(e):"line"in e||"column"in e?yu(e):""}function yu(e){return eh(e&&e.line)+":"+eh(e&&e.column)}function Zf(e){return yu(e&&e.start)+"-"+yu(e&&e.end)}function eh(e){return e&&typeof e=="number"?e:1}class $e extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?o.ruleId=r:(o.source=r.slice(0,u),o.ruleId=r.slice(u+1))}if(!o.place&&o.ancestors&&o.ancestors){const u=o.ancestors[o.ancestors.length-1];u&&(o.place=u.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=Di(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}$e.prototype.file="";$e.prototype.name="";$e.prototype.reason="";$e.prototype.message="";$e.prototype.stack="";$e.prototype.column=void 0;$e.prototype.line=void 0;$e.prototype.ancestors=void 0;$e.prototype.cause=void 0;$e.prototype.fatal=void 0;$e.prototype.place=void 0;$e.prototype.ruleId=void 0;$e.prototype.source=void 0;const Bc={}.hasOwnProperty,LS=new Map,OS=/[A-Z]/g,FS=new Set(["table","tbody","thead","tfoot","tr"]),zS=new Set(["td","th"]),ey="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function MS(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=GS(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=qS(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Fc:iS,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=ty(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function ty(e,t,n){if(t.type==="element")return BS(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return US(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return HS(e,t,n);if(t.type==="mdxjsEsm")return $S(e,t);if(t.type==="root")return WS(e,t,n);if(t.type==="text")return VS(e,t)}function BS(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Fc,e.schema=i),e.ancestors.push(t);const o=ry(e,t.tagName,!1),s=KS(e,t);let l=$c(e,t);return FS.has(t.tagName)&&(l=l.filter(function(u){return typeof u=="string"?!K0(u):!0})),ny(e,s,o,t),Uc(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function US(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ro(e,t.position)}function $S(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ro(e,t.position)}function HS(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Fc,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:ry(e,t.name,!0),s=QS(e,t),l=$c(e,t);return ny(e,s,o,t),Uc(s,l),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function WS(e,t,n){const r={};return Uc(r,$c(e,t)),e.create(t,e.Fragment,r,n)}function VS(e,t){return t.value}function ny(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Uc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function qS(e,t,n){return r;function r(i,o,s,l){const c=Array.isArray(s.children)?n:t;return l?c(o,s,l):c(o,s)}}function GS(e,t){return n;function n(r,i,o,s){const l=Array.isArray(o.children),u=Mc(r);return t(i,o,s,l,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function KS(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Bc.call(t.properties,i)){const o=YS(e,i,t.properties[i]);if(o){const[s,l]=o;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&zS.has(t.tagName)?r=l:n[s]=l}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function QS(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ro(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,o=e.evaluater.evaluateExpression(l.expression)}else ro(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function $c(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:LS;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const u=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(u){const c=i.get(u)||0;s=u+"-"+c,i.set(u,c+1)}}const l=ty(e,o,s);l!==void 0&&n.push(l)}return n}function YS(e,t,n){const r=tS(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?H0(n):oS(n)),r.property==="style"){let i=typeof n=="object"?n:XS(e,String(n));return e.stylePropertyNameCase==="css"&&(i=JS(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?J0[r.property]||r.property:r.attribute,n]}}function XS(e,t){try{return PS(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new $e("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=ey+"#cannot-parse-style-attribute",i}}function ry(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const l=Wf(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(o&&l.type==="Literal"),optional:!1}:l}r=s}else r=Wf(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Bc.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ro(e)}function ro(e,t){const n=new $e("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=ey+"#cannot-handle-mdx-estrees-without-createevaluater",n}function JS(e){const t={};let n;for(n in e)Bc.call(e,n)&&(t[ZS(n)]=e[n]);return t}function ZS(e){let t=e.replace(OS,eC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function eC(e){return"-"+e.toLowerCase()}const Yl={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},tC={};function Hc(e,t){const n=tC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return iy(e,r,i)}function iy(e,t,n){if(nC(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return th(e.children,t,n)}return Array.isArray(e)?th(e,t,n):""}function th(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=iy(e[i],t,n);return r.join("")}function nC(e){return!!(e&&typeof e=="object")}const nh=document.createElement("i");function Wc(e){const t="&"+e+";";nh.innerHTML=t;const n=nh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function at(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function kt(e,t){return e.length>0?(at(e,e.length,0,t),e):t}const rh={}.hasOwnProperty;function oy(e){const t={};let n=-1;for(;++n<e.length;)rC(t,e[n]);return t}function rC(e,t){let n;for(n in t){const i=(rh.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){rh.call(i,s)||(i[s]=[]);const l=o[s];iC(i[s],Array.isArray(l)?l:l?[l]:[])}}}function iC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);at(e,0,0,r)}function sy(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function zt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const We=Wn(/[A-Za-z]/),Be=Wn(/[\dA-Za-z]/),oC=Wn(/[#-'*+\--9=?A-Z^-~]/);function Os(e){return e!==null&&(e<32||e===127)}const xu=Wn(/\d/),sC=Wn(/[\dA-Fa-f]/),lC=Wn(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function de(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}const ll=Wn(new RegExp("\\p{P}|\\p{S}","u")),ur=Wn(/\s/);function Wn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ni(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&Be(e.charCodeAt(n+1))&&Be(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(s=String.fromCharCode(o,l),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ie(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(u){return Z(u)?(e.enter(n),l(u)):t(u)}function l(u){return Z(u)&&o++<i?(e.consume(u),l):(e.exit(n),t(u))}}const aC={tokenize:uC};function uC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ie(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Q(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}const cC={tokenize:dC},ih={tokenize:fC};function dC(e){const t=this,n=[];let r=0,i,o,s;return l;function l(x){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,u,c)(x)}return c(x)}function u(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&m();const T=t.events.length;let j=T,E;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){E=t.events[j][1].end;break}y(r);let _=T;for(;_<t.events.length;)t.events[_][1].end={...E},_++;return at(t.events,j+1,0,t.events.slice(T)),t.events.length=_,c(x)}return l(x)}function c(x){if(r===n.length){if(!i)return h(x);if(i.currentConstruct&&i.currentConstruct.concrete)return g(x);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ih,f,d)(x)}function f(x){return i&&m(),y(r),h(x)}function d(x){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(x)}function h(x){return t.containerState={},e.attempt(ih,p,g)(x)}function p(x){return r++,n.push([t.currentConstruct,t.containerState]),h(x)}function g(x){if(x===null){i&&m(),y(0),e.consume(x);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),v(x)}function v(x){if(x===null){S(e.exit("chunkFlow"),!0),y(0),e.consume(x);return}return Q(x)?(e.consume(x),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(x),v)}function S(x,T){const j=t.sliceStream(x);if(T&&j.push(null),x.previous=o,o&&(o.next=x),o=x,i.defineSkip(x.start),i.write(j),t.parser.lazy[x.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<s&&(!i.events[E][1].end||i.events[E][1].end.offset>s))return;const _=t.events.length;let D=_,R,b;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(R){b=t.events[D][1].end;break}R=!0}for(y(r),E=_;E<t.events.length;)t.events[E][1].end={...b},E++;at(t.events,D+1,0,t.events.slice(_)),t.events.length=E}}function y(x){let T=n.length;for(;T-- >x;){const j=n[T];t.containerState=j[1],j[0].exit.call(t,e)}n.length=x}function m(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function fC(e,t,n){return ie(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Gr(e){if(e===null||de(e)||ur(e))return 1;if(ll(e))return 2}function al(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const vu={name:"attention",resolveAll:hC,tokenize:pC};function hC(e,t){let n=-1,r,i,o,s,l,u,c,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},h={...e[n][1].start};oh(d,-u),oh(h,u),s={type:u>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},l={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=kt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=kt(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),c=kt(c,al(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=kt(c,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=kt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,at(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function pC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Gr(r);let o;return s;function s(u){return o=u,e.enter("attentionSequence"),l(u)}function l(u){if(u===o)return e.consume(u),l;const c=e.exit("attentionSequence"),f=Gr(u),d=!f||f===2&&i||n.includes(u),h=!i||i===2&&f||n.includes(r);return c._open=!!(o===42?d:d&&(i||!h)),c._close=!!(o===42?h:h&&(f||!d)),t(u)}}function oh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const mC={name:"autolink",tokenize:gC};function gC(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return We(p)?(e.consume(p),s):p===64?n(p):c(p)}function s(p){return p===43||p===45||p===46||Be(p)?(r=1,l(p)):c(p)}function l(p){return p===58?(e.consume(p),r=0,u):(p===43||p===45||p===46||Be(p))&&r++<32?(e.consume(p),l):(r=0,c(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Os(p)?n(p):(e.consume(p),u)}function c(p){return p===64?(e.consume(p),f):oC(p)?(e.consume(p),c):n(p)}function f(p){return Be(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||Be(p))&&r++<63){const g=p===45?h:d;return e.consume(p),g}return n(p)}}const go={partial:!0,tokenize:yC};function yC(e,t,n){return r;function r(o){return Z(o)?ie(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Q(o)?t(o):n(o)}}const ly={continuation:{tokenize:vC},exit:kC,name:"blockQuote",tokenize:xC};function xC(e,t,n){const r=this;return i;function i(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return Z(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function vC(e,t,n){const r=this;return i;function i(s){return Z(s)?ie(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(ly,t,n)(s)}}function kC(e){e.exit("blockQuote")}const ay={name:"characterEscape",tokenize:wC};function wC(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return lC(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const uy={name:"characterReference",tokenize:SC};function SC(e,t,n){const r=this;let i=0,o,s;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),u}function u(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,s=Be,f(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=sC,f):(e.enter("characterReferenceValue"),o=7,s=xu,f(d))}function f(d){if(d===59&&i){const h=e.exit("characterReferenceValue");return s===Be&&!Wc(r.sliceSerialize(h))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<o?(e.consume(d),f):n(d)}}const sh={partial:!0,tokenize:EC},lh={concrete:!0,name:"codeFenced",tokenize:CC};function CC(e,t,n){const r=this,i={partial:!0,tokenize:j};let o=0,s=0,l;return u;function u(E){return c(E)}function c(E){const _=r.events[r.events.length-1];return o=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,l=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(E)}function f(E){return E===l?(s++,e.consume(E),f):s<3?n(E):(e.exit("codeFencedFenceSequence"),Z(E)?ie(e,d,"whitespace")(E):d(E))}function d(E){return E===null||Q(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(sh,v,T)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(E))}function h(E){return E===null||Q(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(E)):Z(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ie(e,p,"whitespace")(E)):E===96&&E===l?n(E):(e.consume(E),h)}function p(E){return E===null||Q(E)?d(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(E))}function g(E){return E===null||Q(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(E)):E===96&&E===l?n(E):(e.consume(E),g)}function v(E){return e.attempt(i,T,S)(E)}function S(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),y}function y(E){return o>0&&Z(E)?ie(e,m,"linePrefix",o+1)(E):m(E)}function m(E){return E===null||Q(E)?e.check(sh,v,T)(E):(e.enter("codeFlowValue"),x(E))}function x(E){return E===null||Q(E)?(e.exit("codeFlowValue"),m(E)):(e.consume(E),x)}function T(E){return e.exit("codeFenced"),t(E)}function j(E,_,D){let R=0;return b;function b(G){return E.enter("lineEnding"),E.consume(G),E.exit("lineEnding"),P}function P(G){return E.enter("codeFencedFence"),Z(G)?ie(E,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):q(G)}function q(G){return G===l?(E.enter("codeFencedFenceSequence"),V(G)):D(G)}function V(G){return G===l?(R++,E.consume(G),V):R>=s?(E.exit("codeFencedFenceSequence"),Z(G)?ie(E,H,"whitespace")(G):H(G)):D(G)}function H(G){return G===null||Q(G)?(E.exit("codeFencedFence"),_(G)):D(G)}}}function EC(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Xl={name:"codeIndented",tokenize:NC},bC={partial:!0,tokenize:TC};function NC(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ie(e,o,"linePrefix",5)(c)}function o(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?u(c):Q(c)?e.attempt(bC,s,u)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||Q(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),l)}function u(c){return e.exit("codeIndented"),t(c)}}function TC(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Q(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ie(e,o,"linePrefix",5)(s)}function o(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):Q(s)?i(s):n(s)}}const jC={name:"codeText",previous:IC,resolve:_C,tokenize:AC};function _C(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function IC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function AC(e,t,n){let r=0,i,o;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),u(d))}function u(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),u):d===96?(o=e.enter("codeTextSequence"),i=0,f(d)):Q(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Q(d)?(e.exit("codeTextData"),u(d)):(e.consume(d),c)}function f(d){return d===96?(e.consume(d),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",c(d))}}class RC{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&gi(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),gi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),gi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);gi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);gi(this.left,n.reverse())}}}function gi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function cy(e){const t={};let n=-1,r,i,o,s,l,u,c;const f=new RC(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,o=0,o<u.length&&u[o][1].type==="lineEndingBlank"&&(o+=2),o<u.length&&u[o][1].type==="content"))for(;++o<u.length&&u[o][1].type!=="content";)u[o][1].type==="chunkText"&&(u[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,PC(f,n)),n=t[n],c=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=f.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},l=f.slice(i,n),l.unshift(r),f.splice(i,n-i+1,l))}}return at(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function PC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,u=[],c={};let f,d,h=-1,p=n,g=0,v=0;const S=[v];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++h<l.length;)l[h][0]==="exit"&&l[h-1][0]==="enter"&&l[h][1].type===l[h-1][1].type&&l[h][1].start.line!==l[h][1].end.line&&(v=h+1,S.push(v),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):S.pop(),h=S.length;h--;){const y=l.slice(S[h],S[h+1]),m=o.pop();u.push([m,m+y.length-1]),e.splice(m,2,y)}for(u.reverse(),h=-1;++h<u.length;)c[g+u[h][0]]=g+u[h][1],g+=u[h][1]-u[h][0]-1;return c}const DC={resolve:OC,tokenize:FC},LC={partial:!0,tokenize:zC};function OC(e){return cy(e),e}function FC(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):Q(l)?e.check(LC,s,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function zC(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ie(e,o,"linePrefix")}function o(s){if(s===null||Q(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function dy(e,t,n,r,i,o,s,l,u){const c=u||Number.POSITIVE_INFINITY;let f=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),h):y===null||y===32||y===41||Os(y)?n(y):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(y))}function h(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(l),h(y)):y===null||y===60||Q(y)?n(y):(e.consume(y),y===92?g:p)}function g(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function v(y){return!f&&(y===null||y===41||de(y))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(y)):f<c&&y===40?(e.consume(y),f++,v):y===41?(e.consume(y),f--,v):y===null||y===32||y===40||Os(y)?n(y):(e.consume(y),y===92?S:v)}function S(y){return y===40||y===41||y===92?(e.consume(y),v):v(y)}}function fy(e,t,n,r,i,o){const s=this;let l=0,u;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),f}function f(p){return l>999||p===null||p===91||p===93&&!u||p===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Q(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||Q(p)||l++>999?(e.exit("chunkString"),f(p)):(e.consume(p),u||(u=!Z(p)),p===92?h:d)}function h(p){return p===91||p===92||p===93?(e.consume(p),l++,d):d(p)}}function hy(e,t,n,r,i,o){let s;return l;function l(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),s=h===40?41:h,u):n(h)}function u(h){return h===s?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),c(h))}function c(h){return h===s?(e.exit(o),u(s)):h===null?n(h):Q(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),ie(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===s||h===null||Q(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?d:f)}function d(h){return h===s||h===92?(e.consume(h),f):f(h)}}function Li(e,t){let n;return r;function r(i){return Q(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Z(i)?ie(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const MC={name:"definition",tokenize:UC},BC={partial:!0,tokenize:$C};function UC(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),s(p)}function s(p){return fy.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return i=zt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return de(p)?Li(e,c)(p):c(p)}function c(p){return dy(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(BC,d,d)(p)}function d(p){return Z(p)?ie(e,h,"whitespace")(p):h(p)}function h(p){return p===null||Q(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function $C(e,t,n){return r;function r(l){return de(l)?Li(e,i)(l):n(l)}function i(l){return hy(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return Z(l)?ie(e,s,"whitespace")(l):s(l)}function s(l){return l===null||Q(l)?t(l):n(l)}}const HC={name:"hardBreakEscape",tokenize:WC};function WC(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Q(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const VC={name:"headingAtx",resolve:qC,tokenize:GC};function qC(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},at(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function GC(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||de(f)?(e.exit("atxHeadingSequence"),l(f)):n(f)}function l(f){return f===35?(e.enter("atxHeadingSequence"),u(f)):f===null||Q(f)?(e.exit("atxHeading"),t(f)):Z(f)?ie(e,l,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function u(f){return f===35?(e.consume(f),u):(e.exit("atxHeadingSequence"),l(f))}function c(f){return f===null||f===35||de(f)?(e.exit("atxHeadingText"),l(f)):(e.consume(f),c)}}const KC=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ah=["pre","script","style","textarea"],QC={concrete:!0,name:"htmlFlow",resolveTo:JC,tokenize:ZC},YC={partial:!0,tokenize:tE},XC={partial:!0,tokenize:eE};function JC(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function ZC(e,t,n){const r=this;let i,o,s,l,u;return c;function c(N){return f(N)}function f(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),h):N===47?(e.consume(N),o=!0,v):N===63?(e.consume(N),i=3,r.interrupt?t:w):We(N)?(e.consume(N),s=String.fromCharCode(N),S):n(N)}function h(N){return N===45?(e.consume(N),i=2,p):N===91?(e.consume(N),i=5,l=0,g):We(N)?(e.consume(N),i=4,r.interrupt?t:w):n(N)}function p(N){return N===45?(e.consume(N),r.interrupt?t:w):n(N)}function g(N){const Se="CDATA[";return N===Se.charCodeAt(l++)?(e.consume(N),l===Se.length?r.interrupt?t:q:g):n(N)}function v(N){return We(N)?(e.consume(N),s=String.fromCharCode(N),S):n(N)}function S(N){if(N===null||N===47||N===62||de(N)){const Se=N===47,nt=s.toLowerCase();return!Se&&!o&&ah.includes(nt)?(i=1,r.interrupt?t(N):q(N)):KC.includes(s.toLowerCase())?(i=6,Se?(e.consume(N),y):r.interrupt?t(N):q(N)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):o?m(N):x(N))}return N===45||Be(N)?(e.consume(N),s+=String.fromCharCode(N),S):n(N)}function y(N){return N===62?(e.consume(N),r.interrupt?t:q):n(N)}function m(N){return Z(N)?(e.consume(N),m):b(N)}function x(N){return N===47?(e.consume(N),b):N===58||N===95||We(N)?(e.consume(N),T):Z(N)?(e.consume(N),x):b(N)}function T(N){return N===45||N===46||N===58||N===95||Be(N)?(e.consume(N),T):j(N)}function j(N){return N===61?(e.consume(N),E):Z(N)?(e.consume(N),j):x(N)}function E(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),u=N,_):Z(N)?(e.consume(N),E):D(N)}function _(N){return N===u?(e.consume(N),u=null,R):N===null||Q(N)?n(N):(e.consume(N),_)}function D(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||de(N)?j(N):(e.consume(N),D)}function R(N){return N===47||N===62||Z(N)?x(N):n(N)}function b(N){return N===62?(e.consume(N),P):n(N)}function P(N){return N===null||Q(N)?q(N):Z(N)?(e.consume(N),P):n(N)}function q(N){return N===45&&i===2?(e.consume(N),O):N===60&&i===1?(e.consume(N),L):N===62&&i===4?(e.consume(N),J):N===63&&i===3?(e.consume(N),w):N===93&&i===5?(e.consume(N),B):Q(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(YC,se,V)(N)):N===null||Q(N)?(e.exit("htmlFlowData"),V(N)):(e.consume(N),q)}function V(N){return e.check(XC,H,se)(N)}function H(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),G}function G(N){return N===null||Q(N)?V(N):(e.enter("htmlFlowData"),q(N))}function O(N){return N===45?(e.consume(N),w):q(N)}function L(N){return N===47?(e.consume(N),s="",C):q(N)}function C(N){if(N===62){const Se=s.toLowerCase();return ah.includes(Se)?(e.consume(N),J):q(N)}return We(N)&&s.length<8?(e.consume(N),s+=String.fromCharCode(N),C):q(N)}function B(N){return N===93?(e.consume(N),w):q(N)}function w(N){return N===62?(e.consume(N),J):N===45&&i===2?(e.consume(N),w):q(N)}function J(N){return N===null||Q(N)?(e.exit("htmlFlowData"),se(N)):(e.consume(N),J)}function se(N){return e.exit("htmlFlow"),t(N)}}function eE(e,t,n){const r=this;return i;function i(s){return Q(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function tE(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(go,t,n)}}const nE={name:"htmlText",tokenize:rE};function rE(e,t,n){const r=this;let i,o,s;return l;function l(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),u}function u(w){return w===33?(e.consume(w),c):w===47?(e.consume(w),j):w===63?(e.consume(w),x):We(w)?(e.consume(w),D):n(w)}function c(w){return w===45?(e.consume(w),f):w===91?(e.consume(w),o=0,g):We(w)?(e.consume(w),m):n(w)}function f(w){return w===45?(e.consume(w),p):n(w)}function d(w){return w===null?n(w):w===45?(e.consume(w),h):Q(w)?(s=d,L(w)):(e.consume(w),d)}function h(w){return w===45?(e.consume(w),p):d(w)}function p(w){return w===62?O(w):w===45?h(w):d(w)}function g(w){const J="CDATA[";return w===J.charCodeAt(o++)?(e.consume(w),o===J.length?v:g):n(w)}function v(w){return w===null?n(w):w===93?(e.consume(w),S):Q(w)?(s=v,L(w)):(e.consume(w),v)}function S(w){return w===93?(e.consume(w),y):v(w)}function y(w){return w===62?O(w):w===93?(e.consume(w),y):v(w)}function m(w){return w===null||w===62?O(w):Q(w)?(s=m,L(w)):(e.consume(w),m)}function x(w){return w===null?n(w):w===63?(e.consume(w),T):Q(w)?(s=x,L(w)):(e.consume(w),x)}function T(w){return w===62?O(w):x(w)}function j(w){return We(w)?(e.consume(w),E):n(w)}function E(w){return w===45||Be(w)?(e.consume(w),E):_(w)}function _(w){return Q(w)?(s=_,L(w)):Z(w)?(e.consume(w),_):O(w)}function D(w){return w===45||Be(w)?(e.consume(w),D):w===47||w===62||de(w)?R(w):n(w)}function R(w){return w===47?(e.consume(w),O):w===58||w===95||We(w)?(e.consume(w),b):Q(w)?(s=R,L(w)):Z(w)?(e.consume(w),R):O(w)}function b(w){return w===45||w===46||w===58||w===95||Be(w)?(e.consume(w),b):P(w)}function P(w){return w===61?(e.consume(w),q):Q(w)?(s=P,L(w)):Z(w)?(e.consume(w),P):R(w)}function q(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),i=w,V):Q(w)?(s=q,L(w)):Z(w)?(e.consume(w),q):(e.consume(w),H)}function V(w){return w===i?(e.consume(w),i=void 0,G):w===null?n(w):Q(w)?(s=V,L(w)):(e.consume(w),V)}function H(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||de(w)?R(w):(e.consume(w),H)}function G(w){return w===47||w===62||de(w)?R(w):n(w)}function O(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function L(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),C}function C(w){return Z(w)?ie(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):B(w)}function B(w){return e.enter("htmlTextData"),s(w)}}const Vc={name:"labelEnd",resolveAll:lE,resolveTo:aE,tokenize:uE},iE={tokenize:cE},oE={tokenize:dE},sE={tokenize:fE};function lE(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&at(e,0,e.length,n),e}function aE(e,t){let n=e.length,r=0,i,o,s,l;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",u,t],["enter",c,t]],l=kt(l,e.slice(o+1,o+r+3)),l=kt(l,[["enter",f,t]]),l=kt(l,al(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),l=kt(l,[["exit",f,t],e[s-2],e[s-1],["exit",c,t]]),l=kt(l,e.slice(s+1)),l=kt(l,[["exit",u,t]]),at(e,o,e.length,l),e}function uE(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return l;function l(h){return o?o._inactive?d(h):(s=r.parser.defined.includes(zt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),u):n(h)}function u(h){return h===40?e.attempt(iE,f,s?f:d)(h):h===91?e.attempt(oE,f,s?c:d)(h):s?f(h):d(h)}function c(h){return e.attempt(sE,f,d)(h)}function f(h){return t(h)}function d(h){return o._balanced=!0,n(h)}}function cE(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return de(d)?Li(e,o)(d):o(d)}function o(d){return d===41?f(d):dy(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return de(d)?Li(e,u)(d):f(d)}function l(d){return n(d)}function u(d){return d===34||d===39||d===40?hy(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):f(d)}function c(d){return de(d)?Li(e,f)(d):f(d)}function f(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function dE(e,t,n){const r=this;return i;function i(l){return fy.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(zt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function fE(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const hE={name:"labelStartImage",resolveAll:Vc.resolveAll,tokenize:pE};function pE(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o}function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const mE={name:"labelStartLink",resolveAll:Vc.resolveAll,tokenize:gE};function gE(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Jl={name:"lineEnding",tokenize:yE};function yE(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ie(e,t,"linePrefix")}}const as={name:"thematicBreak",tokenize:xE};function xE(e,t,n){let r=0,i;return o;function o(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,l(c)}function l(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||Q(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),Z(c)?ie(e,l,"whitespace")(c):l(c))}}const Qe={continuation:{tokenize:SE},exit:EE,name:"list",tokenize:wE},vE={partial:!0,tokenize:bE},kE={partial:!0,tokenize:CE};function wE(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:xu(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(as,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return xu(p)&&++s<10?(e.consume(p),u):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(go,r.interrupt?n:f,e.attempt(vE,h,d))}function f(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function d(p){return Z(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function SE(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(go,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ie(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!Z(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(kE,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,ie(e,e.attempt(Qe,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function CE(e,t,n){const r=this;return ie(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function EE(e){e.exit(this.containerState.type)}function bE(e,t,n){const r=this;return ie(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!Z(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const uh={name:"setextUnderline",resolveTo:NE,tokenize:TE};function NE(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function TE(e,t,n){const r=this;let i;return o;function o(c){let f=r.events.length,d;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){d=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===i?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),Z(c)?ie(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||Q(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const jE={tokenize:_E};function _E(e){const t=this,n=e.attempt(go,r,e.attempt(this.parser.constructs.flowInitial,i,ie(e,e.attempt(this.parser.constructs.flow,i,e.attempt(DC,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const IE={resolveAll:my()},AE=py("string"),RE=py("text");function py(e){return{resolveAll:my(e==="text"?PE:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(f){return c(f)?o(f):l(f)}function l(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return c(f)?(n.exit("data"),o(f)):(n.consume(f),u)}function c(f){if(f===null)return!0;const d=i[f];let h=-1;if(d)for(;++h<d.length;){const p=d[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function my(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function PE(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,l=0,u;for(;o--;){const c=i[o];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(c===-2)u=!0,l++;else if(c!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const c={type:n===e.length||u||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const DE={42:Qe,43:Qe,45:Qe,48:Qe,49:Qe,50:Qe,51:Qe,52:Qe,53:Qe,54:Qe,55:Qe,56:Qe,57:Qe,62:ly},LE={91:MC},OE={[-2]:Xl,[-1]:Xl,32:Xl},FE={35:VC,42:as,45:[uh,as],60:QC,61:uh,95:as,96:lh,126:lh},zE={38:uy,92:ay},ME={[-5]:Jl,[-4]:Jl,[-3]:Jl,33:hE,38:uy,42:vu,60:[mC,nE],91:mE,92:[HC,ay],93:Vc,95:vu,96:jC},BE={null:[vu,IE]},UE={null:[42,95]},$E={null:[]},HE=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:UE,contentInitial:LE,disable:$E,document:DE,flow:FE,flowInitial:OE,insideSpan:BE,string:zE,text:ME},Symbol.toStringTag,{value:"Module"}));function WE(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],l=[];const u={attempt:_(j),check:_(E),consume:m,enter:x,exit:T,interrupt:_(E,{interrupt:!0})},c={code:null,containerState:{},defineSkip:v,events:[],now:g,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:d};let f=t.tokenize.call(c,u);return t.resolveAll&&o.push(t),c;function d(P){return s=kt(s,P),S(),s[s.length-1]!==null?[]:(D(t,0),c.events=al(o,c.events,c),c.events)}function h(P,q){return qE(p(P),q)}function p(P){return VE(s,P)}function g(){const{_bufferIndex:P,_index:q,line:V,column:H,offset:G}=r;return{_bufferIndex:P,_index:q,line:V,column:H,offset:G}}function v(P){i[P.line]=P.column,b()}function S(){let P;for(;r._index<s.length;){const q=s[r._index];if(typeof q=="string")for(P=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===P&&r._bufferIndex<q.length;)y(q.charCodeAt(r._bufferIndex));else y(q)}}function y(P){f=f(P)}function m(P){Q(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,b()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=P}function x(P,q){const V=q||{};return V.type=P,V.start=g(),c.events.push(["enter",V,c]),l.push(V),V}function T(P){const q=l.pop();return q.end=g(),c.events.push(["exit",q,c]),q}function j(P,q){D(P,q.from)}function E(P,q){q.restore()}function _(P,q){return V;function V(H,G,O){let L,C,B,w;return Array.isArray(H)?se(H):"tokenize"in H?se([H]):J(H);function J(ue){return mt;function mt(Bt){const gn=Bt!==null&&ue[Bt],yn=Bt!==null&&ue.null,Vn=[...Array.isArray(gn)?gn:gn?[gn]:[],...Array.isArray(yn)?yn:yn?[yn]:[]];return se(Vn)(Bt)}}function se(ue){return L=ue,C=0,ue.length===0?O:N(ue[C])}function N(ue){return mt;function mt(Bt){return w=R(),B=ue,ue.partial||(c.currentConstruct=ue),ue.name&&c.parser.constructs.disable.null.includes(ue.name)?nt():ue.tokenize.call(q?Object.assign(Object.create(c),q):c,u,Se,nt)(Bt)}}function Se(ue){return P(B,w),G}function nt(ue){return w.restore(),++C<L.length?N(L[C]):O}}}function D(P,q){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&at(c.events,q,c.events.length-q,P.resolve(c.events.slice(q),c)),P.resolveTo&&(c.events=P.resolveTo(c.events,c))}function R(){const P=g(),q=c.previous,V=c.currentConstruct,H=c.events.length,G=Array.from(l);return{from:H,restore:O};function O(){r=P,c.previous=q,c.currentConstruct=V,c.events.length=H,l=G,b()}}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function VE(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function qE(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
53
- `;break}case-3:{s=`\r
54
- `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function GE(e){const r={constructs:oy([HE,...(e||{}).extensions||[]]),content:i(aC),defined:[],document:i(cC),flow:i(jE),lazy:{},string:i(AE),text:i(RE)};return r;function i(o){return s;function s(l){return WE(r,o,l)}}}function KE(e){for(;!cy(e););return e}const ch=/[\0\t\n\r]/g;function QE(){let e=1,t="",n=!0,r;return i;function i(o,s,l){const u=[];let c,f,d,h,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(ch.lastIndex=d,c=ch.exec(o),h=c&&c.index!==void 0?c.index:o.length,p=o.charCodeAt(h),!c){t=o.slice(d);break}if(p===10&&d===h&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),d<h&&(u.push(o.slice(d,h)),e+=h-d),p){case 0:{u.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,u.push(-2);e++<f;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}d=h+1}return l&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const YE=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function XE(e){return e.replace(YE,JE)}function JE(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return sy(n.slice(o?2:1),o?16:10)}return Wc(n)||e}const gy={}.hasOwnProperty;function ZE(e,t,n){return typeof t!="string"&&(n=t,t=void 0),eb(n)(KE(GE(n).document().write(QE()(e,t,!0))))}function eb(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(gt),autolinkProtocol:R,autolinkEmail:R,atxHeading:o(xo),blockQuote:o(yn),characterEscape:R,characterReference:R,codeFenced:o(Vn),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(Vn,s),codeText:o(fl,s),codeTextData:R,data:R,codeFlowValue:R,definition:o(hl),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(pl),hardBreakEscape:o(I),hardBreakTrailing:o(I),htmlFlow:o($,s),htmlFlowData:R,htmlText:o($,s),htmlTextData:R,image:o(Te),label:s,link:o(gt),listItem:o(ex),listItemValue:h,listOrdered:o(Ut,d),listUnordered:o(Ut),paragraph:o(tx),reference:N,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(xo),strong:o(nx),thematicBreak:o(ix)},exit:{atxHeading:u(),atxHeadingSequence:j,autolink:u(),autolinkEmail:gn,autolinkProtocol:Bt,blockQuote:u(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:nt,characterReferenceMarkerNumeric:nt,characterReferenceValue:ue,characterReference:mt,codeFenced:u(S),codeFencedFence:v,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:b,codeIndented:u(y),codeText:u(G),codeTextData:b,data:b,definition:u(),definitionDestinationString:T,definitionLabelString:m,definitionTitleString:x,emphasis:u(),hardBreakEscape:u(q),hardBreakTrailing:u(q),htmlFlow:u(V),htmlFlowData:b,htmlText:u(H),htmlTextData:b,image:u(L),label:B,labelText:C,lineEnding:P,link:u(O),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Se,resourceDestinationString:w,resourceTitleString:J,resource:se,setextHeading:u(D),setextHeadingLineSequence:_,setextHeadingText:E,strong:u(),thematicBreak:u()}};yy(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(A){let W={type:"root",children:[]};const Y={stack:[W],tokenStack:[],config:t,enter:l,exit:c,buffer:s,resume:f,data:n},te=[];let ce=-1;for(;++ce<A.length;)if(A[ce][1].type==="listOrdered"||A[ce][1].type==="listUnordered")if(A[ce][0]==="enter")te.push(ce);else{const Nt=te.pop();ce=i(A,Nt,ce)}for(ce=-1;++ce<A.length;){const Nt=t[A[ce][0]];gy.call(Nt,A[ce][1].type)&&Nt[A[ce][1].type].call(Object.assign({sliceSerialize:A[ce][2].sliceSerialize},Y),A[ce][1])}if(Y.tokenStack.length>0){const Nt=Y.tokenStack[Y.tokenStack.length-1];(Nt[1]||dh).call(Y,void 0,Nt[0])}for(W.position={start:kn(A.length>0?A[0][1].start:{line:1,column:1,offset:0}),end:kn(A.length>0?A[A.length-2][1].end:{line:1,column:1,offset:0})},ce=-1;++ce<t.transforms.length;)W=t.transforms[ce](W)||W;return W}function i(A,W,Y){let te=W-1,ce=-1,Nt=!1,qn,en,ri,ii;for(;++te<=Y;){const rt=A[te];switch(rt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{rt[0]==="enter"?ce++:ce--,ii=void 0;break}case"lineEndingBlank":{rt[0]==="enter"&&(qn&&!ii&&!ce&&!ri&&(ri=te),ii=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ii=void 0}if(!ce&&rt[0]==="enter"&&rt[1].type==="listItemPrefix"||ce===-1&&rt[0]==="exit"&&(rt[1].type==="listUnordered"||rt[1].type==="listOrdered")){if(qn){let gr=te;for(en=void 0;gr--;){const tn=A[gr];if(tn[1].type==="lineEnding"||tn[1].type==="lineEndingBlank"){if(tn[0]==="exit")continue;en&&(A[en][1].type="lineEndingBlank",Nt=!0),tn[1].type="lineEnding",en=gr}else if(!(tn[1].type==="linePrefix"||tn[1].type==="blockQuotePrefix"||tn[1].type==="blockQuotePrefixWhitespace"||tn[1].type==="blockQuoteMarker"||tn[1].type==="listItemIndent"))break}ri&&(!en||ri<en)&&(qn._spread=!0),qn.end=Object.assign({},en?A[en][1].start:rt[1].end),A.splice(en||te,0,["exit",qn,rt[2]]),te++,Y++}if(rt[1].type==="listItemPrefix"){const gr={type:"listItem",_spread:!1,start:Object.assign({},rt[1].start),end:void 0};qn=gr,A.splice(te,0,["enter",gr,rt[2]]),te++,Y++,ri=void 0,ii=!0}}}return A[W][1]._spread=Nt,Y}function o(A,W){return Y;function Y(te){l.call(this,A(te),te),W&&W.call(this,te)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(A,W,Y){this.stack[this.stack.length-1].children.push(A),this.stack.push(A),this.tokenStack.push([W,Y||void 0]),A.position={start:kn(W.start),end:void 0}}function u(A){return W;function W(Y){A&&A.call(this,Y),c.call(this,Y)}}function c(A,W){const Y=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==A.type&&(W?W.call(this,A,te[0]):(te[1]||dh).call(this,A,te[0]));else throw new Error("Cannot close `"+A.type+"` ("+Di({start:A.start,end:A.end})+"): it’s not open");Y.position.end=kn(A.end)}function f(){return Hc(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(A){if(this.data.expectingFirstListItemValue){const W=this.stack[this.stack.length-2];W.start=Number.parseInt(this.sliceSerialize(A),10),this.data.expectingFirstListItemValue=void 0}}function p(){const A=this.resume(),W=this.stack[this.stack.length-1];W.lang=A}function g(){const A=this.resume(),W=this.stack[this.stack.length-1];W.meta=A}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const A=this.resume(),W=this.stack[this.stack.length-1];W.value=A.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const A=this.resume(),W=this.stack[this.stack.length-1];W.value=A.replace(/(\r?\n|\r)$/g,"")}function m(A){const W=this.resume(),Y=this.stack[this.stack.length-1];Y.label=W,Y.identifier=zt(this.sliceSerialize(A)).toLowerCase()}function x(){const A=this.resume(),W=this.stack[this.stack.length-1];W.title=A}function T(){const A=this.resume(),W=this.stack[this.stack.length-1];W.url=A}function j(A){const W=this.stack[this.stack.length-1];if(!W.depth){const Y=this.sliceSerialize(A).length;W.depth=Y}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function _(A){const W=this.stack[this.stack.length-1];W.depth=this.sliceSerialize(A).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function R(A){const Y=this.stack[this.stack.length-1].children;let te=Y[Y.length-1];(!te||te.type!=="text")&&(te=rx(),te.position={start:kn(A.start),end:void 0},Y.push(te)),this.stack.push(te)}function b(A){const W=this.stack.pop();W.value+=this.sliceSerialize(A),W.position.end=kn(A.end)}function P(A){const W=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Y=W.children[W.children.length-1];Y.position.end=kn(A.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(W.type)&&(R.call(this,A),b.call(this,A))}function q(){this.data.atHardBreak=!0}function V(){const A=this.resume(),W=this.stack[this.stack.length-1];W.value=A}function H(){const A=this.resume(),W=this.stack[this.stack.length-1];W.value=A}function G(){const A=this.resume(),W=this.stack[this.stack.length-1];W.value=A}function O(){const A=this.stack[this.stack.length-1];if(this.data.inReference){const W=this.data.referenceType||"shortcut";A.type+="Reference",A.referenceType=W,delete A.url,delete A.title}else delete A.identifier,delete A.label;this.data.referenceType=void 0}function L(){const A=this.stack[this.stack.length-1];if(this.data.inReference){const W=this.data.referenceType||"shortcut";A.type+="Reference",A.referenceType=W,delete A.url,delete A.title}else delete A.identifier,delete A.label;this.data.referenceType=void 0}function C(A){const W=this.sliceSerialize(A),Y=this.stack[this.stack.length-2];Y.label=XE(W),Y.identifier=zt(W).toLowerCase()}function B(){const A=this.stack[this.stack.length-1],W=this.resume(),Y=this.stack[this.stack.length-1];if(this.data.inReference=!0,Y.type==="link"){const te=A.children;Y.children=te}else Y.alt=W}function w(){const A=this.resume(),W=this.stack[this.stack.length-1];W.url=A}function J(){const A=this.resume(),W=this.stack[this.stack.length-1];W.title=A}function se(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function Se(A){const W=this.resume(),Y=this.stack[this.stack.length-1];Y.label=W,Y.identifier=zt(this.sliceSerialize(A)).toLowerCase(),this.data.referenceType="full"}function nt(A){this.data.characterReferenceType=A.type}function ue(A){const W=this.sliceSerialize(A),Y=this.data.characterReferenceType;let te;Y?(te=sy(W,Y==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=Wc(W);const ce=this.stack[this.stack.length-1];ce.value+=te}function mt(A){const W=this.stack.pop();W.position.end=kn(A.end)}function Bt(A){b.call(this,A);const W=this.stack[this.stack.length-1];W.url=this.sliceSerialize(A)}function gn(A){b.call(this,A);const W=this.stack[this.stack.length-1];W.url="mailto:"+this.sliceSerialize(A)}function yn(){return{type:"blockquote",children:[]}}function Vn(){return{type:"code",lang:null,meta:null,value:""}}function fl(){return{type:"inlineCode",value:""}}function hl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function pl(){return{type:"emphasis",children:[]}}function xo(){return{type:"heading",depth:0,children:[]}}function I(){return{type:"break"}}function $(){return{type:"html",value:""}}function Te(){return{type:"image",title:null,url:"",alt:null}}function gt(){return{type:"link",title:null,url:"",children:[]}}function Ut(A){return{type:"list",ordered:A.type==="listOrdered",start:null,spread:A._spread,children:[]}}function ex(A){return{type:"listItem",spread:A._spread,checked:null,children:[]}}function tx(){return{type:"paragraph",children:[]}}function nx(){return{type:"strong",children:[]}}function rx(){return{type:"text",value:""}}function ix(){return{type:"thematicBreak"}}}function kn(e){return{line:e.line,column:e.column,offset:e.offset}}function yy(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?yy(e,r):tb(e,r)}}function tb(e,t){let n;for(n in t)if(gy.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function dh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Di({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Di({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Di({start:t.start,end:t.end})+") is still open")}function nb(e){const t=this;t.parser=n;function n(r){return ZE(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function rb(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function ib(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
55
- `}]}function ob(e,t){const n=t.value?t.value+`
56
- `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function sb(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lb(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ab(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=ni(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,l+=1,e.footnoteCounts.set(r,l);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function ub(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cb(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function xy(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function db(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xy(e,t);const i={src:ni(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function fb(e,t){const n={src:ni(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function hb(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function pb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xy(e,t);const i={href:ni(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function mb(e,t){const n={href:ni(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gb(e,t,n){const r=e.all(t),i=n?yb(n):vy(t),o={},s=[];if(typeof t.checked=="boolean"){const f=r[0];let d;f&&f.type==="element"&&f.tagName==="p"?d=f:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const f=r[l];(i||l!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
57
- `}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
58
- `});const c={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,c),e.applyData(t,c)}function yb(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=vy(n[r])}return t}function vy(e){const t=e.spread;return t??e.children.length>1}function xb(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function vb(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kb(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function wb(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sb(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Mc(t.children[1]),u=Jg(t.children[t.children.length-1]);l&&u&&(s.position={start:l,end:u}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function Cb(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let u=-1;const c=[];for(;++u<l;){const d=t.children[u],h={},p=s?s[u]:void 0;p&&(h.align=p);let g={type:"element",tagName:o,properties:h,children:[]};d&&(g.children=e.all(d),e.patch(d,g),g=e.applyData(d,g)),c.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function Eb(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const fh=9,hh=32;function bb(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(ph(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(ph(t.slice(i),i>0,!1)),o.join("")}function ph(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===fh||o===hh;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===fh||o===hh;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Nb(e,t){const n={type:"text",value:bb(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Tb(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const jb={blockquote:rb,break:ib,code:ob,delete:sb,emphasis:lb,footnoteReference:ab,heading:ub,html:cb,imageReference:db,image:fb,inlineCode:hb,linkReference:pb,link:mb,listItem:gb,list:xb,paragraph:vb,root:kb,strong:wb,table:Sb,tableCell:Eb,tableRow:Cb,text:Nb,thematicBreak:Tb,toml:Uo,yaml:Uo,definition:Uo,footnoteDefinition:Uo};function Uo(){}const ky=-1,ul=0,Oi=1,Fs=2,qc=3,Gc=4,Kc=5,Qc=6,wy=7,Sy=8,mh=typeof self=="object"?self:globalThis,_b=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case ul:case ky:return n(s,i);case Oi:{const l=n([],i);for(const u of s)l.push(r(u));return l}case Fs:{const l=n({},i);for(const[u,c]of s)l[r(u)]=r(c);return l}case qc:return n(new Date(s),i);case Gc:{const{source:l,flags:u}=s;return n(new RegExp(l,u),i)}case Kc:{const l=n(new Map,i);for(const[u,c]of s)l.set(r(u),r(c));return l}case Qc:{const l=n(new Set,i);for(const u of s)l.add(r(u));return l}case wy:{const{name:l,message:u}=s;return n(new mh[l](u),i)}case Sy:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(new mh[o](s),i)};return r},gh=e=>_b(new Map,e)(0),xr="",{toString:Ib}={},{keys:Ab}=Object,yi=e=>{const t=typeof e;if(t!=="object"||!e)return[ul,t];const n=Ib.call(e).slice(8,-1);switch(n){case"Array":return[Oi,xr];case"Object":return[Fs,xr];case"Date":return[qc,xr];case"RegExp":return[Gc,xr];case"Map":return[Kc,xr];case"Set":return[Qc,xr];case"DataView":return[Oi,n]}return n.includes("Array")?[Oi,n]:n.includes("Error")?[wy,n]:[Fs,n]},$o=([e,t])=>e===ul&&(t==="function"||t==="symbol"),Rb=(e,t,n,r)=>{const i=(s,l)=>{const u=r.push(s)-1;return n.set(l,u),u},o=s=>{if(n.has(s))return n.get(s);let[l,u]=yi(s);switch(l){case ul:{let f=s;switch(u){case"bigint":l=Sy,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([ky],s)}return i([l,f],s)}case Oi:{if(u){let h=s;return u==="DataView"?h=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(h=new Uint8Array(s)),i([u,[...h]],s)}const f=[],d=i([l,f],s);for(const h of s)f.push(o(h));return d}case Fs:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const f=[],d=i([l,f],s);for(const h of Ab(s))(e||!$o(yi(s[h])))&&f.push([o(h),o(s[h])]);return d}case qc:return i([l,s.toISOString()],s);case Gc:{const{source:f,flags:d}=s;return i([l,{source:f,flags:d}],s)}case Kc:{const f=[],d=i([l,f],s);for(const[h,p]of s)(e||!($o(yi(h))||$o(yi(p))))&&f.push([o(h),o(p)]);return d}case Qc:{const f=[],d=i([l,f],s);for(const h of s)(e||!$o(yi(h)))&&f.push(o(h));return d}}const{message:c}=s;return i([l,{name:u,message:c}],s)};return o},yh=(e,{json:t,lossy:n}={})=>{const r=[];return Rb(!(t||n),!!t,new Map,r)(e),r},zs=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?gh(yh(e,t)):structuredClone(e):(e,t)=>gh(yh(e,t));function Pb(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Db(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Lb(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Pb,r=e.options.footnoteBackLabel||Db,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const f=e.all(c),d=String(c.identifier).toUpperCase(),h=ni(d.toLowerCase());let p=0;const g=[],v=e.footnoteCounts.get(d);for(;v!==void 0&&++p<=v;){g.length>0&&g.push({type:"text",value:" "});let m=typeof n=="string"?n:n(u,p);typeof m=="string"&&(m={type:"text",value:m}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,p),className:["data-footnote-backref"]},children:Array.isArray(m)?m:[m]})}const S=f[f.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const m=S.children[S.children.length-1];m&&m.type==="text"?m.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...g)}else f.push(...g);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(f,!0)};e.patch(c,y),l.push(y)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...zs(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
59
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
60
- `}]}}const cl=function(e){if(e==null)return Mb;if(typeof e=="function")return dl(e);if(typeof e=="object")return Array.isArray(e)?Ob(e):Fb(e);if(typeof e=="string")return zb(e);throw new Error("Expected function, string, or object as test")};function Ob(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=cl(e[n]);return dl(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Fb(e){const t=e;return dl(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function zb(e){return dl(t);function t(n){return n&&n.type===e}}function dl(e){return t;function t(n,r,i){return!!(Bb(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Mb(){return!0}function Bb(e){return e!==null&&typeof e=="object"&&"type"in e}const Cy=[],Ub=!0,ku=!1,$b="skip";function Ey(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=cl(i),s=r?-1:1;l(e,void 0,[])();function l(u,c,f){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=Cy,g,v,S;if((!t||o(u,c,f[f.length-1]||void 0))&&(p=Hb(n(u,f)),p[0]===ku))return p;if("children"in u&&u.children){const y=u;if(y.children&&p[0]!==$b)for(v=(r?y.children.length:-1)+s,S=f.concat(y);v>-1&&v<y.children.length;){const m=y.children[v];if(g=l(m,v,S)(),g[0]===ku)return g;v=typeof g[1]=="number"?g[1]:v+s}}return p}}}function Hb(e){return Array.isArray(e)?e:typeof e=="number"?[Ub,e]:e==null?Cy:[e]}function Yc(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),Ey(e,o,l,i);function l(u,c){const f=c[c.length-1],d=f?f.children.indexOf(u):void 0;return s(u,d,f)}}const wu={}.hasOwnProperty,Wb={};function Vb(e,t){const n=t||Wb,r=new Map,i=new Map,o=new Map,s={...jb,...n.handlers},l={all:c,applyData:Gb,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:u,options:n,patch:qb,wrap:Qb};return Yc(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const d=f.type==="definition"?r:i,h=String(f.identifier).toUpperCase();d.has(h)||d.set(h,f)}}),l;function u(f,d){const h=f.type,p=l.handlers[h];if(wu.call(l.handlers,h)&&p)return p(l,f,d);if(l.options.passThrough&&l.options.passThrough.includes(h)){if("children"in f){const{children:v,...S}=f,y=zs(S);return y.children=l.all(f),y}return zs(f)}return(l.options.unknownHandler||Kb)(l,f,d)}function c(f){const d=[];if("children"in f){const h=f.children;let p=-1;for(;++p<h.length;){const g=l.one(h[p],f);if(g){if(p&&h[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=xh(g.value)),!Array.isArray(g)&&g.type==="element")){const v=g.children[0];v&&v.type==="text"&&(v.value=xh(v.value))}Array.isArray(g)?d.push(...g):d.push(g)}}}return d}}function qb(e,t){e.position&&(t.position=DS(e))}function Gb(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,zs(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Kb(e,t){const n=t.data||{},r="value"in t&&!(wu.call(n,"hProperties")||wu.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Qb(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
61
- `});++r<e.length;)r&&n.push({type:"text",value:`
62
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
63
- `}),n}function xh(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function vh(e,t){const n=Vb(e,t),r=n.one(e,void 0),i=Lb(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
64
- `},i),o}function Yb(e,t){return e&&"run"in e?async function(n,r){const i=vh(n,{file:r,...t});await e.run(i,r)}:function(n,r){return vh(n,{file:r,...e||t})}}function kh(e){if(e)throw e}var us=Object.prototype.hasOwnProperty,by=Object.prototype.toString,wh=Object.defineProperty,Sh=Object.getOwnPropertyDescriptor,Ch=function(t){return typeof Array.isArray=="function"?Array.isArray(t):by.call(t)==="[object Array]"},Eh=function(t){if(!t||by.call(t)!=="[object Object]")return!1;var n=us.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&us.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||us.call(t,i)},bh=function(t,n){wh&&n.name==="__proto__"?wh(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Nh=function(t,n){if(n==="__proto__")if(us.call(t,n)){if(Sh)return Sh(t,n).value}else return;return t[n]},Xb=function e(){var t,n,r,i,o,s,l=arguments[0],u=1,c=arguments.length,f=!1;for(typeof l=="boolean"&&(f=l,l=arguments[1]||{},u=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});u<c;++u)if(t=arguments[u],t!=null)for(n in t)r=Nh(l,n),i=Nh(t,n),l!==i&&(f&&i&&(Eh(i)||(o=Ch(i)))?(o?(o=!1,s=r&&Ch(r)?r:[]):s=r&&Eh(r)?r:{},bh(l,{name:n,newValue:e(f,s,i)})):typeof i<"u"&&bh(l,{name:n,newValue:i}));return l};const Zl=$h(Xb);function Su(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Jb(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...i);function l(u,...c){const f=e[++o];let d=-1;if(u){s(u);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,f?Zb(f,l)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Zb(e,t){let n;return r;function r(...s){const l=e.length>s.length;let u;l&&s.push(i);try{u=e.apply(this,s)}catch(c){const f=c;if(l&&n)throw f;return i(f)}l||(u&&u.then&&typeof u.then=="function"?u.then(o,i):u instanceof Error?i(u):o(u))}function i(s,...l){n||(n=!0,t(s,...l))}function o(s){i(null,s)}}const Vt={basename:eN,dirname:tN,extname:nN,join:rN,sep:"/"};function eN(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');yo(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function tN(e){if(yo(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function nN(e){yo(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function rN(...e){let t=-1,n;for(;++t<e.length;)yo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":iN(n)}function iN(e){yo(e);const t=e.codePointAt(0)===47;let n=oN(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function oN(e,t){let n="",r=0,i=-1,o=0,s=-1,l,u;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else l===46&&o>-1?o++:o=-1}return n}function yo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const sN={cwd:lN};function lN(){return"/"}function Cu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function aN(e){if(typeof e=="string")e=new URL(e);else if(!Cu(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return uN(e)}function uN(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const ea=["history","path","basename","stem","extname","dirname"];class Ny{constructor(t){let n;t?Cu(t)?n={path:t}:typeof t=="string"||cN(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":sN.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ea.length;){const o=ea[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)ea.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Vt.basename(this.path):void 0}set basename(t){na(t,"basename"),ta(t,"basename"),this.path=Vt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Vt.dirname(this.path):void 0}set dirname(t){Th(this.basename,"dirname"),this.path=Vt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Vt.extname(this.path):void 0}set extname(t){if(ta(t,"extname"),Th(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Vt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Cu(t)&&(t=aN(t)),na(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Vt.basename(this.path,this.extname):void 0}set stem(t){na(t,"stem"),ta(t,"stem"),this.path=Vt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new $e(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ta(e,t){if(e&&e.includes(Vt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Vt.sep+"`")}function na(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Th(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function cN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dN=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},fN={}.hasOwnProperty;class Xc extends dN{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Jb()}copy(){const t=new Xc;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Zl(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(oa("data",this.frozen),this.namespace[t]=n,this):fN.call(this.namespace,t)&&this.namespace[t]||void 0:t?(oa("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ho(t),r=this.parser||this.Parser;return ra("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ra("process",this.parser||this.Parser),ia("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const l=Ho(t),u=r.parse(l);r.run(u,l,function(f,d,h){if(f||!d||!h)return c(f);const p=d,g=r.stringify(p,h);mN(g)?h.value=g:h.result=g,c(f,h)});function c(f,d){f||!d?s(f):o?o(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),ra("processSync",this.parser||this.Parser),ia("processSync",this.compiler||this.Compiler),this.process(t,i),_h("processSync","process",n),r;function i(o,s){n=!0,kh(o),r=s}}run(t,n,r){jh(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,l){const u=Ho(n);i.run(t,u,c);function c(f,d,h){const p=d||t;f?l(f):s?s(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),_h("runSync","run",r),i;function o(s,l){kh(s),i=l,r=!0}}stringify(t,n){this.freeze();const r=Ho(n),i=this.compiler||this.Compiler;return ia("stringify",i),jh(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(oa("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...d]=c;u(f,d)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(c.plugins),c.settings&&(i.settings=Zl(!0,i.settings,c.settings))}function l(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const d=c[f];o(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,f){let d=-1,h=-1;for(;++d<r.length;)if(r[d][0]===c){h=d;break}if(h===-1)r.push([c,...f]);else if(f.length>0){let[p,...g]=f;const v=r[h][1];Su(v)&&Su(p)&&(p=Zl(!0,v,p)),r[h]=[c,p,...g]}}}}const hN=new Xc().freeze();function ra(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ia(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function oa(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function jh(e){if(!Su(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _h(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ho(e){return pN(e)?e:new Ny(e)}function pN(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function mN(e){return typeof e=="string"||gN(e)}function gN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const yN="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ih=[],Ah={allowDangerousHtml:!0},xN=/^(https?|ircs?|mailto|xmpp)$/i,vN=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function kN(e){const t=wN(e),n=SN(e);return CN(t.runSync(t.parse(n),n),e)}function wN(e){const t=e.rehypePlugins||Ih,n=e.remarkPlugins||Ih,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ah}:Ah;return hN().use(nb).use(n).use(Yb,r).use(t)}function SN(e){const t=e.children||"",n=new Ny;return typeof t=="string"&&(n.value=t),n}function CN(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,u=t.urlTransform||EN;for(const f of vN)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+yN+f.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Yc(e,c),MS(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function c(f,d,h){if(f.type==="raw"&&h&&typeof d=="number")return s?h.children.splice(d,1):h.children[d]={type:"text",value:f.value},d;if(f.type==="element"){let p;for(p in Yl)if(Object.hasOwn(Yl,p)&&Object.hasOwn(f.properties,p)){const g=f.properties[p],v=Yl[p];(v===null||v.includes(f.tagName))&&(f.properties[p]=u(String(g||""),p,f))}}if(f.type==="element"){let p=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(f,d,h)),p&&h&&typeof d=="number")return l&&f.children?h.children.splice(d,1,...f.children):h.children.splice(d,1),d}}}function EN(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||xN.test(e.slice(0,t))?e:""}function Rh(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function bN(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ty(e,t,n){const i=cl((n||{}).ignore||[]),o=NN(t);let s=-1;for(;++s<o.length;)Ey(e,"text",l);function l(c,f){let d=-1,h;for(;++d<f.length;){const p=f[d],g=h?h.children:void 0;if(i(p,g?g.indexOf(p):void 0,h))return;h=p}if(h)return u(c,f)}function u(c,f){const d=f[f.length-1],h=o[s][0],p=o[s][1];let g=0;const S=d.children.indexOf(c);let y=!1,m=[];h.lastIndex=0;let x=h.exec(c.value);for(;x;){const T=x.index,j={index:x.index,input:x.input,stack:[...f,c]};let E=p(...x,j);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?h.lastIndex=T+1:(g!==T&&m.push({type:"text",value:c.value.slice(g,T)}),Array.isArray(E)?m.push(...E):E&&m.push(E),g=T+x[0].length,y=!0),!h.global)break;x=h.exec(c.value)}return y?(g<c.value.length&&m.push({type:"text",value:c.value.slice(g)}),d.children.splice(S,1,...m)):m=[c],S+m.length}}function NN(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([TN(i[0]),jN(i[1])])}return t}function TN(e){return typeof e=="string"?new RegExp(bN(e),"g"):e}function jN(e){return typeof e=="function"?e:function(){return e}}const sa="phrasing",la=["autolink","link","image","label"];function _N(){return{transforms:[ON],enter:{literalAutolink:AN,literalAutolinkEmail:aa,literalAutolinkHttp:aa,literalAutolinkWww:aa},exit:{literalAutolink:LN,literalAutolinkEmail:DN,literalAutolinkHttp:RN,literalAutolinkWww:PN}}}function IN(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:sa,notInConstruct:la},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:sa,notInConstruct:la},{character:":",before:"[ps]",after:"\\/",inConstruct:sa,notInConstruct:la}]}}function AN(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function aa(e){this.config.enter.autolinkProtocol.call(this,e)}function RN(e){this.config.exit.autolinkProtocol.call(this,e)}function PN(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function DN(e){this.config.exit.autolinkEmail.call(this,e)}function LN(e){this.exit(e)}function ON(e){Ty(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,FN],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),zN]],{ignore:["link","linkReference"]})}function FN(e,t,n,r,i){let o="";if(!jy(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!MN(n)))return!1;const s=BN(n+r);if(!s[0])return!1;const l={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function zN(e,t,n,r){return!jy(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function MN(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function BN(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Rh(e,"(");let o=Rh(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function jy(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ur(n)||ll(n))&&(!t||n!==47)}_y.peek=QN;function UN(){this.buffer()}function $N(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function HN(){this.buffer()}function WN(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function VN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function qN(e){this.exit(e)}function GN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function KN(e){this.exit(e)}function QN(){return"["}function _y(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),l(),s(),o+=i.move("]"),o}function YN(){return{enter:{gfmFootnoteCallString:UN,gfmFootnoteCall:$N,gfmFootnoteDefinitionLabelString:HN,gfmFootnoteDefinition:WN},exit:{gfmFootnoteCallString:VN,gfmFootnoteCall:qN,gfmFootnoteDefinitionLabelString:GN,gfmFootnoteDefinition:KN}}}function XN(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:_y},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,s){const l=o.createTracker(s);let u=l.move("[^");const c=o.enter("footnoteDefinition"),f=o.enter("label");return u+=l.move(o.safe(o.associationId(r),{before:u,after:"]"})),f(),u+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),u+=l.move((t?`
65
- `:" ")+o.indentLines(o.containerFlow(r,l.current()),t?Iy:JN))),c(),u}}function JN(e,t,n){return t===0?e:Iy(e,t,n)}function Iy(e,t,n){return(n?"":" ")+e}const ZN=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ay.peek=iT;function eT(){return{canContainEols:["delete"],enter:{strikethrough:nT},exit:{strikethrough:rT}}}function tT(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ZN}],handlers:{delete:Ay}}}function nT(e){this.enter({type:"delete",children:[]},e)}function rT(e){this.exit(e)}function Ay(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function iT(){return"~"}function oT(e){return e.length}function sT(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||oT,o=[],s=[],l=[],u=[];let c=0,f=-1;for(;++f<e.length;){const v=[],S=[];let y=-1;for(e[f].length>c&&(c=e[f].length);++y<e[f].length;){const m=lT(e[f][y]);if(n.alignDelimiters!==!1){const x=i(m);S[y]=x,(u[y]===void 0||x>u[y])&&(u[y]=x)}v.push(m)}s[f]=v,l[f]=S}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)o[d]=Ph(r[d]);else{const v=Ph(r);for(;++d<c;)o[d]=v}d=-1;const h=[],p=[];for(;++d<c;){const v=o[d];let S="",y="";v===99?(S=":",y=":"):v===108?S=":":v===114&&(y=":");let m=n.alignDelimiters===!1?1:Math.max(1,u[d]-S.length-y.length);const x=S+"-".repeat(m)+y;n.alignDelimiters!==!1&&(m=S.length+m+y.length,m>u[d]&&(u[d]=m),p[d]=m),h[d]=x}s.splice(1,0,h),l.splice(1,0,p),f=-1;const g=[];for(;++f<s.length;){const v=s[f],S=l[f];d=-1;const y=[];for(;++d<c;){const m=v[d]||"";let x="",T="";if(n.alignDelimiters!==!1){const j=u[d]-(S[d]||0),E=o[d];E===114?x=" ".repeat(j):E===99?j%2?(x=" ".repeat(j/2+.5),T=" ".repeat(j/2-.5)):(x=" ".repeat(j/2),T=x):T=" ".repeat(j)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&m==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(x),y.push(m),n.alignDelimiters!==!1&&y.push(T),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&y.push("|")}g.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return g.join(`
66
- `)}function lT(e){return e==null?"":String(e)}function Ph(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function aT(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),uT);return i(),s}function uT(e,t,n){return">"+(n?"":" ")+e}function cT(e,t){return Dh(e,t.inConstruct,!0)&&!Dh(e,t.notInConstruct,!1)}function Dh(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Lh(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
67
- `&&cT(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
68
- `}function dT(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function fT(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function hT(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function pT(e,t,n,r){const i=hT(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(fT(e,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,mT);return d(),h}const l=n.createTracker(r),u=i.repeat(Math.max(dT(o,i)+1,3)),c=n.enter("codeFenced");let f=l.move(u);if(e.lang){const d=n.enter(`codeFencedLang${s}`);f+=l.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);f+=l.move(" "),f+=l.move(n.safe(e.meta,{before:f,after:`
69
- `,encode:["`"],...l.current()})),d()}return f+=l.move(`
70
- `),o&&(f+=l.move(o+`
71
- `)),f+=l.move(u),c(),f}function mT(e,t,n){return(n?"":" ")+e}function Jc(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function gT(e,t,n,r){const i=Jc(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const u=n.createTracker(r);let c=u.move("[");return c+=u.move(n.safe(n.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(l=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":`
72
- `,...u.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),l()),s(),c}function yT(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function io(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ms(e,t,n){const r=Gr(e),i=Gr(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ry.peek=xT;function Ry(e,t,n,r){const i=yT(n),o=n.enter("emphasis"),s=n.createTracker(r),l=s.move(i);let u=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const c=u.charCodeAt(0),f=Ms(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(u=io(c)+u.slice(1));const d=u.charCodeAt(u.length-1),h=Ms(r.after.charCodeAt(0),d,i);h.inside&&(u=u.slice(0,-1)+io(d));const p=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},l+u+p}function xT(e,t,n){return n.options.emphasis||"*"}function vT(e,t){let n=!1;return Yc(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ku}),!!((!e.depth||e.depth<3)&&Hc(e)&&(t.options.setext||n))}function kT(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(vT(e,n)){const f=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(e,{...o.current(),before:`
73
- `,after:`
74
- `});return d(),f(),h+`
75
- `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
76
- `))+1))}const s="#".repeat(i),l=n.enter("headingAtx"),u=n.enter("phrasing");o.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
77
- `,...o.current()});return/^[\t ]/.test(c)&&(c=io(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),u(),l(),c}Py.peek=wT;function Py(e){return e.value||""}function wT(){return"<"}Dy.peek=ST;function Dy(e,t,n,r){const i=Jc(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const u=n.createTracker(r);let c=u.move("![");return c+=u.move(n.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(l=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=u.move(" "+i),c+=u.move(n.safe(e.title,{before:c,after:i,...u.current()})),c+=u.move(i),l()),c+=u.move(")"),s(),c}function ST(){return"!"}Ly.peek=CT;function Ly(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("![");const c=n.safe(e.alt,{before:u,after:"]",...l.current()});u+=l.move(c+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:u,after:"]",...l.current()});return s(),n.stack=f,o(),i==="full"||!c||c!==d?u+=l.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function CT(){return"!"}Oy.peek=ET;function Oy(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],l=n.compilePattern(s);let u;if(s.atBreak)for(;u=l.exec(r);){let c=u.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(u.index+1)}}return i+r+i}function ET(){return"`"}function Fy(e,t){const n=Hc(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}zy.peek=bT;function zy(e,t,n,r){const i=Jc(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let l,u;if(Fy(e,n)){const f=n.stack;n.stack=[],l=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),l(),n.stack=f,d}l=n.enter("link"),u=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(u=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=n.enter(`title${o}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),u()),c+=s.move(")"),l(),c}function bT(e,t,n){return Fy(e,n)?"<":"["}My.peek=NT;function My(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("[");const c=n.containerPhrasing(e,{before:u,after:"]",...l.current()});u+=l.move(c+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:u,after:"]",...l.current()});return s(),n.stack=f,o(),i==="full"||!c||c!==d?u+=l.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=l.move("]"),u}function NT(){return"["}function Zc(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function TT(e){const t=Zc(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function jT(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function By(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function _T(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?jT(n):Zc(n);const l=e.ordered?s==="."?")":".":TT(n);let u=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),By(n)===s&&f){let d=-1;for(;++d<e.children.length;){const h=e.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=l),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),c}function IT(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function AT(e,t,n,r){const i=IT(n);let o=n.bulletCurrent||Zc(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const u=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,l.current()),f);return u(),c;function f(d,h,p){return h?(p?"":" ".repeat(s))+d:(p?o:o+" ".repeat(s-o.length))+d}}function RT(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const PT=cl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function DT(e,t,n,r){return(e.children.some(function(s){return PT(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function LT(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Uy.peek=OT;function Uy(e,t,n,r){const i=LT(n),o=n.enter("strong"),s=n.createTracker(r),l=s.move(i+i);let u=s.move(n.containerPhrasing(e,{after:i,before:l,...s.current()}));const c=u.charCodeAt(0),f=Ms(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(u=io(c)+u.slice(1));const d=u.charCodeAt(u.length-1),h=Ms(r.after.charCodeAt(0),d,i);h.inside&&(u=u.slice(0,-1)+io(d));const p=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:f.outside},l+u+p}function OT(e,t,n){return n.options.strong||"*"}function FT(e,t,n,r){return n.safe(e.value,r)}function zT(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function MT(e,t,n){const r=(By(n)+(n.options.ruleSpaces?" ":"")).repeat(zT(n));return n.options.ruleSpaces?r.slice(0,-1):r}const $y={blockquote:aT,break:Lh,code:pT,definition:gT,emphasis:Ry,hardBreak:Lh,heading:kT,html:Py,image:Dy,imageReference:Ly,inlineCode:Oy,link:zy,linkReference:My,list:_T,listItem:AT,paragraph:RT,root:DT,strong:Uy,text:FT,thematicBreak:MT};function BT(){return{enter:{table:UT,tableData:Oh,tableHeader:Oh,tableRow:HT},exit:{codeText:WT,table:$T,tableData:ua,tableHeader:ua,tableRow:ua}}}function UT(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function $T(e){this.exit(e),this.data.inTable=void 0}function HT(e){this.enter({type:"tableRow",children:[]},e)}function ua(e){this.exit(e)}function Oh(e){this.enter({type:"tableCell",children:[]},e)}function WT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,VT));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function VT(e,t){return t==="|"?t:e}function qT(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
78
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:s,tableCell:u,tableRow:l}};function s(p,g,v,S){return c(f(p,v,S),p.align)}function l(p,g,v,S){const y=d(p,v,S),m=c([y]);return m.slice(0,m.indexOf(`
79
- `))}function u(p,g,v,S){const y=v.enter("tableCell"),m=v.enter("phrasing"),x=v.containerPhrasing(p,{...S,before:o,after:o});return m(),y(),x}function c(p,g){return sT(p,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(p,g,v){const S=p.children;let y=-1;const m=[],x=g.enter("table");for(;++y<S.length;)m[y]=d(S[y],g,v);return x(),m}function d(p,g,v){const S=p.children;let y=-1;const m=[],x=g.enter("tableRow");for(;++y<S.length;)m[y]=u(S[y],p,g,v);return x(),m}function h(p,g,v){let S=$y.inlineCode(p,g,v);return v.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function GT(){return{exit:{taskListCheckValueChecked:Fh,taskListCheckValueUnchecked:Fh,paragraph:QT}}}function KT(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:YT}}}function Fh(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function QT(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const l=i[o];if(l.type==="paragraph"){s=l;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function YT(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);o&&l.move(s);let u=$y.listItem(e,t,n,{...r,...l.current()});return o&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(f){return f+s}}function XT(){return[_N(),YN(),eT(),BT(),GT()]}function JT(e){return{extensions:[IN(),XN(e),tT(),qT(e),KT()]}}const ZT={tokenize:oj,partial:!0},Hy={tokenize:sj,partial:!0},Wy={tokenize:lj,partial:!0},Vy={tokenize:aj,partial:!0},ej={tokenize:uj,partial:!0},qy={name:"wwwAutolink",tokenize:rj,previous:Ky},Gy={name:"protocolAutolink",tokenize:ij,previous:Qy},mn={name:"emailAutolink",tokenize:nj,previous:Yy},Zt={};function tj(){return{text:Zt}}let Gn=48;for(;Gn<123;)Zt[Gn]=mn,Gn++,Gn===58?Gn=65:Gn===91&&(Gn=97);Zt[43]=mn;Zt[45]=mn;Zt[46]=mn;Zt[95]=mn;Zt[72]=[mn,Gy];Zt[104]=[mn,Gy];Zt[87]=[mn,qy];Zt[119]=[mn,qy];function nj(e,t,n){const r=this;let i,o;return s;function s(d){return!Eu(d)||!Yy.call(r,r.previous)||ed(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return Eu(d)?(e.consume(d),l):d===64?(e.consume(d),u):n(d)}function u(d){return d===46?e.check(ej,f,c)(d):d===45||d===95||Be(d)?(o=!0,e.consume(d),u):f(d)}function c(d){return e.consume(d),i=!0,u}function f(d){return o&&i&&We(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function rj(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Ky.call(r,r.previous)||ed(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ZT,e.attempt(Hy,e.attempt(Wy,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function ij(e,t,n){const r=this;let i="",o=!1;return s;function s(d){return(d===72||d===104)&&Qy.call(r,r.previous)&&!ed(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(We(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(d),u}return n(d)}function u(d){return d===47?(e.consume(d),o?c:(o=!0,u)):n(d)}function c(d){return d===null||Os(d)||de(d)||ur(d)||ll(d)?n(d):e.attempt(Hy,e.attempt(Wy,f),n)(d)}function f(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function oj(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function sj(e,t,n){let r,i,o;return s;function s(c){return c===46||c===95?e.check(Vy,u,l)(c):c===null||de(c)||ur(c)||c!==45&&ll(c)?u(c):(o=!0,e.consume(c),s)}function l(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function u(c){return i||r||!o?n(c):t(c)}}function lj(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Vy,t,o)(s):s===null||de(s)||ur(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function aj(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),o):l===93?(e.consume(l),i):l===60||l===null||de(l)||ur(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||de(l)||ur(l)?t(l):r(l)}function o(l){return We(l)?s(l):n(l)}function s(l){return l===59?(e.consume(l),r):We(l)?(e.consume(l),s):n(l)}}function uj(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return Be(o)?n(o):t(o)}}function Ky(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||de(e)}function Qy(e){return!We(e)}function Yy(e){return!(e===47||Eu(e))}function Eu(e){return e===43||e===45||e===46||e===95||Be(e)}function ed(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const cj={tokenize:xj,partial:!0};function dj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:mj,continuation:{tokenize:gj},exit:yj}},text:{91:{name:"gfmFootnoteCall",tokenize:pj},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:fj,resolveTo:hj}}}}function fj(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return l;function l(u){if(!s||!s._balanced)return n(u);const c=zt(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function hj(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function pj(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),u}function u(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(o>999||d===93&&!s||d===null||d===91||de(d))return n(d);if(d===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(zt(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return de(d)||(s=!0),o++,e.consume(d),d===92?f:c}function f(d){return d===91||d===92||d===93?(e.consume(d),o++,c):c(d)}}function mj(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,l;return u;function u(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(s>999||g===93&&!l||g===null||g===91||de(g))return n(g);if(g===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=zt(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return de(g)||(l=!0),s++,e.consume(g),g===92?d:f}function d(g){return g===91||g===92||g===93?(e.consume(g),s++,f):f(g)}function h(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(o)||i.push(o),ie(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function gj(e,t,n){return e.check(go,t,e.attempt(cj,t,n))}function yj(e){e.exit("gfmFootnoteDefinition")}function xj(e,t,n){const r=this;return ie(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function vj(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let c=u;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[u][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[u][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[u][1].start)},h=[["enter",f,l],["enter",s[c][1],l],["exit",s[c][1],l],["enter",d,l]],p=l.parser.constructs.insideSpan.null;p&&at(h,h.length,0,al(p,s.slice(c+1,u),l)),at(h,h.length,0,[["exit",d,l],["enter",s[u][1],l],["exit",s[u][1],l],["exit",f,l]]),at(s,c-1,u-c+3,h),u=c+h.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function o(s,l,u){const c=this.previous,f=this.events;let d=0;return h;function h(g){return c===126&&f[f.length-1][1].type!=="characterEscape"?u(g):(s.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const v=Gr(c);if(g===126)return d>1?u(g):(s.consume(g),d++,p);if(d<2&&!n)return u(g);const S=s.exit("strikethroughSequenceTemporary"),y=Gr(g);return S._open=!y||y===2&&!!v,S._close=!v||v===2&&!!y,l(g)}}}class kj{constructor(){this.map=[]}add(t,n,r){wj(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function wj(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Sj(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Cj(){return{flow:{null:{name:"table",tokenize:Ej,resolveAll:bj}}}}function Ej(e,t,n){const r=this;let i=0,o=0,s;return l;function l(b){let P=r.events.length-1;for(;P>-1;){const H=r.events[P][1].type;if(H==="lineEnding"||H==="linePrefix")P--;else break}const q=P>-1?r.events[P][1].type:null,V=q==="tableHead"||q==="tableRow"?E:u;return V===E&&r.parser.lazy[r.now().line]?n(b):V(b)}function u(b){return e.enter("tableHead"),e.enter("tableRow"),c(b)}function c(b){return b===124||(s=!0,o+=1),f(b)}function f(b){return b===null?n(b):Q(b)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):n(b):Z(b)?ie(e,f,"whitespace")(b):(o+=1,s&&(s=!1,i+=1),b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),d(b)))}function d(b){return b===null||b===124||de(b)?(e.exit("data"),f(b)):(e.consume(b),b===92?h:d)}function h(b){return b===92||b===124?(e.consume(b),d):d(b)}function p(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(b):(e.enter("tableDelimiterRow"),s=!1,Z(b)?ie(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):g(b))}function g(b){return b===45||b===58?S(b):b===124?(s=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),v):j(b)}function v(b){return Z(b)?ie(e,S,"whitespace")(b):S(b)}function S(b){return b===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),y):b===45?(o+=1,y(b)):b===null||Q(b)?T(b):j(b)}function y(b){return b===45?(e.enter("tableDelimiterFiller"),m(b)):j(b)}function m(b){return b===45?(e.consume(b),m):b===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(b))}function x(b){return Z(b)?ie(e,T,"whitespace")(b):T(b)}function T(b){return b===124?g(b):b===null||Q(b)?!s||i!==o?j(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(b)):j(b)}function j(b){return n(b)}function E(b){return e.enter("tableRow"),_(b)}function _(b){return b===124?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),_):b===null||Q(b)?(e.exit("tableRow"),t(b)):Z(b)?ie(e,_,"whitespace")(b):(e.enter("data"),D(b))}function D(b){return b===null||b===124||de(b)?(e.exit("data"),_(b)):(e.consume(b),b===92?R:D)}function R(b){return b===92||b===124?(e.consume(b),D):D(b)}}function bj(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],l=!1,u=0,c,f,d;const h=new kj;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(l=!1,u!==0&&(zh(h,t,u,c,f),f=void 0,u=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],s=[0,n+1,0,0],l&&(l=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],d=Wo(h,t,o,i,void 0,d),o=[0,0,0,0]),s[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],d=Wo(h,t,o,i,void 0,d)),o=s,s=[o[1],n,0,0])):g.type==="tableHead"?(l=!0,u=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(u=n,o[1]!==0?(s[0]=s[1],d=Wo(h,t,o,i,n,d)):s[1]!==0&&(d=Wo(h,t,s,i,n,d)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(s[3]=n)}for(u!==0&&zh(h,t,u,c,f),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=Sj(t.events,n))}return e}function Wo(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(o.end=Object.assign({},vr(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const u=vr(t.events,n[1]);if(o={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const c=vr(t.events,n[2]),f=vr(t.events,n[3]),d={type:l,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,v=n[3]-n[2]-1;e.add(g,v,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(o.end=Object.assign({},vr(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function zh(e,t,n,r,i){const o=[],s=vr(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function vr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Nj={name:"tasklistCheck",tokenize:jj};function Tj(){return{text:{91:Nj}}}function jj(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),o)}function o(u){return de(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):n(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(u)}function l(u){return Q(u)?t(u):Z(u)?e.check({tokenize:_j},t,n)(u):n(u)}}function _j(e,t,n){return ie(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Ij(e){return oy([tj(),dj(),vj(e),Cj(),Tj()])}const Aj={};function Rj(e){const t=this,n=e||Aj,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Ij(n)),o.push(XT()),s.push(JT(n))}function Pj(e){Ty(e,[/\r?\n|\r/g,Dj])}function Dj(){return{type:"break"}}function Lj(){return function(e){Pj(e)}}function Xy({content:e}){return a.jsx("div",{className:"context-markdownXXX",children:a.jsx(kN,{remarkPlugins:[Rj,Lj],children:e.replace(/\\n/g,`
80
- `)})})}function Oj({commands:e,selectedIndex:t,position:n,onSelect:r,onCancel:i}){const o=k.useRef(null);return k.useEffect(()=>{const s=l=>{o.current&&!o.current.contains(l.target)&&i()};return document.addEventListener("mousedown",s),()=>{document.removeEventListener("mousedown",s)}},[i]),e.length===0?null:a.jsx("div",{ref:o,className:"slash-command-menu",style:{left:`${n.x}px`,top:`${n.y}px`},role:"listbox","aria-label":"Slash commands",children:e.map((s,l)=>a.jsxs("button",{type:"button",className:`slash-command-item ${l===t?"selected":""}`,onClick:()=>r(s),role:"option","aria-selected":l===t,children:[a.jsx("div",{className:"slash-command-label",children:s.label}),a.jsx("div",{className:"slash-command-description",children:s.description})]},s.id))})}const Fj=[{id:"h1",label:"/h1",trigger:"h1",markdown:{before:"# "},description:"Heading 1"},{id:"h2",label:"/h2",trigger:"h2",markdown:{before:"## "},description:"Heading 2"},{id:"h3",label:"/h3",trigger:"h3",markdown:{before:"### "},description:"Heading 3"},{id:"h4",label:"/h4",trigger:"h4",markdown:{before:"#### "},description:"Heading 4"},{id:"h5",label:"/h5",trigger:"h5",markdown:{before:"##### "},description:"Heading 5"},{id:"h6",label:"/h6",trigger:"h6",markdown:{before:"###### "},description:"Heading 6"},{id:"bold",label:"/bold",trigger:"bold",markdown:{before:"**",after:"**"},description:"Bold text"},{id:"italic",label:"/italic",trigger:"italic",markdown:{before:"_",after:"_"},description:"Italic text"},{id:"code",label:"/code",trigger:"code",markdown:{before:"`",after:"`"},description:"Inline code"},{id:"codeblock",label:"/codeblock",trigger:"codeblock",markdown:{before:"```\n",after:"\n```"},description:"Code block"},{id:"table",label:"/table",trigger:"table",markdown:{before:`| Column 1 | Column 2 |
81
- | --- | --- |
82
- | | |`},description:"Insert table"},{id:"list",label:"/list",trigger:"list",markdown:{before:"- "},description:"Bullet list"},{id:"numbered",label:"/numbered",trigger:"numbered",markdown:{before:"1. "},description:"Numbered list"},{id:"quote",label:"/quote",trigger:"quote",markdown:{before:"> "},description:"Block quote"},{id:"divider",label:"/divider",trigger:"div",markdown:{before:`
83
- ---
84
- `},description:"Horizontal divider"},{id:"link",label:"/link",trigger:"link",markdown:{before:"[",after:"](url)"},description:"Insert link"}];function zj(e,t){return{id:e.id,label:e.label,description:e.description,action:()=>t(e.markdown.before,e.markdown.after)}}function Mj(e){return Fj.map(t=>zj(t,e))}function Bj({value:e,onChange:t,placeholder:n,disabled:r}){const i=k.useRef(null),[o,s]=k.useState({active:!1,query:"",position:{x:0,y:0},selectedIndex:0,startPosition:0}),u=Mj((g,v="")=>{if(!i.current)return;const S=i.current,y=o.startPosition,m=S.selectionEnd,x=e.substring(0,y),T=e.substring(m),j=x+g+v+T;t(j),s({...o,active:!1}),setTimeout(()=>{const E=y+g.length;S.focus(),S.setSelectionRange(E,E)},0)}),c=o.query?u.filter(g=>g.label.toLowerCase().includes(o.query.toLowerCase())):u,f=g=>{if(!o.active){if(g.key==="/"){const v=i.current;if(!v)return;const S=v.selectionStart,y=e.substring(0,S);if(S===0||y[S-1].match(/\s/)){const m=v.getBoundingClientRect(),x=24,T=y.split(`
85
- `).length;s({active:!0,query:"",position:{x:m.left+16,y:m.top+T*x+40},selectedIndex:0,startPosition:S})}}return}switch(g.key){case"Escape":g.preventDefault(),s({...o,active:!1});break;case"ArrowDown":g.preventDefault(),s({...o,selectedIndex:(o.selectedIndex+1)%c.length});break;case"ArrowUp":g.preventDefault(),s({...o,selectedIndex:o.selectedIndex===0?c.length-1:o.selectedIndex-1});break;case"Enter":case"Tab":g.preventDefault(),c[o.selectedIndex]&&c[o.selectedIndex].action();break;case"Backspace":const v=i.current;v&&v.selectionStart<=o.startPosition&&s({...o,active:!1});break}},d=g=>{const v=g.target.value;if(t(v),o.active&&i.current){const S=i.current.selectionStart,y=v.substring(o.startPosition+1,S);s({...o,query:y,selectedIndex:0})}},h=g=>{g.action()},p=()=>{s({...o,active:!1})};return a.jsx("div",{className:"rich-editor",children:a.jsxs("div",{className:"rich-editor-panes",children:[a.jsxs("div",{className:"rich-editor-pane rich-editor-edit",children:[a.jsx("div",{className:"rich-editor-label",children:"Edit"}),a.jsx("textarea",{ref:i,className:"rich-editor-textarea",value:e,onChange:d,onKeyDown:f,placeholder:n||"Write in markdown...",disabled:r,"aria-label":"Markdown editor"}),o.active&&a.jsx(Oj,{commands:c,selectedIndex:o.selectedIndex,position:o.position,onSelect:h,onCancel:p})]}),a.jsxs("div",{className:"rich-editor-pane rich-editor-preview",children:[a.jsx("div",{className:"rich-editor-label",children:"Preview"}),a.jsx("div",{className:"rich-editor-preview-content",children:e?a.jsx(Xy,{content:e}):a.jsx("div",{className:"rich-editor-empty",children:"Nothing to preview yet"})})]})]})})}function Uj(e,t){const n=new Set,r=[e];for(;r.length>0;){const i=r.shift();n.add(i),t.filter(s=>{const l=s.parentId;return typeof l=="string"&&l===i}).forEach(s=>r.push(s.id))}return n}function Jy({mode:e,page:t,pages:n,onSubmit:r,onCancel:i,isSubmitting:o,defaultParentId:s}){var x;const[l,u]=k.useState((t==null?void 0:t.title)||""),[c,f]=k.useState((t==null?void 0:t.content)||""),[d,h]=k.useState(((x=t==null?void 0:t.tags)==null?void 0:x.map(T=>T.name))||[]),[p,g]=k.useState(()=>{if(e==="create"&&s)return s;const T=t==null?void 0:t.parentId;return typeof T=="string"?T:null}),[v,S]=k.useState(""),y=k.useMemo(()=>{if(e==="create")return n;{const T=Uj(t.id,n);return n.filter(j=>!T.has(j.id))}},[e,n,t]);k.useEffect(()=>{const T=j=>{j.key==="Escape"&&i()};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[i]);const m=async T=>{var j,E;T.preventDefault();try{if(e==="create"){const _={title:l.trim(),content:c.trim(),...d.length>0&&{tagNames:d},...p&&{parentId:p}};await r(_)}else{const _={};let D=!1;l!==t.title&&(_.title=l,D=!0),c!==t.content&&(_.content=c,D=!0);const R=((j=t.tags)==null?void 0:j.map(q=>q.name))||[];JSON.stringify(d.sort())!==JSON.stringify(R.sort())&&(_.tagNames=d,D=!0);const P=typeof t.parentId=="string"?t.parentId:null;if(p!==P&&(_.parentId=p,D=!0),!D){S("No changes to save");return}await r(_)}S("")}catch(_){const D=((E=_==null?void 0:_.body)==null?void 0:E.detail)||(_==null?void 0:_.message)||`Failed to ${e==="create"?"create":"update"} page`;S(D)}};return a.jsxs("form",{className:"context-form",onSubmit:m,children:[v&&a.jsx("div",{className:"context-error",style:{margin:"0 0 16px 0"},children:v}),a.jsxs("div",{className:"context-form-group",children:[a.jsx("label",{htmlFor:`${e}-title`,children:"Title *"}),a.jsx("input",{id:`${e}-title`,type:"text",value:l,onChange:T=>u(T.target.value),placeholder:"Give your page a headline",required:!0,disabled:o})]}),a.jsxs("div",{className:"context-form-group",children:[a.jsx("label",{htmlFor:`${e}-parent`,children:"Parent Page"}),a.jsxs("select",{id:`${e}-parent`,value:p??"",onChange:T=>g(T.target.value||null),disabled:o,children:[a.jsx("option",{value:"",children:"None (top level)"}),y.map(T=>a.jsx("option",{value:T.id,children:T.title},T.id))]})]}),a.jsxs("div",{className:"context-form-group",children:[a.jsx("label",{htmlFor:`${e}-content`,children:"Content *"}),a.jsx(Bj,{value:c,onChange:f,placeholder:"Write in markdown or use / for commands",disabled:o})]}),a.jsxs("div",{className:"context-form-group",children:[a.jsx("label",{htmlFor:`${e}-tags`,children:"Tags"}),a.jsx($0,{value:d,onChange:h,placeholder:"Type to add tags..."})]}),a.jsxs("div",{className:"context-form-actions",children:[a.jsx("button",{type:"button",className:"context-button secondary",onClick:i,disabled:o,children:"Cancel"}),a.jsx("button",{type:"submit",className:"context-button primary",disabled:o,children:o?"Saving…":e==="create"?"Create page":"Save Changes"})]})]})}function Mh(){const e=Oe(),{pageId:t}=fr(),{pages:n,isCreating:r,createPage:i,getPageTree:o}=po(),s=async l=>{const u=await i(l);await o(),e(`/context/page/${u.id}`)};return a.jsxs("div",{className:"context-edit-container",children:[a.jsxs("div",{className:"context-edit-header",children:[a.jsx("h2",{children:"New Page"}),a.jsx("button",{onClick:()=>e("/context"),className:"context-button secondary",children:"Close"})]}),a.jsx(Jy,{mode:"create",pages:n,onSubmit:s,onCancel:()=>e("/context"),isSubmitting:r,defaultParentId:t})]})}function td({message:e,onConfirm:t,onCancel:n,confirmText:r="Confirm",cancelText:i="Cancel"}){return a.jsx("div",{className:"confirm-overlay",onClick:n,children:a.jsxs("div",{className:"confirm-dialog",onClick:o=>o.stopPropagation(),children:[a.jsx("div",{className:"confirm-message",children:e}),a.jsxs("div",{className:"confirm-actions",children:[a.jsx("button",{onClick:n,className:"btn-secondary",children:i}),a.jsx("button",{onClick:t,className:"btn-danger",children:r})]})]})})}function $j(e,t){const n=[];let r=e;for(;r;){const i=t.find(s=>s.id===r);if(!i)break;n.unshift(i);const o=i.parentId;r=typeof o=="string"?o:null}return n}function Hj({pageId:e,pages:t}){const n=$j(e,t);return a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(ar,{to:"/context",className:"breadcrumb-link",children:"Home"}),n.map((r,i)=>a.jsxs("span",{className:"breadcrumb-item",children:[a.jsx("span",{className:"breadcrumb-separator",children:" > "}),i===n.length-1?a.jsx("span",{className:"breadcrumb-current",children:r.title}):a.jsx(ar,{to:`/context/page/${r.id}`,className:"breadcrumb-link",children:r.title})]},r.id))]})}function Bh(e){try{return new Date(e).toLocaleString()}catch{return e}}function Wj(){const{pageId:e}=fr(),t=Oe(),{pages:n,selectedPage:r,isLoadingPage:i,isUpdating:o,isDeleting:s,error:l,selectPage:u,deletePage:c,getPageTree:f}=po(),[d,h]=k.useState(!1),[p,g]=k.useState("");pr(r!=null&&r.title?`Context — ${r.title}`:"Context"),k.useEffect(()=>{e&&u(e)},[e,u]);const v=k.useCallback(()=>{h(!0)},[]),S=k.useCallback(async()=>{var y;if(e)try{await c(e),h(!1),await f(),t("/context")}catch(m){const x=((y=m==null?void 0:m.body)==null?void 0:y.detail)||(m==null?void 0:m.message)||"Failed to delete page";g(x),h(!1)}},[e,c,t,f]);return a.jsxs(a.Fragment,{children:[i&&a.jsx("div",{className:"context-status",children:"Loading page…"}),l&&a.jsx("div",{className:"context-error",children:l}),p&&a.jsx("div",{className:"context-error",children:p}),r&&e&&a.jsxs("div",{className:"context-page-detail",children:[a.jsx(Hj,{pageId:e,pages:n}),a.jsxs("div",{className:"context-page-detail-header",children:[a.jsx("h1",{className:"context-page-detail-title",children:r.title}),a.jsxs("div",{className:"context-page-detail-meta",children:[a.jsxs("span",{children:["By ",r.createdBy||"unknown"]}),a.jsx("span",{children:"•"}),a.jsxs("span",{children:["Created ",Bh(r.createdAt)]}),a.jsx("span",{children:"•"}),a.jsxs("span",{children:["Last edited ",Bh(r.updatedAt)]})]})]}),r.tags&&r.tags.length>0&&a.jsx("div",{className:"context-page-detail-tags",children:r.tags.map(y=>a.jsx(Wg,{tag:y},y.name))}),a.jsx("div",{className:"context-page-detail-content",children:a.jsx(Xy,{content:r.content})}),a.jsxs("div",{className:"context-page-detail-actions",children:[a.jsx("button",{className:"context-button",type:"button",onClick:()=>t(`/context/page/${e}/edit`),disabled:o||s,children:"Edit"}),a.jsx("button",{className:"context-button context-button-danger",type:"button",onClick:v,disabled:o||s,children:"Delete"})]})]}),d&&a.jsx(td,{message:"Are you sure you want to delete this page? This action cannot be undone.",onConfirm:S,onCancel:()=>h(!1),confirmText:"Delete",cancelText:"Cancel"})]})}function Vj(){const{pageId:e}=fr(),t=Oe(),{selectedPage:n,pages:r,isUpdating:i,updatePage:o,getPageTree:s,selectPage:l}=po();k.useEffect(()=>{e&&l(e)},[e,l]);const u=k.useCallback(async c=>{e&&(await o(e,c),await s(),t(`/context/page/${e}`))},[e,o,s,t]);return n?a.jsxs("div",{className:"context-edit-container",children:[a.jsxs("div",{className:"context-edit-header",children:[a.jsx("h2",{children:"Edit Page"}),a.jsx("button",{onClick:()=>t(`/context/page/${e}`),className:"context-button secondary",children:"Close"})]}),a.jsx(Jy,{mode:"edit",page:n,pages:r,onSubmit:u,onCancel:()=>t(`/context/page/${e}`),isSubmitting:i})]}):a.jsx("div",{className:"context-status",children:"Loading..."})}M.BASE=hr;const Zy=()=>{const[e,t]=k.useState(!1),[n,r]=k.useState(null),[i,o]=k.useState([]),[s,l]=k.useState(null),[u,c]=k.useState([]),[f,d]=k.useState([]),[h,p]=k.useState([]);k.useEffect(()=>{g()},[]);const g=async()=>{t(!0),r(null);try{const R=await Ke.mcpRegistryControllerListServers();o(R.items||[])}catch(R){r(R instanceof Error?R.message:"Failed to load servers")}finally{t(!1)}},v=async R=>{t(!0),r(null);try{const[b,P,q]=await Promise.all([Ke.mcpRegistryControllerGetServer(R),Ke.mcpRegistryControllerListScopes(R),Ke.mcpRegistryControllerListConnections(R)]);if(l(b),c(P||[]),d(q||[]),P&&P.length>0){const V=[];for(const H of P)try{const G=await Ke.mcpRegistryControllerListMappings(R,H.id);G&&V.push(...G)}catch(G){console.error(`Failed to load mappings for scope ${H.id}`,G)}p(V)}}catch(b){r(b instanceof Error?b.message:"Failed to load server details")}finally{t(!1)}};return{isLoading:e,error:n,servers:i,selectedServer:s,scopes:u,connections:f,mappings:h,loadServers:g,loadServerDetails:v,createServer:async R=>{t(!0),r(null);try{const b=await Ke.mcpRegistryControllerCreateServer(R);return await g(),b}catch(b){throw r(b instanceof Error?b.message:"Failed to create server"),b}finally{t(!1)}},updateServer:async(R,b)=>{t(!0),r(null);try{const P=await Ke.mcpRegistryControllerUpdateServer(R,b);return(s==null?void 0:s.id)===R&&l(P),await g(),P}catch(P){throw r(P instanceof Error?P.message:"Failed to update server"),P}finally{t(!1)}},createScope:async(R,b,P)=>{t(!0),r(null);try{await Ke.mcpRegistryControllerCreateScopes(R,[{id:b,description:P}]),(s==null?void 0:s.id)===R&&await v(R)}catch(q){throw r(q instanceof Error?q.message:"Failed to create scope"),q}finally{t(!1)}},createConnection:async(R,b)=>{t(!0),r(null);try{await Ke.mcpRegistryControllerCreateConnection(R,b),(s==null?void 0:s.id)===R&&await v(R)}catch(P){throw r(P instanceof Error?P.message:"Failed to create connection"),P}finally{t(!1)}},updateConnection:async(R,b)=>{t(!0),r(null);try{await Ke.mcpRegistryControllerUpdateConnection(R,b),s&&await v(s.id)}catch(P){throw r(P instanceof Error?P.message:"Failed to update connection"),P}finally{t(!1)}},createMapping:async(R,b)=>{t(!0),r(null);try{await Ke.mcpRegistryControllerCreateMapping(R,b),(s==null?void 0:s.id)===R&&await v(R)}catch(P){throw r(P instanceof Error?P.message:"Failed to create mapping"),P}finally{t(!1)}},deleteScope:async(R,b)=>{t(!0),r(null);try{await Ke.mcpRegistryControllerDeleteScope(R,b),(s==null?void 0:s.id)===R&&await v(R)}catch(P){throw r(P instanceof Error?P.message:"Failed to delete scope"),P}finally{t(!1)}},deleteConnection:async R=>{t(!0),r(null);try{await Ke.mcpRegistryControllerDeleteConnection(R),s&&await v(s.id)}catch(b){throw r(b instanceof Error?b.message:"Failed to delete connection"),b}finally{t(!1)}},deleteMapping:async R=>{t(!0),r(null);try{await Ke.mcpRegistryControllerDeleteMapping(R),s&&await v(s.id)}catch(b){throw r(b instanceof Error?b.message:"Failed to delete mapping"),b}finally{t(!1)}}}};function qj(){pr("Tools");const{servers:e,isLoading:t,error:n,createServer:r}=Zy(),i=Oe(),[o,s]=k.useState(!1),[l,u]=k.useState({providedId:"",name:"",description:"",url:""}),c=async f=>{f.preventDefault();try{const d={...l,url:l.url||void 0},h=await r(d);s(!1),u({providedId:"",name:"",description:"",url:""}),h&&i(`/mcp-registry/${h.id}`)}catch(d){console.error("Failed to create server",d)}};return a.jsxs("div",{className:"mcp-registry",children:[a.jsxs("div",{className:"mcp-registry-header",children:[a.jsxs("div",{children:[a.jsx("h1",{children:"Tools"}),a.jsx("p",{className:"subtitle",children:"Manage Model Context Protocol servers and their configurations"})]}),a.jsxs("div",{className:"header-actions",children:[a.jsx(no,{}),a.jsx("button",{onClick:()=>s(!0),className:"btn-primary",children:"+ Add Server"})]})]}),n&&a.jsx("div",{className:"error-message",children:n}),t?a.jsx("div",{className:"loading",children:"Loading servers..."}):a.jsx("div",{className:"servers-grid",children:e.length===0?a.jsxs("div",{className:"empty-state",children:[a.jsx("p",{children:"No MCP servers registered yet."}),a.jsx("button",{onClick:()=>s(!0),className:"btn-primary",children:"Create your first server"})]}):e.map(f=>a.jsxs("div",{className:"server-card",onClick:()=>i(`/mcp-registry/${f.id}`),children:[a.jsx("h3",{children:f.name}),a.jsxs("p",{className:"server-id",children:["ID: ",f.providedId]}),a.jsx("p",{className:"server-description",children:f.description})]},f.id))}),o&&a.jsx("div",{className:"modal-overlay",onClick:()=>s(!1),children:a.jsxs("div",{className:"modal-content",onClick:f=>f.stopPropagation(),children:[a.jsx("h2",{children:"Create MCP Server"}),a.jsxs("form",{onSubmit:c,children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"providedId",children:"Server ID"}),a.jsx("input",{type:"text",id:"providedId",value:l.providedId,onChange:f=>u({...l,providedId:f.target.value}),placeholder:"e.g., my-mcp-server",required:!0}),a.jsx("small",{children:"Unique identifier for this server"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"name",children:"Name"}),a.jsx("input",{type:"text",id:"name",value:l.name,onChange:f=>u({...l,name:f.target.value}),placeholder:"e.g., My MCP Server",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"description",children:"Description"}),a.jsx("textarea",{id:"description",value:l.description,onChange:f=>u({...l,description:f.target.value}),placeholder:"Brief description of this server",rows:3,required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"url",children:"Server URL (optional)"}),a.jsx("input",{type:"url",id:"url",value:l.url,onChange:f=>u({...l,url:f.target.value}),placeholder:"e.g., http://localhost:3000/api/v1/tasks/tasks/mcp"}),a.jsx("small",{children:"URL that MCP clients will use to connect to this server"})]}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:()=>s(!1),className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",children:"Create Server"})]})]})]})})]})}const Gj=()=>{const[e,t]=k.useState(!1),[n,r]=k.useState(null),[i,o]=k.useState(null),[s,l]=k.useState(null),[u,c]=k.useState(null);async function f(h,p){t(!0),r(null);try{const g=Sg(),v=await fetch(`${g}/.well-known/oauth-authorization-server/mcp/issuer`);if(!v.ok)throw new Error("Failed to fetch authorization server issuer URL");const{issuer:S}=await v.json(),y=new URL(`${S}/mcp/${h}/${p}`);o(y);const m=new URL(`${y.origin}/.well-known/oauth-authorization-server${y.pathname}`);l(m),await d(m)}catch(g){r(g instanceof Error?g.message:"Failed to load authorization server configuration"),t(!1)}}async function d(h){t(!0),r(null);try{const g=await(await fetch(h.toString())).json();c(g)}catch(p){r(p instanceof Error?p.message:"Failed to load metadata"),c({})}finally{t(!1)}}return{isLoading:e,error:n,authorizationServerUrl:i,authorizationServerMetadataUrl:s,metadata:u,loadMetadata:f}};function Kj(){const{serverId:e}=fr(),t=Oe(),{selectedServer:n,scopes:r,connections:i,mappings:o,isLoading:s,error:l,loadServerDetails:u,createScope:c,createConnection:f,updateServer:d,updateConnection:h,createMapping:p,deleteScope:g,deleteConnection:v,deleteMapping:S}=Zy(),{metadata:y,authorizationServerMetadataUrl:m,loadMetadata:x}=Gj(),[T,j]=k.useState([]),[E,_]=k.useState(null),[D,R]=k.useState(null),[b,P]=k.useState(null),[q,V]=k.useState(!1),[H,G]=k.useState({name:"",description:"",url:""}),[O,L]=k.useState({scopeId:"",description:""}),[C,B]=k.useState({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""}),[w,J]=k.useState({scopeId:"",mappings:[{connectionId:"",downstreamScope:""}]});pr(n?`${n.name} - Tools`:"Tools"),k.useEffect(()=>{e&&(u(e),E1.authJourneysControllerGetAuthJourneys(e).then(j).catch(()=>j([])))},[e]),k.useEffect(()=>{n&&x(n.providedId,"0.0.0")},[n]);const se=()=>{n&&(G({name:n.name,description:n.description,url:n.url||""}),_("edit-server"))},N=async I=>{if(I.preventDefault(),!!e)try{const $={};H.name&&($.name=H.name),H.description&&($.description=H.description),H.url&&($.url=H.url),await d(e,$),_(null),G({name:"",description:"",url:""})}catch($){console.error("Failed to update server",$)}},Se=async I=>{if(I.preventDefault(),!!e)try{await c(e,O.scopeId,O.description),_(null),L({scopeId:"",description:""})}catch($){console.error("Failed to create scope",$)}},nt=async I=>{if(I.preventDefault(),!!e)try{await f(e,C),_(null),B({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""})}catch($){console.error("Failed to create connection",$)}},ue=I=>{const $=i.find(Te=>Te.id===I);$&&(P(I),B({clientId:$.clientId,clientSecret:"",authorizeUrl:$.authorizeUrl,tokenUrl:$.tokenUrl,friendlyName:$.friendlyName,providedId:$.providedId||""}),_("edit-connection"))},mt=async I=>{if(I.preventDefault(),!!b)try{const $={};C.friendlyName&&($.friendlyName=C.friendlyName),C.providedId&&($.providedId=C.providedId),C.clientId&&($.clientId=C.clientId),C.clientSecret&&($.clientSecret=C.clientSecret),C.authorizeUrl&&($.authorizeUrl=C.authorizeUrl),C.tokenUrl&&($.tokenUrl=C.tokenUrl),await h(b,$),_(null),P(null),B({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""})}catch($){console.error("Failed to update connection",$)}},Bt=async I=>{if(I.preventDefault(),!!e)try{for(const $ of w.mappings)await p(e,{scopeId:w.scopeId,connectionId:$.connectionId,downstreamScope:$.downstreamScope});_(null),J({scopeId:"",mappings:[{connectionId:"",downstreamScope:""}]})}catch($){console.error("Failed to create mapping",$)}},gn=()=>{const I=w.mappings[w.mappings.length-1];J({...w,mappings:[...w.mappings,{connectionId:I.connectionId,downstreamScope:""}]})},yn=I=>{w.mappings.length!==1&&J({...w,mappings:w.mappings.filter(($,Te)=>Te!==I)})},Vn=(I,$,Te)=>{const gt=[...w.mappings];gt[I]={...gt[I],[$]:Te},J({...w,mappings:gt})},fl=async I=>{e&&R({message:"Are you sure you want to delete this scope?",onConfirm:async()=>{try{await g(e,I),R(null)}catch($){console.error("Failed to delete scope",$),R(null)}}})},hl=async I=>{R({message:"Are you sure you want to delete this connection?",onConfirm:async()=>{try{await v(I),R(null)}catch($){console.error("Failed to delete connection",$),R(null)}}})},pl=async I=>{R({message:"Are you sure you want to delete this mapping?",onConfirm:async()=>{try{await S(I),R(null)}catch($){console.error("Failed to delete mapping",$),R(null)}}})},xo=k.useMemo(()=>{const I={};return o.forEach($=>{const Te=r.find(Ut=>Ut.id===$.scopeId),gt=i.find(Ut=>Ut.id===$.connectionId);!Te||!gt||(I[$.scopeId]||(I[$.scopeId]={scope:Te,connections:{}}),I[$.scopeId].connections[$.connectionId]||(I[$.scopeId].connections[$.connectionId]={connection:gt,mappings:[]}),I[$.scopeId].connections[$.connectionId].mappings.push($))}),I},[o,r,i]);return s&&!n?a.jsx("div",{className:"loading",children:"Loading server details..."}):n?a.jsxs("div",{className:"mcp-registry",children:[a.jsxs("div",{className:"mcp-registry-header",children:[a.jsxs("div",{children:[a.jsx("button",{onClick:()=>t("/mcp-registry"),className:"btn-back",children:"← Back to Registry"}),a.jsx("h1",{children:n.name}),a.jsx("p",{className:"subtitle",children:n.description}),a.jsxs("p",{className:"server-id",children:["ID: ",n.providedId]})]}),a.jsx("div",{className:"header-actions",children:a.jsx(no,{})})]}),l&&a.jsx("div",{className:"error-message",children:l}),a.jsxs("div",{className:"info-section",children:[a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[a.jsx("h2",{className:"section-title",children:"Information"}),a.jsx("button",{onClick:se,className:"btn-secondary btn-sm",children:"Edit"})]}),a.jsx("div",{className:"section-divider"}),a.jsxs("div",{className:"info-grid",children:[a.jsxs("div",{className:"info-item",children:[a.jsx("span",{className:"info-label",children:"Name"}),a.jsx("span",{className:"info-value",children:n.name})]}),a.jsxs("div",{className:"info-item",children:[a.jsx("span",{className:"info-label",children:"ID"}),a.jsx("span",{className:"info-value mono",children:n.providedId})]}),i.length>0&&a.jsxs("div",{className:"info-item",children:[a.jsx("span",{className:"info-label",children:"Connections"}),a.jsx("span",{className:"info-value",children:i.map(I=>I.friendlyName).join(", ")})]}),r.length>0&&a.jsxs("div",{className:"info-item",children:[a.jsx("span",{className:"info-label",children:"Scopes"}),a.jsx("span",{className:"info-value",children:r.map(I=>I.id).join(", ")})]}),n.url&&a.jsxs("div",{className:"info-item inspector-command-item",children:[a.jsx("span",{className:"info-label",children:"Inspector Command"}),a.jsxs("div",{className:"inspector-command",children:[a.jsxs("code",{className:"inspector-code",children:["npx @modelcontextprotocol/inspector --transport http --server-url ",n.url]}),a.jsx("button",{className:"btn-secondary btn-sm copy-btn",onClick:()=>{navigator.clipboard.writeText(`npx @modelcontextprotocol/inspector --transport http --server-url ${n.url}`)},title:"Copy to clipboard",children:"Copy"})]})]})]}),y?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"section-divider"}),a.jsxs("div",{className:"metadata-section",children:[a.jsxs("div",{className:"metadata-header",children:[a.jsx("span",{className:"metadata-status",children:"✓ Authorization Server Metadata found"}),a.jsx("button",{onClick:()=>V(!q),className:"btn-link",children:q?"Hide":"Show"})]}),q&&a.jsxs("div",{className:"metadata-content",children:[a.jsx("p",{className:"metadata-url",children:m==null?void 0:m.toString()}),a.jsx("pre",{className:"metadata-json",children:JSON.stringify(y,null,2)})]})]})]}):null]}),a.jsxs("div",{className:"admin-section",children:[a.jsx("h2",{className:"section-title",children:"Administration"}),a.jsx("div",{className:"section-divider"}),a.jsxs("div",{className:"admin-subsection",children:[a.jsx("div",{className:"subsection-header",children:a.jsx("h3",{children:"Permissions"})}),a.jsx("p",{className:"subsection-description",children:"Define the scopes (permissions) that will be available for MCP clients to request when connecting to this server."}),r.length===0?a.jsx("div",{className:"proper-table",children:a.jsx("div",{className:"table-add-row",onClick:()=>_("scope"),children:a.jsx("div",{className:"add-row-cell",children:a.jsx("span",{className:"add-row-text",children:"Add permission..."})})})}):a.jsxs("div",{className:"proper-table",children:[a.jsxs("div",{className:"table-header",children:[a.jsx("div",{className:"table-col-name",children:"Scope Name"}),a.jsx("div",{className:"table-col-description",children:"Description"}),a.jsx("div",{className:"table-col-actions"})]}),r.map(I=>a.jsxs("div",{className:"table-body-row",children:[a.jsx("div",{className:"table-col-name",children:I.id}),a.jsx("div",{className:"table-col-description",children:I.description}),a.jsx("div",{className:"table-col-actions",children:a.jsx("button",{onClick:()=>fl(I.id),className:"btn-delete-small",children:"Delete"})})]},I.id)),a.jsx("div",{className:"table-add-row",onClick:()=>_("scope"),children:a.jsx("div",{className:"add-row-cell",children:a.jsx("span",{className:"add-row-text",children:"Add permission..."})})})]})]}),a.jsx("div",{className:"section-divider"}),a.jsxs("div",{className:"admin-subsection",children:[a.jsx("div",{className:"subsection-header",children:a.jsx("h3",{children:"Connections"})}),a.jsx("p",{className:"subsection-description",children:"Configure connections to downstream systems that support OAuth. The MCP server acts as a secure proxy, managing authentication and authorization on behalf of clients."}),i.length===0?a.jsx("div",{className:"proper-table",children:a.jsx("div",{className:"table-add-row",onClick:()=>_("connection"),children:a.jsx("div",{className:"add-row-cell",children:a.jsx("span",{className:"add-row-text",children:"Add connection..."})})})}):a.jsxs("div",{className:"proper-table",children:[a.jsxs("div",{className:"table-header",children:[a.jsx("div",{className:"table-col-name",children:"Connection Name"}),a.jsx("div",{className:"table-col-description",children:"Description"}),a.jsx("div",{className:"table-col-actions"})]}),i.map(I=>a.jsxs("div",{className:"table-body-row",children:[a.jsx("div",{className:"table-col-name",children:I.friendlyName}),a.jsx("div",{className:"table-col-description",children:I.providedId&&a.jsx("span",{className:"mono",children:I.providedId})}),a.jsxs("div",{className:"table-col-actions",children:[a.jsx("button",{onClick:()=>ue(I.id),className:"btn-secondary btn-sm",children:"Edit"}),a.jsx("button",{onClick:()=>hl(I.id),className:"btn-delete-small",children:"Delete"})]})]},I.id)),a.jsx("div",{className:"table-add-row",onClick:()=>_("connection"),children:a.jsx("div",{className:"add-row-cell",children:a.jsx("span",{className:"add-row-text",children:"Add connection..."})})})]})]}),i.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"section-divider"}),a.jsxs("div",{className:"admin-subsection",children:[a.jsx("div",{className:"subsection-header",children:a.jsx("h3",{children:"Scope Mappings"})}),a.jsx("p",{className:"subsection-description",children:"Map MCP server scopes to downstream connection scopes. When a client requests an MCP scope, the server will request the corresponding downstream scopes from the configured connections."}),o.length===0?a.jsx("div",{className:"mapping-group",children:a.jsx("div",{className:"table-add-row",onClick:()=>r.length>0&&_("mapping"),style:{opacity:r.length===0?.5:1,cursor:r.length===0?"not-allowed":"pointer"},children:a.jsx("span",{className:"add-row-text",children:r.length===0?"Add permissions first to create mappings...":"Add scope mapping..."})})}):a.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[Object.entries(xo).map(([I,$])=>a.jsxs("div",{className:"mapping-group",children:[a.jsxs("div",{className:"mapping-group-header",children:[$.scope.id," → ",Object.keys($.connections).length," connection",Object.keys($.connections).length!==1?"s":""]}),a.jsx("div",{className:"mapping-items",children:Object.entries($.connections).map(([Te,gt])=>gt.mappings.map(Ut=>a.jsxs("div",{className:"mapping-item",children:[a.jsxs("div",{children:[a.jsx("div",{style:{fontSize:"14px",fontWeight:500,color:"#1a202c",marginBottom:"4px"},children:gt.connection.friendlyName}),a.jsx("div",{className:"mapping-item-scope",children:Ut.downstreamScope})]}),a.jsx("button",{onClick:()=>pl(Ut.id),className:"btn-delete-small",title:"Delete mapping",children:"Delete"})]},Ut.id)))})]},I)),a.jsx("div",{className:"mapping-group",children:a.jsx("div",{className:"table-add-row",onClick:()=>r.length>0&&_("mapping"),style:{opacity:r.length===0?.5:1,cursor:r.length===0?"not-allowed":"pointer"},children:a.jsx("span",{className:"add-row-text",children:r.length===0?"Add permissions first to create mappings...":"Add scope mapping..."})})})]})]})]})]}),a.jsxs("div",{className:"admin-section",children:[a.jsx("h2",{className:"section-title",children:"Authorizations"}),a.jsx("div",{className:"section-divider"}),a.jsx("p",{className:"subsection-description",style:{marginBottom:"16px"},children:"Live monitoring of MCP client authorizations and their authentication state"}),T.length===0?a.jsx("p",{style:{color:"#888",fontSize:"14px"},children:"No active authorizations"}):a.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:T.sort((I,$)=>new Date($.updatedAt).getTime()-new Date(I.updatedAt).getTime()).map(I=>a.jsxs("div",{style:{backgroundColor:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:"8px",padding:"16px"},children:[a.jsx("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",marginBottom:"12px"},children:a.jsxs("div",{style:{flex:1},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"4px"},children:[a.jsx("h3",{style:{margin:0,fontSize:"16px",fontWeight:600},children:I.mcpAuthorizationFlow.clientName??"Unknown Client"}),a.jsx("span",{style:{fontSize:"11px",padding:"2px 8px",borderRadius:"4px",backgroundColor:I.status===Wt.status.AUTHORIZATION_CODE_EXCHANGED?"#d4edda":I.status===Wt.status.MCP_AUTH_FLOW_STARTED?"#cfe2ff":I.status===Wt.status.CONNECTIONS_FLOW_STARTED?"#fff3cd":I.status===Wt.status.USER_CONSENT_REJECTED?"#f8d7da":"#e2e3e5",color:I.status===Wt.status.AUTHORIZATION_CODE_EXCHANGED?"#155724":I.status===Wt.status.MCP_AUTH_FLOW_STARTED?"#084298":I.status===Wt.status.CONNECTIONS_FLOW_STARTED?"#664d03":I.status===Wt.status.USER_CONSENT_REJECTED?"#842029":"#383d41"},children:I.status.replace(/_/g," ").toUpperCase()})]}),a.jsxs("div",{style:{fontSize:"11px",color:"#6c757d",lineHeight:"1.5"},children:[I.actor&&a.jsxs("div",{style:{marginBottom:"4px"},children:[a.jsx("strong",{children:"User:"})," ",I.actor.displayName," (",I.actor.slug,")"]}),a.jsxs("div",{children:["Journey ID: ",I.id]}),a.jsxs("div",{children:["Started: ",new Date(I.createdAt).toLocaleString()]}),a.jsxs("div",{children:["Last Update: ",new Date(I.updatedAt).toLocaleString()]})]})]})}),a.jsxs("div",{style:{marginBottom:"12px",paddingLeft:"16px",borderLeft:"2px solid #dee2e6"},children:[a.jsx("div",{style:{fontSize:"14px",fontWeight:500,color:"#495057",marginBottom:"4px"},children:"MCP Authorization"}),a.jsxs("div",{style:{fontSize:"11px",color:"#6c757d",lineHeight:"1.5"},children:[a.jsxs("div",{children:["Status: ",a.jsx("span",{style:{fontWeight:500,color:I.mcpAuthorizationFlow.status===Ri.status.AUTHORIZATION_CODE_EXCHANGED?"#28a745":I.mcpAuthorizationFlow.status===Ri.status.CLIENT_REGISTERED?"#007bff":I.mcpAuthorizationFlow.status===Ri.status.USER_CONSENT_REJECTED?"#dc3545":"#6c757d"},children:I.mcpAuthorizationFlow.status.replace(/_/g," ")})]}),I.mcpAuthorizationFlow.scope&&a.jsxs("div",{children:["Scopes: ",I.mcpAuthorizationFlow.scope]}),I.mcpAuthorizationFlow.authorizationCodeExpiresAt&&a.jsxs("div",{children:["Code Expires: ",new Date(I.mcpAuthorizationFlow.authorizationCodeExpiresAt).toLocaleString()]}),a.jsxs("div",{children:["Code Used: ",I.mcpAuthorizationFlow.authorizationCodeUsed?"Yes":"No"]})]})]}),I.connectionAuthorizationFlows.length>0&&a.jsxs("div",{style:{paddingLeft:"16px",borderLeft:"2px solid #dee2e6"},children:[a.jsxs("div",{style:{fontSize:"14px",fontWeight:500,color:"#495057",marginBottom:"8px"},children:["Downstream Connections (",I.connectionAuthorizationFlows.length,")"]}),a.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:I.connectionAuthorizationFlows.map($=>a.jsxs("div",{style:{backgroundColor:"#ffffff",borderRadius:"4px",padding:"12px"},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"4px"},children:[a.jsx("span",{style:{fontSize:"14px",fontWeight:500},children:$.connectionName??"Unknown Connection"}),a.jsx("span",{style:{fontSize:"11px",padding:"2px 8px",borderRadius:"4px",backgroundColor:$.status===Cn.status.AUTHORIZED?"#d4edda":$.status===Cn.status.PENDING?"#fff3cd":($.status===Cn.status.FAILED,"#f8d7da"),color:$.status===Cn.status.AUTHORIZED?"#155724":$.status===Cn.status.PENDING?"#664d03":$.status===Cn.status.FAILED?"#842029":"#721c24"},children:$.status})]}),a.jsxs("div",{style:{fontSize:"11px",color:"#6c757d",lineHeight:"1.5"},children:[$.tokenExpiresAt&&a.jsxs("div",{children:["Token Expires: ",new Date($.tokenExpiresAt).toLocaleString()]}),a.jsxs("div",{children:["Created: ",new Date($.createdAt).toLocaleString()]})]})]},$.id))})]})]},I.id))})]}),E==="scope"&&a.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:a.jsxs("div",{className:"modal-content",onClick:I=>I.stopPropagation(),children:[a.jsx("h2",{children:"Create Permission"}),a.jsxs("form",{onSubmit:Se,children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"scopeId",children:"Scope ID"}),a.jsx("input",{type:"text",id:"scopeId",value:O.scopeId,onChange:I=>L({...O,scopeId:I.target.value}),placeholder:"e.g., tool:read",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"scopeDescription",children:"Description"}),a.jsx("textarea",{id:"scopeDescription",value:O.description,onChange:I=>L({...O,description:I.target.value}),placeholder:"What does this scope provide?",rows:3,required:!0})]}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:()=>_(null),className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",children:"Create Scope"})]})]})]})}),E==="connection"&&a.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:a.jsxs("div",{className:"modal-content",onClick:I=>I.stopPropagation(),children:[a.jsx("h2",{children:"Create Connection"}),a.jsxs("form",{onSubmit:nt,autoComplete:"off",children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"friendlyName",children:"Friendly Name"}),a.jsx("input",{type:"text",id:"friendlyName",value:C.friendlyName,onChange:I=>B({...C,friendlyName:I.target.value}),placeholder:"e.g., GitHub OAuth",autoComplete:"off",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsxs("label",{htmlFor:"providedId",children:["Provided ID ",a.jsx("span",{style:{color:"#888",fontWeight:"normal"},children:"(optional)"})]}),a.jsx("input",{type:"text",id:"providedId",value:C.providedId,onChange:I=>B({...C,providedId:I.target.value}),placeholder:"e.g., google-oauth, github-integration",pattern:"[a-zA-Z0-9_-]+",title:"Only alphanumeric characters, dashes, and underscores are allowed",autoComplete:"off"}),a.jsx("small",{style:{color:"#888",fontSize:"0.85em",marginTop:"4px",display:"block"},children:"Unique identifier for token exchange (alphanumeric, dash, underscore only)"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"clientId",children:"Client ID"}),a.jsx("input",{type:"text",id:"clientId",value:C.clientId,onChange:I=>B({...C,clientId:I.target.value}),autoComplete:"off",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"clientSecret",children:"Client Secret"}),a.jsx("input",{type:"password",id:"clientSecret",value:C.clientSecret,onChange:I=>B({...C,clientSecret:I.target.value}),autoComplete:"new-password",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"authorizeUrl",children:"Authorize URL"}),a.jsx("input",{type:"url",id:"authorizeUrl",value:C.authorizeUrl,onChange:I=>B({...C,authorizeUrl:I.target.value}),placeholder:"https://...",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"tokenUrl",children:"Token URL"}),a.jsx("input",{type:"url",id:"tokenUrl",value:C.tokenUrl,onChange:I=>B({...C,tokenUrl:I.target.value}),placeholder:"https://...",required:!0})]}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:()=>_(null),className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",children:"Create Connection"})]})]})]})}),E==="edit-connection"&&a.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:a.jsxs("div",{className:"modal-content",onClick:I=>I.stopPropagation(),children:[a.jsx("h2",{children:"Edit Connection"}),a.jsxs("form",{onSubmit:mt,autoComplete:"off",children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"editFriendlyName",children:"Friendly Name"}),a.jsx("input",{type:"text",id:"editFriendlyName",value:C.friendlyName,onChange:I=>B({...C,friendlyName:I.target.value}),placeholder:"e.g., GitHub OAuth",autoComplete:"off",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsxs("label",{htmlFor:"editProvidedId",children:["Provided ID ",a.jsx("span",{style:{color:"#888",fontWeight:"normal"},children:"(optional)"})]}),a.jsx("input",{type:"text",id:"editProvidedId",value:C.providedId,onChange:I=>B({...C,providedId:I.target.value}),placeholder:"e.g., google-oauth, github-integration",pattern:"[a-zA-Z0-9_-]+",title:"Only alphanumeric characters, dashes, and underscores are allowed",autoComplete:"off"}),a.jsx("small",{style:{color:"#888",fontSize:"0.85em",marginTop:"4px",display:"block"},children:"Unique identifier for token exchange (alphanumeric, dash, underscore only)"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"editClientId",children:"Client ID"}),a.jsx("input",{type:"text",id:"editClientId",value:C.clientId,onChange:I=>B({...C,clientId:I.target.value}),autoComplete:"off",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"editClientSecret",children:"Client Secret (leave blank to keep current)"}),a.jsx("input",{type:"password",id:"editClientSecret",value:C.clientSecret,onChange:I=>B({...C,clientSecret:I.target.value}),placeholder:"Enter new secret or leave blank",autoComplete:"new-password"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"editAuthorizeUrl",children:"Authorize URL"}),a.jsx("input",{type:"url",id:"editAuthorizeUrl",value:C.authorizeUrl,onChange:I=>B({...C,authorizeUrl:I.target.value}),placeholder:"https://...",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"editTokenUrl",children:"Token URL"}),a.jsx("input",{type:"url",id:"editTokenUrl",value:C.tokenUrl,onChange:I=>B({...C,tokenUrl:I.target.value}),placeholder:"https://...",required:!0})]}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:()=>{_(null),P(null),B({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""})},className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",children:"Update Connection"})]})]})]})}),E==="edit-server"&&a.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:a.jsxs("div",{className:"modal-content",onClick:I=>I.stopPropagation(),children:[a.jsx("h2",{children:"Edit Server"}),a.jsxs("form",{onSubmit:N,children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"editServerName",children:"Name"}),a.jsx("input",{type:"text",id:"editServerName",value:H.name,onChange:I=>G({...H,name:I.target.value}),placeholder:"e.g., GitHub Integration",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"editServerDescription",children:"Description"}),a.jsx("textarea",{id:"editServerDescription",value:H.description,onChange:I=>G({...H,description:I.target.value}),placeholder:"What does this server provide?",rows:3,required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsxs("label",{htmlFor:"editServerUrl",children:["URL ",a.jsx("span",{style:{color:"#888",fontWeight:"normal"},children:"(optional)"})]}),a.jsx("input",{type:"url",id:"editServerUrl",value:H.url,onChange:I=>G({...H,url:I.target.value}),placeholder:"http://localhost:3000/api/v1/mcp"})]}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:()=>{_(null),G({name:"",description:"",url:""})},className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",children:"Update Server"})]})]})]})}),E==="mapping"&&a.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:a.jsxs("div",{className:"modal-content",onClick:I=>I.stopPropagation(),children:[a.jsx("h2",{children:"Create Scope Mapping"}),a.jsxs("form",{onSubmit:Bt,children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"mappingScopeId",children:"MCP Scope"}),a.jsxs("select",{id:"mappingScopeId",value:w.scopeId,onChange:I=>J({...w,scopeId:I.target.value}),required:!0,children:[a.jsx("option",{value:"",children:"Select a scope"}),r.map(I=>a.jsx("option",{value:I.id,children:I.id},I.id))]})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{children:"Connection & Downstream Scope Mappings"}),w.mappings.map((I,$)=>a.jsxs("div",{className:"mapping-row",children:[a.jsxs("select",{value:I.connectionId,onChange:Te=>Vn($,"connectionId",Te.target.value),required:!0,className:"mapping-connection-select",children:[a.jsx("option",{value:"",children:"Select a connection"}),i.map(Te=>a.jsx("option",{value:Te.id,children:Te.friendlyName},Te.id))]}),a.jsx("input",{type:"text",value:I.downstreamScope,onChange:Te=>Vn($,"downstreamScope",Te.target.value),placeholder:"e.g., repo:read",required:!0,className:"mapping-scope-input"}),w.mappings.length>1&&a.jsx("button",{type:"button",onClick:()=>yn($),className:"btn-remove","aria-label":"Remove mapping",children:"×"})]},$)),a.jsx("button",{type:"button",onClick:gn,className:"btn-add-mapping",children:"+ Add Entry"})]}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:()=>_(null),className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",children:"Create Mapping"})]})]})]})}),D&&a.jsx(td,{message:D.message,onConfirm:D.onConfirm,onCancel:()=>R(null)})]}):a.jsx("div",{className:"error-message",children:"Server not found"})}M.BASE=hr;function Qj(){pr("Authorization Consent - taico");const[e]=o1(),t=e.get("flow"),[n,r]=k.useState(null),[i,o]=k.useState(!0),[s,l]=k.useState(null),[u,c]=k.useState(!1);k.useEffect(()=>{if(!t){l("No authorization flow ID provided"),o(!1);return}f()},[t]);const f=async()=>{if(t){o(!0),l(null);try{const g=await b1.authorizationControllerGetConsentMetadata(t);r(g)}catch(g){l(g instanceof Error?g.message:"Failed to load authorization details")}finally{o(!1)}}},d=async g=>{if(!(!n||!t)){c(!0),l(null);try{const v={flow_id:t,approved:g},S=M.BASE??"",y=document.createElement("form");y.method="POST",y.action=`${S}/api/v1/auth/authorize/mcp/${n.server.providedId}/0.0.0`,Object.entries(v).forEach(([m,x])=>{const T=document.createElement("input");T.type="hidden",T.name=m,T.value=String(x),y.appendChild(T)}),document.body.appendChild(y),y.submit()}catch(v){l(v instanceof Error?v.message:"Failed to submit consent decision"),c(!1)}}},h=()=>{n&&d(!0)},p=()=>{n&&d(!1)};return i?a.jsx("div",{className:"consent-page",children:a.jsx("div",{className:"consent-container",children:a.jsxs("div",{className:"loading-state",children:[a.jsx("div",{className:"spinner"}),a.jsx("p",{children:"Loading authorization details..."})]})})}):s||!n?a.jsx("div",{className:"consent-page",children:a.jsx("div",{className:"consent-container",children:a.jsxs("div",{className:"error-state",children:[a.jsx("h1",{children:"Authorization Error"}),a.jsx("p",{className:"error-message",children:s||"Invalid authorization request"}),a.jsx(no,{})]})})}):a.jsx("div",{className:"consent-page",children:a.jsxs("div",{className:"consent-container",children:[a.jsxs("div",{className:"consent-header",children:[a.jsx("div",{className:"oauth-icon",children:"🔐"}),a.jsx("h1",{children:"Authorization Request"}),a.jsx("p",{className:"subtitle",children:"Review the following authorization request carefully"})]}),a.jsxs("div",{className:"consent-details",children:[a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"WHO is requesting access"}),a.jsxs("div",{className:"client-info",children:[a.jsxs("div",{className:"info-row",children:[a.jsx("span",{className:"label",children:"Client Name:"}),a.jsx("span",{className:"value",children:n.client.clientName})]}),a.jsxs("div",{className:"info-row",children:[a.jsx("span",{className:"label",children:"Client ID:"}),a.jsx("span",{className:"value",children:a.jsx("code",{children:n.client.clientId})})]})]})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"WHAT access is requested"}),n.scopes&&n.scopes.length>0?a.jsxs(a.Fragment,{children:[a.jsx("ul",{className:"scopes-list",children:n.scopes.map(g=>a.jsx("li",{children:a.jsx("span",{className:"scope-badge",children:g})},g))}),a.jsx("p",{style:{marginTop:"12px",fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"These permissions determine what the client can do on your behalf."})]}):a.jsx("p",{style:{fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"No specific permissions requested."})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"WHERE access is granted"}),a.jsxs("div",{className:"server-info",children:[a.jsx("div",{className:"server-name",children:n.server.name}),a.jsxs("div",{className:"server-id",children:["Server ID: ",n.server.providedId]})]}),a.jsxs("div",{className:"resource-info",style:{marginTop:"16px"},children:[a.jsx("div",{style:{fontSize:"13px",color:"#7f8c8d",marginBottom:"8px"},children:"Resource:"}),a.jsx("code",{children:n.resource})]})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"Redirect Information"}),a.jsx("div",{className:"client-info",children:a.jsxs("div",{className:"info-row",children:[a.jsx("span",{className:"label",children:"Redirect URI:"}),a.jsx("span",{className:"value",children:a.jsx("code",{children:n.redirectUri})})]})}),a.jsx("p",{style:{marginTop:"12px",fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"After authorization, you will be redirected to this URL."})]})]}),s&&a.jsx("div",{className:"error-banner",children:s}),a.jsxs("div",{className:"consent-actions",children:[a.jsx("button",{type:"button",className:"btn-deny",onClick:p,disabled:u,children:"Deny"}),a.jsx("button",{type:"button",className:"btn-approve",onClick:h,disabled:u,children:u?"Approving...":"Approve"})]}),a.jsxs("div",{className:"consent-footer",children:[a.jsxs("p",{children:["By approving, you authorize ",a.jsx("strong",{children:n.client.clientName})," to access the specified resources with the requested permissions."]}),a.jsx(no,{})]})]})})}const Uh="agents-sidebar-collapsed";function Yj(){const{agentId:e,sessionId:t}=fr(),n=Oe(),[r,i]=k.useState(()=>{const u=localStorage.getItem(Uh);return u!==null?u==="true":to()});k.useEffect(()=>{localStorage.setItem(Uh,String(r))},[r]);const o=()=>{i(!r)},s=window.location.pathname.includes("/agents/admin"),l=window.location.pathname==="/agents"||window.location.pathname==="/agents/";return a.jsxs("div",{className:"agents-with-sidebar",children:[a.jsxs("aside",{className:`sidebar-app-specific ${r?"collapsed":""}`,children:[a.jsx("nav",{className:"sidebar-content",children:!r&&a.jsxs("div",{children:[a.jsx("div",{className:"agents-sidebar-header",children:a.jsxs("h2",{className:"agents-sidebar-title",children:["🤖 Agents",a.jsx("span",{className:"agents-status-dot disconnected",title:"WebSocket disconnected"})]})}),a.jsx("div",{className:"agents-sidebar-section",children:a.jsxs("div",{className:"agents-nav-list",children:[a.jsx("div",{className:`agents-nav-item ${l?"active":""}`,onClick:()=>n("/agents"),role:"button",tabIndex:0,onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&n("/agents")},title:"Agents",children:"🤖 Agents"}),a.jsx("div",{className:`agents-nav-item ${s?"active":""}`,onClick:()=>n("/agents/admin"),role:"button",tabIndex:0,onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&n("/agents/admin")},title:"Admin",children:"⚙️ Admin"})]})}),a.jsxs("div",{className:"agents-sidebar-section",children:[a.jsx("h3",{className:"agents-sidebar-section-title",children:"History"}),a.jsxs("div",{className:"agents-history-list",children:[a.jsx("div",{className:"agents-history-item",children:"Loading sessions..."}),!1,!1]})]})]})}),a.jsx("button",{className:"sidebar-toggle",onClick:o,"aria-label":r?"Expand sidebar":"Collapse sidebar",children:r?"→":"←"})]}),a.jsx("main",{className:"agents-content",children:a.jsx(Ec,{})})]})}M.BASE=hr;const nd=()=>{const[e,t]=k.useState(!1),[n,r]=k.useState(null),[i,o]=k.useState([]),[s,l]=k.useState(null);k.useEffect(()=>{u()},[]);const u=async()=>{t(!0),r(null);try{const d=await Vl.agentsControllerListAgents();o(d.items||[])}catch(d){r(d instanceof Error?d.message:"Failed to load agents")}finally{t(!1)}};return{agents:i,selectedAgent:s,isLoading:e,error:n,loadAgents:u,loadAgentDetails:async d=>{t(!0),r(null);try{const h=await Vl.agentsControllerGetAgentBySlug(d);l(h)}catch(h){r(h instanceof Error?h.message:"Failed to load agent details")}finally{t(!1)}},createAgent:async d=>{t(!0),r(null);try{const h=await Vl.agentsControllerCreateAgent(d);return await u(),h}catch(h){return r(h instanceof Error?h.message:"Failed to create agent"),null}finally{t(!1)}}}};function Xj(){const e=Oe(),{agents:t,isLoading:n,error:r}=nd();return a.jsxs("div",{className:"agents-home",children:[a.jsxs("div",{className:"agents-home-header",children:[a.jsx("h2",{children:"Available Agents"}),a.jsx("p",{children:"Select an agent to start a new conversation"})]}),n&&a.jsx("div",{className:"agents-loading",children:"Loading agents..."}),r&&a.jsxs("div",{className:"agents-error",children:["Error: ",r]}),!n&&!r&&t.length===0&&a.jsx("div",{className:"agents-empty",children:"No agents available. Create one in the admin panel."}),a.jsx("div",{className:"agents-admin-grid",children:t.map(i=>a.jsxs("div",{className:"agent-admin-card",onClick:()=>e(`/agents/${i.slug||i.actorId}/session/new`),role:"button",tabIndex:0,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&e(`/agents/${i.slug||i.actorId}/session/new`)},children:[a.jsxs("div",{className:"agent-admin-card-header",children:[a.jsx("h3",{children:i.name}),a.jsx("span",{className:`agent-status ${i.isActive?"active":"inactive"}`,children:i.isActive?"Active":"Inactive"})]}),a.jsxs("p",{className:"agent-slug",children:["@",i.slug]}),a.jsx("p",{className:"agent-description",children:typeof i.description=="string"?i.description:i.description?JSON.stringify(i.description):"No description available"}),a.jsxs("p",{className:"agent-tools",children:["Tools: ",i.allowedTools.length>0?i.allowedTools.join(", "):"None"]})]},i.actorId))})]})}function Jj(){const{agents:e,isLoading:t,error:n,createAgent:r}=nd(),i=Oe(),[o,s]=k.useState(!1),[l,u]=k.useState({slug:"",name:"",description:"",systemPrompt:"",allowedTools:"",statusTriggers:"",isActive:!0}),c=async f=>{f.preventDefault();try{const d=await r({slug:l.slug,name:l.name,description:l.description,systemPrompt:l.systemPrompt,allowedTools:l.allowedTools.split(",").map(h=>h.trim()).filter(Boolean),statusTriggers:l.statusTriggers.split(",").map(h=>h.trim()).filter(Boolean),isActive:l.isActive});s(!1),u({slug:"",name:"",description:"",systemPrompt:"",allowedTools:"",statusTriggers:"",isActive:!0}),d&&i(`/agents/${d.actorId}/admin`)}catch(d){console.error("Failed to create agent",d)}};return a.jsxs("div",{className:"agents-admin-list",children:[a.jsxs("div",{className:"agents-admin-header",children:[a.jsxs("div",{children:[a.jsx("h1",{children:"Agents Admin"}),a.jsx("p",{className:"subtitle",children:"Manage agents and their configurations"})]}),a.jsx("div",{className:"header-actions",children:a.jsx("button",{onClick:()=>s(!0),className:"btn-primary",children:"+ Create Agent"})})]}),n&&a.jsx("div",{className:"error-message",children:n}),t?a.jsx("div",{className:"loading",children:"Loading agents..."}):a.jsx("div",{className:"agents-admin-grid",children:e.length===0?a.jsxs("div",{className:"empty-state",children:[a.jsx("p",{children:"No agents created yet."}),a.jsx("button",{onClick:()=>s(!0),className:"btn-primary",children:"Create your first agent"})]}):e.map(f=>a.jsxs("div",{className:"agent-admin-card",onClick:()=>i(`/agents/${f.actorId}/admin`),children:[a.jsxs("div",{className:"agent-admin-card-header",children:[a.jsx("h3",{children:f.name}),a.jsx("span",{className:`agent-status ${f.isActive?"active":"inactive"}`,children:f.isActive?"Active":"Inactive"})]}),a.jsxs("p",{className:"agent-slug",children:["@",f.slug]}),a.jsx("p",{className:"agent-description",children:typeof f.description=="string"?f.description:"No description"}),a.jsxs("p",{className:"agent-tools",children:["Tools: ",f.allowedTools.length>0?f.allowedTools.join(", "):"None"]})]},f.actorId))}),o&&a.jsx("div",{className:"modal-overlay",onClick:()=>s(!1),children:a.jsxs("div",{className:"modal-content",onClick:f=>f.stopPropagation(),children:[a.jsx("h2",{children:"Create Agent"}),a.jsxs("form",{onSubmit:c,children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"slug",children:"Slug"}),a.jsx("input",{type:"text",id:"slug",value:l.slug,onChange:f=>u({...l,slug:f.target.value}),placeholder:"e.g., code-assistant",required:!0}),a.jsx("small",{children:"Unique identifier (lowercase, hyphens allowed)"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"name",children:"Name"}),a.jsx("input",{type:"text",id:"name",value:l.name,onChange:f=>u({...l,name:f.target.value}),placeholder:"e.g., Code Assistant",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"description",children:"Description"}),a.jsx("textarea",{id:"description",value:l.description,onChange:f=>u({...l,description:f.target.value}),placeholder:"Brief description of this agent",rows:2})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"systemPrompt",children:"System Prompt"}),a.jsx("textarea",{id:"systemPrompt",value:l.systemPrompt,onChange:f=>u({...l,systemPrompt:f.target.value}),placeholder:"Core instructions/persona for this agent",rows:5,required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"allowedTools",children:"Allowed Tools"}),a.jsx("input",{type:"text",id:"allowedTools",value:l.allowedTools,onChange:f=>u({...l,allowedTools:f.target.value}),placeholder:"e.g., filesystem, browser, calculator (comma-separated)"}),a.jsx("small",{children:"Comma-separated list of tool identifiers"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"statusTriggers",children:"Status triggers"}),a.jsx("input",{type:"text",id:"statusTriggers",value:l.statusTriggers,onChange:f=>u({...l,statusTriggers:f.target.value}),placeholder:"e.g., NOT_STARTED, IN_PROGRESS, FOR_REVIEW, DONE (comma-separated)"}),a.jsx("small",{children:"Comma-separated list of tool identifiers"})]}),a.jsx("div",{className:"form-group",children:a.jsxs("label",{className:"checkbox-label",children:[a.jsx("input",{type:"checkbox",checked:l.isActive,onChange:f=>u({...l,isActive:f.target.checked})}),a.jsx("span",{children:"Active (available for assignment)"})]})}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:()=>s(!1),className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",children:"Create Agent"})]})]})]})})]})}function Zj(){var g;const{agentId:e}=fr(),t=Oe(),{selectedAgent:n,isLoading:r,error:i,loadAgentDetails:o}=nd(),[s,l]=k.useState(!1),[u,c]=k.useState(null),[f,d]=k.useState({slug:"",name:"",description:"",systemPrompt:"",allowedTools:"",isActive:!0});k.useEffect(()=>{e&&o(e)},[e]),k.useEffect(()=>{var v;n&&d({slug:n.slug,name:n.name,description:((v=n.description)==null?void 0:v.toString())||"",systemPrompt:n.systemPrompt,allowedTools:n.allowedTools.join(", "),isActive:n.isActive})},[n]);const h=async v=>{if(v.preventDefault(),!!e)try{throw new Error("update agent not implemented in the backend")}catch(S){console.error("Failed to update agent",S)}},p=async()=>{e&&c({message:"Are you sure you want to delete this agent? This action cannot be undone.",onConfirm:async()=>{try{throw new Error("delete agent not implemented in the backend")}catch(v){console.error("Failed to delete agent",v),c(null)}}})};return r&&!n?a.jsx("div",{className:"loading",children:"Loading agent details..."}):n?(console.log(n.statusTriggers),a.jsxs("div",{className:"agent-admin-detail",children:[a.jsxs("div",{className:"agent-admin-detail-header",children:[a.jsxs("div",{children:[a.jsx("button",{onClick:()=>t("/agents/admin"),className:"btn-back",children:"← Back to Agents"}),a.jsx("h1",{children:n.name}),a.jsxs("p",{className:"agent-slug",children:["@",n.slug]}),a.jsx("span",{className:`agent-status ${n.isActive?"active":"inactive"}`,children:n.isActive?"Active":"Inactive"})]}),a.jsx("div",{className:"header-actions",children:s?a.jsx("button",{onClick:()=>l(!1),className:"btn-secondary",children:"Cancel Edit"}):a.jsxs(a.Fragment,{children:[a.jsx("button",{onClick:()=>l(!0),className:"btn-secondary",children:"Edit Agent"}),a.jsx("button",{onClick:p,className:"btn-delete",children:"Delete Agent"})]})})]}),i&&a.jsx("div",{className:"error-message",children:i}),s?a.jsxs("form",{onSubmit:h,className:"agent-edit-form",children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"slug",children:"Slug"}),a.jsx("input",{type:"text",id:"slug",value:f.slug,onChange:v=>d({...f,slug:v.target.value}),placeholder:"e.g., code-assistant",required:!0}),a.jsx("small",{children:"Unique identifier (lowercase, hyphens allowed)"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"name",children:"Name"}),a.jsx("input",{type:"text",id:"name",value:f.name,onChange:v=>d({...f,name:v.target.value}),placeholder:"e.g., Code Assistant",required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"description",children:"Description"}),a.jsx("textarea",{id:"description",value:f.description,onChange:v=>d({...f,description:v.target.value}),placeholder:"Brief description of this agent",rows:2})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"systemPrompt",children:"System Prompt"}),a.jsx("textarea",{id:"systemPrompt",value:f.systemPrompt,onChange:v=>d({...f,systemPrompt:v.target.value}),placeholder:"Core instructions/persona for this agent",rows:10,required:!0})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"allowedTools",children:"Allowed Tools"}),a.jsx("input",{type:"text",id:"allowedTools",value:f.allowedTools,onChange:v=>d({...f,allowedTools:v.target.value}),placeholder:"e.g., filesystem, browser, calculator (comma-separated)"}),a.jsx("small",{children:"Comma-separated list of tool identifiers"})]}),a.jsx("div",{className:"form-group",children:a.jsxs("label",{className:"checkbox-label",children:[a.jsx("input",{type:"checkbox",checked:f.isActive,onChange:v=>d({...f,isActive:v.target.checked})}),a.jsx("span",{children:"Active (available for assignment)"})]})}),a.jsxs("div",{className:"form-actions",children:[a.jsx("button",{type:"button",onClick:()=>l(!1),className:"btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",className:"btn-primary",children:"Save Changes"})]})]}):a.jsxs("div",{className:"agent-detail-sections",children:[a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"Basic Information"}),a.jsxs("div",{className:"detail-content",children:[a.jsxs("div",{className:"detail-field",children:[a.jsx("label",{children:"Name"}),a.jsx("p",{children:n.name})]}),a.jsxs("div",{className:"detail-field",children:[a.jsx("label",{children:"Slug"}),a.jsxs("p",{children:["@",n.slug]})]}),a.jsxs("div",{className:"detail-field",children:[a.jsx("label",{children:"Description"}),a.jsx("p",{children:((g=n.description)==null?void 0:g.toString())||"No description"})]}),a.jsxs("div",{className:"detail-field",children:[a.jsx("label",{children:"Status"}),a.jsx("p",{children:n.isActive?"Active":"Inactive"})]})]})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"System Prompt"}),a.jsx("div",{className:"detail-content",children:a.jsx("pre",{className:"system-prompt-display",children:n.systemPrompt})})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"Status Triggers"}),a.jsx("div",{className:"detail-content",children:n.statusTriggers.length>0?a.jsx("div",{className:"tools-list",children:n.statusTriggers.map((v,S)=>a.jsx("span",{className:"tool-badge",children:v},S))}):a.jsx("p",{className:"empty-text",children:"No status triggers configured"})})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"Tag Triggers"}),a.jsx("div",{className:"detail-content",children:n.tagTriggers.length>0?a.jsx("div",{className:"tools-list",children:n.tagTriggers.map((v,S)=>a.jsx("span",{className:"tool-badge",children:v},S))}):a.jsx("p",{className:"empty-text",children:"No tag triggers configured"})})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"Allowed Tools"}),a.jsx("div",{className:"detail-content",children:n.allowedTools.length>0?a.jsx("div",{className:"tools-list",children:n.allowedTools.map((v,S)=>a.jsx("span",{className:"tool-badge",children:v},S))}):a.jsx("p",{className:"empty-text",children:"No tools configured"})})]}),a.jsxs("div",{className:"detail-section",children:[a.jsx("h2",{children:"Metadata"}),a.jsxs("div",{className:"detail-content",children:[a.jsxs("div",{className:"detail-field",children:[a.jsx("label",{children:"Created At"}),a.jsx("p",{children:new Date(n.createdAt).toLocaleString()})]}),a.jsxs("div",{className:"detail-field",children:[a.jsx("label",{children:"Last Updated"}),a.jsx("p",{children:new Date(n.updatedAt).toLocaleString()})]}),a.jsxs("div",{className:"detail-field",children:[a.jsx("label",{children:"Row Version"}),a.jsx("p",{children:n.rowVersion})]})]})]})]}),u&&a.jsx(td,{message:u.message,onConfirm:u.onConfirm,onCancel:()=>c(null)})]})):a.jsx("div",{className:"error-message",children:"Agent not found"})}function e_(){const{logout:e}=_c(),t=Oe();return pt(),k.useEffect(()=>{(async()=>{await e(),t("/login",{replace:!0})})()},[e,t]),a.jsx("div",{className:"logout-page",children:a.jsx("div",{className:"logout-container",children:a.jsx("div",{className:"logout-card",children:a.jsxs("div",{className:"logout-header",children:[a.jsx("h1",{className:"logout-title",children:"Logging Out..."}),a.jsx("p",{className:"logout-subtitle",children:"You are being logged out. Please wait."})]})})})})}function t_(){return A1()?a.jsx(L0,{}):a.jsx(R0,{})}function n_(){return a.jsx(t1,{basename:d1,children:a.jsx(N1,{children:a.jsxs(Iw,{children:[a.jsx(je,{path:"/login",element:a.jsx(j1,{})}),a.jsx(je,{path:"/logout",element:a.jsx(e_,{})}),a.jsxs(je,{element:a.jsx(T1,{children:a.jsx(R1,{})}),children:[a.jsx(je,{index:!0,element:a.jsx(P1,{})}),a.jsx(je,{path:"tasks",element:a.jsx(t_,{})}),a.jsx(je,{path:"mcp-registry",element:a.jsx(qj,{})}),a.jsx(je,{path:"mcp-registry/:serverId",element:a.jsx(Kj,{})}),a.jsx(je,{path:"consent",element:a.jsx(Qj,{})}),a.jsxs(je,{path:"context",element:a.jsx(B0,{}),children:[a.jsx(je,{index:!0,element:a.jsx(U0,{})}),a.jsx(je,{path:"new",element:a.jsx(Mh,{})}),a.jsx(je,{path:"page/:pageId",element:a.jsx(Wj,{})}),a.jsx(je,{path:"page/:pageId/edit",element:a.jsx(Vj,{})}),a.jsx(je,{path:"page/:pageId/new",element:a.jsx(Mh,{})})]}),a.jsxs(je,{path:"agents",element:a.jsx(Yj,{}),children:[a.jsx(je,{index:!0,element:a.jsx(Xj,{})}),a.jsx(je,{path:"admin",element:a.jsx(Jj,{})}),a.jsx(je,{path:":agentId/admin",element:a.jsx(Zj,{})})]})]})]})})})}tg(document.getElementById("root")).render(a.jsx(k.StrictMode,{children:a.jsx("div",{className:"app-shell",children:a.jsx(n_,{})})}));