@jonit-dev/night-watch-cli 1.7.18 → 1.7.20

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 (274) hide show
  1. package/bin/night-watch.mjs +1 -1
  2. package/dist/src/cli.js +13 -4
  3. package/dist/src/cli.js.map +1 -1
  4. package/dist/src/server/index.d.ts.map +1 -1
  5. package/dist/src/server/index.js +14 -22
  6. package/dist/src/server/index.js.map +1 -1
  7. package/dist/src/slack/client.d.ts +4 -0
  8. package/dist/src/slack/client.d.ts.map +1 -1
  9. package/dist/src/slack/client.js +6 -0
  10. package/dist/src/slack/client.js.map +1 -1
  11. package/dist/src/slack/interaction-listener.d.ts +2 -3
  12. package/dist/src/slack/interaction-listener.d.ts.map +1 -1
  13. package/dist/src/slack/interaction-listener.js +30 -14
  14. package/dist/src/slack/interaction-listener.js.map +1 -1
  15. package/dist/src/storage/repositories/sqlite/agent-persona-repository.js +1 -1
  16. package/dist/src/storage/repositories/sqlite/agent-persona-repository.js.map +1 -1
  17. package/package.json +1 -1
  18. package/web/dist/assets/index-DOzZY27d.js +473 -0
  19. package/web/dist/assets/index-w6Q6gxCS.css +1 -0
  20. package/web/dist/index.html +2 -2
  21. package/dist/board/factory.d.ts +0 -3
  22. package/dist/board/factory.d.ts.map +0 -1
  23. package/dist/board/factory.js +0 -10
  24. package/dist/board/factory.js.map +0 -1
  25. package/dist/board/providers/github-graphql.d.ts +0 -16
  26. package/dist/board/providers/github-graphql.d.ts.map +0 -1
  27. package/dist/board/providers/github-graphql.js +0 -43
  28. package/dist/board/providers/github-graphql.js.map +0 -1
  29. package/dist/board/providers/github-projects.d.ts +0 -51
  30. package/dist/board/providers/github-projects.d.ts.map +0 -1
  31. package/dist/board/providers/github-projects.js +0 -672
  32. package/dist/board/providers/github-projects.js.map +0 -1
  33. package/dist/board/types.d.ts +0 -60
  34. package/dist/board/types.d.ts.map +0 -1
  35. package/dist/board/types.js +0 -4
  36. package/dist/board/types.js.map +0 -1
  37. package/dist/cli.d.ts +0 -3
  38. package/dist/cli.d.ts.map +0 -1
  39. package/dist/cli.js +0 -80
  40. package/dist/cli.js.map +0 -1
  41. package/dist/commands/board.d.ts +0 -9
  42. package/dist/commands/board.d.ts.map +0 -1
  43. package/dist/commands/board.js +0 -294
  44. package/dist/commands/board.js.map +0 -1
  45. package/dist/commands/cancel.d.ts +0 -46
  46. package/dist/commands/cancel.d.ts.map +0 -1
  47. package/dist/commands/cancel.js +0 -241
  48. package/dist/commands/cancel.js.map +0 -1
  49. package/dist/commands/dashboard/tab-actions.d.ts +0 -10
  50. package/dist/commands/dashboard/tab-actions.d.ts.map +0 -1
  51. package/dist/commands/dashboard/tab-actions.js +0 -245
  52. package/dist/commands/dashboard/tab-actions.js.map +0 -1
  53. package/dist/commands/dashboard/tab-config.d.ts +0 -21
  54. package/dist/commands/dashboard/tab-config.d.ts.map +0 -1
  55. package/dist/commands/dashboard/tab-config.js +0 -829
  56. package/dist/commands/dashboard/tab-config.js.map +0 -1
  57. package/dist/commands/dashboard/tab-logs.d.ts +0 -10
  58. package/dist/commands/dashboard/tab-logs.d.ts.map +0 -1
  59. package/dist/commands/dashboard/tab-logs.js +0 -178
  60. package/dist/commands/dashboard/tab-logs.js.map +0 -1
  61. package/dist/commands/dashboard/tab-schedules.d.ts +0 -21
  62. package/dist/commands/dashboard/tab-schedules.d.ts.map +0 -1
  63. package/dist/commands/dashboard/tab-schedules.js +0 -304
  64. package/dist/commands/dashboard/tab-schedules.js.map +0 -1
  65. package/dist/commands/dashboard/tab-status.d.ts +0 -32
  66. package/dist/commands/dashboard/tab-status.d.ts.map +0 -1
  67. package/dist/commands/dashboard/tab-status.js +0 -421
  68. package/dist/commands/dashboard/tab-status.js.map +0 -1
  69. package/dist/commands/dashboard/types.d.ts +0 -43
  70. package/dist/commands/dashboard/types.d.ts.map +0 -1
  71. package/dist/commands/dashboard/types.js +0 -5
  72. package/dist/commands/dashboard/types.js.map +0 -1
  73. package/dist/commands/dashboard.d.ts +0 -11
  74. package/dist/commands/dashboard.d.ts.map +0 -1
  75. package/dist/commands/dashboard.js +0 -239
  76. package/dist/commands/dashboard.js.map +0 -1
  77. package/dist/commands/doctor.d.ts +0 -16
  78. package/dist/commands/doctor.d.ts.map +0 -1
  79. package/dist/commands/doctor.js +0 -202
  80. package/dist/commands/doctor.js.map +0 -1
  81. package/dist/commands/history.d.ts +0 -7
  82. package/dist/commands/history.d.ts.map +0 -1
  83. package/dist/commands/history.js +0 -56
  84. package/dist/commands/history.js.map +0 -1
  85. package/dist/commands/init.d.ts +0 -25
  86. package/dist/commands/init.d.ts.map +0 -1
  87. package/dist/commands/init.js +0 -534
  88. package/dist/commands/init.js.map +0 -1
  89. package/dist/commands/install.d.ts +0 -48
  90. package/dist/commands/install.d.ts.map +0 -1
  91. package/dist/commands/install.js +0 -303
  92. package/dist/commands/install.js.map +0 -1
  93. package/dist/commands/logs.d.ts +0 -15
  94. package/dist/commands/logs.d.ts.map +0 -1
  95. package/dist/commands/logs.js +0 -104
  96. package/dist/commands/logs.js.map +0 -1
  97. package/dist/commands/prd-state.d.ts +0 -12
  98. package/dist/commands/prd-state.d.ts.map +0 -1
  99. package/dist/commands/prd-state.js +0 -47
  100. package/dist/commands/prd-state.js.map +0 -1
  101. package/dist/commands/prd.d.ts +0 -24
  102. package/dist/commands/prd.d.ts.map +0 -1
  103. package/dist/commands/prd.js +0 -283
  104. package/dist/commands/prd.js.map +0 -1
  105. package/dist/commands/prds.d.ts +0 -13
  106. package/dist/commands/prds.d.ts.map +0 -1
  107. package/dist/commands/prds.js +0 -196
  108. package/dist/commands/prds.js.map +0 -1
  109. package/dist/commands/prs.d.ts +0 -14
  110. package/dist/commands/prs.d.ts.map +0 -1
  111. package/dist/commands/prs.js +0 -106
  112. package/dist/commands/prs.js.map +0 -1
  113. package/dist/commands/qa.d.ts +0 -30
  114. package/dist/commands/qa.d.ts.map +0 -1
  115. package/dist/commands/qa.js +0 -159
  116. package/dist/commands/qa.js.map +0 -1
  117. package/dist/commands/retry.d.ts +0 -9
  118. package/dist/commands/retry.d.ts.map +0 -1
  119. package/dist/commands/retry.js +0 -72
  120. package/dist/commands/retry.js.map +0 -1
  121. package/dist/commands/review.d.ts +0 -35
  122. package/dist/commands/review.d.ts.map +0 -1
  123. package/dist/commands/review.js +0 -252
  124. package/dist/commands/review.js.map +0 -1
  125. package/dist/commands/run.d.ts +0 -61
  126. package/dist/commands/run.d.ts.map +0 -1
  127. package/dist/commands/run.js +0 -364
  128. package/dist/commands/run.js.map +0 -1
  129. package/dist/commands/serve.d.ts +0 -7
  130. package/dist/commands/serve.d.ts.map +0 -1
  131. package/dist/commands/serve.js +0 -27
  132. package/dist/commands/serve.js.map +0 -1
  133. package/dist/commands/slice.d.ts +0 -26
  134. package/dist/commands/slice.d.ts.map +0 -1
  135. package/dist/commands/slice.js +0 -175
  136. package/dist/commands/slice.js.map +0 -1
  137. package/dist/commands/state.d.ts +0 -8
  138. package/dist/commands/state.d.ts.map +0 -1
  139. package/dist/commands/state.js +0 -56
  140. package/dist/commands/state.js.map +0 -1
  141. package/dist/commands/status.d.ts +0 -14
  142. package/dist/commands/status.d.ts.map +0 -1
  143. package/dist/commands/status.js +0 -147
  144. package/dist/commands/status.js.map +0 -1
  145. package/dist/commands/uninstall.d.ts +0 -25
  146. package/dist/commands/uninstall.d.ts.map +0 -1
  147. package/dist/commands/uninstall.js +0 -141
  148. package/dist/commands/uninstall.js.map +0 -1
  149. package/dist/commands/update.d.ts +0 -21
  150. package/dist/commands/update.d.ts.map +0 -1
  151. package/dist/commands/update.js +0 -87
  152. package/dist/commands/update.js.map +0 -1
  153. package/dist/config.d.ts +0 -23
  154. package/dist/config.d.ts.map +0 -1
  155. package/dist/config.js +0 -601
  156. package/dist/config.js.map +0 -1
  157. package/dist/constants.d.ts +0 -59
  158. package/dist/constants.d.ts.map +0 -1
  159. package/dist/constants.js +0 -110
  160. package/dist/constants.js.map +0 -1
  161. package/dist/server/index.d.ts +0 -23
  162. package/dist/server/index.d.ts.map +0 -1
  163. package/dist/server/index.js +0 -1074
  164. package/dist/server/index.js.map +0 -1
  165. package/dist/storage/json-state-migrator.d.ts +0 -24
  166. package/dist/storage/json-state-migrator.d.ts.map +0 -1
  167. package/dist/storage/json-state-migrator.js +0 -197
  168. package/dist/storage/json-state-migrator.js.map +0 -1
  169. package/dist/storage/repositories/index.d.ts +0 -23
  170. package/dist/storage/repositories/index.d.ts.map +0 -1
  171. package/dist/storage/repositories/index.js +0 -37
  172. package/dist/storage/repositories/index.js.map +0 -1
  173. package/dist/storage/repositories/interfaces.d.ts +0 -37
  174. package/dist/storage/repositories/interfaces.d.ts.map +0 -1
  175. package/dist/storage/repositories/interfaces.js +0 -6
  176. package/dist/storage/repositories/interfaces.js.map +0 -1
  177. package/dist/storage/repositories/sqlite/execution-history-repository.d.ts +0 -21
  178. package/dist/storage/repositories/sqlite/execution-history-repository.d.ts.map +0 -1
  179. package/dist/storage/repositories/sqlite/execution-history-repository.js +0 -94
  180. package/dist/storage/repositories/sqlite/execution-history-repository.js.map +0 -1
  181. package/dist/storage/repositories/sqlite/prd-state-repository.d.ts +0 -17
  182. package/dist/storage/repositories/sqlite/prd-state-repository.d.ts.map +0 -1
  183. package/dist/storage/repositories/sqlite/prd-state-repository.js +0 -74
  184. package/dist/storage/repositories/sqlite/prd-state-repository.js.map +0 -1
  185. package/dist/storage/repositories/sqlite/project-registry-repository.d.ts +0 -16
  186. package/dist/storage/repositories/sqlite/project-registry-repository.d.ts.map +0 -1
  187. package/dist/storage/repositories/sqlite/project-registry-repository.js +0 -34
  188. package/dist/storage/repositories/sqlite/project-registry-repository.js.map +0 -1
  189. package/dist/storage/repositories/sqlite/roadmap-state-repository.d.ts +0 -14
  190. package/dist/storage/repositories/sqlite/roadmap-state-repository.d.ts.map +0 -1
  191. package/dist/storage/repositories/sqlite/roadmap-state-repository.js +0 -47
  192. package/dist/storage/repositories/sqlite/roadmap-state-repository.js.map +0 -1
  193. package/dist/storage/sqlite/client.d.ts +0 -23
  194. package/dist/storage/sqlite/client.d.ts.map +0 -1
  195. package/dist/storage/sqlite/client.js +0 -47
  196. package/dist/storage/sqlite/client.js.map +0 -1
  197. package/dist/storage/sqlite/migrations.d.ts +0 -11
  198. package/dist/storage/sqlite/migrations.d.ts.map +0 -1
  199. package/dist/storage/sqlite/migrations.js +0 -57
  200. package/dist/storage/sqlite/migrations.js.map +0 -1
  201. package/dist/templates/prd-template.d.ts +0 -11
  202. package/dist/templates/prd-template.d.ts.map +0 -1
  203. package/dist/templates/prd-template.js +0 -166
  204. package/dist/templates/prd-template.js.map +0 -1
  205. package/dist/templates/slicer-prompt.d.ts +0 -54
  206. package/dist/templates/slicer-prompt.d.ts.map +0 -1
  207. package/dist/templates/slicer-prompt.js +0 -163
  208. package/dist/templates/slicer-prompt.js.map +0 -1
  209. package/dist/types.d.ts +0 -123
  210. package/dist/types.d.ts.map +0 -1
  211. package/dist/types.js +0 -5
  212. package/dist/types.js.map +0 -1
  213. package/dist/utils/checks.d.ts +0 -55
  214. package/dist/utils/checks.d.ts.map +0 -1
  215. package/dist/utils/checks.js +0 -246
  216. package/dist/utils/checks.js.map +0 -1
  217. package/dist/utils/config-writer.d.ts +0 -16
  218. package/dist/utils/config-writer.d.ts.map +0 -1
  219. package/dist/utils/config-writer.js +0 -45
  220. package/dist/utils/config-writer.js.map +0 -1
  221. package/dist/utils/crontab.d.ts +0 -62
  222. package/dist/utils/crontab.d.ts.map +0 -1
  223. package/dist/utils/crontab.js +0 -168
  224. package/dist/utils/crontab.js.map +0 -1
  225. package/dist/utils/execution-history.d.ts +0 -54
  226. package/dist/utils/execution-history.d.ts.map +0 -1
  227. package/dist/utils/execution-history.js +0 -80
  228. package/dist/utils/execution-history.js.map +0 -1
  229. package/dist/utils/github.d.ts +0 -40
  230. package/dist/utils/github.d.ts.map +0 -1
  231. package/dist/utils/github.js +0 -126
  232. package/dist/utils/github.js.map +0 -1
  233. package/dist/utils/notify.d.ts +0 -63
  234. package/dist/utils/notify.d.ts.map +0 -1
  235. package/dist/utils/notify.js +0 -264
  236. package/dist/utils/notify.js.map +0 -1
  237. package/dist/utils/prd-states.d.ts +0 -16
  238. package/dist/utils/prd-states.d.ts.map +0 -1
  239. package/dist/utils/prd-states.js +0 -28
  240. package/dist/utils/prd-states.js.map +0 -1
  241. package/dist/utils/registry.d.ts +0 -44
  242. package/dist/utils/registry.d.ts.map +0 -1
  243. package/dist/utils/registry.js +0 -86
  244. package/dist/utils/registry.js.map +0 -1
  245. package/dist/utils/roadmap-parser.d.ts +0 -45
  246. package/dist/utils/roadmap-parser.d.ts.map +0 -1
  247. package/dist/utils/roadmap-parser.js +0 -136
  248. package/dist/utils/roadmap-parser.js.map +0 -1
  249. package/dist/utils/roadmap-scanner.d.ts +0 -92
  250. package/dist/utils/roadmap-scanner.d.ts.map +0 -1
  251. package/dist/utils/roadmap-scanner.js +0 -349
  252. package/dist/utils/roadmap-scanner.js.map +0 -1
  253. package/dist/utils/roadmap-state.d.ts +0 -90
  254. package/dist/utils/roadmap-state.d.ts.map +0 -1
  255. package/dist/utils/roadmap-state.js +0 -154
  256. package/dist/utils/roadmap-state.js.map +0 -1
  257. package/dist/utils/script-result.d.ts +0 -12
  258. package/dist/utils/script-result.d.ts.map +0 -1
  259. package/dist/utils/script-result.js +0 -46
  260. package/dist/utils/script-result.js.map +0 -1
  261. package/dist/utils/shell.d.ts +0 -27
  262. package/dist/utils/shell.d.ts.map +0 -1
  263. package/dist/utils/shell.js +0 -64
  264. package/dist/utils/shell.js.map +0 -1
  265. package/dist/utils/status-data.d.ts +0 -148
  266. package/dist/utils/status-data.d.ts.map +0 -1
  267. package/dist/utils/status-data.js +0 -593
  268. package/dist/utils/status-data.js.map +0 -1
  269. package/dist/utils/ui.d.ts +0 -55
  270. package/dist/utils/ui.d.ts.map +0 -1
  271. package/dist/utils/ui.js +0 -121
  272. package/dist/utils/ui.js.map +0 -1
  273. package/web/dist/assets/index-BtxQU4oX.css +0 -1
  274. package/web/dist/assets/index-D3awZ0gS.js +0 -473
@@ -1,473 +0,0 @@
1
- (function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))r(m);new MutationObserver(m=>{for(const f of m)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function d(m){const f={};return m.integrity&&(f.integrity=m.integrity),m.referrerPolicy&&(f.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?f.credentials="include":m.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(m){if(m.ep)return;m.ep=!0;const f=d(m);fetch(m.href,f)}})();function vu(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var eu={exports:{}},Wn={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Ym;function Sp(){if(Ym)return Wn;Ym=1;var c=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function d(r,m,f){var h=null;if(f!==void 0&&(h=""+f),m.key!==void 0&&(h=""+m.key),"key"in m){f={};for(var v in m)v!=="key"&&(f[v]=m[v])}else f=m;return m=f.ref,{$$typeof:c,type:r,key:h,ref:m!==void 0?m:null,props:f}}return Wn.Fragment=o,Wn.jsx=d,Wn.jsxs=d,Wn}var Gm;function wp(){return Gm||(Gm=1,eu.exports=Sp()),eu.exports}var n=wp(),tu={exports:{}},fe={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Qm;function Cp(){if(Qm)return fe;Qm=1;var c=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),D=Symbol.iterator;function z(j){return j===null||typeof j!="object"?null:(j=D&&j[D]||j["@@iterator"],typeof j=="function"?j:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,R={};function Q(j,G,W){this.props=j,this.context=G,this.refs=R,this.updater=W||U}Q.prototype.isReactComponent={},Q.prototype.setState=function(j,G){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,G,"setState")},Q.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function q(){}q.prototype=Q.prototype;function L(j,G,W){this.props=j,this.context=G,this.refs=R,this.updater=W||U}var J=L.prototype=new q;J.constructor=L,A(J,Q.prototype),J.isPureReactComponent=!0;var B=Array.isArray;function C(){}var V={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function P(j,G,W){var I=W.ref;return{$$typeof:c,type:j,key:G,ref:I!==void 0?I:null,props:W}}function ue(j,G){return P(j.type,G,j.props)}function xe(j){return typeof j=="object"&&j!==null&&j.$$typeof===c}function $(j){var G={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(W){return G[W]})}var ie=/\/+/g;function we(j,G){return typeof j=="object"&&j!==null&&j.key!=null?$(""+j.key):G.toString(36)}function se(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(C,C):(j.status="pending",j.then(function(G){j.status==="pending"&&(j.status="fulfilled",j.value=G)},function(G){j.status==="pending"&&(j.status="rejected",j.reason=G)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function k(j,G,W,I,oe){var de=typeof j;(de==="undefined"||de==="boolean")&&(j=null);var Ne=!1;if(j===null)Ne=!0;else switch(de){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(j.$$typeof){case c:case o:Ne=!0;break;case N:return Ne=j._init,k(Ne(j._payload),G,W,I,oe)}}if(Ne)return oe=oe(j),Ne=I===""?"."+we(j,0):I,B(oe)?(W="",Ne!=null&&(W=Ne.replace(ie,"$&/")+"/"),k(oe,G,W,"",function(bl){return bl})):oe!=null&&(xe(oe)&&(oe=ue(oe,W+(oe.key==null||j&&j.key===oe.key?"":(""+oe.key).replace(ie,"$&/")+"/")+Ne)),G.push(oe)),1;Ne=0;var He=I===""?".":I+":";if(B(j))for(var _e=0;_e<j.length;_e++)I=j[_e],de=He+we(I,_e),Ne+=k(I,G,W,de,oe);else if(_e=z(j),typeof _e=="function")for(j=_e.call(j),_e=0;!(I=j.next()).done;)I=I.value,de=He+we(I,_e++),Ne+=k(I,G,W,de,oe);else if(de==="object"){if(typeof j.then=="function")return k(se(j),G,W,I,oe);throw G=String(j),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function F(j,G,W){if(j==null)return j;var I=[],oe=0;return k(j,I,"","",function(de){return G.call(W,de,oe++)}),I}function ae(j){if(j._status===-1){var G=j._result;G=G(),G.then(function(W){(j._status===0||j._status===-1)&&(j._status=1,j._result=W)},function(W){(j._status===0||j._status===-1)&&(j._status=2,j._result=W)}),j._status===-1&&(j._status=0,j._result=G)}if(j._status===1)return j._result.default;throw j._result}var pe=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},K={map:F,forEach:function(j,G,W){F(j,function(){G.apply(this,arguments)},W)},count:function(j){var G=0;return F(j,function(){G++}),G},toArray:function(j){return F(j,function(G){return G})||[]},only:function(j){if(!xe(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return fe.Activity=w,fe.Children=K,fe.Component=Q,fe.Fragment=d,fe.Profiler=m,fe.PureComponent=L,fe.StrictMode=r,fe.Suspense=g,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,fe.__COMPILER_RUNTIME={__proto__:null,c:function(j){return V.H.useMemoCache(j)}},fe.cache=function(j){return function(){return j.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(j,G,W){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var I=A({},j.props),oe=j.key;if(G!=null)for(de in G.key!==void 0&&(oe=""+G.key),G)!Z.call(G,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&G.ref===void 0||(I[de]=G[de]);var de=arguments.length-2;if(de===1)I.children=W;else if(1<de){for(var Ne=Array(de),He=0;He<de;He++)Ne[He]=arguments[He+2];I.children=Ne}return P(j.type,oe,I)},fe.createContext=function(j){return j={$$typeof:h,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:f,_context:j},j},fe.createElement=function(j,G,W){var I,oe={},de=null;if(G!=null)for(I in G.key!==void 0&&(de=""+G.key),G)Z.call(G,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(oe[I]=G[I]);var Ne=arguments.length-2;if(Ne===1)oe.children=W;else if(1<Ne){for(var He=Array(Ne),_e=0;_e<Ne;_e++)He[_e]=arguments[_e+2];oe.children=He}if(j&&j.defaultProps)for(I in Ne=j.defaultProps,Ne)oe[I]===void 0&&(oe[I]=Ne[I]);return P(j,de,oe)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(j){return{$$typeof:v,render:j}},fe.isValidElement=xe,fe.lazy=function(j){return{$$typeof:N,_payload:{_status:-1,_result:j},_init:ae}},fe.memo=function(j,G){return{$$typeof:p,type:j,compare:G===void 0?null:G}},fe.startTransition=function(j){var G=V.T,W={};V.T=W;try{var I=j(),oe=V.S;oe!==null&&oe(W,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(C,pe)}catch(de){pe(de)}finally{G!==null&&W.types!==null&&(G.types=W.types),V.T=G}},fe.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},fe.use=function(j){return V.H.use(j)},fe.useActionState=function(j,G,W){return V.H.useActionState(j,G,W)},fe.useCallback=function(j,G){return V.H.useCallback(j,G)},fe.useContext=function(j){return V.H.useContext(j)},fe.useDebugValue=function(){},fe.useDeferredValue=function(j,G){return V.H.useDeferredValue(j,G)},fe.useEffect=function(j,G){return V.H.useEffect(j,G)},fe.useEffectEvent=function(j){return V.H.useEffectEvent(j)},fe.useId=function(){return V.H.useId()},fe.useImperativeHandle=function(j,G,W){return V.H.useImperativeHandle(j,G,W)},fe.useInsertionEffect=function(j,G){return V.H.useInsertionEffect(j,G)},fe.useLayoutEffect=function(j,G){return V.H.useLayoutEffect(j,G)},fe.useMemo=function(j,G){return V.H.useMemo(j,G)},fe.useOptimistic=function(j,G){return V.H.useOptimistic(j,G)},fe.useReducer=function(j,G,W){return V.H.useReducer(j,G,W)},fe.useRef=function(j){return V.H.useRef(j)},fe.useState=function(j){return V.H.useState(j)},fe.useSyncExternalStore=function(j,G,W){return V.H.useSyncExternalStore(j,G,W)},fe.useTransition=function(){return V.H.useTransition()},fe.version="19.2.4",fe}var Vm;function bu(){return Vm||(Vm=1,tu.exports=Cp()),tu.exports}var y=bu();const Qe=vu(y);var lu={exports:{}},Pn={},au={exports:{}},nu={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and 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
- */var Xm;function Ep(){return Xm||(Xm=1,(function(c){function o(k,F){var ae=k.length;k.push(F);e:for(;0<ae;){var pe=ae-1>>>1,K=k[pe];if(0<m(K,F))k[pe]=F,k[ae]=K,ae=pe;else break e}}function d(k){return k.length===0?null:k[0]}function r(k){if(k.length===0)return null;var F=k[0],ae=k.pop();if(ae!==F){k[0]=ae;e:for(var pe=0,K=k.length,j=K>>>1;pe<j;){var G=2*(pe+1)-1,W=k[G],I=G+1,oe=k[I];if(0>m(W,ae))I<K&&0>m(oe,W)?(k[pe]=oe,k[I]=ae,pe=I):(k[pe]=W,k[G]=ae,pe=G);else if(I<K&&0>m(oe,ae))k[pe]=oe,k[I]=ae,pe=I;else break e}}return F}function m(k,F){var ae=k.sortIndex-F.sortIndex;return ae!==0?ae:k.id-F.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;c.unstable_now=function(){return f.now()}}else{var h=Date,v=h.now();c.unstable_now=function(){return h.now()-v}}var g=[],p=[],N=1,w=null,D=3,z=!1,U=!1,A=!1,R=!1,Q=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function J(k){for(var F=d(p);F!==null;){if(F.callback===null)r(p);else if(F.startTime<=k)r(p),F.sortIndex=F.expirationTime,o(g,F);else break;F=d(p)}}function B(k){if(A=!1,J(k),!U)if(d(g)!==null)U=!0,C||(C=!0,$());else{var F=d(p);F!==null&&se(B,F.startTime-k)}}var C=!1,V=-1,Z=5,P=-1;function ue(){return R?!0:!(c.unstable_now()-P<Z)}function xe(){if(R=!1,C){var k=c.unstable_now();P=k;var F=!0;try{e:{U=!1,A&&(A=!1,q(V),V=-1),z=!0;var ae=D;try{t:{for(J(k),w=d(g);w!==null&&!(w.expirationTime>k&&ue());){var pe=w.callback;if(typeof pe=="function"){w.callback=null,D=w.priorityLevel;var K=pe(w.expirationTime<=k);if(k=c.unstable_now(),typeof K=="function"){w.callback=K,J(k),F=!0;break t}w===d(g)&&r(g),J(k)}else r(g);w=d(g)}if(w!==null)F=!0;else{var j=d(p);j!==null&&se(B,j.startTime-k),F=!1}}break e}finally{w=null,D=ae,z=!1}F=void 0}}finally{F?$():C=!1}}}var $;if(typeof L=="function")$=function(){L(xe)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,we=ie.port2;ie.port1.onmessage=xe,$=function(){we.postMessage(null)}}else $=function(){Q(xe,0)};function se(k,F){V=Q(function(){k(c.unstable_now())},F)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(k){k.callback=null},c.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<k?Math.floor(1e3/k):5},c.unstable_getCurrentPriorityLevel=function(){return D},c.unstable_next=function(k){switch(D){case 1:case 2:case 3:var F=3;break;default:F=D}var ae=D;D=F;try{return k()}finally{D=ae}},c.unstable_requestPaint=function(){R=!0},c.unstable_runWithPriority=function(k,F){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var ae=D;D=k;try{return F()}finally{D=ae}},c.unstable_scheduleCallback=function(k,F,ae){var pe=c.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?pe+ae:pe):ae=pe,k){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=ae+K,k={id:N++,callback:F,priorityLevel:k,startTime:ae,expirationTime:K,sortIndex:-1},ae>pe?(k.sortIndex=ae,o(p,k),d(g)===null&&k===d(p)&&(A?(q(V),V=-1):A=!0,se(B,ae-pe))):(k.sortIndex=K,o(g,k),U||z||(U=!0,C||(C=!0,$()))),k},c.unstable_shouldYield=ue,c.unstable_wrapCallback=function(k){var F=D;return function(){var ae=D;D=F;try{return k.apply(this,arguments)}finally{D=ae}}}})(nu)),nu}var Zm;function Ap(){return Zm||(Zm=1,au.exports=Ep()),au.exports}var su={exports:{}},it={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and 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 $m;function Tp(){if($m)return it;$m=1;var c=bu();function o(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var N=2;N<arguments.length;N++)p+="&args[]="+encodeURIComponent(arguments[N])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var r={d:{f:d,r:function(){throw Error(o(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},m=Symbol.for("react.portal");function f(g,p,N){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:w==null?null:""+w,children:g,containerInfo:p,implementation:N}}var h=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return it.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,it.createPortal=function(g,p){var N=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(o(299));return f(g,p,null,N)},it.flushSync=function(g){var p=h.T,N=r.p;try{if(h.T=null,r.p=2,g)return g()}finally{h.T=p,r.p=N,r.d.f()}},it.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(g,p))},it.prefetchDNS=function(g){typeof g=="string"&&r.d.D(g)},it.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var N=p.as,w=v(N,p.crossOrigin),D=typeof p.integrity=="string"?p.integrity:void 0,z=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;N==="style"?r.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:w,integrity:D,fetchPriority:z}):N==="script"&&r.d.X(g,{crossOrigin:w,integrity:D,fetchPriority:z,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},it.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var N=v(p.as,p.crossOrigin);r.d.M(g,{crossOrigin:N,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(g)},it.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var N=p.as,w=v(N,p.crossOrigin);r.d.L(g,N,{crossOrigin:w,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},it.preloadModule=function(g,p){if(typeof g=="string")if(p){var N=v(p.as,p.crossOrigin);r.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:N,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(g)},it.requestFormReset=function(g){r.d.r(g)},it.unstable_batchedUpdates=function(g,p){return g(p)},it.useFormState=function(g,p,N){return h.H.useFormState(g,p,N)},it.useFormStatus=function(){return h.H.useHostTransitionStatus()},it.version="19.2.4",it}var Km;function b0(){if(Km)return su.exports;Km=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(o){console.error(o)}}return c(),su.exports=Tp(),su.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var Jm;function Rp(){if(Jm)return Pn;Jm=1;var c=Ap(),o=bu(),d=b0();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function h(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 v(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(r(188))}function p(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,a=t;;){var s=l.return;if(s===null)break;var i=s.alternate;if(i===null){if(a=s.return,a!==null){l=a;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===l)return g(s),e;if(i===a)return g(s),t;i=i.sibling}throw Error(r(188))}if(l.return!==a.return)l=s,a=i;else{for(var u=!1,x=s.child;x;){if(x===l){u=!0,l=s,a=i;break}if(x===a){u=!0,a=s,l=i;break}x=x.sibling}if(!u){for(x=i.child;x;){if(x===l){u=!0,l=i,a=s;break}if(x===a){u=!0,a=i,l=s;break}x=x.sibling}if(!u)throw Error(r(189))}}if(l.alternate!==a)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function N(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=N(e),t!==null)return t;e=e.sibling}return null}var w=Object.assign,D=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),L=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),ue=Symbol.for("react.memo_cache_sentinel"),xe=Symbol.iterator;function $(e){return e===null||typeof e!="object"?null:(e=xe&&e[xe]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function we(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case Q:return"Profiler";case R:return"StrictMode";case B:return"Suspense";case C:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case L:return e.displayName||"Context";case q:return(e._context.displayName||"Context")+".Consumer";case J:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return t=e.displayName||null,t!==null?t:we(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return we(e(t))}catch{}}return null}var se=Array.isArray,k=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},pe=[],K=-1;function j(e){return{current:e}}function G(e){0>K||(e.current=pe[K],pe[K]=null,K--)}function W(e,t){K++,pe[K]=e.current,e.current=t}var I=j(null),oe=j(null),de=j(null),Ne=j(null);function He(e,t){switch(W(de,t),W(oe,e),W(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?om(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=om(t),e=dm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(I),W(I,e)}function _e(){G(I),G(oe),G(de)}function bl(e){e.memoizedState!==null&&W(Ne,e);var t=I.current,l=dm(t,e.type);t!==l&&(W(oe,e),W(I,l))}function is(e){oe.current===e&&(G(I),G(oe)),Ne.current===e&&(G(Ne),$n._currentValue=ae)}var Ui,Bu;function Kl(e){if(Ui===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Ui=t&&t[1]||"",Bu=-1<l.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+Ui+e+Bu}var Hi=!1;function Bi(e,t){if(!e||Hi)return"";Hi=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(O){var M=O}Reflect.construct(e,[],X)}else{try{X.call()}catch(O){M=O}e.call(X.prototype)}}else{try{throw Error()}catch(O){M=O}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(O){if(O&&M&&typeof O.stack=="string")return[O.stack,M.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),u=i[0],x=i[1];if(u&&x){var b=u.split(`
44
- `),_=x.split(`
45
- `);for(s=a=0;a<b.length&&!b[a].includes("DetermineComponentFrameRoot");)a++;for(;s<_.length&&!_[s].includes("DetermineComponentFrameRoot");)s++;if(a===b.length||s===_.length)for(a=b.length-1,s=_.length-1;1<=a&&0<=s&&b[a]!==_[s];)s--;for(;1<=a&&0<=s;a--,s--)if(b[a]!==_[s]){if(a!==1||s!==1)do if(a--,s--,0>s||b[a]!==_[s]){var H=`
46
- `+b[a].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=a&&0<=s);break}}}finally{Hi=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Kl(l):""}function eh(e,t){switch(e.tag){case 26:case 27:case 5:return Kl(e.type);case 16:return Kl("Lazy");case 13:return e.child!==t&&t!==null?Kl("Suspense Fallback"):Kl("Suspense");case 19:return Kl("SuspenseList");case 0:case 15:return Bi(e.type,!1);case 11:return Bi(e.type.render,!1);case 1:return Bi(e.type,!0);case 31:return Kl("Activity");default:return""}}function Lu(e){try{var t="",l=null;do t+=eh(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
47
- Error generating stack: `+a.message+`
48
- `+a.stack}}var Li=Object.prototype.hasOwnProperty,qi=c.unstable_scheduleCallback,Yi=c.unstable_cancelCallback,th=c.unstable_shouldYield,lh=c.unstable_requestPaint,gt=c.unstable_now,ah=c.unstable_getCurrentPriorityLevel,qu=c.unstable_ImmediatePriority,Yu=c.unstable_UserBlockingPriority,cs=c.unstable_NormalPriority,nh=c.unstable_LowPriority,Gu=c.unstable_IdlePriority,sh=c.log,ih=c.unstable_setDisableYieldValue,nn=null,vt=null;function yl(e){if(typeof sh=="function"&&ih(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(nn,e)}catch{}}var bt=Math.clz32?Math.clz32:uh,ch=Math.log,rh=Math.LN2;function uh(e){return e>>>=0,e===0?32:31-(ch(e)/rh|0)|0}var rs=256,us=262144,os=4194304;function Jl(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ds(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var s=0,i=e.suspendedLanes,u=e.pingedLanes;e=e.warmLanes;var x=a&134217727;return x!==0?(a=x&~i,a!==0?s=Jl(a):(u&=x,u!==0?s=Jl(u):l||(l=x&~e,l!==0&&(s=Jl(l))))):(x=a&~i,x!==0?s=Jl(x):u!==0?s=Jl(u):l||(l=a&~e,l!==0&&(s=Jl(l)))),s===0?0:t!==0&&t!==s&&(t&i)===0&&(i=s&-s,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:s}function sn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function oh(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Qu(){var e=os;return os<<=1,(os&62914560)===0&&(os=4194304),e}function Gi(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function cn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dh(e,t,l,a,s,i){var u=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var x=e.entanglements,b=e.expirationTimes,_=e.hiddenUpdates;for(l=u&~l;0<l;){var H=31-bt(l),X=1<<H;x[H]=0,b[H]=-1;var M=_[H];if(M!==null)for(_[H]=null,H=0;H<M.length;H++){var O=M[H];O!==null&&(O.lane&=-536870913)}l&=~X}a!==0&&Vu(e,a,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(u&~t))}function Vu(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-bt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Xu(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-bt(l),s=1<<a;s&t|e[a]&t&&(e[a]|=t),l&=~s}}function Zu(e,t){var l=t&-t;return l=(l&42)!==0?1:Qi(l),(l&(e.suspendedLanes|t))!==0?0:l}function Qi(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Vi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function $u(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:Om(e.type))}function Ku(e,t){var l=F.p;try{return F.p=e,t()}finally{F.p=l}}var jl=Math.random().toString(36).slice(2),tt="__reactFiber$"+jl,ot="__reactProps$"+jl,pa="__reactContainer$"+jl,Xi="__reactEvents$"+jl,fh="__reactListeners$"+jl,mh="__reactHandles$"+jl,Ju="__reactResources$"+jl,rn="__reactMarker$"+jl;function Zi(e){delete e[tt],delete e[ot],delete e[Xi],delete e[fh],delete e[mh]}function ga(e){var t=e[tt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[pa]||l[tt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=vm(e);e!==null;){if(l=e[tt])return l;e=vm(e)}return t}e=l,l=e.parentNode}return null}function va(e){if(e=e[tt]||e[pa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function un(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function ba(e){var t=e[Ju];return t||(t=e[Ju]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ie(e){e[rn]=!0}var Fu=new Set,Wu={};function Fl(e,t){ya(e,t),ya(e+"Capture",t)}function ya(e,t){for(Wu[e]=t,e=0;e<t.length;e++)Fu.add(t[e])}var hh=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Pu={},Iu={};function xh(e){return Li.call(Iu,e)?!0:Li.call(Pu,e)?!1:hh.test(e)?Iu[e]=!0:(Pu[e]=!0,!1)}function fs(e,t,l){if(xh(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function ms(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Wt(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function Tt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function eo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ph(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var s=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(u){l=""+u,i.call(this,u)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(u){l=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $i(e){if(!e._valueTracker){var t=eo(e)?"checked":"value";e._valueTracker=ph(e,t,""+e[t])}}function to(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=eo(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function hs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var gh=/[\n"\\]/g;function Rt(e){return e.replace(gh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ki(e,t,l,a,s,i,u,x){e.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.type=u:e.removeAttribute("type"),t!=null?u==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Tt(t)):e.value!==""+Tt(t)&&(e.value=""+Tt(t)):u!=="submit"&&u!=="reset"||e.removeAttribute("value"),t!=null?Ji(e,u,Tt(t)):l!=null?Ji(e,u,Tt(l)):a!=null&&e.removeAttribute("value"),s==null&&i!=null&&(e.defaultChecked=!!i),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Tt(x):e.removeAttribute("name")}function lo(e,t,l,a,s,i,u,x){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){$i(e);return}l=l!=null?""+Tt(l):"",t=t!=null?""+Tt(t):l,x||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=x?e.checked:!!a,e.defaultChecked=!!a,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.name=u),$i(e)}function Ji(e,t,l){t==="number"&&hs(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ja(e,t,l,a){if(e=e.options,t){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=t.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Tt(l),t=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function ao(e,t,l){if(t!=null&&(t=""+Tt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Tt(l):""}function no(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(se(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Tt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),$i(e)}function Na(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var vh=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function so(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||vh.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function io(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&l[s]!==a&&so(e,s,a)}else for(var i in t)t.hasOwnProperty(i)&&so(e,i,t[i])}function Fi(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var bh=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),yh=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function xs(e){return yh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Pt(){}var Wi=null;function Pi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sa=null,wa=null;function co(e){var t=va(e);if(t&&(e=t.stateNode)){var l=e[ot]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ki(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Rt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var s=a[ot]||null;if(!s)throw Error(r(90));Ki(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&to(a)}break e;case"textarea":ao(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ja(e,!!l.multiple,t,!1)}}}var Ii=!1;function ro(e,t,l){if(Ii)return e(t,l);Ii=!0;try{var a=e(t);return a}finally{if(Ii=!1,(Sa!==null||wa!==null)&&(li(),Sa&&(t=Sa,e=wa,wa=Sa=null,co(t),e)))for(t=0;t<e.length;t++)co(e[t])}}function on(e,t){var l=e.stateNode;if(l===null)return null;var a=l[ot]||null;if(a===null)return null;l=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var It=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ec=!1;if(It)try{var dn={};Object.defineProperty(dn,"passive",{get:function(){ec=!0}}),window.addEventListener("test",dn,dn),window.removeEventListener("test",dn,dn)}catch{ec=!1}var Nl=null,tc=null,ps=null;function uo(){if(ps)return ps;var e,t=tc,l=t.length,a,s="value"in Nl?Nl.value:Nl.textContent,i=s.length;for(e=0;e<l&&t[e]===s[e];e++);var u=l-e;for(a=1;a<=u&&t[l-a]===s[i-a];a++);return ps=s.slice(e,1<a?1-a:void 0)}function gs(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 vs(){return!0}function oo(){return!1}function dt(e){function t(l,a,s,i,u){this._reactName=l,this._targetInst=s,this.type=a,this.nativeEvent=i,this.target=u,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(l=e[x],this[x]=l?l(i):i[x]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?vs:oo,this.isPropagationStopped=oo,this}return w(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=vs)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=vs)},persist:function(){},isPersistent:vs}),t}var Wl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bs=dt(Wl),fn=w({},Wl,{view:0,detail:0}),jh=dt(fn),lc,ac,mn,ys=w({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sc,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!==mn&&(mn&&e.type==="mousemove"?(lc=e.screenX-mn.screenX,ac=e.screenY-mn.screenY):ac=lc=0,mn=e),lc)},movementY:function(e){return"movementY"in e?e.movementY:ac}}),fo=dt(ys),Nh=w({},ys,{dataTransfer:0}),Sh=dt(Nh),wh=w({},fn,{relatedTarget:0}),nc=dt(wh),Ch=w({},Wl,{animationName:0,elapsedTime:0,pseudoElement:0}),Eh=dt(Ch),Ah=w({},Wl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Th=dt(Ah),Rh=w({},Wl,{data:0}),mo=dt(Rh),_h={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mh={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"},zh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zh[e])?!!t[e]:!1}function sc(){return Dh}var Oh=w({},fn,{key:function(e){if(e.key){var t=_h[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=gs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Mh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sc,charCode:function(e){return e.type==="keypress"?gs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?gs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),kh=dt(Oh),Uh=w({},ys,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ho=dt(Uh),Hh=w({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sc}),Bh=dt(Hh),Lh=w({},Wl,{propertyName:0,elapsedTime:0,pseudoElement:0}),qh=dt(Lh),Yh=w({},ys,{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}),Gh=dt(Yh),Qh=w({},Wl,{newState:0,oldState:0}),Vh=dt(Qh),Xh=[9,13,27,32],ic=It&&"CompositionEvent"in window,hn=null;It&&"documentMode"in document&&(hn=document.documentMode);var Zh=It&&"TextEvent"in window&&!hn,xo=It&&(!ic||hn&&8<hn&&11>=hn),po=" ",go=!1;function vo(e,t){switch(e){case"keyup":return Xh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ca=!1;function $h(e,t){switch(e){case"compositionend":return bo(t);case"keypress":return t.which!==32?null:(go=!0,po);case"textInput":return e=t.data,e===po&&go?null:e;default:return null}}function Kh(e,t){if(Ca)return e==="compositionend"||!ic&&vo(e,t)?(e=uo(),ps=tc=Nl=null,Ca=!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 xo&&t.locale!=="ko"?null:t.data;default:return null}}var Jh={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 yo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Jh[e.type]:t==="textarea"}function jo(e,t,l,a){Sa?wa?wa.push(a):wa=[a]:Sa=a,t=ui(t,"onChange"),0<t.length&&(l=new bs("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var xn=null,pn=null;function Fh(e){nm(e,0)}function js(e){var t=un(e);if(to(t))return e}function No(e,t){if(e==="change")return t}var So=!1;if(It){var cc;if(It){var rc="oninput"in document;if(!rc){var wo=document.createElement("div");wo.setAttribute("oninput","return;"),rc=typeof wo.oninput=="function"}cc=rc}else cc=!1;So=cc&&(!document.documentMode||9<document.documentMode)}function Co(){xn&&(xn.detachEvent("onpropertychange",Eo),pn=xn=null)}function Eo(e){if(e.propertyName==="value"&&js(pn)){var t=[];jo(t,pn,e,Pi(e)),ro(Fh,t)}}function Wh(e,t,l){e==="focusin"?(Co(),xn=t,pn=l,xn.attachEvent("onpropertychange",Eo)):e==="focusout"&&Co()}function Ph(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return js(pn)}function Ih(e,t){if(e==="click")return js(t)}function ex(e,t){if(e==="input"||e==="change")return js(t)}function tx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:tx;function gn(e,t){if(yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var s=l[a];if(!Li.call(t,s)||!yt(e[s],t[s]))return!1}return!0}function Ao(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function To(e,t){var l=Ao(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ao(l)}}function Ro(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ro(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _o(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=hs(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=hs(e.document)}return t}function uc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var lx=It&&"documentMode"in document&&11>=document.documentMode,Ea=null,oc=null,vn=null,dc=!1;function Mo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;dc||Ea==null||Ea!==hs(a)||(a=Ea,"selectionStart"in a&&uc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),vn&&gn(vn,a)||(vn=a,a=ui(oc,"onSelect"),0<a.length&&(t=new bs("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Ea)))}function Pl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Aa={animationend:Pl("Animation","AnimationEnd"),animationiteration:Pl("Animation","AnimationIteration"),animationstart:Pl("Animation","AnimationStart"),transitionrun:Pl("Transition","TransitionRun"),transitionstart:Pl("Transition","TransitionStart"),transitioncancel:Pl("Transition","TransitionCancel"),transitionend:Pl("Transition","TransitionEnd")},fc={},zo={};It&&(zo=document.createElement("div").style,"AnimationEvent"in window||(delete Aa.animationend.animation,delete Aa.animationiteration.animation,delete Aa.animationstart.animation),"TransitionEvent"in window||delete Aa.transitionend.transition);function Il(e){if(fc[e])return fc[e];if(!Aa[e])return e;var t=Aa[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in zo)return fc[e]=t[l];return e}var Do=Il("animationend"),Oo=Il("animationiteration"),ko=Il("animationstart"),ax=Il("transitionrun"),nx=Il("transitionstart"),sx=Il("transitioncancel"),Uo=Il("transitionend"),Ho=new Map,mc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");mc.push("scrollEnd");function Yt(e,t){Ho.set(e,t),Fl(t,[e])}var Ns=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},_t=[],Ta=0,hc=0;function Ss(){for(var e=Ta,t=hc=Ta=0;t<e;){var l=_t[t];_t[t++]=null;var a=_t[t];_t[t++]=null;var s=_t[t];_t[t++]=null;var i=_t[t];if(_t[t++]=null,a!==null&&s!==null){var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}i!==0&&Bo(l,s,i)}}function ws(e,t,l,a){_t[Ta++]=e,_t[Ta++]=t,_t[Ta++]=l,_t[Ta++]=a,hc|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function xc(e,t,l,a){return ws(e,t,l,a),Cs(e)}function ea(e,t){return ws(e,null,null,t),Cs(e)}function Bo(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var s=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(s=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,s&&t!==null&&(s=31-bt(l),e=i.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=l|536870912),i):null}function Cs(e){if(50<qn)throw qn=0,wr=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ra={};function ix(e,t,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jt(e,t,l,a){return new ix(e,t,l,a)}function pc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function el(e,t){var l=e.alternate;return l===null?(l=jt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Lo(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Es(e,t,l,a,s,i){var u=0;if(a=e,typeof e=="function")pc(e)&&(u=1);else if(typeof e=="string")u=dp(e,l,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=jt(31,l,t,s),e.elementType=P,e.lanes=i,e;case A:return ta(l.children,s,i,t);case R:u=8,s|=24;break;case Q:return e=jt(12,l,t,s|2),e.elementType=Q,e.lanes=i,e;case B:return e=jt(13,l,t,s),e.elementType=B,e.lanes=i,e;case C:return e=jt(19,l,t,s),e.elementType=C,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case L:u=10;break e;case q:u=9;break e;case J:u=11;break e;case V:u=14;break e;case Z:u=16,a=null;break e}u=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=jt(u,l,t,s),t.elementType=e,t.type=a,t.lanes=i,t}function ta(e,t,l,a){return e=jt(7,e,a,t),e.lanes=l,e}function gc(e,t,l){return e=jt(6,e,null,t),e.lanes=l,e}function qo(e){var t=jt(18,null,null,0);return t.stateNode=e,t}function vc(e,t,l){return t=jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Yo=new WeakMap;function Mt(e,t){if(typeof e=="object"&&e!==null){var l=Yo.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Lu(t)},Yo.set(e,t),t)}return{value:e,source:t,stack:Lu(t)}}var _a=[],Ma=0,As=null,bn=0,zt=[],Dt=0,Sl=null,Vt=1,Xt="";function tl(e,t){_a[Ma++]=bn,_a[Ma++]=As,As=e,bn=t}function Go(e,t,l){zt[Dt++]=Vt,zt[Dt++]=Xt,zt[Dt++]=Sl,Sl=e;var a=Vt;e=Xt;var s=32-bt(a)-1;a&=~(1<<s),l+=1;var i=32-bt(t)+s;if(30<i){var u=s-s%5;i=(a&(1<<u)-1).toString(32),a>>=u,s-=u,Vt=1<<32-bt(t)+s|l<<s|a,Xt=i+e}else Vt=1<<i|l<<s|a,Xt=e}function bc(e){e.return!==null&&(tl(e,1),Go(e,1,0))}function yc(e){for(;e===As;)As=_a[--Ma],_a[Ma]=null,bn=_a[--Ma],_a[Ma]=null;for(;e===Sl;)Sl=zt[--Dt],zt[Dt]=null,Xt=zt[--Dt],zt[Dt]=null,Vt=zt[--Dt],zt[Dt]=null}function Qo(e,t){zt[Dt++]=Vt,zt[Dt++]=Xt,zt[Dt++]=Sl,Vt=t.id,Xt=t.overflow,Sl=e}var lt=null,Le=null,Se=!1,wl=null,Ot=!1,jc=Error(r(519));function Cl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw yn(Mt(t,e)),jc}function Vo(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[tt]=e,t[ot]=a,l){case"dialog":ve("cancel",t),ve("close",t);break;case"iframe":case"object":case"embed":ve("load",t);break;case"video":case"audio":for(l=0;l<Gn.length;l++)ve(Gn[l],t);break;case"source":ve("error",t);break;case"img":case"image":case"link":ve("error",t),ve("load",t);break;case"details":ve("toggle",t);break;case"input":ve("invalid",t),lo(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ve("invalid",t);break;case"textarea":ve("invalid",t),no(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||rm(t.textContent,l)?(a.popover!=null&&(ve("beforetoggle",t),ve("toggle",t)),a.onScroll!=null&&ve("scroll",t),a.onScrollEnd!=null&&ve("scrollend",t),a.onClick!=null&&(t.onclick=Pt),t=!0):t=!1,t||Cl(e,!0)}function Xo(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Ot=!1;return;case 27:case 3:Ot=!0;return;default:lt=lt.return}}function za(e){if(e!==lt)return!1;if(!Se)return Xo(e),Se=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Lr(e.type,e.memoizedProps)),l=!l),l&&Le&&Cl(e),Xo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Le=gm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Le=gm(e)}else t===27?(t=Le,Ll(e.type)?(e=Vr,Vr=null,Le=e):Le=t):Le=lt?Ut(e.stateNode.nextSibling):null;return!0}function la(){Le=lt=null,Se=!1}function Nc(){var e=wl;return e!==null&&(xt===null?xt=e:xt.push.apply(xt,e),wl=null),e}function yn(e){wl===null?wl=[e]:wl.push(e)}var Sc=j(null),aa=null,ll=null;function El(e,t,l){W(Sc,t._currentValue),t._currentValue=l}function al(e){e._currentValue=Sc.current,G(Sc)}function wc(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Cc(e,t,l,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var i=s.dependencies;if(i!==null){var u=s.child;i=i.firstContext;e:for(;i!==null;){var x=i;i=s;for(var b=0;b<t.length;b++)if(x.context===t[b]){i.lanes|=l,x=i.alternate,x!==null&&(x.lanes|=l),wc(i.return,l,e),a||(u=null);break e}i=x.next}}else if(s.tag===18){if(u=s.return,u===null)throw Error(r(341));u.lanes|=l,i=u.alternate,i!==null&&(i.lanes|=l),wc(u,l,e),u=null}else u=s.child;if(u!==null)u.return=s;else for(u=s;u!==null;){if(u===e){u=null;break}if(s=u.sibling,s!==null){s.return=u.return,u=s;break}u=u.return}s=u}}function Da(e,t,l,a){e=null;for(var s=t,i=!1;s!==null;){if(!i){if((s.flags&524288)!==0)i=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var u=s.alternate;if(u===null)throw Error(r(387));if(u=u.memoizedProps,u!==null){var x=s.type;yt(s.pendingProps.value,u.value)||(e!==null?e.push(x):e=[x])}}else if(s===Ne.current){if(u=s.alternate,u===null)throw Error(r(387));u.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push($n):e=[$n])}s=s.return}e!==null&&Cc(t,e,l,a),t.flags|=262144}function Ts(e){for(e=e.firstContext;e!==null;){if(!yt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function na(e){aa=e,ll=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function at(e){return Zo(aa,e)}function Rs(e,t){return aa===null&&na(e),Zo(e,t)}function Zo(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},ll===null){if(e===null)throw Error(r(308));ll=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ll=ll.next=t;return l}var cx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},rx=c.unstable_scheduleCallback,ux=c.unstable_NormalPriority,Ke={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ec(){return{controller:new cx,data:new Map,refCount:0}}function jn(e){e.refCount--,e.refCount===0&&rx(ux,function(){e.controller.abort()})}var Nn=null,Ac=0,Oa=0,ka=null;function ox(e,t){if(Nn===null){var l=Nn=[];Ac=0,Oa=_r(),ka={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Ac++,t.then($o,$o),t}function $o(){if(--Ac===0&&Nn!==null){ka!==null&&(ka.status="fulfilled");var e=Nn;Nn=null,Oa=0,ka=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function dx(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<l.length;s++)(0,l[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),a}var Ko=k.S;k.S=function(e,t){zf=gt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ox(e,t),Ko!==null&&Ko(e,t)};var sa=j(null);function Tc(){var e=sa.current;return e!==null?e:Be.pooledCache}function _s(e,t){t===null?W(sa,sa.current):W(sa,t.pool)}function Jo(){var e=Tc();return e===null?null:{parent:Ke._currentValue,pool:e}}var Ua=Error(r(460)),Rc=Error(r(474)),Ms=Error(r(542)),zs={then:function(){}};function Fo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Wo(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Pt,Pt),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Io(e),e;default:if(typeof t.status=="string")t.then(Pt,Pt);else{if(e=Be,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Io(e),e}throw ca=t,Ua}}function ia(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ca=l,Ua):l}}var ca=null;function Po(){if(ca===null)throw Error(r(459));var e=ca;return ca=null,e}function Io(e){if(e===Ua||e===Ms)throw Error(r(483))}var Ha=null,Sn=0;function Ds(e){var t=Sn;return Sn+=1,Ha===null&&(Ha=[]),Wo(Ha,e,t)}function wn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Os(e,t){throw t.$$typeof===D?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ed(e){function t(E,S){if(e){var T=E.deletions;T===null?(E.deletions=[S],E.flags|=16):T.push(S)}}function l(E,S){if(!e)return null;for(;S!==null;)t(E,S),S=S.sibling;return null}function a(E){for(var S=new Map;E!==null;)E.key!==null?S.set(E.key,E):S.set(E.index,E),E=E.sibling;return S}function s(E,S){return E=el(E,S),E.index=0,E.sibling=null,E}function i(E,S,T){return E.index=T,e?(T=E.alternate,T!==null?(T=T.index,T<S?(E.flags|=67108866,S):T):(E.flags|=67108866,S)):(E.flags|=1048576,S)}function u(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function x(E,S,T,Y){return S===null||S.tag!==6?(S=gc(T,E.mode,Y),S.return=E,S):(S=s(S,T),S.return=E,S)}function b(E,S,T,Y){var ne=T.type;return ne===A?H(E,S,T.props.children,Y,T.key):S!==null&&(S.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===Z&&ia(ne)===S.type)?(S=s(S,T.props),wn(S,T),S.return=E,S):(S=Es(T.type,T.key,T.props,null,E.mode,Y),wn(S,T),S.return=E,S)}function _(E,S,T,Y){return S===null||S.tag!==4||S.stateNode.containerInfo!==T.containerInfo||S.stateNode.implementation!==T.implementation?(S=vc(T,E.mode,Y),S.return=E,S):(S=s(S,T.children||[]),S.return=E,S)}function H(E,S,T,Y,ne){return S===null||S.tag!==7?(S=ta(T,E.mode,Y,ne),S.return=E,S):(S=s(S,T),S.return=E,S)}function X(E,S,T){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=gc(""+S,E.mode,T),S.return=E,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case z:return T=Es(S.type,S.key,S.props,null,E.mode,T),wn(T,S),T.return=E,T;case U:return S=vc(S,E.mode,T),S.return=E,S;case Z:return S=ia(S),X(E,S,T)}if(se(S)||$(S))return S=ta(S,E.mode,T,null),S.return=E,S;if(typeof S.then=="function")return X(E,Ds(S),T);if(S.$$typeof===L)return X(E,Rs(E,S),T);Os(E,S)}return null}function M(E,S,T,Y){var ne=S!==null?S.key:null;if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return ne!==null?null:x(E,S,""+T,Y);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case z:return T.key===ne?b(E,S,T,Y):null;case U:return T.key===ne?_(E,S,T,Y):null;case Z:return T=ia(T),M(E,S,T,Y)}if(se(T)||$(T))return ne!==null?null:H(E,S,T,Y,null);if(typeof T.then=="function")return M(E,S,Ds(T),Y);if(T.$$typeof===L)return M(E,S,Rs(E,T),Y);Os(E,T)}return null}function O(E,S,T,Y,ne){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return E=E.get(T)||null,x(S,E,""+Y,ne);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case z:return E=E.get(Y.key===null?T:Y.key)||null,b(S,E,Y,ne);case U:return E=E.get(Y.key===null?T:Y.key)||null,_(S,E,Y,ne);case Z:return Y=ia(Y),O(E,S,T,Y,ne)}if(se(Y)||$(Y))return E=E.get(T)||null,H(S,E,Y,ne,null);if(typeof Y.then=="function")return O(E,S,T,Ds(Y),ne);if(Y.$$typeof===L)return O(E,S,T,Rs(S,Y),ne);Os(S,Y)}return null}function ee(E,S,T,Y){for(var ne=null,Ce=null,te=S,he=S=0,je=null;te!==null&&he<T.length;he++){te.index>he?(je=te,te=null):je=te.sibling;var Ee=M(E,te,T[he],Y);if(Ee===null){te===null&&(te=je);break}e&&te&&Ee.alternate===null&&t(E,te),S=i(Ee,S,he),Ce===null?ne=Ee:Ce.sibling=Ee,Ce=Ee,te=je}if(he===T.length)return l(E,te),Se&&tl(E,he),ne;if(te===null){for(;he<T.length;he++)te=X(E,T[he],Y),te!==null&&(S=i(te,S,he),Ce===null?ne=te:Ce.sibling=te,Ce=te);return Se&&tl(E,he),ne}for(te=a(te);he<T.length;he++)je=O(te,E,he,T[he],Y),je!==null&&(e&&je.alternate!==null&&te.delete(je.key===null?he:je.key),S=i(je,S,he),Ce===null?ne=je:Ce.sibling=je,Ce=je);return e&&te.forEach(function(Vl){return t(E,Vl)}),Se&&tl(E,he),ne}function ce(E,S,T,Y){if(T==null)throw Error(r(151));for(var ne=null,Ce=null,te=S,he=S=0,je=null,Ee=T.next();te!==null&&!Ee.done;he++,Ee=T.next()){te.index>he?(je=te,te=null):je=te.sibling;var Vl=M(E,te,Ee.value,Y);if(Vl===null){te===null&&(te=je);break}e&&te&&Vl.alternate===null&&t(E,te),S=i(Vl,S,he),Ce===null?ne=Vl:Ce.sibling=Vl,Ce=Vl,te=je}if(Ee.done)return l(E,te),Se&&tl(E,he),ne;if(te===null){for(;!Ee.done;he++,Ee=T.next())Ee=X(E,Ee.value,Y),Ee!==null&&(S=i(Ee,S,he),Ce===null?ne=Ee:Ce.sibling=Ee,Ce=Ee);return Se&&tl(E,he),ne}for(te=a(te);!Ee.done;he++,Ee=T.next())Ee=O(te,E,he,Ee.value,Y),Ee!==null&&(e&&Ee.alternate!==null&&te.delete(Ee.key===null?he:Ee.key),S=i(Ee,S,he),Ce===null?ne=Ee:Ce.sibling=Ee,Ce=Ee);return e&&te.forEach(function(Np){return t(E,Np)}),Se&&tl(E,he),ne}function Ue(E,S,T,Y){if(typeof T=="object"&&T!==null&&T.type===A&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case z:e:{for(var ne=T.key;S!==null;){if(S.key===ne){if(ne=T.type,ne===A){if(S.tag===7){l(E,S.sibling),Y=s(S,T.props.children),Y.return=E,E=Y;break e}}else if(S.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===Z&&ia(ne)===S.type){l(E,S.sibling),Y=s(S,T.props),wn(Y,T),Y.return=E,E=Y;break e}l(E,S);break}else t(E,S);S=S.sibling}T.type===A?(Y=ta(T.props.children,E.mode,Y,T.key),Y.return=E,E=Y):(Y=Es(T.type,T.key,T.props,null,E.mode,Y),wn(Y,T),Y.return=E,E=Y)}return u(E);case U:e:{for(ne=T.key;S!==null;){if(S.key===ne)if(S.tag===4&&S.stateNode.containerInfo===T.containerInfo&&S.stateNode.implementation===T.implementation){l(E,S.sibling),Y=s(S,T.children||[]),Y.return=E,E=Y;break e}else{l(E,S);break}else t(E,S);S=S.sibling}Y=vc(T,E.mode,Y),Y.return=E,E=Y}return u(E);case Z:return T=ia(T),Ue(E,S,T,Y)}if(se(T))return ee(E,S,T,Y);if($(T)){if(ne=$(T),typeof ne!="function")throw Error(r(150));return T=ne.call(T),ce(E,S,T,Y)}if(typeof T.then=="function")return Ue(E,S,Ds(T),Y);if(T.$$typeof===L)return Ue(E,S,Rs(E,T),Y);Os(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,S!==null&&S.tag===6?(l(E,S.sibling),Y=s(S,T),Y.return=E,E=Y):(l(E,S),Y=gc(T,E.mode,Y),Y.return=E,E=Y),u(E)):l(E,S)}return function(E,S,T,Y){try{Sn=0;var ne=Ue(E,S,T,Y);return Ha=null,ne}catch(te){if(te===Ua||te===Ms)throw te;var Ce=jt(29,te,null,E.mode);return Ce.lanes=Y,Ce.return=E,Ce}finally{}}}var ra=ed(!0),td=ed(!1),Al=!1;function _c(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Mc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Tl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Rl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ae&2)!==0){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=Cs(e),Bo(e,null,l),t}return ws(e,a,t,l),Cs(e)}function Cn(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Xu(e,l)}}function zc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var s=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var u={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?s=i=u:i=i.next=u,l=l.next}while(l!==null);i===null?s=i=t:i=i.next=t}else s=i=t;l={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Dc=!1;function En(){if(Dc){var e=ka;if(e!==null)throw e}}function An(e,t,l,a){Dc=!1;var s=e.updateQueue;Al=!1;var i=s.firstBaseUpdate,u=s.lastBaseUpdate,x=s.shared.pending;if(x!==null){s.shared.pending=null;var b=x,_=b.next;b.next=null,u===null?i=_:u.next=_,u=b;var H=e.alternate;H!==null&&(H=H.updateQueue,x=H.lastBaseUpdate,x!==u&&(x===null?H.firstBaseUpdate=_:x.next=_,H.lastBaseUpdate=b))}if(i!==null){var X=s.baseState;u=0,H=_=b=null,x=i;do{var M=x.lane&-536870913,O=M!==x.lane;if(O?(ye&M)===M:(a&M)===M){M!==0&&M===Oa&&(Dc=!0),H!==null&&(H=H.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ee=e,ce=x;M=t;var Ue=l;switch(ce.tag){case 1:if(ee=ce.payload,typeof ee=="function"){X=ee.call(Ue,X,M);break e}X=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=ce.payload,M=typeof ee=="function"?ee.call(Ue,X,M):ee,M==null)break e;X=w({},X,M);break e;case 2:Al=!0}}M=x.callback,M!==null&&(e.flags|=64,O&&(e.flags|=8192),O=s.callbacks,O===null?s.callbacks=[M]:O.push(M))}else O={lane:M,tag:x.tag,payload:x.payload,callback:x.callback,next:null},H===null?(_=H=O,b=X):H=H.next=O,u|=M;if(x=x.next,x===null){if(x=s.shared.pending,x===null)break;O=x,x=O.next,O.next=null,s.lastBaseUpdate=O,s.shared.pending=null}}while(!0);H===null&&(b=X),s.baseState=b,s.firstBaseUpdate=_,s.lastBaseUpdate=H,i===null&&(s.shared.lanes=0),Ol|=u,e.lanes=u,e.memoizedState=X}}function ld(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function ad(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)ld(l[e],t)}var Ba=j(null),ks=j(0);function nd(e,t){e=fl,W(ks,e),W(Ba,t),fl=e|t.baseLanes}function Oc(){W(ks,fl),W(Ba,Ba.current)}function kc(){fl=ks.current,G(Ba),G(ks)}var Nt=j(null),kt=null;function _l(e){var t=e.alternate;W(Ze,Ze.current&1),W(Nt,e),kt===null&&(t===null||Ba.current!==null||t.memoizedState!==null)&&(kt=e)}function Uc(e){W(Ze,Ze.current),W(Nt,e),kt===null&&(kt=e)}function sd(e){e.tag===22?(W(Ze,Ze.current),W(Nt,e),kt===null&&(kt=e)):Ml()}function Ml(){W(Ze,Ze.current),W(Nt,Nt.current)}function St(e){G(Nt),kt===e&&(kt=null),G(Ze)}var Ze=j(0);function Us(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Gr(l)||Qr(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var nl=0,me=null,Oe=null,Je=null,Hs=!1,La=!1,ua=!1,Bs=0,Tn=0,qa=null,fx=0;function Ve(){throw Error(r(321))}function Hc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!yt(e[l],t[l]))return!1;return!0}function Bc(e,t,l,a,s,i){return nl=i,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?Gd:Ic,ua=!1,i=l(a,s),ua=!1,La&&(i=cd(t,l,a,s)),id(e),i}function id(e){k.H=Mn;var t=Oe!==null&&Oe.next!==null;if(nl=0,Je=Oe=me=null,Hs=!1,Tn=0,qa=null,t)throw Error(r(300));e===null||Fe||(e=e.dependencies,e!==null&&Ts(e)&&(Fe=!0))}function cd(e,t,l,a){me=e;var s=0;do{if(La&&(qa=null),Tn=0,La=!1,25<=s)throw Error(r(301));if(s+=1,Je=Oe=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}k.H=Qd,i=t(l,a)}while(La);return i}function mx(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?Rn(t):t,e=e.useState()[0],(Oe!==null?Oe.memoizedState:null)!==e&&(me.flags|=1024),t}function Lc(){var e=Bs!==0;return Bs=0,e}function qc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Yc(e){if(Hs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Hs=!1}nl=0,Je=Oe=me=null,La=!1,Tn=Bs=0,qa=null}function ut(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Je===null?me.memoizedState=Je=e:Je=Je.next=e,Je}function $e(){if(Oe===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=Je===null?me.memoizedState:Je.next;if(t!==null)Je=t,Oe=e;else{if(e===null)throw me.alternate===null?Error(r(467)):Error(r(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},Je===null?me.memoizedState=Je=e:Je=Je.next=e}return Je}function Ls(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rn(e){var t=Tn;return Tn+=1,qa===null&&(qa=[]),e=Wo(qa,e,t),t=me,(Je===null?t.memoizedState:Je.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?Gd:Ic),e}function qs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Rn(e);if(e.$$typeof===L)return at(e)}throw Error(r(438,String(e)))}function Gc(e){var t=null,l=me.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=me.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Ls(),me.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=ue;return t.index++,l}function sl(e,t){return typeof t=="function"?t(e):t}function Ys(e){var t=$e();return Qc(t,Oe,e)}function Qc(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var s=e.baseQueue,i=a.pending;if(i!==null){if(s!==null){var u=s.next;s.next=i.next,i.next=u}t.baseQueue=s=i,a.pending=null}if(i=e.baseState,s===null)e.memoizedState=i;else{t=s.next;var x=u=null,b=null,_=t,H=!1;do{var X=_.lane&-536870913;if(X!==_.lane?(ye&X)===X:(nl&X)===X){var M=_.revertLane;if(M===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),X===Oa&&(H=!0);else if((nl&M)===M){_=_.next,M===Oa&&(H=!0);continue}else X={lane:0,revertLane:_.revertLane,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},b===null?(x=b=X,u=i):b=b.next=X,me.lanes|=M,Ol|=M;X=_.action,ua&&l(i,X),i=_.hasEagerState?_.eagerState:l(i,X)}else M={lane:X,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},b===null?(x=b=M,u=i):b=b.next=M,me.lanes|=X,Ol|=X;_=_.next}while(_!==null&&_!==t);if(b===null?u=i:b.next=x,!yt(i,e.memoizedState)&&(Fe=!0,H&&(l=ka,l!==null)))throw l;e.memoizedState=i,e.baseState=u,e.baseQueue=b,a.lastRenderedState=i}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Vc(e){var t=$e(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,s=l.pending,i=t.memoizedState;if(s!==null){l.pending=null;var u=s=s.next;do i=e(i,u.action),u=u.next;while(u!==s);yt(i,t.memoizedState)||(Fe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function rd(e,t,l){var a=me,s=$e(),i=Se;if(i){if(l===void 0)throw Error(r(407));l=l()}else l=t();var u=!yt((Oe||s).memoizedState,l);if(u&&(s.memoizedState=l,Fe=!0),s=s.queue,$c(dd.bind(null,a,s,e),[e]),s.getSnapshot!==t||u||Je!==null&&Je.memoizedState.tag&1){if(a.flags|=2048,Ya(9,{destroy:void 0},od.bind(null,a,s,l,t),null),Be===null)throw Error(r(349));i||(nl&127)!==0||ud(a,t,l)}return l}function ud(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=me.updateQueue,t===null?(t=Ls(),me.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function od(e,t,l,a){t.value=l,t.getSnapshot=a,fd(t)&&md(e)}function dd(e,t,l){return l(function(){fd(t)&&md(e)})}function fd(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!yt(e,l)}catch{return!0}}function md(e){var t=ea(e,2);t!==null&&pt(t,e,2)}function Xc(e){var t=ut();if(typeof e=="function"){var l=e;if(e=l(),ua){yl(!0);try{l()}finally{yl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:e},t}function hd(e,t,l,a){return e.baseState=l,Qc(e,Oe,typeof a=="function"?a:sl)}function hx(e,t,l,a,s){if(Vs(e))throw Error(r(485));if(e=t.action,e!==null){var i={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(u){i.listeners.push(u)}};k.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,xd(t,i)):(i.next=l.next,t.pending=l.next=i)}}function xd(e,t){var l=t.action,a=t.payload,s=e.state;if(t.isTransition){var i=k.T,u={};k.T=u;try{var x=l(s,a),b=k.S;b!==null&&b(u,x),pd(e,t,x)}catch(_){Zc(e,t,_)}finally{i!==null&&u.types!==null&&(i.types=u.types),k.T=i}}else try{i=l(s,a),pd(e,t,i)}catch(_){Zc(e,t,_)}}function pd(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){gd(e,t,a)},function(a){return Zc(e,t,a)}):gd(e,t,l)}function gd(e,t,l){t.status="fulfilled",t.value=l,vd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,xd(e,l)))}function Zc(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,vd(t),t=t.next;while(t!==a)}e.action=null}function vd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function bd(e,t){return t}function yd(e,t){if(Se){var l=Be.formState;if(l!==null){e:{var a=me;if(Se){if(Le){t:{for(var s=Le,i=Ot;s.nodeType!==8;){if(!i){s=null;break t}if(s=Ut(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){Le=Ut(s.nextSibling),a=s.data==="F!";break e}}Cl(a)}a=!1}a&&(t=l[0])}}return l=ut(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bd,lastRenderedState:t},l.queue=a,l=Ld.bind(null,me,a),a.dispatch=l,a=Xc(!1),i=Pc.bind(null,me,!1,a.queue),a=ut(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,l=hx.bind(null,me,s,i,l),s.dispatch=l,a.memoizedState=e,[t,l,!1]}function jd(e){var t=$e();return Nd(t,Oe,e)}function Nd(e,t,l){if(t=Qc(e,t,bd)[0],e=Ys(sl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Rn(t)}catch(u){throw u===Ua?Ms:u}else a=t;t=$e();var s=t.queue,i=s.dispatch;return l!==t.memoizedState&&(me.flags|=2048,Ya(9,{destroy:void 0},xx.bind(null,s,l),null)),[a,i,e]}function xx(e,t){e.action=t}function Sd(e){var t=$e(),l=Oe;if(l!==null)return Nd(t,l,e);$e(),t=t.memoizedState,l=$e();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Ya(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=me.updateQueue,t===null&&(t=Ls(),me.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function wd(){return $e().memoizedState}function Gs(e,t,l,a){var s=ut();me.flags|=e,s.memoizedState=Ya(1|t,{destroy:void 0},l,a===void 0?null:a)}function Qs(e,t,l,a){var s=$e();a=a===void 0?null:a;var i=s.memoizedState.inst;Oe!==null&&a!==null&&Hc(a,Oe.memoizedState.deps)?s.memoizedState=Ya(t,i,l,a):(me.flags|=e,s.memoizedState=Ya(1|t,i,l,a))}function Cd(e,t){Gs(8390656,8,e,t)}function $c(e,t){Qs(2048,8,e,t)}function px(e){me.flags|=4;var t=me.updateQueue;if(t===null)t=Ls(),me.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Ed(e){var t=$e().memoizedState;return px({ref:t,nextImpl:e}),function(){if((Ae&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Ad(e,t){return Qs(4,2,e,t)}function Td(e,t){return Qs(4,4,e,t)}function Rd(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _d(e,t,l){l=l!=null?l.concat([e]):null,Qs(4,4,Rd.bind(null,t,e),l)}function Kc(){}function Md(e,t){var l=$e();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Hc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function zd(e,t){var l=$e();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Hc(t,a[1]))return a[0];if(a=e(),ua){yl(!0);try{e()}finally{yl(!1)}}return l.memoizedState=[a,t],a}function Jc(e,t,l){return l===void 0||(nl&1073741824)!==0&&(ye&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Of(),me.lanes|=e,Ol|=e,l)}function Dd(e,t,l,a){return yt(l,t)?l:Ba.current!==null?(e=Jc(e,l,a),yt(e,t)||(Fe=!0),e):(nl&42)===0||(nl&1073741824)!==0&&(ye&261930)===0?(Fe=!0,e.memoizedState=l):(e=Of(),me.lanes|=e,Ol|=e,t)}function Od(e,t,l,a,s){var i=F.p;F.p=i!==0&&8>i?i:8;var u=k.T,x={};k.T=x,Pc(e,!1,t,l);try{var b=s(),_=k.S;if(_!==null&&_(x,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var H=dx(b,a);_n(e,t,H,Et(e))}else _n(e,t,a,Et(e))}catch(X){_n(e,t,{then:function(){},status:"rejected",reason:X},Et())}finally{F.p=i,u!==null&&x.types!==null&&(u.types=x.types),k.T=u}}function gx(){}function Fc(e,t,l,a){if(e.tag!==5)throw Error(r(476));var s=kd(e).queue;Od(e,s,t,ae,l===null?gx:function(){return Ud(e),l(a)})}function kd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:ae},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ud(e){var t=kd(e);t.next===null&&(t=e.alternate.memoizedState),_n(e,t.next.queue,{},Et())}function Wc(){return at($n)}function Hd(){return $e().memoizedState}function Bd(){return $e().memoizedState}function vx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Et();e=Tl(l);var a=Rl(t,e,l);a!==null&&(pt(a,t,l),Cn(a,t,l)),t={cache:Ec()},e.payload=t;return}t=t.return}}function bx(e,t,l){var a=Et();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Vs(e)?qd(t,l):(l=xc(e,t,l,a),l!==null&&(pt(l,e,a),Yd(l,t,a)))}function Ld(e,t,l){var a=Et();_n(e,t,l,a)}function _n(e,t,l,a){var s={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Vs(e))qd(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var u=t.lastRenderedState,x=i(u,l);if(s.hasEagerState=!0,s.eagerState=x,yt(x,u))return ws(e,t,s,0),Be===null&&Ss(),!1}catch{}finally{}if(l=xc(e,t,s,a),l!==null)return pt(l,e,a),Yd(l,t,a),!0}return!1}function Pc(e,t,l,a){if(a={lane:2,revertLane:_r(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Vs(e)){if(t)throw Error(r(479))}else t=xc(e,l,a,2),t!==null&&pt(t,e,2)}function Vs(e){var t=e.alternate;return e===me||t!==null&&t===me}function qd(e,t){La=Hs=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Yd(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Xu(e,l)}}var Mn={readContext:at,use:qs,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useLayoutEffect:Ve,useInsertionEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useSyncExternalStore:Ve,useId:Ve,useHostTransitionStatus:Ve,useFormState:Ve,useActionState:Ve,useOptimistic:Ve,useMemoCache:Ve,useCacheRefresh:Ve};Mn.useEffectEvent=Ve;var Gd={readContext:at,use:qs,useCallback:function(e,t){return ut().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:Cd,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Gs(4194308,4,Rd.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Gs(4194308,4,e,t)},useInsertionEffect:function(e,t){Gs(4,2,e,t)},useMemo:function(e,t){var l=ut();t=t===void 0?null:t;var a=e();if(ua){yl(!0);try{e()}finally{yl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=ut();if(l!==void 0){var s=l(t);if(ua){yl(!0);try{l(t)}finally{yl(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=bx.bind(null,me,e),[a.memoizedState,e]},useRef:function(e){var t=ut();return e={current:e},t.memoizedState=e},useState:function(e){e=Xc(e);var t=e.queue,l=Ld.bind(null,me,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Kc,useDeferredValue:function(e,t){var l=ut();return Jc(l,e,t)},useTransition:function(){var e=Xc(!1);return e=Od.bind(null,me,e.queue,!0,!1),ut().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=me,s=ut();if(Se){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),Be===null)throw Error(r(349));(ye&127)!==0||ud(a,t,l)}s.memoizedState=l;var i={value:l,getSnapshot:t};return s.queue=i,Cd(dd.bind(null,a,i,e),[e]),a.flags|=2048,Ya(9,{destroy:void 0},od.bind(null,a,i,l,t),null),l},useId:function(){var e=ut(),t=Be.identifierPrefix;if(Se){var l=Xt,a=Vt;l=(a&~(1<<32-bt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Bs++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=fx++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Wc,useFormState:yd,useActionState:yd,useOptimistic:function(e){var t=ut();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Pc.bind(null,me,!0,l),l.dispatch=t,[e,t]},useMemoCache:Gc,useCacheRefresh:function(){return ut().memoizedState=vx.bind(null,me)},useEffectEvent:function(e){var t=ut(),l={impl:e};return t.memoizedState=l,function(){if((Ae&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Ic={readContext:at,use:qs,useCallback:Md,useContext:at,useEffect:$c,useImperativeHandle:_d,useInsertionEffect:Ad,useLayoutEffect:Td,useMemo:zd,useReducer:Ys,useRef:wd,useState:function(){return Ys(sl)},useDebugValue:Kc,useDeferredValue:function(e,t){var l=$e();return Dd(l,Oe.memoizedState,e,t)},useTransition:function(){var e=Ys(sl)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:Rn(e),t]},useSyncExternalStore:rd,useId:Hd,useHostTransitionStatus:Wc,useFormState:jd,useActionState:jd,useOptimistic:function(e,t){var l=$e();return hd(l,Oe,e,t)},useMemoCache:Gc,useCacheRefresh:Bd};Ic.useEffectEvent=Ed;var Qd={readContext:at,use:qs,useCallback:Md,useContext:at,useEffect:$c,useImperativeHandle:_d,useInsertionEffect:Ad,useLayoutEffect:Td,useMemo:zd,useReducer:Vc,useRef:wd,useState:function(){return Vc(sl)},useDebugValue:Kc,useDeferredValue:function(e,t){var l=$e();return Oe===null?Jc(l,e,t):Dd(l,Oe.memoizedState,e,t)},useTransition:function(){var e=Vc(sl)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:Rn(e),t]},useSyncExternalStore:rd,useId:Hd,useHostTransitionStatus:Wc,useFormState:Sd,useActionState:Sd,useOptimistic:function(e,t){var l=$e();return Oe!==null?hd(l,Oe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Gc,useCacheRefresh:Bd};Qd.useEffectEvent=Ed;function er(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:w({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var tr={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Et(),s=Tl(a);s.payload=t,l!=null&&(s.callback=l),t=Rl(e,s,a),t!==null&&(pt(t,e,a),Cn(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Et(),s=Tl(a);s.tag=1,s.payload=t,l!=null&&(s.callback=l),t=Rl(e,s,a),t!==null&&(pt(t,e,a),Cn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Et(),a=Tl(l);a.tag=2,t!=null&&(a.callback=t),t=Rl(e,a,l),t!==null&&(pt(t,e,l),Cn(t,e,l))}};function Vd(e,t,l,a,s,i,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,u):t.prototype&&t.prototype.isPureReactComponent?!gn(l,a)||!gn(s,i):!0}function Xd(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&tr.enqueueReplaceState(t,t.state,null)}function oa(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=w({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function Zd(e){Ns(e)}function $d(e){console.error(e)}function Kd(e){Ns(e)}function Xs(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Jd(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function lr(e,t,l){return l=Tl(l),l.tag=3,l.payload={element:null},l.callback=function(){Xs(e,t)},l}function Fd(e){return e=Tl(e),e.tag=3,e}function Wd(e,t,l,a){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var i=a.value;e.payload=function(){return s(i)},e.callback=function(){Jd(t,l,a)}}var u=l.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(e.callback=function(){Jd(t,l,a),typeof s!="function"&&(kl===null?kl=new Set([this]):kl.add(this));var x=a.stack;this.componentDidCatch(a.value,{componentStack:x!==null?x:""})})}function yx(e,t,l,a,s){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Da(t,l,s,!0),l=Nt.current,l!==null){switch(l.tag){case 31:case 13:return kt===null?ai():l.alternate===null&&Xe===0&&(Xe=3),l.flags&=-257,l.flags|=65536,l.lanes=s,a===zs?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Ar(e,a,s)),!1;case 22:return l.flags|=65536,a===zs?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Ar(e,a,s)),!1}throw Error(r(435,l.tag))}return Ar(e,a,s),ai(),!1}if(Se)return t=Nt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==jc&&(e=Error(r(422),{cause:a}),yn(Mt(e,l)))):(a!==jc&&(t=Error(r(423),{cause:a}),yn(Mt(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=Mt(a,l),s=lr(e.stateNode,a,s),zc(e,s),Xe!==4&&(Xe=2)),!1;var i=Error(r(520),{cause:a});if(i=Mt(i,l),Ln===null?Ln=[i]:Ln.push(i),Xe!==4&&(Xe=2),t===null)return!0;a=Mt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=lr(l.stateNode,a,e),zc(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(kl===null||!kl.has(i))))return l.flags|=65536,s&=-s,l.lanes|=s,s=Fd(s),Wd(s,e,l,a),zc(l,s),!1}l=l.return}while(l!==null);return!1}var ar=Error(r(461)),Fe=!1;function nt(e,t,l,a){t.child=e===null?td(t,null,l,a):ra(t,e.child,l,a)}function Pd(e,t,l,a,s){l=l.render;var i=t.ref;if("ref"in a){var u={};for(var x in a)x!=="ref"&&(u[x]=a[x])}else u=a;return na(t),a=Bc(e,t,l,u,i,s),x=Lc(),e!==null&&!Fe?(qc(e,t,s),il(e,t,s)):(Se&&x&&bc(t),t.flags|=1,nt(e,t,a,s),t.child)}function Id(e,t,l,a,s){if(e===null){var i=l.type;return typeof i=="function"&&!pc(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,ef(e,t,i,a,s)):(e=Es(l.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!dr(e,s)){var u=i.memoizedProps;if(l=l.compare,l=l!==null?l:gn,l(u,a)&&e.ref===t.ref)return il(e,t,s)}return t.flags|=1,e=el(i,a),e.ref=t.ref,e.return=t,t.child=e}function ef(e,t,l,a,s){if(e!==null){var i=e.memoizedProps;if(gn(i,a)&&e.ref===t.ref)if(Fe=!1,t.pendingProps=a=i,dr(e,s))(e.flags&131072)!==0&&(Fe=!0);else return t.lanes=e.lanes,il(e,t,s)}return nr(e,t,l,a,s)}function tf(e,t,l,a){var s=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,e!==null){for(a=t.child=e.child,s=0;a!==null;)s=s|a.lanes|a.childLanes,a=a.sibling;a=s&~i}else a=0,t.child=null;return lf(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_s(t,i!==null?i.cachePool:null),i!==null?nd(t,i):Oc(),sd(t);else return a=t.lanes=536870912,lf(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(_s(t,i.cachePool),nd(t,i),Ml(),t.memoizedState=null):(e!==null&&_s(t,null),Oc(),Ml());return nt(e,t,s,l),t.child}function zn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function lf(e,t,l,a,s){var i=Tc();return i=i===null?null:{parent:Ke._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&_s(t,null),Oc(),sd(t),e!==null&&Da(e,t,a,!0),t.childLanes=s,null}function Zs(e,t){return t=Ks({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function af(e,t,l){return ra(t,e.child,null,l),e=Zs(t,t.pendingProps),e.flags|=2,St(t),t.memoizedState=null,e}function jx(e,t,l){var a=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Se){if(a.mode==="hidden")return e=Zs(t,a),t.lanes=536870912,zn(null,e);if(Uc(t),(e=Le)?(e=pm(e,Ot),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Sl!==null?{id:Vt,overflow:Xt}:null,retryLane:536870912,hydrationErrors:null},l=qo(e),l.return=t,t.child=l,lt=t,Le=null)):e=null,e===null)throw Cl(t);return t.lanes=536870912,null}return Zs(t,a)}var i=e.memoizedState;if(i!==null){var u=i.dehydrated;if(Uc(t),s)if(t.flags&256)t.flags&=-257,t=af(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(Fe||Da(e,t,l,!1),s=(l&e.childLanes)!==0,Fe||s){if(a=Be,a!==null&&(u=Zu(a,l),u!==0&&u!==i.retryLane))throw i.retryLane=u,ea(e,u),pt(a,e,u),ar;ai(),t=af(e,t,l)}else e=i.treeContext,Le=Ut(u.nextSibling),lt=t,Se=!0,wl=null,Ot=!1,e!==null&&Qo(t,e),t=Zs(t,a),t.flags|=4096;return t}return e=el(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function $s(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function nr(e,t,l,a,s){return na(t),l=Bc(e,t,l,a,void 0,s),a=Lc(),e!==null&&!Fe?(qc(e,t,s),il(e,t,s)):(Se&&a&&bc(t),t.flags|=1,nt(e,t,l,s),t.child)}function nf(e,t,l,a,s,i){return na(t),t.updateQueue=null,l=cd(t,a,l,s),id(e),a=Lc(),e!==null&&!Fe?(qc(e,t,i),il(e,t,i)):(Se&&a&&bc(t),t.flags|=1,nt(e,t,l,i),t.child)}function sf(e,t,l,a,s){if(na(t),t.stateNode===null){var i=Ra,u=l.contextType;typeof u=="object"&&u!==null&&(i=at(u)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=tr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},_c(t),u=l.contextType,i.context=typeof u=="object"&&u!==null?at(u):Ra,i.state=t.memoizedState,u=l.getDerivedStateFromProps,typeof u=="function"&&(er(t,l,u,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(u=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),u!==i.state&&tr.enqueueReplaceState(i,i.state,null),An(t,a,i,s),En(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var x=t.memoizedProps,b=oa(l,x);i.props=b;var _=i.context,H=l.contextType;u=Ra,typeof H=="object"&&H!==null&&(u=at(H));var X=l.getDerivedStateFromProps;H=typeof X=="function"||typeof i.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,H||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(x||_!==u)&&Xd(t,i,a,u),Al=!1;var M=t.memoizedState;i.state=M,An(t,a,i,s),En(),_=t.memoizedState,x||M!==_||Al?(typeof X=="function"&&(er(t,l,X,a),_=t.memoizedState),(b=Al||Vd(t,l,b,a,M,_,u))?(H||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=_),i.props=a,i.state=_,i.context=u,a=b):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Mc(e,t),u=t.memoizedProps,H=oa(l,u),i.props=H,X=t.pendingProps,M=i.context,_=l.contextType,b=Ra,typeof _=="object"&&_!==null&&(b=at(_)),x=l.getDerivedStateFromProps,(_=typeof x=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==X||M!==b)&&Xd(t,i,a,b),Al=!1,M=t.memoizedState,i.state=M,An(t,a,i,s),En();var O=t.memoizedState;u!==X||M!==O||Al||e!==null&&e.dependencies!==null&&Ts(e.dependencies)?(typeof x=="function"&&(er(t,l,x,a),O=t.memoizedState),(H=Al||Vd(t,l,H,a,M,O,b)||e!==null&&e.dependencies!==null&&Ts(e.dependencies))?(_||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,O,b),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,O,b)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),i.props=a,i.state=O,i.context=b,a=H):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,$s(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=ra(t,e.child,null,s),t.child=ra(t,null,l,s)):nt(e,t,l,s),t.memoizedState=i.state,e=t.child):e=il(e,t,s),e}function cf(e,t,l,a){return la(),t.flags|=256,nt(e,t,l,a),t.child}var sr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ir(e){return{baseLanes:e,cachePool:Jo()}}function cr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ct),e}function rf(e,t,l){var a=t.pendingProps,s=!1,i=(t.flags&128)!==0,u;if((u=i)||(u=e!==null&&e.memoizedState===null?!1:(Ze.current&2)!==0),u&&(s=!0,t.flags&=-129),u=(t.flags&32)!==0,t.flags&=-33,e===null){if(Se){if(s?_l(t):Ml(),(e=Le)?(e=pm(e,Ot),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Sl!==null?{id:Vt,overflow:Xt}:null,retryLane:536870912,hydrationErrors:null},l=qo(e),l.return=t,t.child=l,lt=t,Le=null)):e=null,e===null)throw Cl(t);return Qr(e)?t.lanes=32:t.lanes=536870912,null}var x=a.children;return a=a.fallback,s?(Ml(),s=t.mode,x=Ks({mode:"hidden",children:x},s),a=ta(a,s,l,null),x.return=t,a.return=t,x.sibling=a,t.child=x,a=t.child,a.memoizedState=ir(l),a.childLanes=cr(e,u,l),t.memoizedState=sr,zn(null,a)):(_l(t),rr(t,x))}var b=e.memoizedState;if(b!==null&&(x=b.dehydrated,x!==null)){if(i)t.flags&256?(_l(t),t.flags&=-257,t=ur(e,t,l)):t.memoizedState!==null?(Ml(),t.child=e.child,t.flags|=128,t=null):(Ml(),x=a.fallback,s=t.mode,a=Ks({mode:"visible",children:a.children},s),x=ta(x,s,l,null),x.flags|=2,a.return=t,x.return=t,a.sibling=x,t.child=a,ra(t,e.child,null,l),a=t.child,a.memoizedState=ir(l),a.childLanes=cr(e,u,l),t.memoizedState=sr,t=zn(null,a));else if(_l(t),Qr(x)){if(u=x.nextSibling&&x.nextSibling.dataset,u)var _=u.dgst;u=_,a=Error(r(419)),a.stack="",a.digest=u,yn({value:a,source:null,stack:null}),t=ur(e,t,l)}else if(Fe||Da(e,t,l,!1),u=(l&e.childLanes)!==0,Fe||u){if(u=Be,u!==null&&(a=Zu(u,l),a!==0&&a!==b.retryLane))throw b.retryLane=a,ea(e,a),pt(u,e,a),ar;Gr(x)||ai(),t=ur(e,t,l)}else Gr(x)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Le=Ut(x.nextSibling),lt=t,Se=!0,wl=null,Ot=!1,e!==null&&Qo(t,e),t=rr(t,a.children),t.flags|=4096);return t}return s?(Ml(),x=a.fallback,s=t.mode,b=e.child,_=b.sibling,a=el(b,{mode:"hidden",children:a.children}),a.subtreeFlags=b.subtreeFlags&65011712,_!==null?x=el(_,x):(x=ta(x,s,l,null),x.flags|=2),x.return=t,a.return=t,a.sibling=x,t.child=a,zn(null,a),a=t.child,x=e.child.memoizedState,x===null?x=ir(l):(s=x.cachePool,s!==null?(b=Ke._currentValue,s=s.parent!==b?{parent:b,pool:b}:s):s=Jo(),x={baseLanes:x.baseLanes|l,cachePool:s}),a.memoizedState=x,a.childLanes=cr(e,u,l),t.memoizedState=sr,zn(e.child,a)):(_l(t),l=e.child,e=l.sibling,l=el(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(u=t.deletions,u===null?(t.deletions=[e],t.flags|=16):u.push(e)),t.child=l,t.memoizedState=null,l)}function rr(e,t){return t=Ks({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ks(e,t){return e=jt(22,e,null,t),e.lanes=0,e}function ur(e,t,l){return ra(t,e.child,null,l),e=rr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uf(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),wc(e.return,t,l)}function or(e,t,l,a,s,i){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:s,treeForkCount:i}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=l,u.tailMode=s,u.treeForkCount=i)}function of(e,t,l){var a=t.pendingProps,s=a.revealOrder,i=a.tail;a=a.children;var u=Ze.current,x=(u&2)!==0;if(x?(u=u&1|2,t.flags|=128):u&=1,W(Ze,u),nt(e,t,a,l),a=Se?bn:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uf(e,l,t);else if(e.tag===19)uf(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(l=t.child,s=null;l!==null;)e=l.alternate,e!==null&&Us(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=t.child,t.child=null):(s=l.sibling,l.sibling=null),or(t,!1,s,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Us(e)===null){t.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}or(t,!0,l,null,i,a);break;case"together":or(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function il(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Ol|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Da(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=el(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=el(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function dr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ts(e)))}function Nx(e,t,l){switch(t.tag){case 3:He(t,t.stateNode.containerInfo),El(t,Ke,e.memoizedState.cache),la();break;case 27:case 5:bl(t);break;case 4:He(t,t.stateNode.containerInfo);break;case 10:El(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Uc(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(_l(t),t.flags|=128,null):(l&t.child.childLanes)!==0?rf(e,t,l):(_l(t),e=il(e,t,l),e!==null?e.sibling:null);_l(t);break;case 19:var s=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(Da(e,t,l,!1),a=(l&t.childLanes)!==0),s){if(a)return of(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),W(Ze,Ze.current),a)break;return null;case 22:return t.lanes=0,tf(e,t,l,t.pendingProps);case 24:El(t,Ke,e.memoizedState.cache)}return il(e,t,l)}function df(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Fe=!0;else{if(!dr(e,l)&&(t.flags&128)===0)return Fe=!1,Nx(e,t,l);Fe=(e.flags&131072)!==0}else Fe=!1,Se&&(t.flags&1048576)!==0&&Go(t,bn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ia(t.elementType),t.type=e,typeof e=="function")pc(e)?(a=oa(e,a),t.tag=1,t=sf(null,t,e,a,l)):(t.tag=0,t=nr(null,t,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===J){t.tag=11,t=Pd(null,t,e,a,l);break e}else if(s===V){t.tag=14,t=Id(null,t,e,a,l);break e}}throw t=we(e)||e,Error(r(306,t,""))}}return t;case 0:return nr(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,s=oa(a,t.pendingProps),sf(e,t,a,s,l);case 3:e:{if(He(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var i=t.memoizedState;s=i.element,Mc(e,t),An(t,a,null,l);var u=t.memoizedState;if(a=u.cache,El(t,Ke,a),a!==i.cache&&Cc(t,[Ke],l,!0),En(),a=u.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:u.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=cf(e,t,a,l);break e}else if(a!==s){s=Mt(Error(r(424)),t),yn(s),t=cf(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Le=Ut(e.firstChild),lt=t,Se=!0,wl=null,Ot=!0,l=td(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(la(),a===s){t=il(e,t,l);break e}nt(e,t,a,l)}t=t.child}return t;case 26:return $s(e,t),e===null?(l=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=l:Se||(l=t.type,e=t.pendingProps,a=oi(de.current).createElement(l),a[tt]=t,a[ot]=e,st(a,l,e),Ie(a),t.stateNode=a):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return bl(t),e===null&&Se&&(a=t.stateNode=bm(t.type,t.pendingProps,de.current),lt=t,Ot=!0,s=Le,Ll(t.type)?(Vr=s,Le=Ut(a.firstChild)):Le=s),nt(e,t,t.pendingProps.children,l),$s(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Se&&((s=a=Le)&&(a=Px(a,t.type,t.pendingProps,Ot),a!==null?(t.stateNode=a,lt=t,Le=Ut(a.firstChild),Ot=!1,s=!0):s=!1),s||Cl(t)),bl(t),s=t.type,i=t.pendingProps,u=e!==null?e.memoizedProps:null,a=i.children,Lr(s,i)?a=null:u!==null&&Lr(s,u)&&(t.flags|=32),t.memoizedState!==null&&(s=Bc(e,t,mx,null,null,l),$n._currentValue=s),$s(e,t),nt(e,t,a,l),t.child;case 6:return e===null&&Se&&((e=l=Le)&&(l=Ix(l,t.pendingProps,Ot),l!==null?(t.stateNode=l,lt=t,Le=null,e=!0):e=!1),e||Cl(t)),null;case 13:return rf(e,t,l);case 4:return He(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ra(t,null,a,l):nt(e,t,a,l),t.child;case 11:return Pd(e,t,t.type,t.pendingProps,l);case 7:return nt(e,t,t.pendingProps,l),t.child;case 8:return nt(e,t,t.pendingProps.children,l),t.child;case 12:return nt(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,El(t,t.type,a.value),nt(e,t,a.children,l),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,na(t),s=at(s),a=a(s),t.flags|=1,nt(e,t,a,l),t.child;case 14:return Id(e,t,t.type,t.pendingProps,l);case 15:return ef(e,t,t.type,t.pendingProps,l);case 19:return of(e,t,l);case 31:return jx(e,t,l);case 22:return tf(e,t,l,t.pendingProps);case 24:return na(t),a=at(Ke),e===null?(s=Tc(),s===null&&(s=Be,i=Ec(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=l),s=i),t.memoizedState={parent:a,cache:s},_c(t),El(t,Ke,s)):((e.lanes&l)!==0&&(Mc(e,t),An(t,null,null,l),En()),s=e.memoizedState,i=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),El(t,Ke,a)):(a=i.cache,El(t,Ke,a),a!==s.cache&&Cc(t,[Ke],l,!0))),nt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function cl(e){e.flags|=4}function fr(e,t,l,a,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(Bf())e.flags|=8192;else throw ca=zs,Rc}else e.flags&=-16777217}function ff(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Am(t))if(Bf())e.flags|=8192;else throw ca=zs,Rc}function Js(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Qu():536870912,e.lanes|=t,Xa|=t)}function Dn(e,t){if(!Se)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Sx(e,t,l){var a=t.pendingProps;switch(yc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(t),null;case 1:return qe(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),al(Ke),_e(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(za(t)?cl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nc())),qe(t),null;case 26:var s=t.type,i=t.memoizedState;return e===null?(cl(t),i!==null?(qe(t),ff(t,i)):(qe(t),fr(t,s,null,a,l))):i?i!==e.memoizedState?(cl(t),qe(t),ff(t,i)):(qe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&cl(t),qe(t),fr(t,s,e,a,l)),null;case 27:if(is(t),l=de.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&cl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return qe(t),null}e=I.current,za(t)?Vo(t):(e=bm(s,a,l),t.stateNode=e,cl(t))}return qe(t),null;case 5:if(is(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&cl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return qe(t),null}if(i=I.current,za(t))Vo(t);else{var u=oi(de.current);switch(i){case 1:i=u.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:i=u.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":i=u.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":i=u.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":i=u.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?u.createElement("select",{is:a.is}):u.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?u.createElement(s,{is:a.is}):u.createElement(s)}}i[tt]=t,i[ot]=a;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)i.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=i;e:switch(st(i,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&cl(t)}}return qe(t),fr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&cl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=de.current,za(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,s=lt,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[tt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||rm(e.nodeValue,l)),e||Cl(t,!0)}else e=oi(e).createTextNode(a),e[tt]=t,t.stateNode=e}return qe(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=za(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[tt]=t}else la(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),e=!1}else l=Nc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(St(t),t):(St(t),null);if((t.flags&128)!==0)throw Error(r(558))}return qe(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=za(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));s[tt]=t}else la(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),s=!1}else s=Nc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(St(t),t):(St(t),null)}return St(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==s&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Js(t,t.updateQueue),qe(t),null);case 4:return _e(),e===null&&Or(t.stateNode.containerInfo),qe(t),null;case 10:return al(t.type),qe(t),null;case 19:if(G(Ze),a=t.memoizedState,a===null)return qe(t),null;if(s=(t.flags&128)!==0,i=a.rendering,i===null)if(s)Dn(a,!1);else{if(Xe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Us(e),i!==null){for(t.flags|=128,Dn(a,!1),e=i.updateQueue,t.updateQueue=e,Js(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Lo(l,e),l=l.sibling;return W(Ze,Ze.current&1|2),Se&&tl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&gt()>ei&&(t.flags|=128,s=!0,Dn(a,!1),t.lanes=4194304)}else{if(!s)if(e=Us(i),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Js(t,e),Dn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Se)return qe(t),null}else 2*gt()-a.renderingStartTime>ei&&l!==536870912&&(t.flags|=128,s=!0,Dn(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=gt(),e.sibling=null,l=Ze.current,W(Ze,s?l&1|2:l&1),Se&&tl(t,a.treeForkCount),e):(qe(t),null);case 22:case 23:return St(t),kc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),l=t.updateQueue,l!==null&&Js(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&G(sa),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),al(Ke),qe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function wx(e,t){switch(yc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return al(Ke),_e(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return is(t),null;case 31:if(t.memoizedState!==null){if(St(t),t.alternate===null)throw Error(r(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(St(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(Ze),null;case 4:return _e(),null;case 10:return al(t.type),null;case 22:case 23:return St(t),kc(),e!==null&&G(sa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return al(Ke),null;case 25:return null;default:return null}}function mf(e,t){switch(yc(t),t.tag){case 3:al(Ke),_e();break;case 26:case 27:case 5:is(t);break;case 4:_e();break;case 31:t.memoizedState!==null&&St(t);break;case 13:St(t);break;case 19:G(Ze);break;case 10:al(t.type);break;case 22:case 23:St(t),kc(),e!==null&&G(sa);break;case 24:al(Ke)}}function On(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){a=void 0;var i=l.create,u=l.inst;a=i(),u.destroy=a}l=l.next}while(l!==s)}}catch(x){De(t,t.return,x)}}function zl(e,t,l){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var i=s.next;a=i;do{if((a.tag&e)===e){var u=a.inst,x=u.destroy;if(x!==void 0){u.destroy=void 0,s=t;var b=l,_=x;try{_()}catch(H){De(s,b,H)}}}a=a.next}while(a!==i)}}catch(H){De(t,t.return,H)}}function hf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{ad(t,l)}catch(a){De(e,e.return,a)}}}function xf(e,t,l){l.props=oa(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){De(e,t,a)}}function kn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(s){De(e,t,s)}}function Zt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(s){De(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){De(e,t,s)}else l.current=null}function pf(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(s){De(e,e.return,s)}}function mr(e,t,l){try{var a=e.stateNode;Zx(a,e.type,l,t),a[ot]=t}catch(s){De(e,e.return,s)}}function gf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ll(e.type)||e.tag===4}function hr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ll(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xr(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Pt));else if(a!==4&&(a===27&&Ll(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(xr(e,t,l),e=e.sibling;e!==null;)xr(e,t,l),e=e.sibling}function Fs(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&Ll(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Fs(e,t,l),e=e.sibling;e!==null;)Fs(e,t,l),e=e.sibling}function vf(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);st(t,a,l),t[tt]=e,t[ot]=l}catch(i){De(e,e.return,i)}}var rl=!1,We=!1,pr=!1,bf=typeof WeakSet=="function"?WeakSet:Set,et=null;function Cx(e,t){if(e=e.containerInfo,Hr=gi,e=_o(e),uc(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var s=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var u=0,x=-1,b=-1,_=0,H=0,X=e,M=null;t:for(;;){for(var O;X!==l||s!==0&&X.nodeType!==3||(x=u+s),X!==i||a!==0&&X.nodeType!==3||(b=u+a),X.nodeType===3&&(u+=X.nodeValue.length),(O=X.firstChild)!==null;)M=X,X=O;for(;;){if(X===e)break t;if(M===l&&++_===s&&(x=u),M===i&&++H===a&&(b=u),(O=X.nextSibling)!==null)break;X=M,M=X.parentNode}X=O}l=x===-1||b===-1?null:{start:x,end:b}}else l=null}l=l||{start:0,end:0}}else l=null;for(Br={focusedElem:e,selectionRange:l},gi=!1,et=t;et!==null;)if(t=et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,et=e;else for(;et!==null;){switch(t=et,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,l=t,s=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var ee=oa(l.type,s);e=a.getSnapshotBeforeUpdate(ee,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(ce){De(l,l.return,ce)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Yr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Yr(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,et=e;break}et=t.return}}function yf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:ol(e,l),a&4&&On(5,l);break;case 1:if(ol(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(u){De(l,l.return,u)}else{var s=oa(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(u){De(l,l.return,u)}}a&64&&hf(l),a&512&&kn(l,l.return);break;case 3:if(ol(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{ad(e,t)}catch(u){De(l,l.return,u)}}break;case 27:t===null&&a&4&&vf(l);case 26:case 5:ol(e,l),t===null&&a&4&&pf(l),a&512&&kn(l,l.return);break;case 12:ol(e,l);break;case 31:ol(e,l),a&4&&Sf(e,l);break;case 13:ol(e,l),a&4&&wf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Ox.bind(null,l),ep(e,l))));break;case 22:if(a=l.memoizedState!==null||rl,!a){t=t!==null&&t.memoizedState!==null||We,s=rl;var i=We;rl=a,(We=t)&&!i?dl(e,l,(l.subtreeFlags&8772)!==0):ol(e,l),rl=s,We=i}break;case 30:break;default:ol(e,l)}}function jf(e){var t=e.alternate;t!==null&&(e.alternate=null,jf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Zi(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ye=null,ft=!1;function ul(e,t,l){for(l=l.child;l!==null;)Nf(e,t,l),l=l.sibling}function Nf(e,t,l){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(nn,l)}catch{}switch(l.tag){case 26:We||Zt(l,t),ul(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:We||Zt(l,t);var a=Ye,s=ft;Ll(l.type)&&(Ye=l.stateNode,ft=!1),ul(e,t,l),Vn(l.stateNode),Ye=a,ft=s;break;case 5:We||Zt(l,t);case 6:if(a=Ye,s=ft,Ye=null,ul(e,t,l),Ye=a,ft=s,Ye!==null)if(ft)try{(Ye.nodeType===9?Ye.body:Ye.nodeName==="HTML"?Ye.ownerDocument.body:Ye).removeChild(l.stateNode)}catch(i){De(l,t,i)}else try{Ye.removeChild(l.stateNode)}catch(i){De(l,t,i)}break;case 18:Ye!==null&&(ft?(e=Ye,hm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Ia(e)):hm(Ye,l.stateNode));break;case 4:a=Ye,s=ft,Ye=l.stateNode.containerInfo,ft=!0,ul(e,t,l),Ye=a,ft=s;break;case 0:case 11:case 14:case 15:zl(2,l,t),We||zl(4,l,t),ul(e,t,l);break;case 1:We||(Zt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&xf(l,t,a)),ul(e,t,l);break;case 21:ul(e,t,l);break;case 22:We=(a=We)||l.memoizedState!==null,ul(e,t,l),We=a;break;default:ul(e,t,l)}}function Sf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ia(e)}catch(l){De(t,t.return,l)}}}function wf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ia(e)}catch(l){De(t,t.return,l)}}function Ex(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new bf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new bf),t;default:throw Error(r(435,e.tag))}}function Ws(e,t){var l=Ex(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var s=kx.bind(null,e,a);a.then(s,s)}})}function mt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var s=l[a],i=e,u=t,x=u;e:for(;x!==null;){switch(x.tag){case 27:if(Ll(x.type)){Ye=x.stateNode,ft=!1;break e}break;case 5:Ye=x.stateNode,ft=!1;break e;case 3:case 4:Ye=x.stateNode.containerInfo,ft=!0;break e}x=x.return}if(Ye===null)throw Error(r(160));Nf(i,u,s),Ye=null,ft=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Cf(t,e),t=t.sibling}var Gt=null;function Cf(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:mt(t,e),ht(e),a&4&&(zl(3,e,e.return),On(3,e),zl(5,e,e.return));break;case 1:mt(t,e),ht(e),a&512&&(We||l===null||Zt(l,l.return)),a&64&&rl&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var s=Gt;if(mt(t,e),ht(e),a&512&&(We||l===null||Zt(l,l.return)),a&4){var i=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":i=s.getElementsByTagName("title")[0],(!i||i[rn]||i[tt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(a),s.head.insertBefore(i,s.querySelector("head > title"))),st(i,a,l),i[tt]=e,Ie(i),a=i;break e;case"link":var u=Cm("link","href",s).get(a+(l.href||""));if(u){for(var x=0;x<u.length;x++)if(i=u[x],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){u.splice(x,1);break t}}i=s.createElement(a),st(i,a,l),s.head.appendChild(i);break;case"meta":if(u=Cm("meta","content",s).get(a+(l.content||""))){for(x=0;x<u.length;x++)if(i=u[x],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){u.splice(x,1);break t}}i=s.createElement(a),st(i,a,l),s.head.appendChild(i);break;default:throw Error(r(468,a))}i[tt]=e,Ie(i),a=i}e.stateNode=a}else Em(s,e.type,e.stateNode);else e.stateNode=wm(s,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?Em(s,e.type,e.stateNode):wm(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&mr(e,e.memoizedProps,l.memoizedProps)}break;case 27:mt(t,e),ht(e),a&512&&(We||l===null||Zt(l,l.return)),l!==null&&a&4&&mr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(mt(t,e),ht(e),a&512&&(We||l===null||Zt(l,l.return)),e.flags&32){s=e.stateNode;try{Na(s,"")}catch(ee){De(e,e.return,ee)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,mr(e,s,l!==null?l.memoizedProps:s)),a&1024&&(pr=!0);break;case 6:if(mt(t,e),ht(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(ee){De(e,e.return,ee)}}break;case 3:if(mi=null,s=Gt,Gt=di(t.containerInfo),mt(t,e),Gt=s,ht(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Ia(t.containerInfo)}catch(ee){De(e,e.return,ee)}pr&&(pr=!1,Ef(e));break;case 4:a=Gt,Gt=di(e.stateNode.containerInfo),mt(t,e),ht(e),Gt=a;break;case 12:mt(t,e),ht(e);break;case 31:mt(t,e),ht(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ws(e,a)));break;case 13:mt(t,e),ht(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Is=gt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ws(e,a)));break;case 22:s=e.memoizedState!==null;var b=l!==null&&l.memoizedState!==null,_=rl,H=We;if(rl=_||s,We=H||b,mt(t,e),We=H,rl=_,ht(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||b||rl||We||da(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){b=l=t;try{if(i=b.stateNode,s)u=i.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{x=b.stateNode;var X=b.memoizedProps.style,M=X!=null&&X.hasOwnProperty("display")?X.display:null;x.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(ee){De(b,b.return,ee)}}}else if(t.tag===6){if(l===null){b=t;try{b.stateNode.nodeValue=s?"":b.memoizedProps}catch(ee){De(b,b.return,ee)}}}else if(t.tag===18){if(l===null){b=t;try{var O=b.stateNode;s?xm(O,!0):xm(b.stateNode,!1)}catch(ee){De(b,b.return,ee)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Ws(e,l))));break;case 19:mt(t,e),ht(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ws(e,a)));break;case 30:break;case 21:break;default:mt(t,e),ht(e)}}function ht(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(gf(a)){l=a;break}a=a.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var s=l.stateNode,i=hr(e);Fs(e,i,s);break;case 5:var u=l.stateNode;l.flags&32&&(Na(u,""),l.flags&=-33);var x=hr(e);Fs(e,x,u);break;case 3:case 4:var b=l.stateNode.containerInfo,_=hr(e);xr(e,_,b);break;default:throw Error(r(161))}}catch(H){De(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ef(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ef(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ol(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)yf(e,t.alternate,t),t=t.sibling}function da(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zl(4,t,t.return),da(t);break;case 1:Zt(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&xf(t,t.return,l),da(t);break;case 27:Vn(t.stateNode);case 26:case 5:Zt(t,t.return),da(t);break;case 22:t.memoizedState===null&&da(t);break;case 30:da(t);break;default:da(t)}e=e.sibling}}function dl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,i=t,u=i.flags;switch(i.tag){case 0:case 11:case 15:dl(s,i,l),On(4,i);break;case 1:if(dl(s,i,l),a=i,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(_){De(a,a.return,_)}if(a=i,s=a.updateQueue,s!==null){var x=a.stateNode;try{var b=s.shared.hiddenCallbacks;if(b!==null)for(s.shared.hiddenCallbacks=null,s=0;s<b.length;s++)ld(b[s],x)}catch(_){De(a,a.return,_)}}l&&u&64&&hf(i),kn(i,i.return);break;case 27:vf(i);case 26:case 5:dl(s,i,l),l&&a===null&&u&4&&pf(i),kn(i,i.return);break;case 12:dl(s,i,l);break;case 31:dl(s,i,l),l&&u&4&&Sf(s,i);break;case 13:dl(s,i,l),l&&u&4&&wf(s,i);break;case 22:i.memoizedState===null&&dl(s,i,l),kn(i,i.return);break;case 30:break;default:dl(s,i,l)}t=t.sibling}}function gr(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&jn(l))}function vr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&jn(e))}function Qt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Af(e,t,l,a),t=t.sibling}function Af(e,t,l,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Qt(e,t,l,a),s&2048&&On(9,t);break;case 1:Qt(e,t,l,a);break;case 3:Qt(e,t,l,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&jn(e)));break;case 12:if(s&2048){Qt(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,u=i.id,x=i.onPostCommit;typeof x=="function"&&x(u,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){De(t,t.return,b)}}else Qt(e,t,l,a);break;case 31:Qt(e,t,l,a);break;case 13:Qt(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,u=t.alternate,t.memoizedState!==null?i._visibility&2?Qt(e,t,l,a):Un(e,t):i._visibility&2?Qt(e,t,l,a):(i._visibility|=2,Ga(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),s&2048&&gr(u,t);break;case 24:Qt(e,t,l,a),s&2048&&vr(t.alternate,t);break;default:Qt(e,t,l,a)}}function Ga(e,t,l,a,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,u=t,x=l,b=a,_=u.flags;switch(u.tag){case 0:case 11:case 15:Ga(i,u,x,b,s),On(8,u);break;case 23:break;case 22:var H=u.stateNode;u.memoizedState!==null?H._visibility&2?Ga(i,u,x,b,s):Un(i,u):(H._visibility|=2,Ga(i,u,x,b,s)),s&&_&2048&&gr(u.alternate,u);break;case 24:Ga(i,u,x,b,s),s&&_&2048&&vr(u.alternate,u);break;default:Ga(i,u,x,b,s)}t=t.sibling}}function Un(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,s=a.flags;switch(a.tag){case 22:Un(l,a),s&2048&&gr(a.alternate,a);break;case 24:Un(l,a),s&2048&&vr(a.alternate,a);break;default:Un(l,a)}t=t.sibling}}var Hn=8192;function Qa(e,t,l){if(e.subtreeFlags&Hn)for(e=e.child;e!==null;)Tf(e,t,l),e=e.sibling}function Tf(e,t,l){switch(e.tag){case 26:Qa(e,t,l),e.flags&Hn&&e.memoizedState!==null&&fp(l,Gt,e.memoizedState,e.memoizedProps);break;case 5:Qa(e,t,l);break;case 3:case 4:var a=Gt;Gt=di(e.stateNode.containerInfo),Qa(e,t,l),Gt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Hn,Hn=16777216,Qa(e,t,l),Hn=a):Qa(e,t,l));break;default:Qa(e,t,l)}}function Rf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Bn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];et=a,Mf(a,e)}Rf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_f(e),e=e.sibling}function _f(e){switch(e.tag){case 0:case 11:case 15:Bn(e),e.flags&2048&&zl(9,e,e.return);break;case 3:Bn(e);break;case 12:Bn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ps(e)):Bn(e);break;default:Bn(e)}}function Ps(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];et=a,Mf(a,e)}Rf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zl(8,t,t.return),Ps(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Ps(t));break;default:Ps(t)}e=e.sibling}}function Mf(e,t){for(;et!==null;){var l=et;switch(l.tag){case 0:case 11:case 15:zl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:jn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,et=a;else e:for(l=e;et!==null;){a=et;var s=a.sibling,i=a.return;if(jf(a),a===l){et=null;break e}if(s!==null){s.return=i,et=s;break e}et=i}}}var Ax={getCacheForType:function(e){var t=at(Ke),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return at(Ke).controller.signal}},Tx=typeof WeakMap=="function"?WeakMap:Map,Ae=0,Be=null,ge=null,ye=0,ze=0,wt=null,Dl=!1,Va=!1,br=!1,fl=0,Xe=0,Ol=0,fa=0,yr=0,Ct=0,Xa=0,Ln=null,xt=null,jr=!1,Is=0,zf=0,ei=1/0,ti=null,kl=null,Pe=0,Ul=null,Za=null,ml=0,Nr=0,Sr=null,Df=null,qn=0,wr=null;function Et(){return(Ae&2)!==0&&ye!==0?ye&-ye:k.T!==null?_r():$u()}function Of(){if(Ct===0)if((ye&536870912)===0||Se){var e=us;us<<=1,(us&3932160)===0&&(us=262144),Ct=e}else Ct=536870912;return e=Nt.current,e!==null&&(e.flags|=32),Ct}function pt(e,t,l){(e===Be&&(ze===2||ze===9)||e.cancelPendingCommit!==null)&&($a(e,0),Hl(e,ye,Ct,!1)),cn(e,l),((Ae&2)===0||e!==Be)&&(e===Be&&((Ae&2)===0&&(fa|=l),Xe===4&&Hl(e,ye,Ct,!1)),$t(e))}function kf(e,t,l){if((Ae&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||sn(e,t),s=a?Mx(e,t):Er(e,t,!0),i=a;do{if(s===0){Va&&!a&&Hl(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Rx(l)){s=Er(e,t,!1),i=!1;continue}if(s===2){if(i=t,e.errorRecoveryDisabledLanes&i)var u=0;else u=e.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){t=u;e:{var x=e;s=Ln;var b=x.current.memoizedState.isDehydrated;if(b&&($a(x,u).flags|=256),u=Er(x,u,!1),u!==2){if(br&&!b){x.errorRecoveryDisabledLanes|=i,fa|=i,s=4;break e}i=xt,xt=s,i!==null&&(xt===null?xt=i:xt.push.apply(xt,i))}s=u}if(i=!1,s!==2)continue}}if(s===1){$a(e,0),Hl(e,t,0,!0);break}e:{switch(a=e,i=s,i){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Hl(a,t,Ct,!Dl);break e;case 2:xt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(s=Is+300-gt(),10<s)){if(Hl(a,t,Ct,!Dl),ds(a,0,!0)!==0)break e;ml=t,a.timeoutHandle=fm(Uf.bind(null,a,l,xt,ti,jr,t,Ct,fa,Xa,Dl,i,"Throttled",-0,0),s);break e}Uf(a,l,xt,ti,jr,t,Ct,fa,Xa,Dl,i,null,-0,0)}}break}while(!0);$t(e)}function Uf(e,t,l,a,s,i,u,x,b,_,H,X,M,O){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pt},Tf(t,i,X);var ee=(i&62914560)===i?Is-gt():(i&4194048)===i?zf-gt():0;if(ee=mp(X,ee),ee!==null){ml=i,e.cancelPendingCommit=ee(Vf.bind(null,e,t,i,l,a,s,u,x,b,H,X,null,M,O)),Hl(e,i,u,!_);return}}Vf(e,t,i,l,a,s,u,x,b)}function Rx(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var s=l[a],i=s.getSnapshot;s=s.value;try{if(!yt(i(),s))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 Hl(e,t,l,a){t&=~yr,t&=~fa,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var i=31-bt(s),u=1<<i;a[i]=-1,s&=~u}l!==0&&Vu(e,l,t)}function li(){return(Ae&6)===0?(Yn(0),!1):!0}function Cr(){if(ge!==null){if(ze===0)var e=ge.return;else e=ge,ll=aa=null,Yc(e),Ha=null,Sn=0,e=ge;for(;e!==null;)mf(e.alternate,e),e=e.return;ge=null}}function $a(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Jx(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ml=0,Cr(),Be=e,ge=l=el(e.current,null),ye=t,ze=0,wt=null,Dl=!1,Va=sn(e,t),br=!1,Xa=Ct=yr=fa=Ol=Xe=0,xt=Ln=null,jr=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-bt(a),i=1<<s;t|=e[s],a&=~i}return fl=t,Ss(),l}function Hf(e,t){me=null,k.H=Mn,t===Ua||t===Ms?(t=Po(),ze=3):t===Rc?(t=Po(),ze=4):ze=t===ar?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,wt=t,ge===null&&(Xe=1,Xs(e,Mt(t,e.current)))}function Bf(){var e=Nt.current;return e===null?!0:(ye&4194048)===ye?kt===null:(ye&62914560)===ye||(ye&536870912)!==0?e===kt:!1}function Lf(){var e=k.H;return k.H=Mn,e===null?Mn:e}function qf(){var e=k.A;return k.A=Ax,e}function ai(){Xe=4,Dl||(ye&4194048)!==ye&&Nt.current!==null||(Va=!0),(Ol&134217727)===0&&(fa&134217727)===0||Be===null||Hl(Be,ye,Ct,!1)}function Er(e,t,l){var a=Ae;Ae|=2;var s=Lf(),i=qf();(Be!==e||ye!==t)&&(ti=null,$a(e,t)),t=!1;var u=Xe;e:do try{if(ze!==0&&ge!==null){var x=ge,b=wt;switch(ze){case 8:Cr(),u=6;break e;case 3:case 2:case 9:case 6:Nt.current===null&&(t=!0);var _=ze;if(ze=0,wt=null,Ka(e,x,b,_),l&&Va){u=0;break e}break;default:_=ze,ze=0,wt=null,Ka(e,x,b,_)}}_x(),u=Xe;break}catch(H){Hf(e,H)}while(!0);return t&&e.shellSuspendCounter++,ll=aa=null,Ae=a,k.H=s,k.A=i,ge===null&&(Be=null,ye=0,Ss()),u}function _x(){for(;ge!==null;)Yf(ge)}function Mx(e,t){var l=Ae;Ae|=2;var a=Lf(),s=qf();Be!==e||ye!==t?(ti=null,ei=gt()+500,$a(e,t)):Va=sn(e,t);e:do try{if(ze!==0&&ge!==null){t=ge;var i=wt;t:switch(ze){case 1:ze=0,wt=null,Ka(e,t,i,1);break;case 2:case 9:if(Fo(i)){ze=0,wt=null,Gf(t);break}t=function(){ze!==2&&ze!==9||Be!==e||(ze=7),$t(e)},i.then(t,t);break e;case 3:ze=7;break e;case 4:ze=5;break e;case 7:Fo(i)?(ze=0,wt=null,Gf(t)):(ze=0,wt=null,Ka(e,t,i,7));break;case 5:var u=null;switch(ge.tag){case 26:u=ge.memoizedState;case 5:case 27:var x=ge;if(u?Am(u):x.stateNode.complete){ze=0,wt=null;var b=x.sibling;if(b!==null)ge=b;else{var _=x.return;_!==null?(ge=_,ni(_)):ge=null}break t}}ze=0,wt=null,Ka(e,t,i,5);break;case 6:ze=0,wt=null,Ka(e,t,i,6);break;case 8:Cr(),Xe=6;break e;default:throw Error(r(462))}}zx();break}catch(H){Hf(e,H)}while(!0);return ll=aa=null,k.H=a,k.A=s,Ae=l,ge!==null?0:(Be=null,ye=0,Ss(),Xe)}function zx(){for(;ge!==null&&!th();)Yf(ge)}function Yf(e){var t=df(e.alternate,e,fl);e.memoizedProps=e.pendingProps,t===null?ni(e):ge=t}function Gf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=nf(l,t,t.pendingProps,t.type,void 0,ye);break;case 11:t=nf(l,t,t.pendingProps,t.type.render,t.ref,ye);break;case 5:Yc(t);default:mf(l,t),t=ge=Lo(t,fl),t=df(l,t,fl)}e.memoizedProps=e.pendingProps,t===null?ni(e):ge=t}function Ka(e,t,l,a){ll=aa=null,Yc(t),Ha=null,Sn=0;var s=t.return;try{if(yx(e,s,t,l,ye)){Xe=1,Xs(e,Mt(l,e.current)),ge=null;return}}catch(i){if(s!==null)throw ge=s,i;Xe=1,Xs(e,Mt(l,e.current)),ge=null;return}t.flags&32768?(Se||a===1?e=!0:Va||(ye&536870912)!==0?e=!1:(Dl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Nt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Qf(t,e)):ni(t)}function ni(e){var t=e;do{if((t.flags&32768)!==0){Qf(t,Dl);return}e=t.return;var l=Sx(t.alternate,t,fl);if(l!==null){ge=l;return}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);Xe===0&&(Xe=5)}function Qf(e,t){do{var l=wx(e.alternate,e);if(l!==null){l.flags&=32767,ge=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ge=e;return}ge=e=l}while(e!==null);Xe=6,ge=null}function Vf(e,t,l,a,s,i,u,x,b){e.cancelPendingCommit=null;do si();while(Pe!==0);if((Ae&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,i|=hc,dh(e,l,i,u,x,b),e===Be&&(ge=Be=null,ye=0),Za=t,Ul=e,ml=l,Nr=i,Sr=s,Df=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ux(cs,function(){return Jf(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=k.T,k.T=null,s=F.p,F.p=2,u=Ae,Ae|=4;try{Cx(e,t,l)}finally{Ae=u,F.p=s,k.T=a}}Pe=1,Xf(),Zf(),$f()}}function Xf(){if(Pe===1){Pe=0;var e=Ul,t=Za,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=k.T,k.T=null;var a=F.p;F.p=2;var s=Ae;Ae|=4;try{Cf(t,e);var i=Br,u=_o(e.containerInfo),x=i.focusedElem,b=i.selectionRange;if(u!==x&&x&&x.ownerDocument&&Ro(x.ownerDocument.documentElement,x)){if(b!==null&&uc(x)){var _=b.start,H=b.end;if(H===void 0&&(H=_),"selectionStart"in x)x.selectionStart=_,x.selectionEnd=Math.min(H,x.value.length);else{var X=x.ownerDocument||document,M=X&&X.defaultView||window;if(M.getSelection){var O=M.getSelection(),ee=x.textContent.length,ce=Math.min(b.start,ee),Ue=b.end===void 0?ce:Math.min(b.end,ee);!O.extend&&ce>Ue&&(u=Ue,Ue=ce,ce=u);var E=To(x,ce),S=To(x,Ue);if(E&&S&&(O.rangeCount!==1||O.anchorNode!==E.node||O.anchorOffset!==E.offset||O.focusNode!==S.node||O.focusOffset!==S.offset)){var T=X.createRange();T.setStart(E.node,E.offset),O.removeAllRanges(),ce>Ue?(O.addRange(T),O.extend(S.node,S.offset)):(T.setEnd(S.node,S.offset),O.addRange(T))}}}}for(X=[],O=x;O=O.parentNode;)O.nodeType===1&&X.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<X.length;x++){var Y=X[x];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}gi=!!Hr,Br=Hr=null}finally{Ae=s,F.p=a,k.T=l}}e.current=t,Pe=2}}function Zf(){if(Pe===2){Pe=0;var e=Ul,t=Za,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=k.T,k.T=null;var a=F.p;F.p=2;var s=Ae;Ae|=4;try{yf(e,t.alternate,t)}finally{Ae=s,F.p=a,k.T=l}}Pe=3}}function $f(){if(Pe===4||Pe===3){Pe=0,lh();var e=Ul,t=Za,l=ml,a=Df;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Pe=5:(Pe=0,Za=Ul=null,Kf(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(kl=null),Vi(l),t=t.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(nn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=k.T,s=F.p,F.p=2,k.T=null;try{for(var i=e.onRecoverableError,u=0;u<a.length;u++){var x=a[u];i(x.value,{componentStack:x.stack})}}finally{k.T=t,F.p=s}}(ml&3)!==0&&si(),$t(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===wr?qn++:(qn=0,wr=e):qn=0,Yn(0)}}function Kf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,jn(t)))}function si(){return Xf(),Zf(),$f(),Jf()}function Jf(){if(Pe!==5)return!1;var e=Ul,t=Nr;Nr=0;var l=Vi(ml),a=k.T,s=F.p;try{F.p=32>l?32:l,k.T=null,l=Sr,Sr=null;var i=Ul,u=ml;if(Pe=0,Za=Ul=null,ml=0,(Ae&6)!==0)throw Error(r(331));var x=Ae;if(Ae|=4,_f(i.current),Af(i,i.current,u,l),Ae=x,Yn(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(nn,i)}catch{}return!0}finally{F.p=s,k.T=a,Kf(e,t)}}function Ff(e,t,l){t=Mt(l,t),t=lr(e.stateNode,t,2),e=Rl(e,t,2),e!==null&&(cn(e,2),$t(e))}function De(e,t,l){if(e.tag===3)Ff(e,e,l);else for(;t!==null;){if(t.tag===3){Ff(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(kl===null||!kl.has(a))){e=Mt(l,e),l=Fd(2),a=Rl(t,l,2),a!==null&&(Wd(l,a,t,e),cn(a,2),$t(a));break}}t=t.return}}function Ar(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Tx;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(l)||(br=!0,s.add(l),e=Dx.bind(null,e,t,l),t.then(e,e))}function Dx(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Be===e&&(ye&l)===l&&(Xe===4||Xe===3&&(ye&62914560)===ye&&300>gt()-Is?(Ae&2)===0&&$a(e,0):yr|=l,Xa===ye&&(Xa=0)),$t(e)}function Wf(e,t){t===0&&(t=Qu()),e=ea(e,t),e!==null&&(cn(e,t),$t(e))}function Ox(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Wf(e,l)}function kx(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Wf(e,l)}function Ux(e,t){return qi(e,t)}var ii=null,Ja=null,Tr=!1,ci=!1,Rr=!1,Bl=0;function $t(e){e!==Ja&&e.next===null&&(Ja===null?ii=Ja=e:Ja=Ja.next=e),ci=!0,Tr||(Tr=!0,Bx())}function Yn(e,t){if(!Rr&&ci){Rr=!0;do for(var l=!1,a=ii;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var i=0;else{var u=a.suspendedLanes,x=a.pingedLanes;i=(1<<31-bt(42|e)+1)-1,i&=s&~(u&~x),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,tm(a,i))}else i=ye,i=ds(a,a===Be?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||sn(a,i)||(l=!0,tm(a,i));a=a.next}while(l);Rr=!1}}function Hx(){Pf()}function Pf(){ci=Tr=!1;var e=0;Bl!==0&&Kx()&&(e=Bl);for(var t=gt(),l=null,a=ii;a!==null;){var s=a.next,i=If(a,t);i===0?(a.next=null,l===null?ii=s:l.next=s,s===null&&(Ja=l)):(l=a,(e!==0||(i&3)!==0)&&(ci=!0)),a=s}Pe!==0&&Pe!==5||Yn(e),Bl!==0&&(Bl=0)}function If(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var u=31-bt(i),x=1<<u,b=s[u];b===-1?((x&l)===0||(x&a)!==0)&&(s[u]=oh(x,t)):b<=t&&(e.expiredLanes|=x),i&=~x}if(t=Be,l=ye,l=ds(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(ze===2||ze===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Yi(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||sn(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Yi(a),Vi(l)){case 2:case 8:l=Yu;break;case 32:l=cs;break;case 268435456:l=Gu;break;default:l=cs}return a=em.bind(null,e),l=qi(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Yi(a),e.callbackPriority=2,e.callbackNode=null,2}function em(e,t){if(Pe!==0&&Pe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(si()&&e.callbackNode!==l)return null;var a=ye;return a=ds(e,e===Be?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(kf(e,a,t),If(e,gt()),e.callbackNode!=null&&e.callbackNode===l?em.bind(null,e):null)}function tm(e,t){if(si())return null;kf(e,t,!0)}function Bx(){Fx(function(){(Ae&6)!==0?qi(qu,Hx):Pf()})}function _r(){if(Bl===0){var e=Oa;e===0&&(e=rs,rs<<=1,(rs&261888)===0&&(rs=256)),Bl=e}return Bl}function lm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:xs(""+e)}function am(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function Lx(e,t,l,a,s){if(t==="submit"&&l&&l.stateNode===s){var i=lm((s[ot]||null).action),u=a.submitter;u&&(t=(t=u[ot]||null)?lm(t.formAction):u.getAttribute("formAction"),t!==null&&(i=t,u=null));var x=new bs("action","action",null,a,s);e.push({event:x,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Bl!==0){var b=u?am(s,u):new FormData(s);Fc(l,{pending:!0,data:b,method:s.method,action:i},null,b)}}else typeof i=="function"&&(x.preventDefault(),b=u?am(s,u):new FormData(s),Fc(l,{pending:!0,data:b,method:s.method,action:i},i,b))},currentTarget:s}]})}}for(var Mr=0;Mr<mc.length;Mr++){var zr=mc[Mr],qx=zr.toLowerCase(),Yx=zr[0].toUpperCase()+zr.slice(1);Yt(qx,"on"+Yx)}Yt(Do,"onAnimationEnd"),Yt(Oo,"onAnimationIteration"),Yt(ko,"onAnimationStart"),Yt("dblclick","onDoubleClick"),Yt("focusin","onFocus"),Yt("focusout","onBlur"),Yt(ax,"onTransitionRun"),Yt(nx,"onTransitionStart"),Yt(sx,"onTransitionCancel"),Yt(Uo,"onTransitionEnd"),ya("onMouseEnter",["mouseout","mouseover"]),ya("onMouseLeave",["mouseout","mouseover"]),ya("onPointerEnter",["pointerout","pointerover"]),ya("onPointerLeave",["pointerout","pointerover"]),Fl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gn="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(" "),Gx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gn));function nm(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],s=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var u=a.length-1;0<=u;u--){var x=a[u],b=x.instance,_=x.currentTarget;if(x=x.listener,b!==i&&s.isPropagationStopped())break e;i=x,s.currentTarget=_;try{i(s)}catch(H){Ns(H)}s.currentTarget=null,i=b}else for(u=0;u<a.length;u++){if(x=a[u],b=x.instance,_=x.currentTarget,x=x.listener,b!==i&&s.isPropagationStopped())break e;i=x,s.currentTarget=_;try{i(s)}catch(H){Ns(H)}s.currentTarget=null,i=b}}}}function ve(e,t){var l=t[Xi];l===void 0&&(l=t[Xi]=new Set);var a=e+"__bubble";l.has(a)||(sm(t,e,2,!1),l.add(a))}function Dr(e,t,l){var a=0;t&&(a|=4),sm(l,e,a,t)}var ri="_reactListening"+Math.random().toString(36).slice(2);function Or(e){if(!e[ri]){e[ri]=!0,Fu.forEach(function(l){l!=="selectionchange"&&(Gx.has(l)||Dr(l,!1,e),Dr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ri]||(t[ri]=!0,Dr("selectionchange",!1,t))}}function sm(e,t,l,a){switch(Om(t)){case 2:var s=pp;break;case 8:s=gp;break;default:s=Jr}l=s.bind(null,t,l,e),s=void 0,!ec||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,l,{capture:!0,passive:s}):e.addEventListener(t,l,!0):s!==void 0?e.addEventListener(t,l,{passive:s}):e.addEventListener(t,l,!1)}function kr(e,t,l,a,s){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var u=a.tag;if(u===3||u===4){var x=a.stateNode.containerInfo;if(x===s)break;if(u===4)for(u=a.return;u!==null;){var b=u.tag;if((b===3||b===4)&&u.stateNode.containerInfo===s)return;u=u.return}for(;x!==null;){if(u=ga(x),u===null)return;if(b=u.tag,b===5||b===6||b===26||b===27){a=i=u;continue e}x=x.parentNode}}a=a.return}ro(function(){var _=i,H=Pi(l),X=[];e:{var M=Ho.get(e);if(M!==void 0){var O=bs,ee=e;switch(e){case"keypress":if(gs(l)===0)break e;case"keydown":case"keyup":O=kh;break;case"focusin":ee="focus",O=nc;break;case"focusout":ee="blur",O=nc;break;case"beforeblur":case"afterblur":O=nc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=fo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=Sh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=Bh;break;case Do:case Oo:case ko:O=Eh;break;case Uo:O=qh;break;case"scroll":case"scrollend":O=jh;break;case"wheel":O=Gh;break;case"copy":case"cut":case"paste":O=Th;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=ho;break;case"toggle":case"beforetoggle":O=Vh}var ce=(t&4)!==0,Ue=!ce&&(e==="scroll"||e==="scrollend"),E=ce?M!==null?M+"Capture":null:M;ce=[];for(var S=_,T;S!==null;){var Y=S;if(T=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||T===null||E===null||(Y=on(S,E),Y!=null&&ce.push(Qn(S,Y,T))),Ue)break;S=S.return}0<ce.length&&(M=new O(M,ee,null,l,H),X.push({event:M,listeners:ce}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",M&&l!==Wi&&(ee=l.relatedTarget||l.fromElement)&&(ga(ee)||ee[pa]))break e;if((O||M)&&(M=H.window===H?H:(M=H.ownerDocument)?M.defaultView||M.parentWindow:window,O?(ee=l.relatedTarget||l.toElement,O=_,ee=ee?ga(ee):null,ee!==null&&(Ue=f(ee),ce=ee.tag,ee!==Ue||ce!==5&&ce!==27&&ce!==6)&&(ee=null)):(O=null,ee=_),O!==ee)){if(ce=fo,Y="onMouseLeave",E="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(ce=ho,Y="onPointerLeave",E="onPointerEnter",S="pointer"),Ue=O==null?M:un(O),T=ee==null?M:un(ee),M=new ce(Y,S+"leave",O,l,H),M.target=Ue,M.relatedTarget=T,Y=null,ga(H)===_&&(ce=new ce(E,S+"enter",ee,l,H),ce.target=T,ce.relatedTarget=Ue,Y=ce),Ue=Y,O&&ee)t:{for(ce=Qx,E=O,S=ee,T=0,Y=E;Y;Y=ce(Y))T++;Y=0;for(var ne=S;ne;ne=ce(ne))Y++;for(;0<T-Y;)E=ce(E),T--;for(;0<Y-T;)S=ce(S),Y--;for(;T--;){if(E===S||S!==null&&E===S.alternate){ce=E;break t}E=ce(E),S=ce(S)}ce=null}else ce=null;O!==null&&im(X,M,O,ce,!1),ee!==null&&Ue!==null&&im(X,Ue,ee,ce,!0)}}e:{if(M=_?un(_):window,O=M.nodeName&&M.nodeName.toLowerCase(),O==="select"||O==="input"&&M.type==="file")var Ce=No;else if(yo(M))if(So)Ce=ex;else{Ce=Ph;var te=Wh}else O=M.nodeName,!O||O.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?_&&Fi(_.elementType)&&(Ce=No):Ce=Ih;if(Ce&&(Ce=Ce(e,_))){jo(X,Ce,l,H);break e}te&&te(e,M,_),e==="focusout"&&_&&M.type==="number"&&_.memoizedProps.value!=null&&Ji(M,"number",M.value)}switch(te=_?un(_):window,e){case"focusin":(yo(te)||te.contentEditable==="true")&&(Ea=te,oc=_,vn=null);break;case"focusout":vn=oc=Ea=null;break;case"mousedown":dc=!0;break;case"contextmenu":case"mouseup":case"dragend":dc=!1,Mo(X,l,H);break;case"selectionchange":if(lx)break;case"keydown":case"keyup":Mo(X,l,H)}var he;if(ic)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else Ca?vo(e,l)&&(je="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(je="onCompositionStart");je&&(xo&&l.locale!=="ko"&&(Ca||je!=="onCompositionStart"?je==="onCompositionEnd"&&Ca&&(he=uo()):(Nl=H,tc="value"in Nl?Nl.value:Nl.textContent,Ca=!0)),te=ui(_,je),0<te.length&&(je=new mo(je,e,null,l,H),X.push({event:je,listeners:te}),he?je.data=he:(he=bo(l),he!==null&&(je.data=he)))),(he=Zh?$h(e,l):Kh(e,l))&&(je=ui(_,"onBeforeInput"),0<je.length&&(te=new mo("onBeforeInput","beforeinput",null,l,H),X.push({event:te,listeners:je}),te.data=he)),Lx(X,e,_,l,H)}nm(X,t)})}function Qn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function ui(e,t){for(var l=t+"Capture",a=[];e!==null;){var s=e,i=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||i===null||(s=on(e,l),s!=null&&a.unshift(Qn(e,s,i)),s=on(e,t),s!=null&&a.push(Qn(e,s,i))),e.tag===3)return a;e=e.return}return[]}function Qx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function im(e,t,l,a,s){for(var i=t._reactName,u=[];l!==null&&l!==a;){var x=l,b=x.alternate,_=x.stateNode;if(x=x.tag,b!==null&&b===a)break;x!==5&&x!==26&&x!==27||_===null||(b=_,s?(_=on(l,i),_!=null&&u.unshift(Qn(l,_,b))):s||(_=on(l,i),_!=null&&u.push(Qn(l,_,b)))),l=l.return}u.length!==0&&e.push({event:t,listeners:u})}var Vx=/\r\n?/g,Xx=/\u0000|\uFFFD/g;function cm(e){return(typeof e=="string"?e:""+e).replace(Vx,`
49
- `).replace(Xx,"")}function rm(e,t){return t=cm(t),cm(e)===t}function ke(e,t,l,a,s,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Na(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Na(e,""+a);break;case"className":ms(e,"class",a);break;case"tabIndex":ms(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ms(e,l,a);break;case"style":io(e,a,i);break;case"data":if(t!=="object"){ms(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=xs(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(l==="formAction"?(t!=="input"&&ke(e,t,"name",s.name,s,null),ke(e,t,"formEncType",s.formEncType,s,null),ke(e,t,"formMethod",s.formMethod,s,null),ke(e,t,"formTarget",s.formTarget,s,null)):(ke(e,t,"encType",s.encType,s,null),ke(e,t,"method",s.method,s,null),ke(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=xs(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Pt);break;case"onScroll":a!=null&&ve("scroll",e);break;case"onScrollEnd":a!=null&&ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=xs(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":ve("beforetoggle",e),ve("toggle",e),fs(e,"popover",a);break;case"xlinkActuate":Wt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Wt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Wt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Wt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Wt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Wt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":fs(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=bh.get(l)||l,fs(e,l,a))}}function Ur(e,t,l,a,s,i){switch(l){case"style":io(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof a=="string"?Na(e,a):(typeof a=="number"||typeof a=="bigint")&&Na(e,""+a);break;case"onScroll":a!=null&&ve("scroll",e);break;case"onScrollEnd":a!=null&&ve("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Pt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Wu.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),t=l.slice(2,s?l.length-7:void 0),i=e[ot]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,s),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,s);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):fs(e,l,a)}}}function st(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ve("error",e),ve("load",e);var a=!1,s=!1,i;for(i in l)if(l.hasOwnProperty(i)){var u=l[i];if(u!=null)switch(i){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:ke(e,t,i,u,l,null)}}s&&ke(e,t,"srcSet",l.srcSet,l,null),a&&ke(e,t,"src",l.src,l,null);return;case"input":ve("invalid",e);var x=i=u=s=null,b=null,_=null;for(a in l)if(l.hasOwnProperty(a)){var H=l[a];if(H!=null)switch(a){case"name":s=H;break;case"type":u=H;break;case"checked":b=H;break;case"defaultChecked":_=H;break;case"value":i=H;break;case"defaultValue":x=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,t));break;default:ke(e,t,a,H,l,null)}}lo(e,i,x,b,_,u,s,!1);return;case"select":ve("invalid",e),a=u=i=null;for(s in l)if(l.hasOwnProperty(s)&&(x=l[s],x!=null))switch(s){case"value":i=x;break;case"defaultValue":u=x;break;case"multiple":a=x;default:ke(e,t,s,x,l,null)}t=i,l=u,e.multiple=!!a,t!=null?ja(e,!!a,t,!1):l!=null&&ja(e,!!a,l,!0);return;case"textarea":ve("invalid",e),i=s=a=null;for(u in l)if(l.hasOwnProperty(u)&&(x=l[u],x!=null))switch(u){case"value":a=x;break;case"defaultValue":s=x;break;case"children":i=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:ke(e,t,u,x,l,null)}no(e,a,s,i);return;case"option":for(b in l)if(l.hasOwnProperty(b)&&(a=l[b],a!=null))switch(b){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:ke(e,t,b,a,l,null)}return;case"dialog":ve("beforetoggle",e),ve("toggle",e),ve("cancel",e),ve("close",e);break;case"iframe":case"object":ve("load",e);break;case"video":case"audio":for(a=0;a<Gn.length;a++)ve(Gn[a],e);break;case"image":ve("error",e),ve("load",e);break;case"details":ve("toggle",e);break;case"embed":case"source":case"link":ve("error",e),ve("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(_ in l)if(l.hasOwnProperty(_)&&(a=l[_],a!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:ke(e,t,_,a,l,null)}return;default:if(Fi(t)){for(H in l)l.hasOwnProperty(H)&&(a=l[H],a!==void 0&&Ur(e,t,H,a,l,void 0));return}}for(x in l)l.hasOwnProperty(x)&&(a=l[x],a!=null&&ke(e,t,x,a,l,null))}function Zx(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,i=null,u=null,x=null,b=null,_=null,H=null;for(O in l){var X=l[O];if(l.hasOwnProperty(O)&&X!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":b=X;default:a.hasOwnProperty(O)||ke(e,t,O,null,a,X)}}for(var M in a){var O=a[M];if(X=l[M],a.hasOwnProperty(M)&&(O!=null||X!=null))switch(M){case"type":i=O;break;case"name":s=O;break;case"checked":_=O;break;case"defaultChecked":H=O;break;case"value":u=O;break;case"defaultValue":x=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:O!==X&&ke(e,t,M,O,a,X)}}Ki(e,u,x,b,_,H,i,s);return;case"select":O=u=x=M=null;for(i in l)if(b=l[i],l.hasOwnProperty(i)&&b!=null)switch(i){case"value":break;case"multiple":O=b;default:a.hasOwnProperty(i)||ke(e,t,i,null,a,b)}for(s in a)if(i=a[s],b=l[s],a.hasOwnProperty(s)&&(i!=null||b!=null))switch(s){case"value":M=i;break;case"defaultValue":x=i;break;case"multiple":u=i;default:i!==b&&ke(e,t,s,i,a,b)}t=x,l=u,a=O,M!=null?ja(e,!!l,M,!1):!!a!=!!l&&(t!=null?ja(e,!!l,t,!0):ja(e,!!l,l?[]:"",!1));return;case"textarea":O=M=null;for(x in l)if(s=l[x],l.hasOwnProperty(x)&&s!=null&&!a.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:ke(e,t,x,null,a,s)}for(u in a)if(s=a[u],i=l[u],a.hasOwnProperty(u)&&(s!=null||i!=null))switch(u){case"value":M=s;break;case"defaultValue":O=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(r(91));break;default:s!==i&&ke(e,t,u,s,a,i)}ao(e,M,O);return;case"option":for(var ee in l)if(M=l[ee],l.hasOwnProperty(ee)&&M!=null&&!a.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:ke(e,t,ee,null,a,M)}for(b in a)if(M=a[b],O=l[b],a.hasOwnProperty(b)&&M!==O&&(M!=null||O!=null))switch(b){case"selected":e.selected=M&&typeof M!="function"&&typeof M!="symbol";break;default:ke(e,t,b,M,a,O)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ce in l)M=l[ce],l.hasOwnProperty(ce)&&M!=null&&!a.hasOwnProperty(ce)&&ke(e,t,ce,null,a,M);for(_ in a)if(M=a[_],O=l[_],a.hasOwnProperty(_)&&M!==O&&(M!=null||O!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,t));break;default:ke(e,t,_,M,a,O)}return;default:if(Fi(t)){for(var Ue in l)M=l[Ue],l.hasOwnProperty(Ue)&&M!==void 0&&!a.hasOwnProperty(Ue)&&Ur(e,t,Ue,void 0,a,M);for(H in a)M=a[H],O=l[H],!a.hasOwnProperty(H)||M===O||M===void 0&&O===void 0||Ur(e,t,H,M,a,O);return}}for(var E in l)M=l[E],l.hasOwnProperty(E)&&M!=null&&!a.hasOwnProperty(E)&&ke(e,t,E,null,a,M);for(X in a)M=a[X],O=l[X],!a.hasOwnProperty(X)||M===O||M==null&&O==null||ke(e,t,X,M,a,O)}function um(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $x(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var s=l[a],i=s.transferSize,u=s.initiatorType,x=s.duration;if(i&&x&&um(u)){for(u=0,x=s.responseEnd,a+=1;a<l.length;a++){var b=l[a],_=b.startTime;if(_>x)break;var H=b.transferSize,X=b.initiatorType;H&&um(X)&&(b=b.responseEnd,u+=H*(b<x?1:(x-_)/(b-_)))}if(--a,t+=8*(i+u)/(s.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Hr=null,Br=null;function oi(e){return e.nodeType===9?e:e.ownerDocument}function om(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function dm(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Lr(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qr=null;function Kx(){var e=window.event;return e&&e.type==="popstate"?e===qr?!1:(qr=e,!0):(qr=null,!1)}var fm=typeof setTimeout=="function"?setTimeout:void 0,Jx=typeof clearTimeout=="function"?clearTimeout:void 0,mm=typeof Promise=="function"?Promise:void 0,Fx=typeof queueMicrotask=="function"?queueMicrotask:typeof mm<"u"?function(e){return mm.resolve(null).then(e).catch(Wx)}:fm;function Wx(e){setTimeout(function(){throw e})}function Ll(e){return e==="head"}function hm(e,t){var l=t,a=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(s),Ia(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Vn(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Vn(l);for(var i=l.firstChild;i;){var u=i.nextSibling,x=i.nodeName;i[rn]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=u}}else l==="body"&&Vn(e.ownerDocument.body);l=s}while(l);Ia(t)}function xm(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function Yr(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Yr(l),Zi(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Px(e,t,l,a){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[rn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Ut(e.nextSibling),e===null)break}return null}function Ix(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Ut(e.nextSibling),e===null))return null;return e}function pm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ut(e.nextSibling),e===null))return null;return e}function Gr(e){return e.data==="$?"||e.data==="$~"}function Qr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ep(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Ut(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Vr=null;function gm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Ut(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function vm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function bm(e,t,l){switch(t=oi(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Vn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Zi(e)}var Ht=new Map,ym=new Set;function di(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var hl=F.d;F.d={f:tp,r:lp,D:ap,C:np,L:sp,m:ip,X:rp,S:cp,M:up};function tp(){var e=hl.f(),t=li();return e||t}function lp(e){var t=va(e);t!==null&&t.tag===5&&t.type==="form"?Ud(t):hl.r(e)}var Fa=typeof document>"u"?null:document;function jm(e,t,l){var a=Fa;if(a&&typeof t=="string"&&t){var s=Rt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),ym.has(s)||(ym.add(s),e={rel:e,crossOrigin:l,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),st(t,"link",e),Ie(t),a.head.appendChild(t)))}}function ap(e){hl.D(e),jm("dns-prefetch",e,null)}function np(e,t){hl.C(e,t),jm("preconnect",e,t)}function sp(e,t,l){hl.L(e,t,l);var a=Fa;if(a&&e&&t){var s='link[rel="preload"][as="'+Rt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+Rt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+Rt(l.imageSizes)+'"]')):s+='[href="'+Rt(e)+'"]';var i=s;switch(t){case"style":i=Wa(e);break;case"script":i=Pa(e)}Ht.has(i)||(e=w({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Ht.set(i,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(Xn(i))||t==="script"&&a.querySelector(Zn(i))||(t=a.createElement("link"),st(t,"link",e),Ie(t),a.head.appendChild(t)))}}function ip(e,t){hl.m(e,t);var l=Fa;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Rt(a)+'"][href="'+Rt(e)+'"]',i=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Pa(e)}if(!Ht.has(i)&&(e=w({rel:"modulepreload",href:e},t),Ht.set(i,e),l.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Zn(i)))return}a=l.createElement("link"),st(a,"link",e),Ie(a),l.head.appendChild(a)}}}function cp(e,t,l){hl.S(e,t,l);var a=Fa;if(a&&e){var s=ba(a).hoistableStyles,i=Wa(e);t=t||"default";var u=s.get(i);if(!u){var x={loading:0,preload:null};if(u=a.querySelector(Xn(i)))x.loading=5;else{e=w({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Ht.get(i))&&Xr(e,l);var b=u=a.createElement("link");Ie(b),st(b,"link",e),b._p=new Promise(function(_,H){b.onload=_,b.onerror=H}),b.addEventListener("load",function(){x.loading|=1}),b.addEventListener("error",function(){x.loading|=2}),x.loading|=4,fi(u,t,a)}u={type:"stylesheet",instance:u,count:1,state:x},s.set(i,u)}}}function rp(e,t){hl.X(e,t);var l=Fa;if(l&&e){var a=ba(l).hoistableScripts,s=Pa(e),i=a.get(s);i||(i=l.querySelector(Zn(s)),i||(e=w({src:e,async:!0},t),(t=Ht.get(s))&&Zr(e,t),i=l.createElement("script"),Ie(i),st(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function up(e,t){hl.M(e,t);var l=Fa;if(l&&e){var a=ba(l).hoistableScripts,s=Pa(e),i=a.get(s);i||(i=l.querySelector(Zn(s)),i||(e=w({src:e,async:!0,type:"module"},t),(t=Ht.get(s))&&Zr(e,t),i=l.createElement("script"),Ie(i),st(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function Nm(e,t,l,a){var s=(s=de.current)?di(s):null;if(!s)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Wa(l.href),l=ba(s).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Wa(l.href);var i=ba(s).hoistableStyles,u=i.get(e);if(u||(s=s.ownerDocument||s,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,u),(i=s.querySelector(Xn(e)))&&!i._p&&(u.instance=i,u.state.loading=5),Ht.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ht.set(e,l),i||op(s,e,l,u.state))),t&&a===null)throw Error(r(528,""));return u}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Pa(l),l=ba(s).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Wa(e){return'href="'+Rt(e)+'"'}function Xn(e){return'link[rel="stylesheet"]['+e+"]"}function Sm(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function op(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),st(t,"link",l),Ie(t),e.head.appendChild(t))}function Pa(e){return'[src="'+Rt(e)+'"]'}function Zn(e){return"script[async]"+e}function wm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Rt(l.href)+'"]');if(a)return t.instance=a,Ie(a),a;var s=w({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ie(a),st(a,"style",s),fi(a,l.precedence,e),t.instance=a;case"stylesheet":s=Wa(l.href);var i=e.querySelector(Xn(s));if(i)return t.state.loading|=4,t.instance=i,Ie(i),i;a=Sm(l),(s=Ht.get(s))&&Xr(a,s),i=(e.ownerDocument||e).createElement("link"),Ie(i);var u=i;return u._p=new Promise(function(x,b){u.onload=x,u.onerror=b}),st(i,"link",a),t.state.loading|=4,fi(i,l.precedence,e),t.instance=i;case"script":return i=Pa(l.src),(s=e.querySelector(Zn(i)))?(t.instance=s,Ie(s),s):(a=l,(s=Ht.get(i))&&(a=w({},l),Zr(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),Ie(s),st(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,fi(a,l.precedence,e));return t.instance}function fi(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,i=s,u=0;u<a.length;u++){var x=a[u];if(x.dataset.precedence===t)i=x;else if(i!==s)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Xr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Zr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var mi=null;function Cm(e,t,l){if(mi===null){var a=new Map,s=mi=new Map;s.set(l,a)}else s=mi,a=s.get(l),a||(a=new Map,s.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var i=l[s];if(!(i[rn]||i[tt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var u=i.getAttribute(t)||"";u=e+u;var x=a.get(u);x?x.push(i):a.set(u,[i])}}return a}function Em(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function dp(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Am(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function fp(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=Wa(a.href),i=t.querySelector(Xn(s));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=hi.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,Ie(i);return}i=t.ownerDocument||t,a=Sm(a),(s=Ht.get(s))&&Xr(a,s),i=i.createElement("link"),Ie(i);var u=i;u._p=new Promise(function(x,b){u.onload=x,u.onerror=b}),st(i,"link",a),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=hi.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var $r=0;function mp(e,t){return e.stylesheets&&e.count===0&&pi(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&pi(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&$r===0&&($r=62500*$x());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pi(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>$r?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function hi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var xi=null;function pi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xi=new Map,t.forEach(hp,e),xi=null,hi.call(e))}function hp(e,t){if(!(t.state.loading&4)){var l=xi.get(e);if(l)var a=l.get(null);else{l=new Map,xi.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<s.length;i++){var u=s[i];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(l.set(u.dataset.precedence,u),a=u)}a&&l.set(null,a)}s=t.instance,u=s.getAttribute("data-precedence"),i=l.get(u)||a,i===a&&l.set(null,s),l.set(u,s),this.count++,a=hi.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),i?i.parentNode.insertBefore(s,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var $n={$$typeof:L,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function xp(e,t,l,a,s,i,u,x,b){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Gi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gi(0),this.hiddenUpdates=Gi(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=i,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Tm(e,t,l,a,s,i,u,x,b,_,H,X){return e=new xp(e,t,l,u,b,_,H,X,x),t=1,i===!0&&(t|=24),i=jt(3,null,null,t),e.current=i,i.stateNode=e,t=Ec(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},_c(i),e}function Rm(e){return e?(e=Ra,e):Ra}function _m(e,t,l,a,s,i){s=Rm(s),a.context===null?a.context=s:a.pendingContext=s,a=Tl(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=Rl(e,a,t),l!==null&&(pt(l,e,t),Cn(l,e,t))}function Mm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Kr(e,t){Mm(e,t),(e=e.alternate)&&Mm(e,t)}function zm(e){if(e.tag===13||e.tag===31){var t=ea(e,67108864);t!==null&&pt(t,e,67108864),Kr(e,67108864)}}function Dm(e){if(e.tag===13||e.tag===31){var t=Et();t=Qi(t);var l=ea(e,t);l!==null&&pt(l,e,t),Kr(e,t)}}var gi=!0;function pp(e,t,l,a){var s=k.T;k.T=null;var i=F.p;try{F.p=2,Jr(e,t,l,a)}finally{F.p=i,k.T=s}}function gp(e,t,l,a){var s=k.T;k.T=null;var i=F.p;try{F.p=8,Jr(e,t,l,a)}finally{F.p=i,k.T=s}}function Jr(e,t,l,a){if(gi){var s=Fr(a);if(s===null)kr(e,t,a,vi,l),km(e,a);else if(bp(s,e,t,l,a))a.stopPropagation();else if(km(e,a),t&4&&-1<vp.indexOf(e)){for(;s!==null;){var i=va(s);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var u=Jl(i.pendingLanes);if(u!==0){var x=i;for(x.pendingLanes|=2,x.entangledLanes|=2;u;){var b=1<<31-bt(u);x.entanglements[1]|=b,u&=~b}$t(i),(Ae&6)===0&&(ei=gt()+500,Yn(0))}}break;case 31:case 13:x=ea(i,2),x!==null&&pt(x,i,2),li(),Kr(i,2)}if(i=Fr(a),i===null&&kr(e,t,a,vi,l),i===s)break;s=i}s!==null&&a.stopPropagation()}else kr(e,t,a,null,l)}}function Fr(e){return e=Pi(e),Wr(e)}var vi=null;function Wr(e){if(vi=null,e=ga(e),e!==null){var t=f(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=h(t),e!==null)return e;e=null}else if(l===31){if(e=v(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return vi=e,null}function Om(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ah()){case qu:return 2;case Yu:return 8;case cs:case nh:return 32;case Gu:return 268435456;default:return 32}default:return 32}}var Pr=!1,ql=null,Yl=null,Gl=null,Kn=new Map,Jn=new Map,Ql=[],vp="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function km(e,t){switch(e){case"focusin":case"focusout":ql=null;break;case"dragenter":case"dragleave":Yl=null;break;case"mouseover":case"mouseout":Gl=null;break;case"pointerover":case"pointerout":Kn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Jn.delete(t.pointerId)}}function Fn(e,t,l,a,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[s]},t!==null&&(t=va(t),t!==null&&zm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function bp(e,t,l,a,s){switch(t){case"focusin":return ql=Fn(ql,e,t,l,a,s),!0;case"dragenter":return Yl=Fn(Yl,e,t,l,a,s),!0;case"mouseover":return Gl=Fn(Gl,e,t,l,a,s),!0;case"pointerover":var i=s.pointerId;return Kn.set(i,Fn(Kn.get(i)||null,e,t,l,a,s)),!0;case"gotpointercapture":return i=s.pointerId,Jn.set(i,Fn(Jn.get(i)||null,e,t,l,a,s)),!0}return!1}function Um(e){var t=ga(e.target);if(t!==null){var l=f(t);if(l!==null){if(t=l.tag,t===13){if(t=h(l),t!==null){e.blockedOn=t,Ku(e.priority,function(){Dm(l)});return}}else if(t===31){if(t=v(l),t!==null){e.blockedOn=t,Ku(e.priority,function(){Dm(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function bi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Fr(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Wi=a,l.target.dispatchEvent(a),Wi=null}else return t=va(l),t!==null&&zm(t),e.blockedOn=l,!1;t.shift()}return!0}function Hm(e,t,l){bi(e)&&l.delete(t)}function yp(){Pr=!1,ql!==null&&bi(ql)&&(ql=null),Yl!==null&&bi(Yl)&&(Yl=null),Gl!==null&&bi(Gl)&&(Gl=null),Kn.forEach(Hm),Jn.forEach(Hm)}function yi(e,t){e.blockedOn===t&&(e.blockedOn=null,Pr||(Pr=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,yp)))}var ji=null;function Bm(e){ji!==e&&(ji=e,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){ji===e&&(ji=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(Wr(a||l)===null)continue;break}var i=va(l);i!==null&&(e.splice(t,3),t-=3,Fc(i,{pending:!0,data:s,method:l.method,action:a},a,s))}}))}function Ia(e){function t(b){return yi(b,e)}ql!==null&&yi(ql,e),Yl!==null&&yi(Yl,e),Gl!==null&&yi(Gl,e),Kn.forEach(t),Jn.forEach(t);for(var l=0;l<Ql.length;l++){var a=Ql[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ql.length&&(l=Ql[0],l.blockedOn===null);)Um(l),l.blockedOn===null&&Ql.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var s=l[a],i=l[a+1],u=s[ot]||null;if(typeof i=="function")u||Bm(l);else if(u){var x=null;if(i&&i.hasAttribute("formAction")){if(s=i,u=i[ot]||null)x=u.formAction;else if(Wr(s)!==null)continue}else x=u.action;typeof x=="function"?l[a+1]=x:(l.splice(a,3),a-=3),Bm(l)}}}function Lm(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(u){return s=u})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Ir(e){this._internalRoot=e}Ni.prototype.render=Ir.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=Et();_m(l,a,e,t,null,null)},Ni.prototype.unmount=Ir.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_m(e.current,2,null,e,null,null),li(),t[pa]=null}};function Ni(e){this._internalRoot=e}Ni.prototype.unstable_scheduleHydration=function(e){if(e){var t=$u();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Ql.length&&t!==0&&t<Ql[l].priority;l++);Ql.splice(l,0,e),l===0&&Um(e)}};var qm=o.version;if(qm!=="19.2.4")throw Error(r(527,qm,"19.2.4"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(t),e=e!==null?N(e):null,e=e===null?null:e.stateNode,e};var jp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Si=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Si.isDisabled&&Si.supportsFiber)try{nn=Si.inject(jp),vt=Si}catch{}}return Pn.createRoot=function(e,t){if(!m(e))throw Error(r(299));var l=!1,a="",s=Zd,i=$d,u=Kd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=Tm(e,1,!1,null,null,l,a,null,s,i,u,Lm),e[pa]=t.current,Or(e),new Ir(t)},Pn.hydrateRoot=function(e,t,l){if(!m(e))throw Error(r(299));var a=!1,s="",i=Zd,u=$d,x=Kd,b=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(u=l.onCaughtError),l.onRecoverableError!==void 0&&(x=l.onRecoverableError),l.formState!==void 0&&(b=l.formState)),t=Tm(e,1,!0,t,l??null,a,s,b,i,u,x,Lm),t.context=Rm(null),l=t.current,a=Et(),a=Qi(a),s=Tl(a),s.callback=null,Rl(l,s,a),l=a,t.current.lanes=l,cn(t,l),$t(t),e[pa]=t.current,Or(e),new Ni(t)},Pn.version="19.2.4",Pn}var Fm;function _p(){if(Fm)return lu.exports;Fm=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(o){console.error(o)}}return c(),lu.exports=Rp(),lu.exports}var Mp=_p();const zp=vu(Mp);/**
50
- * react-router v7.13.0
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */var Wm="popstate";function Dp(c={}){function o(m,f){let{pathname:h="/",search:v="",hash:g=""}=xa(m.location.hash.substring(1));return!h.startsWith("/")&&!h.startsWith(".")&&(h="/"+h),fu("",{pathname:h,search:v,hash:g},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function d(m,f){let h=m.document.querySelector("base"),v="";if(h&&h.getAttribute("href")){let g=m.location.href,p=g.indexOf("#");v=p===-1?g:g.slice(0,p)}return v+"#"+(typeof f=="string"?f:ts(f))}function r(m,f){qt(m.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return kp(o,d,r,c)}function Ge(c,o){if(c===!1||c===null||typeof c>"u")throw new Error(o)}function qt(c,o){if(!c){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function Op(){return Math.random().toString(36).substring(2,10)}function Pm(c,o){return{usr:c.state,key:c.key,idx:o}}function fu(c,o,d=null,r){return{pathname:typeof c=="string"?c:c.pathname,search:"",hash:"",...typeof o=="string"?xa(o):o,state:d,key:o&&o.key||r||Op()}}function ts({pathname:c="/",search:o="",hash:d=""}){return o&&o!=="?"&&(c+=o.charAt(0)==="?"?o:"?"+o),d&&d!=="#"&&(c+=d.charAt(0)==="#"?d:"#"+d),c}function xa(c){let o={};if(c){let d=c.indexOf("#");d>=0&&(o.hash=c.substring(d),c=c.substring(0,d));let r=c.indexOf("?");r>=0&&(o.search=c.substring(r),c=c.substring(0,r)),c&&(o.pathname=c)}return o}function kp(c,o,d,r={}){let{window:m=document.defaultView,v5Compat:f=!1}=r,h=m.history,v="POP",g=null,p=N();p==null&&(p=0,h.replaceState({...h.state,idx:p},""));function N(){return(h.state||{idx:null}).idx}function w(){v="POP";let R=N(),Q=R==null?null:R-p;p=R,g&&g({action:v,location:A.location,delta:Q})}function D(R,Q){v="PUSH";let q=fu(A.location,R,Q);d&&d(q,R),p=N()+1;let L=Pm(q,p),J=A.createHref(q);try{h.pushState(L,"",J)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;m.location.assign(J)}f&&g&&g({action:v,location:A.location,delta:1})}function z(R,Q){v="REPLACE";let q=fu(A.location,R,Q);d&&d(q,R),p=N();let L=Pm(q,p),J=A.createHref(q);h.replaceState(L,"",J),f&&g&&g({action:v,location:A.location,delta:0})}function U(R){return Up(R)}let A={get action(){return v},get location(){return c(m,h)},listen(R){if(g)throw new Error("A history only accepts one active listener");return m.addEventListener(Wm,w),g=R,()=>{m.removeEventListener(Wm,w),g=null}},createHref(R){return o(m,R)},createURL:U,encodeLocation(R){let Q=U(R);return{pathname:Q.pathname,search:Q.search,hash:Q.hash}},push:D,replace:z,go(R){return h.go(R)}};return A}function Up(c,o=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),Ge(d,"No window.location.(origin|href) available to create URL");let r=typeof c=="string"?c:ts(c);return r=r.replace(/ $/,"%20"),!o&&r.startsWith("//")&&(r=d+r),new URL(r,d)}function y0(c,o,d="/"){return Hp(c,o,d,!1)}function Hp(c,o,d,r){let m=typeof o=="string"?xa(o):o,f=vl(m.pathname||"/",d);if(f==null)return null;let h=j0(c);Bp(h);let v=null;for(let g=0;v==null&&g<h.length;++g){let p=Jp(f);v=$p(h[g],p,r)}return v}function j0(c,o=[],d=[],r="",m=!1){let f=(h,v,g=m,p)=>{let N={relativePath:p===void 0?h.path||"":p,caseSensitive:h.caseSensitive===!0,childrenIndex:v,route:h};if(N.relativePath.startsWith("/")){if(!N.relativePath.startsWith(r)&&g)return;Ge(N.relativePath.startsWith(r),`Absolute route path "${N.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),N.relativePath=N.relativePath.slice(r.length)}let w=pl([r,N.relativePath]),D=d.concat(N);h.children&&h.children.length>0&&(Ge(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${w}".`),j0(h.children,o,D,w,g)),!(h.path==null&&!h.index)&&o.push({path:w,score:Xp(w,h.index),routesMeta:D})};return c.forEach((h,v)=>{var g;if(h.path===""||!((g=h.path)!=null&&g.includes("?")))f(h,v);else for(let p of N0(h.path))f(h,v,!0,p)}),o}function N0(c){let o=c.split("/");if(o.length===0)return[];let[d,...r]=o,m=d.endsWith("?"),f=d.replace(/\?$/,"");if(r.length===0)return m?[f,""]:[f];let h=N0(r.join("/")),v=[];return v.push(...h.map(g=>g===""?f:[f,g].join("/"))),m&&v.push(...h),v.map(g=>c.startsWith("/")&&g===""?"/":g)}function Bp(c){c.sort((o,d)=>o.score!==d.score?d.score-o.score:Zp(o.routesMeta.map(r=>r.childrenIndex),d.routesMeta.map(r=>r.childrenIndex)))}var Lp=/^:[\w-]+$/,qp=3,Yp=2,Gp=1,Qp=10,Vp=-2,Im=c=>c==="*";function Xp(c,o){let d=c.split("/"),r=d.length;return d.some(Im)&&(r+=Vp),o&&(r+=Yp),d.filter(m=>!Im(m)).reduce((m,f)=>m+(Lp.test(f)?qp:f===""?Gp:Qp),r)}function Zp(c,o){return c.length===o.length&&c.slice(0,-1).every((r,m)=>r===o[m])?c[c.length-1]-o[o.length-1]:0}function $p(c,o,d=!1){let{routesMeta:r}=c,m={},f="/",h=[];for(let v=0;v<r.length;++v){let g=r[v],p=v===r.length-1,N=f==="/"?o:o.slice(f.length)||"/",w=Ti({path:g.relativePath,caseSensitive:g.caseSensitive,end:p},N),D=g.route;if(!w&&p&&d&&!r[r.length-1].route.index&&(w=Ti({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},N)),!w)return null;Object.assign(m,w.params),h.push({params:m,pathname:pl([f,w.pathname]),pathnameBase:Ip(pl([f,w.pathnameBase])),route:D}),w.pathnameBase!=="/"&&(f=pl([f,w.pathnameBase]))}return h}function Ti(c,o){typeof c=="string"&&(c={path:c,caseSensitive:!1,end:!0});let[d,r]=Kp(c.path,c.caseSensitive,c.end),m=o.match(d);if(!m)return null;let f=m[0],h=f.replace(/(.)\/+$/,"$1"),v=m.slice(1);return{params:r.reduce((p,{paramName:N,isOptional:w},D)=>{if(N==="*"){let U=v[D]||"";h=f.slice(0,f.length-U.length).replace(/(.)\/+$/,"$1")}const z=v[D];return w&&!z?p[N]=void 0:p[N]=(z||"").replace(/%2F/g,"/"),p},{}),pathname:f,pathnameBase:h,pattern:c}}function Kp(c,o=!1,d=!0){qt(c==="*"||!c.endsWith("*")||c.endsWith("/*"),`Route path "${c}" will be treated as if it were "${c.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${c.replace(/\*$/,"/*")}".`);let r=[],m="^"+c.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,v,g)=>(r.push({paramName:v,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return c.endsWith("*")?(r.push({paramName:"*"}),m+=c==="*"||c==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?m+="\\/*$":c!==""&&c!=="/"&&(m+="(?:(?=\\/|$))"),[new RegExp(m,o?void 0:"i"),r]}function Jp(c){try{return c.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return qt(!1,`The URL path "${c}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${o}).`),c}}function vl(c,o){if(o==="/")return c;if(!c.toLowerCase().startsWith(o.toLowerCase()))return null;let d=o.endsWith("/")?o.length-1:o.length,r=c.charAt(d);return r&&r!=="/"?null:c.slice(d)||"/"}var Fp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Wp(c,o="/"){let{pathname:d,search:r="",hash:m=""}=typeof c=="string"?xa(c):c,f;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?f=e0(d.substring(1),"/"):f=e0(d,o)):f=o,{pathname:f,search:eg(r),hash:tg(m)}}function e0(c,o){let d=o.replace(/\/+$/,"").split("/");return c.split("/").forEach(m=>{m===".."?d.length>1&&d.pop():m!=="."&&d.push(m)}),d.length>1?d.join("/"):"/"}function iu(c,o,d,r){return`Cannot include a '${c}' character in a manually specified \`to.${o}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${d}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Pp(c){return c.filter((o,d)=>d===0||o.route.path&&o.route.path.length>0)}function yu(c){let o=Pp(c);return o.map((d,r)=>r===o.length-1?d.pathname:d.pathnameBase)}function ju(c,o,d,r=!1){let m;typeof c=="string"?m=xa(c):(m={...c},Ge(!m.pathname||!m.pathname.includes("?"),iu("?","pathname","search",m)),Ge(!m.pathname||!m.pathname.includes("#"),iu("#","pathname","hash",m)),Ge(!m.search||!m.search.includes("#"),iu("#","search","hash",m)));let f=c===""||m.pathname==="",h=f?"/":m.pathname,v;if(h==null)v=d;else{let w=o.length-1;if(!r&&h.startsWith("..")){let D=h.split("/");for(;D[0]==="..";)D.shift(),w-=1;m.pathname=D.join("/")}v=w>=0?o[w]:"/"}let g=Wp(m,v),p=h&&h!=="/"&&h.endsWith("/"),N=(f||h===".")&&d.endsWith("/");return!g.pathname.endsWith("/")&&(p||N)&&(g.pathname+="/"),g}var pl=c=>c.join("/").replace(/\/\/+/g,"/"),Ip=c=>c.replace(/\/+$/,"").replace(/^\/*/,"/"),eg=c=>!c||c==="?"?"":c.startsWith("?")?c:"?"+c,tg=c=>!c||c==="#"?"":c.startsWith("#")?c:"#"+c,lg=class{constructor(c,o,d,r=!1){this.status=c,this.statusText=o||"",this.internal=r,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function ag(c){return c!=null&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.internal=="boolean"&&"data"in c}function ng(c){return c.map(o=>o.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var S0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function w0(c,o){let d=c;if(typeof d!="string"||!Fp.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let r=d,m=!1;if(S0)try{let f=new URL(window.location.href),h=d.startsWith("//")?new URL(f.protocol+d):new URL(d),v=vl(h.pathname,o);h.origin===f.origin&&v!=null?d=v+h.search+h.hash:m=!0}catch{qt(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:m,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var C0=["POST","PUT","PATCH","DELETE"];new Set(C0);var sg=["GET",...C0];new Set(sg);var ln=y.createContext(null);ln.displayName="DataRouter";var Oi=y.createContext(null);Oi.displayName="DataRouterState";var ig=y.createContext(!1),E0=y.createContext({isTransitioning:!1});E0.displayName="ViewTransition";var cg=y.createContext(new Map);cg.displayName="Fetchers";var rg=y.createContext(null);rg.displayName="Await";var At=y.createContext(null);At.displayName="Navigation";var ls=y.createContext(null);ls.displayName="Location";var Jt=y.createContext({outlet:null,matches:[],isDataRoute:!1});Jt.displayName="Route";var Nu=y.createContext(null);Nu.displayName="RouteError";var A0="REACT_ROUTER_ERROR",ug="REDIRECT",og="ROUTE_ERROR_RESPONSE";function dg(c){if(c.startsWith(`${A0}:${ug}:{`))try{let o=JSON.parse(c.slice(28));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string"&&typeof o.location=="string"&&typeof o.reloadDocument=="boolean"&&typeof o.replace=="boolean")return o}catch{}}function fg(c){if(c.startsWith(`${A0}:${og}:{`))try{let o=JSON.parse(c.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new lg(o.status,o.statusText,o.data)}catch{}}function mg(c,{relative:o}={}){Ge(an(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:r}=y.useContext(At),{hash:m,pathname:f,search:h}=as(c,{relative:o}),v=f;return d!=="/"&&(v=f==="/"?d:pl([d,f])),r.createHref({pathname:v,search:h,hash:m})}function an(){return y.useContext(ls)!=null}function $l(){return Ge(an(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(ls).location}var T0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function R0(c){y.useContext(At).static||y.useLayoutEffect(c)}function Su(){let{isDataRoute:c}=y.useContext(Jt);return c?Eg():hg()}function hg(){Ge(an(),"useNavigate() may be used only in the context of a <Router> component.");let c=y.useContext(ln),{basename:o,navigator:d}=y.useContext(At),{matches:r}=y.useContext(Jt),{pathname:m}=$l(),f=JSON.stringify(yu(r)),h=y.useRef(!1);return R0(()=>{h.current=!0}),y.useCallback((g,p={})=>{if(qt(h.current,T0),!h.current)return;if(typeof g=="number"){d.go(g);return}let N=ju(g,JSON.parse(f),m,p.relative==="path");c==null&&o!=="/"&&(N.pathname=N.pathname==="/"?o:pl([o,N.pathname])),(p.replace?d.replace:d.push)(N,p.state,p)},[o,d,f,m,c])}y.createContext(null);function as(c,{relative:o}={}){let{matches:d}=y.useContext(Jt),{pathname:r}=$l(),m=JSON.stringify(yu(d));return y.useMemo(()=>ju(c,JSON.parse(m),r,o==="path"),[c,m,r,o])}function xg(c,o){return _0(c,o)}function _0(c,o,d,r,m){var q;Ge(an(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=y.useContext(At),{matches:h}=y.useContext(Jt),v=h[h.length-1],g=v?v.params:{},p=v?v.pathname:"/",N=v?v.pathnameBase:"/",w=v&&v.route;{let L=w&&w.path||"";z0(p,!w||L.endsWith("*")||L.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${L}">) 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.
59
-
60
- Please change the parent <Route path="${L}"> to <Route path="${L==="/"?"*":`${L}/*`}">.`)}let D=$l(),z;if(o){let L=typeof o=="string"?xa(o):o;Ge(N==="/"||((q=L.pathname)==null?void 0:q.startsWith(N)),`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 "${N}" but pathname "${L.pathname}" was given in the \`location\` prop.`),z=L}else z=D;let U=z.pathname||"/",A=U;if(N!=="/"){let L=N.replace(/^\//,"").split("/");A="/"+U.replace(/^\//,"").split("/").slice(L.length).join("/")}let R=y0(c,{pathname:A});qt(w||R!=null,`No routes matched location "${z.pathname}${z.search}${z.hash}" `),qt(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${z.pathname}${z.search}${z.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 Q=yg(R&&R.map(L=>Object.assign({},L,{params:Object.assign({},g,L.params),pathname:pl([N,f.encodeLocation?f.encodeLocation(L.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:L.pathname]),pathnameBase:L.pathnameBase==="/"?N:pl([N,f.encodeLocation?f.encodeLocation(L.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:L.pathnameBase])})),h,d,r,m);return o&&Q?y.createElement(ls.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...z},navigationType:"POP"}},Q):Q}function pg(){let c=Cg(),o=ag(c)?`${c.status} ${c.statusText}`:c instanceof Error?c.message:JSON.stringify(c),d=c instanceof Error?c.stack:null,r="rgba(200,200,200, 0.5)",m={padding:"0.5rem",backgroundColor:r},f={padding:"2px 4px",backgroundColor:r},h=null;return console.error("Error handled by React Router default ErrorBoundary:",c),h=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:f},"ErrorBoundary")," or"," ",y.createElement("code",{style:f},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},o),d?y.createElement("pre",{style:m},d):null,h)}var gg=y.createElement(pg,null),M0=class extends y.Component{constructor(c){super(c),this.state={location:c.location,revalidation:c.revalidation,error:c.error}}static getDerivedStateFromError(c){return{error:c}}static getDerivedStateFromProps(c,o){return o.location!==c.location||o.revalidation!=="idle"&&c.revalidation==="idle"?{error:c.error,location:c.location,revalidation:c.revalidation}:{error:c.error!==void 0?c.error:o.error,location:o.location,revalidation:c.revalidation||o.revalidation}}componentDidCatch(c,o){this.props.onError?this.props.onError(c,o):console.error("React Router caught the following error during render",c)}render(){let c=this.state.error;if(this.context&&typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){const d=fg(c.digest);d&&(c=d)}let o=c!==void 0?y.createElement(Jt.Provider,{value:this.props.routeContext},y.createElement(Nu.Provider,{value:c,children:this.props.component})):this.props.children;return this.context?y.createElement(vg,{error:c},o):o}};M0.contextType=ig;var cu=new WeakMap;function vg({children:c,error:o}){let{basename:d}=y.useContext(At);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let r=dg(o.digest);if(r){let m=cu.get(o);if(m)throw m;let f=w0(r.location,d);if(S0&&!cu.get(o))if(f.isExternal||r.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:r.replace}));throw cu.set(o,h),h}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return c}function bg({routeContext:c,match:o,children:d}){let r=y.useContext(ln);return r&&r.static&&r.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=o.route.id),y.createElement(Jt.Provider,{value:c},d)}function yg(c,o=[],d=null,r=null,m=null){if(c==null){if(!d)return null;if(d.errors)c=d.matches;else if(o.length===0&&!d.initialized&&d.matches.length>0)c=d.matches;else return null}let f=c,h=d==null?void 0:d.errors;if(h!=null){let N=f.findIndex(w=>w.route.id&&(h==null?void 0:h[w.route.id])!==void 0);Ge(N>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),f=f.slice(0,Math.min(f.length,N+1))}let v=!1,g=-1;if(d)for(let N=0;N<f.length;N++){let w=f[N];if((w.route.HydrateFallback||w.route.hydrateFallbackElement)&&(g=N),w.route.id){let{loaderData:D,errors:z}=d,U=w.route.loader&&!D.hasOwnProperty(w.route.id)&&(!z||z[w.route.id]===void 0);if(w.route.lazy||U){v=!0,g>=0?f=f.slice(0,g+1):f=[f[0]];break}}}let p=d&&r?(N,w)=>{var D,z;r(N,{location:d.location,params:((z=(D=d.matches)==null?void 0:D[0])==null?void 0:z.params)??{},unstable_pattern:ng(d.matches),errorInfo:w})}:void 0;return f.reduceRight((N,w,D)=>{let z,U=!1,A=null,R=null;d&&(z=h&&w.route.id?h[w.route.id]:void 0,A=w.route.errorElement||gg,v&&(g<0&&D===0?(z0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),U=!0,R=null):g===D&&(U=!0,R=w.route.hydrateFallbackElement||null)));let Q=o.concat(f.slice(0,D+1)),q=()=>{let L;return z?L=A:U?L=R:w.route.Component?L=y.createElement(w.route.Component,null):w.route.element?L=w.route.element:L=N,y.createElement(bg,{match:w,routeContext:{outlet:N,matches:Q,isDataRoute:d!=null},children:L})};return d&&(w.route.ErrorBoundary||w.route.errorElement||D===0)?y.createElement(M0,{location:d.location,revalidation:d.revalidation,component:A,error:z,children:q(),routeContext:{outlet:null,matches:Q,isDataRoute:!0},onError:p}):q()},null)}function wu(c){return`${c} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jg(c){let o=y.useContext(ln);return Ge(o,wu(c)),o}function Ng(c){let o=y.useContext(Oi);return Ge(o,wu(c)),o}function Sg(c){let o=y.useContext(Jt);return Ge(o,wu(c)),o}function Cu(c){let o=Sg(c),d=o.matches[o.matches.length-1];return Ge(d.route.id,`${c} can only be used on routes that contain a unique "id"`),d.route.id}function wg(){return Cu("useRouteId")}function Cg(){var r;let c=y.useContext(Nu),o=Ng("useRouteError"),d=Cu("useRouteError");return c!==void 0?c:(r=o.errors)==null?void 0:r[d]}function Eg(){let{router:c}=jg("useNavigate"),o=Cu("useNavigate"),d=y.useRef(!1);return R0(()=>{d.current=!0}),y.useCallback(async(m,f={})=>{qt(d.current,T0),d.current&&(typeof m=="number"?await c.navigate(m):await c.navigate(m,{fromRouteId:o,...f}))},[c,o])}var t0={};function z0(c,o,d){!o&&!t0[c]&&(t0[c]=!0,qt(!1,d))}y.memo(Ag);function Ag({routes:c,future:o,state:d,onError:r}){return _0(c,void 0,d,r,o)}function Tg({to:c,replace:o,state:d,relative:r}){Ge(an(),"<Navigate> may be used only in the context of a <Router> component.");let{static:m}=y.useContext(At);qt(!m,"<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:f}=y.useContext(Jt),{pathname:h}=$l(),v=Su(),g=ju(c,yu(f),h,r==="path"),p=JSON.stringify(g);return y.useEffect(()=>{v(JSON.parse(p),{replace:o,state:d,relative:r})},[v,p,r,o,d]),null}function Lt(c){Ge(!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 Rg({basename:c="/",children:o=null,location:d,navigationType:r="POP",navigator:m,static:f=!1,unstable_useTransitions:h}){Ge(!an(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=c.replace(/^\/*/,"/"),g=y.useMemo(()=>({basename:v,navigator:m,static:f,unstable_useTransitions:h,future:{}}),[v,m,f,h]);typeof d=="string"&&(d=xa(d));let{pathname:p="/",search:N="",hash:w="",state:D=null,key:z="default"}=d,U=y.useMemo(()=>{let A=vl(p,v);return A==null?null:{location:{pathname:A,search:N,hash:w,state:D,key:z},navigationType:r}},[v,p,N,w,D,z,r]);return qt(U!=null,`<Router basename="${v}"> is not able to match the URL "${p}${N}${w}" because it does not start with the basename, so the <Router> won't render anything.`),U==null?null:y.createElement(At.Provider,{value:g},y.createElement(ls.Provider,{children:o,value:U}))}function _g({children:c,location:o}){return xg(mu(c),o)}function mu(c,o=[]){let d=[];return y.Children.forEach(c,(r,m)=>{if(!y.isValidElement(r))return;let f=[...o,m];if(r.type===y.Fragment){d.push.apply(d,mu(r.props.children,f));return}Ge(r.type===Lt,`[${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>`),Ge(!r.props.index||!r.props.children,"An index route cannot have child routes.");let h={id:r.props.id||f.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&&(h.children=mu(r.props.children,f)),d.push(h)}),d}var Ei="get",Ai="application/x-www-form-urlencoded";function ki(c){return typeof HTMLElement<"u"&&c instanceof HTMLElement}function Mg(c){return ki(c)&&c.tagName.toLowerCase()==="button"}function zg(c){return ki(c)&&c.tagName.toLowerCase()==="form"}function Dg(c){return ki(c)&&c.tagName.toLowerCase()==="input"}function Og(c){return!!(c.metaKey||c.altKey||c.ctrlKey||c.shiftKey)}function kg(c,o){return c.button===0&&(!o||o==="_self")&&!Og(c)}var wi=null;function Ug(){if(wi===null)try{new FormData(document.createElement("form"),0),wi=!1}catch{wi=!0}return wi}var Hg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ru(c){return c!=null&&!Hg.has(c)?(qt(!1,`"${c}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ai}"`),null):c}function Bg(c,o){let d,r,m,f,h;if(zg(c)){let v=c.getAttribute("action");r=v?vl(v,o):null,d=c.getAttribute("method")||Ei,m=ru(c.getAttribute("enctype"))||Ai,f=new FormData(c)}else if(Mg(c)||Dg(c)&&(c.type==="submit"||c.type==="image")){let v=c.form;if(v==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=c.getAttribute("formaction")||v.getAttribute("action");if(r=g?vl(g,o):null,d=c.getAttribute("formmethod")||v.getAttribute("method")||Ei,m=ru(c.getAttribute("formenctype"))||ru(v.getAttribute("enctype"))||Ai,f=new FormData(v,c),!Ug()){let{name:p,type:N,value:w}=c;if(N==="image"){let D=p?`${p}.`:"";f.append(`${D}x`,"0"),f.append(`${D}y`,"0")}else p&&f.append(p,w)}}else{if(ki(c))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Ei,r=null,m=Ai,h=c}return f&&m==="text/plain"&&(h=f,f=void 0),{action:r,method:d.toLowerCase(),encType:m,formData:f,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Eu(c,o){if(c===!1||c===null||typeof c>"u")throw new Error(o)}function Lg(c,o,d,r){let m=typeof c=="string"?new URL(c,typeof window>"u"?"server://singlefetch/":window.location.origin):c;return d?m.pathname.endsWith("/")?m.pathname=`${m.pathname}_.${r}`:m.pathname=`${m.pathname}.${r}`:m.pathname==="/"?m.pathname=`_root.${r}`:o&&vl(m.pathname,o)==="/"?m.pathname=`${o.replace(/\/$/,"")}/_root.${r}`:m.pathname=`${m.pathname.replace(/\/$/,"")}.${r}`,m}async function qg(c,o){if(c.id in o)return o[c.id];try{let d=await import(c.module);return o[c.id]=d,d}catch(d){return console.error(`Error loading route module \`${c.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Yg(c){return c==null?!1:c.href==null?c.rel==="preload"&&typeof c.imageSrcSet=="string"&&typeof c.imageSizes=="string":typeof c.rel=="string"&&typeof c.href=="string"}async function Gg(c,o,d){let r=await Promise.all(c.map(async m=>{let f=o.routes[m.route.id];if(f){let h=await qg(f,d);return h.links?h.links():[]}return[]}));return Zg(r.flat(1).filter(Yg).filter(m=>m.rel==="stylesheet"||m.rel==="preload").map(m=>m.rel==="stylesheet"?{...m,rel:"prefetch",as:"style"}:{...m,rel:"prefetch"}))}function l0(c,o,d,r,m,f){let h=(g,p)=>d[p]?g.route.id!==d[p].route.id:!0,v=(g,p)=>{var N;return d[p].pathname!==g.pathname||((N=d[p].route.path)==null?void 0:N.endsWith("*"))&&d[p].params["*"]!==g.params["*"]};return f==="assets"?o.filter((g,p)=>h(g,p)||v(g,p)):f==="data"?o.filter((g,p)=>{var w;let N=r.routes[g.route.id];if(!N||!N.hasLoader)return!1;if(h(g,p)||v(g,p))return!0;if(g.route.shouldRevalidate){let D=g.route.shouldRevalidate({currentUrl:new URL(m.pathname+m.search+m.hash,window.origin),currentParams:((w=d[0])==null?void 0:w.params)||{},nextUrl:new URL(c,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof D=="boolean")return D}return!0}):[]}function Qg(c,o,{includeHydrateFallback:d}={}){return Vg(c.map(r=>{let m=o.routes[r.route.id];if(!m)return[];let f=[m.module];return m.clientActionModule&&(f=f.concat(m.clientActionModule)),m.clientLoaderModule&&(f=f.concat(m.clientLoaderModule)),d&&m.hydrateFallbackModule&&(f=f.concat(m.hydrateFallbackModule)),m.imports&&(f=f.concat(m.imports)),f}).flat(1))}function Vg(c){return[...new Set(c)]}function Xg(c){let o={},d=Object.keys(c).sort();for(let r of d)o[r]=c[r];return o}function Zg(c,o){let d=new Set;return new Set(o),c.reduce((r,m)=>{let f=JSON.stringify(Xg(m));return d.has(f)||(d.add(f),r.push({key:f,link:m})),r},[])}function D0(){let c=y.useContext(ln);return Eu(c,"You must render this element inside a <DataRouterContext.Provider> element"),c}function $g(){let c=y.useContext(Oi);return Eu(c,"You must render this element inside a <DataRouterStateContext.Provider> element"),c}var Au=y.createContext(void 0);Au.displayName="FrameworkContext";function O0(){let c=y.useContext(Au);return Eu(c,"You must render this element inside a <HydratedRouter> element"),c}function Kg(c,o){let d=y.useContext(Au),[r,m]=y.useState(!1),[f,h]=y.useState(!1),{onFocus:v,onBlur:g,onMouseEnter:p,onMouseLeave:N,onTouchStart:w}=o,D=y.useRef(null);y.useEffect(()=>{if(c==="render"&&h(!0),c==="viewport"){let A=Q=>{Q.forEach(q=>{h(q.isIntersecting)})},R=new IntersectionObserver(A,{threshold:.5});return D.current&&R.observe(D.current),()=>{R.disconnect()}}},[c]),y.useEffect(()=>{if(r){let A=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(A)}}},[r]);let z=()=>{m(!0)},U=()=>{m(!1),h(!1)};return d?c!=="intent"?[f,D,{}]:[f,D,{onFocus:In(v,z),onBlur:In(g,U),onMouseEnter:In(p,z),onMouseLeave:In(N,U),onTouchStart:In(w,z)}]:[!1,D,{}]}function In(c,o){return d=>{c&&c(d),d.defaultPrevented||o(d)}}function Jg({page:c,...o}){let{router:d}=D0(),r=y.useMemo(()=>y0(d.routes,c,d.basename),[d.routes,c,d.basename]);return r?y.createElement(Wg,{page:c,matches:r,...o}):null}function Fg(c){let{manifest:o,routeModules:d}=O0(),[r,m]=y.useState([]);return y.useEffect(()=>{let f=!1;return Gg(c,o,d).then(h=>{f||m(h)}),()=>{f=!0}},[c,o,d]),r}function Wg({page:c,matches:o,...d}){let r=$l(),{future:m,manifest:f,routeModules:h}=O0(),{basename:v}=D0(),{loaderData:g,matches:p}=$g(),N=y.useMemo(()=>l0(c,o,p,f,r,"data"),[c,o,p,f,r]),w=y.useMemo(()=>l0(c,o,p,f,r,"assets"),[c,o,p,f,r]),D=y.useMemo(()=>{if(c===r.pathname+r.search+r.hash)return[];let A=new Set,R=!1;if(o.forEach(q=>{var J;let L=f.routes[q.route.id];!L||!L.hasLoader||(!N.some(B=>B.route.id===q.route.id)&&q.route.id in g&&((J=h[q.route.id])!=null&&J.shouldRevalidate)||L.hasClientLoader?R=!0:A.add(q.route.id))}),A.size===0)return[];let Q=Lg(c,v,m.unstable_trailingSlashAwareDataRequests,"data");return R&&A.size>0&&Q.searchParams.set("_routes",o.filter(q=>A.has(q.route.id)).map(q=>q.route.id).join(",")),[Q.pathname+Q.search]},[v,m.unstable_trailingSlashAwareDataRequests,g,r,f,N,o,c,h]),z=y.useMemo(()=>Qg(w,f),[w,f]),U=Fg(w);return y.createElement(y.Fragment,null,D.map(A=>y.createElement("link",{key:A,rel:"prefetch",as:"fetch",href:A,...d})),z.map(A=>y.createElement("link",{key:A,rel:"modulepreload",href:A,...d})),U.map(({key:A,link:R})=>y.createElement("link",{key:A,nonce:d.nonce,...R,crossOrigin:R.crossOrigin??d.crossOrigin})))}function Pg(...c){return o=>{c.forEach(d=>{typeof d=="function"?d(o):d!=null&&(d.current=o)})}}var Ig=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ig&&(window.__reactRouterVersion="7.13.0")}catch{}function ev({basename:c,children:o,unstable_useTransitions:d,window:r}){let m=y.useRef();m.current==null&&(m.current=Dp({window:r,v5Compat:!0}));let f=m.current,[h,v]=y.useState({action:f.action,location:f.location}),g=y.useCallback(p=>{d===!1?v(p):y.startTransition(()=>v(p))},[d]);return y.useLayoutEffect(()=>f.listen(g),[f,g]),y.createElement(Rg,{basename:c,children:o,location:h.location,navigationType:h.action,navigator:f,unstable_useTransitions:d})}var k0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,U0=y.forwardRef(function({onClick:o,discover:d="render",prefetch:r="none",relative:m,reloadDocument:f,replace:h,state:v,target:g,to:p,preventScrollReset:N,viewTransition:w,unstable_defaultShouldRevalidate:D,...z},U){let{basename:A,unstable_useTransitions:R}=y.useContext(At),Q=typeof p=="string"&&k0.test(p),q=w0(p,A);p=q.to;let L=mg(p,{relative:m}),[J,B,C]=Kg(r,z),V=av(p,{replace:h,state:v,target:g,preventScrollReset:N,relative:m,viewTransition:w,unstable_defaultShouldRevalidate:D,unstable_useTransitions:R});function Z(ue){o&&o(ue),ue.defaultPrevented||V(ue)}let P=y.createElement("a",{...z,...C,href:q.absoluteURL||L,onClick:q.isExternal||f?o:Z,ref:Pg(U,B),target:g,"data-discover":!Q&&d==="render"?"true":void 0});return J&&!Q?y.createElement(y.Fragment,null,P,y.createElement(Jg,{page:L})):P});U0.displayName="Link";var H0=y.forwardRef(function({"aria-current":o="page",caseSensitive:d=!1,className:r="",end:m=!1,style:f,to:h,viewTransition:v,children:g,...p},N){let w=as(h,{relative:p.relative}),D=$l(),z=y.useContext(Oi),{navigator:U,basename:A}=y.useContext(At),R=z!=null&&rv(w)&&v===!0,Q=U.encodeLocation?U.encodeLocation(w).pathname:w.pathname,q=D.pathname,L=z&&z.navigation&&z.navigation.location?z.navigation.location.pathname:null;d||(q=q.toLowerCase(),L=L?L.toLowerCase():null,Q=Q.toLowerCase()),L&&A&&(L=vl(L,A)||L);const J=Q!=="/"&&Q.endsWith("/")?Q.length-1:Q.length;let B=q===Q||!m&&q.startsWith(Q)&&q.charAt(J)==="/",C=L!=null&&(L===Q||!m&&L.startsWith(Q)&&L.charAt(Q.length)==="/"),V={isActive:B,isPending:C,isTransitioning:R},Z=B?o:void 0,P;typeof r=="function"?P=r(V):P=[r,B?"active":null,C?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let ue=typeof f=="function"?f(V):f;return y.createElement(U0,{...p,"aria-current":Z,className:P,ref:N,style:ue,to:h,viewTransition:v},typeof g=="function"?g(V):g)});H0.displayName="NavLink";var tv=y.forwardRef(({discover:c="render",fetcherKey:o,navigate:d,reloadDocument:r,replace:m,state:f,method:h=Ei,action:v,onSubmit:g,relative:p,preventScrollReset:N,viewTransition:w,unstable_defaultShouldRevalidate:D,...z},U)=>{let{unstable_useTransitions:A}=y.useContext(At),R=iv(),Q=cv(v,{relative:p}),q=h.toLowerCase()==="get"?"get":"post",L=typeof v=="string"&&k0.test(v),J=B=>{if(g&&g(B),B.defaultPrevented)return;B.preventDefault();let C=B.nativeEvent.submitter,V=(C==null?void 0:C.getAttribute("formmethod"))||h,Z=()=>R(C||B.currentTarget,{fetcherKey:o,method:V,navigate:d,replace:m,state:f,relative:p,preventScrollReset:N,viewTransition:w,unstable_defaultShouldRevalidate:D});A&&d!==!1?y.startTransition(()=>Z()):Z()};return y.createElement("form",{ref:U,method:q,action:Q,onSubmit:r?g:J,...z,"data-discover":!L&&c==="render"?"true":void 0})});tv.displayName="Form";function lv(c){return`${c} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function B0(c){let o=y.useContext(ln);return Ge(o,lv(c)),o}function av(c,{target:o,replace:d,state:r,preventScrollReset:m,relative:f,viewTransition:h,unstable_defaultShouldRevalidate:v,unstable_useTransitions:g}={}){let p=Su(),N=$l(),w=as(c,{relative:f});return y.useCallback(D=>{if(kg(D,o)){D.preventDefault();let z=d!==void 0?d:ts(N)===ts(w),U=()=>p(c,{replace:z,state:r,preventScrollReset:m,relative:f,viewTransition:h,unstable_defaultShouldRevalidate:v});g?y.startTransition(()=>U()):U()}},[N,p,w,d,r,o,c,m,f,h,v,g])}var nv=0,sv=()=>`__${String(++nv)}__`;function iv(){let{router:c}=B0("useSubmit"),{basename:o}=y.useContext(At),d=wg(),r=c.fetch,m=c.navigate;return y.useCallback(async(f,h={})=>{let{action:v,method:g,encType:p,formData:N,body:w}=Bg(f,o);if(h.navigate===!1){let D=h.fetcherKey||sv();await r(D,d,h.action||v,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:N,body:w,formMethod:h.method||g,formEncType:h.encType||p,flushSync:h.flushSync})}else await m(h.action||v,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:N,body:w,formMethod:h.method||g,formEncType:h.encType||p,replace:h.replace,state:h.state,fromRouteId:d,flushSync:h.flushSync,viewTransition:h.viewTransition})},[r,m,o,d])}function cv(c,{relative:o}={}){let{basename:d}=y.useContext(At),r=y.useContext(Jt);Ge(r,"useFormAction must be used inside a RouteContext");let[m]=r.matches.slice(-1),f={...as(c||".",{relative:o})},h=$l();if(c==null){f.search=h.search;let v=new URLSearchParams(f.search),g=v.getAll("index");if(g.some(N=>N==="")){v.delete("index"),g.filter(w=>w).forEach(w=>v.append("index",w));let N=v.toString();f.search=N?`?${N}`:""}}return(!c||c===".")&&m.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(f.pathname=f.pathname==="/"?d:pl([d,f.pathname])),ts(f)}function rv(c,{relative:o}={}){let d=y.useContext(E0);Ge(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=B0("useViewTransitionState"),m=as(c,{relative:o});if(!d.isTransitioning)return!1;let f=vl(d.currentLocation.pathname,r)||d.currentLocation.pathname,h=vl(d.nextLocation.pathname,r)||d.nextLocation.pathname;return Ti(m.pathname,h)!=null||Ti(m.pathname,f)!=null}var uv=b0();const ov=vu(uv);/**
61
- * @license lucide-react v0.564.0 - ISC
62
- *
63
- * This source code is licensed under the ISC license.
64
- * See the LICENSE file in the root directory of this source tree.
65
- */const L0=(...c)=>c.filter((o,d,r)=>!!o&&o.trim()!==""&&r.indexOf(o)===d).join(" ").trim();/**
66
- * @license lucide-react v0.564.0 - ISC
67
- *
68
- * This source code is licensed under the ISC license.
69
- * See the LICENSE file in the root directory of this source tree.
70
- */const dv=c=>c.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
71
- * @license lucide-react v0.564.0 - ISC
72
- *
73
- * This source code is licensed under the ISC license.
74
- * See the LICENSE file in the root directory of this source tree.
75
- */const fv=c=>c.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,d,r)=>r?r.toUpperCase():d.toLowerCase());/**
76
- * @license lucide-react v0.564.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */const a0=c=>{const o=fv(c);return o.charAt(0).toUpperCase()+o.slice(1)};/**
81
- * @license lucide-react v0.564.0 - ISC
82
- *
83
- * This source code is licensed under the ISC license.
84
- * See the LICENSE file in the root directory of this source tree.
85
- */var mv={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
86
- * @license lucide-react v0.564.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const hv=c=>{for(const o in c)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1};/**
91
- * @license lucide-react v0.564.0 - ISC
92
- *
93
- * This source code is licensed under the ISC license.
94
- * See the LICENSE file in the root directory of this source tree.
95
- */const xv=y.forwardRef(({color:c="currentColor",size:o=24,strokeWidth:d=2,absoluteStrokeWidth:r,className:m="",children:f,iconNode:h,...v},g)=>y.createElement("svg",{ref:g,...mv,width:o,height:o,stroke:c,strokeWidth:r?Number(d)*24/Number(o):d,className:L0("lucide",m),...!f&&!hv(v)&&{"aria-hidden":"true"},...v},[...h.map(([p,N])=>y.createElement(p,N)),...Array.isArray(f)?f:[f]]));/**
96
- * @license lucide-react v0.564.0 - ISC
97
- *
98
- * This source code is licensed under the ISC license.
99
- * See the LICENSE file in the root directory of this source tree.
100
- */const le=(c,o)=>{const d=y.forwardRef(({className:r,...m},f)=>y.createElement(xv,{ref:f,iconNode:o,className:L0(`lucide-${dv(a0(c))}`,`lucide-${c}`,r),...m}));return d.displayName=a0(c),d};/**
101
- * @license lucide-react v0.564.0 - ISC
102
- *
103
- * This source code is licensed under the ISC license.
104
- * See the LICENSE file in the root directory of this source tree.
105
- */const pv=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],q0=le("activity",pv);/**
106
- * @license lucide-react v0.564.0 - ISC
107
- *
108
- * This source code is licensed under the ISC license.
109
- * See the LICENSE file in the root directory of this source tree.
110
- */const gv=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],vv=le("arrow-down",gv);/**
111
- * @license lucide-react v0.564.0 - ISC
112
- *
113
- * This source code is licensed under the ISC license.
114
- * See the LICENSE file in the root directory of this source tree.
115
- */const bv=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],n0=le("arrow-right",bv);/**
116
- * @license lucide-react v0.564.0 - ISC
117
- *
118
- * This source code is licensed under the ISC license.
119
- * See the LICENSE file in the root directory of this source tree.
120
- */const yv=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],jv=le("arrow-up-down",yv);/**
121
- * @license lucide-react v0.564.0 - ISC
122
- *
123
- * This source code is licensed under the ISC license.
124
- * See the LICENSE file in the root directory of this source tree.
125
- */const Nv=[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]],Sv=le("arrow-up-narrow-wide",Nv);/**
126
- * @license lucide-react v0.564.0 - ISC
127
- *
128
- * This source code is licensed under the ISC license.
129
- * See the LICENSE file in the root directory of this source tree.
130
- */const wv=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Cv=le("arrow-up",wv);/**
131
- * @license lucide-react v0.564.0 - ISC
132
- *
133
- * This source code is licensed under the ISC license.
134
- * See the LICENSE file in the root directory of this source tree.
135
- */const Ev=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Av=le("bell",Ev);/**
136
- * @license lucide-react v0.564.0 - ISC
137
- *
138
- * This source code is licensed under the ISC license.
139
- * See the LICENSE file in the root directory of this source tree.
140
- */const Tv=[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]],Rv=le("blocks",Tv);/**
141
- * @license lucide-react v0.564.0 - ISC
142
- *
143
- * This source code is licensed under the ISC license.
144
- * See the LICENSE file in the root directory of this source tree.
145
- */const _v=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Mv=le("bot",_v);/**
146
- * @license lucide-react v0.564.0 - ISC
147
- *
148
- * This source code is licensed under the ISC license.
149
- * See the LICENSE file in the root directory of this source tree.
150
- */const zv=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],s0=le("briefcase",zv);/**
151
- * @license lucide-react v0.564.0 - ISC
152
- *
153
- * This source code is licensed under the ISC license.
154
- * See the LICENSE file in the root directory of this source tree.
155
- */const Dv=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Ri=le("calendar",Dv);/**
156
- * @license lucide-react v0.564.0 - ISC
157
- *
158
- * This source code is licensed under the ISC license.
159
- * See the LICENSE file in the root directory of this source tree.
160
- */const Ov=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],tn=le("check",Ov);/**
161
- * @license lucide-react v0.564.0 - ISC
162
- *
163
- * This source code is licensed under the ISC license.
164
- * See the LICENSE file in the root directory of this source tree.
165
- */const kv=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Y0=le("chevron-down",kv);/**
166
- * @license lucide-react v0.564.0 - ISC
167
- *
168
- * This source code is licensed under the ISC license.
169
- * See the LICENSE file in the root directory of this source tree.
170
- */const Uv=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Hv=le("chevron-left",Uv);/**
171
- * @license lucide-react v0.564.0 - ISC
172
- *
173
- * This source code is licensed under the ISC license.
174
- * See the LICENSE file in the root directory of this source tree.
175
- */const Bv=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],_i=le("chevron-right",Bv);/**
176
- * @license lucide-react v0.564.0 - ISC
177
- *
178
- * This source code is licensed under the ISC license.
179
- * See the LICENSE file in the root directory of this source tree.
180
- */const Lv=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],qv=le("chevrons-up-down",Lv);/**
181
- * @license lucide-react v0.564.0 - ISC
182
- *
183
- * This source code is licensed under the ISC license.
184
- * See the LICENSE file in the root directory of this source tree.
185
- */const Yv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Kt=le("circle-alert",Yv);/**
186
- * @license lucide-react v0.564.0 - ISC
187
- *
188
- * This source code is licensed under the ISC license.
189
- * See the LICENSE file in the root directory of this source tree.
190
- */const Gv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]],i0=le("circle-arrow-down",Gv);/**
191
- * @license lucide-react v0.564.0 - ISC
192
- *
193
- * This source code is licensed under the ISC license.
194
- * See the LICENSE file in the root directory of this source tree.
195
- */const Qv=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ns=le("circle-check-big",Qv);/**
196
- * @license lucide-react v0.564.0 - ISC
197
- *
198
- * This source code is licensed under the ISC license.
199
- * See the LICENSE file in the root directory of this source tree.
200
- */const Vv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Xv=le("circle-question-mark",Vv);/**
201
- * @license lucide-react v0.564.0 - ISC
202
- *
203
- * This source code is licensed under the ISC license.
204
- * See the LICENSE file in the root directory of this source tree.
205
- */const Zv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],hu=le("circle-x",Zv);/**
206
- * @license lucide-react v0.564.0 - ISC
207
- *
208
- * This source code is licensed under the ISC license.
209
- * See the LICENSE file in the root directory of this source tree.
210
- */const $v=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Mi=le("clock",$v);/**
211
- * @license lucide-react v0.564.0 - ISC
212
- *
213
- * This source code is licensed under the ISC license.
214
- * See the LICENSE file in the root directory of this source tree.
215
- */const Kv=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Jv=le("code",Kv);/**
216
- * @license lucide-react v0.564.0 - ISC
217
- *
218
- * This source code is licensed under the ISC license.
219
- * See the LICENSE file in the root directory of this source tree.
220
- */const Fv=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],Wv=le("ellipsis-vertical",Fv);/**
221
- * @license lucide-react v0.564.0 - ISC
222
- *
223
- * This source code is licensed under the ISC license.
224
- * See the LICENSE file in the root directory of this source tree.
225
- */const Pv=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Tu=le("external-link",Pv);/**
226
- * @license lucide-react v0.564.0 - ISC
227
- *
228
- * This source code is licensed under the ISC license.
229
- * See the LICENSE file in the root directory of this source tree.
230
- */const Iv=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],xu=le("eye-off",Iv);/**
231
- * @license lucide-react v0.564.0 - ISC
232
- *
233
- * This source code is licensed under the ISC license.
234
- * See the LICENSE file in the root directory of this source tree.
235
- */const eb=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],zi=le("eye",eb);/**
236
- * @license lucide-react v0.564.0 - ISC
237
- *
238
- * This source code is licensed under the ISC license.
239
- * See the LICENSE file in the root directory of this source tree.
240
- */const tb=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],lb=le("file-text",tb);/**
241
- * @license lucide-react v0.564.0 - ISC
242
- *
243
- * This source code is licensed under the ISC license.
244
- * See the LICENSE file in the root directory of this source tree.
245
- */const ab=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],nb=le("git-pull-request",ab);/**
246
- * @license lucide-react v0.564.0 - ISC
247
- *
248
- * This source code is licensed under the ISC license.
249
- * See the LICENSE file in the root directory of this source tree.
250
- */const sb=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],xl=le("hash",sb);/**
251
- * @license lucide-react v0.564.0 - ISC
252
- *
253
- * This source code is licensed under the ISC license.
254
- * See the LICENSE file in the root directory of this source tree.
255
- */const ib=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],cb=le("house",ib);/**
256
- * @license lucide-react v0.564.0 - ISC
257
- *
258
- * This source code is licensed under the ISC license.
259
- * See the LICENSE file in the root directory of this source tree.
260
- */const rb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ub=le("info",rb);/**
261
- * @license lucide-react v0.564.0 - ISC
262
- *
263
- * This source code is licensed under the ISC license.
264
- * See the LICENSE file in the root directory of this source tree.
265
- */const ob=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],db=le("kanban",ob);/**
266
- * @license lucide-react v0.564.0 - ISC
267
- *
268
- * This source code is licensed under the ISC license.
269
- * See the LICENSE file in the root directory of this source tree.
270
- */const fb=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],mb=le("layout-grid",fb);/**
271
- * @license lucide-react v0.564.0 - ISC
272
- *
273
- * This source code is licensed under the ISC license.
274
- * See the LICENSE file in the root directory of this source tree.
275
- */const hb=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]],c0=le("layout-list",hb);/**
276
- * @license lucide-react v0.564.0 - ISC
277
- *
278
- * This source code is licensed under the ISC license.
279
- * See the LICENSE file in the root directory of this source tree.
280
- */const xb=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],G0=le("loader-circle",xb);/**
281
- * @license lucide-react v0.564.0 - ISC
282
- *
283
- * This source code is licensed under the ISC license.
284
- * See the LICENSE file in the root directory of this source tree.
285
- */const pb=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],Q0=le("map",pb);/**
286
- * @license lucide-react v0.564.0 - ISC
287
- *
288
- * This source code is licensed under the ISC license.
289
- * See the LICENSE file in the root directory of this source tree.
290
- */const gb=[["path",{d:"M5 12h14",key:"1ays0h"}]],vb=le("minus",gb);/**
291
- * @license lucide-react v0.564.0 - ISC
292
- *
293
- * This source code is licensed under the ISC license.
294
- * See the LICENSE file in the root directory of this source tree.
295
- */const bb=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],V0=le("pause",bb);/**
296
- * @license lucide-react v0.564.0 - ISC
297
- *
298
- * This source code is licensed under the ISC license.
299
- * See the LICENSE file in the root directory of this source tree.
300
- */const yb=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Ru=le("pen",yb);/**
301
- * @license lucide-react v0.564.0 - ISC
302
- *
303
- * This source code is licensed under the ISC license.
304
- * See the LICENSE file in the root directory of this source tree.
305
- */const jb=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],ss=le("play",jb);/**
306
- * @license lucide-react v0.564.0 - ISC
307
- *
308
- * This source code is licensed under the ISC license.
309
- * See the LICENSE file in the root directory of this source tree.
310
- */const Nb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],gl=le("plus",Nb);/**
311
- * @license lucide-react v0.564.0 - ISC
312
- *
313
- * This source code is licensed under the ISC license.
314
- * See the LICENSE file in the root directory of this source tree.
315
- */const Sb=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Di=le("rotate-ccw",Sb);/**
316
- * @license lucide-react v0.564.0 - ISC
317
- *
318
- * This source code is licensed under the ISC license.
319
- * See the LICENSE file in the root directory of this source tree.
320
- */const wb=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Cb=le("save",wb);/**
321
- * @license lucide-react v0.564.0 - ISC
322
- *
323
- * This source code is licensed under the ISC license.
324
- * See the LICENSE file in the root directory of this source tree.
325
- */const Eb=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],_u=le("search",Eb);/**
326
- * @license lucide-react v0.564.0 - ISC
327
- *
328
- * This source code is licensed under the ISC license.
329
- * See the LICENSE file in the root directory of this source tree.
330
- */const Ab=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],X0=le("settings",Ab);/**
331
- * @license lucide-react v0.564.0 - ISC
332
- *
333
- * This source code is licensed under the ISC license.
334
- * See the LICENSE file in the root directory of this source tree.
335
- */const Tb=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Z0=le("shield",Tb);/**
336
- * @license lucide-react v0.564.0 - ISC
337
- *
338
- * This source code is licensed under the ISC license.
339
- * See the LICENSE file in the root directory of this source tree.
340
- */const Rb=[["rect",{width:"3",height:"8",x:"13",y:"2",rx:"1.5",key:"diqz80"}],["path",{d:"M19 8.5V10h1.5A1.5 1.5 0 1 0 19 8.5",key:"183iwg"}],["rect",{width:"3",height:"8",x:"8",y:"14",rx:"1.5",key:"hqg7r1"}],["path",{d:"M5 15.5V14H3.5A1.5 1.5 0 1 0 5 15.5",key:"76g71w"}],["rect",{width:"8",height:"3",x:"14",y:"13",rx:"1.5",key:"1kmz0a"}],["path",{d:"M15.5 19H14v1.5a1.5 1.5 0 1 0 1.5-1.5",key:"jc4sz0"}],["rect",{width:"8",height:"3",x:"2",y:"8",rx:"1.5",key:"1omvl4"}],["path",{d:"M8.5 5H10V3.5A1.5 1.5 0 1 0 8.5 5",key:"16f3cl"}]],r0=le("slack",Rb);/**
341
- * @license lucide-react v0.564.0 - ISC
342
- *
343
- * This source code is licensed under the ISC license.
344
- * See the LICENSE file in the root directory of this source tree.
345
- */const _b=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Mb=le("square-pen",_b);/**
346
- * @license lucide-react v0.564.0 - ISC
347
- *
348
- * This source code is licensed under the ISC license.
349
- * See the LICENSE file in the root directory of this source tree.
350
- */const zb=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Db=le("terminal",zb);/**
351
- * @license lucide-react v0.564.0 - ISC
352
- *
353
- * This source code is licensed under the ISC license.
354
- * See the LICENSE file in the root directory of this source tree.
355
- */const Ob=[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]],kb=le("test-tube-diagonal",Ob);/**
356
- * @license lucide-react v0.564.0 - ISC
357
- *
358
- * This source code is licensed under the ISC license.
359
- * See the LICENSE file in the root directory of this source tree.
360
- */const Ub=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]],Hb=le("test-tube",Ub);/**
361
- * @license lucide-react v0.564.0 - ISC
362
- *
363
- * This source code is licensed under the ISC license.
364
- * See the LICENSE file in the root directory of this source tree.
365
- */const Bb=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Mu=le("trash-2",Bb);/**
366
- * @license lucide-react v0.564.0 - ISC
367
- *
368
- * This source code is licensed under the ISC license.
369
- * See the LICENSE file in the root directory of this source tree.
370
- */const Lb=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],qb=le("triangle-alert",Lb);/**
371
- * @license lucide-react v0.564.0 - ISC
372
- *
373
- * This source code is licensed under the ISC license.
374
- * See the LICENSE file in the root directory of this source tree.
375
- */const Yb=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],pu=le("users",Yb);/**
376
- * @license lucide-react v0.564.0 - ISC
377
- *
378
- * This source code is licensed under the ISC license.
379
- * See the LICENSE file in the root directory of this source tree.
380
- */const Gb=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],Qb=le("wifi",Gb);/**
381
- * @license lucide-react v0.564.0 - ISC
382
- *
383
- * This source code is licensed under the ISC license.
384
- * See the LICENSE file in the root directory of this source tree.
385
- */const Vb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ft=le("x",Vb);/**
386
- * @license lucide-react v0.564.0 - ISC
387
- *
388
- * This source code is licensed under the ISC license.
389
- * See the LICENSE file in the root directory of this source tree.
390
- */const Xb=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Zb=le("zap",Xb),u0=c=>{let o;const d=new Set,r=(p,N)=>{const w=typeof p=="function"?p(o):p;if(!Object.is(w,o)){const D=o;o=N??(typeof w!="object"||w===null)?w:Object.assign({},o,w),d.forEach(z=>z(o,D))}},m=()=>o,v={setState:r,getState:m,getInitialState:()=>g,subscribe:p=>(d.add(p),()=>d.delete(p))},g=o=c(r,m,v);return v},$b=c=>c?u0(c):u0,Kb=c=>c;function Jb(c,o=Kb){const d=Qe.useSyncExternalStore(c.subscribe,()=>o(c.getState()),()=>o(c.getInitialState()));return Qe.useDebugValue(d),d}const o0=c=>{const o=$b(c),d=r=>Jb(o,r);return Object.assign(d,o),d},Fb=c=>c?o0(c):o0,Wb="";let $0=!1,gu=null;function Pb(c){$0=c}function Ib(c){gu=c}function ey(c){return encodeURIComponent(c.replace(/\//g,"~"))}function Te(c){return $0&&gu?c.replace("/api/",`/api/projects/${ey(gu)}/`):c}function ty(){return Re("/api/projects")}async function Re(c,o){const d=`${Wb}${c}`,r=await fetch(d,{headers:{"Content-Type":"application/json",...o==null?void 0:o.headers},...o});if(!r.ok){const m=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(m.error||`HTTP ${r.status}: ${r.statusText}`)}if(r.status!==204)return r.json()}function K0(){return Re(Te("/api/status"))}function ly(){return Re(Te("/api/prds"))}function ay(){return Re(Te("/api/prs"))}function ny(c,o){const d=`?lines=${encodeURIComponent(o)}`;return Re(Te(`/api/logs/${encodeURIComponent(c)}${d}`))}function zu(){return Re(Te("/api/config"))}function Du(c){return Re(Te("/api/config"),{method:"PUT",body:JSON.stringify(c)})}function sy(){return Re(Te("/api/doctor"))}function J0(){return Re(Te("/api/schedule-info"))}function iy(c){return Re(Te("/api/actions/run"),{method:"POST",headers:c?{"Content-Type":"application/json"}:void 0,body:c?JSON.stringify({prdName:c}):void 0})}function cy(){return Re(Te("/api/actions/review"),{method:"POST"})}function d0(){return Re(Te("/api/actions/install-cron"),{method:"POST"})}function ry(){return Re(Te("/api/actions/uninstall-cron"),{method:"POST"})}function uy(c="all"){return Re(Te("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:c})})}function oy(c){return Re(Te("/api/actions/retry"),{method:"POST",body:JSON.stringify({prdName:c})})}function dy(){return Re(Te("/api/actions/clear-lock"),{method:"POST"})}const Xl=["Draft","Ready","In Progress","Review","Done"];function Ou(){return Re(Te("/api/board/status"))}function fy(c){return Re(Te("/api/board/issues"),{method:"POST",body:JSON.stringify(c)})}function F0(c,o){return Re(Te(`/api/board/issues/${c}/move`),{method:"PATCH",body:JSON.stringify({column:o})})}function my(c){return Re(Te(`/api/board/issues/${c}`),{method:"DELETE"})}function hy(){return Re(Te("/api/roadmap"))}function xy(){return Re(Te("/api/roadmap/scan"),{method:"POST"})}function W0(c){return Re(Te("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:c})})}function py(c,o){return Re(Te("/api/slack/channels/create"),{method:"POST",body:JSON.stringify({botToken:c,name:o})})}function gy(c){return Re(Te("/api/slack/channels"),{method:"POST",body:JSON.stringify({botToken:c})})}function vy(){return Re(Te("/api/agents"))}function by(c){return Re(Te(`/api/agents/${c}/prompt`))}function yy(c){return Re(Te("/api/agents"),{method:"POST",body:JSON.stringify(c)})}function f0(c,o){return Re(Te(`/api/agents/${c}`),{method:"PUT",body:JSON.stringify(o)})}function jy(c){return Re(Te(`/api/agents/${c}`),{method:"DELETE"})}function Ny(){return Re(Te("/api/agents/seed-defaults"),{method:"POST"})}function ct(c,o=[],d){const r=(d==null?void 0:d.enabled)??!0,[m,f]=y.useState(null),[h,v]=y.useState(!0),[g,p]=y.useState(null),N=y.useRef(c);N.current=c;const w=y.useRef(()=>{(async()=>{p(null);try{const z=await N.current();f(z)}catch(z){p(z instanceof Error?z:new Error("Unknown error"))}})()});return w.current=w.current.bind(w),y.useEffect(()=>{if(!r)return;let D=!1;return v(!0),p(null),(async()=>{try{const U=await N.current();D||f(U)}catch(U){D||p(U instanceof Error?U:new Error("Unknown error"))}finally{D||v(!1)}})(),()=>{D=!0}},[...o,r]),{data:m,loading:h,error:g,refetch:w.current}}function P0(c,o=[],d){y.useEffect(()=>{if((d==null?void 0:d.enabled)===!1)return;const r=Te("/api/status/events"),m=new EventSource(r);return m.addEventListener("status_changed",f=>{try{const h=JSON.parse(f.data);c(h)}catch{}}),m.addEventListener("executor_started",f=>{try{const h=JSON.parse(f.data);console.log("Executor started with PID:",h.pid)}catch{}}),m.onerror=()=>{},()=>{m.close()}},o)}const Sy=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,rt=Fb(c=>({projectName:"Night Watch",setProjectName:o=>c({projectName:o}),toasts:[],addToast:o=>{const d=Math.random().toString(36).substring(7);c(r=>({toasts:[...r.toasts,{...o,id:d}]})),setTimeout(()=>{c(r=>({toasts:r.toasts.filter(m=>m.id!==d)}))},5e3)},removeToast:o=>c(d=>({toasts:d.toasts.filter(r=>r.id!==o)})),globalModeLoading:!0,setGlobalModeLoading:o=>c({globalModeLoading:o}),isGlobalMode:!1,setGlobalMode:o=>{Pb(o),c({isGlobalMode:o})},projects:[],setProjects:o=>c({projects:o}),selectedProjectId:Sy,selectProject:o=>{Ib(o),o?localStorage.setItem("nw-selected-project",o):localStorage.removeItem("nw-selected-project"),c(d=>{const r=d.projects.find(m=>m.name===o);return{selectedProjectId:o,...r?{projectName:r.name}:{}}})}})),wy=()=>{const[c,o]=y.useState(!1),{projectName:d,isGlobalMode:r,projects:m,selectedProjectId:f,selectProject:h}=rt(),v=[{icon:cb,label:"Dashboard",path:"/"},{icon:db,label:"Board",path:"/board"},{icon:nb,label:"Pull Requests",path:"/prs",badge:1},{icon:Q0,label:"Roadmap",path:"/roadmap"},{icon:Ri,label:"Scheduling",path:"/scheduling"},{icon:Db,label:"Logs",path:"/logs"},{icon:Rv,label:"Integrations",path:"/integrations"},{icon:pu,label:"Agents",path:"/agents"},{icon:X0,label:"Settings",path:"/settings"}];return n.jsxs("aside",{className:`
391
- relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
392
- ${c?"w-20":"w-72"} h-screen flex-shrink-0 z-50
393
- bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
394
- `,children:[n.jsx("div",{className:`p-6 border-b border-white/5 ${c?"items-center justify-center flex":""}`,children:c?n.jsx("div",{className:"relative group",children:n.jsx("div",{className:"h-10 w-10 bg-indigo-600 rounded-xl flex items-center justify-center text-white font-bold cursor-pointer shadow-lg shadow-indigo-500/20 group-hover:bg-indigo-500 transition-colors bg-gradient-to-br from-indigo-500 to-indigo-700",title:"Switch Project",children:"NW"})}):n.jsxs("div",{className:"relative w-full",children:[n.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:r?"Projects":"Workspace"}),r?n.jsxs("div",{className:"relative",children:[n.jsx(s0,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),n.jsx("select",{value:f||"",onChange:g=>h(g.target.value),className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 pl-10 pr-8 text-sm font-medium shadow-sm appearance-none cursor-pointer hover:border-white/20 transition-colors focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20",children:m.filter(g=>g.valid).map(g=>n.jsx("option",{value:g.name,children:g.name},g.name))}),n.jsx(qv,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-slate-500 pointer-events-none"})]}):n.jsxs("div",{className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 px-3.5 text-sm font-medium shadow-sm flex items-center",children:[n.jsx(s0,{className:"h-4 w-4 text-indigo-400 mr-3"}),n.jsx("span",{className:"truncate",children:d})]})]})}),n.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:n.jsx("ul",{className:"space-y-1.5 px-4",children:v.map(g=>n.jsxs(Qe.Fragment,{children:[g.path==="/agents"&&!c&&n.jsx("li",{className:"pt-3 pb-1 px-3.5",children:n.jsx("span",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest",children:"Team"})}),n.jsx("li",{children:n.jsx(H0,{to:g.path,className:({isActive:p})=>`
395
- flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
396
- ${p?"bg-indigo-500/10 text-indigo-300 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.05)]":"text-slate-400 hover:bg-white/5 hover:text-slate-200"}
397
- ${c?"justify-center":""}
398
- `,children:({isActive:p})=>n.jsxs(n.Fragment,{children:[n.jsx(g.icon,{className:`h-5 w-5 transition-colors ${p?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${c?"":"mr-3.5"}`}),!c&&n.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:g.label}),g.badge&&(c?n.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):n.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${p?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:g.badge})),p&&!c&&n.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-indigo-500 rounded-r-full shadow-[0_0_10px_rgba(99,102,241,0.4)]"}),c&&n.jsx("div",{className:"absolute left-full ml-4 px-3 py-1.5 bg-[#111827] text-white text-xs font-medium rounded-md border border-white/10 shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity translate-x-2 group-hover:translate-x-0",children:g.label})]})})})]},g.path))})}),n.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:n.jsx("button",{onClick:()=>o(!c),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:c?n.jsx(_i,{className:"h-5 w-5"}):n.jsx(Hv,{className:"h-5 w-5"})})})]})},Cy=()=>{const{projectName:c}=rt();return n.jsxs("header",{className:"h-20 flex items-center justify-between px-8 z-40 sticky top-0 bg-[#030712]/80 backdrop-blur-md border-b border-white/5",children:[n.jsxs("div",{className:"flex items-center space-x-6",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),n.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:c})]}),n.jsx("div",{className:"h-8 w-px bg-white/10 mx-2"}),n.jsxs("div",{className:"flex items-center space-x-2 text-xs font-medium px-3 py-1.5 rounded-full border transition-colors bg-emerald-500/5 text-emerald-400 border-emerald-500/20 shadow-[0_0_10px_-4px_rgba(16,185,129,0.3)]",children:[n.jsx(Qb,{className:"h-3.5 w-3.5"}),n.jsx("span",{className:"uppercase tracking-wider text-[10px]",children:"Online"})]})]}),n.jsxs("div",{className:"flex items-center space-x-5",children:[n.jsxs("div",{className:"relative hidden md:block group",children:[n.jsx("input",{type:"text",placeholder:"Search ( / )",className:"w-72 pl-10 pr-4 py-2 rounded-lg border border-white/5 bg-white/5 text-sm text-slate-200 focus:outline-none focus:ring-1 focus:ring-indigo-500/50 focus:border-indigo-500/50 transition-all placeholder:text-slate-600 focus:bg-[#0b101b]"}),n.jsx(_u,{className:"absolute left-3.5 top-2.5 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400 transition-colors"})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full relative transition-all",children:[n.jsx(Av,{className:"h-5 w-5"}),n.jsx("span",{className:"absolute top-2.5 right-2.5 h-2 w-2 bg-red-500 rounded-full ring-2 ring-[#030712]"})]}),n.jsx("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full transition-all",children:n.jsx(X0,{className:"h-5 w-5"})})]}),n.jsx("div",{className:"h-9 w-9 rounded-full bg-gradient-to-tr from-indigo-600 to-purple-600 ring-2 ring-white/10 flex items-center justify-center text-white font-bold text-xs shadow-lg",children:"AD"})]})]})},Ey=({toast:c,onDismiss:o})=>{const d={success:n.jsx(ns,{className:"h-5 w-5 text-green-400"}),error:n.jsx(Kt,{className:"h-5 w-5 text-red-400"}),info:n.jsx(ub,{className:"h-5 w-5 text-blue-400"}),warning:n.jsx(qb,{className:"h-5 w-5 text-amber-400"})},r={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return n.jsx("div",{className:`
399
- pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
400
- bg-slate-900 border border-slate-800 border-l-4 ${r[c.type]}
401
- shadow-lg ring-1 ring-black ring-opacity-5 transition-all
402
- animate-in slide-in-from-right-full fade-in duration-300
403
- `,children:n.jsx("div",{className:"p-4",children:n.jsxs("div",{className:"flex items-start",children:[n.jsx("div",{className:"flex-shrink-0",children:d[c.type]}),n.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[n.jsx("p",{className:"text-sm font-medium text-slate-200",children:c.title}),c.message&&n.jsx("p",{className:"mt-1 text-sm text-slate-400",children:c.message})]}),n.jsx("div",{className:"ml-4 flex flex-shrink-0",children:n.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>o(c.id),children:[n.jsx("span",{className:"sr-only",children:"Close"}),n.jsx(Ft,{className:"h-5 w-5"})]})})]})})})},Ay=()=>{const{toasts:c,removeToast:o}=rt();return n.jsx("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 flex flex-col items-end px-4 py-6 sm:items-end sm:p-6 z-[100] gap-4",children:c.map(d=>n.jsx(Ey,{toast:d,onDismiss:o},d.id))})};function Ty(){const{setGlobalMode:c,setGlobalModeLoading:o,setProjects:d,selectProject:r,selectedProjectId:m}=rt();y.useEffect(()=>{o(!0),ty().then(f=>{c(!0),d(f);const h=f.filter(v=>v.valid);m&&h.some(v=>v.name===m)?r(m):h.length>0&&r(h[0].name)}).catch(()=>{c(!1)}).finally(()=>{o(!1)})},[])}const ku=({persona:c,size:o="sm"})=>{const d=o==="lg"?"w-20 h-20 text-2xl":"w-12 h-12 text-base",m={"Security Reviewer":"bg-red-500/20 text-red-300 border-red-500/30","Tech Lead / Architect":"bg-indigo-500/20 text-indigo-300 border-indigo-500/30","QA Engineer":"bg-green-500/20 text-green-300 border-green-500/30",Implementer:"bg-amber-500/20 text-amber-300 border-amber-500/30"}[c.role]??"bg-slate-700/40 text-slate-300 border-white/10";return c.avatarUrl?n.jsx("img",{src:c.avatarUrl,alt:c.name,className:`${d} rounded-full object-cover border border-white/10`}):n.jsx("div",{className:`${d} rounded-full border flex items-center justify-center font-bold ${m}`,children:c.name.charAt(0)})},Ry=({role:c})=>c.toLowerCase().includes("security")?n.jsx(Z0,{className:"h-3 w-3"}):c.toLowerCase().includes("tech")||c.toLowerCase().includes("architect")?n.jsx(Zb,{className:"h-3 w-3"}):c.toLowerCase().includes("qa")?n.jsx(Hb,{className:"h-3 w-3"}):n.jsx(Jv,{className:"h-3 w-3"}),_y=({persona:c,onEdit:o,onDelete:d,onToggleActive:r})=>{const m=c.soul.expertise.slice(0,3),f=c.soul.worldview[0]??"";return n.jsxs("div",{onClick:()=>o(c),role:"button",tabIndex:0,onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),o(c))},className:`relative rounded-xl border p-5 flex flex-col gap-4 transition-all duration-200
404
- ${c.isActive?"bg-[#0d1117] border-white/10 hover:border-white/20":"bg-[#0d1117]/60 border-white/5 opacity-60"}`,children:[n.jsxs("div",{className:"flex items-start justify-between gap-3",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(ku,{persona:c}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-semibold text-slate-100",children:c.name}),n.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[n.jsx(Ry,{role:c.role}),n.jsx("span",{className:"text-xs text-slate-400",children:c.role})]})]})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("button",{onClick:h=>{h.stopPropagation(),r(c)},title:c.isActive?"Deactivate":"Activate",className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none ${c.isActive?"bg-indigo-600":"bg-slate-700"}`,children:n.jsx("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform ${c.isActive?"translate-x-4":"translate-x-0.5"}`})}),n.jsx("button",{onClick:h=>{h.stopPropagation(),o(c)},className:"p-1.5 rounded-lg text-slate-500 hover:text-slate-200 hover:bg-white/5 transition-colors",title:"Edit",children:n.jsx(Ru,{className:"h-3.5 w-3.5"})}),n.jsx("button",{onClick:h=>{h.stopPropagation(),d(c)},className:"p-1.5 rounded-lg text-slate-500 hover:text-red-400 hover:bg-red-500/10 transition-colors",title:"Delete",children:n.jsx(Mu,{className:"h-3.5 w-3.5"})})]})]}),f&&n.jsxs("p",{className:"text-xs text-slate-500 italic leading-relaxed line-clamp-2",children:["“",f,"”"]}),m.length>0&&n.jsx("div",{className:"flex flex-wrap gap-1.5",children:m.map(h=>n.jsx("span",{className:"px-2 py-0.5 rounded-md text-[10px] font-medium bg-indigo-500/10 text-indigo-300 border border-indigo-500/20",children:h},h))}),c.modelConfig&&n.jsxs("div",{className:"text-[10px] text-slate-600 font-mono",children:[c.modelConfig.provider,"/",c.modelConfig.model]})]})},My=({tabs:c,active:o,onChange:d})=>n.jsx("div",{className:"flex border-b border-white/10 mb-6",children:c.map(r=>n.jsx("button",{onClick:()=>d(r),className:`px-4 py-2.5 text-sm font-medium transition-colors border-b-2 -mb-px ${o===r?"text-indigo-300 border-indigo-500":"text-slate-500 border-transparent hover:text-slate-300"}`,children:r},r))}),Bt=({label:c,tags:o,onChange:d,placeholder:r})=>{const[m,f]=y.useState(""),h=()=>{const v=m.trim();!v||o.includes(v)||(d([...o,v]),f(""))};return n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:c}),n.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2",children:o.map(v=>n.jsxs("span",{className:"flex items-center gap-1 px-2 py-0.5 rounded-md text-xs bg-slate-800 text-slate-300 border border-white/10",children:[v,n.jsx("button",{onClick:()=>d(o.filter(g=>g!==v)),className:"text-slate-500 hover:text-red-400",children:n.jsx(Ft,{className:"h-3 w-3"})})]},v))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{value:m,onChange:v=>f(v.target.value),onKeyDown:v=>v.key==="Enter"&&(v.preventDefault(),h()),placeholder:r??"Add item...",className:"flex-1 bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsx("button",{onClick:h,className:"px-3 py-2 rounded-lg bg-white/5 text-slate-400 hover:text-slate-200 text-sm",children:"Add"})]})]})},m0=({label:c,items:o,onChange:d})=>{const[r,m]=y.useState(""),[f,h]=y.useState(""),v=()=>{r.trim()&&(d({...o,[r.trim()]:f.trim()}),m(""),h(""))};return n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:c}),n.jsx("div",{className:"space-y-1.5 mb-2",children:Object.entries(o).map(([g,p])=>n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-xs font-mono text-indigo-400 w-32 truncate",children:g}),n.jsx("span",{className:"text-xs text-slate-400 flex-1 truncate",children:p}),n.jsx("button",{onClick:()=>{const N={...o};delete N[g],d(N)},className:"text-slate-600 hover:text-red-400",children:n.jsx(Ft,{className:"h-3 w-3"})})]},g))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{value:r,onChange:g=>m(g.target.value),placeholder:"key",className:"w-32 bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsx("input",{value:f,onChange:g=>h(g.target.value),onKeyDown:g=>g.key==="Enter"&&(g.preventDefault(),v()),placeholder:"value",className:"flex-1 bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsx("button",{onClick:v,className:"px-3 py-2 rounded-lg bg-white/5 text-slate-400 hover:text-slate-200 text-sm",children:"Add"})]})]})},h0=({label:c,items:o,onChange:d,examplePlaceholder:r,whyPlaceholder:m})=>{const f=(h,v)=>{const g=[...o];g[h]={...g[h],...v},d(g)};return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400",children:c}),n.jsx("button",{onClick:()=>d([...o,{example:"",why:""}]),className:"text-xs text-indigo-400 hover:text-indigo-300",children:"+ Add"})]}),n.jsx("div",{className:"space-y-2",children:o.map((h,v)=>n.jsxs("div",{className:"rounded-lg border border-white/10 bg-[#111827] p-2 space-y-2",children:[n.jsx("input",{value:h.example,onChange:g=>f(v,{example:g.target.value}),placeholder:r??"Example...",className:"w-full bg-black/20 border border-white/10 rounded-md px-2 py-1.5 text-xs text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{value:h.why,onChange:g=>f(v,{why:g.target.value}),placeholder:m??"Why this misses the voice...",className:"flex-1 bg-black/20 border border-white/10 rounded-md px-2 py-1.5 text-xs text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsx("button",{onClick:()=>d(o.filter((g,p)=>p!==v)),className:"text-slate-500 hover:text-red-400 px-1",title:"Remove",children:n.jsx(Ft,{className:"h-3.5 w-3.5"})})]})]},v))})]})},es=({label:c,value:o,onChange:d,rows:r=3,placeholder:m})=>n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:c}),n.jsx("textarea",{value:o,onChange:f=>d(f.target.value),rows:r,placeholder:m,className:"w-full bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 resize-none"})]}),en=({label:c,value:o,onChange:d,placeholder:r,type:m="text"})=>n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:c}),n.jsx("input",{type:m,value:o,onChange:f=>d(f.target.value),placeholder:r,className:"w-full bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"})]});function zy(){return{name:"",role:"",avatarUrl:"",soul:{whoIAm:"",worldview:[],opinions:{},expertise:[],interests:[],tensions:[],boundaries:[],petPeeves:[]},style:{voicePrinciples:"",sentenceStructure:"",tone:"",wordsUsed:[],wordsAvoided:[],emojiUsage:{frequency:"moderate",favorites:[],contextRules:""},quickReactions:{},rhetoricalMoves:[],antiPatterns:[],goodExamples:[],badExamples:[]},skill:{modes:{},interpolationRules:"",additionalInstructions:[]},modelConfig:{provider:"anthropic",model:"claude-sonnet-4-6"},systemPromptOverride:""}}function Dy(c){return{name:c.name,role:c.role,avatarUrl:c.avatarUrl??"",soul:{...c.soul},style:{...c.style},skill:{...c.skill},modelConfig:c.modelConfig??{provider:"anthropic",model:"claude-sonnet-4-6"},systemPromptOverride:c.systemPromptOverride??""}}const Oy=["Identity","Soul","Style","Calibration","Advanced"],ky=({persona:c,onClose:o,onSave:d})=>{var B;const[r,m]=y.useState("Identity"),[f,h]=y.useState(c?Dy(c):zy()),[v,g]=y.useState(!1),[p,N]=y.useState(null),[w,D]=y.useState(null),[z,U]=y.useState(!1),A=C=>h(V=>({...V,soul:{...V.soul,...C}})),R=C=>h(V=>({...V,style:{...V.style,...C}})),Q=C=>h(V=>({...V,skill:{...V.skill,...C}})),q=C=>h(V=>({...V,modelConfig:V.modelConfig?{...V.modelConfig,...C}:{provider:"anthropic",model:"claude-sonnet-4-6",...C}})),L=async()=>{if(!f.name.trim()||!f.role.trim()){N("Name and role are required.");return}g(!0),N(null);const C=f.modelConfig===null?null:f.modelConfig.model?f.modelConfig:void 0,V={name:f.name.trim(),role:f.role.trim(),avatarUrl:f.avatarUrl.trim()||void 0,soul:f.soul,style:f.style,skill:f.skill,modelConfig:C,systemPromptOverride:f.systemPromptOverride.trim()||void 0};try{await d((c==null?void 0:c.id)??null,V),o()}catch(Z){N(Z.message)}finally{g(!1)}},J=async()=>{if(c){U(!0);try{const C=await by(c.id);D(C.prompt)}catch(C){D(`Error: ${C.message}`)}finally{U(!1)}}};return n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[n.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:o}),n.jsxs("div",{className:"relative bg-[#0d1117] border border-white/10 rounded-2xl shadow-2xl w-full max-w-3xl max-h-[90vh] flex flex-col",children:[n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-white/10",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[c&&n.jsx(ku,{persona:c}),n.jsxs("div",{children:[n.jsx("h2",{className:"text-base font-semibold text-slate-100",children:c?`Edit ${c.name}`:"Hire Agent"}),n.jsx("p",{className:"text-xs text-slate-500",children:"Define their soul, style, and skills"})]})]}),n.jsx("button",{onClick:o,className:"p-2 rounded-lg text-slate-500 hover:text-slate-200 hover:bg-white/5",children:n.jsx(Ft,{className:"h-5 w-5"})})]}),n.jsx("div",{className:"px-6 pt-4",children:n.jsx(My,{tabs:Oy,active:r,onChange:m})}),n.jsxs("div",{className:"flex-1 overflow-y-auto px-6 pb-6 space-y-5",children:[r==="Identity"&&n.jsxs(n.Fragment,{children:[n.jsx(en,{label:"Name",value:f.name,onChange:C=>h(V=>({...V,name:C})),placeholder:"e.g. Maya"}),n.jsx(en,{label:"Role",value:f.role,onChange:C=>h(V=>({...V,role:C})),placeholder:"e.g. Security Reviewer"}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 uppercase tracking-wider mb-2",children:"Avatar"}),n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:"h-16 w-16 rounded-full bg-indigo-600/20 border border-indigo-500/30 flex items-center justify-center overflow-hidden flex-shrink-0",children:f.avatarUrl?n.jsx("img",{src:f.avatarUrl,alt:"avatar",className:"h-full w-full object-cover"}):n.jsx("span",{className:"text-xl font-bold text-indigo-400",children:(B=(f.name||"?")[0])==null?void 0:B.toUpperCase()})}),n.jsxs("div",{className:"flex-1",children:[n.jsxs("label",{className:"cursor-pointer inline-flex items-center gap-2 px-3 py-2 rounded-lg border border-white/10 bg-white/5 text-xs text-slate-300 hover:bg-white/10 transition-colors",children:[n.jsx("span",{children:"Upload image"}),n.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:C=>{var P;const V=(P=C.target.files)==null?void 0:P[0];if(!V)return;const Z=new FileReader;Z.onload=ue=>{var $;const xe=($=ue.target)==null?void 0:$.result;h(ie=>({...ie,avatarUrl:xe}))},Z.readAsDataURL(V)}})]}),f.avatarUrl&&n.jsx("button",{onClick:()=>h(C=>({...C,avatarUrl:""})),className:"ml-2 text-xs text-slate-500 hover:text-red-400",children:"Remove"})]})]})]}),n.jsx(es,{label:"Who I Am",value:f.soul.whoIAm,onChange:C=>A({whoIAm:C}),rows:4,placeholder:"A concise self-description in first person..."}),n.jsx(Bt,{label:"Expertise",tags:f.soul.expertise,onChange:C=>A({expertise:C}),placeholder:"e.g. security, cryptography..."}),n.jsx(Bt,{label:"Interests",tags:f.soul.interests,onChange:C=>A({interests:C}),placeholder:"e.g. OWASP, threat modeling..."})]}),r==="Soul"&&n.jsxs(n.Fragment,{children:[n.jsx(Bt,{label:"Worldview (beliefs)",tags:f.soul.worldview,onChange:C=>A({worldview:C}),placeholder:"Add a core belief..."}),n.jsx(Bt,{label:"Tensions (internal conflicts)",tags:f.soul.tensions,onChange:C=>A({tensions:C}),placeholder:"Add a tension..."}),n.jsx(Bt,{label:"Boundaries (won't do)",tags:f.soul.boundaries,onChange:C=>A({boundaries:C}),placeholder:"Add a boundary..."}),n.jsx(Bt,{label:"Pet Peeves",tags:f.soul.petPeeves,onChange:C=>A({petPeeves:C}),placeholder:"Add a pet peeve..."}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Opinions"}),n.jsx("button",{onClick:()=>{const C=prompt("Domain name (e.g., security, architecture):");C!=null&&C.trim()&&A({opinions:{...f.soul.opinions??{},[C.trim()]:[]}})},className:"text-xs text-indigo-400 hover:text-indigo-300",children:"+ Add Domain"})]}),Object.entries(f.soul.opinions??{}).map(([C,V])=>n.jsxs("div",{className:"mb-3 p-3 bg-white/5 rounded-lg border border-white/10",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("span",{className:"text-sm font-medium text-slate-300",children:C}),n.jsx("button",{onClick:()=>{const{[C]:Z,...P}=f.soul.opinions??{};A({opinions:P})},className:"text-xs text-red-400 hover:text-red-300",children:"Remove domain"})]}),n.jsx("div",{className:"space-y-1 mb-2",children:V.map((Z,P)=>n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{value:Z,onChange:ue=>{const xe=[...V];xe[P]=ue.target.value,A({opinions:{...f.soul.opinions??{},[C]:xe}})},className:"flex-1 bg-white/5 border border-white/10 rounded px-2 py-1 text-xs text-slate-300 focus:outline-none focus:border-indigo-500/50",placeholder:"Add a take..."}),n.jsx("button",{onClick:()=>{const ue=V.filter((xe,$)=>$!==P);A({opinions:{...f.soul.opinions??{},[C]:ue}})},className:"text-slate-500 hover:text-red-400 text-xs",children:"×"})]},P))}),n.jsx("button",{onClick:()=>{A({opinions:{...f.soul.opinions??{},[C]:[...V,""]}})},className:"text-xs text-indigo-400 hover:text-indigo-300",children:"+ Add take"})]},C))]})]}),r==="Style"&&n.jsxs(n.Fragment,{children:[n.jsx(es,{label:"Voice Principles",value:f.style.voicePrinciples,onChange:C=>R({voicePrinciples:C}),placeholder:"Describe the voice in 1-2 sentences..."}),n.jsx(en,{label:"Tone",value:f.style.tone,onChange:C=>R({tone:C}),placeholder:"e.g. Vigilant but not paranoid. Matter-of-fact."}),n.jsx(en,{label:"Sentence Structure",value:f.style.sentenceStructure,onChange:C=>R({sentenceStructure:C}),placeholder:"e.g. Short and punchy. One risk, one fix per message."}),n.jsx(Bt,{label:"Words I Use",tags:f.style.wordsUsed,onChange:C=>R({wordsUsed:C}),placeholder:"Add a word or phrase..."}),n.jsx(Bt,{label:"Words I Never Use",tags:f.style.wordsAvoided,onChange:C=>R({wordsAvoided:C}),placeholder:"Add a word to avoid..."}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:"Emoji Frequency"}),n.jsxs("select",{value:f.style.emojiUsage.frequency,onChange:C=>R({emojiUsage:{...f.style.emojiUsage,frequency:C.target.value}}),className:"w-full bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 focus:outline-none focus:border-indigo-500/50",children:[n.jsx("option",{value:"never",children:"Never"}),n.jsx("option",{value:"rare",children:"Rare"}),n.jsx("option",{value:"moderate",children:"Moderate"}),n.jsx("option",{value:"heavy",children:"Heavy"})]})]}),n.jsx(Bt,{label:"Favorite Emojis",tags:f.style.emojiUsage.favorites,onChange:C=>R({emojiUsage:{...f.style.emojiUsage,favorites:C}}),placeholder:"Add an emoji..."}),n.jsx(es,{label:"Emoji Context Rules",value:f.style.emojiUsage.contextRules,onChange:C=>R({emojiUsage:{...f.style.emojiUsage,contextRules:C}}),rows:2,placeholder:"e.g. 🔒 for concerns, ✅ for resolved issues"}),n.jsx(m0,{label:"Quick Reactions",items:f.style.quickReactions,onChange:C=>R({quickReactions:C})})]}),r==="Calibration"&&n.jsxs(n.Fragment,{children:[n.jsx(Bt,{label:"Good Examples (what I sound like)",tags:f.style.goodExamples,onChange:C=>R({goodExamples:C}),placeholder:"Add a good example message..."}),n.jsx(Bt,{label:"Rhetorical Moves",tags:f.style.rhetoricalMoves,onChange:C=>R({rhetoricalMoves:C}),placeholder:"Add a rhetorical pattern..."}),n.jsx(Bt,{label:"Additional Instructions",tags:f.skill.additionalInstructions,onChange:C=>Q({additionalInstructions:C}),placeholder:"Add an instruction..."}),n.jsx(h0,{label:"Anti-Patterns (Never Sound Like This)",items:f.style.antiPatterns,onChange:C=>R({antiPatterns:C}),examplePlaceholder:"What should be avoided...",whyPlaceholder:"Why this is off-voice..."}),n.jsx(h0,{label:"Bad Examples",items:f.style.badExamples,onChange:C=>R({badExamples:C}),examplePlaceholder:"Bad output example...",whyPlaceholder:"Why it misses..."})]}),r==="Advanced"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-300",children:"Use Global Config"}),n.jsx("p",{className:"text-xs text-slate-500",children:"When on, this persona uses the global Night Watch AI model settings"})]}),n.jsx("button",{onClick:()=>h(C=>({...C,modelConfig:C.modelConfig?null:{provider:"anthropic",model:"claude-sonnet-4-6"}})),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${f.modelConfig?"bg-white/10":"bg-indigo-500"}`,children:n.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white shadow transition-transform ${f.modelConfig?"translate-x-1":"translate-x-6"}`})})]}),f.modelConfig&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:"Provider"}),n.jsxs("select",{value:f.modelConfig.provider,onChange:C=>q({provider:C.target.value}),className:"w-full bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 focus:outline-none focus:border-indigo-500/50",children:[n.jsx("option",{value:"anthropic",children:"Anthropic"}),n.jsx("option",{value:"openai",children:"OpenAI"}),n.jsx("option",{value:"custom",children:"Custom"})]})]}),n.jsx(en,{label:"Model",value:f.modelConfig.model,onChange:C=>q({model:C}),placeholder:"e.g. claude-sonnet-4-6"}),f.modelConfig.provider==="custom"&&n.jsx(en,{label:"Base URL",value:f.modelConfig.baseUrl??"",onChange:C=>q({baseUrl:C}),placeholder:"https://api.example.com/v1"}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:["Temperature:"," ",n.jsx("span",{className:"text-slate-300",children:f.modelConfig.temperature??.7})]}),n.jsx("input",{type:"range",min:"0",max:"1",step:"0.05",value:f.modelConfig.temperature??.7,onChange:C=>q({temperature:parseFloat(C.target.value)}),className:"w-full accent-indigo-500"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 uppercase tracking-wider mb-1",children:"Max Tokens (optional)"}),n.jsx("input",{type:"number",min:1,max:32768,value:f.modelConfig.maxTokens??"",onChange:C=>q({maxTokens:C.target.value?parseInt(C.target.value):void 0}),placeholder:"Default from provider",className:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-300 focus:outline-none focus:border-indigo-500/50"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 uppercase tracking-wider mb-2",children:"Custom Env Vars"}),n.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"API keys injected at call time for this persona only. Values are masked after save."}),Object.entries(f.modelConfig.envVars??{}).map(([C,V])=>n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("input",{value:C,readOnly:!0,className:"w-1/3 bg-white/5 border border-white/10 rounded px-2 py-1 text-xs text-slate-300"}),n.jsx("input",{value:V==="***"?"":V,placeholder:V==="***"?"(masked)":"value",onChange:Z=>{var P;return q({envVars:{...((P=f.modelConfig)==null?void 0:P.envVars)??{},[C]:Z.target.value}})},type:"password",className:"flex-1 bg-white/5 border border-white/10 rounded px-2 py-1 text-xs text-slate-300"}),n.jsx("button",{onClick:()=>{var ue;const{[C]:Z,...P}=((ue=f.modelConfig)==null?void 0:ue.envVars)??{};q({envVars:P})},className:"text-slate-500 hover:text-red-400 text-xs",children:"×"})]},C)),n.jsx("button",{onClick:()=>{var V;const C=prompt("Environment variable name (e.g., ANTHROPIC_API_KEY):");C!=null&&C.trim()&&q({envVars:{...((V=f.modelConfig)==null?void 0:V.envVars)??{},[C.trim()]:""}})},className:"text-xs text-indigo-400 hover:text-indigo-300 mt-1",children:"+ Add Env Var"})]})]}),n.jsx(m0,{label:"Operating Modes",items:f.skill.modes,onChange:C=>Q({modes:C})}),n.jsx(es,{label:"Interpolation Rules",value:f.skill.interpolationRules,onChange:C=>Q({interpolationRules:C}),rows:3,placeholder:"How this persona should reason when explicit opinions are missing..."}),n.jsx(es,{label:"System Prompt Override (leave empty to compile from soul)",value:f.systemPromptOverride,onChange:C=>h(V=>({...V,systemPromptOverride:C})),rows:6,placeholder:"Optionally paste a raw system prompt here to bypass soul compilation..."}),c&&n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("label",{className:"text-xs font-medium text-slate-400",children:"Compiled System Prompt Preview"}),n.jsxs("button",{onClick:J,disabled:z,className:"flex items-center gap-1.5 text-xs text-indigo-400 hover:text-indigo-300 disabled:opacity-50",children:[n.jsx(zi,{className:"h-3.5 w-3.5"}),z?"Loading...":"Preview"]})]}),w&&n.jsx("pre",{className:"bg-[#060d17] border border-white/10 rounded-lg p-4 text-xs text-slate-400 whitespace-pre-wrap font-mono max-h-60 overflow-y-auto",children:w})]})]})]}),n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-t border-white/10",children:[p&&n.jsx("p",{className:"text-sm text-red-400",children:p}),!p&&n.jsx("span",{}),n.jsxs("div",{className:"flex gap-3",children:[n.jsx("button",{onClick:o,className:"px-4 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-200 hover:bg-white/5 transition-colors",children:"Cancel"}),n.jsx("button",{onClick:L,disabled:v,className:"px-5 py-2 rounded-lg text-sm font-medium bg-indigo-600 hover:bg-indigo-500 text-white transition-colors disabled:opacity-50",children:v?"Saving...":c?"Save Changes":"Hire Agent"})]})]})]})]})},Uy=({persona:c,onConfirm:o,onCancel:d})=>{const[r,m]=y.useState(!1),f=async()=>{m(!0),await o(),m(!1)};return n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[n.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:d}),n.jsxs("div",{className:"relative bg-[#0d1117] border border-white/10 rounded-2xl shadow-2xl w-full max-w-sm p-6",children:[n.jsxs("h3",{className:"text-base font-semibold text-slate-100 mb-2",children:["Delete ",c.name,"?"]}),n.jsxs("p",{className:"text-sm text-slate-400 mb-6",children:["This will permanently remove ",c.name,"'s soul from the team. This action cannot be undone."]}),n.jsxs("div",{className:"flex justify-end gap-3",children:[n.jsx("button",{onClick:d,className:"px-4 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-200 hover:bg-white/5",children:"Cancel"}),n.jsx("button",{onClick:f,disabled:r,className:"px-4 py-2 rounded-lg text-sm font-medium bg-red-600 hover:bg-red-500 text-white disabled:opacity-50",children:r?"Deleting...":"Delete"})]})]})]})},Hy=()=>{const{selectedProjectId:c,globalModeLoading:o}=rt(),{data:d,loading:r,error:m,refetch:f}=ct(()=>vy(),[c],{enabled:!o}),[h,v]=y.useState(void 0),[g,p]=y.useState(null),[N,w]=y.useState(!1),[D,z]=y.useState(null),U=y.useCallback(async(J,B)=>{J?await f0(J,B):await yy(B),f()},[f]),A=y.useCallback(async J=>{await jy(J.id),p(null),f()},[f]),R=y.useCallback(async J=>{await f0(J.id,{isActive:!J.isActive}),f()},[f]),Q=async()=>{w(!0),z(null);try{await Ny(),f()}catch(J){z(J.message)}finally{w(!1)}},q=(d==null?void 0:d.filter(J=>J.isActive).length)??0,L=(d==null?void 0:d.length)??0;return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-start justify-between",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[n.jsx("div",{className:"p-2 rounded-lg bg-indigo-500/10 border border-indigo-500/20",children:n.jsx(pu,{className:"h-5 w-5 text-indigo-400"})}),n.jsx("h1",{className:"text-xl font-semibold text-slate-100",children:"Team"})]}),n.jsxs("p",{className:"text-sm text-slate-500 ml-11",children:[L," agent",L!==1?"s":""," ·"," ",q," active"]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("button",{onClick:Q,disabled:N,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-200 hover:bg-white/5 border border-white/10 transition-colors disabled:opacity-50",children:[n.jsx(Di,{className:`h-4 w-4 ${N?"animate-spin":""}`}),"Restore Defaults"]}),n.jsxs("button",{onClick:()=>v(null),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium bg-indigo-600 hover:bg-indigo-500 text-white transition-colors",children:[n.jsx(gl,{className:"h-4 w-4"}),"Hire Agent"]})]})]}),D&&n.jsx("div",{className:"p-3 rounded-lg bg-red-500/10 border border-red-500/20 text-sm text-red-400",children:D}),r&&n.jsx("div",{className:"flex items-center justify-center py-20",children:n.jsx("div",{className:"h-8 w-8 border-2 border-indigo-500 border-t-transparent rounded-full animate-spin"})}),m&&n.jsxs("div",{className:"p-4 rounded-xl bg-red-500/10 border border-red-500/20 text-sm text-red-400",children:["Failed to load agents: ",m.message]}),!r&&!m&&d&&d.length===0&&n.jsxs("div",{className:"text-center py-20",children:[n.jsx(pu,{className:"h-12 w-12 text-slate-700 mx-auto mb-4"}),n.jsx("p",{className:"text-slate-500 mb-2",children:"No agents yet"}),n.jsx("p",{className:"text-sm text-slate-600 mb-6",children:"Hire your first agent or restore the defaults to meet the team."}),n.jsxs("div",{className:"flex justify-center gap-3",children:[n.jsxs("button",{onClick:Q,className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-200 border border-white/10 hover:bg-white/5 transition-colors",children:[n.jsx(Di,{className:"h-4 w-4"}),"Restore Defaults"]}),n.jsxs("button",{onClick:()=>v(null),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium bg-indigo-600 hover:bg-indigo-500 text-white",children:[n.jsx(gl,{className:"h-4 w-4"}),"Hire Agent"]})]})]}),!r&&!m&&d&&d.length>0&&n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[d.map(J=>n.jsx(_y,{persona:J,onEdit:v,onDelete:p,onToggleActive:R},J.id)),n.jsxs("button",{onClick:()=>v(null),className:"rounded-xl border border-dashed border-white/10 p-5 flex flex-col items-center justify-center gap-3 text-slate-600 hover:text-slate-400 hover:border-white/20 hover:bg-white/5 transition-all duration-200 min-h-[200px]",children:[n.jsx(gl,{className:"h-8 w-8"}),n.jsx("span",{className:"text-sm font-medium",children:"Hire Agent"})]})]}),!r&&!m&&d&&d.length>0&&n.jsx("div",{className:"mt-2",children:n.jsxs("details",{className:"group",children:[n.jsxs("summary",{className:"flex items-center gap-2 text-xs text-slate-600 cursor-pointer hover:text-slate-400 select-none",children:[n.jsx(_i,{className:"h-3.5 w-3.5 group-open:rotate-90 transition-transform"}),"View soul documents"]}),n.jsx("div",{className:"mt-4 space-y-3",children:d.map(J=>n.jsxs("div",{className:"rounded-xl border border-white/5 bg-[#0d1117]/60 p-4",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx(ku,{persona:J,size:"sm"}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm font-medium text-slate-200",children:J.name}),n.jsx("span",{className:"text-xs text-slate-500 ml-2",children:J.role})]})]}),J.soul.whoIAm&&n.jsx("p",{className:"text-xs text-slate-500 leading-relaxed mb-2",children:J.soul.whoIAm}),J.soul.worldview.length>0&&n.jsx("ul",{className:"space-y-1",children:J.soul.worldview.slice(0,3).map((B,C)=>n.jsx("li",{className:"text-xs text-slate-600 pl-3 border-l border-white/5",children:B},C))})]},J.id))})]})}),h!==void 0&&n.jsx(ky,{persona:h,onClose:()=>v(void 0),onSave:U}),g&&n.jsx(Uy,{persona:g,onConfirm:()=>A(g),onCancel:()=>p(null)})]})},be=({children:c,className:o="",onClick:d})=>n.jsxs("div",{className:`
405
- relative bg-[#0b101b] rounded-xl border border-white/5
406
- shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
407
- transition-all duration-300
408
- ${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
409
- ${o}
410
- `,onClick:d,children:[d&&n.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),n.jsx("div",{className:"relative z-10",children:c})]}),re=({children:c,variant:o="primary",size:d="md",loading:r=!1,className:m="",disabled:f,...h})=>{const v="inline-flex items-center justify-center rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-offset-[#030712] disabled:opacity-50 disabled:pointer-events-none active:scale-[0.98]",g={primary:"bg-indigo-600 text-white hover:bg-indigo-500 focus:ring-indigo-500 shadow-[0_0_15px_-3px_rgba(79,70,229,0.4)] border border-indigo-500/50 hover:shadow-[0_0_20px_-3px_rgba(79,70,229,0.5)]",secondary:"bg-[#1f2937] text-slate-200 hover:bg-[#374151] focus:ring-slate-500 border border-white/5",danger:"bg-red-600/10 text-red-400 hover:bg-red-600/20 focus:ring-red-500 border border-red-900/50 hover:border-red-500/50",ghost:"bg-transparent text-slate-400 hover:bg-white/5 hover:text-slate-200 focus:ring-slate-400",outline:"border border-slate-700/50 bg-transparent text-slate-300 hover:bg-white/5 hover:border-slate-500 focus:ring-slate-400"},p={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return n.jsxs("button",{className:`${v} ${g[o]} ${p[d]} ${m}`,disabled:f||r,...h,children:[r&&n.jsx(G0,{className:"mr-2 h-4 w-4 animate-spin"}),c]})},ha=({children:c,variant:o="default",className:d=""})=>{const r={default:"bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20",success:"bg-emerald-500/10 text-emerald-400 ring-1 ring-inset ring-emerald-500/20",warning:"bg-amber-500/10 text-amber-400 ring-1 ring-inset ring-amber-500/20",error:"bg-red-500/10 text-red-400 ring-1 ring-inset ring-red-500/20",neutral:"bg-slate-500/10 text-slate-400 ring-1 ring-inset ring-slate-500/20",info:"bg-blue-500/10 text-blue-400 ring-1 ring-inset ring-blue-500/20"};return n.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${r[o]} ${d}`,children:c})},Uu={Draft:{dot:"bg-slate-500",badge:"neutral"},Ready:{dot:"bg-green-500",badge:"success"},"In Progress":{dot:"bg-blue-500",badge:"info"},Review:{dot:"bg-amber-500",badge:"warning"},Done:{dot:"bg-slate-600",badge:"neutral"}},By=({defaultColumn:c,onClose:o,onCreated:d})=>{const[r,m]=y.useState(""),[f,h]=y.useState(""),[v,g]=y.useState(c),[p,N]=y.useState(!1),[w,D]=y.useState(null),{addToast:z}=rt(),U=async A=>{if(A.preventDefault(),!!r.trim()){N(!0),D(null);try{await fy({title:r.trim(),body:f,column:v}),z({title:"Issue created",message:`"${r.trim()}" added to ${v}`,type:"success"}),d(),o()}catch(R){D(R instanceof Error?R.message:"Failed to create issue")}finally{N(!1)}}};return n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[n.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:o}),n.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[n.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[n.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),n.jsx("button",{onClick:o,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:n.jsx(Ft,{className:"h-5 w-5"})})]}),n.jsxs("form",{onSubmit:U,className:"p-6 space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),n.jsx("input",{type:"text",value:r,onChange:A=>m(A.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),n.jsx("select",{value:v,onChange:A=>g(A.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:Xl.map(A=>n.jsx("option",{value:A,children:A},A))})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),n.jsx("textarea",{value:f,onChange:A=>h(A.target.value),placeholder:"Issue description...",rows:5,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-none font-mono"})]}),w&&n.jsx("p",{className:"text-sm text-red-400",children:w}),n.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[n.jsx(re,{variant:"ghost",type:"button",onClick:o,children:"Cancel"}),n.jsx(re,{type:"submit",disabled:p||!r.trim(),children:p?"Creating...":"Create Issue"})]})]})]})]})},Ly=({issue:c,onClose:o,onMoved:d,onClosed:r})=>{const[m,f]=y.useState(!1),[h,v]=y.useState(!1),{addToast:g}=rt(),p=async D=>{if(D!==c.column){f(!0);try{await F0(c.number,D),g({title:"Issue moved",message:`#${c.number} moved to ${D}`,type:"success"}),d(),o()}catch(z){g({title:"Move failed",message:z instanceof Error?z.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},N=async()=>{if(confirm(`Close issue #${c.number}: "${c.title}"?`)){v(!0);try{await my(c.number),g({title:"Issue closed",message:`#${c.number} closed on GitHub`,type:"success"}),r(),o()}catch(D){g({title:"Close failed",message:D instanceof Error?D.message:"Failed to close issue",type:"error"})}finally{v(!1)}}},w=c.column??"Draft";return n.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[n.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:o}),n.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[n.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[n.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[n.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[n.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",c.number]}),n.jsx(ha,{variant:Uu[w].badge,children:w})]}),n.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:c.title}),c.assignees.length>0&&n.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",c.assignees.join(", ")]})]}),n.jsx("button",{onClick:o,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:n.jsx(Ft,{className:"h-5 w-5"})})]}),n.jsxs("div",{className:"flex items-center space-x-3 px-6 py-3 border-b border-white/5 flex-shrink-0 flex-wrap gap-y-2",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:"text-xs text-slate-500",children:"Move to:"}),Xl.filter(D=>D!==c.column).map(D=>n.jsx("button",{onClick:()=>p(D),disabled:m,className:"text-xs px-2.5 py-1 rounded-md bg-slate-800 text-slate-300 hover:bg-slate-700 hover:text-slate-100 border border-slate-700 transition-colors disabled:opacity-50",children:D},D))]}),n.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[n.jsxs("a",{href:c.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-1 text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:[n.jsx(Tu,{className:"h-3.5 w-3.5"}),n.jsx("span",{children:"GitHub"})]}),n.jsx("button",{onClick:N,disabled:h,className:"text-xs px-2.5 py-1 rounded-md bg-red-500/10 text-red-400 hover:bg-red-500/20 border border-red-500/20 transition-colors disabled:opacity-50",children:h?"Closing...":"Close Issue"})]})]}),n.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c.body?n.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:c.body}):n.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},qy=({issue:c,onClick:o,onMoveRequest:d})=>{const[r,m]=y.useState(!1),f=c.column??"Draft";return n.jsxs("div",{className:"relative group",children:[n.jsx(be,{className:"p-3 cursor-pointer hover:border-indigo-500/30 transition-all active:scale-[0.99] select-none",onClick:o,children:n.jsxs("div",{className:"flex items-start justify-between",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",c.number]}),n.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:c.title}),c.assignees.length>0&&n.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:c.assignees.join(", ")})]}),n.jsx("button",{onClick:h=>{h.stopPropagation(),m(v=>!v)},className:"ml-2 p-1 rounded hover:bg-white/10 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",title:"Move issue",children:n.jsx(Y0,{className:"h-3.5 w-3.5"})})]})}),r&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"fixed inset-0 z-30",onClick:()=>m(!1)}),n.jsx("div",{className:"absolute right-0 top-full mt-1 z-40 bg-[#0f172a] border border-white/10 rounded-xl shadow-2xl py-1 min-w-[140px]",children:Xl.filter(h=>h!==f).map(h=>n.jsxs("button",{onClick:()=>{d(c,h),m(!1)},className:"w-full text-left text-xs px-4 py-2 text-slate-300 hover:bg-white/5 hover:text-slate-100 transition-colors flex items-center space-x-2",children:[n.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${Uu[h].dot}`}),n.jsx("span",{children:h})]},h))})]})]})},Yy=({name:c,issues:o,onIssueClick:d,onNewIssue:r,onMoveIssue:m})=>{const f=Uu[c];return n.jsxs("div",{className:"flex flex-col min-w-[220px] max-w-[220px] h-full",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${f.dot}`}),n.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:c}),n.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:o.length})]}),n.jsx("button",{onClick:()=>r(c),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${c}`,children:n.jsx(gl,{className:"h-3.5 w-3.5"})})]}),n.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:o.length===0?n.jsx("div",{className:"border-2 border-dashed border-slate-800 rounded-xl h-24 flex items-center justify-center",children:n.jsx("span",{className:"text-xs text-slate-700",children:"No issues"})}):o.map(h=>n.jsx(qy,{issue:h,onClick:()=>d(h),onMoveRequest:m},h.id))})]})},Gy=()=>{const[c,o]=y.useState(null),[d,r]=y.useState(null),{addToast:m,selectedProjectId:f,globalModeLoading:h}=rt(),{data:v,loading:g,error:p,refetch:N}=ct(Ou,[f],{enabled:!h});y.useEffect(()=>{const z=setInterval(()=>N(),3e4);return()=>clearInterval(z)},[N]);const w=y.useCallback(async(z,U)=>{try{await F0(z.number,U),m({title:"Issue moved",message:`#${z.number} moved to ${U}`,type:"success"}),N()}catch(A){m({title:"Move failed",message:A instanceof Error?A.message:"Failed to move issue",type:"error"})}},[m,N]);if(h||g)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(p&&p.message.includes("Board not configured"))return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx("div",{className:"text-4xl",children:"📋"}),n.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"Board not configured"}),n.jsxs("p",{className:"text-slate-500 text-sm max-w-sm text-center",children:["Run ",n.jsx("code",{className:"font-mono bg-slate-800 px-2 py-0.5 rounded text-indigo-300",children:"night-watch board setup"})," in your project to create a GitHub Projects board."]})]});if(p)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx("div",{className:"text-slate-300",children:"Failed to load board"}),n.jsx("div",{className:"text-sm text-slate-500",children:p.message}),n.jsx(re,{onClick:()=>N(),children:"Retry"})]});if(!v)return null;const D=v.columns;return n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsxs("div",{className:"flex items-center justify-between mb-6 flex-shrink-0",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Board"}),n.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[Xl.reduce((z,U)=>{var A;return z+(((A=D[U])==null?void 0:A.length)??0)},0)," issues across ",Xl.length," columns"]})]}),n.jsxs(re,{onClick:()=>r("Ready"),children:[n.jsx(gl,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),n.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",children:n.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Xl.length*236}px`},children:Xl.map(z=>n.jsx(Yy,{name:z,issues:D[z]??[],onIssueClick:o,onNewIssue:r,onMoveIssue:w},z))})}),c&&n.jsx(Ly,{issue:c,onClose:()=>o(null),onMoved:()=>N(),onClosed:()=>N()}),d&&n.jsx(By,{defaultColumn:d,onClose:()=>r(null),onCreated:()=>N()})]})},Qy={Draft:"text-slate-400 bg-slate-500/10 ring-slate-500/20",Ready:"text-green-400 bg-green-500/10 ring-green-500/20","In Progress":"text-blue-400 bg-blue-500/10 ring-blue-500/20",Review:"text-amber-400 bg-amber-500/10 ring-amber-500/20",Done:"text-slate-500 bg-slate-600/10 ring-slate-600/20"},Vy=()=>{var $,ie,we;const c=Su(),[o,d]=y.useState(null),[r,m]=y.useState(!1),[f,h]=y.useState(null),{setProjectName:v,addToast:g,selectedProjectId:p,globalModeLoading:N}=rt(),{data:w,loading:D,error:z,refetch:U}=ct(K0,[p],{enabled:!N}),{data:A}=ct(J0,[p],{enabled:!N}),{data:R}=ct(()=>Ou().catch(()=>null),[p],{enabled:!N});P0(se=>{h(se)},[p,N],{enabled:!N});const Q=f||w;if(Qe.useEffect(()=>{Q!=null&&Q.projectName&&v(Q.projectName)},[Q,v]),y.useEffect(()=>{const se=setInterval(()=>{U()},3e4);return()=>clearInterval(se)},[U]),y.useEffect(()=>{const se=()=>U();return window.addEventListener("focus",se),()=>window.removeEventListener("focus",se)},[U]),N||D)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(z)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load dashboard data"}),n.jsx("div",{className:"text-sm text-slate-500",children:z.message}),n.jsx(re,{onClick:()=>U(),children:"Retry"})]});if(!Q)return null;const q=Q.prds.filter(se=>se.status==="ready").length,L=Q.prds.filter(se=>se.status==="in-progress"),J=Q.prs.length,B=Q.prs.filter(se=>se.reviewScore!==null&&se.reviewScore<70).length,C=Q.processes.find(se=>se.name==="executor"),V=Q.processes.find(se=>se.name==="reviewer"),Z=Q.processes.find(se=>se.name==="qa"),P=async se=>{d(se);try{const k=await uy(se),F=k.results.every(ae=>ae.success);g({title:F?"Process Cancelled":"Cancel Failed",message:k.results.map(ae=>ae.message).join("; "),type:F?"success":"error"})}catch(k){g({title:"Cancel Failed",message:k instanceof Error?k.message:"Failed to cancel process",type:"error"})}finally{d(null),U()}},ue=async()=>{m(!0);try{await dy(),g({title:"Lock Cleared",message:"Stale executor state removed",type:"success"}),U()}catch(se){g({title:"Clear Failed",message:se instanceof Error?se.message:"Failed to clear lock",type:"error"})}finally{m(!1)}},xe=se=>{if(!se)return"Not scheduled";try{const k=new Date(se),F=new Date,ae=k.getTime()-F.getTime(),pe=Math.floor(ae/6e4);return pe<0?"Running now...":pe<60?`In ${pe} min`:pe<1440?`In ${Math.floor(pe/60)} hr${pe>=120?"s":""}`:`In ${Math.floor(pe/1440)} day${pe>=2880?"s":""}`}catch{return"Unknown"}};return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsxs(be,{className:"p-5",onClick:()=>c("/prds"),children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-500",children:"PRDs Ready"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:q})]}),n.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:n.jsx(ns,{className:"h-5 w-5"})})]}),n.jsxs("p",{className:"text-xs text-slate-500 mt-4",children:["of ",Q.prds.length," total"]})]}),n.jsxs(be,{className:"p-5",onClick:()=>c("/prds"),children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:L.length})]}),n.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:n.jsx(q0,{className:"h-5 w-5"})})]}),n.jsx("p",{className:"text-xs text-slate-500 mt-4 truncate",children:L.length===1?L[0].name:`${L.length} active`})]}),n.jsxs(be,{className:"p-5",onClick:()=>c("/prs"),children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:J})]}),n.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:n.jsx(Mi,{className:"h-5 w-5"})})]}),n.jsx("p",{className:`text-xs mt-4 ${B>0?"text-red-400 font-medium":"text-slate-500"}`,children:B>0?`${B} need work`:"All passing"})]}),n.jsxs(be,{className:"p-5",children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Cron Status"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:Q.crontab.installed?"Active":"Inactive"})]}),n.jsx("div",{className:`p-2 rounded-lg ${Q.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:n.jsx(Ri,{className:"h-5 w-5"})})]}),n.jsx("p",{className:"text-xs text-slate-500 mt-4",children:Q.crontab.installed?`${Q.crontab.entries.length} entr${Q.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),n.jsxs(be,{className:"p-6",children:[n.jsx("h2",{className:"text-base font-semibold text-slate-200 mb-4",children:"System Status"}),n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Project"}),n.jsx("p",{className:"text-sm text-slate-200",children:Q.projectName})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Provider"}),n.jsx("p",{className:"text-sm text-slate-200 capitalize",children:Q.config.provider})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"PRD Directory"}),n.jsx("p",{className:"text-sm text-slate-200",children:Q.config.prdDir})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Last Updated"}),n.jsx("p",{className:"text-sm text-slate-200",children:new Date(Q.timestamp).toLocaleString()})]})]})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs(be,{className:"p-6",children:[n.jsx("h3",{className:"text-base font-semibold text-slate-200 mb-4",children:"Process Status"}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${C!=null&&C.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),n.jsxs("div",{children:[n.jsx("div",{className:`font-medium ${C!=null&&C.running?"text-slate-200":"text-slate-400"}`,children:"Executor"}),n.jsx("div",{className:"text-xs text-slate-500",children:C!=null&&C.running?`PID: ${C.pid} • ${Q.activePrd??"Running"}`:"Idle"})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[(C==null?void 0:C.running)&&n.jsxs(re,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300",onClick:()=>P("run"),disabled:o==="run",children:[n.jsx(hu,{className:"h-4 w-4 mr-1"}),o==="run"?"Stopping...":"Stop"]}),!(C!=null&&C.running)&&L.length>0&&n.jsx(re,{size:"sm",variant:"ghost",className:"text-amber-400 hover:text-amber-300",onClick:ue,disabled:r,children:r?"Clearing...":"Force Clear"}),n.jsx(re,{size:"sm",variant:"ghost",onClick:()=>c("/logs"),children:"View Log"})]})]}),n.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${V!=null&&V.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),n.jsxs("div",{children:[n.jsx("div",{className:`font-medium ${V!=null&&V.running?"text-slate-200":"text-slate-400"}`,children:"Reviewer"}),n.jsx("div",{className:"text-xs text-slate-500",children:V!=null&&V.running?`PID: ${V.pid} • Running`:"Idle"})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[(V==null?void 0:V.running)&&n.jsxs(re,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300",onClick:()=>P("review"),disabled:o==="review",children:[n.jsx(hu,{className:"h-4 w-4 mr-1"}),o==="review"?"Stopping...":"Stop"]}),n.jsx(re,{size:"sm",variant:"ghost",onClick:()=>c("/logs"),disabled:!(V!=null&&V.running),children:"View Log"})]})]}),n.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${Z!=null&&Z.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),n.jsxs("div",{children:[n.jsx("div",{className:`font-medium ${Z!=null&&Z.running?"text-slate-200":"text-slate-400"}`,children:"QA"}),n.jsx("div",{className:"text-xs text-slate-500",children:Z!=null&&Z.running?`PID: ${Z.pid} • Running`:"Idle"})]})]}),n.jsx("div",{className:"flex items-center space-x-2",children:n.jsx(re,{size:"sm",variant:"ghost",onClick:()=>c("/logs"),children:"View Log"})})]})]})]}),n.jsxs(be,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-base font-semibold text-slate-200",children:"Scheduling"}),n.jsxs("button",{onClick:()=>c("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",n.jsx(n0,{className:"ml-1 h-3 w-3"})]})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`p-1.5 rounded-md ${A!=null&&A.executor.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-800 text-slate-500"}`,children:n.jsx(Ri,{className:"h-4 w-4"})}),n.jsxs("div",{children:[n.jsx("div",{className:`text-sm font-medium ${A!=null&&A.executor.installed?"text-slate-200":"text-slate-500"}`,children:"Executor"}),n.jsx("div",{className:"text-xs text-slate-500",children:A!=null&&A.paused?"Paused":xe(A==null?void 0:A.executor.nextRun)})]})]})}),n.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`p-1.5 rounded-md ${A!=null&&A.reviewer.installed?"bg-purple-500/10 text-purple-400":"bg-slate-800 text-slate-500"}`,children:n.jsx(Mi,{className:"h-4 w-4"})}),n.jsxs("div",{children:[n.jsx("div",{className:`text-sm font-medium ${A!=null&&A.reviewer.installed?"text-slate-200":"text-slate-500"}`,children:"Reviewer"}),n.jsx("div",{className:"text-xs text-slate-500",children:A!=null&&A.paused?"Paused":xe(A==null?void 0:A.reviewer.nextRun)})]})]})}),n.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`p-1.5 rounded-md ${($=A==null?void 0:A.qa)!=null&&$.installed?"bg-green-500/10 text-green-400":"bg-slate-800 text-slate-500"}`,children:n.jsx(kb,{className:"h-4 w-4"})}),n.jsxs("div",{children:[n.jsx("div",{className:`text-sm font-medium ${(ie=A==null?void 0:A.qa)!=null&&ie.installed?"text-slate-200":"text-slate-500"}`,children:"QA"}),n.jsx("div",{className:"text-xs text-slate-500",children:A!=null&&A.paused?"Paused":xe((we=A==null?void 0:A.qa)==null?void 0:we.nextRun)})]})]})})]})]})]}),n.jsxs("div",{className:"mt-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),n.jsxs("button",{onClick:()=>c("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",n.jsx(n0,{className:"ml-1 h-3 w-3"})]})]}),n.jsx(be,{className:"p-4",children:R?n.jsx("div",{className:"flex flex-wrap gap-3",children:Xl.map(se=>{var F;const k=((F=R.columns[se])==null?void 0:F.length)??0;return n.jsxs("button",{onClick:()=>c("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${Qy[se]}`,children:[n.jsx("span",{className:"text-xs font-medium",children:se}),n.jsx("span",{className:"text-xs font-bold",children:k})]},se)})}):n.jsxs("p",{className:"text-sm text-slate-500 italic",children:["Board not configured — run ",n.jsx("code",{className:"font-mono bg-slate-800 px-1.5 py-0.5 rounded text-indigo-300 text-xs",children:"night-watch board setup"})," to enable."]})})]})]})},Me=Qe.forwardRef(({className:c="",label:o,error:d,helperText:r,rightIcon:m,...f},h)=>n.jsxs("div",{className:"w-full",children:[o&&n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:o}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{ref:h,className:`
411
- w-full rounded-lg bg-slate-950 border border-slate-800
412
- px-3 py-2 text-sm text-slate-200
413
- placeholder:text-slate-600
414
- focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
415
- disabled:opacity-50 disabled:cursor-not-allowed
416
- transition-all duration-200
417
- ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
418
- ${m?"pr-10":""}
419
- ${c}
420
- `,...f}),m&&n.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:m})]}),d?n.jsx("p",{className:"mt-1.5 text-xs text-red-400",children:d}):r?n.jsx("p",{className:"mt-1.5 text-xs text-slate-500",children:r}):null]}));Me.displayName="Input";const Zl=Qe.forwardRef(({className:c="",label:o,error:d,helperText:r,options:m,value:f,onChange:h,children:v,...g},p)=>{const N=w=>{h&&h(w.target.value)};return n.jsxs("div",{className:"w-full",children:[o&&n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:o}),n.jsxs("div",{className:"relative",children:[n.jsx("select",{ref:p,className:`
421
- w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
422
- px-3 py-2 pr-10 text-sm text-slate-200
423
- focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
424
- disabled:opacity-50 disabled:cursor-not-allowed
425
- transition-all duration-200
426
- ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
427
- ${c}
428
- `,value:f,onChange:N,...g,children:m?m.map(w=>n.jsx("option",{value:w.value,children:w.label},w.value)):v}),n.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:n.jsx(Y0,{className:"h-4 w-4"})})]}),d?n.jsx("p",{className:"mt-1.5 text-xs text-red-400",children:d}):r?n.jsx("p",{className:"mt-1.5 text-xs text-slate-500",children:r}):null]})});Zl.displayName="Select";function Xy(){var ae,pe;const{data:c,refetch:o}=ct(zu),{addToast:d}=rt(),[r,m]=y.useState(1),[f,h]=y.useState(!1),[v,g]=y.useState(!1),[p,N]=y.useState([]),[w,D]=y.useState(!1),[z,U]=y.useState(""),[A,R]=y.useState(""),[Q,q]=y.useState(""),[L,J]=y.useState(""),[B,C]=y.useState(""),[V,Z]=y.useState(""),[P,ue]=y.useState(!1);Qe.useEffect(()=>{var K,j,G,W;c!=null&&c.slack&&(U(c.slack.botToken||""),R(c.slack.appToken||""),q(((K=c.slack.channels)==null?void 0:K.eng)||""),J(((j=c.slack.channels)==null?void 0:j.prs)||""),C(((G=c.slack.channels)==null?void 0:G.incidents)||""),Z(((W=c.slack.channels)==null?void 0:W.releases)||""),ue(c.slack.discussionEnabled??!1))},[c]);const xe=async(K=!1)=>{try{h(!0),await Du({slack:{enabled:!0,botToken:z,appToken:A,channels:{eng:Q,prs:L,incidents:B,releases:V},autoCreateProjectChannels:!0,discussionEnabled:P}}),d({title:"Success",message:"Slack configuration saved successfully.",type:"success"}),o(),m(K?1:r+1)}catch(j){d({title:"Error",message:j.message||"Failed to save configuration",type:"error"})}finally{h(!1)}},$=async()=>{if(m(3),!!z.startsWith("xoxb-"))try{D(!0);const K=await gy(z);N(K);const j=Ne=>{var He;return(He=K.find(_e=>_e.name.toLowerCase()===Ne))==null?void 0:He.id},G=Q||j("eng"),W=L||j("prs"),I=B||j("incidents"),oe=V||j("releases"),de=[];if(G||de.push({name:"eng",setter:q}),W||de.push({name:"prs",setter:J}),I||de.push({name:"incidents",setter:C}),oe||de.push({name:"releases",setter:Z}),de.length>0){d({title:"Creating Channels",message:`Auto-creating missing channels: ${de.map(He=>"#"+He.name).join(", ")}`,type:"info"});const Ne=[...K];for(const He of de)try{const _e=await py(z,He.name),bl=_e.channelId;He.setter(bl),Ne.push({id:bl,name:He.name}),_e.inviteWarning?d({title:"Channel Created with Warning",message:`#${He.name}: ${_e.inviteWarning}`,type:"warning"}):_e.welcomeMessagePosted||d({title:"Channel Created",message:`#${He.name} was created, but welcome message failed to post.`,type:"warning"})}catch(_e){console.error("Failed to create channel:",He.name,_e)}N(Ne)}else G&&q(G),W&&J(W),I&&C(I),oe&&Z(oe)}catch{d({title:"Warning",message:"Could not fetch channels automatically. Please verify your token.",type:"warning"})}finally{D(!1)}},ie="https://api.slack.com/apps?new_app=1",we=`{
429
- "display_information": {
430
- "name": "Night Watch AI",
431
- "description": "AI-driven startup team",
432
- "background_color": "#0d1117"
433
- },
434
- "features": {
435
- "bot_user": {
436
- "display_name": "Night Watch AI",
437
- "always_online": true
438
- }
439
- },
440
- "oauth_config": {
441
- "scopes": {
442
- "bot": [
443
- "chat:write",
444
- "chat:write.customize",
445
- "channels:manage",
446
- "channels:read",
447
- "channels:join",
448
- "reactions:write",
449
- "reactions:read",
450
- "app_mentions:read",
451
- "channels:history",
452
- "users:read"
453
- ]
454
- }
455
- },
456
- "settings": {
457
- "event_subscriptions": {
458
- "bot_events": [
459
- "app_mention",
460
- "message.channels"
461
- ]
462
- },
463
- "socket_mode_enabled": true,
464
- "token_rotation_enabled": false,
465
- "org_deploy_enabled": false
466
- }
467
- } `;if(!c)return n.jsx("div",{className:"animate-pulse flex space-x-4",children:"Loading..."});const se=((ae=c.slack)==null?void 0:ae.enabled)&&((pe=c.slack)==null?void 0:pe.botToken),k=()=>n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsxs("h2",{className:"text-xl font-bold flex items-center gap-3",children:[n.jsx(r0,{className:"w-6 h-6 text-indigo-400"}),"Slack Bot Configuration"]}),n.jsx("p",{className:"text-slate-400 mt-1",children:"Manage your connected Slack workspace."})]}),n.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-400 bg-green-400/10 px-3 py-1.5 rounded-full border border-green-500/20",children:[n.jsx(tn,{className:"w-4 h-4"})," Connected"]})]}),n.jsxs(be,{className:"p-6 space-y-4",children:[n.jsx("h3",{className:"font-medium text-slate-200 border-b border-white/10 pb-2 mb-4",children:"API Token"}),n.jsx("div",{className:"flex gap-4",children:n.jsx(Me,{label:"Bot User OAuth Token",type:v?"text":"password",value:z,onChange:K=>U(K.target.value),className:"flex-1",rightIcon:n.jsx("button",{type:"button",onClick:()=>g(!v),className:"hover:text-slate-300 pointer-events-auto transition-colors",children:v?n.jsx(xu,{className:"w-4 h-4"}):n.jsx(zi,{className:"w-4 h-4"})})})}),n.jsxs("div",{className:"mt-4",children:[n.jsx(Me,{label:"App-Level Token (Socket Mode)",type:v?"text":"password",value:A,onChange:K=>R(K.target.value),placeholder:"xapp-..."}),n.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Required for real-time agent mentions like ",n.jsx("code",{children:"@maya"}),"."]})]}),n.jsxs("div",{className:"flex items-center justify-between border-b border-white/10 pb-2 mb-4 mt-8",children:[n.jsx("h3",{className:"font-medium text-slate-200",children:"Channels"}),n.jsx("span",{className:"text-[10px] uppercase tracking-wider text-slate-500 font-bold",children:"Public & Visible"})]}),n.jsx("div",{className:"grid grid-cols-2 gap-6",children:[{label:"eng",id:Q},{label:"prs",id:L},{label:"incidents",id:B},{label:"releases",id:V}].map(K=>n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("label",{className:"text-xs font-medium text-slate-400 capitalize",children:["#",K.label," Channel"]}),K.id&&n.jsxs("button",{onClick:()=>window.open(`https://slack.com/app_redirect?channel=${K.id}`,"_blank"),className:"text-[10px] text-indigo-400 hover:text-indigo-300 flex items-center gap-1 transition-colors",children:["Open ",n.jsx(Tu,{className:"w-2.5 h-2.5"})]})]}),n.jsx(Me,{value:K.id,onChange:j=>{K.label==="eng"&&q(j.target.value),K.label==="prs"&&J(j.target.value),K.label==="incidents"&&C(j.target.value),K.label==="releases"&&Z(j.target.value)},placeholder:"C1234567890"})]},K.label))}),n.jsx("div",{className:"mt-6 p-3 bg-indigo-500/5 border border-indigo-500/10 rounded-lg",children:n.jsxs("p",{className:"text-xs text-slate-400 leading-relaxed",children:[n.jsx("strong",{className:"text-indigo-300",children:"Pro Tip:"})," Channels are created as ",n.jsx("strong",{children:"Public"}),". If you don't see them in your sidebar, click ",n.jsx("b",{children:'"Add Channels" > "Browse all channels"'})," in Slack to join them for the first time."]})}),n.jsxs("div",{className:"mt-4 flex items-center justify-between rounded-lg border border-white/10 bg-white/[0.02] p-3",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-200",children:"Enable Agent Discussions"}),n.jsx("p",{className:"text-xs text-slate-400",children:"Allows mention routing and threaded agent deliberation."})]}),n.jsxs("label",{className:"inline-flex items-center cursor-pointer",children:[n.jsx("input",{type:"checkbox",className:"sr-only peer",checked:P,onChange:K=>ue(K.target.checked)}),n.jsx("span",{className:"w-11 h-6 bg-slate-700 rounded-full peer peer-checked:bg-indigo-500 transition-colors relative",children:n.jsx("span",{className:`absolute top-0.5 left-0.5 h-5 w-5 rounded-full bg-white transition-transform ${P?"translate-x-5":"translate-x-0"}`})})]})]}),n.jsx("div",{className:"pt-6 border-t border-white/10 flex justify-end",children:n.jsx(re,{onClick:()=>xe(!0),loading:f,children:"Save Changes"})})]})]}),F=[{number:1,title:"Create App",icon:Mv},{number:2,title:"Tokens & Scopes",icon:Z0},{number:3,title:"Channels",icon:xl}];return n.jsxs("div",{className:"max-w-4xl mx-auto space-y-8 animate-in fade-in slide-in-from-bottom-4 duration-500",children:[n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx("h1",{className:"text-3xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-indigo-400 to-cyan-400 tracking-tight",children:"Integrations"}),n.jsx("p",{className:"text-slate-400",children:"Connect Night Watch to your tools for a seamless agentic workflow."})]}),se&&r===1?k():n.jsxs(be,{className:"p-8",children:[n.jsxs("div",{className:"mb-8",children:[n.jsxs("h2",{className:"text-2xl font-bold flex items-center gap-3",children:[n.jsx(r0,{className:"w-7 h-7 text-indigo-400"}),"Connect Slack"]}),n.jsx("p",{className:"text-slate-400 mt-2",children:"Night Watch operates natively in Slack, allowing agents to discuss PRs, triage errors, and collaborate."})]}),n.jsxs("div",{className:"flex items-center justify-between mb-8 relative",children:[n.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-full h-0.5 bg-slate-800 z-0"}),n.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 h-0.5 bg-indigo-500 z-0 transition-all duration-300",style:{width:`${(r-1)/(F.length-1)*100}%`}}),F.map(K=>n.jsxs("div",{className:`relative z-10 flex flex-col items-center gap-2 ${r>=K.number?"text-indigo-400":"text-slate-500"}`,children:[n.jsx("div",{className:`w-12 h-12 rounded-full flex items-center justify-center font-bold text-lg border-2 transition-all duration-300 bg-[#0b101b]
468
- ${r>=K.number?"border-indigo-500 glow-indigo":"border-slate-800"}
469
- ${r===K.number?"ring-4 ring-indigo-500/20":""}
470
- `,children:r>K.number?n.jsx(tn,{className:"w-6 h-6"}):n.jsx(K.icon,{className:"w-5 h-5"})}),n.jsx("span",{className:"text-xs font-medium tracking-wide",children:K.title})]},K.number))]}),n.jsxs("div",{className:"min-h-[300px]",children:[r===1&&n.jsxs("div",{className:"space-y-6 animate-in fade-in slide-in-from-right-4",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"1. Create a Slack App via Manifest"}),n.jsx("p",{className:"text-sm text-slate-400",children:"We've made it easy. Copy the JSON manifest below and paste it into the Slack API dashboard to create your app instantly with the correct scopes."}),n.jsxs("div",{className:"bg-[#1e293b] rounded-lg p-4 border border-white/5 relative group",children:[n.jsx("pre",{className:"text-xs text-slate-300 overflow-x-auto",children:n.jsx("code",{children:we})}),n.jsx(re,{size:"sm",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>{navigator.clipboard.writeText(we),d({title:"Copied",message:"Manifest copied to clipboard",type:"info"})},children:"Copy JSON"})]})]}),n.jsxs("div",{className:"flex justify-between items-center pt-4",children:[n.jsx(re,{variant:"outline",onClick:()=>window.open(ie,"_blank"),children:"Open Slack API Console"}),n.jsxs(re,{onClick:()=>m(2),children:["Next Step ",n.jsx(_i,{className:"w-4 h-4 ml-1"})]})]})]}),r===2&&n.jsxs("div",{className:"space-y-6 animate-in fade-in slide-in-from-right-4",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"2. Install App & Get Token"}),n.jsxs("p",{className:"text-sm text-slate-400",children:["After creating the app, navigate to ",n.jsx("strong",{children:"Features > OAuth & Permissions"})," in the left sidebar of the Slack API dashboard. Click ",n.jsx("strong",{children:"Install to Workspace"}),". Once installed, copy the ",n.jsx("strong",{children:"Bot User OAuth Token"})," (starts with ",n.jsx("code",{children:"xoxb-"}),") and paste it below. Then create an ",n.jsx("strong",{children:"App-Level Token"})," with ",n.jsx("code",{children:"connections:write"})," (starts with ",n.jsx("code",{children:"xapp-"}),") and paste it as well. Ignore the Client ID and secrets on the Basic Information page."]}),n.jsxs("div",{className:"max-w-md mt-6",children:[n.jsx(Me,{label:"Slack Bot Token",placeholder:"xoxb-...",value:z,onChange:K=>U(K.target.value),type:v?"text":"password",rightIcon:n.jsx("button",{type:"button",onClick:()=>g(!v),className:"hover:text-slate-300 pointer-events-auto transition-colors",children:v?n.jsx(xu,{className:"w-4 h-4"}):n.jsx(zi,{className:"w-4 h-4"})})}),n.jsxs("div",{className:"mt-4",children:[n.jsx(Me,{label:"Slack App Token (Socket Mode)",placeholder:"xapp-...",value:A,onChange:K=>R(K.target.value),type:v?"text":"password"}),n.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Needed for real-time ",n.jsx("code",{children:"@agent"})," replies (Socket Mode + ",n.jsx("code",{children:"connections:write"}),")."]})]})]})]}),n.jsxs("div",{className:"flex justify-between pt-8",children:[n.jsx(re,{variant:"ghost",onClick:()=>m(1),children:"Back"}),n.jsxs(re,{onClick:$,disabled:!z.startsWith("xoxb-")||w,children:["Next Step ",n.jsx(_i,{className:"w-4 h-4 ml-1"})]})]})]}),r===3&&n.jsxs("div",{className:"space-y-6 animate-in fade-in slide-in-from-right-4",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"3. Map Channels"}),n.jsx("p",{className:"text-sm text-slate-400",children:`Provide the Slack channel IDs where the agents should operate. You can find the Channel ID at the bottom of the channel's "About" modal in Slack.`}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-8",children:p.length>0?n.jsxs(n.Fragment,{children:[n.jsxs(be,{className:"p-4 border border-indigo-500/20 bg-indigo-500/5",children:[n.jsxs("div",{className:"mb-3",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-indigo-300",children:[n.jsx(xl,{className:"w-4 h-4"})," eng"]}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"General engineering chat and agent banter."})]}),n.jsx(Zl,{options:[{label:"Select a channel...",value:""},...p.map(K=>({label:"#"+K.name,value:K.id}))],value:Q,onChange:q})]}),n.jsxs(be,{className:"p-4 border border-blue-500/20 bg-blue-500/5",children:[n.jsxs("div",{className:"mb-3",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-blue-300",children:[n.jsx(xl,{className:"w-4 h-4"})," prs"]}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Pull Request reviews and agent deliberation."})]}),n.jsx(Zl,{options:[{label:"Select a channel...",value:""},...p.map(K=>({label:"#"+K.name,value:K.id}))],value:L,onChange:J})]}),n.jsxs(be,{className:"p-4 border border-red-500/20 bg-red-500/5",children:[n.jsxs("div",{className:"mb-3",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-red-300",children:[n.jsx(xl,{className:"w-4 h-4"})," incidents"]}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"CI/CD failures and production alerts."})]}),n.jsx(Zl,{options:[{label:"Select a channel...",value:""},...p.map(K=>({label:"#"+K.name,value:K.id}))],value:B,onChange:C})]}),n.jsxs(be,{className:"p-4 border border-emerald-500/20 bg-emerald-500/5",children:[n.jsxs("div",{className:"mb-3",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-emerald-300",children:[n.jsx(xl,{className:"w-4 h-4"})," releases"]}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Ship announcements and merged PRs."})]}),n.jsx(Zl,{options:[{label:"Select a channel...",value:""},...p.map(K=>({label:"#"+K.name,value:K.id}))],value:V,onChange:Z})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs(be,{className:"p-4 border border-indigo-500/20 bg-indigo-500/5",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-indigo-300 mb-2",children:[n.jsx(xl,{className:"w-4 h-4"})," eng"]}),n.jsx(Me,{placeholder:"C1234567890",value:Q,onChange:K=>q(K.target.value)})]}),n.jsxs(be,{className:"p-4 border border-blue-500/20 bg-blue-500/5",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-blue-300 mb-2",children:[n.jsx(xl,{className:"w-4 h-4"})," prs"]}),n.jsx(Me,{placeholder:"C1234567890",value:L,onChange:K=>J(K.target.value)})]}),n.jsxs(be,{className:"p-4 border border-red-500/20 bg-red-500/5",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-red-300 mb-2",children:[n.jsx(xl,{className:"w-4 h-4"})," incidents"]}),n.jsx(Me,{placeholder:"C1234567890",value:B,onChange:K=>C(K.target.value)})]}),n.jsxs(be,{className:"p-4 border border-emerald-500/20 bg-emerald-500/5",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-emerald-300 mb-2",children:[n.jsx(xl,{className:"w-4 h-4"})," releases"]}),n.jsx(Me,{placeholder:"C1234567890",value:V,onChange:K=>Z(K.target.value)})]})]})}),n.jsxs("div",{className:"mt-6 flex items-center justify-between rounded-lg border border-white/10 bg-white/[0.02] p-3",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-200",children:"Enable Agent Discussions"}),n.jsx("p",{className:"text-xs text-slate-400",children:"Threaded agent collaboration and targeted @persona responses."})]}),n.jsxs("label",{className:"inline-flex items-center cursor-pointer",children:[n.jsx("input",{type:"checkbox",className:"sr-only peer",checked:P,onChange:K=>ue(K.target.checked)}),n.jsx("span",{className:"w-11 h-6 bg-slate-700 rounded-full peer peer-checked:bg-indigo-500 transition-colors relative",children:n.jsx("span",{className:`absolute top-0.5 left-0.5 h-5 w-5 rounded-full bg-white transition-transform ${P?"translate-x-5":"translate-x-0"}`})})]})]})]}),n.jsxs("div",{className:"flex justify-between pt-8",children:[n.jsx(re,{variant:"ghost",onClick:()=>m(2),children:"Back"}),n.jsx(re,{onClick:()=>xe(!0),loading:f,disabled:!Q||!L||!B,children:"Complete Setup"})]})]})]})]})]})}const Zy=()=>{const[c,o]=y.useState(!0),[d,r]=y.useState(""),[m,f]=y.useState("executor"),h=y.useRef(null),{selectedProjectId:v,globalModeLoading:g}=rt(),{data:p,loading:N,error:w,refetch:D}=ct(()=>ny(m,500),[m,v],{enabled:!g}),{data:z}=ct(K0,[v],{enabled:!g}),U=(p==null?void 0:p.lines)||[];y.useEffect(()=>{c&&h.current&&(h.current.scrollTop=h.current.scrollHeight)},[U,c]),y.useEffect(()=>{if(!c)return;const q=window.setInterval(()=>{D()},3e3);return()=>window.clearInterval(q)},[c,m,D]);const A=U.filter(q=>q.toLowerCase().includes(d.toLowerCase())),R=q=>{f(q),r("")},Q=q=>{if(!(z!=null&&z.processes))return!1;const L=z.processes.find(J=>J.name===q);return(L==null?void 0:L.running)??!1};return w?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load logs"}),n.jsx("div",{className:"text-sm text-slate-500",children:w.message}),n.jsx(re,{onClick:()=>D(),children:"Retry"})]}):n.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsxs("div",{className:"relative group",children:[n.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:d,onChange:q=>r(q.target.value)}),n.jsx(_u,{className:"absolute left-2.5 top-2 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400"})]}),n.jsx("div",{className:"h-6 w-px bg-slate-700 mx-2"}),n.jsxs("div",{className:"flex space-x-1",children:[n.jsx("button",{onClick:()=>R("executor"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="executor"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{children:"Executor"}),Q("executor")&&n.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),n.jsx("button",{onClick:()=>R("reviewer"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="reviewer"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{children:"Reviewer"}),Q("reviewer")&&n.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),n.jsx("button",{onClick:()=>R("qa"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="qa"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{children:"QA"}),Q("qa")&&n.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsxs(re,{size:"sm",variant:"ghost",onClick:()=>D(),children:[n.jsx(i0,{className:"h-4 w-4 mr-2"}),"Refresh"]}),n.jsxs(re,{size:"sm",variant:"ghost",onClick:()=>o(!c),children:[c?n.jsx(V0,{className:"h-4 w-4 mr-2"}):n.jsx(ss,{className:"h-4 w-4 mr-2"}),c?"Pause":"Resume"]})]})]}),n.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[n.jsxs("div",{className:"bg-slate-950/50 backdrop-blur text-xs text-slate-500 px-4 py-1.5 flex justify-between border-b border-slate-800",children:[n.jsxs("span",{children:["File: ",m,".log"]}),n.jsxs("span",{children:[A.length," lines"]})]}),n.jsxs("div",{ref:h,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[N?n.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):A.length===0?n.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:d?"No logs match your filter":"No logs yet — logs will appear after the first run"}):A.map((q,L)=>{const J=q.includes("[ERROR]"),B=q.includes("[WARN]");return n.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${J?"text-red-400":B?"text-amber-400":"text-slate-300"}`,children:[n.jsx("span",{className:"text-slate-600 select-none w-10 inline-block text-right mr-4 text-xs opacity-50",children:L+1}),q]},L)}),c&&n.jsx("div",{className:"h-4"})," "]}),!c&&n.jsxs("div",{className:"absolute bottom-4 right-4 bg-indigo-600 text-white px-3 py-1.5 rounded-full shadow-lg shadow-indigo-900/40 text-xs font-medium flex items-center cursor-pointer hover:bg-indigo-500 transition-colors",onClick:()=>o(!0),children:[n.jsx(i0,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},$y=({isOpen:c,onClose:o,title:d,children:r})=>(y.useEffect(()=>{const m=f=>{f.key==="Escape"&&o()};return c&&(document.addEventListener("keydown",m),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",m),document.body.style.overflow="unset"}},[c,o]),c?ov.createPortal(n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[n.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:o,"aria-hidden":"true"}),n.jsxs("div",{className:"relative w-full max-w-2xl transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl transition-all flex flex-col max-h-[90vh]",children:[n.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-6 py-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:d}),n.jsx("button",{onClick:o,className:"rounded-full p-1 text-slate-400 hover:bg-slate-800 hover:text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:n.jsx(Ft,{className:"h-5 w-5"})})]}),n.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:r})]})]}),document.body):null),uu={ready:"Ready","in-progress":"In Progress",blocked:"Blocked","pending-review":"Pending Review",done:"Done"},ou={ready:"success","in-progress":"info",blocked:"error","pending-review":"warning",done:"neutral"},Ky=()=>{const[c,o]=y.useState("list"),[d,r]=y.useState(!1),[m,f]=y.useState(null),[h,v]=y.useState(!1),[g,p]=y.useState(!1),[N,w]=y.useState({}),{addToast:D,selectedProjectId:z,globalModeLoading:U}=rt(),{data:A,loading:R,error:Q,refetch:q}=ct(ly,[z],{enabled:!U}),L=A??[],{data:J}=ct(()=>Ou().catch(()=>null),[z],{enabled:!U}),B=Qe.useMemo(()=>{const $=new Map;if(!J)return $;for(const ie of Object.values(J.columns))for(const we of ie)$.set(we.title.toLowerCase().trim(),we);return $},[J]),C=$=>{if(!$.content)return $.name;const ie=$.content.match(/^#\s+(.+)$/m);return ie?ie[1].trim():$.name},V=$=>{const ie=C($).toLowerCase().trim();return B.get(ie)??null},Z=L.map($=>N[$.name]?{...$,status:N[$.name]}:$);y.useEffect(()=>{if(Object.keys(N).length>0){const $=Object.keys(N).filter(ie=>L.some(we=>we.name===ie&&we.status!=="ready"));$.length>0&&w(ie=>{const we={...ie};for(const se of $)delete we[se];return we})}},[L,N]),P0(()=>{q()},[z,U],{enabled:!U});const P=async()=>{if(m){p(!0);try{const $=await oy(m.name);D({title:"PRD Queued",message:$.message,type:"success"}),f(null),q()}catch($){D({title:"Retry Failed",message:$ instanceof Error?$.message:"Failed to retry PRD",type:"error"})}finally{p(!1)}}},ue=$=>{$.preventDefault(),r(!1)},xe=async()=>{if(m){v(!0),w($=>({...$,[m.name]:"in-progress"}));try{const $=await iy(m.name);D({title:"Executor Started",message:$.pid?`Started with PID ${$.pid}`:"Executor started",type:"success"}),q()}catch($){w(ie=>{const we={...ie};return delete we[m.name],we}),D({title:"Executor Failed",message:$ instanceof Error?$.message:"Failed to start executor",type:"error"})}finally{v(!1)}}};return y.useEffect(()=>{const $=setInterval(()=>q(),3e4);return()=>clearInterval($)},[q]),y.useEffect(()=>{const $=()=>q();return window.addEventListener("focus",$),()=>window.removeEventListener("focus",$)},[q]),y.useEffect(()=>{if(m){const $=Z.find(ie=>ie.name===m.name);$&&f($)}},[Z,m]),R?n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading PRDs..."})}):Q?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load PRDs"}),n.jsx("div",{className:"text-sm text-slate-500",children:Q.message}),n.jsx(re,{onClick:()=>q(),children:"Retry"})]}):n.jsxs("div",{className:"space-y-6 h-[calc(100vh-8rem)] flex flex-col",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(re,{variant:c==="list"?"secondary":"ghost",size:"icon",onClick:()=>o("list"),children:n.jsx(c0,{className:"h-4 w-4"})}),n.jsx(re,{variant:c==="card"?"secondary":"ghost",size:"icon",onClick:()=>o("card"),children:n.jsx(mb,{className:"h-4 w-4"})}),n.jsx("div",{className:"h-6 w-px bg-slate-800 mx-2"}),n.jsxs("div",{className:"flex space-x-1",children:[n.jsx("span",{className:"px-3 py-1 bg-slate-800 text-slate-200 rounded-full text-xs font-medium cursor-pointer border border-slate-700",children:"All"}),n.jsx("span",{className:"px-3 py-1 text-slate-500 hover:bg-slate-800 hover:text-slate-300 rounded-full text-xs font-medium cursor-pointer transition-colors",children:"Ready"}),n.jsx("span",{className:"px-3 py-1 text-slate-500 hover:bg-slate-800 hover:text-slate-300 rounded-full text-xs font-medium cursor-pointer transition-colors",children:"In Progress"})]})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs(re,{variant:"outline",size:"sm",children:[n.jsx(Sv,{className:"h-4 w-4 mr-2"}),"Sort"]}),n.jsxs(re,{onClick:()=>r(!0),size:"sm",children:[n.jsx(gl,{className:"h-4 w-4 mr-2"}),"New PRD"]})]})]}),n.jsx("div",{className:"flex-1 overflow-y-auto pr-1 pb-10",children:c==="list"?n.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:n.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[n.jsx("thead",{className:"bg-slate-950/50",children:n.jsxs("tr",{children:[n.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Name"}),n.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Status"}),n.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Dependencies"}),n.jsx("th",{scope:"col",className:"relative px-6 py-3",children:n.jsx("span",{className:"sr-only",children:"Actions"})})]})}),n.jsxs("tbody",{className:"divide-y divide-slate-800",children:[Z.map($=>n.jsxs("tr",{className:"hover:bg-slate-800/50 group cursor-pointer transition-colors",onClick:()=>f($),children:[n.jsxs("td",{className:"px-6 py-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("div",{className:"text-sm font-medium text-slate-200",children:$.name}),(()=>{const ie=V($);return ie?n.jsxs("a",{href:ie.url,target:"_blank",rel:"noopener noreferrer",onClick:we=>we.stopPropagation(),className:"inline-flex items-center px-2 py-0.5 rounded text-[10px] font-medium bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20 hover:bg-indigo-500/20 transition-colors",title:`Board: #${ie.number} — ${ie.column}`,children:["#",ie.number," · ",ie.column]}):null})()]}),$.unmetDependencies.length>0&&n.jsxs("div",{className:"text-xs text-amber-400 mt-1",children:["Blocked by: ",$.unmetDependencies.join(", ")]})]}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx(ha,{variant:ou[$.status],children:uu[$.status]})}),n.jsx("td",{className:"px-6 py-4",children:$.dependencies.length>0?n.jsx("div",{className:"flex flex-wrap gap-1",children:$.dependencies.map(ie=>n.jsx("span",{className:"px-2 py-0.5 bg-slate-800 text-slate-400 text-xs rounded border border-slate-700",children:ie},ie))}):n.jsx("span",{className:"text-sm text-slate-600",children:"None"})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium",children:n.jsx("button",{className:"text-slate-500 hover:text-slate-300 opacity-0 group-hover:opacity-100 transition-opacity",children:n.jsx(Wv,{className:"h-4 w-4"})})})]},$.name)),Z.length===0&&n.jsx("tr",{children:n.jsx("td",{colSpan:4,className:"px-6 py-12 text-center text-slate-500",children:"No PRDs found. Create your first PRD to get started."})})]})]})}):n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[Z.map($=>n.jsxs(be,{className:"p-5 flex flex-col h-full hover:border-indigo-500/50 transition-colors",onClick:()=>f($),children:[n.jsxs("div",{className:"flex justify-between items-start mb-4",children:[n.jsx(ha,{variant:ou[$.status],children:uu[$.status]}),$.status==="in-progress"&&n.jsx("div",{className:"h-2 w-2 bg-blue-500 rounded-full animate-pulse"}),$.status==="pending-review"&&n.jsx("div",{className:"h-2 w-2 bg-yellow-500 rounded-full animate-pulse"})]}),n.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:$.name}),(()=>{const ie=V($);return ie?n.jsxs("a",{href:ie.url,target:"_blank",rel:"noopener noreferrer",onClick:we=>we.stopPropagation(),className:"inline-flex items-center px-2 py-0.5 rounded text-[10px] font-medium bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20 hover:bg-indigo-500/20 transition-colors flex-shrink-0",children:["#",ie.number," · ",ie.column]}):null})()]}),$.content&&n.jsx("p",{className:"text-sm text-slate-400 flex-1 line-clamp-3",children:$.content.replace(/^#.*\n/,"")}),n.jsxs("div",{className:"mt-4 pt-4 border-t border-slate-800",children:[$.dependencies.length>0&&n.jsx("div",{className:"flex flex-wrap gap-1 mb-2",children:$.dependencies.map(ie=>n.jsx("span",{className:"px-2 py-0.5 bg-slate-800 text-slate-400 text-xs rounded border border-slate-700",children:ie},ie))}),$.unmetDependencies.length>0&&n.jsxs("div",{className:"text-xs text-amber-400",children:["Blocked by: ",$.unmetDependencies.join(", ")]})]})]},$.name)),Z.length===0&&n.jsx("div",{className:"col-span-full text-center py-12 text-slate-500",children:"No PRDs found. Create your first PRD to get started."})]})}),n.jsx($y,{isOpen:d,onClose:()=>r(!1),title:"Create New PRD",children:n.jsxs("form",{onSubmit:ue,className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Name"}),n.jsx("input",{type:"text",className:"w-full rounded-md bg-slate-800 border border-slate-700 px-3 py-2 text-sm text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500 placeholder:text-slate-600",placeholder:"e.g. User Authentication"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Complexity"}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx("input",{type:"range",min:"1",max:"10",className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),n.jsx("span",{className:"text-sm font-bold text-slate-300 w-16 text-center",children:"MED"})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Phases"}),n.jsx("input",{type:"number",defaultValue:3,min:1,max:10,className:"w-full rounded-md bg-slate-800 border border-slate-700 px-3 py-2 text-sm text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Template"}),n.jsxs("select",{className:"w-full rounded-md bg-slate-800 border border-slate-700 px-3 py-2 text-sm text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:[n.jsx("option",{children:"Default"}),n.jsx("option",{children:"Feature"}),n.jsx("option",{children:"Bugfix"})]})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Dependencies"}),n.jsxs("div",{className:"bg-slate-950/30 p-3 rounded-md border border-slate-800 max-h-32 overflow-y-auto space-y-2",children:[Z.map($=>n.jsxs("label",{className:"flex items-center space-x-2 text-sm text-slate-300 cursor-pointer",children:[n.jsx("input",{type:"checkbox",className:"rounded border-slate-600 bg-slate-800 text-indigo-500 focus:ring-indigo-500/50 focus:ring-offset-slate-900"}),n.jsx("span",{children:$.name})]},$.name)),Z.length===0&&n.jsx("p",{className:"text-sm text-slate-600 italic",children:"No existing PRDs"})]})]}),n.jsxs("div",{className:"flex justify-end pt-4 space-x-3",children:[n.jsx(re,{type:"button",variant:"ghost",onClick:()=>r(!1),children:"Cancel"}),n.jsx(re,{type:"submit",children:"Create PRD"})]})]})}),m&&n.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[n.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:()=>f(null)}),n.jsxs("div",{className:"relative w-full max-w-xl bg-slate-900 h-full shadow-2xl flex flex-col transform transition-transform animate-in slide-in-from-right duration-300 border-l border-slate-800",children:[n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-slate-800",children:[n.jsx("h2",{className:"text-lg font-bold text-slate-100 line-clamp-1",children:m.name}),n.jsx("button",{onClick:()=>f(null),className:"p-2 hover:bg-slate-800 rounded-full",children:n.jsx(c0,{className:"h-5 w-5 text-slate-500"})})]}),n.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-6 space-y-6",children:[n.jsx("div",{className:"flex items-center space-x-4",children:n.jsx(ha,{variant:ou[m.status],className:"text-sm px-3 py-1",children:uu[m.status]})}),m.content&&n.jsxs("div",{className:"prose prose-sm prose-invert max-w-none",children:[n.jsx("h3",{className:"uppercase text-xs font-bold text-slate-500 tracking-wider mb-2",children:"Description"}),n.jsx("div",{className:"whitespace-pre-wrap text-slate-300 bg-slate-950/50 p-4 rounded-lg border border-slate-800 font-mono text-sm",children:m.content})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("h3",{className:"uppercase text-xs font-bold text-slate-500 tracking-wider",children:"Dependencies"}),m.dependencies.length?n.jsx("div",{className:"flex flex-wrap gap-2",children:m.dependencies.map($=>n.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-300 text-xs rounded border border-slate-700",children:$},$))}):n.jsx("p",{className:"text-sm text-slate-500 italic",children:"No dependencies."}),m.unmetDependencies.length>0&&n.jsx("div",{className:"mt-2",children:n.jsxs("p",{className:"text-sm text-amber-400",children:["Unmet dependencies: ",m.unmetDependencies.join(", ")]})})]})]}),n.jsx("div",{className:"p-4 border-t border-slate-800 bg-slate-900 flex space-x-3",children:m.status==="done"?n.jsxs(re,{className:"flex-1",onClick:P,disabled:g,children:[n.jsx(Di,{className:"h-4 w-4 mr-2"}),g?"Moving...":"Retry"]}):n.jsxs(re,{className:"flex-1",onClick:xe,disabled:h||m.status==="in-progress",children:[n.jsx(ss,{className:"h-4 w-4 mr-2"}),h?"Executing...":"Execute Now"]})})]})]})]})},x0=c=>{switch(c){case"pass":return"All CI checks passed";case"fail":return"One or more CI checks failed";case"pending":return"CI checks are still running";default:return"No CI data available or CI not configured"}},Ci=c=>c===null?"No review yet or review not required":c===100?"PR has been approved":c===0?"Changes have been requested":`Review score: ${c}`,Jy=()=>{const[c,o]=y.useState(null),[d,r]=y.useState(!1),[m,f]=y.useState("all"),[h,v]=y.useState("number"),[g,p]=y.useState("desc"),{addToast:N,selectedProjectId:w,globalModeLoading:D}=rt(),{data:z,loading:U,error:A,refetch:R}=ct(ay,[w],{enabled:!D}),Q=z??[],q=Z=>{switch(Z){case"pass":return n.jsx(ns,{className:"h-4 w-4 text-green-500"});case"fail":return n.jsx(hu,{className:"h-4 w-4 text-red-500"});case"pending":return n.jsx(G0,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return n.jsx(Xv,{className:"h-4 w-4 text-slate-500"})}},L=y.useMemo(()=>Q.filter(Z=>{switch(m){case"needs-work":return Z.ciStatus==="fail"||Z.reviewScore===0;case"pending":return Z.ciStatus==="pending"||Z.ciStatus==="unknown"||Z.reviewScore===null;case"passed":return Z.ciStatus==="pass"&&Z.reviewScore===100;case"all":default:return!0}}),[Q,m]),J=y.useMemo(()=>[...L].sort((P,ue)=>{let xe=0;switch(h){case"number":xe=P.number-ue.number;break;case"title":xe=P.title.localeCompare(ue.title);break;case"branch":xe=P.branch.localeCompare(ue.branch);break;case"ciStatus":{const $={fail:0,pending:1,unknown:2,pass:3};xe=($[P.ciStatus]??2)-($[ue.ciStatus]??2);break}case"reviewScore":{const $=P.reviewScore??-1,ie=ue.reviewScore??-1;xe=$-ie;break}}return g==="asc"?xe:-xe}),[L,h,g]),B=Z=>{h===Z?p(g==="asc"?"desc":"asc"):(v(Z),p("desc"))},C=Z=>h!==Z?n.jsx(jv,{className:"h-3 w-3 text-slate-600"}):g==="asc"?n.jsx(Cv,{className:"h-3 w-3 text-indigo-400"}):n.jsx(vv,{className:"h-3 w-3 text-indigo-400"});if(U)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(A)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),n.jsx("div",{className:"text-sm text-slate-500",children:A.message}),n.jsx(re,{onClick:()=>R(),children:"Retry"})]});const V=async()=>{r(!0);try{const Z=await cy();N({title:"Reviewer Started",message:Z.pid?`Started with PID ${Z.pid}`:"Reviewer started",type:"success"})}catch(Z){N({title:"Reviewer Failed",message:Z instanceof Error?Z.message:"Failed to start reviewer",type:"error"})}finally{r(!1)}};return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex space-x-1",children:[n.jsx("button",{onClick:()=>f("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),n.jsx("button",{onClick:()=>f("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="needs-work"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Needs Work"}),n.jsx("button",{onClick:()=>f("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="pending"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending"}),n.jsx("button",{onClick:()=>f("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="passed"?"bg-green-900/50 text-green-300 border-green-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Passed"})]}),n.jsxs(re,{size:"sm",onClick:V,disabled:d,children:[n.jsx(_u,{className:"h-4 w-4 mr-2"}),d?"Starting...":"Run Reviewer Now"]})]}),n.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:n.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[n.jsx("thead",{className:"bg-slate-950/50",children:n.jsxs("tr",{children:[n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>B("number"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Title"}),C("number")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>B("branch"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Branch"}),C("branch")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>B("ciStatus"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"CI Status"}),C("ciStatus")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>B("reviewScore"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Review Score"}),C("reviewScore")]})}),n.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),n.jsxs("tbody",{className:"divide-y divide-slate-800",children:[J.map(Z=>n.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>o(c===Z.number?null:Z.number),children:[n.jsx("td",{className:"px-6 py-4",children:n.jsxs("div",{className:"flex items-center",children:[n.jsxs("span",{className:"text-slate-500 font-mono mr-2",children:["#",Z.number]}),n.jsx("span",{className:"font-medium text-slate-200",children:Z.title})]})}),n.jsx("td",{className:"px-6 py-4",children:n.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-400 border border-slate-700 rounded text-xs font-mono",children:Z.branch})}),n.jsx("td",{className:"px-6 py-4",children:n.jsxs("div",{className:"flex items-center space-x-2",title:x0(Z.ciStatus),children:[q(Z.ciStatus),n.jsx("span",{className:"text-sm capitalize text-slate-400",children:Z.ciStatus})]})}),n.jsx("td",{className:"px-6 py-4",children:Z.reviewScore!==null?n.jsxs("div",{className:"flex items-center space-x-2",title:Ci(Z.reviewScore),children:[n.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:n.jsx("div",{className:`h-full ${Z.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${Z.reviewScore}%`}})}),n.jsx("span",{className:`text-sm font-bold ${Z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:Z.reviewScore})]}):n.jsx("span",{className:"text-slate-600 text-sm",title:Ci(null),children:"—"})}),n.jsx("td",{className:"px-6 py-4 text-right",children:n.jsx("a",{href:Z.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:P=>P.stopPropagation(),children:n.jsx(Tu,{className:"h-4 w-4"})})})]},Z.number)),J.length===0&&n.jsx("tr",{children:n.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:Q.length===0?"No open PRs found.":`No PRs match the "${m}" filter.`})})]})]})}),c&&n.jsx(be,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const Z=Q.find(P=>P.number===c);return Z?n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"font-bold text-slate-200",children:Z.title}),n.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",n.jsx("span",{className:"font-mono",children:Z.branch})]})]}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsxs("div",{className:"text-center",title:x0(Z.ciStatus),children:[n.jsx("div",{className:"text-xs text-slate-500",children:"CI Status"}),n.jsxs("div",{className:"flex items-center space-x-1 mt-1",children:[q(Z.ciStatus),n.jsx("span",{className:"text-sm capitalize text-slate-300",children:Z.ciStatus})]})]}),Z.reviewScore!==null?n.jsxs("div",{className:"text-center",title:Ci(Z.reviewScore),children:[n.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),n.jsx("div",{className:`text-xl font-bold mt-1 ${Z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:Z.reviewScore})]}):n.jsxs("div",{className:"text-center",title:Ci(null),children:[n.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),n.jsx("div",{className:"text-xl font-bold mt-1 text-slate-500",children:"—"})]})]})]}):null})()})]})},ma=Qe.forwardRef(({className:c="",label:o,checked:d,onChange:r,...m},f)=>{const h=v=>{r&&r(v.target.checked)};return n.jsxs("label",{className:`inline-flex items-center cursor-pointer ${c}`,children:[n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:"checkbox",className:"sr-only peer",ref:f,checked:d,onChange:h,...m}),n.jsx("div",{className:"w-11 h-6 bg-slate-800 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500/50 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-slate-400 after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600 peer-checked:after:bg-white peer-disabled:opacity-50 peer-disabled:cursor-not-allowed"})]}),o&&n.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:o})]})});ma.displayName="Switch";const Fy=()=>{const{addToast:c,selectedProjectId:o,globalModeLoading:d}=rt(),[r,m]=y.useState(!1),[f,h]=y.useState(!1),{data:v,loading:g,error:p,refetch:N}=ct(hy,[o],{enabled:!d});y.useEffect(()=>{if(!(v!=null&&v.enabled))return;const q=setInterval(()=>{N()},1e4);return()=>clearInterval(q)},[v==null?void 0:v.enabled,N]);const w=async q=>{h(!0);try{await W0(q),c({title:q?"Scanner Enabled":"Scanner Disabled",message:q?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:q?"success":"info"}),N()}catch(L){c({title:"Toggle Failed",message:L instanceof Error?L.message:"Failed to toggle scanner",type:"error"})}finally{h(!1)}},D=async()=>{m(!0);try{const q=await xy();q.created.length>0?c({title:"Scan Complete",message:`Created ${q.created.length} PRD(s): ${q.created.join(", ")}`,type:"success"}):c({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),q.errors.length>0&&c({title:"Scan Errors",message:q.errors.join("; "),type:"warning"}),N()}catch(q){c({title:"Scan Failed",message:q instanceof Error?q.message:"Failed to scan roadmap",type:"error"})}finally{m(!1)}};if(g)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(p)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),n.jsx("div",{className:"text-sm text-slate-500",children:p.message}),n.jsx(re,{onClick:()=>N(),children:"Retry"})]});if(!v)return null;if(v.status==="no-roadmap")return n.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),n.jsx(be,{className:"p-12",children:n.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[n.jsx("div",{className:"p-4 bg-slate-800 rounded-full",children:n.jsx(Q0,{className:"h-10 w-10 text-slate-500"})}),n.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),n.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",n.jsx("code",{className:"text-indigo-400 bg-indigo-500/10 px-1.5 py-0.5 rounded text-sm",children:"ROADMAP.md"})," in your project root with checklist items (",n.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",n.jsx("code",{className:"text-slate-300 text-sm",children:"### Feature"}),") to get started."]})]})})]});const z=v.totalItems>0?Math.round(v.processedItems/v.totalItems*100):0,U=Py(v.status),A=Iy(v.items),R=v.lastScan?e1(v.lastScan):"Never",Q=v.autoScanInterval?Math.round(v.autoScanInterval/60):5;return n.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx(ma,{label:v.enabled?"Enabled":"Disabled",checked:v.enabled,onChange:w,disabled:f}),n.jsxs(re,{onClick:D,loading:r,disabled:!v.enabled||v.status==="complete",children:[n.jsx(ss,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),n.jsx(be,{className:`p-6 border-2 ${U.borderColor}`,children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx(U.icon,{className:`h-8 w-8 ${U.textColor}`}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400",children:"Scanner Status"}),n.jsx("div",{className:`text-2xl font-bold ${U.textColor}`,children:U.label})]})]}),n.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[n.jsxs("div",{children:["Last scan: ",n.jsx("span",{className:"text-slate-300",children:R})]}),v.enabled&&v.status!=="complete"&&n.jsxs("div",{children:["Auto-scan: ",n.jsxs("span",{className:"text-slate-300",children:["every ",Q," min"]})]}),v.enabled&&v.status==="complete"&&n.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),n.jsxs(be,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),n.jsxs("span",{className:"text-sm text-slate-400",children:[v.processedItems," / ",v.totalItems," items (",z,"%)"]})]}),n.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:n.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${z===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${z}%`}})})]}),Object.entries(A).map(([q,L])=>n.jsxs(be,{className:"p-6",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:q}),n.jsx("div",{className:"space-y-2",children:L.map(J=>n.jsx(Wy,{item:J},J.hash))})]},q))]})};function Wy({item:c}){const o=c.checked,d=c.processed;return n.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${o?"bg-slate-950/30 border-slate-800/50":d?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[n.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[o?n.jsx(vb,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?n.jsx(ns,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):n.jsx(lb,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("div",{className:`text-sm font-medium truncate ${o?"line-through text-slate-600":"text-slate-200"}`,children:c.title}),c.description&&n.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:c.description})]})]}),n.jsx("div",{className:"flex-shrink-0 ml-3",children:o?n.jsx(ha,{variant:"neutral",children:"Skipped"}):d?n.jsx(ha,{variant:"success",children:c.prdFile||"Processed"}):n.jsx(ha,{variant:"warning",children:"Pending"})})]})}function Py(c){switch(c){case"complete":return{label:"Complete",icon:ns,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Mi,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:ss,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:Kt,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:Kt,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function Iy(c){const o={};for(const d of c){const r=d.section||"General";o[r]||(o[r]=[]),o[r].push(d)}return o}function e1(c){try{const o=new Date(c),r=new Date().getTime()-o.getTime(),m=Math.floor(r/6e4);if(m<1)return"Just now";if(m<60)return`${m} min ago`;const f=Math.floor(m/60);return f<24?`${f} hr ago`:`${Math.floor(f/24)} day(s) ago`}catch{return"Unknown"}}const Hu=[{label:"Every 30 minutes",value:"*/30 * * * *"},{label:"Every hour",value:"0 * * * *"},{label:"Every 3 hours",value:"0 */3 * * *"},{label:"Every 6 hours",value:"0 */6 * * *"},{label:"Every 12 hours",value:"0 */12 * * *"},{label:"Daily at midnight",value:"0 0 * * *"},{label:"Daily at 9 AM",value:"0 9 * * *"},{label:"Weekdays at 9 AM",value:"0 9 * * 1-5"},{label:"Custom",value:"__custom__"}];function du(c){const o=c.trim().split(/\s+/);if(o.length!==5)return c;const[d,r,m,f,h]=o,v=Hu.find(g=>g.value===c);return v?v.label:d==="*/30"&&r==="*"?"Every 30 minutes":d==="0"&&r==="*"?"Every hour":d.startsWith("*/")?`Every ${parseInt(d.replace("*/",""),10)} minutes`:d==="0"&&r.startsWith("*/")?`Every ${parseInt(r.replace("*/",""),10)} hours`:d==="0"&&r!=="*"&&m==="*"&&f==="*"&&h==="*"?`Daily at ${p0(r)}`:d==="0"&&r!=="*"&&m==="*"&&f==="*"&&h==="1-5"?`Weekdays at ${p0(r)}`:c}function p0(c){const o=parseInt(c,10);return o===0?"12 AM":o<12?`${o} AM`:o===12?"12 PM":`${o-12} PM`}function t1(c){const o=Hu.find(d=>d.value===c);return(o==null?void 0:o.value)??"__custom__"}function l1(c){const o=new Date,d=c.getTime()-o.getTime(),r=Math.floor(d/6e4),m=Math.floor(r/60),f=Math.floor(m/24);return r<1?"less than a minute":r<60?`in ${r} minute${r>1?"s":""}`:m<24?`in ${m} hour${m>1?"s":""}`:`in ${f} day${f>1?"s":""}`}function a1(c){const o={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return c.toLocaleDateString("en-US",o)}function n1(c){const o=new Date,d=c.getTime()-o.getTime(),r=Math.floor(d/6e4);return r>=0&&r<30}const s1=()=>{const{addToast:c,selectedProjectId:o,globalModeLoading:d}=rt(),[r,m]=y.useState(!1),[f,h]=y.useState(!1),[v,g]=y.useState({executorSchedule:"",reviewerSchedule:"",isEditing:!1}),{data:p,loading:N,error:w,refetch:D}=ct(J0,[o],{enabled:!d}),{data:z,loading:U,refetch:A}=ct(zu,[o],{enabled:!d});y.useEffect(()=>{const P=setInterval(()=>{D()},3e4);return()=>clearInterval(P)},[D]),y.useEffect(()=>{z&&!v.isEditing&&g({executorSchedule:z.cronSchedule,reviewerSchedule:z.reviewerSchedule,isEditing:!1})},[z,v.isEditing]);const R=async()=>{if(p){m(!0);try{p.paused?(await d0(),c({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await ry(),c({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),D()}catch(P){c({title:"Action Failed",message:P instanceof Error?P.message:"Failed to toggle schedule state",type:"error"})}finally{m(!1)}}},Q=()=>{z&&g({executorSchedule:z.cronSchedule,reviewerSchedule:z.reviewerSchedule,isEditing:!0})},q=()=>{z&&g({executorSchedule:z.cronSchedule,reviewerSchedule:z.reviewerSchedule,isEditing:!1})},L=async()=>{if(z){h(!0);try{await Du({cronSchedule:v.executorSchedule,reviewerSchedule:v.reviewerSchedule}),await d0(),c({title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"}),g(P=>({...P,isEditing:!1})),A(),D()}catch(P){c({title:"Save Failed",message:P instanceof Error?P.message:"Failed to save schedules",type:"error"})}finally{h(!1)}}},J=(P,ue)=>{if(!P)return n.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const xe=new Date(P),$=n1(xe);return n.jsxs("div",{className:"flex items-center space-x-2",children:[$&&n.jsxs("span",{className:"relative flex h-3 w-3",children:[n.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),n.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-green-500"})]}),n.jsxs("div",{className:"text-sm",children:[n.jsx("span",{className:"text-slate-200 font-medium",children:l1(xe)}),n.jsxs("span",{className:"text-slate-500 ml-2",children:["(",a1(xe),")"]})]})]})},B=(P,ue,xe,$)=>{const ie=t1(ue),we=ie==="__custom__";return n.jsxs("div",{className:`space-y-3 ${$?"opacity-50 pointer-events-none":""}`,children:[n.jsx("div",{className:"flex items-center space-x-3",children:n.jsx(Zl,{label:`${P} Preset`,options:Hu,value:ie,onChange:se=>{se!=="__custom__"&&xe(se)},className:"flex-1"})}),we&&n.jsx(Me,{label:"Custom Cron Expression",value:ue,onChange:se=>xe(se.target.value),placeholder:"* * * * *",helperText:"Format: minute hour day month weekday (e.g., 0 */2 * * * for every 2 hours)"}),n.jsxs("div",{className:"text-sm text-slate-400",children:["Human-readable: ",n.jsx("span",{className:"text-slate-200",children:du(ue)})]})]})};if(N||U)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading scheduling information..."})});if(w||!p||!z)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load schedule information"}),n.jsx("div",{className:"text-sm text-slate-500",children:(w==null?void 0:w.message)||"Unknown error"}),n.jsx(re,{onClick:()=>{D(),A()},children:"Retry"})]});const C=p.paused,V=C?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",Z=C?"Paused":"Active";return n.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Scheduling"})}),n.jsx(be,{className:`p-6 border-2 ${V}`,children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx(Mi,{className:"h-8 w-8"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400",children:"Cron Status"}),n.jsx("div",{className:"text-2xl font-bold",children:Z})]})]}),n.jsx(re,{variant:C?"primary":"outline",size:"lg",onClick:R,loading:r,children:C?n.jsxs(n.Fragment,{children:[n.jsx(ss,{className:"h-5 w-5 mr-2"}),"Resume"]}):n.jsxs(n.Fragment,{children:[n.jsx(V0,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs(be,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Executor Schedule"}),!v.isEditing&&n.jsxs(re,{variant:"ghost",size:"sm",onClick:Q,children:[n.jsx(Mb,{className:"h-4 w-4 mr-1"}),"Edit"]})]}),v.isEditing?B("Executor",v.executorSchedule,P=>g(ue=>({...ue,executorSchedule:P}))):n.jsx(n.Fragment,{children:n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),n.jsx("div",{className:"text-lg text-slate-200 font-medium",children:du(z.cronSchedule)}),n.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:z.cronSchedule})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),J(p.executor.nextRun,z.cronSchedule)]}),n.jsxs("div",{className:`flex items-center space-x-2 text-sm ${p.executor.installed?"text-green-400":"text-amber-400"}`,children:[n.jsx(tn,{className:"h-4 w-4"}),n.jsx("span",{children:p.executor.installed?"Installed":"Not installed"})]})]})})]}),n.jsxs(be,{className:`p-6 ${z.reviewerEnabled?"":"opacity-50"}`,children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Reviewer Schedule"}),!z.reviewerEnabled&&n.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"})]}),v.isEditing?B("Reviewer",v.reviewerSchedule,P=>g(ue=>({...ue,reviewerSchedule:P})),!z.reviewerEnabled):n.jsx(n.Fragment,{children:n.jsx("div",{className:"space-y-4",children:z.reviewerEnabled?n.jsxs(n.Fragment,{children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),n.jsx("div",{className:"text-lg text-slate-200 font-medium",children:du(z.reviewerSchedule)}),n.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:z.reviewerSchedule})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),J(p.reviewer.nextRun,z.reviewerSchedule)]}),n.jsxs("div",{className:`flex items-center space-x-2 text-sm ${p.reviewer.installed?"text-green-400":"text-amber-400"}`,children:[n.jsx(tn,{className:"h-4 w-4"}),n.jsx("span",{children:p.reviewer.installed?"Installed":"Not installed"})]})]}):n.jsx("div",{className:"text-slate-500 text-sm",children:"Automated reviews are disabled. Enable them in Settings to configure the reviewer schedule."})})})]})]}),n.jsxs(be,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[n.jsx(Ri,{className:"h-5 w-5 text-slate-400"}),n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),p.entries.length===0?n.jsx("div",{className:"text-slate-500 text-sm",children:"No crontab entries found."}):n.jsx("div",{className:"space-y-2",children:p.entries.map((P,ue)=>n.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:P},ue))})]}),v.isEditing&&n.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-4 border-t border-slate-800",children:[n.jsx(re,{variant:"ghost",onClick:q,children:"Cancel"}),n.jsxs(re,{onClick:L,loading:f,children:[n.jsx(tn,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},i1=({tabs:c,activeTab:o,onChange:d,className:r=""})=>{var g,p;const[m,f]=Qe.useState((g=c[0])==null?void 0:g.id),h=o||m,v=N=>{d?d(N):f(N)};return n.jsxs("div",{className:`flex flex-col ${r}`,children:[n.jsx("div",{className:"border-b border-slate-800 mb-6",children:n.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:c.map(N=>n.jsx("button",{onClick:()=>v(N.id),className:`
471
- whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
472
- ${h===N.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
473
- `,children:N.label},N.id))})}),n.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(p=c.find(N=>N.id===h))==null?void 0:p.content})]})},c1={enabled:!1,botToken:"",channels:{eng:"",prs:"",incidents:"",releases:""},autoCreateProjectChannels:!1,discussionEnabled:!1},g0=c=>({provider:c.provider,defaultBranch:c.defaultBranch,branchPrefix:c.branchPrefix,branchPatterns:c.branchPatterns||[],reviewerEnabled:c.reviewerEnabled,minReviewScore:c.minReviewScore,maxRuntime:c.maxRuntime,reviewerMaxRuntime:c.reviewerMaxRuntime,maxLogSize:c.maxLogSize,cronScheduleOffset:c.cronScheduleOffset??0,maxRetries:c.maxRetries??3,providerEnv:c.providerEnv||{},notifications:c.notifications||{webhooks:[]},prdPriority:c.prdPriority||[],roadmapScanner:c.roadmapScanner||{enabled:!1,roadmapPath:"ROADMAP.md",autoScanInterval:300},templatesDir:c.templatesDir||".night-watch/templates",slack:c.slack??c1}),r1=c=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>c.toUpperCase().includes(d)),u1=({value:c,isSensitive:o})=>{const[d,r]=Qe.useState(!1);return o?n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-sm text-slate-300 font-mono",children:d?c:"••••••••••••"}),n.jsx("button",{type:"button",onClick:()=>r(!d),className:"text-slate-500 hover:text-slate-300",children:d?n.jsx(xu,{className:"h-4 w-4"}):n.jsx(zi,{className:"h-4 w-4"})})]}):n.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:c})},o1=({envVars:c,onChange:o})=>{const[d,r]=Qe.useState(""),[m,f]=Qe.useState(""),[h,v]=Qe.useState(null),[g,p]=Qe.useState(""),N=()=>{if(d.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(d)){alert("Key must be uppercase with underscores (e.g., API_KEY)");return}o({...c,[d]:m}),r(""),f("")}},w=R=>{const Q={...c};delete Q[R],o(Q)},D=R=>{v(R),p(c[R])},z=()=>{h&&(o({...c,[h]:g}),v(null),p(""))},U=()=>{v(null),p("")},A=Object.entries(c);return n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),n.jsx("div",{className:"space-y-2",children:A.length===0?n.jsx("p",{className:"text-slate-500 text-sm italic",children:"No provider environment variables configured."}):A.map(([R,Q])=>n.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[n.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[n.jsx("span",{className:"text-sm font-mono text-indigo-400 w-48 truncate",children:R}),h===R?n.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[n.jsx("input",{type:"text",value:g,onChange:q=>p(q.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),n.jsx("button",{type:"button",onClick:z,className:"p-1 text-green-400 hover:text-green-300",children:n.jsx(tn,{className:"h-4 w-4"})}),n.jsx("button",{type:"button",onClick:U,className:"p-1 text-slate-400 hover:text-slate-300",children:n.jsx(Ft,{className:"h-4 w-4"})})]}):n.jsx(u1,{value:Q,isSensitive:r1(R)})]}),h!==R&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("button",{type:"button",onClick:()=>D(R),className:"p-1 text-slate-400 hover:text-slate-200",children:n.jsx(Ru,{className:"h-4 w-4"})}),n.jsx("button",{type:"button",onClick:()=>w(R),className:"p-1 text-red-400 hover:text-red-300",children:n.jsx(Mu,{className:"h-4 w-4"})})]})]},R))}),n.jsxs("div",{className:"flex items-end gap-3 pt-4 border-t border-slate-800",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),n.jsx("input",{type:"text",value:d,onChange:R=>r(R.target.value.toUpperCase()),placeholder:"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),n.jsx("input",{type:"text",value:m,onChange:R=>f(R.target.value),placeholder:"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),n.jsxs(re,{onClick:N,disabled:!d.trim(),children:[n.jsx(gl,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})},d1=({notifications:c,onChange:o})=>{const[d,r]=Qe.useState(null),[m,f]=Qe.useState(!1),[h,v]=Qe.useState({type:"slack",url:"",events:[]}),g=[{label:"Run Started",value:"run_started"},{label:"Run Succeeded",value:"run_succeeded"},{label:"Run Failed",value:"run_failed"},{label:"Run Timeout",value:"run_timeout"},{label:"Review Completed",value:"review_completed"},{label:"PR Auto-Merged",value:"pr_auto_merged"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],p=()=>{o({webhooks:[...c.webhooks,h]}),v({type:"slack",url:"",events:[]}),f(!1)},N=(U,A)=>{const R=[...c.webhooks];R[U]=A,o({webhooks:R})},w=U=>{o({webhooks:c.webhooks.filter((A,R)=>R!==U)})},D=(U,A)=>U.includes(A)?U.filter(R=>R!==A):[...U,A],z=({webhook:U,onChange:A,onSave:R,onCancel:Q,isNew:q})=>n.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[n.jsx(Zl,{label:"Type",value:U.type,onChange:L=>{const J=L;A(J==="telegram"?{type:J,botToken:"",chatId:"",events:U.events}:{type:J,url:"",events:U.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),U.type==="telegram"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"relative",children:n.jsx(Me,{label:"Bot Token",type:"password",value:U.botToken||"",onChange:L=>A({...U,botToken:L.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),n.jsx(Me,{label:"Chat ID",value:U.chatId||"",onChange:L=>A({...U,chatId:L.target.value}),placeholder:"123456789"})]}):n.jsx("div",{className:"md:col-span-2",children:n.jsx(Me,{label:"Webhook URL",type:"password",value:U.url||"",onChange:L=>A({...U,url:L.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),n.jsx("div",{className:"flex flex-wrap gap-2",children:g.map(L=>n.jsx("button",{type:"button",onClick:()=>A({...U,events:D(U.events,L.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${U.events.includes(L.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:L.label},L.value))})]}),n.jsxs("div",{className:"flex justify-end gap-2",children:[n.jsx(re,{variant:"ghost",onClick:Q,children:"Cancel"}),n.jsx(re,{onClick:R,disabled:U.events.length===0||(U.type==="telegram"?!U.botToken||!U.chatId:!U.url),children:q?"Add Webhook":"Save Changes"})]})]});return n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),n.jsx("div",{className:"space-y-3",children:c.webhooks.length===0?n.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):c.webhooks.map((U,A)=>n.jsx("div",{children:d===A?n.jsx(z,{webhook:U,onChange:R=>N(A,R),onSave:()=>r(null),onCancel:()=>r(null)}):n.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:U.type}),U.type==="telegram"&&n.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",U.chatId]})]}),n.jsx("div",{className:"flex flex-wrap gap-1",children:U.events.map(R=>n.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:R.replace("_"," ")},R))})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("button",{type:"button",onClick:()=>r(A),className:"p-2 text-slate-400 hover:text-slate-200",children:n.jsx(Ru,{className:"h-4 w-4"})}),n.jsx("button",{type:"button",onClick:()=>w(A),className:"p-2 text-red-400 hover:text-red-300",children:n.jsx(Mu,{className:"h-4 w-4"})})]})]})},A))}),m?n.jsx(z,{webhook:h,onChange:v,onSave:p,onCancel:()=>f(!1),isNew:!0}):n.jsxs(re,{variant:"ghost",onClick:()=>f(!0),children:[n.jsx(gl,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},v0=({label:c,value:o,onChange:d,placeholder:r,helpText:m})=>{const[f,h]=Qe.useState(""),v=()=>{f.trim()&&!o.includes(f.trim())&&(d([...o,f.trim()]),h(""))},g=N=>{d(o.filter(w=>w!==N))},p=N=>{N.key==="Enter"&&(N.preventDefault(),v())};return n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:c}),n.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:o.map(N=>n.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[N,n.jsx("button",{type:"button",onClick:()=>g(N),className:"text-slate-500 hover:text-red-400",children:n.jsx(Ft,{className:"h-3 w-3"})})]},N))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{type:"text",value:f,onChange:N=>h(N.target.value),onKeyDown:p,placeholder:r,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),n.jsx(re,{onClick:v,disabled:!f.trim(),children:n.jsx(gl,{className:"h-4 w-4"})})]}),m&&n.jsx("p",{className:"text-xs text-slate-500 mt-1",children:m})]})},f1=()=>{const{addToast:c,projectName:o,selectedProjectId:d,globalModeLoading:r}=rt(),[m,f]=Qe.useState(!1),[h,v]=Qe.useState(null),{data:g,loading:p,error:N,refetch:w}=ct(zu,[d],{enabled:!r}),{data:D,loading:z,refetch:U}=ct(sy,[d],{enabled:!r}),A=D??[];Qe.useEffect(()=>{g&&v(g0(g))},[g]);const R=(B,C)=>{v(V=>V&&{...V,[B]:C})},Q=async()=>{if(h){f(!0);try{await Du({provider:h.provider,defaultBranch:h.defaultBranch,branchPrefix:h.branchPrefix,branchPatterns:h.branchPatterns,reviewerEnabled:h.reviewerEnabled,minReviewScore:h.minReviewScore,maxRuntime:h.maxRuntime,reviewerMaxRuntime:h.reviewerMaxRuntime,maxLogSize:h.maxLogSize,cronScheduleOffset:h.cronScheduleOffset,maxRetries:h.maxRetries,providerEnv:h.providerEnv,notifications:h.notifications,prdPriority:h.prdPriority,roadmapScanner:h.roadmapScanner,templatesDir:h.templatesDir,slack:h.slack}),c({title:"Settings Saved",message:"Configuration updated successfully.",type:"success"}),w(),U()}catch(B){c({title:"Save Failed",message:B instanceof Error?B.message:"Failed to save configuration",type:"error"})}finally{f(!1)}}},q=()=>{g&&(v(g0(g)),c({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"}))},L=async B=>{try{const C=await W0(B);R("roadmapScanner",C.roadmapScanner),c({title:B?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${B?"enabled":"disabled"}.`,type:"success"})}catch(C){c({title:"Toggle Failed",message:C instanceof Error?C.message:"Failed to toggle roadmap scanner",type:"error"})}};if(p||!h)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(N)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load settings"}),n.jsx("div",{className:"text-sm text-slate-500",children:N.message}),n.jsx(re,{onClick:()=>w(),children:"Retry"})]});const J=[{id:"general",label:"General",content:n.jsxs(be,{className:"p-6 space-y-4",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsx(Me,{label:"Project Name",value:o,disabled:!0}),n.jsx(Zl,{label:"Provider",value:h.provider,onChange:B=>R("provider",B),options:[{label:"Anthropic (Claude)",value:"claude"},{label:"OpenAI (Codex)",value:"codex"}]}),n.jsx(Me,{label:"Default Branch",value:h.defaultBranch,onChange:B=>R("defaultBranch",B.target.value)}),n.jsx(Me,{label:"Branch Prefix",value:h.branchPrefix,onChange:B=>R("branchPrefix",B.target.value)}),n.jsx("div",{className:"md:col-span-2",children:n.jsx(ma,{label:"Enable Automated Reviews",checked:h.reviewerEnabled,onChange:B=>R("reviewerEnabled",B)})})]})]})},{id:"runtime",label:"Runtime",content:n.jsxs(be,{className:"p-6 space-y-6",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx("input",{type:"range",min:"0",max:"100",value:h.minReviewScore,onChange:B=>R("minReviewScore",Number(B.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),n.jsx("span",{className:"text-sm font-bold text-slate-200 w-10",children:h.minReviewScore})]}),n.jsx("p",{className:"text-xs text-slate-500 mt-1",children:'PRs below this score will be marked as "Needs Work".'})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsx(Me,{label:"Max Runtime (Executor)",type:"number",value:String(h.maxRuntime),onChange:B=>R("maxRuntime",Number(B.target.value||0)),rightIcon:n.jsx("span",{className:"text-xs",children:"sec"})}),n.jsx(Me,{label:"Max Runtime (Reviewer)",type:"number",value:String(h.reviewerMaxRuntime),onChange:B=>R("reviewerMaxRuntime",Number(B.target.value||0)),rightIcon:n.jsx("span",{className:"text-xs",children:"sec"})}),n.jsx(Me,{label:"Max Log Size",type:"number",value:String(h.maxLogSize),onChange:B=>R("maxLogSize",Number(B.target.value||0)),rightIcon:n.jsx("span",{className:"text-xs",children:"bytes"})})]})]})},{id:"env",label:"Provider Env",content:n.jsxs(be,{className:"p-6",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Provider Environment Variables"}),n.jsx(o1,{envVars:h.providerEnv,onChange:B=>R("providerEnv",B)})]})},{id:"notifications",label:"Notifications",content:n.jsxs(be,{className:"p-6",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),n.jsx(d1,{notifications:h.notifications,onChange:B=>R("notifications",B)})]})},{id:"slack",label:"Slack Bot",content:n.jsxs(be,{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Slack Bot Integration"}),n.jsx("p",{className:"text-sm text-slate-400",children:"Post notifications as agent personas using the Slack Bot API"})]}),n.jsx(ma,{checked:h.slack.enabled,onChange:B=>R("slack",{...h.slack,enabled:B})})]}),n.jsx("div",{className:"grid grid-cols-1 gap-6 pt-4 border-t border-slate-800",children:n.jsx("div",{className:"relative",children:n.jsx(Me,{label:"Bot Token (xoxb-...)",type:"password",value:h.slack.botToken,onChange:B=>R("slack",{...h.slack,botToken:B.target.value}),placeholder:"xoxb-...",helperText:"OAuth Bot Token from your Slack App settings"})})}),n.jsxs("div",{className:"space-y-4 pt-4 border-t border-slate-800",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("h4",{className:"text-sm font-medium text-slate-300",children:"Channel IDs"}),n.jsx("button",{type:"button",className:"px-3 py-1.5 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 hover:text-slate-200 transition-colors",onClick:()=>{alert("Coming soon: will list workspace channels")},children:"Detect Channels"})]}),n.jsx("p",{className:"text-xs text-slate-500",children:"Enter the Slack channel IDs (e.g. C01ABCDEF) where agent messages will be posted."}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[n.jsx(Me,{label:"#eng Channel ID",value:h.slack.channels.eng,onChange:B=>R("slack",{...h.slack,channels:{...h.slack.channels,eng:B.target.value}}),placeholder:"C01ABCDEF"}),n.jsx(Me,{label:"#prs Channel ID",value:h.slack.channels.prs,onChange:B=>R("slack",{...h.slack,channels:{...h.slack.channels,prs:B.target.value}}),placeholder:"C01ABCDEF"}),n.jsx(Me,{label:"#incidents Channel ID",value:h.slack.channels.incidents,onChange:B=>R("slack",{...h.slack,channels:{...h.slack.channels,incidents:B.target.value}}),placeholder:"C01ABCDEF"}),n.jsx(Me,{label:"#releases Channel ID",value:h.slack.channels.releases,onChange:B=>R("slack",{...h.slack,channels:{...h.slack.channels,releases:B.target.value}}),placeholder:"C01ABCDEF"})]})]}),n.jsxs("div",{className:"space-y-4 pt-4 border-t border-slate-800",children:[n.jsx("h4",{className:"text-sm font-medium text-slate-300",children:"Options"}),n.jsx(ma,{label:"Auto-create project channels",checked:h.slack.autoCreateProjectChannels,onChange:B=>R("slack",{...h.slack,autoCreateProjectChannels:B})}),n.jsx(ma,{label:"Enable agent deliberation",checked:h.slack.discussionEnabled,onChange:B=>R("slack",{...h.slack,discussionEnabled:B})})]})]})},{id:"roadmap",label:"Roadmap",content:n.jsxs(be,{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Roadmap Scanner"}),n.jsx("p",{className:"text-sm text-slate-400",children:"Automatically scan ROADMAP.md and generate PRDs for unchecked items"})]}),n.jsx(ma,{checked:h.roadmapScanner.enabled,onChange:L})]}),h.roadmapScanner.enabled&&n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[n.jsx(Me,{label:"Roadmap Path",value:h.roadmapScanner.roadmapPath,onChange:B=>R("roadmapScanner",{...h.roadmapScanner,roadmapPath:B.target.value})}),n.jsx(Me,{label:"Auto Scan Interval",type:"number",value:String(h.roadmapScanner.autoScanInterval),onChange:B=>R("roadmapScanner",{...h.roadmapScanner,autoScanInterval:Math.max(30,Number(B.target.value||30))}),rightIcon:n.jsx("span",{className:"text-xs",children:"sec (min 30)"})})]})]})},{id:"advanced",label:"Advanced",content:n.jsxs(be,{className:"p-6 space-y-6",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),n.jsx("p",{className:"text-sm text-slate-400",children:"Less commonly used configuration options"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsx(Me,{label:"Templates Directory",value:h.templatesDir,onChange:B=>R("templatesDir",B.target.value),helperText:"Directory for custom template overrides"}),n.jsx(Me,{label:"Cron Schedule Offset",type:"number",min:"0",max:"59",value:String(h.cronScheduleOffset),onChange:B=>{const C=Math.min(59,Math.max(0,Number(B.target.value||0)));R("cronScheduleOffset",C)},helperText:"Minutes offset (0-59) for cron schedules"}),n.jsx(Me,{label:"Max Retries",type:"number",min:"1",value:String(h.maxRetries),onChange:B=>{const C=Math.max(1,Number(B.target.value||1));R("maxRetries",C)},helperText:"Retry attempts for rate-limited API calls"})]}),n.jsxs("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:[n.jsx(v0,{label:"Branch Patterns",value:h.branchPatterns,onChange:B=>R("branchPatterns",B),placeholder:"e.g., feat/",helpText:"Patterns to match for PR reviews"}),n.jsx(v0,{label:"PRD Priority",value:h.prdPriority,onChange:B=>R("prdPriority",B),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})]})]})}];return n.jsxs("div",{className:"max-w-4xl mx-auto pb-10",children:[n.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-6",children:"Settings"}),n.jsx(i1,{tabs:J}),n.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[n.jsxs(re,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:q,children:[n.jsx(Di,{className:"h-4 w-4 mr-2"}),"Reset"]}),n.jsxs(re,{onClick:Q,loading:m,children:[n.jsx(Cb,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),n.jsxs("div",{className:"mt-12",children:[n.jsxs("h3",{className:"text-lg font-bold text-slate-200 mb-4 flex items-center",children:[n.jsx(q0,{className:"h-5 w-5 mr-2 text-indigo-500"}),"System Health"]}),n.jsx(be,{className:"divide-y divide-slate-800",children:z?n.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):A.map((B,C)=>{const V=B.status==="pass",Z=B.status==="warn",P=V?"bg-green-500/10 text-green-400 border-green-500/20":Z?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return n.jsxs("div",{className:"p-4 flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-200",children:B.name}),n.jsx("p",{className:"text-xs text-slate-500",children:B.detail})]}),n.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${P}`,children:B.status.toUpperCase()})]},`${B.name}-${C}`)})})]})]})},m1=()=>(Ty(),n.jsx(ev,{children:n.jsxs("div",{className:"flex h-screen bg-[#030712] text-slate-300 overflow-hidden relative",children:[n.jsx("div",{className:"absolute top-0 left-0 w-full h-96 bg-indigo-900/10 rounded-full blur-[120px] -translate-y-1/2 pointer-events-none z-0"}),n.jsx(wy,{}),n.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[n.jsx(Cy,{}),n.jsx("main",{className:"flex-1 overflow-auto p-6 scroll-smooth relative",children:n.jsx("div",{className:"max-w-7xl mx-auto w-full",children:n.jsxs(_g,{children:[n.jsx(Lt,{path:"/",element:n.jsx(Vy,{})}),n.jsx(Lt,{path:"/prds",element:n.jsx(Ky,{})}),n.jsx(Lt,{path:"/prs",element:n.jsx(Jy,{})}),n.jsx(Lt,{path:"/board",element:n.jsx(Gy,{})}),n.jsx(Lt,{path:"/scheduling",element:n.jsx(s1,{})}),n.jsx(Lt,{path:"/logs",element:n.jsx(Zy,{})}),n.jsx(Lt,{path:"/roadmap",element:n.jsx(Fy,{})}),n.jsx(Lt,{path:"/integrations",element:n.jsx(Xy,{})}),n.jsx(Lt,{path:"/agents",element:n.jsx(Hy,{})}),n.jsx(Lt,{path:"/settings",element:n.jsx(f1,{})}),n.jsx(Lt,{path:"*",element:n.jsx(Tg,{to:"/",replace:!0})})]})})})]}),n.jsx(Ay,{})]})})),I0=document.getElementById("root");if(!I0)throw new Error("Could not find root element to mount to");const h1=zp.createRoot(I0);h1.render(n.jsx(Qe.StrictMode,{children:n.jsx(m1,{})}));