@xtandard/permissions 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (375) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +362 -2
  3. package/bin/xtandard-permissions.mjs +3 -0
  4. package/dist/better-auth-Bp9YVyQa.d.cts +56 -0
  5. package/dist/better-auth-DHyW5-yt.cjs +91 -0
  6. package/dist/better-auth-DHyW5-yt.cjs.map +1 -0
  7. package/dist/better-auth-NO40ZqSM.mjs +74 -0
  8. package/dist/better-auth-NO40ZqSM.mjs.map +1 -0
  9. package/dist/better-auth-NSXgt6ZU.d.mts +56 -0
  10. package/dist/catalog-DA_d1SdC.d.cts +153 -0
  11. package/dist/catalog-DJcJ3ycq.d.mts +153 -0
  12. package/dist/catalog.cjs +198 -0
  13. package/dist/catalog.cjs.map +1 -0
  14. package/dist/catalog.d.cts +3 -0
  15. package/dist/catalog.d.mts +3 -0
  16. package/dist/catalog.mjs +141 -0
  17. package/dist/catalog.mjs.map +1 -0
  18. package/dist/chunk-DakpK96I.cjs +43 -0
  19. package/dist/cli.cjs +548 -0
  20. package/dist/cli.cjs.map +1 -0
  21. package/dist/cli.d.cts +28 -0
  22. package/dist/cli.d.mts +28 -0
  23. package/dist/cli.mjs +544 -0
  24. package/dist/cli.mjs.map +1 -0
  25. package/dist/contract-BMiOmg2f.d.cts +50 -0
  26. package/dist/contract-Bpy8yPrS.cjs +70 -0
  27. package/dist/contract-Bpy8yPrS.cjs.map +1 -0
  28. package/dist/contract-CNgMXr2u.d.cts +46 -0
  29. package/dist/contract-CNgMXr2u.d.mts +46 -0
  30. package/dist/contract-CPmJVoRx.cjs +70 -0
  31. package/dist/contract-CPmJVoRx.cjs.map +1 -0
  32. package/dist/contract-D32H1t0u.d.mts +50 -0
  33. package/dist/contract-DTdTXZtJ.mjs +47 -0
  34. package/dist/contract-DTdTXZtJ.mjs.map +1 -0
  35. package/dist/contract-DUzgB-He.d.mts +375 -0
  36. package/dist/contract-Dk6d2ylD.d.cts +375 -0
  37. package/dist/contract-RMkmERhT.d.cts +2 -0
  38. package/dist/contract-RMkmERhT.d.mts +2 -0
  39. package/dist/contract-Yc5AZuvv.mjs +47 -0
  40. package/dist/contract-Yc5AZuvv.mjs.map +1 -0
  41. package/dist/create-fetch-handler-BHDU4chu.d.mts +77 -0
  42. package/dist/create-fetch-handler-BtX64_rS.d.cts +77 -0
  43. package/dist/create-fetch-handler-C-WyaRCR.cjs +653 -0
  44. package/dist/create-fetch-handler-C-WyaRCR.cjs.map +1 -0
  45. package/dist/create-fetch-handler-ojjpk1Iw.mjs +636 -0
  46. package/dist/create-fetch-handler-ojjpk1Iw.mjs.map +1 -0
  47. package/dist/elysia-shared-BM6cPoCU.mjs +78 -0
  48. package/dist/elysia-shared-BM6cPoCU.mjs.map +1 -0
  49. package/dist/elysia-shared-BUTFTeal.cjs +101 -0
  50. package/dist/elysia-shared-BUTFTeal.cjs.map +1 -0
  51. package/dist/elysia-shared-DtKViycb.d.cts +58 -0
  52. package/dist/elysia-shared-g8zsb_pU.d.mts +58 -0
  53. package/dist/engine-Bufv0TbD.mjs +574 -0
  54. package/dist/engine-Bufv0TbD.mjs.map +1 -0
  55. package/dist/engine-CGGVDCqi.d.cts +296 -0
  56. package/dist/engine-DpFIcbgh.d.mts +296 -0
  57. package/dist/engine-bMoz3iW-.cjs +587 -0
  58. package/dist/engine-bMoz3iW-.cjs.map +1 -0
  59. package/dist/entry-auth-basic.cjs +40 -0
  60. package/dist/entry-auth-basic.cjs.map +1 -0
  61. package/dist/entry-auth-basic.d.cts +24 -0
  62. package/dist/entry-auth-basic.d.mts +24 -0
  63. package/dist/entry-auth-basic.mjs +26 -0
  64. package/dist/entry-auth-basic.mjs.map +1 -0
  65. package/dist/entry-auth-better-auth.cjs +12 -0
  66. package/dist/entry-auth-better-auth.d.cts +5 -0
  67. package/dist/entry-auth-better-auth.d.mts +5 -0
  68. package/dist/entry-auth-better-auth.mjs +4 -0
  69. package/dist/entry-auth-delegated.cjs +8 -0
  70. package/dist/entry-auth-delegated.d.cts +2 -0
  71. package/dist/entry-auth-delegated.d.mts +2 -0
  72. package/dist/entry-auth-delegated.mjs +2 -0
  73. package/dist/entry-auth-jwt.cjs +116 -0
  74. package/dist/entry-auth-jwt.cjs.map +1 -0
  75. package/dist/entry-auth-jwt.d.cts +65 -0
  76. package/dist/entry-auth-jwt.d.mts +65 -0
  77. package/dist/entry-auth-jwt.mjs +108 -0
  78. package/dist/entry-auth-jwt.mjs.map +1 -0
  79. package/dist/entry-auth-none.cjs +14 -0
  80. package/dist/entry-auth-none.d.cts +2 -0
  81. package/dist/entry-auth-none.d.mts +2 -0
  82. package/dist/entry-auth-none.mjs +2 -0
  83. package/dist/entry-auth-session.cjs +82 -0
  84. package/dist/entry-auth-session.cjs.map +1 -0
  85. package/dist/entry-auth-session.d.cts +20 -0
  86. package/dist/entry-auth-session.d.mts +20 -0
  87. package/dist/entry-auth-session.mjs +75 -0
  88. package/dist/entry-auth-session.mjs.map +1 -0
  89. package/dist/entry-authorization-delegated.cjs +31 -0
  90. package/dist/entry-authorization-delegated.cjs.map +1 -0
  91. package/dist/entry-authorization-delegated.d.cts +27 -0
  92. package/dist/entry-authorization-delegated.d.mts +27 -0
  93. package/dist/entry-authorization-delegated.mjs +30 -0
  94. package/dist/entry-authorization-delegated.mjs.map +1 -0
  95. package/dist/entry-authorization-none.cjs +29 -0
  96. package/dist/entry-authorization-none.cjs.map +1 -0
  97. package/dist/entry-authorization-none.d.cts +17 -0
  98. package/dist/entry-authorization-none.d.mts +17 -0
  99. package/dist/entry-authorization-none.mjs +28 -0
  100. package/dist/entry-authorization-none.mjs.map +1 -0
  101. package/dist/entry-authorization-permissions.cjs +4 -0
  102. package/dist/entry-authorization-permissions.d.cts +49 -0
  103. package/dist/entry-authorization-permissions.d.mts +49 -0
  104. package/dist/entry-authorization-permissions.mjs +2 -0
  105. package/dist/entry-authorization-roles.cjs +9 -0
  106. package/dist/entry-authorization-roles.d.cts +37 -0
  107. package/dist/entry-authorization-roles.d.mts +37 -0
  108. package/dist/entry-authorization-roles.mjs +3 -0
  109. package/dist/entry-better-auth-client.cjs +31 -0
  110. package/dist/entry-better-auth-client.cjs.map +1 -0
  111. package/dist/entry-better-auth-client.d.cts +63 -0
  112. package/dist/entry-better-auth-client.d.mts +63 -0
  113. package/dist/entry-better-auth-client.mjs +29 -0
  114. package/dist/entry-better-auth-client.mjs.map +1 -0
  115. package/dist/entry-better-auth.cjs +289 -0
  116. package/dist/entry-better-auth.cjs.map +1 -0
  117. package/dist/entry-better-auth.d.cts +3 -0
  118. package/dist/entry-better-auth.d.mts +3 -0
  119. package/dist/entry-better-auth.mjs +284 -0
  120. package/dist/entry-better-auth.mjs.map +1 -0
  121. package/dist/entry-bridges-audit.cjs +106 -0
  122. package/dist/entry-bridges-audit.cjs.map +1 -0
  123. package/dist/entry-bridges-audit.d.cts +58 -0
  124. package/dist/entry-bridges-audit.d.mts +58 -0
  125. package/dist/entry-bridges-audit.mjs +105 -0
  126. package/dist/entry-bridges-audit.mjs.map +1 -0
  127. package/dist/entry-bridges-webhooks.cjs +90 -0
  128. package/dist/entry-bridges-webhooks.cjs.map +1 -0
  129. package/dist/entry-bridges-webhooks.d.cts +46 -0
  130. package/dist/entry-bridges-webhooks.d.mts +46 -0
  131. package/dist/entry-bridges-webhooks.mjs +88 -0
  132. package/dist/entry-bridges-webhooks.mjs.map +1 -0
  133. package/dist/entry-bun.cjs +33 -0
  134. package/dist/entry-bun.cjs.map +1 -0
  135. package/dist/entry-bun.d.cts +31 -0
  136. package/dist/entry-bun.d.mts +31 -0
  137. package/dist/entry-bun.mjs +30 -0
  138. package/dist/entry-bun.mjs.map +1 -0
  139. package/dist/entry-drizzle-mysql.cjs +34 -0
  140. package/dist/entry-drizzle-mysql.cjs.map +1 -0
  141. package/dist/entry-drizzle-mysql.d.cts +20 -0
  142. package/dist/entry-drizzle-mysql.d.mts +20 -0
  143. package/dist/entry-drizzle-mysql.mjs +33 -0
  144. package/dist/entry-drizzle-mysql.mjs.map +1 -0
  145. package/dist/entry-drizzle-pg.cjs +44 -0
  146. package/dist/entry-drizzle-pg.cjs.map +1 -0
  147. package/dist/entry-drizzle-pg.d.cts +20 -0
  148. package/dist/entry-drizzle-pg.d.mts +20 -0
  149. package/dist/entry-drizzle-pg.mjs +43 -0
  150. package/dist/entry-drizzle-pg.mjs.map +1 -0
  151. package/dist/entry-drizzle-sqlite.cjs +34 -0
  152. package/dist/entry-drizzle-sqlite.cjs.map +1 -0
  153. package/dist/entry-drizzle-sqlite.d.cts +15 -0
  154. package/dist/entry-drizzle-sqlite.d.mts +15 -0
  155. package/dist/entry-drizzle-sqlite.mjs +33 -0
  156. package/dist/entry-drizzle-sqlite.mjs.map +1 -0
  157. package/dist/entry-elysia.cjs +117 -0
  158. package/dist/entry-elysia.cjs.map +1 -0
  159. package/dist/entry-elysia.d.cts +446 -0
  160. package/dist/entry-elysia.d.mts +446 -0
  161. package/dist/entry-elysia.mjs +113 -0
  162. package/dist/entry-elysia.mjs.map +1 -0
  163. package/dist/entry-elysia2.cjs +117 -0
  164. package/dist/entry-elysia2.cjs.map +1 -0
  165. package/dist/entry-elysia2.d.cts +571 -0
  166. package/dist/entry-elysia2.d.mts +571 -0
  167. package/dist/entry-elysia2.mjs +113 -0
  168. package/dist/entry-elysia2.mjs.map +1 -0
  169. package/dist/entry-express.cjs +101 -0
  170. package/dist/entry-express.cjs.map +1 -0
  171. package/dist/entry-express.d.cts +36 -0
  172. package/dist/entry-express.d.mts +36 -0
  173. package/dist/entry-express.mjs +97 -0
  174. package/dist/entry-express.mjs.map +1 -0
  175. package/dist/entry-hono.cjs +63 -0
  176. package/dist/entry-hono.cjs.map +1 -0
  177. package/dist/entry-hono.d.cts +40 -0
  178. package/dist/entry-hono.d.mts +40 -0
  179. package/dist/entry-hono.mjs +60 -0
  180. package/dist/entry-hono.mjs.map +1 -0
  181. package/dist/entry-hooks-log.cjs +39 -0
  182. package/dist/entry-hooks-log.cjs.map +1 -0
  183. package/dist/entry-hooks-log.d.cts +19 -0
  184. package/dist/entry-hooks-log.d.mts +19 -0
  185. package/dist/entry-hooks-log.mjs +36 -0
  186. package/dist/entry-hooks-log.mjs.map +1 -0
  187. package/dist/entry-next.cjs +67 -0
  188. package/dist/entry-next.cjs.map +1 -0
  189. package/dist/entry-next.d.cts +60 -0
  190. package/dist/entry-next.d.mts +60 -0
  191. package/dist/entry-next.mjs +57 -0
  192. package/dist/entry-next.mjs.map +1 -0
  193. package/dist/entry-react.cjs +401 -0
  194. package/dist/entry-react.cjs.map +1 -0
  195. package/dist/entry-react.d.cts +206 -0
  196. package/dist/entry-react.d.mts +206 -0
  197. package/dist/entry-react.mjs +388 -0
  198. package/dist/entry-react.mjs.map +1 -0
  199. package/dist/entry-storage-cloudflare-kv.cjs +8 -0
  200. package/dist/entry-storage-cloudflare-kv.d.cts +2 -0
  201. package/dist/entry-storage-cloudflare-kv.d.mts +2 -0
  202. package/dist/entry-storage-cloudflare-kv.mjs +2 -0
  203. package/dist/entry-storage-drizzle.cjs +71 -0
  204. package/dist/entry-storage-drizzle.cjs.map +1 -0
  205. package/dist/entry-storage-drizzle.d.cts +27 -0
  206. package/dist/entry-storage-drizzle.d.mts +27 -0
  207. package/dist/entry-storage-drizzle.mjs +68 -0
  208. package/dist/entry-storage-drizzle.mjs.map +1 -0
  209. package/dist/entry-storage-file.cjs +54 -0
  210. package/dist/entry-storage-file.cjs.map +1 -0
  211. package/dist/entry-storage-file.d.cts +24 -0
  212. package/dist/entry-storage-file.d.mts +24 -0
  213. package/dist/entry-storage-file.mjs +46 -0
  214. package/dist/entry-storage-file.mjs.map +1 -0
  215. package/dist/entry-storage-libsql.cjs +64 -0
  216. package/dist/entry-storage-libsql.cjs.map +1 -0
  217. package/dist/entry-storage-libsql.d.cts +28 -0
  218. package/dist/entry-storage-libsql.d.mts +28 -0
  219. package/dist/entry-storage-libsql.mjs +61 -0
  220. package/dist/entry-storage-libsql.mjs.map +1 -0
  221. package/dist/entry-storage-memory.cjs +3 -0
  222. package/dist/entry-storage-memory.d.cts +25 -0
  223. package/dist/entry-storage-memory.d.mts +25 -0
  224. package/dist/entry-storage-memory.mjs +2 -0
  225. package/dist/entry-storage-mongodb.cjs +61 -0
  226. package/dist/entry-storage-mongodb.cjs.map +1 -0
  227. package/dist/entry-storage-mongodb.d.cts +25 -0
  228. package/dist/entry-storage-mongodb.d.mts +25 -0
  229. package/dist/entry-storage-mongodb.mjs +58 -0
  230. package/dist/entry-storage-mongodb.mjs.map +1 -0
  231. package/dist/entry-storage-postgres.cjs +62 -0
  232. package/dist/entry-storage-postgres.cjs.map +1 -0
  233. package/dist/entry-storage-postgres.d.cts +29 -0
  234. package/dist/entry-storage-postgres.d.mts +29 -0
  235. package/dist/entry-storage-postgres.mjs +58 -0
  236. package/dist/entry-storage-postgres.mjs.map +1 -0
  237. package/dist/entry-storage-redis.cjs +76 -0
  238. package/dist/entry-storage-redis.cjs.map +1 -0
  239. package/dist/entry-storage-redis.d.cts +29 -0
  240. package/dist/entry-storage-redis.d.mts +29 -0
  241. package/dist/entry-storage-redis.mjs +72 -0
  242. package/dist/entry-storage-redis.mjs.map +1 -0
  243. package/dist/entry-storage-sqlite.cjs +46 -0
  244. package/dist/entry-storage-sqlite.cjs.map +1 -0
  245. package/dist/entry-storage-sqlite.d.cts +22 -0
  246. package/dist/entry-storage-sqlite.d.mts +22 -0
  247. package/dist/entry-storage-sqlite.mjs +43 -0
  248. package/dist/entry-storage-sqlite.mjs.map +1 -0
  249. package/dist/entry-storage-unstorage.cjs +8 -0
  250. package/dist/entry-storage-unstorage.d.cts +2 -0
  251. package/dist/entry-storage-unstorage.d.mts +2 -0
  252. package/dist/entry-storage-unstorage.mjs +2 -0
  253. package/dist/error-codes-9MRMSSMQ.cjs +49 -0
  254. package/dist/error-codes-9MRMSSMQ.cjs.map +1 -0
  255. package/dist/error-codes-CCKuDDu7.mjs +44 -0
  256. package/dist/error-codes-CCKuDDu7.mjs.map +1 -0
  257. package/dist/errors-bL3XQLfE.mjs +54 -0
  258. package/dist/errors-bL3XQLfE.mjs.map +1 -0
  259. package/dist/errors-vVYic8gz.cjs +89 -0
  260. package/dist/errors-vVYic8gz.cjs.map +1 -0
  261. package/dist/events-AE4Ytqmz.d.cts +6 -0
  262. package/dist/events-AE4Ytqmz.d.mts +6 -0
  263. package/dist/events-DYZShrYB.mjs +15 -0
  264. package/dist/events-DYZShrYB.mjs.map +1 -0
  265. package/dist/events-FJ2K0wly.cjs +26 -0
  266. package/dist/events-FJ2K0wly.cjs.map +1 -0
  267. package/dist/guard-BOx5cnMP.mjs +141 -0
  268. package/dist/guard-BOx5cnMP.mjs.map +1 -0
  269. package/dist/guard-C3o7V14m.d.cts +62 -0
  270. package/dist/guard-DCbTnqPz.d.mts +62 -0
  271. package/dist/guard-nwdOYe90.cjs +188 -0
  272. package/dist/guard-nwdOYe90.cjs.map +1 -0
  273. package/dist/index-BVVgDSdq.d.cts +1 -0
  274. package/dist/index-BVVgDSdq.d.mts +1 -0
  275. package/dist/index.cjs +240 -0
  276. package/dist/index.cjs.map +1 -0
  277. package/dist/index.d.cts +195 -0
  278. package/dist/index.d.mts +195 -0
  279. package/dist/index.mjs +60 -0
  280. package/dist/index.mjs.map +1 -0
  281. package/dist/kit-C7tepDB2.cjs +76 -0
  282. package/dist/kit-C7tepDB2.cjs.map +1 -0
  283. package/dist/kit-DMVBLBI9.d.mts +57 -0
  284. package/dist/kit-fzXHYb1l.mjs +65 -0
  285. package/dist/kit-fzXHYb1l.mjs.map +1 -0
  286. package/dist/kit-qAROuhOI.d.cts +57 -0
  287. package/dist/memory-BbBbbY8-.mjs +32 -0
  288. package/dist/memory-BbBbbY8-.mjs.map +1 -0
  289. package/dist/memory-knijqKw_.cjs +39 -0
  290. package/dist/memory-knijqKw_.cjs.map +1 -0
  291. package/dist/permissions-C9PjftY6.mjs +59 -0
  292. package/dist/permissions-C9PjftY6.mjs.map +1 -0
  293. package/dist/permissions-Cxri_P_k.cjs +70 -0
  294. package/dist/permissions-Cxri_P_k.cjs.map +1 -0
  295. package/dist/policy-BQmlo2lu.mjs +3 -0
  296. package/dist/policy-CGA6QD0a.d.mts +4 -0
  297. package/dist/policy-DFq_SYR3.d.cts +4 -0
  298. package/dist/react-embed.js +18710 -0
  299. package/dist/react.css +1 -0
  300. package/dist/relationships-BLYEJ9tc.cjs +907 -0
  301. package/dist/relationships-BLYEJ9tc.cjs.map +1 -0
  302. package/dist/relationships-BfLonEMI.mjs +756 -0
  303. package/dist/relationships-BfLonEMI.mjs.map +1 -0
  304. package/dist/roles-DBk4i8b5.mjs +69 -0
  305. package/dist/roles-DBk4i8b5.mjs.map +1 -0
  306. package/dist/roles-a8B5uZ35.cjs +104 -0
  307. package/dist/roles-a8B5uZ35.cjs.map +1 -0
  308. package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
  309. package/dist/routes-DtRb3EO0.mjs +1001 -0
  310. package/dist/routes-DtRb3EO0.mjs.map +1 -0
  311. package/dist/routes-irNuuZqo.cjs +1049 -0
  312. package/dist/routes-irNuuZqo.cjs.map +1 -0
  313. package/dist/server-C2F4H6bR.d.cts +886 -0
  314. package/dist/server-CJ7AIJpO.d.mts +886 -0
  315. package/dist/table-DA98mVVT.d.cts +2 -0
  316. package/dist/table-DA98mVVT.d.mts +2 -0
  317. package/dist/testing.cjs +59 -0
  318. package/dist/testing.cjs.map +1 -0
  319. package/dist/testing.d.cts +37 -0
  320. package/dist/testing.d.mts +37 -0
  321. package/dist/testing.mjs +57 -0
  322. package/dist/testing.mjs.map +1 -0
  323. package/dist/types-elysia2/adapters/elysia-shared.d.ts +71 -0
  324. package/dist/types-elysia2/adapters/elysia2.d.ts +432 -0
  325. package/dist/types-elysia2/adapters/guard.d.ts +140 -0
  326. package/dist/types-elysia2/auth/contract.d.ts +9 -0
  327. package/dist/types-elysia2/auth-provider/contract.d.ts +57 -0
  328. package/dist/types-elysia2/auth-provider/kit.d.ts +57 -0
  329. package/dist/types-elysia2/authorization/contract.d.ts +53 -0
  330. package/dist/types-elysia2/authorization/permissions.d.ts +54 -0
  331. package/dist/types-elysia2/catalog.d.ts +197 -0
  332. package/dist/types-elysia2/engine.d.ts +192 -0
  333. package/dist/types-elysia2/entry-elysia2.d.ts +9 -0
  334. package/dist/types-elysia2/errors.d.ts +47 -0
  335. package/dist/types-elysia2/hooks/contract.d.ts +100 -0
  336. package/dist/types-elysia2/keys.d.ts +78 -0
  337. package/dist/types-elysia2/policy.d.ts +13 -0
  338. package/dist/types-elysia2/relationships.d.ts +162 -0
  339. package/dist/types-elysia2/schema.d.ts +299 -0
  340. package/dist/types-elysia2/server/cors.d.ts +8 -0
  341. package/dist/types-elysia2/server/create-fetch-handler.d.ts +87 -0
  342. package/dist/types-elysia2/server/openapi.d.ts +29 -0
  343. package/dist/types-elysia2/server/routes.d.ts +132 -0
  344. package/dist/types-elysia2/server/validation.d.ts +205 -0
  345. package/dist/types-elysia2/storage/contract.d.ts +18 -0
  346. package/dist/types-react/catalog.d.ts +197 -0
  347. package/dist/types-react/engine.d.ts +192 -0
  348. package/dist/types-react/entry-react-embed.d.ts +20 -0
  349. package/dist/types-react/errors.d.ts +47 -0
  350. package/dist/types-react/hooks/contract.d.ts +100 -0
  351. package/dist/types-react/keys.d.ts +78 -0
  352. package/dist/types-react/policy.d.ts +13 -0
  353. package/dist/types-react/react-embed.d.ts +37 -0
  354. package/dist/types-react/relationships.d.ts +162 -0
  355. package/dist/types-react/schema.d.ts +299 -0
  356. package/dist/types-react/storage/contract.d.ts +18 -0
  357. package/dist/types-react/ui/App.d.ts +23 -0
  358. package/dist/types-react/ui/api.d.ts +73 -0
  359. package/dist/types-react/ui/components/perm-bits.d.ts +64 -0
  360. package/dist/types-react/ui/lib/queries.d.ts +46 -0
  361. package/dist/types-react/ui/theme.d.ts +10 -0
  362. package/dist/types-react/ui/types.d.ts +109 -0
  363. package/dist/types-react/ui/views/CatalogView.d.ts +3 -0
  364. package/dist/types-react/ui/views/HistoryView.d.ts +6 -0
  365. package/dist/types-react/ui/views/PlaygroundView.d.ts +14 -0
  366. package/dist/types-react/ui/views/RelationshipsView.d.ts +6 -0
  367. package/dist/types-react/ui/views/SubjectDetailView.d.ts +7 -0
  368. package/dist/types-react/ui/views/SubjectsView.d.ts +6 -0
  369. package/dist/ui/apple-touch-icon.png +0 -0
  370. package/dist/ui/assets/index-DCPZRo-Z.css +1 -0
  371. package/dist/ui/assets/index-uXGOtyuj.js +104 -0
  372. package/dist/ui/favicon.ico +0 -0
  373. package/dist/ui/favicon.svg +15 -0
  374. package/dist/ui/index.html +20 -0
  375. package/package.json +587 -4
@@ -0,0 +1,104 @@
1
+ var MT=Object.defineProperty;var s0=n=>{throw TypeError(n)};var zT=(n,i,r)=>i in n?MT(n,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[i]=r;var Nt=(n,i,r)=>zT(n,typeof i!="symbol"?i+"":i,r),lg=(n,i,r)=>i.has(n)||s0("Cannot "+r);var U=(n,i,r)=>(lg(n,i,"read from private field"),r?r.call(n):i.get(n)),Ge=(n,i,r)=>i.has(n)?s0("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,r),Ae=(n,i,r,a)=>(lg(n,i,"write to private field"),a?a.call(n,r):i.set(n,r),r),rt=(n,i,r)=>(lg(n,i,"access private method"),r);var Cf=(n,i,r,a)=>({set _(c){Ae(n,i,c,r)},get _(){return U(n,i,a)}});function DT(n,i){for(var r=0;r<i.length;r++){const a=i[r];if(typeof a!="string"&&!Array.isArray(a)){for(const c in a)if(c!=="default"&&!(c in n)){const f=Object.getOwnPropertyDescriptor(a,c);f&&Object.defineProperty(n,c,f.get?f:{enumerable:!0,get:()=>a[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))a(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&a(d)}).observe(document,{childList:!0,subtree:!0});function r(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function a(c){if(c.ep)return;c.ep=!0;const f=r(c);fetch(c.href,f)}})();function _T(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ig={exports:{}},et={};/**
2
+ * @license React
3
+ * react.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 r0;function kT(){if(r0)return et;r0=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),S=Symbol.for("react.view_transition"),T=Symbol.iterator;function C(z){return z===null||typeof z!="object"?null:(z=T&&z[T]||z["@@iterator"],typeof z=="function"?z:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,O={};function E(z,B,W){this.props=z,this.context=B,this.refs=O,this.updater=W||w}E.prototype.isReactComponent={},E.prototype.setState=function(z,B){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,B,"setState")},E.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function A(){}A.prototype=E.prototype;function N(z,B,W){this.props=z,this.context=B,this.refs=O,this.updater=W||w}var L=N.prototype=new A;L.constructor=N,j(L,E.prototype),L.isPureReactComponent=!0;var D=Array.isArray;function _(){}var M={H:null,A:null,T:null,S:null},Q=Object.prototype.hasOwnProperty;function J(z,B,W){var ie=W.ref;return{$$typeof:n,type:z,key:B,ref:ie!==void 0?ie:null,props:W}}function se(z,B){return J(z.type,B,z.props)}function te(z){return typeof z=="object"&&z!==null&&z.$$typeof===n}function $(z){var B={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(W){return B[W]})}var oe=/\/+/g;function V(z,B){return typeof z=="object"&&z!==null&&z.key!=null?$(""+z.key):B.toString(36)}function H(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(_,_):(z.status="pending",z.then(function(B){z.status==="pending"&&(z.status="fulfilled",z.value=B)},function(B){z.status==="pending"&&(z.status="rejected",z.reason=B)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function ne(z,B,W,ie,ue){var me=typeof z;(me==="undefined"||me==="boolean")&&(z=null);var ae=!1;if(z===null)ae=!0;else switch(me){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(z.$$typeof){case n:case i:ae=!0;break;case v:return ae=z._init,ne(ae(z._payload),B,W,ie,ue)}}if(ae)return ue=ue(z),ae=ie===""?"."+V(z,0):ie,D(ue)?(W="",ae!=null&&(W=ae.replace(oe,"$&/")+"/"),ne(ue,B,W,"",function(pe){return pe})):ue!=null&&(te(ue)&&(ue=se(ue,W+(ue.key==null||z&&z.key===ue.key?"":(""+ue.key).replace(oe,"$&/")+"/")+ae)),B.push(ue)),1;ae=0;var q=ie===""?".":ie+":";if(D(z))for(var le=0;le<z.length;le++)ie=z[le],me=q+V(ie,le),ae+=ne(ie,B,W,me,ue);else if(le=C(z),typeof le=="function")for(z=le.call(z),le=0;!(ie=z.next()).done;)ie=ie.value,me=q+V(ie,le++),ae+=ne(ie,B,W,me,ue);else if(me==="object"){if(typeof z.then=="function")return ne(H(z),B,W,ie,ue);throw B=String(z),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return ae}function F(z,B,W){if(z==null)return z;var ie=[],ue=0;return ne(z,ie,"","",function(me){return B.call(W,me,ue++)}),ie}function re(z){if(z._status===-1){var B=z._result,W=B();W.then(function(ie){(z._status===0||z._status===-1)&&(z._status=1,z._result=ie,W.status===void 0&&(W.status="fulfilled",W.value=ie))},function(ie){(z._status===0||z._status===-1)&&(z._status=2,z._result=ie,W.status===void 0&&(W.status="rejected",W.reason=ie))}),z._status===-1&&(z._status=0,z._result=W)}if(z._status===1)return z._result.default;throw z._result}var K=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)};function Re(z){var B=M.T,W={};W.types=B!==null?B.types:null,M.T=W;try{var ie=z(),ue=M.S;ue!==null&&ue(W,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(_,K)}catch(me){K(me)}finally{B!==null&&W.types!==null&&(B.types=W.types),M.T=B}}function Ye(z){var B=M.T;if(B!==null){var W=B.types;W===null?B.types=[z]:W.indexOf(z)===-1&&W.push(z)}else Re(Ye.bind(null,z))}var Oe={map:F,forEach:function(z,B,W){F(z,function(){B.apply(this,arguments)},W)},count:function(z){var B=0;return F(z,function(){B++}),B},toArray:function(z){return F(z,function(B){return B})||[]},only:function(z){if(!te(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return et.Activity=b,et.Children=Oe,et.Component=E,et.Fragment=r,et.Profiler=c,et.PureComponent=N,et.StrictMode=a,et.Suspense=m,et.ViewTransition=S,et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,et.__COMPILER_RUNTIME={__proto__:null,c:function(z){return M.H.useMemoCache(z)}},et.addTransitionType=Ye,et.cache=function(z){return function(){return z.apply(null,arguments)}},et.cacheSignal=function(){return null},et.cloneElement=function(z,B,W){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var ie=j({},z.props),ue=z.key;if(B!=null)for(me in B.key!==void 0&&(ue=""+B.key),B)!Q.call(B,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&B.ref===void 0||(ie[me]=B[me]);var me=arguments.length-2;if(me===1)ie.children=W;else if(1<me){for(var ae=Array(me),q=0;q<me;q++)ae[q]=arguments[q+2];ie.children=ae}return J(z.type,ue,ie)},et.createContext=function(z){return z={$$typeof:d,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:f,_context:z},z},et.createElement=function(z,B,W){var ie,ue={},me=null;if(B!=null)for(ie in B.key!==void 0&&(me=""+B.key),B)Q.call(B,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(ue[ie]=B[ie]);var ae=arguments.length-2;if(ae===1)ue.children=W;else if(1<ae){for(var q=Array(ae),le=0;le<ae;le++)q[le]=arguments[le+2];ue.children=q}if(z&&z.defaultProps)for(ie in ae=z.defaultProps,ae)ue[ie]===void 0&&(ue[ie]=ae[ie]);return J(z,me,ue)},et.createRef=function(){return{current:null}},et.forwardRef=function(z){return{$$typeof:h,render:z}},et.isValidElement=te,et.lazy=function(z){return{$$typeof:v,_payload:{_status:-1,_result:z},_init:re}},et.memo=function(z,B){return{$$typeof:g,type:z,compare:B===void 0?null:B}},et.startTransition=Re,et.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},et.use=function(z){return M.H.use(z)},et.useActionState=function(z,B,W){return M.H.useActionState(z,B,W)},et.useCallback=function(z,B){return M.H.useCallback(z,B)},et.useContext=function(z){return M.H.useContext(z)},et.useDebugValue=function(){},et.useDeferredValue=function(z,B){return M.H.useDeferredValue(z,B)},et.useEffect=function(z,B){return M.H.useEffect(z,B)},et.useEffectEvent=function(z){return M.H.useEffectEvent(z)},et.useId=function(){return M.H.useId()},et.useImperativeHandle=function(z,B,W){return M.H.useImperativeHandle(z,B,W)},et.useInsertionEffect=function(z,B){return M.H.useInsertionEffect(z,B)},et.useLayoutEffect=function(z,B){return M.H.useLayoutEffect(z,B)},et.useMemo=function(z,B){return M.H.useMemo(z,B)},et.useOptimistic=function(z,B){return M.H.useOptimistic(z,B)},et.useReducer=function(z,B,W){return M.H.useReducer(z,B,W)},et.useRef=function(z){return M.H.useRef(z)},et.useState=function(z){return M.H.useState(z)},et.useSyncExternalStore=function(z,B,W){return M.H.useSyncExternalStore(z,B,W)},et.useTransition=function(){return M.H.useTransition()},et.version="19.3.1",et}var a0;function Pu(){return a0||(a0=1,ig.exports=kT()),ig.exports}var x=Pu();const dt=_T(x),sp=DT({__proto__:null,default:dt},[x]);var sg={exports:{}},bu={};/**
10
+ * @license React
11
+ * react-jsx-runtime.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 o0;function LT(){if(o0)return bu;o0=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(a,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var h in c)h!=="key"&&(f[h]=c[h])}else f=c;return c=f.ref,{$$typeof:n,type:a,key:d,ref:c!==void 0?c:null,props:f}}return bu.Fragment=i,bu.jsx=r,bu.jsxs=r,bu}var u0;function UT(){return u0||(u0=1,sg.exports=LT()),sg.exports}var p=UT(),rg={exports:{}},vu={},ag={exports:{}},og={};/**
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 c0;function HT(){return c0||(c0=1,(function(n){function i(H,ne){var F=H.length;H.push(ne);e:for(;0<F;){var re=F-1>>>1,K=H[re];if(0<c(K,ne))H[re]=ne,H[F]=K,F=re;else break e}}function r(H){return H.length===0?null:H[0]}function a(H){if(H.length===0)return null;var ne=H[0],F=H.pop();if(F!==ne){H[0]=F;e:for(var re=0,K=H.length,Re=K>>>1;re<Re;){var Ye=2*(re+1)-1,Oe=H[Ye],z=Ye+1,B=H[z];if(0>c(Oe,F))z<K&&0>c(B,Oe)?(H[re]=B,H[z]=F,re=z):(H[re]=Oe,H[Ye]=F,re=Ye);else if(z<K&&0>c(B,F))H[re]=B,H[z]=F,re=z;else break e}}return ne}function c(H,ne){var F=H.sortIndex-ne.sortIndex;return F!==0?F:H.id-ne.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,h=d.now();n.unstable_now=function(){return d.now()-h}}var m=[],g=[],v=1,b=null,S=3,T=!1,C=!1,w=!1,j=!1,O=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function N(H){for(var ne=r(g);ne!==null;){if(ne.callback===null)a(g);else if(ne.startTime<=H)a(g),ne.sortIndex=ne.expirationTime,i(m,ne);else break;ne=r(g)}}function L(H){if(w=!1,N(H),!C)if(r(m)!==null)C=!0,D||(D=!0,te());else{var ne=r(g);ne!==null&&V(L,ne.startTime-H)}}var D=!1,_=-1,M=5,Q=-1;function J(){return j?!0:!(n.unstable_now()-Q<M)}function se(){if(j=!1,D){var H=n.unstable_now();Q=H;var ne=!0;try{e:{C=!1,w&&(w=!1,E(_),_=-1),T=!0;var F=S;try{t:{for(N(H),b=r(m);b!==null&&!(b.expirationTime>H&&J());){var re=b.callback;if(typeof re=="function"){b.callback=null,S=b.priorityLevel;var K=re(b.expirationTime<=H);if(H=n.unstable_now(),typeof K=="function"){b.callback=K,N(H),ne=!0;break t}b===r(m)&&a(m),N(H)}else a(m);b=r(m)}if(b!==null)ne=!0;else{var Re=r(g);Re!==null&&V(L,Re.startTime-H),ne=!1}}break e}finally{b=null,S=F,T=!1}ne=void 0}}finally{ne?te():D=!1}}}var te;if(typeof A=="function")te=function(){A(se)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,oe=$.port2;$.port1.onmessage=se,te=function(){oe.postMessage(null)}}else te=function(){O(se,0)};function V(H,ne){_=O(function(){H(n.unstable_now())},ne)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(H){H.callback=null},n.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<H?Math.floor(1e3/H):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(H){switch(S){case 1:case 2:case 3:var ne=3;break;default:ne=S}var F=S;S=ne;try{return H()}finally{S=F}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(H,ne){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var F=S;S=H;try{return ne()}finally{S=F}},n.unstable_scheduleCallback=function(H,ne,F){var re=n.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?re+F:re):F=re,H){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=F+K,H={id:v++,callback:ne,priorityLevel:H,startTime:F,expirationTime:K,sortIndex:-1},F>re?(H.sortIndex=F,i(g,H),r(m)===null&&H===r(g)&&(w?(E(_),_=-1):w=!0,V(L,F-re))):(H.sortIndex=K,i(m,H),C||T||(C=!0,D||(D=!0,te()))),H},n.unstable_shouldYield=J,n.unstable_wrapCallback=function(H){var ne=S;return function(){var F=S;S=ne;try{return H.apply(this,arguments)}finally{S=F}}}})(og)),og}var f0;function IT(){return f0||(f0=1,ag.exports=HT()),ag.exports}var ug={exports:{}},_n={};/**
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 d0;function VT(){if(d0)return _n;d0=1;var n=Pu();function i(v){var b="https://react.dev/errors/"+v;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)b+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+v+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal"),f=Symbol.for("react.recoverable"),d=Symbol.for("react.optimistic_key");function h(v,b,S){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:T==null?null:T===d?d:""+T,children:v,containerInfo:b,implementation:S}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(v,b){if(v==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return _n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,_n.browser=function(v){return{$$typeof:f,_reason:v}},_n.createPortal=function(v,b){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(i(299));return h(v,b,null,S)},_n.flushSync=function(v){var b=m.T,S=a.p;try{if(m.T=null,a.p=2,v)return v()}finally{m.T=b,a.p=S,a.d.f()}},_n.preconnect=function(v,b){typeof v=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,a.d.C(v,b))},_n.prefetchDNS=function(v){typeof v=="string"&&a.d.D(v)},_n.preinit=function(v,b){if(typeof v=="string"&&b&&typeof b.as=="string"){var S=b.as,T=g(S,b.crossOrigin),C=typeof b.integrity=="string"?b.integrity:void 0,w=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;S==="style"?a.d.S(v,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:T,integrity:C,fetchPriority:w}):S==="script"&&a.d.X(v,{crossOrigin:T,integrity:C,fetchPriority:w,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},_n.preinitModule=function(v,b){if(typeof v=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var S=g(b.as,b.crossOrigin);a.d.M(v,{crossOrigin:S,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0})}}else b==null&&a.d.M(v)},_n.preload=function(v,b){if(typeof v=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var S=b.as,T=g(S,b.crossOrigin);a.d.L(v,S,{crossOrigin:T,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},_n.preloadModule=function(v,b){if(typeof v=="string")if(b){var S=g(b.as,b.crossOrigin);a.d.m(v,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:S,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0})}else a.d.m(v)},_n.requestFormReset=function(v){a.d.r(v)},_n.unstable_batchedUpdates=function(v,b){return v(b)},_n.useFormState=function(v,b,S){return m.H.useFormState(v,b,S)},_n.useFormStatus=function(){return m.H.useHostTransitionStatus()},_n.version="19.3.1",_n}var h0;function kS(){if(h0)return ug.exports;h0=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),ug.exports=VT(),ug.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 m0;function BT(){if(m0)return vu;m0=1;var n=IT(),i=Pu(),r=kS();function a(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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){for(var t=e,l=t;l&&!l.alternate;)t=l,(t.flags&4098)!==0&&(e=t.return),l=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(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 m(e){if(f(e)!==e)throw Error(a(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(a(188));return t!==e?null:e}for(var l=e,s=t;;){var o=l.return;if(o===null)break;var u=o.alternate;if(u===null){if(s=o.return,s!==null){l=s;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===l)return m(o),e;if(u===s)return m(o),t;u=u.sibling}throw Error(a(188))}if(l.return!==s.return)l=o,s=u;else{for(var y=!1,R=o.child;R;){if(R===l){y=!0,l=o,s=u;break}if(R===s){y=!0,s=o,l=u;break}R=R.sibling}if(!y){for(R=u.child;R;){if(R===l){y=!0,l=u,s=o;break}if(R===s){y=!0,s=u,l=o;break}R=R.sibling}if(!y)throw Error(a(189))}}if(l.alternate!==s)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}function b(e,t,l,s,o,u){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&l(e,s,o,u)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&b(e.child,t,l,s,o,u))return!0;e=e.sibling}return!1}function S(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function T(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function C(e){var t=[null,null],l=S(e);return l===null||w(t,e,l.child,{foundSelf:!1}),t}function w(e,t,l,s){for(;l!==null;){if(l===t)s.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(s.foundSelf)return e[1]=l,!0;e[0]=l}else if((l.tag!==22||l.memoizedState===null)&&w(e,t,l.child,s))return!0;l=l.sibling}return!1}function j(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(a(559))}}var O=null,E=null;function A(e,t,l){return e===l?!0:e===t?(O=e,!0):!1}function N(e,t,l){return e===l?(E=e,!1):e===t?(E!==null&&(O=e),!0):!1}function L(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function D(e,t,l){for(var s=0,o=e;o;o=l(o))s++;o=0;for(var u=t;u;u=l(u))o++;for(;0<s-o;)e=l(e),s--;for(;0<o-s;)t=l(t),o--;for(;s--;){if(e===t||t!==null&&e===t.alternate)return e;e=l(e),t=l(t)}return null}var _=Object.assign,M=Symbol.for("react.element"),Q=Symbol.for("react.transitional.element"),J=Symbol.for("react.portal"),se=Symbol.for("react.fragment"),te=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),oe=Symbol.for("react.consumer"),V=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),re=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),Re=Symbol.for("react.activity"),Ye=Symbol.for("react.legacy_hidden"),Oe=Symbol.for("react.memo_cache_sentinel"),z=Symbol.for("react.view_transition"),B=Symbol.for("react.recoverable"),W=Symbol.iterator;function ie(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var ue=Symbol.for("react.client.reference");function me(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case se:return"Fragment";case $:return"Profiler";case te:return"StrictMode";case ne:return"Suspense";case F:return"SuspenseList";case Re:return"Activity";case z:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case J:return"Portal";case V:return e.displayName||"Context";case oe:return(e._context.displayName||"Context")+".Consumer";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case re:return t=e.displayName||null,t!==null?t:me(e.type)||"Memo";case K:t=e._payload,e=e._init;try{return me(e(t))}catch{}}return null}var ae=Array.isArray,q=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},Ke=[],Se=-1;function he(e){return{current:e}}function ye(e){0>Se||(e.current=Ke[Se],Ke[Se]=null,Se--)}function de(e,t){Se++,Ke[Se]=e.current,e.current=t}var Ce=he(null),He=he(null),je=he(null),Ee=he(null);function ve(e,t){switch(de(je,t),de(He,e),de(Ce,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?mx(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=mx(t),e=gx(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ye(Ce),de(Ce,e)}function we(){ye(Ce),ye(He),ye(je)}function xe(e){var t=e.memoizedState;t!==null&&(Va._currentValue=t.memoizedState,de(Ee,e)),t=Ce.current;var l=gx(t,e.type);t!==l&&(de(He,e),de(Ce,l))}function Xe(e){He.current===e&&(ye(Ce),ye(He)),Ee.current===e&&(ye(Ee),Va._currentValue=pe)}var $e,Ve;function Ze(e){if($e===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);$e=t&&t[1]||"",Ve=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+$e+e+Ve}var lt=!1;function St(e,t){if(!e||lt)return"";lt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(Te){var P=Te}Reflect.construct(e,[],fe)}else{try{fe.call()}catch(Te){P=Te}fe=!1;try{var Z=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),fe=!0,new e}finally{fe&&(Z!==void 0?Object.defineProperty(e.prototype,"props",Z):delete e.prototype.props)}}}else{try{throw Error()}catch(Te){P=Te}(fe=e())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(Te){if(Te&&P&&typeof Te.stack=="string")return[Te.stack,P.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=s.DetermineComponentFrameRoot(),y=u[0],R=u[1];if(y&&R){var k=y.split(`
44
+ `),Y=R.split(`
45
+ `);for(o=s=0;s<k.length&&!k[s].includes("DetermineComponentFrameRoot");)s++;for(;o<Y.length&&!Y[o].includes("DetermineComponentFrameRoot");)o++;if(s===k.length||o===Y.length)for(s=k.length-1,o=Y.length-1;1<=s&&0<=o&&k[s]!==Y[o];)o--;for(;1<=s&&0<=o;s--,o--)if(k[s]!==Y[o]){if(s!==1||o!==1)do if(s--,o--,0>o||k[s]!==Y[o]){var ee=`
46
+ `+k[s].replace(" at new "," at ");return e.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",e.displayName)),ee}while(1<=s&&0<=o);break}}}finally{lt=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Ze(l):""}function qt(e,t){switch(e.tag){case 26:case 27:case 5:return Ze(e.type);case 16:return Ze("Lazy");case 13:return e.child!==t&&t!==null?Ze("Suspense Fallback"):Ze("Suspense");case 19:return Ze("SuspenseList");case 0:case 15:return St(e.type,!1);case 11:return St(e.type.render,!1);case 1:return St(e.type,!0);case 31:return Ze("Activity");case 30:return Ze("ViewTransition");default:return""}}function gt(e){try{var t="",l=null;do t+=qt(e,l),l=e,e=e.return;while(e);return t}catch(s){return`
47
+ Error generating stack: `+s.message+`
48
+ `+s.stack}}var Fe=Object.prototype.hasOwnProperty,mn=n.unstable_scheduleCallback,Sn=n.unstable_cancelCallback,wl=n.unstable_shouldYield,tn=n.unstable_requestPaint,it=n.unstable_now,st=n.unstable_getCurrentPriorityLevel,gn=n.unstable_ImmediatePriority,Be=n.unstable_UserBlockingPriority,tt=n.unstable_NormalPriority,Tt=n.unstable_LowPriority,Pt=n.unstable_IdlePriority,Gt=n.log,En=n.unstable_setDisableYieldValue,pn=null,Yt=null;function Zt(e){if(typeof Gt=="function"&&En(e),Yt&&typeof Yt.setStrictMode=="function")try{Yt.setStrictMode(pn,e)}catch{}}var Qe=Math.clz32?Math.clz32:vi,Bl=Math.log,Wi=Math.LN2;function vi(e){return e>>>=0,e===0?32:31-(Bl(e)/Wi|0)|0}var ql=256,Cl=262144,Pl=4194304;function Hn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function il(e,t,l){var s=e.pendingLanes;if(s===0)return 0;var o=0,u=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var R=s&134217727;return R!==0?(s=R&~u,s!==0?o=Hn(s):(y&=R,y!==0?o=Hn(y):l||(l=R&~e,l!==0&&(o=Hn(l))))):(R=s&~u,R!==0?o=Hn(R):y!==0?o=Hn(y):l||(l=s&~e,l!==0&&(o=Hn(l)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:o}function sl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Yn(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var s=31-Qe(l),o=1<<s;t|=e[s],l&=~o}return t}function Tl(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 ec(){var e=Pl;return Pl<<=1,(Pl&62914560)===0&&(Pl=4194304),e}function Jr(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function tr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Oo(e,t,l,s,o,u){var y=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 R=e.entanglements,k=e.expirationTimes,Y=e.hiddenUpdates;for(l=y&~l;0<l;){var ee=31-Qe(l),fe=1<<ee;R[ee]=0,k[ee]=-1;var P=Y[ee];if(P!==null)for(Y[ee]=null,ee=0;ee<P.length;ee++){var Z=P[ee];Z!==null&&(Z.lane&=-536870913)}l&=~fe}s!==0&&jo(e,s,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(y&~t))}function jo(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Qe(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|l&261930}function $r(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var s=31-Qe(l),o=1<<s;o&t|e[s]&t&&(e[s]|=t),l&=~o}}function tc(e,t){var l=t&-t;return l=(l&42)!==0?1:es(l),(l&(e.suspendedLanes|t))!==0?0:l}function es(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 Ao(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Qn(){var e=le.p;return e!==0?e:(e=window.event,e===void 0?32:$x(e.type))}function Kn(e,t){var l=le.p;try{return le.p=e,t()}finally{le.p=l}}var Fn=Math.random().toString(36).slice(2),Ut="__reactFiber$"+Fn,In="__reactProps$"+Fn,$l="__reactContainer$"+Fn,Wr="__reactEvents$"+Fn,Nd="__reactListeners$"+Fn,ea="__reactHandles$"+Fn,ta="__reactResources$"+Fn,xi="__reactMarker$"+Fn,na="__reactLoad$"+Fn;function la(e){delete e[Ut],delete e[In],delete e[Nd],delete e[ea]}function Si(e){var t;if(t=e[Ut])return t;for(var l=e.parentNode;l;){if(t=l[$l]||l[Ut]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=zx(e);e!==null;){if(l=e[Ut])return l;e=zx(e)}return t}e=l,l=e.parentNode}return null}function ts(e){if(e=e[Ut]||e[$l]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ei(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function Wl(e){var t=e[ta];return t||(t=e[ta]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Jt(e){e[xi]=!0}function nc(e){e[na]=void 0}var lc=new Set,ic={};function Ri(e,t){ns(e,t),ns(e+"Capture",t)}function ns(e,t){for(ic[e]=t,e=0;e<t.length;e++)lc.add(t[e])}var Md=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]*$"),Ne={},qe={};function nt(e){return Fe.call(qe,e)?!0:Fe.call(Ne,e)?!1:Md.test(e)?qe[e]=!0:(Ne[e]=!0,!1)}var Ie=!1;function Qt(){var e=Ie;return Ie=!1,e}function nn(e,t,l){if(nt(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,l)}}function Ol(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 Vn(e,t,l,s){if(s===null)e.removeAttribute(l);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,s)}}function ln(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Dd(e,t,l){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var o=s.get,u=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(y){l=""+y,u.call(this,y)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function sc(e){if(!e._valueTracker){var t=zd(e)?"checked":"value";e._valueTracker=Dd(e,t,""+e[t])}}function ny(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),s="";return e&&(s=zd(e)?e.checked?"true":"false":e.value),e=s,e!==l?(t.setValue(e),!0):!1}var $R=/[\n"\\]/g;function jl(e){return e.replace($R,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function _d(e,t,l,s,o,u,y,R){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ln(t)):e.value!==""+ln(t)&&(e.value=""+ln(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?y==="number"&&e.value==t?kd(e,ln(e.value)):kd(e,ln(t)):l!=null?kd(e,ln(l)):s!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?e.name=""+ln(R):e.removeAttribute("name")}function ly(e,t,l,s,o,u,y,R){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){sc(e);return}l=l!=null?""+ln(l):"",t=t!=null?""+ln(t):l,R||t===e.value||(e.value=t),e.defaultValue=t}s=s??o,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=R?e.checked:!!s,e.defaultChecked=!!s,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),sc(e)}function kd(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function ia(e,t,l,s){if(e=e.options,t){t={};for(var o=0;o<l.length;o++)t["$"+l[o]]=!0;for(l=0;l<e.length;l++)o=t.hasOwnProperty("$"+e[l].value),e[l].selected!==o&&(e[l].selected=o),o&&s&&(e[l].defaultSelected=!0)}else{for(l=""+ln(l),t=null,o=0;o<e.length;o++){if(e[o].value===l){e[o].selected=!0,s&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function iy(e,t,l){if(t!=null&&(t=""+ln(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+ln(l):""}function sy(e,t,l,s){if(t==null){if(s!=null){if(l!=null)throw Error(a(92));if(ae(s)){if(1<s.length)throw Error(a(93));s=s[0]}l=s}l==null&&(l=""),t=l}l=ln(t),e.defaultValue=l,s=e.textContent,s===l&&s!==""&&s!==null&&(e.value=s),sc(e)}function sa(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var WR=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 ry(e,t,l){var s=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,l):typeof l!="number"||l===0||WR.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function ay(e,t,l){if(t!=null&&typeof t!="object")throw Error(a(62));if(e=e.style,l!=null){for(var s in l)!l.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="",Ie=!0);for(var o in t)s=t[o],t.hasOwnProperty(o)&&l[o]!==s&&(ry(e,o,s),Ie=!0)}else for(var u in t)t.hasOwnProperty(u)&&ry(e,u,t[u])}function Ld(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 ew=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),tw=/^[\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 rc(e){return tw.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ei(){}var Ud=null;function Hd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ra=null,aa=null;function oy(e){var t=ts(e);if(t&&(e=t.stateNode)){var l=e[In]||null;e:switch(e=t.stateNode,t.type){case"input":if(_d(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="'+jl(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var s=l[t];if(s!==e&&s.form===e.form){var o=s[In]||null;if(!o)throw Error(a(90));_d(s,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<l.length;t++)s=l[t],s.form===e.form&&ny(s)}break e;case"textarea":iy(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ia(e,!!l.multiple,t,!1)}}}var Id=!1;function uy(e,t,l){if(Id)return e(t,l);Id=!0;try{var s=e(t);return s}finally{if(Id=!1,(ra!==null||aa!==null)&&(af(),ra&&(t=ra,e=aa,aa=ra=null,oy(t),e)))for(t=0;t<e.length;t++)oy(e[t])}}function No(e,t){var l=e.stateNode;if(l===null)return null;var s=l[In]||null;if(s===null)return null;l=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(a(231,t,typeof l));return l}var wi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vd=!1;if(wi)try{var Mo={};Object.defineProperty(Mo,"passive",{get:function(){Vd=!0}}),window.addEventListener("test",Mo,Mo),window.removeEventListener("test",Mo,Mo)}catch{Vd=!1}var ls=null,Bd=null,ac=null;function cy(){if(ac)return ac;var e,t=Bd,l=t.length,s,o="value"in ls?ls.value:ls.textContent,u=o.length;for(e=0;e<l&&t[e]===o[e];e++);var y=l-e;for(s=1;s<=y&&t[l-s]===o[u-s];s++);return ac=o.slice(e,1<s?1-s:void 0)}function oc(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 uc(){return!0}function fy(){return!1}function Xn(e){function t(l,s,o,u,y){this._reactName=l,this._targetInst=o,this.type=s,this.nativeEvent=u,this.target=y,this.currentTarget=null;for(var R in e)e.hasOwnProperty(R)&&(l=e[R],this[R]=l?l(u):u[R]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?uc:fy,this.isPropagationStopped=fy,this}return _(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=uc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=uc)},persist:function(){},isPersistent:uc}),t}var is={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cc=Xn(is),zo=_({},is,{view:0,detail:0}),nw=Xn(zo),qd,Pd,Do,fc=_({},zo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yd,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!==Do&&(Do&&e.type==="mousemove"?(qd=e.screenX-Do.screenX,Pd=e.screenY-Do.screenY):Pd=qd=0,Do=e),qd)},movementY:function(e){return"movementY"in e?e.movementY:Pd}}),dy=Xn(fc),lw=_({},fc,{dataTransfer:0}),iw=Xn(lw),sw=_({},zo,{relatedTarget:0}),Gd=Xn(sw),rw=_({},is,{animationName:0,elapsedTime:0,pseudoElement:0}),aw=Xn(rw),ow=_({},is,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),uw=Xn(ow),cw=_({},is,{data:0}),hy=Xn(cw),fw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dw={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"},hw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=hw[e])?!!t[e]:!1}function Yd(){return mw}var gw=_({},zo,{key:function(e){if(e.key){var t=fw[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=oc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?dw[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yd,charCode:function(e){return e.type==="keypress"?oc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?oc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),pw=Xn(gw),yw=_({},fc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),my=Xn(yw),bw=_({},is,{submitter:0}),vw=Xn(bw),xw=_({},zo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yd}),Sw=Xn(xw),Ew=_({},is,{propertyName:0,elapsedTime:0,pseudoElement:0}),Rw=Xn(Ew),ww=_({},fc,{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}),Cw=Xn(ww),Tw=_({},is,{newState:0,oldState:0,source:0}),Ow=Xn(Tw),jw=[9,13,27,32],Qd=wi&&"CompositionEvent"in window,_o=null;wi&&"documentMode"in document&&(_o=document.documentMode);var Aw=wi&&"TextEvent"in window&&!_o,gy=wi&&(!Qd||_o&&8<_o&&11>=_o),py=" ",yy=!1;function by(e,t){switch(e){case"keyup":return jw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var oa=!1;function Nw(e,t){switch(e){case"compositionend":return vy(t);case"keypress":return t.which!==32?null:(yy=!0,py);case"textInput":return e=t.data,e===py&&yy?null:e;default:return null}}function Mw(e,t){if(oa)return e==="compositionend"||!Qd&&by(e,t)?(e=cy(),ac=Bd=ls=null,oa=!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 gy&&t.locale!=="ko"?null:t.data;default:return null}}var zw={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 xy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!zw[e.type]:t==="textarea"}function Sy(e,t,l,s){ra?aa?aa.push(s):aa=[s]:ra=s,t=hf(t,"onChange"),0<t.length&&(l=new cc("onChange","change",null,l,s),e.push({event:l,listeners:t}))}var ko=null,Lo=null;function Dw(e){ox(e,0)}function dc(e){var t=Ei(e);if(ny(t))return e}function Ey(e,t){if(e==="change")return t}var Ry=!1;if(wi){var Kd;if(wi){var Fd="oninput"in document;if(!Fd){var wy=document.createElement("div");wy.setAttribute("oninput","return;"),Fd=typeof wy.oninput=="function"}Kd=Fd}else Kd=!1;Ry=Kd&&(!document.documentMode||9<document.documentMode)}function Cy(){ko&&(ko.detachEvent("onpropertychange",Ty),Lo=ko=null)}function Ty(e){if(e.propertyName==="value"&&dc(Lo)){var t=[];Sy(t,Lo,e,Hd(e)),uy(Dw,t)}}function _w(e,t,l){e==="focusin"?(Cy(),ko=t,Lo=l,ko.attachEvent("onpropertychange",Ty)):e==="focusout"&&Cy()}function kw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return dc(Lo)}function Lw(e,t){if(e==="click")return dc(t)}function Uw(e,t){if(e==="input"||e==="change")return dc(t)}function Hw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ml=typeof Object.is=="function"?Object.is:Hw;function Uo(e,t){if(ml(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),s=Object.keys(t);if(l.length!==s.length)return!1;for(s=0;s<l.length;s++){var o=l[s];if(!Fe.call(t,o)||!ml(e[o],t[o]))return!1}return!0}function Xd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Oy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jy(e,t){var l=Oy(e);e=0;for(var s;l;){if(l.nodeType===3){if(s=e+l.textContent.length,e<=t&&s>=t)return{node:l,offset:t-e};e=s}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Oy(l)}}function Ay(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ay(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ny(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Xd(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=Xd(e.document)}return t}function Zd(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 Iw=wi&&"documentMode"in document&&11>=document.documentMode,ua=null,Jd=null,Ho=null,$d=!1;function My(e,t,l){var s=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;$d||ua==null||ua!==Xd(s)||(s=ua,"selectionStart"in s&&Zd(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ho&&Uo(Ho,s)||(Ho=s,s=hf(Jd,"onSelect"),0<s.length&&(t=new cc("onSelect","select",null,t,l),e.push({event:t,listeners:s}),t.target=ua)))}function nr(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var ca={animationend:nr("Animation","AnimationEnd"),animationiteration:nr("Animation","AnimationIteration"),animationstart:nr("Animation","AnimationStart"),transitionrun:nr("Transition","TransitionRun"),transitionstart:nr("Transition","TransitionStart"),transitioncancel:nr("Transition","TransitionCancel"),transitionend:nr("Transition","TransitionEnd")},Wd={},zy={};wi&&(zy=document.createElement("div").style,"AnimationEvent"in window||(delete ca.animationend.animation,delete ca.animationiteration.animation,delete ca.animationstart.animation),"TransitionEvent"in window||delete ca.transitionend.transition);function lr(e){if(Wd[e])return Wd[e];if(!ca[e])return e;var t=ca[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in zy)return Wd[e]=t[l];return e}var Dy=lr("animationend"),_y=lr("animationiteration"),ky=lr("animationstart"),Vw=lr("transitionrun"),Bw=lr("transitionstart"),qw=lr("transitioncancel"),Ly=lr("transitionend"),Uy=new Map,eh="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");eh.push("scrollEnd");function Gl(e,t){Uy.set(e,t),Ri(t,[e])}var Pw=0;function Ci(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Fl.identifierPrefix;var l=Pw++;return e="_"+e+"t_"+l.toString(32)+"_",t.autoName=e}function Hy(e){if(e==null||typeof e=="string")return e;var t=null,l=Na;if(l!==null)for(var s=0;s<l.length;s++){var o=e[l[s]];if(o!=null){if(o==="none")return"none";t=t==null?o:t+(" "+o)}}return t??e.default}function Ti(e,t){return e=Hy(e),t=Hy(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var hc=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)},Al=[],fa=0,th=0;function mc(){for(var e=fa,t=th=fa=0;t<e;){var l=Al[t];Al[t++]=null;var s=Al[t];Al[t++]=null;var o=Al[t];Al[t++]=null;var u=Al[t];if(Al[t++]=null,s!==null&&o!==null){var y=s.pending;y===null?o.next=o:(o.next=y.next,y.next=o),s.pending=o}u!==0&&Iy(l,o,u)}}function gc(e,t,l,s){Al[fa++]=e,Al[fa++]=t,Al[fa++]=l,Al[fa++]=s,th|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function nh(e,t,l,s){return gc(e,t,l,s),pc(e)}function ir(e,t){return gc(e,null,null,t),pc(e)}function Iy(e,t,l){e.lanes|=l;var s=e.alternate;s!==null&&(s.lanes|=l);for(var o=!1,u=e.return;u!==null;)u.childLanes|=l,s=u.alternate,s!==null&&(s.childLanes|=l),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-Qe(l),e=u.hiddenUpdates,s=e[o],s===null?e[o]=[t]:s.push(t),t.lane=l|536870912),u):null}function pc(e){if(50<ru)throw ru=0,rf=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var da={};function Gw(e,t,l,s){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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rl(e,t,l,s){return new Gw(e,t,l,s)}function lh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oi(e,t){var l=e.alternate;return l===null?(l=rl(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&1206910976,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 Vy(e,t){e.flags&=1206910978;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 yc(e,t,l,s,o,u){var y=0;if(s=e,typeof s=="function")lh(s)&&(y=1);else if(typeof s=="string")y=bT(e,l,Ce.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(s){case Re:return e=rl(31,l,t,o),e.elementType=Re,e.lanes=u,e;case se:return sr(l.children,o,u,t);case te:y=8,o|=24;break;case $:return e=rl(12,l,t,o|2),e.elementType=$,e.lanes=u,e;case ne:return e=rl(13,l,t,o),e.elementType=ne,e.lanes=u,e;case F:return e=rl(19,l,t,o),e.elementType=F,e.lanes=u,e;case Ye:case z:return e=o|32,e=rl(30,l,t,e),e.elementType=z,e.lanes=u,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case V:y=10;break e;case oe:y=9;break e;case H:y=11;break e;case re:y=14;break e;case K:y=16,s=null;break e}y=29,l=Error(a(130,e===null?"null":typeof e,"")),s=null}return t=rl(y,l,t,o),t.elementType=e,t.type=s,t.lanes=u,t}function sr(e,t,l,s){return e=rl(7,e,s,t),e.lanes=l,e}function ih(e,t,l){return e=rl(6,e,null,t),e.lanes=l,e}function By(e){var t=rl(18,null,null,0);return t.stateNode=e,t}function sh(e,t,l){return t=rl(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var qy=new WeakMap;function Nl(e,t){if(typeof e=="object"&&e!==null){var l=qy.get(e);return l!==void 0?l:(t={value:e,source:t,stack:gt(t)},qy.set(e,t),t)}return{value:e,source:t,stack:gt(t)}}var ha=[],ma=0,bc=null,Io=0,Ml=[],zl=0,ss=null,ti=1,ni="";function ji(e,t){ha[ma++]=Io,ha[ma++]=bc,bc=e,Io=t}function Py(e,t,l){Ml[zl++]=ti,Ml[zl++]=ni,Ml[zl++]=ss,ss=e;var s=ti;e=ni;var o=32-Qe(s)-1;s&=~(1<<o),l+=1;var u=32-Qe(t)+o;if(30<u){var y=o-o%5;u=(s&(1<<y)-1).toString(32),s>>=y,o-=y,ti=1<<32-Qe(t)+o|l<<o|s,ni=u+e}else ti=1<<u|l<<o|s,ni=e}function vc(e){e.return!==null&&(ji(e,1),Py(e,1,0))}function rh(e){for(;e===bc;)bc=ha[--ma],ha[ma]=null,Io=ha[--ma],ha[ma]=null;for(;e===ss;)ss=Ml[--zl],Ml[zl]=null,ni=Ml[--zl],Ml[zl]=null,ti=Ml[--zl],Ml[zl]=null}function Gy(e,t){Ml[zl++]=ti,Ml[zl++]=ni,Ml[zl++]=ss,ti=t.id,ni=t.overflow,ss=e}var Rn=null,_t=null,ct=!1,rs=null,Dl=!1,ah=Error(a(519));function as(e){var t=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vo(Nl(t,e)),ah}function Yy(e){var t=e.stateNode,l=e.type,s=e.memoizedProps;switch(t[Ut]=e,t[In]=s,l){case"dialog":mt("cancel",t),mt("close",t);break;case"iframe":case"object":case"embed":mt("load",t);break;case"video":case"audio":for(l=0;l<ou.length;l++)mt(ou[l],t);break;case"source":mt("error",t);break;case"img":case"image":case"link":mt("error",t),mt("load",t);break;case"details":mt("toggle",t);break;case"input":mt("invalid",t),ly(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":mt("invalid",t);break;case"textarea":mt("invalid",t),sy(t,s.value,s.defaultValue,s.children)}l=s.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||s.suppressHydrationWarning===!0||dx(t.textContent,l)?(s.popover!=null&&(mt("beforetoggle",t),mt("toggle",t)),s.onScroll!=null&&mt("scroll",t),s.onScrollEnd!=null&&mt("scrollend",t),s.onClick!=null&&(t.onclick=ei),t=!0):t=!1,t||as(e,!0)}function xc(e){for(Rn=e.return;Rn;)switch(Rn.tag){case 5:case 31:case 13:Dl=!1;return;case 27:case 3:Dl=!0;return;default:Rn=Rn.return}}function ga(e){if(e!==Rn)return!1;if(!ct)return xc(e),ct=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Um(e.type,e.memoizedProps)),l=!l),l&&_t&&as(e),xc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));_t=Mx(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));_t=Mx(e)}else t===27?(t=_t,Rs(e.type)?(e=Qm,Qm=null,_t=e):_t=t):_t=Rn?kl(e.stateNode.nextSibling):null;return!0}function rr(){_t=Rn=null,ct=!1}function oh(){var e=rs;return e!==null&&(ul===null?ul=e:ul.push.apply(ul,e),rs=null),e}function Vo(e){rs===null?rs=[e]:rs.push(e)}var uh=he(null),ar=null,Ai=null;function os(e,t,l){de(uh,t._currentValue),t._currentValue=l}function Ni(e){e._currentValue=uh.current,ye(uh)}function Sc(e,t,l){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===l)break;e=e.return}}function ch(e,t,l,s){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var y=o.child;u=u.firstContext;e:for(;u!==null;){var R=u;u=o;for(var k=0;k<t.length;k++)if(R.context===t[k]){u.lanes|=l,R=u.alternate,R!==null&&(R.lanes|=l),Sc(u.return,l,e),s||(y=null);break e}u=R.next}}else if(o.tag===18){if(y=o.return,y===null)throw Error(a(341));y.lanes|=l,u=y.alternate,u!==null&&(u.lanes|=l),Sc(y,l,e),y=null}else o.tag===13&&o.memoizedState!==null&&o.memoizedState.dehydrated===null?(o.lanes|=l,y=o.alternate,y!==null&&(y.lanes|=l),Sc(o.return,l,e),y=o.child,y=y!==null?y.sibling:null):y=o.child;if(y!==null)y.return=o;else for(y=o;y!==null;){if(y===e){y=null;break}if(o=y.sibling,o!==null){o.return=y.return,y=o;break}y=y.return}o=y}}function or(e,t,l,s){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var y=o.alternate;if(y===null)throw Error(a(387));if(y=y.memoizedProps,y!==null){var R=o.type;ml(o.pendingProps.value,y.value)||(e!==null?e.push(R):e=[R])}}else if(o===Ee.current){if(y=o.alternate,y===null)throw Error(a(387));y.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Va):e=[Va])}o=o.return}return e!==null&&ch(t,e,l,s),t.flags|=262144,e!==null}function Ec(e){for(e=e.firstContext;e!==null;){if(!ml(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ur(e){ar=e,Ai=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function An(e){return Qy(ar,e)}function Rc(e,t){return ar===null&&ur(e),Qy(e,t)}function Qy(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Ai===null){if(e===null)throw Error(a(308));Ai=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ai=Ai.next=t;return l}var Yw=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Qw=n.unstable_scheduleCallback,Kw=n.unstable_NormalPriority,an={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fh(){return{controller:new Yw,data:new Map,refCount:0}}function Bo(e){e.refCount--,e.refCount===0&&Qw(Kw,function(){e.controller.abort()})}function Ky(e,t){if((e.pendingLanes&4194048)!==0){var l=e.transitionTypes;for(l===null&&(l=e.transitionTypes=[]),e=0;e<t.length;e++){var s=t[e];l.indexOf(s)===-1&&l.push(s)}}}var qo=null;function Fw(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Po=null,dh=0,cr=0,pa=null;function Xw(e,t){if(Po===null){var l=Po=[];dh=0,cr=jm(),pa={status:"pending",value:void 0,then:function(s){l.push(s)}}}return dh++,t.then(Fy,Fy),t}function Fy(){if(--dh===0&&(qo=null,Po!==null)){pa!==null&&(pa.status="fulfilled");var e=Po;Po=null,cr=0,pa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Zw(e,t){var l=[],s={status:"pending",value:null,reason:null,then:function(o){l.push(o)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var o=0;o<l.length;o++)(0,l[o])(t)},function(o){for(s.status="rejected",s.reason=o,o=0;o<l.length;o++)(0,l[o])(void 0)}),s}var Xy=q.S;q.S=function(e,t){if(Bv=it(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Xw(e,t),qo!==null)for(var l=_a;l!==null;)Ky(l,qo),l=l.next;if(l=e.types,l!==null){for(var s=_a;s!==null;)Ky(s,l),s=s.next;if(cr!==0){s=qo,s===null&&(s=qo=[]);for(var o=0;o<l.length;o++){var u=l[o];s.indexOf(u)===-1&&s.push(u)}}}Xy!==null&&Xy(e,t)};var fr=he(null);function hh(){var e=fr.current;return e!==null?e:zt.pooledCache}function wc(e,t){t===null?de(fr,fr.current):de(fr,t.pool)}function Zy(){var e=hh();return e===null?null:{parent:an._currentValue,pool:e}}var ya=Error(a(460)),mh=Error(a(474)),Cc=Error(a(542)),Tc={then:function(){}};function Jy(e){return e=e.status,e==="fulfilled"||e==="rejected"}function $y(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(ei,ei),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,eb(e),e===void 0&&!("reason"in t)?Error(a(600)):e;default:if(typeof t.status=="string")t.then(ei,ei);else{if(e=zt,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=s}},function(s){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,eb(e),e}throw hr=t,ya}}function dr(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(hr=l,ya):l}}var hr=null;function Wy(){if(hr===null)throw Error(a(459));var e=hr;return hr=null,e}function eb(e){if(e===ya||e===Cc)throw Error(a(483))}var ba=null,Go=0;function Oc(e){var t=Go;return Go+=1,ba===null&&(ba=[]),$y(ba,e,t)}function us(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function jc(e,t){throw t.$$typeof===M?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function tb(e){function t(G,I){if(e){var X=G.deletions;X===null?(G.deletions=[I],G.flags|=16):X.push(I)}}function l(G,I){if(!e)return null;for(;I!==null;)t(G,I),I=I.sibling;return null}function s(G){for(var I=new Map;G!==null;)G.key===null?I.set(G.index,G):I.set(G.key,G),G=G.sibling;return I}function o(G,I){return G=Oi(G,I),G.index=0,G.sibling=null,G}function u(G,I,X){return G.index=X,e?(X=G.alternate,X!==null?(X=X.index,X<I?(G.flags|=2,I):X):(G.flags|=134217730,I)):(G.flags|=1048576,I)}function y(G){return e&&G.alternate===null&&(G.flags|=134217730),G}function R(G,I,X,ce){return I===null||I.tag!==6?(I=ih(X,G.mode,ce),I.return=G,I):(I=o(I,X),I.return=G,I)}function k(G,I,X,ce){var De=X.type;return De===se?(G=ee(G,I,X.props.children,ce,X.key),us(G,X),G):I!==null&&(I.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===K&&dr(De)===I.type)?(I=o(I,X.props),us(I,X),I.return=G,I):(I=yc(X.type,X.key,X.props,null,G.mode,ce),us(I,X),I.return=G,I)}function Y(G,I,X,ce){return I===null||I.tag!==4||I.stateNode.containerInfo!==X.containerInfo||I.stateNode.implementation!==X.implementation?(I=sh(X,G.mode,ce),I.return=G,I):(I=o(I,X.children||[]),I.return=G,I)}function ee(G,I,X,ce,De){return I===null||I.tag!==7?(I=sr(X,G.mode,ce,De),I.return=G,I):(I=o(I,X),I.return=G,I)}function fe(G,I,X){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return I=ih(""+I,G.mode,X),I.return=G,I;if(typeof I=="object"&&I!==null){switch(I.$$typeof){case Q:return X=yc(I.type,I.key,I.props,null,G.mode,X),us(X,I),X.return=G,X;case J:return I=sh(I,G.mode,X),I.return=G,I;case K:return I=dr(I),fe(G,I,X)}if(ae(I)||ie(I))return I=sr(I,G.mode,X,null),I.return=G,I;if(typeof I.then=="function")return fe(G,Oc(I),X);if(I.$$typeof===V)return fe(G,Rc(G,I),X);jc(G,I)}return null}function P(G,I,X,ce){var De=I!==null?I.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return De!==null?null:R(G,I,""+X,ce);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case Q:return X.key===De?k(G,I,X,ce):null;case J:return X.key===De?Y(G,I,X,ce):null;case K:return X=dr(X),P(G,I,X,ce)}if(ae(X)||ie(X))return De!==null?null:ee(G,I,X,ce,null);if(typeof X.then=="function")return P(G,I,Oc(X),ce);if(X.$$typeof===V)return P(G,I,Rc(G,X),ce);jc(G,X)}return null}function Z(G,I,X,ce,De){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return G=G.get(X)||null,R(I,G,""+ce,De);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case Q:return G=G.get(ce.key===null?X:ce.key)||null,k(I,G,ce,De);case J:return G=G.get(ce.key===null?X:ce.key)||null,Y(I,G,ce,De);case K:return ce=dr(ce),Z(G,I,X,ce,De)}if(ae(ce)||ie(ce))return G=G.get(X)||null,ee(I,G,ce,De,null);if(typeof ce.then=="function")return Z(G,I,X,Oc(ce),De);if(ce.$$typeof===V)return Z(G,I,X,Rc(I,ce),De);jc(I,ce)}return null}function Te(G,I,X,ce){for(var De=null,yt=null,Pe=I,Je=I=0,cn=null;Pe!==null&&Je<X.length;Je++){Pe.index>Je?(cn=Pe,Pe=null):cn=Pe.sibling;var bt=P(G,Pe,X[Je],ce);if(bt===null){Pe===null&&(Pe=cn);break}e&&Pe&&bt.alternate===null&&t(G,Pe),I=u(bt,I,Je),yt===null?De=bt:yt.sibling=bt,yt=bt,Pe=cn}if(Je===X.length)return l(G,Pe),ct&&ji(G,Je),De;if(Pe===null){for(;Je<X.length;Je++)Pe=fe(G,X[Je],ce),Pe!==null&&(I=u(Pe,I,Je),yt===null?De=Pe:yt.sibling=Pe,yt=Pe);return ct&&ji(G,Je),De}for(Pe=s(Pe);Je<X.length;Je++)cn=Z(Pe,G,Je,X[Je],ce),cn!==null&&(e&&(bt=cn.alternate,bt!==null&&Pe.delete(bt.key===null?Je:bt.key)),I=u(cn,I,Je),yt===null?De=cn:yt.sibling=cn,yt=cn);return e&&Pe.forEach(function(js){return t(G,js)}),ct&&ji(G,Je),De}function Ue(G,I,X,ce){if(X==null)throw Error(a(151));for(var De=null,yt=null,Pe=I,Je=I=0,cn=null,bt=X.next();Pe!==null&&!bt.done;Je++,bt=X.next()){Pe.index>Je?(cn=Pe,Pe=null):cn=Pe.sibling;var js=P(G,Pe,bt.value,ce);if(js===null){Pe===null&&(Pe=cn);break}e&&Pe&&js.alternate===null&&t(G,Pe),I=u(js,I,Je),yt===null?De=js:yt.sibling=js,yt=js,Pe=cn}if(bt.done)return l(G,Pe),ct&&ji(G,Je),De;if(Pe===null){for(;!bt.done;Je++,bt=X.next())bt=fe(G,bt.value,ce),bt!==null&&(I=u(bt,I,Je),yt===null?De=bt:yt.sibling=bt,yt=bt);return ct&&ji(G,Je),De}for(Pe=s(Pe);!bt.done;Je++,bt=X.next())bt=Z(Pe,G,Je,bt.value,ce),bt!==null&&(e&&(cn=bt.alternate,cn!==null&&Pe.delete(cn.key===null?Je:cn.key)),I=u(bt,I,Je),yt===null?De=bt:yt.sibling=bt,yt=bt);return e&&Pe.forEach(function(NT){return t(G,NT)}),ct&&ji(G,Je),De}function ot(G,I,X,ce){if(typeof X=="object"&&X!==null&&X.type===se&&X.key===null&&X.props.ref===void 0&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case Q:e:{for(var De=X.key;I!==null;){if(I.key===De){if(De=X.type,De===se){if(I.tag===7){l(G,I.sibling),ce=o(I,X.props.children),us(ce,X),ce.return=G,G=ce;break e}}else if(I.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===K&&dr(De)===I.type){l(G,I.sibling),ce=o(I,X.props),us(ce,X),ce.return=G,G=ce;break e}l(G,I);break}else t(G,I);I=I.sibling}X.type===se?(ce=sr(X.props.children,G.mode,ce,X.key),us(ce,X),ce.return=G,G=ce):(ce=yc(X.type,X.key,X.props,null,G.mode,ce),us(ce,X),ce.return=G,G=ce)}return y(G);case J:e:{for(De=X.key;I!==null;){if(I.key===De)if(I.tag===4&&I.stateNode.containerInfo===X.containerInfo&&I.stateNode.implementation===X.implementation){l(G,I.sibling),ce=o(I,X.children||[]),ce.return=G,G=ce;break e}else{l(G,I);break}else t(G,I);I=I.sibling}ce=sh(X,G.mode,ce),ce.return=G,G=ce}return y(G);case K:return X=dr(X),ot(G,I,X,ce)}if(ae(X))return Te(G,I,X,ce);if(ie(X)){if(De=ie(X),typeof De!="function")throw Error(a(150));return X=De.call(X),Ue(G,I,X,ce)}if(typeof X.then=="function")return ot(G,I,Oc(X),ce);if(X.$$typeof===V)return ot(G,I,Rc(G,X),ce);jc(G,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,I!==null&&I.tag===6?(l(G,I.sibling),ce=o(I,X),ce.return=G,G=ce):(l(G,I),ce=ih(X,G.mode,ce),ce.return=G,G=ce),y(G)):l(G,I)}return function(G,I,X,ce){try{Go=0;var De=ot(G,I,X,ce);return ba=null,De}catch(Pe){if(Pe===ya||Pe===Cc)throw Pe;var yt=rl(29,Pe,null,G.mode);return yt.lanes=ce,yt.return=G,yt}finally{}}}var mr=tb(!0),nb=tb(!1),cs=!1;function gh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ph(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 fs(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ds(e,t,l){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Et&2)!==0){var o=s.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),s.pending=t,t=pc(e),Iy(e,null,l),t}return gc(e,s,t,l),pc(e)}function Yo(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,l|=s,t.lanes=l,$r(e,l)}}function yh(e,t){var l=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,l===s)){var o=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var y={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?o=u=y:u=u.next=y,l=l.next}while(l!==null);u===null?o=u=t:u=u.next=t}else o=u=t;l={baseState:s.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:s.shared,callbacks:s.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var bh=!1;function Qo(){if(bh){var e=pa;if(e!==null)throw e}}function Ko(e,t,l,s){bh=!1;var o=e.updateQueue;cs=!1;var u=o.firstBaseUpdate,y=o.lastBaseUpdate,R=o.shared.pending;if(R!==null){o.shared.pending=null;var k=R,Y=k.next;k.next=null,y===null?u=Y:y.next=Y,y=k;var ee=e.alternate;ee!==null&&(ee=ee.updateQueue,R=ee.lastBaseUpdate,R!==y&&(R===null?ee.firstBaseUpdate=Y:R.next=Y,ee.lastBaseUpdate=k))}if(u!==null){var fe=o.baseState;y=0,ee=Y=k=null,R=u;do{var P=R.lane&-536870913,Z=P!==R.lane;if(Z?(pt&P)===P:(s&P)===P){P!==0&&P===cr&&(bh=!0),ee!==null&&(ee=ee.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var Te=e,Ue=R;P=t;var ot=l;switch(Ue.tag){case 1:if(Te=Ue.payload,typeof Te=="function"){fe=Te.call(ot,fe,P);break e}fe=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=Ue.payload,P=typeof Te=="function"?Te.call(ot,fe,P):Te,P==null)break e;fe=_({},fe,P);break e;case 2:cs=!0}}P=R.callback,P!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=o.callbacks,Z===null?o.callbacks=[P]:Z.push(P))}else Z={lane:P,tag:R.tag,payload:R.payload,callback:R.callback,next:null},ee===null?(Y=ee=Z,k=fe):ee=ee.next=Z,y|=P;if(R=R.next,R===null){if(R=o.shared.pending,R===null)break;Z=R,R=Z.next,Z.next=null,o.lastBaseUpdate=Z,o.shared.pending=null}}while(!0);ee===null&&(k=fe),o.baseState=k,o.firstBaseUpdate=Y,o.lastBaseUpdate=ee,u===null&&(o.shared.lanes=0),vs|=y,e.lanes=y,e.memoizedState=fe}}function lb(e,t){if(typeof e!="function")throw Error(a(191,e));e.call(t)}function ib(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)lb(l[e],t)}var hs=he(null),Ac=he(0);function sb(e,t){e=ki,de(Ac,e),de(hs,t),ki=e|t.baseLanes}function vh(){de(Ac,ki),de(hs,hs.current)}function xh(){ki=Ac.current,ye(hs),ye(Ac)}var Nn=he(null),Bn=null;function ms(e){var t=e.alternate;de(Mn,Mn.current&1),de(Nn,e),Bn===null&&(t===null||hs.current!==null||t.memoizedState!==null)&&(Bn=e)}function Sh(e){de(Mn,Mn.current),de(Nn,e),Bn===null&&(Bn=e)}function rb(e){e.tag===22?(de(Mn,Mn.current),de(Nn,e),Bn===null&&(Bn=e)):gs()}function gs(){de(Mn,Mn.current),de(Nn,Nn.current)}function gl(e){ye(Nn),Bn===e&&(Bn=null),ye(Mn)}var Mn=he(0);function Fo(e,t){de(Nn,Nn.current),de(Mn,t)}function Eh(e){ye(Mn),ye(Nn),Bn===e&&(Bn=null)}function Nc(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Gm(l)||Ym(l)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Mi=0,at=null,Mt=null,on=null,Mc=!1,va=!1,gr=!1,zc=0,Xo=0,xa=null,Jw=0;function $t(){throw Error(a(321))}function Rh(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!ml(e[l],t[l]))return!1;return!0}function wh(e,t,l,s,o,u){return Mi=u,at=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,q.H=e===null||e.memoizedState===null?Pb:Gb,gr=!1,u=l(s,o),gr=!1,va&&(u=ob(t,l,s,o)),ab(e),u}function ab(e){q.H=Ic;var t=Mt!==null&&Mt.next!==null;if(Mi=0,on=Mt=at=null,Mc=!1,Xo=0,xa=null,t)throw Error(a(300));e===null||un||(e=e.dependencies,e!==null&&Ec(e)&&(un=!0))}function ob(e,t,l,s){at=e;var o=0;do{if(va&&(xa=null),Xo=0,va=!1,25<=o)throw Error(a(301));if(o+=1,on=Mt=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}q.H=sC,u=t(l,s)}while(va);return u}function $w(){var e=q.H,t=e.useState()[0];return t=typeof t.then=="function"?Zo(t):t,e=e.useState()[0],(Mt!==null?Mt.memoizedState:null)!==e&&(at.flags|=1024),t}function Ch(){var e=zc!==0;return zc=0,e}function Th(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Oh(e){if(Mc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Mc=!1}Mi=0,on=Mt=at=null,va=!1,Xo=zc=0,xa=null}function Zn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return on===null?at.memoizedState=on=e:on=on.next=e,on}function sn(){if(Mt===null){var e=at.alternate;e=e!==null?e.memoizedState:null}else e=Mt.next;var t=on===null?at.memoizedState:on.next;if(t!==null)on=t,Mt=e;else{if(e===null)throw at.alternate===null?Error(a(467)):Error(a(310));Mt=e,e={memoizedState:Mt.memoizedState,baseState:Mt.baseState,baseQueue:Mt.baseQueue,queue:Mt.queue,next:null},on===null?at.memoizedState=on=e:on=on.next=e}return on}function Dc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Zo(e){var t=Xo;return Xo+=1,xa===null&&(xa=[]),e=$y(xa,e,t),t=at,(on===null?t.memoizedState:on.next)===null&&(t=t.alternate,q.H=t===null||t.memoizedState===null?Pb:Gb),e}function _c(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Zo(e);if(e.$$typeof===B)return;if(e.$$typeof===V)return An(e)}throw Error(a(438,String(e)))}function jh(e){var t=null,l=at.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var s=at.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Dc(),at.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),s=0;s<e;s++)l[s]=Oe;return t.index++,l}function zi(e,t){return typeof t=="function"?t(e):t}function kc(e){var t=sn();return Ah(t,Mt,e)}function Ah(e,t,l){var s=e.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=l;var o=e.baseQueue,u=s.pending;if(u!==null){if(o!==null){var y=o.next;o.next=u.next,u.next=y}t.baseQueue=o=u,s.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var R=y=null,k=null,Y=t,ee=!1;do{var fe=Y.lane&-536870913;if(fe!==Y.lane?(pt&fe)===fe:(Mi&fe)===fe){var P=Y.revertLane;if(P===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),fe===cr&&(ee=!0);else if((Mi&P)===P){Y=Y.next,P===cr&&(ee=!0);continue}else fe={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},k===null?(R=k=fe,y=u):k=k.next=fe,at.lanes|=P,vs|=P;fe=Y.action,gr&&l(u,fe),u=Y.hasEagerState?Y.eagerState:l(u,fe)}else P={lane:fe,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},k===null?(R=k=P,y=u):k=k.next=P,at.lanes|=fe,vs|=fe;Y=Y.next}while(Y!==null&&Y!==t);if(k===null?y=u:k.next=R,!ml(u,e.memoizedState)&&(un=!0,ee&&(l=pa,l!==null)))throw l;e.memoizedState=u,e.baseState=y,e.baseQueue=k,s.lastRenderedState=u}return o===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Nh(e){var t=sn(),l=t.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=e;var s=l.dispatch,o=l.pending,u=t.memoizedState;if(o!==null){l.pending=null;var y=o=o.next;do u=e(u,y.action),y=y.next;while(y!==o);ml(u,t.memoizedState)||(un=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),l.lastRenderedState=u}return[u,s]}function ub(e,t,l){var s=at,o=sn(),u=ct;if(u){if(l===void 0)throw Error(a(407));l=l()}else l=t();var y=!ml((Mt||o).memoizedState,l);if(y&&(o.memoizedState=l,un=!0),o=o.queue,Dh(db.bind(null,s,o,e),[e]),e=o.getSnapshot!==t||y||on!==null&&(on.memoizedState.tag&1)!==0,Sa(e?9:8,{destroy:void 0},fb.bind(null,s,o,l,t),null),e){if(s.flags|=2048,zt===null)throw Error(a(349));u||(Mi&127)!==0||cb(s,t,l)}return l}function cb(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=at.updateQueue,t===null?(t=Dc(),at.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function fb(e,t,l,s){t.value=l,t.getSnapshot=s,hb(t)&&mb(e)}function db(e,t,l){return l(function(){hb(t)&&mb(e)})}function hb(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!ml(e,l)}catch{return!0}}function mb(e){var t=ir(e,2);t!==null&&cl(t,e,2)}function Mh(e){var t=Zn();if(typeof e=="function"){var l=e;if(e=l(),gr){Zt(!0);try{l()}finally{Zt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:e},t}function gb(e,t,l,s){return e.baseState=l,Ah(e,Mt,typeof s=="function"?s:zi)}function Ww(e,t,l,s,o){if(Hc(e))throw Error(a(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){u.listeners.push(y)}};q.T!==null?l(!0):u.isTransition=!1,s(u),l=t.pending,l===null?(u.next=t.pending=u,pb(t,u)):(u.next=l.next,t.pending=l.next=u)}}function pb(e,t){var l=t.action,s=t.payload,o=e.state;if(t.isTransition){var u=q.T,y={};y.types=u!==null?u.types:null,q.T=y;try{var R=l(o,s),k=q.S;k!==null&&k(y,R),yb(e,t,R)}catch(Y){zh(e,t,Y)}finally{u!==null&&y.types!==null&&(u.types=y.types),q.T=u}}else try{u=l(o,s),yb(e,t,u)}catch(Y){zh(e,t,Y)}}function yb(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(s){bb(e,t,s)},function(s){return zh(e,t,s)}):bb(e,t,l)}function bb(e,t,l){t.status="fulfilled",t.value=l,vb(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,pb(e,l)))}function zh(e,t,l){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=l,vb(t),t=t.next;while(t!==s)}e.action=null}function vb(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function xb(e,t){return t}function Sb(e,t){if(ct){var l=zt.formState;if(l!==null){e:{var s=at;if(ct){if(_t){t:{for(var o=_t,u=Dl;o.nodeType!==8;){if(!u){o=null;break t}if(o=kl(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){_t=kl(o.nextSibling),s=o.data==="F!";break e}}as(s)}s=!1}s&&(t=l[0])}}return l=Zn(),l.memoizedState=l.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xb,lastRenderedState:t},l.queue=s,l=Vb.bind(null,at,s),s.dispatch=l,s=Mh(!1),u=Hh.bind(null,at,!1,s.queue),s=Zn(),o={state:t,dispatch:null,action:e,pending:null},s.queue=o,l=Ww.bind(null,at,o,u,l),o.dispatch=l,s.memoizedState=e,[t,l,!1]}function Eb(e){var t=sn();return Rb(t,Mt,e)}function Rb(e,t,l){if(t=Ah(e,t,xb)[0],e=kc(zi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Zo(t)}catch(y){throw y===ya?Cc:y}else s=t;t=sn();var o=t.queue,u=o.dispatch;return l!==t.memoizedState&&(at.flags|=2048,Sa(9,{destroy:void 0},eC.bind(null,o,l),null)),[s,u,e]}function eC(e,t){e.action=t}function wb(e){var t=sn(),l=Mt;if(l!==null)return Rb(t,l,e);sn(),t=t.memoizedState,l=sn();var s=l.queue.dispatch;return l.memoizedState=e,[t,s,!1]}function Sa(e,t,l,s){return e={tag:e,create:l,deps:s,inst:t,next:null},t=at.updateQueue,t===null&&(t=Dc(),at.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(s=l.next,l.next=e,e.next=s,t.lastEffect=e),e}function Cb(){return sn().memoizedState}function Lc(e,t,l,s){var o=Zn();at.flags|=e,o.memoizedState=Sa(1|t,{destroy:void 0},l,s===void 0?null:s)}function Uc(e,t,l,s){var o=sn();s=s===void 0?null:s;var u=o.memoizedState.inst;Mt!==null&&s!==null&&Rh(s,Mt.memoizedState.deps)?o.memoizedState=Sa(t,u,l,s):(at.flags|=e,o.memoizedState=Sa(1|t,u,l,s))}function Tb(e,t){Lc(8390656,8,e,t)}function Dh(e,t){Uc(2048,8,e,t)}function tC(e){at.flags|=4;var t=at.updateQueue;if(t===null)t=Dc(),at.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Ob(e){var t=sn().memoizedState;return tC({ref:t,nextImpl:e}),function(){if((Et&2)!==0)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function jb(e,t){return Uc(4,2,e,t)}function Ab(e,t){return Uc(4,4,e,t)}function Nb(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 Mb(e,t,l){l=l!=null?l.concat([e]):null,Uc(4,4,Nb.bind(null,t,e),l)}function _h(){}function zb(e,t){var l=sn();t=t===void 0?null:t;var s=l.memoizedState;return t!==null&&Rh(t,s[1])?s[0]:(l.memoizedState=[e,t],e)}function Db(e,t){var l=sn();t=t===void 0?null:t;var s=l.memoizedState;if(t!==null&&Rh(t,s[1]))return s[0];if(s=e(),gr){Zt(!0);try{e()}finally{Zt(!1)}}return l.memoizedState=[s,t],s}function kh(e,t,l){return l===void 0||(Mi&1073741824)!==0&&(pt&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Pv(),at.lanes|=e,vs|=e,l)}function _b(e,t,l,s){return ml(l,t)?l:hs.current!==null?(e=kh(e,l,s),ml(e,t)||(un=!0),e):(Mi&106)===0||(Mi&1073741824)!==0&&(pt&261930)===0?(un=!0,e.memoizedState=l):(e=Pv(),at.lanes|=e,vs|=e,t)}function kb(e,t,l,s,o){var u=le.p;le.p=u!==0&&8>u?u:8;var y=q.T,R={};R.types=y!==null?y.types:null,q.T=R,Hh(e,!1,t,l);try{var k=o(),Y=q.S;if(Y!==null&&Y(R,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var ee=Zw(k,s);Jo(e,t,ee,vl(e))}else Jo(e,t,s,vl(e))}catch(fe){Jo(e,t,{then:function(){},status:"rejected",reason:fe},vl())}finally{le.p=u,y!==null&&R.types!==null&&(y.types=R.types),q.T=y}}function nC(){}function Lh(e,t,l,s){if(e.tag!==5)throw Error(a(476));var o=Lb(e).queue;kb(e,o,t,pe,l===null?nC:function(){return Ub(e),l(s)})}function Lb(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:pe},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ub(e){var t=Lb(e);t.next===null&&(t=e.alternate.memoizedState),Jo(e,t.next.queue,{},vl())}function Uh(){return An(Va)}function Hb(){return sn().memoizedState}function Ib(){return sn().memoizedState}function lC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=vl();e=fs(l);var s=ds(t,e,l);s!==null&&(cl(s,t,l),Yo(s,t,l)),t={cache:fh()},e.payload=t;return}t=t.return}}function iC(e,t,l){var s=vl();l={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Hc(e)?Bb(t,l):(l=nh(e,t,l,s),l!==null&&(cl(l,e,s),qb(l,t,s)))}function Vb(e,t,l){var s=vl();Jo(e,t,l,s)}function Jo(e,t,l,s){var o={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Hc(e))Bb(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var y=t.lastRenderedState,R=u(y,l);if(o.hasEagerState=!0,o.eagerState=R,ml(R,y))return gc(e,t,o,0),zt===null&&mc(),!1}catch{}finally{}if(l=nh(e,t,o,s),l!==null)return cl(l,e,s),qb(l,t,s),!0}return!1}function Hh(e,t,l,s){if(s={lane:2,revertLane:jm(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Hc(e)){if(t)throw Error(a(479))}else t=nh(e,l,s,2),t!==null&&cl(t,e,2)}function Hc(e){var t=e.alternate;return e===at||t!==null&&t===at}function Bb(e,t){va=Mc=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function qb(e,t,l){if((l&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,l|=s,t.lanes=l,$r(e,l)}}var Ic={readContext:An,use:_c,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useLayoutEffect:$t,useInsertionEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useSyncExternalStore:$t,useId:$t,useHostTransitionStatus:$t,useFormState:$t,useActionState:$t,useOptimistic:$t,useMemoCache:$t,useCacheRefresh:$t,useEffectEvent:$t},Pb={readContext:An,use:_c,useCallback:function(e,t){return Zn().memoizedState=[e,t===void 0?null:t],e},useContext:An,useEffect:Tb,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Lc(4194308,4,Nb.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Lc(4194308,4,e,t)},useInsertionEffect:function(e,t){Lc(4,2,e,t)},useMemo:function(e,t){var l=Zn();t=t===void 0?null:t;var s=e();if(gr){Zt(!0);try{e()}finally{Zt(!1)}}return l.memoizedState=[s,t],s},useReducer:function(e,t,l){var s=Zn();if(l!==void 0){var o=l(t);if(gr){Zt(!0);try{l(t)}finally{Zt(!1)}}}else o=t;return s.memoizedState=s.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},s.queue=e,e=e.dispatch=iC.bind(null,at,e),[s.memoizedState,e]},useRef:function(e){var t=Zn();return e={current:e},t.memoizedState=e},useState:function(e){e=Mh(e);var t=e.queue,l=Vb.bind(null,at,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:_h,useDeferredValue:function(e,t){var l=Zn();return kh(l,e,t)},useTransition:function(){var e=Mh(!1);return e=kb.bind(null,at,e.queue,!0,!1),Zn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var s=at,o=Zn();if(ct){if(l===void 0)throw Error(a(407));l=l()}else{if(l=t(),zt===null)throw Error(a(349));(pt&127)!==0||cb(s,t,l)}o.memoizedState=l;var u={value:l,getSnapshot:t};return o.queue=u,Tb(db.bind(null,s,u,e),[e]),s.flags|=2048,Sa(9,{destroy:void 0},fb.bind(null,s,u,l,t),null),l},useId:function(){var e=Zn(),t=zt.identifierPrefix;if(ct){var l=ni,s=ti;l=(s&~(1<<32-Qe(s)-1)).toString(32)+l,t="_"+t+"R_"+l,l=zc++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Jw++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Uh,useFormState:Sb,useActionState:Sb,useOptimistic:function(e){var t=Zn();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Hh.bind(null,at,!0,l),l.dispatch=t,[e,t]},useMemoCache:jh,useCacheRefresh:function(){return Zn().memoizedState=lC.bind(null,at)},useEffectEvent:function(e){var t=Zn(),l={impl:e};return t.memoizedState=l,function(){if((Et&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},Gb={readContext:An,use:_c,useCallback:zb,useContext:An,useEffect:Dh,useImperativeHandle:Mb,useInsertionEffect:jb,useLayoutEffect:Ab,useMemo:Db,useReducer:kc,useRef:Cb,useState:function(){return kc(zi)},useDebugValue:_h,useDeferredValue:function(e,t){var l=sn();return _b(l,Mt.memoizedState,e,t)},useTransition:function(){var e=kc(zi)[0],t=sn().memoizedState;return[typeof e=="boolean"?e:Zo(e),t]},useSyncExternalStore:ub,useId:Hb,useHostTransitionStatus:Uh,useFormState:Eb,useActionState:Eb,useOptimistic:function(e,t){var l=sn();return gb(l,Mt,e,t)},useMemoCache:jh,useCacheRefresh:Ib,useEffectEvent:Ob},sC={readContext:An,use:_c,useCallback:zb,useContext:An,useEffect:Dh,useImperativeHandle:Mb,useInsertionEffect:jb,useLayoutEffect:Ab,useMemo:Db,useReducer:Nh,useRef:Cb,useState:function(){return Nh(zi)},useDebugValue:_h,useDeferredValue:function(e,t){var l=sn();return Mt===null?kh(l,e,t):_b(l,Mt.memoizedState,e,t)},useTransition:function(){var e=Nh(zi)[0],t=sn().memoizedState;return[typeof e=="boolean"?e:Zo(e),t]},useSyncExternalStore:ub,useId:Hb,useHostTransitionStatus:Uh,useFormState:wb,useActionState:wb,useOptimistic:function(e,t){var l=sn();return Mt!==null?gb(l,Mt,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:jh,useCacheRefresh:Ib,useEffectEvent:Ob};function Ih(e,t,l,s){t=e.memoizedState,l=l(s,t),l=l==null?t:_({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Vh={enqueueSetState:function(e,t,l){e=e._reactInternals;var s=vl(),o=fs(s);o.payload=t,l!=null&&(o.callback=l),t=ds(e,o,s),t!==null&&(cl(t,e,s),Yo(t,e,s))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var s=vl(),o=fs(s);o.tag=1,o.payload=t,l!=null&&(o.callback=l),t=ds(e,o,s),t!==null&&(cl(t,e,s),Yo(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=vl(),s=fs(l);s.tag=2,t!=null&&(s.callback=t),t=ds(e,s,l),t!==null&&(cl(t,e,l),Yo(t,e,l))}};function Yb(e,t,l,s,o,u,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,u,y):t.prototype&&t.prototype.isPureReactComponent?!Uo(l,s)||!Uo(o,u):!0}function Qb(e,t,l,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,s),t.state!==e&&Vh.enqueueReplaceState(t,t.state,null)}function pr(e,t){var l=t;if("ref"in t){l={};for(var s in t)s!=="ref"&&(l[s]=t[s])}if(e=e.defaultProps){l===t&&(l=_({},l));for(var o in e)l[o]===void 0&&(l[o]=e[o])}return l}function Kb(e){hc(e)}function Fb(e){console.error(e)}function Xb(e){hc(e)}function Vc(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Zb(e,t,l){try{var s=e.onCaughtError;s(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Bh(e,t,l){return l=fs(l),l.tag=3,l.payload={element:null},l.callback=function(){Vc(e,t)},l}function Jb(e){return e=fs(e),e.tag=3,e}function $b(e,t,l,s){var o=l.type.getDerivedStateFromError;if(typeof o=="function"){var u=s.value;e.payload=function(){return o(u)},e.callback=function(){Zb(t,l,s)}}var y=l.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Zb(t,l,s),typeof o!="function"&&(xs===null?xs=new Set([this]):xs.add(this));var R=s.stack;this.componentDidCatch(s.value,{componentStack:R!==null?R:""})})}function rC(e,t,l,s,o){if(l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=l.alternate,t!==null&&or(t,l,o,!0),l=Nn.current,l!==null){switch(l.tag){case 31:case 13:case 19:return Bn===null?of():l.alternate===null&&Wt===0&&(Wt=3),l.flags&=-257,l.flags|=65536,l.lanes=o,s===Tc?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([s]):t.add(s),Cm(e,s,o)),!1;case 22:return l.flags|=65536,s===Tc?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([s]):l.add(s)),Cm(e,s,o)),!1}throw Error(a(435,l.tag))}return Cm(e,s,o),of(),!1}if(ct)return t=Nn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,s!==ah&&(e=Error(a(422),{cause:s}),Vo(Nl(e,l)))):(s!==ah&&(t=Error(a(423),{cause:s}),Vo(Nl(t,l))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,s=Nl(s,l),o=Bh(e.stateNode,s,o),yh(e,o),Wt!==4&&(Wt=2)),!1;var u=Error(a(520),{cause:s});if(u=Nl(u,l),su===null?su=[u]:su.push(u),Wt!==4&&(Wt=2),t===null)return!0;s=Nl(s,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=o&-o,l.lanes|=e,e=Bh(l.stateNode,s,e),yh(l,e),!1;case 1:if(t=l.type,u=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(xs===null||!xs.has(u))))return l.flags|=65536,o&=-o,l.lanes|=o,o=Jb(o),$b(o,e,l,s),yh(l,o),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var qh=Error(a(461)),un=!1;function yn(e,t,l,s){t.child=e===null?nb(t,null,l,s):mr(t,e.child,l,s)}function Wb(e,t,l,s,o){l=l.render;var u=t.ref;if("ref"in s){var y={};for(var R in s)R!=="ref"&&(y[R]=s[R])}else y=s;return ur(t),s=wh(e,t,l,y,u,o),R=Ch(),e!==null&&!un?(Th(e,t,o),Di(e,t,o)):(ct&&R&&vc(t),t.flags|=1,yn(e,t,s,o),t.child)}function ev(e,t,l,s,o){if(e===null){var u=l.type;return typeof u=="function"&&!lh(u)&&u.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=u,tv(e,t,u,s,o)):(e=yc(l.type,null,s,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Zh(e,o)){var y=u.memoizedProps;if(l=l.compare,l=l!==null?l:Uo,l(y,s)&&e.ref===t.ref)return Di(e,t,o)}return t.flags|=1,e=Oi(u,s),e.ref=t.ref,e.return=t,t.child=e}function tv(e,t,l,s,o){if(e!==null){var u=e.memoizedProps;if(Uo(u,s)&&e.ref===t.ref)if(un=!1,t.pendingProps=s=u,Zh(e,o))(e.flags&131072)!==0&&(un=!0);else return t.lanes=e.lanes,Di(e,t,o)}return Ph(e,t,l,s,o)}function nv(e,t,l,s){var o=s.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|l:l,e!==null){for(s=t.child=e.child,o=0;s!==null;)o=o|s.lanes|s.childLanes,s=s.sibling;s=o&~u}else s=0,t.child=null;return lv(e,t,u,l,s)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&wc(t,u!==null?u.cachePool:null),u!==null?sb(t,u):vh(),rb(t);else return s=t.lanes=536870912,lv(e,t,u!==null?u.baseLanes|l:l,l,s)}else u!==null?(wc(t,u.cachePool),sb(t,u),gs(),t.memoizedState=null):(e!==null&&wc(t,null),vh(),gs());return yn(e,t,o,l),t.child}function $o(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function lv(e,t,l,s,o){var u=hh();return u=u===null?null:{parent:an._currentValue,pool:u},t.memoizedState={baseLanes:l,cachePool:u},e!==null&&wc(t,null),vh(),rb(t),e!==null&&or(e,t,s,!0),t.childLanes=o,null}function Bc(e,t){return t=qc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function iv(e,t,l){return mr(t,e.child,null,l),e=Bc(t,t.pendingProps),e.flags|=2,gl(t),t.memoizedState=null,e}function aC(e,t,l){var s=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ct){if(s.mode==="hidden")return e=Bc(t,s),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},$o(null,e);if(Sh(t),(e=_t)?(e=Nx(e,Dl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ss!==null?{id:ti,overflow:ni}:null,retryLane:536870912,hydrationErrors:null},l=By(e),l.return=t,t.child=l,Rn=t,_t=null)):e=null,e===null)throw as(t);return t.lanes=536870912,null}return Bc(t,s)}var u=e.memoizedState;if(u!==null){var y=u.dehydrated;if(Sh(t),o)if(t.flags&256)t.flags&=-257,t=iv(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(un||or(e,t,l,!1),o=(l&e.childLanes)!==0,un||o){if(hs.current===null){if(s=zt,s!==null&&(y=tc(s,l),y!==0&&y!==u.retryLane))throw u.retryLane=y,ir(e,y),cl(s,e,y),qh;of()}t=iv(e,t,l)}else e=u.treeContext,_t=kl(y.nextSibling),Rn=t,ct=!0,rs=null,Dl=!1,e!==null&&Gy(t,e),t=Bc(t,s),t.flags|=134221824;return t}return e=Oi(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ea(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(a(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Ph(e,t,l,s,o){return ur(t),l=wh(e,t,l,s,void 0,o),s=Ch(),e!==null&&!un?(Th(e,t,o),Di(e,t,o)):(ct&&s&&vc(t),t.flags|=1,yn(e,t,l,o),t.child)}function sv(e,t,l,s,o,u){return ur(t),t.updateQueue=null,l=ob(t,s,l,o),ab(e),s=Ch(),e!==null&&!un?(Th(e,t,u),Di(e,t,u)):(ct&&s&&vc(t),t.flags|=1,yn(e,t,l,u),t.child)}function rv(e,t,l,s,o){if(ur(t),t.stateNode===null){var u=da,y=l.contextType;typeof y=="object"&&y!==null&&(u=An(y)),u=new l(s,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Vh,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=s,u.state=t.memoizedState,u.refs={},gh(t),y=l.contextType,u.context=typeof y=="object"&&y!==null?An(y):da,u.state=t.memoizedState,y=l.getDerivedStateFromProps,typeof y=="function"&&(Ih(t,l,y,s),u.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(y=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),y!==u.state&&Vh.enqueueReplaceState(u,u.state,null),Ko(t,s,u,o),Qo(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){u=t.stateNode;var R=t.memoizedProps,k=pr(l,R);u.props=k;var Y=u.context,ee=l.contextType;y=da,typeof ee=="object"&&ee!==null&&(y=An(ee));var fe=l.getDerivedStateFromProps;ee=typeof fe=="function"||typeof u.getSnapshotBeforeUpdate=="function",R=t.pendingProps!==R,ee||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(R||Y!==y)&&Qb(t,u,s,y),cs=!1;var P=t.memoizedState;u.state=P,Ko(t,s,u,o),Qo(),Y=t.memoizedState,R||P!==Y||cs?(typeof fe=="function"&&(Ih(t,l,fe,s),Y=t.memoizedState),(k=cs||Yb(t,l,k,s,P,Y,y))?(ee||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=Y),u.props=s,u.state=Y,u.context=y,s=k):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{u=t.stateNode,ph(e,t),y=t.memoizedProps,ee=pr(l,y),u.props=ee,fe=t.pendingProps,P=u.context,Y=l.contextType,k=da,typeof Y=="object"&&Y!==null&&(k=An(Y)),R=l.getDerivedStateFromProps,(Y=typeof R=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(y!==fe||P!==k)&&Qb(t,u,s,k),cs=!1,P=t.memoizedState,u.state=P,Ko(t,s,u,o),Qo();var Z=t.memoizedState;y!==fe||P!==Z||cs||e!==null&&e.dependencies!==null&&Ec(e.dependencies)?(typeof R=="function"&&(Ih(t,l,R,s),Z=t.memoizedState),(ee=cs||Yb(t,l,ee,s,P,Z,k)||e!==null&&e.dependencies!==null&&Ec(e.dependencies))?(Y||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(s,Z,k),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(s,Z,k)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=Z),u.props=s,u.state=Z,u.context=k,s=ee):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),s=!1)}return u=s,Ea(e,t),s=(t.flags&128)!==0,u||s?(u=t.stateNode,l=s&&typeof l.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&s?(t.child=mr(t,e.child,null,o),t.child=mr(t,null,l,o)):yn(e,t,l,o),t.memoizedState=u.state,e=t.child):e=Di(e,t,o),e}function av(e,t,l,s){return rr(),t.flags|=256,yn(e,t,l,s),t.child}var Gh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yh(e){return{baseLanes:e,cachePool:Zy()}}function Qh(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=bl),e}function ov(e,t,l){var s=t.pendingProps,o=!1,u=(t.flags&128)!==0,y;if((y=u)||(y=e!==null&&e.memoizedState===null?!1:(Mn.current&2)!==0),y&&(o=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(ct){if(o?ms(t):gs(),(e=_t)?(e=Nx(e,Dl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ss!==null?{id:ti,overflow:ni}:null,retryLane:536870912,hydrationErrors:null},l=By(e),l.return=t,t.child=l,Rn=t,_t=null)):e=null,e===null)throw as(t);return Ym(e)?t.lanes=32:t.lanes=536870912,null}return u=s.children,s=s.fallback,o?(gs(),o=t.mode,u=qc({mode:"hidden",children:u},o),s=sr(s,o,l,null),u.return=t,s.return=t,u.sibling=s,t.child=u,s=t.child,s.memoizedState=Yh(l),s.childLanes=Qh(e,y,l),t.memoizedState=Gh,$o(null,s)):(ms(t),Kh(t,u))}var R=e.memoizedState;if(R!==null){var k=R.dehydrated;if(k!==null)return oC(e,t,u,y,s,k,R,l)}return o?(gs(),o=s.fallback,u=t.mode,R=e.child,k=R.sibling,s=Oi(R,{mode:"hidden",children:s.children}),s.subtreeFlags=R.subtreeFlags&1206910976,k!==null?o=Oi(k,o):(o=sr(o,u,l,null),o.flags|=2),o.return=t,s.return=t,s.sibling=o,t.child=s,$o(null,s),s=t.child,o=e.child.memoizedState,o===null?o=Yh(l):(u=o.cachePool,u!==null?(R=an._currentValue,u=u.parent!==R?{parent:R,pool:R}:u):u=Zy(),o={baseLanes:o.baseLanes|l,cachePool:u}),s.memoizedState=o,s.childLanes=Qh(e,y,l),t.memoizedState=Gh,$o(e.child,s)):(ms(t),l=e.child,e=l.sibling,l=Oi(l,{mode:"visible",children:s.children}),l.return=t,l.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=l,t.memoizedState=null,l)}function Kh(e,t){return t=qc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function qc(e,t){return e=rl(22,e,null,t),e.lanes=0,e}function Pc(e,t,l){return mr(t,e.child,null,l),e=Kh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function oC(e,t,l,s,o,u,y,R){if(l)return t.flags&256?(ms(t),t.flags&=-257,Pc(e,t,R)):t.memoizedState!==null?(gs(),t.child=e.child,t.flags|=128,null):(gs(),u=o.fallback,y=t.mode,o=qc({mode:"visible",children:o.children},y),u=sr(u,y,R,null),u.flags|=2,o.return=t,u.return=t,o.sibling=u,t.child=o,mr(t,e.child,null,R),o=t.child,o.memoizedState=Yh(R),o.childLanes=Qh(e,s,R),t.memoizedState=Gh,$o(null,o));if(ms(t),Ym(u)){if(s=u.nextSibling&&u.nextSibling.dataset,s)var k=s.dgst;return s=k,s!==""&&(o=Error(a(419)),o.stack="",o.digest=s,Vo({value:o,source:null,stack:null})),Pc(e,t,R)}if(un||or(e,t,R,!1),s=(R&e.childLanes)!==0,un||s){if(hs.current!==null)return Pc(e,t,R);if(s=zt,s!==null&&(o=tc(s,R),o!==0&&o!==y.retryLane))throw y.retryLane=o,ir(e,o),cl(s,e,o),qh;return Gm(u)||of(),Pc(e,t,R)}return Gm(u)?(t.flags|=192,t.child=e.child,null):(e=y.treeContext,_t=kl(u.nextSibling),Rn=t,ct=!0,rs=null,Dl=!1,e!==null&&Gy(t,e),t=Kh(t,o.children),t.flags|=134221824,t)}function uv(e,t,l){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Sc(e.return,t,l)}function cv(e){for(var t=null;e!==null;){var l=e.alternate;l!==null&&Nc(l)===null&&(t=e),e=e.sibling}return t}function Gc(e,t,l,s,o,u){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:l,tailMode:o,treeForkCount:u}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=s,y.tail=l,y.tailMode=o,y.treeForkCount=u)}function Fh(e){var t=e.child;for(e.child=null;t!==null;){var l=t.sibling;t.sibling=e.child,e.child=t,t=l}}function Xh(e,t,l){var s=t.pendingProps,o=s.revealOrder,u=s.tail;s=s.children;var y=Mn.current;if(t.flags&128)return Fo(t,y),null;var R=(y&2)!==0;if(R?(y=y&1|2,t.flags|=128):y&=1,Fo(t,y),o==="backwards"&&e!==null?(Fh(e),yn(e,t,s,l),Fh(e)):yn(e,t,s,l),s=ct?Io:0,!R&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uv(e,l,t);else if(e.tag===19)uv(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(o){case"backwards":l=cv(t.child),l===null?(o=t.child,t.child=null):(o=l.sibling,l.sibling=null,Fh(t)),Gc(t,!0,o,null,u,s);break;case"unstable_legacy-backwards":for(l=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Nc(e)===null){t.child=o;break}e=o.sibling,o.sibling=l,l=o,o=e}Gc(t,!0,l,null,u,s);break;case"together":Gc(t,!1,null,null,void 0,s);break;case"independent":t.memoizedState=null;break;default:l=cv(t.child),l===null?(o=t.child,t.child=null):(o=l.sibling,l.sibling=null),Gc(t,!1,o,l,u,s)}return t.child}function fv(e,t,l){var s=t.pendingProps;return os(t,t.type,s.value),yn(e,t,s.children,l),t.child}function Di(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),vs|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(or(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,l=Oi(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Oi(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Zh(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ec(e)))}function uC(e,t,l){switch(t.tag){case 3:ve(t,t.stateNode.containerInfo),os(t,an,e.memoizedState.cache),rr();break;case 27:case 5:xe(t);break;case 4:ve(t,t.stateNode.containerInfo);break;case 10:os(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Sh(t),null;break;case 13:var s=t.memoizedState;if(s!==null){if(s.dehydrated!==null)return ms(t),t.flags|=128,null;s=or(e,t,l,!1);var o=t.child.childLanes;return s||(l&o)!==0?ov(e,t,l):(ms(t),e=Di(e,t,l),e!==null?e.sibling:null)}ms(t);break;case 19:if(t.flags&128)return Xh(e,t,l);if(o=(e.flags&128)!==0,s=(l&t.childLanes)!==0,s||(or(e,t,l,!1),s=(l&t.childLanes)!==0),o){if(s)return Xh(e,t,l);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Fo(t,Mn.current),s)break;return null;case 22:return t.lanes=0,nv(e,t,l,t.pendingProps);case 24:os(t,an,e.memoizedState.cache)}return Di(e,t,l)}function dv(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)un=!0;else{if(!Zh(e,l)&&(t.flags&128)===0)return un=!1,uC(e,t,l);un=(e.flags&131072)!==0}else un=!1,ct&&(t.flags&1048576)!==0&&Py(t,Io,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=dr(t.elementType),t.type=e,typeof e=="function")lh(e)?(s=pr(e,s),t.tag=1,t=rv(null,t,e,s,l)):(t.tag=0,t=Ph(null,t,e,s,l));else{if(e!=null){var o=e.$$typeof;if(o===H){t.tag=11,t=Wb(null,t,e,s,l);break e}else if(o===re){t.tag=14,t=ev(null,t,e,s,l);break e}else if(o===V){t.tag=10,t.type=e,t=fv(null,t,l);break e}}throw t=me(e)||e,Error(a(306,t,""))}}return t;case 0:return Ph(e,t,t.type,t.pendingProps,l);case 1:return s=t.type,o=pr(s,t.pendingProps),rv(e,t,s,o,l);case 3:e:{if(ve(t,t.stateNode.containerInfo),e===null)throw Error(a(387));s=t.pendingProps;var u=t.memoizedState;o=u.element,ph(e,t),Ko(t,s,null,l);var y=t.memoizedState;if(s=y.cache,os(t,an,s),s!==u.cache&&ch(t,[an],l,!0),Qo(),s=y.element,u.isDehydrated)if(u={element:s,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=av(e,t,s,l);break e}else if(s!==o){o=Nl(Error(a(424)),t),Vo(o),t=av(e,t,s,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(_t=kl(e.firstChild),Rn=t,ct=!0,rs=null,Dl=!0,l=nb(t,null,s,l),t.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(rr(),s===o){t=Di(e,t,l);break e}yn(e,t,s,l)}t=t.child}return t;case 26:return Ea(e,t),e===null?(l=Ux(t.type,null,t.pendingProps,null))?t.memoizedState=l:ct||(t.stateNode=px(t.type,t.pendingProps,je.current,t)):t.memoizedState=Ux(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return xe(t),e===null&&ct&&(s=t.stateNode=Dx(t.type,t.pendingProps,je.current),Rn=t,Dl=!0,o=_t,Rs(t.type)?(Qm=o,_t=kl(s.firstChild)):_t=o),yn(e,t,t.pendingProps.children,l),Ea(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ct&&((o=s=_t)&&(s=lT(s,t.type,t.pendingProps,Dl),s!==null?(t.stateNode=s,Rn=t,_t=kl(s.firstChild),Dl=!1,o=!0):o=!1),o||as(t)),xe(t),o=t.type,u=t.pendingProps,y=e!==null?e.memoizedProps:null,s=u.children,Um(o,u)?s=null:y!==null&&Um(o,y)&&(t.flags|=32),t.memoizedState!==null&&(o=wh(e,t,$w,null,null,l),Va._currentValue=o),Ea(e,t),yn(e,t,s,l),t.child;case 6:return e===null&&ct&&((e=l=_t)&&(l=iT(l,t.pendingProps,Dl),l!==null?(t.stateNode=l,Rn=t,_t=null,e=!0):e=!1),e||as(t)),null;case 13:return ov(e,t,l);case 4:return ve(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=mr(t,null,s,l):yn(e,t,s,l),t.child;case 11:return Wb(e,t,t.type,t.pendingProps,l);case 7:return s=t.pendingProps,Ea(e,t),yn(e,t,s,l),t.child;case 8:return yn(e,t,t.pendingProps.children,l),t.child;case 12:return yn(e,t,t.pendingProps.children,l),t.child;case 10:return fv(e,t,l);case 9:return o=t.type._context,s=t.pendingProps.children,ur(t),o=An(o),s=s(o),t.flags|=1,yn(e,t,s,l),t.child;case 14:return ev(e,t,t.type,t.pendingProps,l);case 15:return tv(e,t,t.type,t.pendingProps,l);case 19:return Xh(e,t,l);case 31:return aC(e,t,l);case 22:return nv(e,t,l,t.pendingProps);case 24:return ur(t),s=An(an),e===null?(o=hh(),o===null&&(o=zt,u=fh(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=l),o=u),t.memoizedState={parent:s,cache:o},gh(t),os(t,an,o)):((e.lanes&l)!==0&&(ph(e,t),Ko(t,null,null,l),Qo()),o=e.memoizedState,u=t.memoizedState,o.parent!==s?(o={parent:s,cache:s},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),os(t,an,s)):(s=u.cache,os(t,an,s),s!==o.cache&&ch(t,[an],l,!0))),yn(e,t,t.pendingProps.children,l),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),s=t.pendingProps,s.name!=null&&s.name!=="auto"?t.flags|=e===null?18882560:18874368:ct&&vc(t),e!==null&&e.memoizedProps.name!==s.name?t.flags|=4194816:Ea(e,t),yn(e,t,s.children,l),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function _i(e){e.flags|=4}function Jh(e,t,l,s,o){var u;if((u=(e.mode&32)!==0)&&(u=l===null?Bx(t,s):Bx(t,s)&&(s.src!==l.src||s.srcSet!==l.srcSet)),u){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Kv())e.flags|=8192;else throw hr=Tc,mh}else e.flags&=-16777217}function hv(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!qx(t))if(Kv())e.flags|=8192;else throw hr=Tc,mh}function Yc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ec():536870912,e.lanes|=t,Oa|=t)}function Wo(e,t){if(!ct)switch(e.tailMode){case"visible":break;case"collapsed":for(var l=e.tail,s=null;l!==null;)l.alternate!==null&&(s=l),l=l.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null;break;default:for(t=e.tail,l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null}}function kt(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,s=0;if(t)for(var o=e.child;o!==null;)l|=o.lanes|o.childLanes,s|=o.subtreeFlags&1206910976,s|=o.flags&1206910976,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)l|=o.lanes|o.childLanes,s|=o.subtreeFlags,s|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=s,e.childLanes=l,t}function cC(e,t,l){var s=t.pendingProps;switch(rh(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kt(t),null;case 1:return kt(t),null;case 3:return l=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ni(an),we(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ga(t)?_i(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,oh())),kt(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(_i(t),u!==null?(kt(t),hv(t,u)):(kt(t),Jh(t,o,null,s,l))):u?u!==e.memoizedState?(_i(t),kt(t),hv(t,u)):(kt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&_i(t),kt(t),Jh(t,o,e,s,l)),null;case 27:if(Xe(t),l=je.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&_i(t);else{if(!s){if(t.stateNode===null)throw Error(a(166));return kt(t),t.subtreeFlags&=-33554433,null}e=Ce.current,ga(t)?Yy(t):(e=Dx(o,s,l),t.stateNode=e,_i(t))}return kt(t),t.subtreeFlags&=-33554433,null;case 5:if(Xe(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&_i(t);else{if(!s){if(t.stateNode===null)throw Error(a(166));return kt(t),t.subtreeFlags&=-33554433,null}if(u=Ce.current,ga(t))Yy(t);else{var y=cu(je.current);switch(u){case 1:u=y.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:u=y.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":u=y.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":u=y.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":u=y.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof s.is=="string"?y.createElement("select",{is:s.is}):y.createElement("select"),s.multiple?u.multiple=!0:s.size&&(u.size=s.size);break;default:u=typeof s.is=="string"?y.createElement(o,{is:s.is}):y.createElement(o)}}u[Ut]=t,u[In]=s;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)u.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=u;e:switch(Dn(u,o,s),o){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&_i(t)}}return kt(t),t.subtreeFlags&=-33554433,Jh(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&_i(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(a(166));if(e=je.current,ga(t)){if(e=t.stateNode,l=t.memoizedProps,s=null,o=Rn,o!==null)switch(o.tag){case 27:case 5:s=o.memoizedProps}e[Ut]=t,e=!!(e.nodeValue===l||s!==null&&s.suppressHydrationWarning===!0||dx(e.nodeValue,l)),e||as(t,!0)}else e=cu(e).createTextNode(s),e[Ut]=t,t.stateNode=e}return kt(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(s=ga(t),l!==null){if(e===null){if(!s)throw Error(a(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(557));e[Ut]=t}else rr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;kt(t),e=!1}else l=oh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(gl(t),t):(gl(t),null);if((t.flags&128)!==0)throw Error(a(558))}return kt(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=ga(t),s!==null&&s.dehydrated!==null){if(e===null){if(!o)throw Error(a(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(a(317));o[Ut]=t}else rr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;kt(t),o=!1}else o=oh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(gl(t),t):(gl(t),null)}return gl(t),(t.flags&128)!==0?(t.lanes=l,t):(l=s!==null,e=e!==null&&e.memoizedState!==null,l&&(s=t.child,o=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(o=s.alternate.memoizedState.cachePool.pool),u=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),u!==o&&(s.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Yc(t,t.updateQueue),kt(t),null);case 4:return we(),e===null&&zm(t.stateNode.containerInfo),t.flags|=67108864,kt(t),null;case 10:return Ni(t.type),kt(t),null;case 19:if(Eh(t),s=t.memoizedState,s===null)return kt(t),null;if(o=(t.flags&128)!==0,u=s.rendering,u===null)if(o)Wo(s,!1);else{if(Wt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Nc(e),u!==null){for(t.flags|=128,Wo(s,!1),e=u.updateQueue,t.updateQueue=e,Yc(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Vy(l,e),l=l.sibling;return Fo(t,Mn.current&1|2),ct&&ji(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&it()>lf&&(t.flags|=128,o=!0,Wo(s,!1),t.lanes=4194304)}else{if(!o)if(e=Nc(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Yc(t,e),Wo(s,!0),s.tail===null&&s.tailMode!=="collapsed"&&s.tailMode!=="visible"&&!u.alternate&&!ct)return kt(t),null}else 2*it()-s.renderingStartTime>lf&&l!==536870912&&(t.flags|=128,o=!0,Wo(s,!1),t.lanes=4194304);s.isBackwards?(u.sibling=t.child,t.child=u):(e=s.last,e!==null?e.sibling=u:t.child=u,s.last=u)}if(s.tail!==null){e=s.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return s.rendering=e,s.tail=e.sibling,s.renderingStartTime=it(),e.sibling=null,u=Mn.current,u=o?u&1|2:u&1,s.tailMode==="visible"||s.tailMode==="collapsed"||!l||ct?Fo(t,u):(l=u,de(Nn,t),de(Mn,l),Bn===null&&(Bn=t)),ct&&ji(t,s.treeForkCount),e}return kt(t),null;case 22:case 23:return gl(t),xh(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(l&536870912)!==0&&(t.flags&128)===0&&(kt(t),t.subtreeFlags&6&&(t.flags|=8192)):kt(t),l=t.updateQueue,l!==null&&Yc(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==l&&(t.flags|=2048),e!==null&&ye(fr),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ni(an),kt(t),null;case 25:return null;case 30:return t.flags|=33554432,kt(t),null}throw Error(a(156,t.tag))}function fC(e,t){switch(rh(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ni(an),we(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Xe(t),null;case 31:if(t.memoizedState!==null){if(gl(t),t.alternate===null)throw Error(a(340));rr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(gl(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));rr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Eh(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return we(),null;case 10:return Ni(t.type),null;case 22:case 23:return gl(t),xh(),e!==null&&ye(fr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ni(an),null;case 25:return null;default:return null}}function mv(e,t){switch(rh(t),t.tag){case 3:Ni(an),we();break;case 26:case 27:case 5:Xe(t);break;case 4:we();break;case 31:t.memoizedState!==null&&gl(t);break;case 13:gl(t);break;case 19:Eh(t);break;case 10:Ni(t.type);break;case 22:case 23:gl(t),xh(),e!==null&&ye(fr);break;case 24:Ni(an)}}function eu(e,t){try{var l=t.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var o=s.next;l=o;do{if((l.tag&e)===e){s=void 0;var u=l.create,y=l.inst;s=u(),y.destroy=s}l=l.next}while(l!==o)}}catch(R){jt(t,t.return,R)}}function ps(e,t,l){try{var s=t.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var u=o.next;s=u;do{if((s.tag&e)===e){var y=s.inst,R=y.destroy;if(R!==void 0){y.destroy=void 0,o=t;var k=l,Y=R;try{Y()}catch(ee){jt(o,k,ee)}}}s=s.next}while(s!==u)}}catch(ee){jt(t,t.return,ee)}}function gv(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{ib(t,l)}catch(s){jt(e,e.return,s)}}}function pv(e,t,l){l.props=pr(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(s){jt(e,t,s)}}function li(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:var o=e.stateNode,u=Ci(e.memoizedProps,o);(o.ref===null||o.ref.name!==u)&&(o.ref=Rx(u)),s=o.ref;break;case 7:if(e.stateNode===null){var y=new xl(e);b(e.child,!1,tT,y,void 0,void 0),e.stateNode=y}s=e.stateNode;break;default:s=e.stateNode}typeof l=="function"?e.refCleanup=l(s):l.current=s}}catch(R){jt(e,t,R)}}function zn(e,t){var l=e.ref,s=e.refCleanup;if(l!==null)if(typeof s=="function")try{s()}catch(o){jt(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(o){jt(e,t,o)}else l.current=null}function Qc(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l<t.length;l++)Ax(e.stateNode,t[l])}function yv(e){for(var t=e.return;t!==null&&(Wh(t)&&Ax(e.stateNode,t.stateNode),!$h(t));)t=t.return}function tu(e){for(var t=e.return;t!==null&&(Wh(t)&&nT(e.stateNode,t.stateNode),!$h(t));)t=t.return}function $h(e){return e.tag===5||e.tag===3||e.tag===27}function Wh(e){return e&&e.tag===7&&e.stateNode!==null}function em(e){var t=e.type,l=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&s.focus();break e;case"img":l.src?s.src=l.src:l.srcSet&&(s.srcset=l.srcSet)}}catch(o){jt(e,e.return,o)}}function tm(e,t,l){try{var s=e.stateNode;UC(s,e.type,l,t),s[In]=t}catch(o){jt(e,e.return,o)}}function bv(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Rs(e.type)||e.tag===4}function nm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bv(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&&Rs(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 lm(e,t,l,s){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(o,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(o),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=ei)),Qc(e,s),Ie=!0;else if(o!==4&&(o===27&&(Qc(e,s),s=null,Rs(e.type)&&(l=e.stateNode,t=null)),e=e.child,e!==null))for(lm(e,t,l,s),e=e.sibling;e!==null;)lm(e,t,l,s),e=e.sibling}function Kc(e,t,l,s){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?l.insertBefore(o,t):l.appendChild(o),Qc(e,s),Ie=!0;else if(o!==4&&(o===27&&(Qc(e,s),s=null,Rs(e.type)&&(l=e.stateNode)),e=e.child,e!==null))for(Kc(e,t,l,s),e=e.sibling;e!==null;)Kc(e,t,l,s),e=e.sibling}function vv(e){var t=e.stateNode,l=e.memoizedProps;try{for(var s=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Dn(t,s,l),t[Ut]=e,t[In]=l}catch(u){jt(e,e.return,u)}}var Fc=!1,pl=null;function xv(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(Fc=!0)}var ii=null;function Sv(){var e=ii;return ii=null,e}var al=0;function Ra(e,t,l,s,o){return al=0,Ev(e.child,t,l,s,o)}function Ev(e,t,l,s,o){for(var u=!1;e!==null;){if(e.tag===5){var y=e.stateNode;if(s!==null){var R=Vm(y);s.push(R),R.view&&(u=!0)}else u||Vm(y).view&&(u=!0);Fc=!0,Sx(y,al===0?t:t+"_"+al,l),al++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&o||Ev(e.child,t,l,s,o)&&(u=!0));e=e.sibling}return u}function si(e,t){for(;e!==null;)e.tag===5?Ex(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||si(e.child,t)),e=e.sibling}function Xc(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Xc(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(a(544));var l=t.name;t=Ti(t.default,t.share),t!=="none"&&(Ra(e,l,t,null,!1)||si(e.child,!1))}e=e.sibling}}function im(e,t){if(e.tag===30){var l=e.stateNode,s=e.memoizedProps,o=Ci(s,l),u=Ti(s.default,l.paired?s.share:s.enter);u!=="none"?Ra(e,o,u,null,!1)?(Xc(e),l.paired||t||Ma(e,s.onEnter)):si(e.child,!1):Xc(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)im(e,t),e=e.sibling;else Xc(e)}function sm(e){if(pl!==null&&pl.size!==0){var t=pl;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var l=e.memoizedProps,s=l.name;if(s!=null&&s!=="auto"){var o=t.get(s);if(o!==void 0){var u=Ti(l.default,l.share);if(u!=="none"&&(Ra(e,s,u,null,!1)?(u=e.stateNode,o.paired=u,u.paired=o,Ma(e,l.onShare)):si(e.child,!1)),t.delete(s),t.size===0)break}}}sm(e)}e=e.sibling}}}function rm(e){if(e.tag===30){var t=e.memoizedProps,l=Ci(t,e.stateNode),s=pl!==null?pl.get(l):void 0,o=Ti(t.default,s!==void 0?t.share:t.exit);o!=="none"&&(Ra(e,l,o,null,!1)?s!==void 0?(o=e.stateNode,s.paired=o,o.paired=s,pl.delete(l),Ma(e,t.onShare)):Ma(e,t.onExit):si(e.child,!1)),pl!==null&&sm(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)rm(e),e=e.sibling;else pl!==null&&sm(e)}function Rv(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,l=Ci(t,e.stateNode);t=Ti(t.default,t.update),e.flags&=-5,t!=="none"&&Ra(e,l,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&Rv(e);e=e.sibling}}function am(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,si(e.child,!1))}am(e)}e=e.sibling}}function Zc(e){if(e.tag===30)e.stateNode.paired=null,si(e.child,!1),am(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Zc(e),e=e.sibling;else am(e)}function wv(e){for(e=e.child;e!==null;)e.tag===30?si(e.child,!1):(e.subtreeFlags&33554432)!==0&&wv(e),e=e.sibling}function om(e,t,l,s,o,u,y){for(var R=!1;t!==null;){if(t.tag===5){var k=t.stateNode;if(u!==null&&al<u.length){var Y=u[al],ee=Vm(k);(Y.view||ee.view)&&(R=!0);var fe;if(fe=(e.flags&4)===0)if(ee.clip)fe=!0;else{fe=Y.rect;var P=ee.rect;fe=fe.y!==P.y||fe.x!==P.x||fe.height!==P.height||fe.width!==P.width}fe&&(e.flags|=4),ee.abs?ee=!Y.abs:(Y=Y.rect,ee=ee.rect,ee=Y.height!==ee.height||Y.width!==ee.width),ee&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&Sx(k,al===0?l:l+"_"+al,o),R&&(e.flags&4)!==0||(ii===null&&(ii=[]),ii.push(k,al===0?s:s+"_"+al,t.memoizedProps)),al++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&y?e.flags|=t.flags&32:om(e,t.child,l,s,o,u,y)&&(R=!0));t=t.sibling}return R}function Cv(e,t){for(e=e.child;e!==null;){if(e.tag===30){var l=e.memoizedProps,s=e.stateNode,o=Ci(l,s),u=Ti(l.default,l.update),y;y=e.memoizedState,e.memoizedState=null,s=e;var R=e.child;al=0,o=om(s,R,o,o,u,y,!1),(e.flags&4)!==0&&o&&Ma(e,l.onUpdate)}else(e.subtreeFlags&33554432)!==0&&Cv(e);e=e.sibling}}var wn=!1,Ct=!1,ri=!1,um=!1,Tv=typeof WeakSet=="function"?WeakSet:Set,Cn=null,ai=!1,nu=!1,Jc=!1,cm=!1;function dC(e,t,l){if(e=e.containerInfo,km=Ba,e=Ny(e),Zd(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var u=o.anchorOffset,y=o.focusNode;o=o.focusOffset;try{s.nodeType,y.nodeType}catch{s=null;break e}var R=0,k=-1,Y=-1,ee=0,fe=0,P=e,Z=null;t:for(;;){for(var Te;P!==s||u!==0&&P.nodeType!==3||(k=R+u),P!==y||o!==0&&P.nodeType!==3||(Y=R+o),P.nodeType===3&&(R+=P.nodeValue.length),(Te=P.firstChild)!==null;)Z=P,P=Te;for(;;){if(P===e)break t;if(Z===s&&++ee===u&&(k=R),Z===y&&++fe===o&&(Y=R),(Te=P.nextSibling)!==null)break;P=Z,Z=P.parentNode}P=Te}s=k===-1||Y===-1?null:{start:k,end:Y}}else s=null}s=s||{start:0,end:0}}else s=null;for(Lm={focusedElem:e,selectionRange:s},Ba=!1,l=(l&335544064)===l,Cn=t,t=l?9270:1024;Cn!==null;){if(e=Cn,l&&(s=e.deletions,s!==null))for(u=0;u<s.length;u++)l&&rm(s[u]);if(e.alternate===null&&(e.flags&2)!==0)l&&xv(e),$c(l);else{if(e.tag===22){if(s=e.alternate,e.memoizedState!==null){s!==null&&s.memoizedState===null&&l&&rm(s),$c(l);continue}else if(s!==null&&s.memoizedState!==null){l&&xv(e),$c(l);continue}}s=e.child,(e.subtreeFlags&t)!==0&&s!==null?(s.return=e,Cn=s):(l&&Rv(e),$c(l))}}pl=null}function $c(e){for(;Cn!==null;){var t=Cn,l=e,s=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((o&1024)!==0&&s!==null){l=void 0,o=s.memoizedProps,s=s.memoizedState;var u=t.stateNode;try{var y=pr(t.type,o);l=u.getSnapshotBeforeUpdate(y,s),u.__reactInternalSnapshotBeforeUpdate=l}catch(R){jt(t,t.return,R)}}break;case 3:if((o&1024)!==0){if(s=t.stateNode.containerInfo,l=s.nodeType,l===9)Pm(s);else if(l===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":Pm(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&s!==null&&(l=Ci(s.memoizedProps,s.stateNode),o=t.memoizedProps,o=Ti(o.default,o.update),o!=="none"&&Ra(s,l,o,s.memoizedState=[],!0));break;default:if((o&1024)!==0)throw Error(a(163))}if(s=t.sibling,s!==null){s.return=t.return,Cn=s;break}Cn=t.return}}function Ov(e,t,l){var s=l.flags;switch(l.tag){case 0:case 11:case 15:oi(e,l),s&4&&eu(5,l);break;case 1:if(oi(e,l),s&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(y){jt(l,l.return,y)}else{var o=pr(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){jt(l,l.return,y)}}s&64&&gv(l),s&512&&li(l,l.return);break;case 3:if(oi(e,l),s&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{ib(e,t)}catch(y){jt(l,l.return,y)}}break;case 27:t===null&&s&4&&vv(l);case 26:case 5:oi(e,l),t===null&&s&4&&em(l),s&512&&li(l,l.return);break;case 12:oi(e,l);break;case 31:oi(e,l),s&4&&Mv(e,l);break;case 13:oi(e,l),s&4&&zv(e,l),s&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=wC.bind(null,l),sT(e,l))));break;case 22:if(s=l.memoizedState!==null||wn,!s){var u=t!==null&&t.memoizedState!==null||Ct;t=wn,o=Ct,wn=s,(Ct=u)&&!o?(s=2,(l.subtreeFlags&8772)!==0&&(s|=1),Kl(e,l,s)):oi(e,l),wn=t,Ct=o}break;case 30:oi(e,l),s&512&&li(l,l.return);break;case 7:s&512&&li(l,l.return);default:oi(e,l)}}function fm(e,t){for(e=e.child;e!==null;)jv(e,t),e=e.sibling}function jv(e,t){switch(e.tag){case 5:case 26:try{var l=e.stateNode;if(t){var s=l.style;typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"}else{var o=e.stateNode,u=e.memoizedProps.style,y=u!=null&&u.hasOwnProperty("display")?u.display:null;o.style.display=y==null||typeof y=="boolean"?"":(""+y).trim()}}catch(k){jt(e,e.return,k)}dm(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Ie=!0}catch(k){jt(e,e.return,k)}break;case 18:try{var R=e.stateNode;t?xx(R,!0):xx(e.stateNode,!1)}catch(k){jt(e,e.return,k)}break;case 22:case 23:e.memoizedState===null&&fm(e,t);break;default:fm(e,t)}}function dm(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var l=e,s=t;switch(l.tag){case 4:jv(l,s);break e;case 22:l.memoizedState===null&&dm(l,s);break e;default:dm(l,s)}}e=e.sibling}}function Av(e){var t=e.alternate;t!==null&&(e.alternate=null,Av(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&la(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 Ht=null,ol=!1;function Yl(e,t,l){for(l=l.child;l!==null;)Nv(e,t,l),l=l.sibling}function Nv(e,t,l){if(Yt&&typeof Yt.onCommitFiberUnmount=="function")try{Yt.onCommitFiberUnmount(pn,l)}catch{}switch(l.tag){case 26:Ct||zn(l,t),Yl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!Ct&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ct||zn(l,t),tu(l);var s=Ht,o=ol;Rs(l.type)&&(Ht=l.stateNode,ol=!1),Yl(e,t,l),_x(l.stateNode,l.type,l.memoizedProps),Ht=s,ol=o;break;case 5:Ct||zn(l,t),tu(l);case 6:if(l.tag===6&&tu(l),s=Ht,o=ol,Ht=null,Yl(e,t,l),Ht=s,ol=o,Ht!==null)if(ol)try{(Ht.nodeType===9?Ht.body:Ht.nodeName==="HTML"?Ht.ownerDocument.body:Ht).removeChild(l.stateNode),Ie=!0}catch(u){jt(l,t,u)}else try{Ht.removeChild(l.stateNode),Ie=!0}catch(u){jt(l,t,u)}break;case 18:Ht!==null&&(ol?(e=Ht,vx(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),qa(e)):vx(Ht,l.stateNode));break;case 4:s=Ht,o=ol,Ht=l.stateNode.containerInfo,ol=!0,Yl(e,t,l),Ht=s,ol=o;break;case 0:case 11:case 14:case 15:ps(2,l,t),Ct||ps(4,l,t),Yl(e,t,l);break;case 1:Ct||(zn(l,t),s=l.stateNode,typeof s.componentWillUnmount=="function"&&pv(l,t,s)),Yl(e,t,l);break;case 21:Yl(e,t,l);break;case 22:Ct=(s=Ct)||l.memoizedState!==null,Yl(e,t,l),Ct=s;break;case 30:zn(l,t),Yl(e,t,l);break;case 7:Ct||zn(l,t),Yl(e,t,l);break;default:Yl(e,t,l)}}function Mv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{qa(e)}catch(l){jt(t,t.return,l)}}}function zv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{qa(e)}catch(l){jt(t,t.return,l)}}function hC(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Tv),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Tv),t;default:throw Error(a(435,e.tag))}}function Wc(e,t){var l=hC(e);t.forEach(function(s){if(!l.has(s)){l.add(s);var o=CC.bind(null,e,s);s.then(o,o)}})}function Jn(e,t,l){var s=t.deletions;if(s!==null)for(var o=0;o<s.length;o++){var u=s[o],y=e,R=t,k=R;e:for(;k!==null;){switch(k.tag){case 27:if(Rs(k.type)){Ht=k.stateNode,ol=!1;break e}break;case 5:Ht=k.stateNode,ol=!1;break e;case 3:case 4:Ht=k.stateNode.containerInfo,ol=!0;break e}k=k.return}if(Ht===null)throw Error(a(160));Nv(y,R,u),Ht=null,ol=!1,y=u.alternate,y!==null&&(y.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Dv(t,e,l),t=t.sibling}var Ql=null;function Dv(e,t,l){var s=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(o&4&&(s=e.updateQueue,s=s!==null?s.events:null,s!==null))for(var u=0;u<s.length;u++){var y=s[u];y.ref.impl=y.nextImpl}Jn(t,e,l),$n(e),o&4&&(ps(3,e,e.return),eu(3,e),ps(5,e,e.return));break;case 1:Jn(t,e,l),$n(e),o&512&&(Ct||s===null||zn(s,s.return)),o&64&&wn&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?t:l.concat(t))));break;case 26:if(u=Ql,Jn(t,e,l),$n(e),o&512&&(Ct||s===null||zn(s,s.return)),o&4)if(o=s!==null?s.memoizedState:null,l=e.memoizedState,s===null)if(l===null)if(e.stateNode===null)if(wn)e.stateNode=px(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,l=e.memoizedProps,o=u.ownerDocument||u;t:switch(t){case"title":s=o.getElementsByTagName("title")[0],(!s||s[xi]||s[Ut]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=o.createElement(t),o.head.insertBefore(s,o.querySelector("head > title"))),Dn(s,t,l),s[Ut]=e,Jt(s),t=s;break e;case"link":if(u=Vx("link","href",o).get(t+(l.href||""))){for(y=0;y<u.length;y++)if(s=u[y],s.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&s.getAttribute("rel")===(l.rel==null?null:l.rel)&&s.getAttribute("title")===(l.title==null?null:l.title)&&s.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){u.splice(y,1);break t}}s=o.createElement(t),Dn(s,t,l),o.head.appendChild(s);break;case"meta":if(u=Vx("meta","content",o).get(t+(l.content||""))){for(y=0;y<u.length;y++)if(s=u[y],s.getAttribute("content")===(l.content==null?null:""+l.content)&&s.getAttribute("name")===(l.name==null?null:l.name)&&s.getAttribute("property")===(l.property==null?null:l.property)&&s.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&s.getAttribute("charset")===(l.charSet==null?null:l.charSet)){u.splice(y,1);break t}}s=o.createElement(t),Dn(s,t,l),o.head.appendChild(s);break;default:throw Error(a(468,t))}s[Ut]=e,Jt(s),t=s}e.stateNode=t}else wn||Zm(u,e.type,e.stateNode);else e.stateNode=Ix(u,l,e.memoizedProps);else o!==l?(o===null?(t=s.stateNode,t===null||Ct||t.parentNode.removeChild(t)):o.count--,l===null?wn||Zm(u,e.type,e.stateNode):Ix(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&tm(e,e.memoizedProps,s.memoizedProps);break;case 27:Jn(t,e,l),$n(e),o&512&&(Ct||s===null||zn(s,s.return)),s!==null&&o&4&&tm(e,e.memoizedProps,s.memoizedProps);break;case 5:if(u=ri,ri=!1,Jn(t,e,l),ri=u,$n(e),o&512&&(Ct||s===null||zn(s,s.return)),e.flags&32){t=e.stateNode;try{sa(t,""),Ie=!0}catch(ee){jt(e,e.return,ee)}}o&4&&e.stateNode!=null&&(t=e.memoizedProps,tm(e,t,s!==null?s.memoizedProps:t)),o&1024&&(um=!0);break;case 6:if(Jn(t,e,l),$n(e),o&4){if(e.stateNode===null)throw Error(a(162));t=e.memoizedProps,l=e.stateNode;try{l.nodeValue=t,Ie=!0}catch(ee){jt(e,e.return,ee)}}break;case 3:if(Ie=!1,gf=null,u=Ql,Ql=fu(t.containerInfo),Jn(t,e,l),Ql=u,$n(e),o&4&&s!==null&&s.memoizedState.isDehydrated)try{qa(t.containerInfo)}catch(ee){jt(e,e.return,ee)}um&&(um=!1,_v(e)),Ie=!1;break;case 4:o=ri,ri=wn,s=Qt(),u=Ql,Ql=fu(e.stateNode.containerInfo),Jn(t,e,l),$n(e),Ql=u,Ie&&nu&&(Jc=!0),Ie=s,ri=o;break;case 12:Jn(t,e,l),$n(e);break;case 31:Jn(t,e,l),$n(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Wc(e,t)));break;case 13:Jn(t,e,l),$n(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(nf=it()),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Wc(e,t)));break;case 22:u=e.memoizedState!==null,y=s!==null&&s.memoizedState!==null;var R=wn,k=Ct,Y=ri;wn=R||u,ri=Y||u,Ct=k||y,Jn(t,e,l),Ct=k,ri=Y,wn=R,$n(e),o&8192&&(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,!u||s===null||y||wn||Ct||(t=y||Ct,l=wn,s=Ct,wn=u||wn,Ct=t,ys(e,2),wn=l,Ct=s),!u&&ri||fm(e,u)),o&4&&(t=e.updateQueue,t!==null&&(l=t.retryQueue,l!==null&&(t.retryQueue=null,Wc(e,l))));break;case 19:Jn(t,e,l),$n(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Wc(e,t)));break;case 30:o&512&&(Ct||s===null||zn(s,s.return)),o=Qt(),u=nu,y=(l&335544064)===l,R=e.memoizedProps,nu=y&&Ti(R.default,R.update)!=="none",Jn(t,e,l),$n(e),y&&s!==null&&Ie&&(e.flags|=4),nu=u,Ie=o;break;case 21:break;case 7:o&512&&(Ct||s===null||zn(s,s.return)),s&&s.stateNode!==null&&(s.stateNode._fragmentFiber=e);default:Jn(t,e,l),$n(e)}}function $n(e){var t=e.flags;if(t&2){try{for(var l,s=e.return;s!==null;){if(bv(s)){l=s;break}s=s.return}s=null;for(var o=e.return;o!==null;){if(Wh(o)){var u=o.stateNode;s===null?s=[u]:s.push(u)}if($h(o))break;o=o.return}var y=s;if(l==null)throw Error(a(160));switch(l.tag){case 27:var R=l.stateNode,k=nm(e);Kc(e,k,R,y);break;case 5:var Y=l.stateNode;l.flags&32&&(sa(Y,""),l.flags&=-33);var ee=nm(e);Kc(e,ee,Y,y);break;case 3:case 4:var fe=l.stateNode.containerInfo,P=nm(e);lm(e,P,fe,y);break;default:throw Error(a(161))}}catch(Z){jt(e,e.return,Z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _v(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_v(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Ba=!0,t.reset(),Ba=!1),e=e.sibling}}function wa(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)kv(t,e),t=t.sibling;else Cv(t)}function kv(e,t){var l=e.alternate;if(l===null)im(e,!1);else switch(e.tag){case 3:if(cm=ai=!1,Sv(),wa(t,e),!ai&&!Jc){if(e=ii,e!==null)for(var s=0;s<e.length;s+=3){l=e[s];var o=e[s+1];Ex(l,e[s+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+o+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),cm=!0}ii=null;break;case 5:wa(t,e);break;case 4:s=ai,ai=!1,wa(t,e),ai&&(Jc=!0),ai=s;break;case 22:e.memoizedState===null&&(l.memoizedState!==null?im(e,!1):wa(t,e));break;case 30:s=ai,o=Sv(),ai=!1,wa(t,e),ai&&(e.flags|=4);var u=e.memoizedProps,y=e.stateNode;t=Ci(u,y),y=Ci(l.memoizedProps,y);var R=Ti(u.default,u.update);R==="none"?t=!1:(u=l.memoizedState,l.memoizedState=null,l=e.child,al=0,t=om(e,l,t,y,R,u,!0),al!==(u===null?0:u.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(Ma(e,e.memoizedProps.onUpdate),ii=o):o!==null&&(o.push.apply(o,ii),ii=o),ai=(e.flags&32)!==0?!0:s;break;default:wa(t,e)}}function oi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ov(e,t.alternate,t),t=t.sibling}function ys(e,t){for(e=e.child;e!==null;){var l=e,s=t;switch(l.tag){case 0:case 11:case 14:case 15:ps(4,l,l.return),ys(l,s);break;case 1:zn(l,l.return);var o=l.stateNode;typeof o.componentWillUnmount=="function"&&pv(l,l.return,o),ys(l,s);break;case 27:(s&2)!==0&&_x(l.stateNode,l.type,l.memoizedProps);case 5:zn(l,l.return),l.tag!==5&&l.tag!==27||tu(l),ys(l,s);break;case 6:tu(l);break;case 26:zn(l,l.return),o=l.stateNode,l.memoizedState!==null||o===null||Ct||o.parentNode.removeChild(o),ys(l,s);break;case 22:l.memoizedState===null&&ys(l,s);break;case 30:zn(l,l.return),ys(l,s);break;case 7:zn(l,l.return);default:ys(l,s)}e=e.sibling}}function Kl(e,t,l){for(l=(t.subtreeFlags&8772)!==0?l:l&-2,t=t.child;t!==null;){var s=t.alternate,o=e,u=t,y=u.flags,R=(l&1)!==0;switch(u.tag){case 0:case 11:case 15:Kl(o,u,l),eu(4,u);break;case 1:if(Kl(o,u,l),s=u,o=s.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(ee){jt(s,s.return,ee)}if(s=u,o=s.updateQueue,o!==null){var k=s.stateNode;try{var Y=o.shared.hiddenCallbacks;if(Y!==null)for(o.shared.hiddenCallbacks=null,o=0;o<Y.length;o++)lb(Y[o],k)}catch(ee){jt(s,s.return,ee)}}R&&y&64&&gv(u),li(u,u.return);break;case 27:(l&2)!==0&&vv(u);case 5:u.tag!==5&&u.tag!==27||yv(u),Kl(o,u,l),R&&s===null&&y&4&&em(u),li(u,u.return);break;case 6:yv(u);break;case 26:k=u.stateNode,u.memoizedState!==null||k===null||wn||Zm(fu(k.ownerDocument),u.type,k),Kl(o,u,l),R&&s===null&&y&4&&em(u),li(u,u.return);break;case 12:Kl(o,u,l);break;case 31:Kl(o,u,l),R&&y&4&&Mv(o,u);break;case 13:Kl(o,u,l),R&&y&4&&zv(o,u);break;case 22:u.memoizedState===null&&Kl(o,u,l),li(u,u.return);break;case 30:Kl(o,u,l),li(u,u.return);break;case 7:li(u,u.return);default:Kl(o,u,l)}t=t.sibling}}function hm(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&&Bo(l))}function mm(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Bo(e))}function _l(e,t,l,s){var o=(l&335544064)===l;if(t.subtreeFlags&(o?10262:10256))for(t=t.child;t!==null;)Lv(e,t,l,s),t=t.sibling;else o&&wv(t)}function Lv(e,t,l,s){var o=(l&335544064)===l;o&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Zc(t);var u=t.flags;switch(t.tag){case 0:case 11:case 15:_l(e,t,l,s),u&2048&&eu(9,t);break;case 1:_l(e,t,l,s);break;case 3:_l(e,t,l,s),o&&cm&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),u&2048&&(u=null,t.alternate!==null&&(u=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==u&&(t.refCount++,u!=null&&Bo(u)));break;case 12:if(u&2048){_l(e,t,l,s),u=t.stateNode;try{var y=t.memoizedProps,R=y.id,k=y.onPostCommit;typeof k=="function"&&k(R,t.alternate===null?"mount":"update",u.passiveEffectDuration,-0)}catch(Y){jt(t,t.return,Y)}}else _l(e,t,l,s);break;case 31:_l(e,t,l,s);break;case 13:_l(e,t,l,s);break;case 23:break;case 22:y=t.stateNode,R=t.alternate,t.memoizedState!==null?(o&&R!==null&&R.memoizedState===null&&Zc(R),y._visibility&2?_l(e,t,l,s):lu(e,t)):(o&&R!==null&&R.memoizedState!==null&&Zc(t),y._visibility&2?_l(e,t,l,s):(y._visibility|=2,Ca(e,t,l,s,(t.subtreeFlags&10256)!==0||!1))),u&2048&&hm(R,t);break;case 24:_l(e,t,l,s),u&2048&&mm(t.alternate,t);break;case 30:o&&(u=t.alternate,u!==null&&(si(u.child,!0),si(t.child,!0))),_l(e,t,l,s);break;default:_l(e,t,l,s)}}function Ca(e,t,l,s,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,y=t,R=l,k=s,Y=y.flags;switch(y.tag){case 0:case 11:case 15:Ca(u,y,R,k,o),eu(8,y);break;case 23:break;case 22:var ee=y.stateNode;y.memoizedState!==null?ee._visibility&2?Ca(u,y,R,k,o):lu(u,y):(ee._visibility|=2,Ca(u,y,R,k,o)),o&&Y&2048&&hm(y.alternate,y);break;case 24:Ca(u,y,R,k,o),o&&Y&2048&&mm(y.alternate,y);break;default:Ca(u,y,R,k,o)}t=t.sibling}}function lu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,s=t,o=s.flags;switch(s.tag){case 22:lu(l,s),o&2048&&hm(s.alternate,s);break;case 24:lu(l,s),o&2048&&mm(s.alternate,s);break;default:lu(l,s)}t=t.sibling}}var yr=8192;function br(e,t,l){if(e.subtreeFlags&yr)for(e=e.child;e!==null;)Uv(e,t,l),e=e.sibling}function Uv(e,t,l){switch(e.tag){case 26:br(e,t,l),e.flags&yr&&(e.memoizedState!==null?vT(l,Ql,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&Gx(l,e)));break;case 5:br(e,t,l),e.flags&yr&&(e=e.stateNode,(t&335544128)===t&&Gx(l,e));break;case 3:case 4:var s=Ql;Ql=fu(e.stateNode.containerInfo),br(e,t,l),Ql=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=yr,yr=16777216,br(e,t,l),yr=s):br(e,t,l));break;case 30:if((e.flags&yr)!==0&&(s=e.memoizedProps.name,s!=null&&s!=="auto")){var o=e.stateNode;o.paired=null,pl===null&&(pl=new Map),pl.set(s,o)}br(e,t,l);break;default:br(e,t,l)}}function Hv(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 iu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var s=t[l];Cn=s,Vv(s,e)}Hv(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Iv(e),e=e.sibling}function Iv(e){switch(e.tag){case 0:case 11:case 15:iu(e),e.flags&2048&&ps(9,e,e.return);break;case 3:iu(e);break;case 12:iu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ef(e)):iu(e);break;default:iu(e)}}function ef(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var s=t[l];Cn=s,Vv(s,e)}Hv(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ps(8,t,t.return),ef(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,ef(t));break;default:ef(t)}e=e.sibling}}function Vv(e,t){for(;Cn!==null;){var l=Cn;switch(l.tag){case 0:case 11:case 15:ps(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var s=l.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Bo(l.memoizedState.cache)}if(s=l.child,s!==null)s.return=l,Cn=s;else e:for(l=e;Cn!==null;){s=Cn;var o=s.sibling,u=s.return;if(Av(s),s===l){Cn=null;break e}if(o!==null){o.return=u,Cn=o;break e}Cn=u}}}var mC={getCacheForType:function(e){var t=An(an),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return An(an).controller.signal}},gC=typeof WeakMap=="function"?WeakMap:Map,Et=0,zt=null,ht=null,pt=0,Ot=0,yl=null,bs=!1,Ta=!1,gm=!1,ki=0,Wt=0,vs=0,vr=0,tf=0,bl=0,Oa=0,su=null,ul=null,pm=!1,nf=0,Bv=0,lf=1/0,sf=null,xs=null,Kt=0,Fl=null,xr=null,ui=0,ym=0,bm=null,qv=null,ja=null,Aa=null,Na=null,ru=0,rf=null;function vl(){return(Et&2)!==0&&pt!==0?pt&-pt:q.T!==null?jm():Qn()}function Pv(){if(bl===0)if((pt&536870912)===0||ct){var e=Cl;Cl<<=1,(Cl&3932160)===0&&(Cl=262144),bl=e}else bl=536870912;return e=Nn.current,e!==null&&(e.flags|=32),bl}function Ma(e,t){if(t!=null){var l=e.stateNode,s=l.ref;s===null&&(s=l.ref=Rx(Ci(e.memoizedProps,l))),Aa===null&&(Aa=[]),Aa.push(t.bind(null,s))}}function cl(e,t,l){(e===zt&&(Ot===2||Ot===9)||e.cancelPendingCommit!==null)&&(za(e,0),Ss(e,pt,bl,!1)),tr(e,l),((Et&2)===0||e!==zt)&&(e===zt&&((Et&2)===0&&(vr|=l),Wt===4&&Ss(e,pt,bl,!1)),ci(e))}function Gv(e,t,l){if((Et&6)!==0)throw Error(a(327));var s=!l&&(t&127)===0&&(t&e.expiredLanes)===0||sl(e,t),o=s?bC(e,t):xm(e,t,!0),u=s;do{if(o===0){Ta&&!s&&Ss(e,t,0,!1);break}else{if(l=e.current.alternate,u&&!pC(l)){o=xm(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var R=e;o=su;var k=R.current.memoizedState.isDehydrated;if(k&&(za(R,y).flags|=256),y=xm(R,y,!1),y!==2&&y!==6){if(gm&&!k){R.errorRecoveryDisabledLanes|=u,vr|=u,o=4;break e}u=ul,ul=o,u!==null&&(ul===null?ul=u:ul.push.apply(ul,u))}o=y}if(u=!1,o!==2)continue}}if(o===1){za(e,0),Ss(e,t,0,!0);break}e:{switch(s=e,u=o,u){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Ss(s,t,bl,!bs);break e;case 2:ul=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(o=nf+300-it(),10<o)){if(Ss(s,t,bl,!bs),il(s,0,!0)!==0)break e;ui=t,s.timeoutHandle=Im(Yv.bind(null,s,l,ul,sf,pm,t,bl,vr,Oa,bs,u,"Throttled",-0,0),o);break e}Yv(s,l,ul,sf,pm,t,bl,vr,Oa,bs,u,null,-0,0)}}break}while(!0);ci(e)}function Yv(e,t,l,s,o,u,y,R,k,Y,ee,fe,P,Z){e.timeoutHandle=-1;var Te=t.subtreeFlags,Ue=(u&335544064)===u;if(fe=null,(Ue||Te&8192||(Te&16785408)===16785408)&&(fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ei},pl=null,Uv(t,u,fe),Ue&&(Te=fe,Ue=e.containerInfo,Ue=(Ue.nodeType===9?Ue:Ue.ownerDocument).__reactViewTransition,Ue!=null&&(Te.count++,Te.waitingForViewTransition=!0,Te=mu.bind(Te),Ue.finished.then(Te,Te))),Te=(u&62914560)===u?nf-it():(u&4194048)===u?Bv-it():0,Te=xT(fe,Te),Te!==null)){ui=u,e.cancelPendingCommit=Te(Wv.bind(null,e,t,u,l,s,o,y,R,k,Y,ee,fe,null,P,Z)),Ss(e,u,y,!Y);return}Wv(e,t,u,l,s,o,y,R,k,Y,ee,fe)}function pC(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 s=0;s<l.length;s++){var o=l[s],u=o.getSnapshot;o=o.value;try{if(!ml(u(),o))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 Ss(e,t,l,s){t=Yn(e,t),t&=~tf,t&=~vr,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var o=t;0<o;){var u=31-Qe(o),y=1<<u;s[u]=-1,o&=~y}l!==0&&jo(e,l,t)}function af(){return(Et&6)===0?(au(0),!1):!0}function vm(){if(ht!==null){if(Ot===0)var e=ht.return;else e=ht,Ai=ar=null,Oh(e),ba=null,Go=0,e=ht;for(;e!==null;)mv(e.alternate,e),e=e.return;ht=null}}function za(e,t){var l=e.timeoutHandle;return l!==-1&&(e.timeoutHandle=-1,VC(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ui=0,vm(),zt=e,ht=l=Oi(e.current,null),pt=t,Ot=0,yl=null,bs=!1,Ta=sl(e,t),gm=!1,Oa=bl=tf=vr=vs=Wt=0,ul=su=null,pm=!1,ki=Yn(e,t),mc(),l}function Qv(e,t){at=null,q.H=Ic,t===ya||t===Cc?(t=Wy(),Ot=3):t===mh?(t=Wy(),Ot=4):Ot=t===qh?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,yl=t,ht===null&&(Wt=1,Vc(e,Nl(t,e.current)))}function Kv(){var e=Nn.current;return e===null?!0:(pt&4194048)===pt?Bn===null:(pt&62914560)===pt||(pt&536870912)!==0?e===Bn:!1}function Fv(){var e=q.H;return q.H=Ic,e===null?Ic:e}function Xv(){var e=q.A;return q.A=mC,e}function of(){Wt=4,bs||(pt&4194048)!==pt&&Nn.current!==null||(Ta=!0),(vs&134217727)===0&&(vr&134217727)===0||zt===null||Ss(zt,pt,bl,!1)}function xm(e,t,l){var s=Et;Et|=2;var o=Fv(),u=Xv();(zt!==e||pt!==t)&&(sf=null,za(e,t)),t=!1;var y=Wt;e:do try{if(Ot!==0&&ht!==null){var R=ht,k=yl;switch(Ot){case 8:vm(),y=6;break e;case 3:case 2:case 9:case 6:Nn.current===null&&(t=!0);var Y=Ot;if(Ot=0,yl=null,Da(e,R,k,Y),l&&Ta){y=0;break e}break;default:Y=Ot,Ot=0,yl=null,Da(e,R,k,Y)}}yC(),y=Wt;break}catch(ee){Qv(e,ee)}while(!0);return t&&e.shellSuspendCounter++,Ai=ar=null,Et=s,q.H=o,q.A=u,ht===null&&(zt=null,pt=0,mc()),y}function yC(){for(;ht!==null;)Zv(ht)}function bC(e,t){var l=Et;Et|=2;var s=Fv(),o=Xv();zt!==e||pt!==t?(sf=null,lf=it()+500,za(e,t)):Ta=sl(e,t);e:do try{if(Ot!==0&&ht!==null){t=ht;var u=yl;t:switch(Ot){case 1:Ot=0,yl=null,Da(e,t,u,1);break;case 2:case 9:if(Jy(u)){Ot=0,yl=null,Jv(t);break}t=function(){Ot!==2&&Ot!==9||zt!==e||(Ot=7),ci(e)},u.then(t,t);break e;case 3:Ot=7;break e;case 4:Ot=5;break e;case 7:Jy(u)?(Ot=0,yl=null,Jv(t)):(Ot=0,yl=null,Da(e,t,u,7));break;case 5:var y=null;switch(ht.tag){case 26:y=ht.memoizedState;case 5:case 27:var R=ht;if(y?qx(y):R.stateNode.complete){Ot=0,yl=null;var k=R.sibling;if(k!==null)ht=k;else{var Y=R.return;Y!==null?(ht=Y,uf(Y)):ht=null}break t}}Ot=0,yl=null,Da(e,t,u,5);break;case 6:Ot=0,yl=null,Da(e,t,u,6);break;case 8:vm(),Wt=6;break e;default:throw Error(a(462))}}vC();break}catch(ee){Qv(e,ee)}while(!0);return Ai=ar=null,q.H=s,q.A=o,Et=l,ht!==null?0:(zt=null,pt=0,mc(),Wt)}function vC(){for(;ht!==null&&!wl();)Zv(ht)}function Zv(e){var t=dv(e.alternate,e,ki);e.memoizedProps=e.pendingProps,t===null?uf(e):ht=t}function Jv(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=sv(l,t,t.pendingProps,t.type,void 0,pt);break;case 11:t=sv(l,t,t.pendingProps,t.type.render,t.ref,pt);break;case 5:Oh(t);var s=t;s===Rn&&(ct?(xc(s),s.tag===5&&s.stateNode!=null&&(_t=s.stateNode)):(xc(s),ct=!0));default:mv(l,t),t=ht=Vy(t,ki),t=dv(l,t,ki)}e.memoizedProps=e.pendingProps,t===null?uf(e):ht=t}function Da(e,t,l,s){Ai=ar=null,Oh(t),ba=null,Go=0;var o=t.return;try{if(rC(e,o,t,l,pt)){Wt=1,Vc(e,Nl(l,e.current)),ht=null;return}}catch(u){if(o!==null)throw ht=o,u;Wt=1,Vc(e,Nl(l,e.current)),ht=null;return}t.flags&32768?(ct||s===1?e=!0:Ta||(pt&536870912)!==0?e=!1:(bs=e=!0,(s===2||s===9||s===3||s===6)&&(s=Nn.current,s!==null&&s.tag===13&&(s.flags|=16384))),$v(t,e)):uf(t)}function uf(e){var t=e;do{if((t.flags&32768)!==0){$v(t,bs);return}e=t.return;var l=cC(t.alternate,t,ki);if(l!==null){ht=l;return}if(t=t.sibling,t!==null){ht=t;return}ht=t=e}while(t!==null);Wt===0&&(Wt=5)}function $v(e,t){do{var l=fC(e.alternate,e);if(l!==null){l.flags&=32767,ht=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ht=e;return}ht=e=l}while(e!==null);Wt=6,ht=null}function Wv(e,t,l,s,o,u,y,R,k,Y,ee,fe){e.cancelPendingCommit=null;do cf();while(Kt!==0);if((Et&6)!==0)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));e===zt&&(ht=zt=null,pt=0),xr=t,Fl=e,ui=l,bm=o,qv=s,xC(e,t,l,y,R,k,fe)}}function xC(e,t,l,s,o,u,y){var R=t.lanes|t.childLanes;if(ym=R,R|=th,Oo(e,l,R,s,o,u),Aa=null,(l&335544064)===l?(Na=Fw(e),s=10262):(Na=null,s=10256),(t.subtreeFlags&s)!==0||(t.flags&s)!==0?(e.callbackNode=null,e.callbackPriority=0,TC(tt,function(){return wm(),null})):(e.callbackNode=null,e.callbackPriority=0),Fc=!1,s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=q.T,q.T=null,o=le.p,le.p=2,u=Et,Et|=4;try{dC(e,t,l)}finally{Et=u,le.p=o,q.T=s}}Kt=1,Fc?ja=QC(y,e.containerInfo,Na,Sm,Em,EC,Rm,wm,SC):(Sm(),Em(),Rm())}function SC(e){if(Kt!==0){var t=Fl.onRecoverableError;t(e,{componentStack:null})}}function EC(){Kt===3&&(Kt=0,kv(xr,Fl),Kt=4)}function Sm(){if(Kt===1){Kt=0;var e=Fl,t=xr,l=ui,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=q.T,q.T=null;var o=le.p;le.p=2;var u=Et;Et|=4;try{nu=Jc=!1,Dv(t,e,l),l=Lm;var y=Ny(e.containerInfo),R=l.focusedElem,k=l.selectionRange;if(y!==R&&R&&R.ownerDocument&&Ay(R.ownerDocument.documentElement,R)){if(k!==null&&Zd(R)){var Y=k.start,ee=k.end;if(ee===void 0&&(ee=Y),"selectionStart"in R)R.selectionStart=Y,R.selectionEnd=Math.min(ee,R.value.length);else{var fe=R.ownerDocument||document,P=fe&&fe.defaultView||window;if(P.getSelection){var Z=P.getSelection(),Te=R.textContent.length,Ue=Math.min(k.start,Te),ot=k.end===void 0?Ue:Math.min(k.end,Te);!Z.extend&&Ue>ot&&(y=ot,ot=Ue,Ue=y);var G=jy(R,Ue),I=jy(R,ot);if(G&&I&&(Z.rangeCount!==1||Z.anchorNode!==G.node||Z.anchorOffset!==G.offset||Z.focusNode!==I.node||Z.focusOffset!==I.offset)){var X=fe.createRange();X.setStart(G.node,G.offset),Z.removeAllRanges(),Ue>ot?(Z.addRange(X),Z.extend(I.node,I.offset)):(X.setEnd(I.node,I.offset),Z.addRange(X))}}}}for(fe=[],Z=R;Z=Z.parentNode;)Z.nodeType===1&&fe.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<fe.length;R++){var ce=fe[R];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}Ba=!!km,Lm=km=null}finally{Et=u,le.p=o,q.T=s}}e.current=t,Kt=2}}function Em(){if(Kt===2){Kt=0;var e=Fl,t=xr,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=q.T,q.T=null;var s=le.p;le.p=2;var o=Et;Et|=4;try{Ov(e,t.alternate,t)}finally{Et=o,le.p=s,q.T=l}}Kt=3}}function Rm(){if(Kt===4||Kt===3){Kt=0;var e=ja;ja=null,tn();var t=Fl,l=xr,s=ui,o=qv,u=(s&335544064)===s?10262:10256;if((l.subtreeFlags&u)!==0||(l.flags&u)!==0?Kt=5:(Kt=0,xr=Fl=null,ex(t,t.pendingLanes)),u=t.pendingLanes,u===0&&(xs=null),Ao(s),l=l.stateNode,Yt&&typeof Yt.onCommitFiberRoot=="function")try{Yt.onCommitFiberRoot(pn,l,void 0,(l.current.flags&128)===128)}catch{}if(o!==null){l=q.T,u=le.p,le.p=2,q.T=null;try{for(var y=t.onRecoverableError,R=0;R<o.length;R++){var k=o[R];y(k.value,{componentStack:k.stack})}}finally{q.T=l,le.p=u}}if(o=Aa,y=Na,Na=null,o!==null&&(Aa=null,y===null&&(y=[]),e!==null))for(k=0;k<o.length;k++)l=(0,o[k])(y),l!==void 0&&e.finished.finally(l);(ui&3)!==0&&cf(),ci(t),u=t.pendingLanes,(s&261930)!==0&&(u&42)!==0?t===rf?ru++:(ru=0,rf=t):(ru=0,rf=null),au(0)}}function ex(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Bo(t)))}function cf(){return ja!==null&&(ja.skipTransition(),ja=null),Sm(),Em(),Rm(),wm()}function wm(){if(Kt!==5)return!1;var e=Fl,t=ym;ym=0;var l=Ao(ui),s=q.T,o=le.p;try{le.p=32>l?32:l,q.T=null,l=bm,bm=null;var u=Fl,y=ui;if(Kt=0,xr=Fl=null,ui=0,(Et&6)!==0)throw Error(a(331));var R=Et;if(Et|=4,Iv(u.current),Lv(u,u.current,y,l),Et=R,au(0,!1),Yt&&typeof Yt.onPostCommitFiberRoot=="function")try{Yt.onPostCommitFiberRoot(pn,u)}catch{}return!0}finally{le.p=o,q.T=s,ex(e,t)}}function tx(e,t,l){t=Nl(l,t),t=Bh(e.stateNode,t,2),e=ds(e,t,2),e!==null&&(tr(e,2),ci(e))}function jt(e,t,l){if(e.tag===3)tx(e,e,l);else for(;t!==null;){if(t.tag===3){tx(t,e,l);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(xs===null||!xs.has(s))){e=Nl(l,e),l=Jb(2),s=ds(t,l,2),s!==null&&($b(l,s,t,e),tr(s,2),ci(s));break}}t=t.return}}function Cm(e,t,l){var s=e.pingCache;if(s===null){s=e.pingCache=new gC;var o=new Set;s.set(t,o)}else o=s.get(t),o===void 0&&(o=new Set,s.set(t,o));o.has(l)||(gm=!0,o.add(l),e=RC.bind(null,e,t,l),t.then(e,e))}function RC(e,t,l){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,zt===e&&(pt&l)===l&&((Wt===4||Wt===3&&(pt&62914560)===pt&&300>it()-nf)&&(Et&2)===0?za(e,0):tf|=l,Oa===pt&&(Oa=0)),ci(e)}function nx(e,t){t===0&&(t=ec()),e=ir(e,t),e!==null&&(tr(e,t),ci(e))}function wC(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),nx(e,l)}function CC(e,t){var l=0;switch(e.tag){case 31:case 13:var s=e.stateNode,o=e.memoizedState;o!==null&&(l=o.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(a(314))}s!==null&&s.delete(t),nx(e,l)}function TC(e,t){return mn(e,t)}var _a=null,ka=null,Tm=!1,ff=!1,Om=!1,Es=0;function ci(e){e!==ka&&e.next===null&&(ka===null?_a=ka=e:ka=ka.next=e),ff=!0,Tm||(Tm=!0,jC())}function au(e,t){if(!Om&&ff){Om=!0;do for(var l=!1,s=_a;s!==null;){if(e!==0){var o=s.pendingLanes;if(o===0)var u=0;else{var y=s.suspendedLanes,R=s.pingedLanes;u=(1<<31-Qe(42|e)+1)-1,u&=o&~(y&~R),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,rx(s,u))}else u=pt,u=il(s,s===zt?u:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(u&3)===0||sl(s,u)||(l=!0,rx(s,u));s=s.next}while(l);Om=!1}}function OC(){lx()}function lx(){ff=Tm=!1;var e=0;Es!==0&&IC()&&(e=Es);for(var t=it(),l=null,s=_a;s!==null;){var o=s.next,u=ix(s,t);u===0?(s.next=null,l===null?_a=o:l.next=o,o===null&&(ka=l)):(l=s,(e!==0||(u&3)!==0)&&(ff=!0)),s=o}Kt!==0&&Kt!==5||au(e),Es!==0&&(Es=0)}function ix(e,t){for(var l=e.suspendedLanes,s=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var y=31-Qe(u),R=1<<y,k=o[y];k===-1?((R&l)===0||(R&s)!==0)&&(o[y]=Tl(R,t)):k<=t&&(e.expiredLanes|=R),u&=~R}if(t=zt,l=pt,l=il(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,l===0||e===t&&(Ot===2||Ot===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Sn(s),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||sl(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(s!==null&&Sn(s),Ao(l)){case 2:case 8:l=Be;break;case 32:l=tt;break;case 268435456:l=Pt;break;default:l=tt}return s=sx.bind(null,e),l=mn(l,s),e.callbackPriority=t,e.callbackNode=l,t}return s!==null&&s!==null&&Sn(s),e.callbackPriority=2,e.callbackNode=null,2}function sx(e,t){if(Kt!==0&&Kt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(cf()&&e.callbackNode!==l)return null;var s=pt;return s=il(e,e===zt?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Gv(e,s,t),ix(e,it()),e.callbackNode!=null&&e.callbackNode===l?sx.bind(null,e):null)}function rx(e,t){if(cf())return null;Gv(e,t,!0)}function jC(){BC(function(){(Et&6)!==0?mn(gn,OC):lx()})}function jm(){if(Es===0){var e=cr;e===0&&(e=ql,ql<<=1,(ql&261888)===0&&(ql=256)),Es=e}return Es}function ax(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:rc(e)}function AC(e,t,l,s,o){if(t==="submit"&&l&&l.stateNode===o){var u=ax((o[In]||null).action),y=s.submitter;y&&(t=(t=y[In]||null)?ax(t.formAction):y.getAttribute("formAction"),t!==null&&(u=t,y=null));var R=new cc("action","action",null,s,o);e.push({event:R,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Es!==0){var k=new FormData(o,y);Lh(l,{pending:!0,data:k,method:o.method,action:u},null,k)}}else typeof u=="function"&&(R.preventDefault(),k=new FormData(o,y),Lh(l,{pending:!0,data:k,method:o.method,action:u},u,k))},currentTarget:o}]})}}for(var Am=0;Am<eh.length;Am++){var Nm=eh[Am],NC=Nm.toLowerCase(),MC=Nm[0].toUpperCase()+Nm.slice(1);Gl(NC,"on"+MC)}Gl(Dy,"onAnimationEnd"),Gl(_y,"onAnimationIteration"),Gl(ky,"onAnimationStart"),Gl("dblclick","onDoubleClick"),Gl("focusin","onFocus"),Gl("focusout","onBlur"),Gl(Vw,"onTransitionRun"),Gl(Bw,"onTransitionStart"),Gl(qw,"onTransitionCancel"),Gl(Ly,"onTransitionEnd"),ns("onMouseEnter",["mouseout","mouseover"]),ns("onMouseLeave",["mouseout","mouseover"]),ns("onPointerEnter",["pointerout","pointerover"]),ns("onPointerLeave",["pointerout","pointerover"]),Ri("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ri("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ri("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ri("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ri("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ri("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ou="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(" "),zC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ou));function ox(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var s=e[l],o=s.event;s=s.listeners;e:{var u=void 0;if(t)for(var y=s.length-1;0<=y;y--){var R=s[y],k=R.instance,Y=R.currentTarget;if(R=R.listener,k!==u&&o.isPropagationStopped())break e;u=R,o.currentTarget=Y;try{u(o)}catch(ee){hc(ee)}o.currentTarget=null,u=k}else for(y=0;y<s.length;y++){if(R=s[y],k=R.instance,Y=R.currentTarget,R=R.listener,k!==u&&o.isPropagationStopped())break e;u=R,o.currentTarget=Y;try{u(o)}catch(ee){hc(ee)}o.currentTarget=null,u=k}}}}function mt(e,t){var l=t[Wr];l===void 0&&(l=t[Wr]=new Set);var s=e+"__bubble";l.has(s)||(ux(t,e,2,!1),l.add(s))}function Mm(e,t,l){var s=0;t&&(s|=4),ux(l,e,s,t)}var df="_reactListening"+Math.random().toString(36).slice(2);function zm(e){if(!e[df]){e[df]=!0,lc.forEach(function(l){l!=="selectionchange"&&(zC.has(l)||Mm(l,!1,e),Mm(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[df]||(t[df]=!0,Mm("selectionchange",!1,t))}}function ux(e,t,l,s){switch($x(t)){case 2:var o=wT;break;case 8:o=CT;break;default:o=$m}l=o.bind(null,t,l,e),o=void 0,!Vd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),s?o!==void 0?e.addEventListener(t,l,{capture:!0,passive:o}):e.addEventListener(t,l,!0):o!==void 0?e.addEventListener(t,l,{passive:o}):e.addEventListener(t,l,!1)}function Dm(e,t,l,s,o){var u=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var y=s.tag;if(y===3||y===4){var R=s.stateNode.containerInfo;if(R===o)break;if(y===4)for(y=s.return;y!==null;){var k=y.tag;if((k===3||k===4)&&y.stateNode.containerInfo===o)return;y=y.return}for(;R!==null;){if(y=Si(R),y===null)return;if(k=y.tag,k===5||k===6||k===26||k===27){s=u=y;continue e}R=R.parentNode}}s=s.return}uy(function(){var Y=u,ee=Hd(l),fe=[];e:{var P=Uy.get(e);if(P!==void 0){var Z=cc,Te=e;switch(e){case"keypress":if(oc(l)===0)break e;case"keydown":case"keyup":Z=pw;break;case"focusin":Te="focus",Z=Gd;break;case"focusout":Te="blur",Z=Gd;break;case"beforeblur":case"afterblur":Z=Gd;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":Z=dy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=iw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=Sw;break;case Dy:case _y:case ky:Z=aw;break;case Ly:Z=Rw;break;case"scroll":case"scrollend":Z=nw;break;case"wheel":Z=Cw;break;case"copy":case"cut":case"paste":Z=uw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=my;break;case"submit":Z=vw;break;case"toggle":case"beforetoggle":Z=Ow}var Ue=(t&4)!==0,ot=!Ue&&(e==="scroll"||e==="scrollend"),G=Ue?P!==null?P+"Capture":null:P;Ue=[];for(var I=Y,X;I!==null;){var ce=I;if(X=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||X===null||G===null||(ce=No(I,G),ce!=null&&Ue.push(uu(I,ce,X))),ot)break;I=I.return}0<Ue.length&&(P=new Z(P,Te,null,l,ee),fe.push({event:P,listeners:Ue}))}}if((t&7)===0){e:{if(Z=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",Z&&l!==Ud&&(Te=l.relatedTarget||l.fromElement)&&(Si(Te)||Te[$l]))break e;(P||Z)&&(Te=ee.window===ee?ee:(Z=ee.ownerDocument)?Z.defaultView||Z.parentWindow:window,P?(Z=l.relatedTarget||l.toElement,P=Y,Z=Z?Si(Z):null,Z!==null&&(ot=f(Z),Ue=Z.tag,Z!==ot||Ue!==5&&Ue!==27&&Ue!==6)&&(Z=null)):(P=null,Z=Y),P!==Z&&(Ue=dy,ce="onMouseLeave",G="onMouseEnter",I="mouse",(e==="pointerout"||e==="pointerover")&&(Ue=my,ce="onPointerLeave",G="onPointerEnter",I="pointer"),ot=P==null?Te:Ei(P),X=Z==null?Te:Ei(Z),Te=new Ue(ce,I+"leave",P,l,ee),Te.target=ot,Te.relatedTarget=X,ce=null,Si(ee)===Y&&(Ue=new Ue(G,I+"enter",Z,l,ee),Ue.target=X,Ue.relatedTarget=ot,ce=Ue),ot=ce,Ue=P&&Z?D(P,Z,DC):null,P!==null&&cx(fe,Te,P,Ue,!1),Z!==null&&ot!==null&&cx(fe,ot,Z,Ue,!0)))}e:{if(P=Y?Ei(Y):window,Z=P.nodeName&&P.nodeName.toLowerCase(),Z==="select"||Z==="input"&&P.type==="file")var De=Ey;else if(xy(P))if(Ry)De=Uw;else{De=kw;var yt=_w}else Z=P.nodeName,!Z||Z.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?Y&&Ld(Y.elementType)&&(De=Ey):De=Lw;if(De&&(De=De(e,Y))){Sy(fe,De,l,ee);break e}yt&&yt(e,P,Y)}switch(yt=Y?Ei(Y):window,e){case"focusin":(xy(yt)||yt.contentEditable==="true")&&(ua=yt,Jd=Y,Ho=null);break;case"focusout":Ho=Jd=ua=null;break;case"mousedown":$d=!0;break;case"contextmenu":case"mouseup":case"dragend":$d=!1,My(fe,l,ee);break;case"selectionchange":if(Iw)break;case"keydown":case"keyup":My(fe,l,ee)}var Pe;if(Qd)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 oa?by(e,l)&&(Je="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Je="onCompositionStart");Je&&(gy&&l.locale!=="ko"&&(oa||Je!=="onCompositionStart"?Je==="onCompositionEnd"&&oa&&(Pe=cy()):(ls=ee,Bd="value"in ls?ls.value:ls.textContent,oa=!0)),yt=hf(Y,Je),0<yt.length&&(Je=new hy(Je,e,null,l,ee),fe.push({event:Je,listeners:yt}),Pe?Je.data=Pe:(Pe=vy(l),Pe!==null&&(Je.data=Pe)))),(Pe=Aw?Nw(e,l):Mw(e,l))&&(Je=hf(Y,"onBeforeInput"),0<Je.length&&(yt=new hy("onBeforeInput","beforeinput",null,l,ee),fe.push({event:yt,listeners:Je}),yt.data=Pe)),AC(fe,e,Y,l,ee)}ox(fe,t)})}function uu(e,t,l){return{instance:e,listener:t,currentTarget:l}}function hf(e,t){for(var l=t+"Capture",s=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=No(e,l),o!=null&&s.unshift(uu(e,o,u)),o=No(e,t),o!=null&&s.push(uu(e,o,u))),e.tag===3)return s;e=e.return}return[]}function DC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function cx(e,t,l,s,o){for(var u=t._reactName,y=[];l!==null&&l!==s;){var R=l,k=R.alternate,Y=R.stateNode;if(R=R.tag,k!==null&&k===s)break;R!==5&&R!==26&&R!==27||Y===null||(k=Y,o?(Y=No(l,u),Y!=null&&y.unshift(uu(l,Y,k))):o||(Y=No(l,u),Y!=null&&y.push(uu(l,Y,k)))),l=l.return}y.length!==0&&e.push({event:t,listeners:y})}var _C=/\r\n?/g,kC=/\u0000|\uFFFD/g;function fx(e){return(typeof e=="string"?e:""+e).replace(_C,`
49
+ `).replace(kC,"")}function dx(e,t){return t=fx(t),fx(e)===t}function At(e,t,l,s,o,u){switch(l){case"children":if(typeof s=="string")t==="body"||t==="textarea"&&s===""||sa(e,s);else if(typeof s=="number"||typeof s=="bigint")t!=="body"&&sa(e,""+s);else return;break;case"className":Ol(e,"class",s);break;case"tabIndex":Ol(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Ol(e,l,s);break;case"style":ay(e,s,u);return;case"data":if(t!=="object"){Ol(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(l);break}s=rc(s),e.setAttribute(l,s);break;case"action":case"formAction":if(typeof s=="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 u=="function"&&(l==="formAction"?(t!=="input"&&At(e,t,"name",o.name,o,null),At(e,t,"formEncType",o.formEncType,o,null),At(e,t,"formMethod",o.formMethod,o,null),At(e,t,"formTarget",o.formTarget,o,null)):(At(e,t,"encType",o.encType,o,null),At(e,t,"method",o.method,o,null),At(e,t,"target",o.target,o,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(l);break}s=rc(s),e.setAttribute(l,s);break;case"onClick":s!=null&&(e.onclick=ei);return;case"onScroll":s!=null&&mt("scroll",e);return;case"onScrollEnd":s!=null&&mt("scrollend",e);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(a(61));if(l=s.__html,l!=null){if(o.children!=null)throw Error(a(60));(u!=null?u.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}l=rc(s),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":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,s):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":s===!0?e.setAttribute(l,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,s):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(l,s):e.removeAttribute(l);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(l):e.setAttribute(l,s);break;case"popover":mt("beforetoggle",e),mt("toggle",e),nn(e,"popover",s);break;case"xlinkActuate":Vn(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Vn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Vn(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Vn(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Vn(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Vn(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":nn(e,"is",s);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=ew.get(l)||l,nn(e,l,s);else return}Ie=!0}function _m(e,t,l,s,o,u){switch(l){case"style":ay(e,s,u);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(a(61));if(l=s.__html,l!=null){if(o.children!=null)throw Error(a(60));(u!=null?u.__html:void 0)!==l&&(e.innerHTML=l)}}break;case"children":if(typeof s=="string")sa(e,s);else if(typeof s=="number"||typeof s=="bigint")sa(e,""+s);else return;break;case"onScroll":s!=null&&mt("scroll",e);return;case"onScrollEnd":s!=null&&mt("scrollend",e);return;case"onClick":s!=null&&(e.onclick=ei);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!ic.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(o=l.endsWith("Capture"),u=l.slice(2,o?l.length-7:void 0),t=e[In]||null,t=t!=null?t[l]:null,typeof t=="function"&&e.removeEventListener(u,t,o),typeof s=="function")){typeof t!="function"&&t!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(u,s,o);break e}Ie=!0,l in e?e[l]=s:s===!0?e.setAttribute(l,""):nn(e,l,s)}return}Ie=!0}function Dn(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":mt("error",e),mt("load",e);var s=!1,o=!1,u;for(u in l)if(l.hasOwnProperty(u)){var y=l[u];if(y!=null)switch(u){case"src":s=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:At(e,t,u,y,l,null)}}o&&At(e,t,"srcSet",l.srcSet,l,null),s&&At(e,t,"src",l.src,l,null);return;case"input":mt("invalid",e);var R=u=y=o=null,k=null,Y=null;for(s in l)if(l.hasOwnProperty(s)){var ee=l[s];if(ee!=null)switch(s){case"name":o=ee;break;case"type":y=ee;break;case"checked":k=ee;break;case"defaultChecked":Y=ee;break;case"value":u=ee;break;case"defaultValue":R=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(a(137,t));break;default:At(e,t,s,ee,l,null)}}ly(e,u,R,k,Y,y,o,!1);return;case"select":mt("invalid",e),s=y=u=null;for(o in l)if(l.hasOwnProperty(o)&&(R=l[o],R!=null))switch(o){case"value":u=R;break;case"defaultValue":y=R;break;case"multiple":s=R;default:At(e,t,o,R,l,null)}t=u,l=y,e.multiple=!!s,t!=null?ia(e,!!s,t,!1):l!=null&&ia(e,!!s,l,!0);return;case"textarea":mt("invalid",e),u=o=s=null;for(y in l)if(l.hasOwnProperty(y)&&(R=l[y],R!=null))switch(y){case"value":s=R;break;case"defaultValue":o=R;break;case"children":u=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(a(91));break;default:At(e,t,y,R,l,null)}sy(e,s,o,u);return;case"option":for(k in l)if(l.hasOwnProperty(k)&&(s=l[k],s!=null))switch(k){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:At(e,t,k,s,l,null)}return;case"dialog":mt("beforetoggle",e),mt("toggle",e),mt("cancel",e),mt("close",e);break;case"iframe":case"object":mt("load",e);break;case"video":case"audio":for(s=0;s<ou.length;s++)mt(ou[s],e);break;case"image":mt("error",e),mt("load",e);break;case"details":mt("toggle",e);break;case"embed":case"source":case"link":mt("error",e),mt("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(Y in l)if(l.hasOwnProperty(Y)&&(s=l[Y],s!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:At(e,t,Y,s,l,null)}return;default:if(Ld(t)){for(ee in l)l.hasOwnProperty(ee)&&(s=l[ee],s!==void 0&&_m(e,t,ee,s,l,void 0));return}}for(R in l)l.hasOwnProperty(R)&&(s=l[R],s!=null&&At(e,t,R,s,l,null))}var LC={};function UC(e,t,l,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,y=null,R=null,k=null,Y=null,ee=null;for(Z in l){var fe=l[Z];if(l.hasOwnProperty(Z)&&fe!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":k=fe;default:s.hasOwnProperty(Z)||At(e,t,Z,null,s,fe)}}for(var P in s){var Z=s[P];if(fe=l[P],s.hasOwnProperty(P)&&(Z!=null||fe!=null))switch(P){case"type":Z!==fe&&(Ie=!0),u=Z;break;case"name":Z!==fe&&(Ie=!0),o=Z;break;case"checked":Z!==fe&&(Ie=!0),Y=Z;break;case"defaultChecked":Z!==fe&&(Ie=!0),ee=Z;break;case"value":Z!==fe&&(Ie=!0),y=Z;break;case"defaultValue":Z!==fe&&(Ie=!0),R=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(a(137,t));break;default:Z!==fe&&At(e,t,P,Z,s,fe)}}_d(e,y,R,k,Y,ee,u,o);return;case"select":Z=y=R=P=null;for(u in l)if(k=l[u],l.hasOwnProperty(u)&&k!=null)switch(u){case"value":break;case"multiple":Z=k;default:s.hasOwnProperty(u)||At(e,t,u,null,s,k)}for(o in s)if(u=s[o],k=l[o],s.hasOwnProperty(o)&&(u!=null||k!=null))switch(o){case"value":u!==k&&(Ie=!0),P=u;break;case"defaultValue":u!==k&&(Ie=!0),R=u;break;case"multiple":u!==k&&(Ie=!0),y=u;default:u!==k&&At(e,t,o,u,s,k)}t=R,l=y,s=Z,P!=null?ia(e,!!l,P,!1):!!s!=!!l&&(t!=null?ia(e,!!l,t,!0):ia(e,!!l,l?[]:"",!1));return;case"textarea":Z=P=null;for(R in l)if(o=l[R],l.hasOwnProperty(R)&&o!=null&&!s.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:At(e,t,R,null,s,o)}for(y in s)if(o=s[y],u=l[y],s.hasOwnProperty(y)&&(o!=null||u!=null))switch(y){case"value":o!==u&&(Ie=!0),P=o;break;case"defaultValue":o!==u&&(Ie=!0),Z=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(a(91));break;default:o!==u&&At(e,t,y,o,s,u)}iy(e,P,Z);return;case"option":for(var Te in l)if(P=l[Te],l.hasOwnProperty(Te)&&P!=null&&!s.hasOwnProperty(Te))switch(Te){case"selected":e.selected=!1;break;default:At(e,t,Te,null,s,P)}for(k in s)if(P=s[k],Z=l[k],s.hasOwnProperty(k)&&P!==Z&&(P!=null||Z!=null))switch(k){case"selected":P!==Z&&(Ie=!0),e.selected=P&&typeof P!="function"&&typeof P!="symbol";break;default:At(e,t,k,P,s,Z)}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 Ue in l)P=l[Ue],l.hasOwnProperty(Ue)&&P!=null&&!s.hasOwnProperty(Ue)&&At(e,t,Ue,null,s,P);for(Y in s)if(P=s[Y],Z=l[Y],s.hasOwnProperty(Y)&&P!==Z&&(P!=null||Z!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(a(137,t));break;default:At(e,t,Y,P,s,Z)}return;default:if(Ld(t)){for(var ot in l)P=l[ot],l.hasOwnProperty(ot)&&P!==void 0&&!s.hasOwnProperty(ot)&&_m(e,t,ot,void 0,s,P);for(ee in s)P=s[ee],Z=l[ee],!s.hasOwnProperty(ee)||P===Z||P===void 0&&Z===void 0||_m(e,t,ee,P,s,Z);return}}for(var G in l)P=l[G],l.hasOwnProperty(G)&&P!=null&&!s.hasOwnProperty(G)&&At(e,t,G,null,s,P);for(fe in s)P=s[fe],Z=l[fe],!s.hasOwnProperty(fe)||P===Z||P==null&&Z==null||At(e,t,fe,P,s,Z)}function hx(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function HC(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),s=0;s<l.length;s++){var o=l[s],u=o.transferSize,y=o.initiatorType,R=o.duration;if(u&&R&&hx(y)){for(y=0,R=o.responseEnd,s+=1;s<l.length;s++){var k=l[s],Y=k.startTime;if(Y>R)break;var ee=k.transferSize,fe=k.initiatorType;ee&&hx(fe)&&(k=k.responseEnd,y+=ee*(k<R?1:(R-Y)/(k-Y)))}if(--s,t+=8*(u+y)/(o.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 km=null,Lm=null;function cu(e){return e.nodeType===9?e:e.ownerDocument}function mx(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 gx(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 px(e,t,l,s){return l=cu(l).createElement(e),l[Ut]=s,l[In]=t,Dn(l,e,t),Jt(l),l}function Um(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 Hm=null;function IC(){var e=window.event;return e&&e.type==="popstate"?e===Hm?!1:(Hm=e,!0):(Hm=null,!1)}var Im=typeof setTimeout=="function"?setTimeout:void 0,VC=typeof clearTimeout=="function"?clearTimeout:void 0,yx=typeof Promise=="function"?Promise:void 0,bx=typeof requestAnimationFrame=="function"?requestAnimationFrame:Im,BC=typeof queueMicrotask=="function"?queueMicrotask:typeof yx<"u"?function(e){return yx.resolve(null).then(e).catch(qC)}:Im;function qC(e){setTimeout(function(){throw e})}function Rs(e){return e==="head"}function vx(e,t){var l=t,s=0;do{var o=l.nextSibling;if(e.removeChild(l),o&&o.nodeType===8)if(l=o.data,l==="/$"||l==="/&"){if(s===0){e.removeChild(o),qa(t);return}s--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")s++;else if(l==="html")Km(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Km(l);for(var u=l.firstChild;u;){var y=u.nextSibling,R=u.nodeName;u[xi]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&u.rel.toLowerCase()==="stylesheet"||l.removeChild(u),u=y}}else l==="body"&&Km(e.ownerDocument.body);l=o}while(l);qa(t)}function xx(e,t){var l=e;e=0;do{var s=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||""),s&&s.nodeType===8)if(l=s.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=s}while(l)}function Sx(e,t,l){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,l!=null&&(e.style.viewTransitionClass=l),l=getComputedStyle(e),l.display==="inline"){if(t=e.getClientRects(),t.length===1)var s=1;else for(var o=s=0;o<t.length;o++){var u=t[o];0<u.width&&0<u.height&&s++}s===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+l.paddingTop,e.marginBottom="-"+l.paddingBottom)}}function Ex(e,t){e=e.style,t=t.style;var l=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(l=t.display,e.display=l==null||typeof l=="boolean"?"":l,l=t.margin,l!=null?e.margin=l:(l=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=l==null||typeof l=="boolean"?"":l,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function PC(e,t,l){return l=l.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=l.innerHeight&&e.left<=l.innerWidth}}function Vm(e){var t=e.getBoundingClientRect(),l=getComputedStyle(e);return PC(t,l,e)}function GC(e){return e.documentElement.clientHeight}function YC(e){this.addEventListener("load",e),this.addEventListener("error",e)}function QC(e,t,l,s,o,u,y,R,k){var Y=t.nodeType===9?t:t.ownerDocument;try{var ee=Y.startViewTransition({update:function(){var P=Y.defaultView,Z=P.navigation&&P.navigation.transition,Te=Y.fonts.status;s();var Ue=[];if(Te==="loaded"&&(GC(Y),Y.fonts.status==="loading"&&Ue.push(Y.fonts.ready)),Te=Ue.length,e!==null)for(var ot=e.suspenseyImages,G=0,I=0;I<ot.length;I++){var X=ot[I];if(!X.complete){var ce=X.getBoundingClientRect();if(0<ce.bottom&&0<ce.right&&ce.top<P.innerHeight&&ce.left<P.innerWidth){if(G+=Px(X),G>pf){Ue.length=Te;break}X=new Promise(YC.bind(X)),Ue.push(X)}}}if(0<Ue.length)return P=Promise.race([Promise.all(Ue),new Promise(function(De){return setTimeout(De,500)})]).then(o,o),(Z?Promise.allSettled([Z.finished,P]):P).then(u,u);if(o(),Z)return Z.finished.then(u,u);u()},types:l});Y.__reactViewTransition=ee;var fe=[];return ee.ready.then(function(){for(var P=Y.documentElement.getAnimations({subtree:!0}),Z=0;Z<P.length;Z++){var Te=P[Z],Ue=Te.effect,ot=Ue.pseudoElement;if(ot!=null&&ot.startsWith("::view-transition")){fe.push(Te),Te=Ue.getKeyframes();for(var G=ot=void 0,I=!0,X=0;X<Te.length;X++){var ce=Te[X],De=ce.width;if(ot===void 0)ot=De;else if(ot!==De){I=!1;break}if(De=ce.height,G===void 0)G=De;else if(G!==De){I=!1;break}delete ce.width,delete ce.height,ce.transform==="none"&&delete ce.transform}I&&ot!==void 0&&G!==void 0&&(Ue.setKeyframes(Te),I=getComputedStyle(Ue.target,Ue.pseudoElement),I.width!==ot||I.height!==G)&&(I=Te[0],I.width=ot,I.height=G,I=Te[Te.length-1],I.width=ot,I.height=G,Ue.setKeyframes(Te))}}y()},function(P){Y.__reactViewTransition===ee&&(Y.__reactViewTransition=null);try{if(typeof P=="object"&&P!==null)switch(P.name){case"InvalidStateError":(P.message==="View transition was skipped because document visibility state is hidden."||P.message==="Skipping view transition because document visibility state has become hidden."||P.message==="Skipping view transition because viewport size changed."||P.message==="Transition was aborted because of invalid state")&&(P=null)}P!==null&&k(P)}finally{s(),o(),y()}}),ee.finished.finally(function(){for(var P=0;P<fe.length;P++)fe[P].cancel();Y.__reactViewTransition===ee&&(Y.__reactViewTransition=null),R()}),ee}catch{return s(),o(),y(),null}}function Sr(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Sr.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:_({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Sr.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,l=e.getAnimations({subtree:!0}),s=[],o=0;o<l.length;o++){var u=l[o].effect;u!==null&&u.target===e&&u.pseudoElement===t&&s.push(l[o])}return s},Sr.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Rx(e){return{name:e,group:new Sr("group",e),imagePair:new Sr("image-pair",e),old:new Sr("old",e),new:new Sr("new",e)}}function xl(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}xl.prototype.addEventListener=function(e,t,l){var s=null,o=null;if(!(l!=null&&typeof l!="boolean"&&(s=l.signal||null,s!==null&&s.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var u=this._eventListeners;if(Cx(u,e,t,l)===-1){var y=this,R=t;l!=null&&typeof l!="boolean"&&l.once===!0&&(R=function(k){y.removeEventListener(e,t,l),typeof t=="function"?t.call(this,k):t.handleEvent(k)}),s!==null&&(o=y.removeEventListener.bind(y,e,t,l),s.addEventListener("abort",o,{once:!0}),o=s.removeEventListener.bind(s,"abort",o)),s=La(l),u.push({type:e,listener:t,optionsOrUseCapture:l,attachedListener:R,cleanup:o}),b(this._fragmentFiber.child,!1,KC,e,R,s)}this._eventListeners=u}};function KC(e,t,l,s){return j(e).addEventListener(t,l,s),!1}xl.prototype.removeEventListener=function(e,t,l){var s=this._eventListeners;if(s!==null&&(t=Cx(s,e,t,l),t!==-1)){var o=s[t];l=o.attachedListener;var u=o.cleanup;o=La(o.optionsOrUseCapture),b(this._fragmentFiber.child,!1,FC,e,l,o),s.splice(t,1),u!==null&&u()}};function FC(e,t,l,s){return j(e).removeEventListener(t,l,s),!1}function La(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function wx(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function Cx(e,t,l,s){if(e.length===0)return-1;s=wx(s);for(var o=0;o<e.length;o++){var u=e[o];if(u.type===t&&u.listener===l&&wx(u.optionsOrUseCapture)===s)return o}return-1}xl.prototype.dispatchEvent=function(e){var t=S(this._fragmentFiber);if(t===null)return!0;t=j(t);var l=this._eventListeners;if(l!==null&&0<l.length||!e.bubbles){var s=t.nodeType===9?t.createComment(""):document.createTextNode("");if(l)for(var o=0;o<l.length;o++){var u=l[o];s.addEventListener(u.type,u.attachedListener,La(u.optionsOrUseCapture))}if(t.appendChild(s),e=s.dispatchEvent(e),l)for(o=0;o<l.length;o++)u=l[o],s.removeEventListener(u.type,u.attachedListener,La(u.optionsOrUseCapture));return t.removeChild(s),e}return t.dispatchEvent(e)},xl.prototype.focus=function(e){b(this._fragmentFiber.child,!0,Tx,e,void 0,void 0)};function Tx(e,t){return e.tag===6?!1:(e=j(e),rT(e,t))}xl.prototype.focusLast=function(e){var t=[];b(this._fragmentFiber.child,!0,Bm,t,void 0,void 0);for(var l=t.length-1;0<=l&&!Tx(t[l],e);l--);};function Bm(e,t){return t.push(e),!1}xl.prototype.blur=function(){var e=S(this._fragmentFiber);e!==null&&(e=j(e),e=cu(e).activeElement,e!==null&&b(this._fragmentFiber.child,!1,XC,e,void 0,void 0))};function XC(e,t){return e.tag===6?!1:(e=j(e),e===t||e.contains(t)?(t.blur(),!0):!1)}xl.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),b(this._fragmentFiber.child,!1,ZC,e,void 0,void 0)};function ZC(e,t){return e.tag===6||(e=j(e),t.observe(e)),!1}xl.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),b(this._fragmentFiber.child,!1,JC,e,void 0,void 0);for(var l=t=0;l<Xl.length;l++){var s=Xl[l];s.fragmentInstance===this&&s.observer===e?e.unobserve(s.instance):Xl[t++]=s}Xl.length=t}};function JC(e,t){return e.tag===6||(e=j(e),t.unobserve(e)),!1}var Xl=[],qm=!1;function $C(e,t,l){Xl.push({fragmentInstance:e,observer:t,instance:l}),qm||(qm=!0,aT(function(){qm=!1;var s=Xl;Xl=[];for(var o=0;o<s.length;o++){var u=s[o];u.observer.unobserve(u.instance)}}))}xl.prototype.getClientRects=function(){var e=[];return b(this._fragmentFiber.child,!1,WC,e,void 0,void 0),e};function WC(e,t){if(e.tag===6){e=e.stateNode;var l=e.ownerDocument.createRange();l.selectNodeContents(e),t.push.apply(t,l.getClientRects())}else e=j(e),t.push.apply(t,e.getClientRects());return!1}xl.prototype.getRootNode=function(e){var t=S(this._fragmentFiber);return t===null?this:j(t).getRootNode(e)},xl.prototype.compareDocumentPosition=function(e){var t=S(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];b(this._fragmentFiber.child,!1,Bm,l,void 0,void 0);var s=j(t);if(l.length===0){if(l=s,T(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(l=t)}t=this._fragmentFiber;var o=s=l.compareDocumentPosition(e);return l===e?o=Node.DOCUMENT_POSITION_CONTAINS:s&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=C(t)[1],l===null?o=Node.DOCUMENT_POSITION_PRECEDING:(e=j(l).compareDocumentPosition(e),o=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),o|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=j(l[0]),o=j(l[l.length-1]);var u=T(this._fragmentFiber)?t.parentElement:s;if(u==null)return Node.DOCUMENT_POSITION_DISCONNECTED;s=u.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,u=u.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY;var y=t.compareDocumentPosition(e),R=o.compareDocumentPosition(e),k=y&Node.DOCUMENT_POSITION_CONTAINED_BY||R&Node.DOCUMENT_POSITION_CONTAINED_BY;return R=s&&u&&y&Node.DOCUMENT_POSITION_FOLLOWING&&R&Node.DOCUMENT_POSITION_PRECEDING,t=s&&t===e||u&&o===e||k||R?Node.DOCUMENT_POSITION_CONTAINED_BY:!s&&t===e||!u&&o===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:y,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||eT(t,this._fragmentFiber,l[0],l[l.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function eT(e,t,l,s,o){var u=Si(o);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!u)e:{for(;u!==null;){if(u.tag===7&&(u===t||u.alternate===t)){l=!0;break e}u=u.return}l=!1}return l}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(u===null)return u=o.ownerDocument,o===u||o===u.documentElement||o===u.body;e:{for(u=t,t=S(t);u!==null;){if(!(u.tag!==5&&u.tag!==3&&u.tag!==27||u!==t&&u.alternate!==t)){u=!0;break e}u=u.return}u=!1}return u}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!u)&&!(t=u===l)&&(t=D(l,u,L),t===null?t=!1:(b(t,!0,A,u,l),u=O,O=null,t=u!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!u)&&!(t=u===s)&&(t=D(s,u,L),t===null?t=!1:(b(t,!0,N,u,s),u=O,E=O=null,t=u!==null)),t):!1}function Ox(e,t){var l=e.ownerDocument.createRange();l.selectNodeContents(e),e=l.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}xl.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(a(566));var t=[];b(this._fragmentFiber.child,!1,Bm,t,void 0,void 0);var l=e!==!1;if(t.length===0){var s=C(this._fragmentFiber);if(s=l?s[1]||s[0]||S(this._fragmentFiber):s[0]||s[1],s===null)return;if(s.tag===6){e=j(s),Ox(e,l);return}if(s=j(s),s.nodeType!==9){if(s.nodeType===11){l="host"in s?s.host:null,l!==null&&l.scrollIntoView(e);return}s.scrollIntoView(e)}}for(s=l?t.length-1:0;s!==(l?-1:t.length);){var o=t[s];o.tag===6?(o=j(o),Ox(o,l)):j(o).scrollIntoView(e),s+=l?-1:1}};function tT(e,t){return e=j(e),jx(e,t),!1}function jx(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function Ax(e,t){var l=t._eventListeners;if(l!==null)for(var s=0;s<l.length;s++){var o=l[s];e.addEventListener(o.type,o.attachedListener,La(o.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(u){for(var y=0,R=0;R<Xl.length;R++){var k=Xl[R];(k.fragmentInstance!==t||k.observer!==u||k.instance!==e)&&(Xl[y++]=k)}Xl.length=y,u.observe(e)}),jx(e,t))}function nT(e,t){var l=t._eventListeners;if(l!==null)for(var s=0;s<l.length;s++){var o=l[s];e.removeEventListener(o.type,o.attachedListener,La(o.optionsOrUseCapture))}e.nodeType!==3&&(l=t._observers,l!==null&&l.forEach(function(u){typeof u.rootMargin=="string"?$C(t,u,e):u.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Pm(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":Pm(l),la(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function lT(e,t,l,s){for(;e.nodeType===1;){var o=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[xi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=kl(e.nextSibling),e===null)break}return null}function iT(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=kl(e.nextSibling),e===null))return null;return e}function Nx(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=kl(e.nextSibling),e===null))return null;return e}function Gm(e){return e.data==="$?"||e.data==="$~"}function Ym(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function sT(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var s=function(){t(),l.removeEventListener("DOMContentLoaded",s)};l.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function kl(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 Qm=null;function Mx(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return kl(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function zx(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 rT(e,t){function l(){s=!0}if(e.ownerDocument.activeElement===e)return!0;var s=!1;try{e.ownerDocument.addEventListener("focus",l,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",l,!0)}return s}function aT(e){bx(function(){bx(function(t){return e(t)})})}function Dx(e,t,l){switch(t=cu(l),e){case"html":if(e=t.documentElement,!e)throw Error(a(452));return e;case"head":if(e=t.head,!e)throw Error(a(453));return e;case"body":if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function _x(e,t,l){for(var s in l){var o=l[s];l.hasOwnProperty(s)&&o!=null&&At(e,t,s,null,LC,o)}l.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===ei&&(e.onclick=null),la(e)}function Km(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);la(e)}var Ll=new Map,kx=new Set;function fu(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Li=le.d;le.d={f:oT,r:uT,D:cT,C:fT,L:dT,m:hT,X:gT,S:mT,M:pT};function oT(){var e=Li.f(),t=af();return e||t}function uT(e){var t=ts(e);t!==null&&t.tag===5&&t.type==="form"?Ub(t):Li.r(e)}var Ua=typeof document>"u"?null:document;function Lx(e,t,l){var s=Ua;if(s&&typeof t=="string"&&t){var o=jl(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof l=="string"&&(o+='[crossorigin="'+l+'"]'),kx.has(o)||(kx.add(o),e={rel:e,crossOrigin:l,href:t},s.querySelector(o)===null&&(t=s.createElement("link"),Dn(t,"link",e),Jt(t),s.head.appendChild(t)))}}function cT(e){Li.D(e),Lx("dns-prefetch",e,null)}function fT(e,t){Li.C(e,t),Lx("preconnect",e,t)}function dT(e,t,l){Li.L(e,t,l);var s=Ua;if(s&&e&&t){var o='link[rel="preload"][as="'+jl(t)+'"]';t==="image"&&l&&l.imageSrcSet?(o+='[imagesrcset="'+jl(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(o+='[imagesizes="'+jl(l.imageSizes)+'"]')):o+='[href="'+jl(e)+'"]';var u=o;switch(t){case"style":u=Ha(e);break;case"script":u=Ia(e)}if(!(Ll.has(u)||(e=_({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Ll.set(u,e),s.querySelector(o)!==null||t==="style"&&s.querySelector(du(u))||t==="script"&&s.querySelector(hu(u))))){var y=s.createElement("link");Dn(y,"link",e),t==="style"&&(y[na]=!0,y.onload=y.onerror=function(){nc(y)}),Jt(y),s.head.appendChild(y)}}}function hT(e,t){Li.m(e,t);var l=Ua;if(l&&e){var s=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+jl(s)+'"][href="'+jl(e)+'"]',u=o;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ia(e)}if(!Ll.has(u)&&(e=_({rel:"modulepreload",href:e},t),Ll.set(u,e),l.querySelector(o)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(hu(u)))return}s=l.createElement("link"),Dn(s,"link",e),Jt(s),l.head.appendChild(s)}}}function mT(e,t,l){Li.S(e,t,l);var s=Ua;if(s&&e){var o=Wl(s).hoistableStyles,u=Ha(e);t=t||"default";var y=o.get(u);if(!y){var R={loading:0,preload:null};if(y=s.querySelector(du(u)))R.loading=5;else{e=_({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Ll.get(u))&&Fm(e,l);var k=y=s.createElement("link");Jt(k),Dn(k,"link",e),k._p=new Promise(function(Y,ee){k.onload=Y,k.onerror=ee}),k.addEventListener("load",function(){R.loading|=1}),k.addEventListener("error",function(){R.loading|=2}),R.loading|=4,mf(y,t,s)}y={type:"stylesheet",instance:y,count:1,state:R},o.set(u,y)}}}function gT(e,t){Li.X(e,t);var l=Ua;if(l&&e){var s=Wl(l).hoistableScripts,o=Ia(e),u=s.get(o);u||(u=l.querySelector(hu(o)),u||(e=_({src:e,async:!0},t),(t=Ll.get(o))&&Xm(e,t),u=l.createElement("script"),Jt(u),Dn(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(o,u))}}function pT(e,t){Li.M(e,t);var l=Ua;if(l&&e){var s=Wl(l).hoistableScripts,o=Ia(e),u=s.get(o);u||(u=l.querySelector(hu(o)),u||(e=_({src:e,async:!0,type:"module"},t),(t=Ll.get(o))&&Xm(e,t),u=l.createElement("script"),Jt(u),Dn(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(o,u))}}function Ux(e,t,l,s){var o=(o=je.current)?fu(o):null;if(!o)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Ha(l.href),t=Wl(o).hoistableStyles,s=t.get(l),s||(s={type:"style",instance:null,count:0,state:null},t.set(l,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Ha(l.href);var u=Wl(o).hoistableStyles,y=u.get(e);if(y||(o=o.ownerDocument||o,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,y),(u=o.querySelector(du(e)))?u._p||(y.instance=u,y.state.loading=5):(u=Ll.get(e),u||(u={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ll.set(e,u)),yT(o,e,u,y.state))),t&&s===null)throw Error(a(528,""));return y}if(t&&s!==null)throw Error(a(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=Ia(l),t=Wl(o).hoistableScripts,s=t.get(l),s||(s={type:"script",instance:null,count:0,state:null},t.set(l,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Ha(e){return'href="'+jl(e)+'"'}function du(e){return'link[rel="stylesheet"]['+e+"]"}function Hx(e){return _({},e,{"data-precedence":e.precedence,precedence:null})}function yT(e,t,l,s){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[na]!==!0){s.loading=1;return}}else t=e.createElement("link"),t[na]=!0,t.onload=t.onerror=nc.bind(null,t),Dn(t,"link",l),Jt(t),e.head.appendChild(t);s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2})}function Ia(e){return'[src="'+jl(e)+'"]'}function hu(e){return"script[async]"+e}function Ix(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+jl(l.href)+'"]');if(s)return t.instance=s,Jt(s),s;var o=_({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Jt(s),Dn(s,"style",o),mf(s,l.precedence,e),t.instance=s;case"stylesheet":o=Ha(l.href);var u=e.querySelector(du(o));if(u)return t.state.loading|=4,t.instance=u,Jt(u),u;s=Hx(l),(o=Ll.get(o))&&Fm(s,o),u=(e.ownerDocument||e).createElement("link"),Jt(u);var y=u;return y._p=new Promise(function(R,k){y.onload=R,y.onerror=k}),Dn(u,"link",s),t.state.loading|=4,mf(u,l.precedence,e),t.instance=u;case"script":return u=Ia(l.src),(o=e.querySelector(hu(u)))?(t.instance=o,Jt(o),o):(s=l,(o=Ll.get(u))&&(s=_({},l),Xm(s,o)),e=e.ownerDocument||e,o=e.createElement("script"),Jt(o),Dn(o,"link",s),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(a(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,mf(s,l.precedence,e));return t.instance}function mf(e,t,l){for(var s=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=s.length?s[s.length-1]:null,u=o,y=0;y<s.length;y++){var R=s[y];if(R.dataset.precedence===t)u=R;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Fm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Xm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var gf=null;function Vx(e,t,l){if(gf===null){var s=new Map,o=gf=new Map;o.set(l,s)}else o=gf,s=o.get(l),s||(s=new Map,o.set(l,s));if(s.has(e))return s;for(s.set(e,null),l=l.getElementsByTagName(e),o=0;o<l.length;o++){var u=l[o];if(!(u[xi]||u[Ut]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var y=u.getAttribute(t)||"";y=e+y;var R=s.get(y);R?R.push(u):s.set(y,[u])}}return s}function Zm(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function bT(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 Bx(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function qx(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Px(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Gx(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=Px(t),e.suspenseyImages.push(t)),e=ST.bind(e),t.decode().then(e,e))}function vT(e,t,l,s){if(l.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var o=Ha(s.href),u=t.querySelector(du(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=mu.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=u,Jt(u);return}u=t.ownerDocument||t,s=Hx(s),(o=Ll.get(o))&&Fm(s,o),u=u.createElement("link"),Jt(u);var y=u;y._p=new Promise(function(R,k){y.onload=R,y.onerror=k}),Dn(u,"link",s),l.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=mu.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var pf=0;function xT(e,t){return e.stylesheets&&e.count===0&&bf(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var s=setTimeout(function(){if(e.stylesheets&&bf(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&pf===0&&(pf=62500*HC());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&bf(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>pf?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(o)}}:null}function Yx(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)bf(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function mu(){this.count--,Yx(this)}function ST(){this.imgCount--,Yx(this)}var yf=null;function bf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,yf=new Map,t.forEach(ET,e),yf=null,mu.call(e))}function ET(e,t){if(!(t.state.loading&4)){var l=yf.get(e);if(l)var s=l.get(null);else{l=new Map,yf.set(e,l);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var y=o[u];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(l.set(y.dataset.precedence,y),s=y)}s&&l.set(null,s)}o=t.instance,y=o.getAttribute("data-precedence"),u=l.get(y)||s,u===s&&l.set(null,o),l.set(y,o),this.count++,s=mu.bind(this),o.addEventListener("load",s),o.addEventListener("error",s),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Va={$$typeof:V,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function RT(e,t,l,s,o,u,y,R,k){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=Jr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jr(0),this.hiddenUpdates=Jr(null),this.identifierPrefix=s,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.transitionTypes=null,this.incompleteTransitions=new Map}function Qx(e,t,l,s,o,u,y,R,k,Y,ee,fe){return e=new RT(e,t,l,y,k,Y,ee,fe,R),t=1,u===!0&&(t|=24),u=rl(3,null,null,t),e.current=u,u.stateNode=e,t=fh(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:s,isDehydrated:l,cache:t},gh(u),e}function Kx(e){return e?(e=da,e):da}function Fx(e,t,l,s,o,u){o=Kx(o),s.context===null?s.context=o:s.pendingContext=o,s=fs(t),s.payload={element:l},u=u===void 0?null:u,u!==null&&(s.callback=u),l=ds(e,s,t),l!==null&&(cl(l,e,t),Yo(l,e,t))}function Xx(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Jm(e,t){Xx(e,t),(e=e.alternate)&&Xx(e,t)}function Zx(e){if(e.tag===13||e.tag===31){var t=ir(e,67108864);t!==null&&cl(t,e,67108864),Jm(e,67108864)}}function Jx(e){if(e.tag===13||e.tag===31){var t=vl();t=es(t);var l=ir(e,t);l!==null&&cl(l,e,t),Jm(e,t)}}var Ba=!0;function wT(e,t,l,s){var o=q.T;q.T=null;var u=le.p;try{le.p=2,$m(e,t,l,s)}finally{le.p=u,q.T=o}}function CT(e,t,l,s){var o=q.T;q.T=null;var u=le.p;try{le.p=8,$m(e,t,l,s)}finally{le.p=u,q.T=o}}function $m(e,t,l,s){if(Ba){var o=Wm(s);if(o===null)Dm(e,t,s,vf,l),Wx(e,s);else if(OT(o,e,t,l,s))s.stopPropagation();else if(Wx(e,s),t&4&&-1<TT.indexOf(e)){for(;o!==null;){var u=ts(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var y=Hn(u.pendingLanes);if(y!==0){var R=u;for(R.pendingLanes|=2,R.entangledLanes|=2;y;){var k=1<<31-Qe(y);R.entanglements[1]|=k,y&=~k}ci(u),(Et&6)===0&&(lf=it()+500,au(0))}}break;case 31:case 13:R=ir(u,2),R!==null&&cl(R,u,2),af(),Jm(u,2)}if(u=Wm(s),u===null&&Dm(e,t,s,vf,l),u===o)break;o=u}o!==null&&s.stopPropagation()}else Dm(e,t,s,null,l)}}function Wm(e){return e=Hd(e),eg(e)}var vf=null;function eg(e){if(vf=null,e=Si(e),e!==null){var t=f(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=d(t),e!==null)return e;e=null}else if(l===31){if(e=h(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 vf=e,null}function $x(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(st()){case gn:return 2;case Be:return 8;case tt:case Tt:return 32;case Pt:return 268435456;default:return 32}default:return 32}}var tg=!1,ws=null,Cs=null,Ts=null,gu=new Map,pu=new Map,Os=[],TT="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 Wx(e,t){switch(e){case"focusin":case"focusout":ws=null;break;case"dragenter":case"dragleave":Cs=null;break;case"mouseover":case"mouseout":Ts=null;break;case"pointerover":case"pointerout":gu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pu.delete(t.pointerId)}}function yu(e,t,l,s,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:l,eventSystemFlags:s,nativeEvent:u,targetContainers:[o]},t!==null&&(t=ts(t),t!==null&&Zx(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function OT(e,t,l,s,o){switch(t){case"focusin":return ws=yu(ws,e,t,l,s,o),!0;case"dragenter":return Cs=yu(Cs,e,t,l,s,o),!0;case"mouseover":return Ts=yu(Ts,e,t,l,s,o),!0;case"pointerover":var u=o.pointerId;return gu.set(u,yu(gu.get(u)||null,e,t,l,s,o)),!0;case"gotpointercapture":return u=o.pointerId,pu.set(u,yu(pu.get(u)||null,e,t,l,s,o)),!0}return!1}function e0(e){var t=Si(e.target);if(t!==null){var l=f(t);if(l!==null){if(t=l.tag,t===13){if(t=d(l),t!==null){e.blockedOn=t,Kn(e.priority,function(){Jx(l)});return}}else if(t===31){if(t=h(l),t!==null){e.blockedOn=t,Kn(e.priority,function(){Jx(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 xf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Wm(e.nativeEvent);if(l===null){l=e.nativeEvent;var s=new l.constructor(l.type,l);Ud=s,l.target.dispatchEvent(s),Ud=null}else return t=ts(l),t!==null&&Zx(t),e.blockedOn=l,!1;t.shift()}return!0}function t0(e,t,l){xf(e)&&l.delete(t)}function jT(){tg=!1,ws!==null&&xf(ws)&&(ws=null),Cs!==null&&xf(Cs)&&(Cs=null),Ts!==null&&xf(Ts)&&(Ts=null),gu.forEach(t0),pu.forEach(t0)}function Sf(e,t){e.blockedOn===t&&(e.blockedOn=null,tg||(tg=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,jT)))}var Ef=null;function n0(e){Ef!==e&&(Ef=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ef===e&&(Ef=null);for(var t=0;t<e.length;t+=3){var l=e[t],s=e[t+1],o=e[t+2];if(typeof s!="function"){if(eg(s||l)===null)continue;break}var u=ts(l);u!==null&&(e.splice(t,3),t-=3,Lh(u,{pending:!0,data:o,method:l.method,action:s},s,o))}}))}function qa(e){function t(k){return Sf(k,e)}ws!==null&&Sf(ws,e),Cs!==null&&Sf(Cs,e),Ts!==null&&Sf(Ts,e),gu.forEach(t),pu.forEach(t);for(var l=0;l<Os.length;l++){var s=Os[l];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Os.length&&(l=Os[0],l.blockedOn===null);)e0(l),l.blockedOn===null&&Os.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(s=0;s<l.length;s+=3){var o=l[s],u=l[s+1],y=o[In]||null;if(typeof u=="function")y||n0(l);else if(y){var R=null;if(u&&u.hasAttribute("formAction")){if(o=u,y=u[In]||null)R=y.formAction;else if(eg(o)!==null)continue}else R=y.action;typeof R=="function"?l[s+1]=R:(l.splice(s,3),s-=3),n0(l)}}}function l0(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(y){return o=y})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),s||setTimeout(l,20)}function l(){if(!s&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function ng(e){this._internalRoot=e}Rf.prototype.render=ng.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var l=t.current,s=vl();Fx(l,s,e,t,null,null)},Rf.prototype.unmount=ng.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fx(e.current,2,null,e,null,null),af(),t[$l]=null}};function Rf(e){this._internalRoot=e}Rf.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qn();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Os.length&&t!==0&&t<Os[l].priority;l++);Os.splice(l,0,e),l===0&&e0(e)}};var i0=i.version;if(i0!=="19.3.1")throw Error(a(527,i0,"19.3.1"));le.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=g(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var AT={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wf.isDisabled&&wf.supportsFiber)try{pn=wf.inject(AT),Yt=wf}catch{}}return vu.createRoot=function(e,t){if(!c(e))throw Error(a(299));var l=!1,s="",o=Kb,u=Fb,y=Xb;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=Qx(e,1,!1,null,null,l,s,null,o,u,y,l0),e[$l]=t.current,zm(e),new ng(t)},vu.hydrateRoot=function(e,t,l){if(!c(e))throw Error(a(299));var s=!1,o="",u=Kb,y=Fb,R=Xb,k=null;return l!=null&&(l.unstable_strictMode===!0&&(s=!0),l.identifierPrefix!==void 0&&(o=l.identifierPrefix),l.onUncaughtError!==void 0&&(u=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(R=l.onRecoverableError),l.formState!==void 0&&(k=l.formState)),t=Qx(e,1,!0,t,l??null,s,o,k,u,y,R,l0),t.context=Kx(null),l=t.current,s=vl(),s=es(s),o=fs(s),o.callback=null,ds(l,o,s),l=s,t.current.lanes=l,tr(t,l),ci(t),e[$l]=t.current,zm(e),new Rf(t)},vu.version="19.3.1",vu}var g0;function qT(){if(g0)return rg.exports;g0=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),rg.exports=BT(),rg.exports}var PT=qT();const LS=x.createContext(!1),GT=()=>x.useContext(LS);LS.Provider;const US=x.createContext(void 0),rp=n=>{const i=x.useContext(US);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},YT=({client:n,children:i})=>(x.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),p.jsx(US.Provider,{value:n,children:i}));function QT(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}const KT=x.createContext(QT()),FT=()=>x.useContext(KT);var vo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Mr,Ds,eo,wS,XT=(wS=class extends vo{constructor(){super();Ge(this,Mr);Ge(this,Ds);Ge(this,eo);Ae(this,eo,i=>{if(typeof window<"u"&&window.addEventListener){const r=()=>i();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){U(this,Ds)||this.setEventListener(U(this,eo))}onUnsubscribe(){var i;this.hasListeners()||((i=U(this,Ds))==null||i.call(this),Ae(this,Ds,void 0))}setEventListener(i){var r;Ae(this,eo,i),(r=U(this,Ds))==null||r.call(this),Ae(this,Ds,i(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(i){U(this,Mr)!==i&&(Ae(this,Mr,i),this.onFocus())}onFocus(){const i=this.isFocused();this.listeners.forEach(r=>{r(i)})}isFocused(){var i;return typeof U(this,Mr)=="boolean"?U(this,Mr):((i=globalThis.document)==null?void 0:i.visibilityState)!=="hidden"}},Mr=new WeakMap,Ds=new WeakMap,eo=new WeakMap,wS);const ap=new XT,ZT={setTimeout:(n,i)=>setTimeout(n,i),clearTimeout:n=>clearTimeout(n),setInterval:(n,i)=>setInterval(n,i),clearInterval:n=>clearInterval(n)};var _s,ip,CS,JT=(CS=class{constructor(){Ge(this,_s,ZT);Ge(this,ip,!1)}setTimeoutProvider(n){Ae(this,_s,n)}setTimeout(n,i){return U(this,_s).setTimeout(n,i)}clearTimeout(n){U(this,_s).clearTimeout(n)}setInterval(n,i){return U(this,_s).setInterval(n,i)}clearInterval(n){U(this,_s).clearInterval(n)}},_s=new WeakMap,ip=new WeakMap,CS);const Tr=new JT;function $T(n){setTimeout(n,0)}const WT=typeof window>"u"||"Deno"in globalThis;function tl(){}function eO(n,i){return typeof n=="function"?n(i):n}function HS(n){return typeof n=="number"&&n>=0&&n!==1/0}function IS(n,i){return Math.max(n+(i||0)-Date.now(),0)}function It(n,i){return typeof n=="function"?n(i):n}function p0(n,i){const{type:r="all",exact:a,fetchStatus:c,predicate:f,queryKey:d,stale:h}=n;if(d){if(a){if(i.queryHash!==op(d,i.options))return!1}else if(!mo(i.queryKey,d))return!1}if(r!=="all"){const m=i.isActive();if(r==="active"&&!m||r==="inactive"&&m)return!1}return!(typeof h=="boolean"&&i.isStale()!==h||c&&c!==i.state.fetchStatus||f&&!f(i))}function y0(n,i){const{exact:r,status:a,predicate:c,mutationKey:f}=n;if(f){if(!i.options.mutationKey)return!1;if(r){if(Pr(i.options.mutationKey)!==Pr(f))return!1}else if(!mo(i.options.mutationKey,f))return!1}return!(a&&i.state.status!==a||c&&!c(i))}function op(n,i){return((i==null?void 0:i.queryKeyHashFn)||Pr)(n)}function Pr(n){return JSON.stringify(n,(i,r)=>Tg(r)?Object.keys(r).sort().reduce((a,c)=>(a[c]=r[c],a),{}):r)}function mo(n,i){if(n===i)return!0;if(typeof n!=typeof i)return!1;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(Array.isArray(n)!==Array.isArray(i))return!1;if(Array.isArray(n)&&Array.isArray(i)){if(i.length>n.length)return!1;for(let a=0;a<i.length;a++)if(!mo(n[a],i[a]))return!1;return!0}const r=Object.keys(i);for(const a of r)if(!mo(n[a],i[a]))return!1;return!0}return!1}const VS=Object.prototype.hasOwnProperty;function BS(n,i,r=0){if(n===i)return n;if(r>500)return i;const a=b0(n)&&b0(i);if(!a&&!(Tg(n)&&Tg(i)))return i;const c=(a?n:Object.keys(n)).length,f=a?i:Object.keys(i),d=f.length,h=a?new Array(d):{};let m=0;for(let g=0;g<d;g++){const v=a?g:f[g],b=n[v],S=i[v];if(b===S){h[v]=b,(a?g<c:VS.call(n,v))&&m++;continue}if(b===null||S===null||typeof b!="object"||typeof S!="object"){h[v]=S;continue}const T=BS(b,S,r+1);h[v]=T,T===b&&m++}return c===d&&m===c?n:h}function qf(n,i){if(!i||Object.keys(n).length!==Object.keys(i).length)return!1;for(const r of Object.keys(n))if(!VS.call(i,r)||n[r]!==i[r])return!1;return!0}function b0(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Tg(n){if(!v0(n))return!1;const i=Object.getPrototypeOf(n),r=i==null?void 0:i.constructor;if(r===void 0)return!0;if(typeof r!="function")return!1;const a=r.prototype;return!(!v0(a)||!a.hasOwnProperty("isPrototypeOf")||i!==Object.prototype)}function v0(n){return Object.prototype.toString.call(n)==="[object Object]"}function tO(n){return new Promise(i=>{Tr.setTimeout(i,n)})}function Og(n,i,r){return typeof r.structuralSharing=="function"?r.structuralSharing(n,i):r.structuralSharing!==!1?BS(n,i):i}function x0(n,i,r,a){const c=a?[i,...n]:[...n,i];return r&&c.length>r?a?c.slice(0,r):c.slice(-r):c}const up=Symbol();function qS(n,i){return!n.queryFn&&(i!=null&&i.initialPromise)?()=>i.initialPromise:!n.queryFn||n.queryFn===up?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function cp(n,i){return typeof n=="function"?n(...i):!!n}const fp=Symbol();function nO(n,i,r,a){let c=!1,f;return Object.defineProperties(n,{[fp]:{value:a},signal:{enumerable:!0,get:()=>(f??(f=i()),c||(c=!0,f.aborted?r():f.addEventListener("abort",r,{once:!0})),f)}}),n}let lO=()=>WT;const dp=()=>lO();function iO(n){return{onFetch:(i,r)=>{var v,b,S,T,C;const a=i.options,c=(S=(b=(v=i.fetchOptions)==null?void 0:v.meta)==null?void 0:b.fetchMore)==null?void 0:S.direction,f=((T=i.state.data)==null?void 0:T.pages)||[],d=((C=i.state.data)==null?void 0:C.pageParams)||[];let h={pages:[],pageParams:[]},m=0;const g=async()=>{let w=!1;const j=i,O=N=>{nO(N,()=>i.signal,()=>w=!0,j[fp])},E=qS(i.options,i.fetchOptions),A=async(N,L,D)=>{if(w)return Promise.reject(i.signal.reason);if(L==null&&N.pages.length)return Promise.resolve(N);const M=(()=>{const se={client:i.client,queryKey:i.queryKey,pageParam:L,direction:D?"backward":"forward",meta:i.options.meta};return O(se),se})(),Q=await E(M),{maxPages:J}=i.options;return{pages:x0(N.pages,Q,J,D),pageParams:x0(N.pageParams,L,J,D)}};if(c&&f.length){const N=c==="backward",L=N?PS:jg,D={pages:f,pageParams:d};h=await A(D,L(a,D),N)}else{const N=n??f.length;do{const L=m===0?d[0]===void 0?a.initialPageParam:d[0]:jg(a,h);if(m>0&&L==null)break;h=await A(h,L),m++}while(m<N)}return h};i.options.persister?i.fetchFn=()=>{var w,j;return(j=(w=i.options).persister)==null?void 0:j.call(w,g,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},r)}:i.fetchFn=g}}}function jg(n,{pages:i,pageParams:r}){const a=i.length-1;return i.length>0?n.getNextPageParam(i[a],i,r[a],r):void 0}function PS(n,{pages:i,pageParams:r}){var a;return i.length>0?(a=n.getPreviousPageParam)==null?void 0:a.call(n,i[0],i,r[0],r):void 0}function sO(n,i){return i?jg(n,i)!=null:!1}function rO(n,i){return!i||!n.getPreviousPageParam?!1:PS(n,i)!=null}const aO=$T;function oO(){let n=[],i=0,r=h=>{h()},a=h=>{h()},c=aO;const f=h=>{i?n.push(h):c(()=>{r(h)})},d=()=>{const h=n;n=[],h.length&&c(()=>{a(()=>{h.forEach(m=>{r(m)})})})};return{batch:h=>{let m;i++;try{m=h()}finally{i--,i||d()}return m},batchCalls:h=>(...m)=>{f(()=>{h(...m)})},schedule:f,setNotifyFunction:h=>{r=h},setBatchNotifyFunction:h=>{a=h},setScheduler:h=>{c=h}}}const xn=oO();var zr,TS,GS=(TS=class{constructor(){Ge(this,zr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),HS(this.gcTime)&&Ae(this,zr,Tr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(dp()?1/0:3e5))}clearGcTimeout(){U(this,zr)!==void 0&&(Tr.clearTimeout(U(this,zr)),Ae(this,zr,void 0))}},zr=new WeakMap,TS),to,ks,no,OS,uO=(OS=class extends vo{constructor(){super();Ge(this,to,!0);Ge(this,ks);Ge(this,no);Ae(this,no,i=>{if(typeof window<"u"&&window.addEventListener){const r=()=>i(!0),a=()=>i(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",a)}}})}onSubscribe(){U(this,ks)||this.setEventListener(U(this,no))}onUnsubscribe(){var i;this.hasListeners()||((i=U(this,ks))==null||i.call(this),Ae(this,ks,void 0))}setEventListener(i){var r;Ae(this,no,i),(r=U(this,ks))==null||r.call(this),Ae(this,ks,i(this.setOnline.bind(this)))}setOnline(i){U(this,to)!==i&&(Ae(this,to,i),this.listeners.forEach(r=>{r(i)}))}isOnline(){return U(this,to)}},to=new WeakMap,ks=new WeakMap,no=new WeakMap,OS);const Xf=new uO;function cO(n){return Math.min(1e3*2**n,3e4)}function YS(n){return(n??"online")==="online"?Xf.isOnline():!0}var Ag=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function QS(n){let i=!1,r=0,a,c="pending",f,d;const h=new Promise((E,A)=>{f=E,d=A});h.catch(tl);const m=()=>c!=="pending",g=E=>{var A;if(!m()){const N=new Ag(E);w(N),(A=n.onCancel)==null||A.call(n,N)}},v=()=>{i=!0},b=()=>{i=!1},S=()=>ap.isFocused()&&(n.networkMode==="always"||Xf.isOnline())&&n.canRun(),T=()=>YS(n.networkMode)&&n.canRun(),C=E=>{m()||(a==null||a(),c="resolved",f(E))},w=E=>{m()||(a==null||a(),c="rejected",d(E))},j=E=>new Promise(A=>{var N;a=L=>{(m()||E())&&A(L)},(N=n.onPause)==null||N.call(n)}).then(()=>{var A;a=void 0,m()||(A=n.onContinue)==null||A.call(n)}),O=()=>{if(m())return;let E;const A=r===0?n.initialPromise:void 0;try{E=A??n.fn()}catch(N){E=Promise.reject(N)}Promise.resolve(E).then(C).catch(N=>{var Q;if(m())return;const L=n.retry??(dp()?0:3),D=n.retryDelay??cO,_=typeof D=="function"?D(r,N):D,M=L===!0||typeof L=="number"&&r<L||typeof L=="function"&&L(r,N);if(i||!M){w(N);return}r++,(Q=n.onFail)==null||Q.call(n,r,N),tO(_).then(()=>m()||S()?void 0:j(S)).then(()=>{i?w(N):O()})})};return{promise:h,status:()=>c,cancel:g,continue:()=>(a==null||a(),h),cancelRetry:v,continueRetry:b,canStart:T,start:()=>(T()?O():j(T).then(O),h)}}var lo,Dr,io,Sl,_r,Tn,Ii,Uu,kr,fl,Ng,Hi,jS,fO=(jS=class extends GS{constructor(i){super();Ge(this,fl);Ge(this,lo);Ge(this,Dr);Ge(this,io);Ge(this,Sl);Ge(this,_r);Ge(this,Tn);Ge(this,Ii);Ge(this,Uu);Ge(this,kr);Ae(this,kr,!1),Ae(this,Uu,i.defaultOptions),this.setOptions(i.options),this.observers=[],Ae(this,_r,i.client),Ae(this,Sl,U(this,_r).getQueryCache()),this.queryKey=i.queryKey,this.queryHash=i.queryHash,Ae(this,Dr,E0(this.options)),this.state=i.state??U(this,Dr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return U(this,lo)}get promise(){var i;return(i=U(this,Tn))==null?void 0:i.promise}setOptions(i){if(this.options={...U(this,Uu),...i},i!=null&&i._type&&Ae(this,lo,i._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=E0(this.options);r.data!==void 0&&(this.setState(S0(r.data,r.dataUpdatedAt)),Ae(this,Dr,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&U(this,Sl).remove(this)}setData(i,r){const a=Og(this.state.data,i,this.options);return rt(this,fl,Hi).call(this,{data:a,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),a}setState(i){rt(this,fl,Hi).call(this,{type:"setState",state:i})}cancel(i){var a,c;const r=(a=U(this,Tn))==null?void 0:a.promise;return(c=U(this,Tn))==null||c.cancel(i),r?r.then(tl).catch(tl):Promise.resolve()}destroy(){this.cancel({silent:!0}),super.destroy()}get resetState(){return U(this,Dr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(i=>It(i.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===up||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data===void 0?!1:this.getObserversCount()>0?this.observers.some(i=>It(i.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(i=>i.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(i=0){return this.state.data===void 0?!0:i==="static"?!1:this.state.isInvalidated?!0:!IS(this.state.dataUpdatedAt,i)}onFocus(){var i,r;(i=this.observers.find(a=>a.shouldFetchOnWindowFocus()))==null||i.refetch({cancelRefetch:!1}),(r=U(this,Tn))==null||r.continue()}onOnline(){var i,r;(i=this.observers.find(a=>a.shouldFetchOnReconnect()))==null||i.refetch({cancelRefetch:!1}),(r=U(this,Tn))==null||r.continue()}addObserver(i){this.observers.includes(i)||(this.observers.push(i),this.clearGcTimeout(),U(this,Sl).notify({type:"observerAdded",query:this,observer:i}))}removeObserver(i){const r=this.observers.indexOf(i);r!==-1&&(this.observers.splice(r,1),this.observers.length||(U(this,Tn)&&(U(this,kr)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?U(this,Tn).cancel({revert:!0}):U(this,Tn).cancelRetry()),rt(this,fl,Ng).call(this)),U(this,Sl).notify({type:"observerRemoved",query:this,observer:i}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||rt(this,fl,Hi).call(this,{type:"invalidate"})}async fetch(i,r){var v,b,S,T;if(this.state.fetchStatus!=="idle"&&((v=U(this,Tn))==null?void 0:v.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(U(this,Tn)&&U(this,Ii))return U(this,Tn).continueRetry(),U(this,Ii)}if(i&&this.setOptions(i),!this.options.queryFn){const C=this.observers.find(w=>w.options.queryFn);C&&this.setOptions(C.options)}const a=new AbortController,c=C=>{Object.defineProperties(C,{[fp]:{value:a.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(Ae(this,kr,!0),a.signal)}})},f=()=>{const C=qS(this.options,r),j=(()=>{const O={client:U(this,_r),queryKey:this.queryKey,meta:this.meta};return c(O),O})();return Ae(this,kr,!1),this.options.persister?this.options.persister(C,j,this):C(j)},h=(()=>{const C={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:U(this,_r),state:this.state,fetchFn:f};return c(C),C})();(b=U(this,lo)==="infinite"?iO(this.options.pages):this.options.behavior)==null||b.onFetch(h,this),Ae(this,io,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((S=h.fetchOptions)==null?void 0:S.meta))&&rt(this,fl,Hi).call(this,{type:"fetch",meta:(T=h.fetchOptions)==null?void 0:T.meta});const m=Ae(this,Tn,QS({initialPromise:r==null?void 0:r.initialPromise,fn:h.fetchFn,onCancel:C=>{C instanceof Ag&&C.revert&&this.setState({...U(this,io),fetchStatus:"idle"}),a.abort()},onFail:(C,w)=>{rt(this,fl,Hi).call(this,{type:"failed",failureCount:C,error:w})},onPause:()=>{rt(this,fl,Hi).call(this,{type:"pause"})},onContinue:()=>{rt(this,fl,Hi).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0})),g=(async()=>{var C,w,j,O,E,A,N,L;try{const D=await m.promise;if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(w=(C=U(this,Sl).config).onSuccess)==null||w.call(C,D,this),(O=(j=U(this,Sl).config).onSettled)==null||O.call(j,D,this.state.error,this),D}catch(D){if(D instanceof Ag){if(D.silent){if(U(this,Tn)!==m&&U(this,Ii))return U(this,Ii);throw D}else if(D.revert){if(this.state.data===void 0)throw D;return this.state.data}}throw rt(this,fl,Hi).call(this,{type:"error",error:D}),(A=(E=U(this,Sl).config).onError)==null||A.call(E,D,this),(L=(N=U(this,Sl).config).onSettled)==null||L.call(N,this.state.data,D,this),D}finally{U(this,Tn)===m&&(Ae(this,Tn,void 0),Ae(this,Ii,void 0)),rt(this,fl,Ng).call(this)}})();return Ae(this,Ii,g),m.start(),g}},lo=new WeakMap,Dr=new WeakMap,io=new WeakMap,Sl=new WeakMap,_r=new WeakMap,Tn=new WeakMap,Ii=new WeakMap,Uu=new WeakMap,kr=new WeakMap,fl=new WeakSet,Ng=function(){U(this,Sl).get(this.queryHash)===this&&this.scheduleGc()},Hi=function(i){const r=a=>{switch(i.type){case"failed":return{...a,fetchFailureCount:i.failureCount,fetchFailureReason:i.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...KS(a.data,this.options),fetchMeta:i.meta??null};case"success":{const c={...a,...S0(i.data,i.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!i.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ae(this,io,i.manual?c:void 0),c}case"error":{const c=i.error;return{...a,error:c,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0}}case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...i.state}}};this.state=r(this.state),xn.batch(()=>{this.observers.slice().forEach(a=>{a.onQueryUpdate()}),U(this,Sl).notify({query:this,type:"updated",action:i})})},jS);function KS(n,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:YS(i.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function S0(n,i){return{data:n,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function E0(n){const i=typeof n.initialData=="function"?n.initialData():n.initialData,r=i!==void 0,a=r?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Wn,vt,Hu,el,so,Vi,Iu,Lr,ro,ao,Ur,Hr,Ls,oo,wt,Ru,Mg,zg,Dg,_g,kg,Lg,Ug,Hg,AS,FS=(AS=class extends vo{constructor(i,r){super();Ge(this,wt);Ge(this,Wn);Ge(this,vt);Ge(this,Hu);Ge(this,el);Ge(this,so);Ge(this,Vi);Ge(this,Iu);Ge(this,Lr);Ge(this,ro);Ge(this,ao);Ge(this,Ur);Ge(this,Hr);Ge(this,Ls);Ge(this,oo,new Set);this.options=r,Ae(this,Wn,i),Ae(this,Vi,null),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(U(this,vt).addObserver(this),R0(U(this,vt),this.options)?rt(this,wt,Ru).call(this):this.updateResult(),rt(this,wt,kg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ig(U(this,vt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ig(U(this,vt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,rt(this,wt,Lg).call(this),rt(this,wt,Ug).call(this),U(this,vt).removeObserver(this)}setOptions(i){const r=this.options,a=U(this,vt);if(this.options=U(this,Wn).defaultQueryOptions(i),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof It(this.options.enabled,U(this,vt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");rt(this,wt,Hg).call(this),U(this,vt).setOptions(this.options),r._defaulted&&!qf(this.options,r)&&U(this,Wn).getQueryCache().notify({type:"observerOptionsUpdated",query:U(this,vt),observer:this});const c=this.hasListeners();c&&w0(U(this,vt),a,this.options,r)&&rt(this,wt,Ru).call(this),this.updateResult(),c&&(U(this,vt)!==a||It(this.options.enabled,U(this,vt))!==It(r.enabled,U(this,vt))||It(this.options.staleTime,U(this,vt))!==It(r.staleTime,U(this,vt)))&&rt(this,wt,zg).call(this);const f=rt(this,wt,Dg).call(this);c&&(U(this,vt)!==a||It(this.options.enabled,U(this,vt))!==It(r.enabled,U(this,vt))||f!==U(this,Ls))&&rt(this,wt,_g).call(this,f)}getOptimisticResult(i){const r=U(this,Wn).getQueryCache().build(U(this,Wn),i),a=this.createResult(r,i);return qf(this.getCurrentResult(),a)||(Ae(this,el,a),Ae(this,so,i)),a}getCurrentResult(){return U(this,el)}trackResult(i,r){return new Proxy(i,{get:(a,c)=>(this.trackProp(c),r==null||r(c),Reflect.get(a,c))})}trackProp(i){U(this,oo).add(i)}getCurrentQuery(){return U(this,vt)}refetch({...i}={}){return this.fetch({...i})}fetchOptimistic(i){const r=U(this,Wn).defaultQueryOptions(i),a=U(this,Wn).getQueryCache().build(U(this,Wn),r);let c=()=>{},f;const d=new Promise(h=>{f=h,c=U(this,Wn).getQueryCache().subscribe(m=>{m.type==="updated"&&m.query.queryHash===a.queryHash&&a.state.data!==void 0&&(c(),h(this.createResult(a,r)))})});return Promise.race([a.fetch(r).then(()=>{const h=this.createResult(a,r);return f==null||f(h),h}).finally(()=>{c()}),d])}fetch(i){return rt(this,wt,Ru).call(this,{...i,cancelRefetch:i.cancelRefetch??!0}).then(()=>(this.updateResult(),U(this,el)))}createResult(i,r){var L;const a=U(this,vt),c=this.options,f=U(this,el),d=U(this,so),h=i!==a?i.state:U(this,Hu),{state:m}=i;let g={...m},v=!1,b;if(r._optimisticResults){const D=this.hasListeners(),_=!D&&R0(i,r),M=D&&w0(i,a,r,c);(_||M)&&(g={...g,...KS(m.data,i.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:S,errorUpdatedAt:T,status:C}=g;b=g.data;let w=!1;if(r.placeholderData!==void 0&&b===void 0&&C==="pending"){let D;const _=(f==null?void 0:f.isPlaceholderData)&&r.placeholderData===(d==null?void 0:d.placeholderData);_?(D=f.data,w=!0):D=typeof r.placeholderData=="function"?r.placeholderData((L=U(this,ao))==null?void 0:L.state.data,U(this,ao)):r.placeholderData,(_||D!==void 0)&&(C="success",b=Og(r.select&&!w?U(this,Lr):f==null?void 0:f.data,D,r),v=!0)}if(r.select&&b!==void 0&&!w)if(b===U(this,Lr)&&r.select===U(this,Iu))b=U(this,ro);else try{Ae(this,Iu,r.select),Ae(this,Lr,b),b=r.select(b),b=Og(f==null?void 0:f.data,b,r),Ae(this,ro,b),Ae(this,Vi,null)}catch(D){Ae(this,Vi,D)}else b===void 0&&(Ae(this,Lr,void 0),Ae(this,Vi,null));U(this,Vi)&&(S=U(this,Vi),b=U(this,ro),T=(f==null?void 0:f.error)===S?f.errorUpdatedAt:Date.now(),C="error",v=!1);const j=g.fetchStatus==="fetching",O=C==="pending",E=C==="error",A=O&&j,N=b!==void 0;return{status:C,fetchStatus:g.fetchStatus,isPending:O,isSuccess:C==="success",isError:E,isInitialLoading:A,isLoading:A,data:b,dataUpdatedAt:g.dataUpdatedAt,error:S,errorUpdatedAt:T,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:i.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:j,isRefetching:j&&!O,isLoadingError:E&&!N,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:E&&N,isStale:hp(i,r),refetch:this.refetch,isEnabled:It(r.enabled,i)!==!1}}updateResult(){const i=U(this,el),r=this.createResult(U(this,vt),this.options);if(Ae(this,so,this.options),U(this,vt).state.data!==void 0&&Ae(this,ao,U(this,vt)),qf(r,i))return;Ae(this,el,r);const c=(()=>{if(!i)return!0;const{notifyOnChangeProps:f}=this.options,d=typeof f=="function"?f():f;if(d==="all"||!d&&!U(this,oo).size||this.options.throwOnError&&U(this,el).error!==i.error)return!0;for(const h of d??U(this,oo))if(U(this,el)[h]!==i[h])return!0;return!1})();xn.batch(()=>{c&&this.listeners.forEach(f=>{f(U(this,el))}),U(this,Wn).getQueryCache().notify({query:U(this,vt),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&rt(this,wt,kg).call(this)}},Wn=new WeakMap,vt=new WeakMap,Hu=new WeakMap,el=new WeakMap,so=new WeakMap,Vi=new WeakMap,Iu=new WeakMap,Lr=new WeakMap,ro=new WeakMap,ao=new WeakMap,Ur=new WeakMap,Hr=new WeakMap,Ls=new WeakMap,oo=new WeakMap,wt=new WeakSet,Ru=function(i){rt(this,wt,Hg).call(this);let r=U(this,vt).fetch(this.options,i);return i!=null&&i.throwOnError||(r=r.catch(tl)),r},Mg=function(i){return!dp()&&It(this.options.enabled,U(this,vt))!==!1&&HS(i)},zg=function(){rt(this,wt,Lg).call(this);const i=It(this.options.staleTime,U(this,vt));if(U(this,el).isStale||!rt(this,wt,Mg).call(this,i))return;const r=IS(U(this,el).dataUpdatedAt,i)+1;Ae(this,Ur,Tr.setTimeout(()=>{U(this,el).isStale||this.updateResult()},r))},Dg=function(){return It(this.options.refetchInterval,U(this,vt))??!1},_g=function(i){rt(this,wt,Ug).call(this),Ae(this,Ls,i),!(U(this,Ls)===0||!rt(this,wt,Mg).call(this,U(this,Ls)))&&Ae(this,Hr,Tr.setInterval(()=>{(this.options.refetchIntervalInBackground||ap.isFocused())&&rt(this,wt,Ru).call(this)},U(this,Ls)))},kg=function(){rt(this,wt,zg).call(this),rt(this,wt,_g).call(this,rt(this,wt,Dg).call(this))},Lg=function(){U(this,Ur)!==void 0&&(Tr.clearTimeout(U(this,Ur)),Ae(this,Ur,void 0))},Ug=function(){U(this,Hr)!==void 0&&(Tr.clearInterval(U(this,Hr)),Ae(this,Hr,void 0))},Hg=function(){const i=U(this,Wn).getQueryCache().build(U(this,Wn),this.options);if(i===U(this,vt))return;const r=U(this,vt);Ae(this,vt,i),Ae(this,Hu,i.state),this.hasListeners()&&(r==null||r.removeObserver(this),i.addObserver(this))},AS);function dO(n,i){return It(i.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&It(i.retryOnMount,n)===!1)}function R0(n,i){return dO(n,i)||n.state.data!==void 0&&Ig(n,i,i.refetchOnMount)}function Ig(n,i,r){if(It(i.enabled,n)!==!1&&It(i.staleTime,n)!=="static"){const a=It(r,n);return a==="always"||a!==!1&&hp(n,i)}return!1}function w0(n,i,r,a){return(n!==i||It(a.enabled,n)===!1)&&(!r.suspense||n.state.status!=="error")&&hp(n,r)}function hp(n,i){return It(i.enabled,n)!==!1&&n.isStaleByTime(It(i.staleTime,n))}var hO=class extends FS{constructor(n,i){super(n,i)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(n){n._type="infinite",super.setOptions(n)}getOptimisticResult(n){return n._type="infinite",super.getOptimisticResult(n)}fetchNextPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(n){return this.fetch({...n,meta:{fetchMore:{direction:"backward"}}})}createResult(n,i){var T,C;const{state:r}=n,a=super.createResult(n,i),{isFetching:c,isRefetching:f,isError:d,isRefetchError:h}=a,m=(C=(T=r.fetchMeta)==null?void 0:T.fetchMore)==null?void 0:C.direction,g=d&&m==="forward",v=c&&m==="forward",b=d&&m==="backward",S=c&&m==="backward";return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:sO(i,r.data),hasPreviousPage:rO(i,r.data),isFetchNextPageError:g,isFetchingNextPage:v,isFetchPreviousPageError:b,isFetchingPreviousPage:S,isRefetchError:h&&!g&&!b,isRefetching:f&&!v&&!S}}},Vu,di,kn,Ir,hi,Ns,NS,mO=(NS=class extends GS{constructor(i){super();Ge(this,hi);Ge(this,Vu);Ge(this,di);Ge(this,kn);Ge(this,Ir);Ae(this,Vu,i.client),this.mutationId=i.mutationId,Ae(this,kn,i.mutationCache),Ae(this,di,[]),this.state=i.state||XS(),this.setOptions(i.options),this.scheduleGc()}setOptions(i){this.options=i,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(i){U(this,di).includes(i)||(U(this,di).push(i),this.clearGcTimeout(),U(this,kn).notify({type:"observerAdded",mutation:this,observer:i}))}removeObserver(i){Ae(this,di,U(this,di).filter(r=>r!==i)),U(this,kn).has(this)&&this.scheduleGc(),U(this,kn).notify({type:"observerRemoved",mutation:this,observer:i})}optionalRemove(){U(this,di).length||(this.state.status==="pending"?this.scheduleGc():U(this,kn).remove(this))}continue(){var i;return((i=U(this,Ir))==null?void 0:i.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(i){var h,m,g,v,b,S,T,C,w,j,O,E,A,N,L,D,_,M;const r=()=>{rt(this,hi,Ns).call(this,{type:"continue"})},a={client:U(this,Vu),meta:this.options.meta,mutationKey:this.options.mutationKey},c=Ae(this,Ir,QS({fn:()=>this.options.mutationFn?this.options.mutationFn(i,a):Promise.reject(new Error("No mutationFn found")),onFail:(Q,J)=>{rt(this,hi,Ns).call(this,{type:"failed",failureCount:Q,error:J})},onPause:()=>{rt(this,hi,Ns).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>U(this,kn).canRun(this)})),f=this.state.status==="pending",d=!c.canStart();try{if(f)r();else{rt(this,hi,Ns).call(this,{type:"pending",variables:i,isPaused:d}),U(this,kn).config.onMutate&&await U(this,kn).config.onMutate(i,this,a);const J=await((m=(h=this.options).onMutate)==null?void 0:m.call(h,i,a));J!==this.state.context&&rt(this,hi,Ns).call(this,{type:"pending",context:J,variables:i,isPaused:d})}this.state.isPaused&&c.canStart()&&r();const Q=await c.start();return await((v=(g=U(this,kn).config).onSuccess)==null?void 0:v.call(g,Q,i,this.state.context,this,a)),await((S=(b=this.options).onSuccess)==null?void 0:S.call(b,Q,i,this.state.context,a)),await((C=(T=U(this,kn).config).onSettled)==null?void 0:C.call(T,Q,null,this.state.variables,this.state.context,this,a)),await((j=(w=this.options).onSettled)==null?void 0:j.call(w,Q,null,i,this.state.context,a)),rt(this,hi,Ns).call(this,{type:"success",data:Q}),Q}catch(Q){try{await((E=(O=U(this,kn).config).onError)==null?void 0:E.call(O,Q,i,this.state.context,this,a))}catch(J){Promise.reject(J)}try{await((N=(A=this.options).onError)==null?void 0:N.call(A,Q,i,this.state.context,a))}catch(J){Promise.reject(J)}try{await((D=(L=U(this,kn).config).onSettled)==null?void 0:D.call(L,void 0,Q,this.state.variables,this.state.context,this,a))}catch(J){Promise.reject(J)}try{await((M=(_=this.options).onSettled)==null?void 0:M.call(_,void 0,Q,i,this.state.context,a))}catch(J){Promise.reject(J)}throw rt(this,hi,Ns).call(this,{type:"error",error:Q}),Q}finally{U(this,Ir)===c&&Ae(this,Ir,void 0),U(this,kn).runNext(this)}}},Vu=new WeakMap,di=new WeakMap,kn=new WeakMap,Ir=new WeakMap,hi=new WeakSet,Ns=function(i){const r=a=>{switch(i.type){case"failed":return{...a,failureCount:i.failureCount,failureReason:i.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:i.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:i.isPaused,status:"pending",variables:i.variables,submittedAt:Date.now()};case"success":return{...a,data:i.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:i.error,failureCount:a.failureCount+1,failureReason:i.error,isPaused:!1,status:"error"}}};this.state=r(this.state),xn.batch(()=>{U(this,di).forEach(a=>{a.onMutationUpdate(i)}),U(this,kn).notify({mutation:this,type:"updated",action:i})})},NS);function XS(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bi,Jl,Bu,MS,gO=(MS=class extends vo{constructor(i={}){super();Ge(this,Bi);Ge(this,Jl);Ge(this,Bu);this.config=i,Ae(this,Bi,new Set),Ae(this,Jl,new Map),Ae(this,Bu,0)}build(i,r,a){const c=new mO({client:i,mutationCache:this,mutationId:++Cf(this,Bu)._,options:i.defaultMutationOptions(r),state:a});return this.add(c),c}add(i){U(this,Bi).add(i);const r=Tf(i);if(typeof r=="string"){const a=U(this,Jl).get(r);a?a.push(i):U(this,Jl).set(r,[i])}this.notify({type:"added",mutation:i})}remove(i){if(U(this,Bi).delete(i)){i.destroy();const r=Tf(i);if(typeof r=="string"){const a=U(this,Jl).get(r);if(a)if(a.length>1){const c=a.indexOf(i);c!==-1&&a.splice(c,1)}else a[0]===i&&U(this,Jl).delete(r)}}this.notify({type:"removed",mutation:i})}has(i){return U(this,Bi).has(i)}canRun(i){var a;const r=Tf(i);if(typeof r=="string"){const c=(a=U(this,Jl).get(r))==null?void 0:a.find(f=>f.state.status==="pending");return!c||c===i}else return!0}runNext(i){var a,c;const r=Tf(i);return typeof r=="string"?((c=(a=U(this,Jl).get(r))==null?void 0:a.find(f=>f!==i&&f.state.isPaused))==null?void 0:c.continue())??Promise.resolve():Promise.resolve()}clear(){xn.batch(()=>{const i=this.getAll();U(this,Bi).clear(),U(this,Jl).clear(),i.forEach(r=>r.destroy()),i.forEach(r=>{this.notify({type:"removed",mutation:r})})})}getAll(){return Array.from(U(this,Bi))}find(i){const r={exact:!0,...i};return this.getAll().find(a=>y0(r,a))}findAll(i={}){return this.getAll().filter(r=>y0(i,r))}notify(i){xn.batch(()=>{this.listeners.forEach(r=>{r(i)})})}resumePausedMutations(){const i=this.getAll().filter(r=>r.state.isPaused);return xn.batch(()=>Promise.all(i.map(r=>r.continue().catch(tl))))}},Bi=new WeakMap,Jl=new WeakMap,Bu=new WeakMap,MS);function Tf(n){var i;return(i=n.options.scope)==null?void 0:i.id}var qi,Us,qn,qu,pi,wu,Vg,zS,pO=(zS=class extends vo{constructor(r,a){super();Ge(this,pi);Ge(this,qi);Ge(this,Us);Ge(this,qn);Ge(this,qu);Ae(this,qi,r),this.setOptions(a),this.bindMethods(),rt(this,pi,wu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var c;const a=this.options;this.options=U(this,qi).defaultMutationOptions(r),qf(this.options,a)||U(this,qi).getMutationCache().notify({type:"observerOptionsUpdated",mutation:U(this,qn),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&Pr(a.mutationKey)!==Pr(this.options.mutationKey)?this.reset():((c=U(this,qn))==null?void 0:c.state.status)==="pending"&&U(this,qn).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&U(this,qn)&&(U(this,qn).addObserver(this),rt(this,pi,wu).call(this))}onUnsubscribe(){var r;this.hasListeners()||(r=U(this,qn))==null||r.removeObserver(this)}onMutationUpdate(r){rt(this,pi,wu).call(this),rt(this,pi,Vg).call(this,r)}getCurrentResult(){return U(this,Us)}reset(){var r;(r=U(this,qn))==null||r.removeObserver(this),Ae(this,qn,void 0),rt(this,pi,wu).call(this),rt(this,pi,Vg).call(this)}mutate(r,a){var c;return Ae(this,qu,a),(c=U(this,qn))==null||c.removeObserver(this),Ae(this,qn,U(this,qi).getMutationCache().build(U(this,qi),this.options)),U(this,qn).addObserver(this),U(this,qn).execute(r)}},qi=new WeakMap,Us=new WeakMap,qn=new WeakMap,qu=new WeakMap,pi=new WeakSet,wu=function(){var a;const r=((a=U(this,qn))==null?void 0:a.state)??XS();Ae(this,Us,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Vg=function(r){xn.batch(()=>{var c,f,d,h;const a=U(this,qu);if(a&&this.hasListeners()){const m=U(this,Us).variables,g=U(this,Us).context,v={client:U(this,qi),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(c=a.onSuccess)==null||c.call(a,r.data,m,g,v)}catch(b){Promise.reject(b)}try{(f=a.onSettled)==null||f.call(a,r.data,null,m,g,v)}catch(b){Promise.reject(b)}}else if((r==null?void 0:r.type)==="error"){try{(d=a.onError)==null||d.call(a,r.error,m,g,v)}catch(b){Promise.reject(b)}try{(h=a.onSettled)==null||h.call(a,void 0,r.error,m,g,v)}catch(b){Promise.reject(b)}}}this.listeners.forEach(m=>{m(U(this,Us))})})},zS),mi,DS,yO=(DS=class extends vo{constructor(i={}){super();Ge(this,mi);this.config=i,Ae(this,mi,new Map)}build(i,r,a){const c=r.queryKey,f=r.queryHash??op(c,r);let d=this.get(f);return d||(d=new fO({client:i,queryKey:c,queryHash:f,options:i.defaultQueryOptions(r),state:a,defaultOptions:i.getQueryDefaults(c)}),this.add(d)),d}add(i){U(this,mi).has(i.queryHash)||(U(this,mi).set(i.queryHash,i),this.notify({type:"added",query:i}))}remove(i){U(this,mi).get(i.queryHash)===i&&(i.destroy(),U(this,mi).delete(i.queryHash),this.notify({type:"removed",query:i}))}clear(){xn.batch(()=>{this.getAll().forEach(i=>{this.remove(i)})})}get(i){return U(this,mi).get(i)}getAll(){return[...U(this,mi).values()]}find(i){const r={exact:!0,...i};return this.getAll().find(a=>p0(r,a))}findAll(i={}){const r=this.getAll();return Object.keys(i).length>0?r.filter(a=>p0(i,a)):r}notify(i){xn.batch(()=>{this.listeners.forEach(r=>{r(i)})})}onFocus(){xn.batch(()=>{this.getAll().forEach(i=>{i.onFocus()})})}onOnline(){xn.batch(()=>{this.getAll().forEach(i=>{i.onOnline()})})}},mi=new WeakMap,DS),Ft,Hs,Is,uo,co,Vs,fo,ho,_S,bO=(_S=class{constructor(n={}){Ge(this,Ft);Ge(this,Hs);Ge(this,Is);Ge(this,uo);Ge(this,co);Ge(this,Vs);Ge(this,fo);Ge(this,ho);Ae(this,Ft,n.queryCache||new yO),Ae(this,Hs,n.mutationCache||new gO),Ae(this,Is,n.defaultOptions||{}),Ae(this,uo,new Map),Ae(this,co,new Map),Ae(this,Vs,0)}mount(){Cf(this,Vs)._++,U(this,Vs)===1&&(Ae(this,fo,ap.subscribe(async n=>{n&&(await this.resumePausedMutations(),U(this,Ft).onFocus())})),Ae(this,ho,Xf.subscribe(async n=>{n&&(await this.resumePausedMutations(),U(this,Ft).onOnline())})))}unmount(){var n,i;Cf(this,Vs)._--,U(this,Vs)===0&&((n=U(this,fo))==null||n.call(this),Ae(this,fo,void 0),(i=U(this,ho))==null||i.call(this),Ae(this,ho,void 0))}isFetching(n){return U(this,Ft).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return U(this,Hs).findAll({...n,status:"pending"}).length}getQueryData(n){var r;const i=this.defaultQueryOptions({queryKey:n});return(r=U(this,Ft).get(i.queryHash))==null?void 0:r.state.data}ensureQueryData(n){const i=this.defaultQueryOptions(n),r=U(this,Ft).build(this,i),a=r.state.data;return a===void 0?this.fetchQuery(n):(n.revalidateIfStale&&r.isStaleByTime(It(i.staleTime,r))&&this.prefetchQuery(i),Promise.resolve(a))}getQueriesData(n){return U(this,Ft).findAll(n).map(({queryKey:i,state:r})=>[i,r.data])}setQueryData(n,i,r){var d;const a=this.defaultQueryOptions({queryKey:n}),c=(d=U(this,Ft).get(a.queryHash))==null?void 0:d.state.data,f=eO(i,c);if(f!==void 0)return U(this,Ft).build(this,a).setData(f,{...r,manual:!0})}setQueriesData(n,i,r){return xn.batch(()=>U(this,Ft).findAll(n).map(({queryKey:a})=>[a,this.setQueryData(a,i,r)]))}getQueryState(n){var r;const i=this.defaultQueryOptions({queryKey:n});return(r=U(this,Ft).get(i.queryHash))==null?void 0:r.state}removeQueries(n){const i=U(this,Ft);xn.batch(()=>{i.findAll(n).forEach(r=>{i.remove(r)})})}resetQueries(n,i){const r=U(this,Ft);return xn.batch(()=>{const a=r.findAll(n),c=new Set(a);return a.forEach(f=>{f.reset()}),this.refetchQueries({type:"active",predicate:f=>c.has(f)},i)})}cancelQueries(n,i={}){const r={revert:!0,...i},a=xn.batch(()=>U(this,Ft).findAll(n).map(c=>c.cancel(r)));return Promise.all(a).then(tl).catch(tl)}invalidateQueries(n,i={}){return xn.batch(()=>(U(this,Ft).findAll(n).forEach(r=>{r.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},i)))}refetchQueries(n,i={}){const r={...i,cancelRefetch:i.cancelRefetch??!0},a=xn.batch(()=>U(this,Ft).findAll(n).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let f=c.fetch(void 0,r);const d=c.state.fetchStatus==="paused";return(!r.throwOnError||d)&&(f=f.catch(tl)),d?Promise.resolve():f}));return Promise.all(a).then(tl)}async query(n){const i=this.defaultQueryOptions(n);i.retry===void 0&&(i.retry=!1);const r=U(this,Ft).build(this,i),a=r.isStaleByTime(It(i.staleTime,r))?await r.fetch(i):r.state.data,c=i.select;return c?c(a):a}fetchQuery(n){const i=this.defaultQueryOptions(n);i.retry===void 0&&(i.retry=!1);const r=U(this,Ft).build(this,i);return r.isStaleByTime(It(i.staleTime,r))?r.fetch(i):Promise.resolve(r.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(tl).catch(tl)}infiniteQuery(n){return n._type="infinite",this.query(n)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(tl).catch(tl)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Xf.isOnline()?U(this,Hs).resumePausedMutations():Promise.resolve()}getQueryCache(){return U(this,Ft)}getMutationCache(){return U(this,Hs)}getDefaultOptions(){return U(this,Is)}setDefaultOptions(n){Ae(this,Is,n)}setQueryDefaults(n,i){U(this,uo).set(Pr(n),{queryKey:n,defaultOptions:i})}getQueryDefaults(n){const i=[...U(this,uo).values()],r={};return i.forEach(a=>{mo(n,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(n,i){U(this,co).set(Pr(n),{mutationKey:n,defaultOptions:i})}getMutationDefaults(n){const i=[...U(this,co).values()],r={};return i.forEach(a=>{mo(n,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(n){if(n._defaulted)return n;const i={...U(this,Is).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return i.queryHash||(i.queryHash=op(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===up&&(i.enabled=!1),i}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...U(this,Is).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){U(this,Ft).clear(),U(this,Hs).clear()}},Ft=new WeakMap,Hs=new WeakMap,Is=new WeakMap,uo=new WeakMap,co=new WeakMap,Vs=new WeakMap,fo=new WeakMap,ho=new WeakMap,_S);const vO=(n,i,r)=>{const a=(r==null?void 0:r.state.status)==="error"&&typeof n.throwOnError=="function"?cp(n.throwOnError,[r.state.error,r]):n.throwOnError;(n.suspense||a)&&(i.isReset()||(n.retryOnMount=!1))},xO=n=>{x.useEffect(()=>{n.clearReset()},[n])},SO=({result:n,errorResetBoundary:i,throwOnError:r,query:a,suspense:c})=>n.isError&&!i.isReset()&&!n.isFetching&&a&&(c&&n.data===void 0||cp(r,[n.error,a])),EO=n=>{if(n.suspense){const r=c=>c==="static"?c:Math.max(c??1e3,1e3),a=n.staleTime;n.staleTime=typeof a=="function"?(...c)=>r(a(...c)):r(a),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},RO=(n,i)=>(n==null?void 0:n.suspense)&&i.isPending,wO=(n,i,r)=>i.fetchOptimistic(n).catch(()=>{r.clearReset()});function ZS(n,i,r){const a=GT(),c=FT(),f=rp(),d=f.defaultQueryOptions(n),h=f.getQueryCache().get(d.queryHash),m=n.subscribed!==!1;d._optimisticResults=a?"isRestoring":m?"optimistic":void 0,EO(d),vO(d,c,h),xO(c);const[g]=x.useState(()=>new i(f,d)),v=g.getOptimisticResult(d);x.useEffect(()=>{g.setOptions(d)},[d,g]);const b=!a&&m;if(x.useSyncExternalStore(x.useCallback(S=>{const T=b?g.subscribe(xn.batchCalls(S)):tl;return g.updateResult(),T},[g,b]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),RO(d,v))throw wO(d,g,c);if(SO({result:v,errorResetBoundary:c,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw v.error;return d.notifyOnChangeProps?v:g.trackResult(v)}function Zi(n,i){return ZS(n,FS)}function Bg(n,i){const r=rp(),[a]=x.useState(()=>new pO(r,n));x.useEffect(()=>{a.setOptions(n)},[a,n]);const c=x.useSyncExternalStore(x.useCallback(d=>a.subscribe(xn.batchCalls(d)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),f=x.useCallback((...d)=>{a.mutate(d[0],d[1]).catch(tl)},[a]);if(c.error&&cp(a.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:f,mutateAsync:c.mutate}}function JS(n,i){return ZS(n,hO)}var cg={exports:{}},fg={};/**
50
+ * @license React
51
+ * use-sync-external-store-shim.production.js
52
+ *
53
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
54
+ *
55
+ * This source code is licensed under the MIT license found in the
56
+ * LICENSE file in the root directory of this source tree.
57
+ */var C0;function CO(){if(C0)return fg;C0=1;var n=Pu();function i(b,S){return b===S&&(b!==0||1/b===1/S)||b!==b&&S!==S}var r=typeof Object.is=="function"?Object.is:i,a=n.useState,c=n.useEffect,f=n.useLayoutEffect,d=n.useDebugValue;function h(b,S){var T=S(),C=a({inst:{value:T,getSnapshot:S}}),w=C[0].inst,j=C[1];return f(function(){w.value=T,w.getSnapshot=S,m(w)&&j({inst:w})},[b,T,S]),c(function(){return m(w)&&j({inst:w}),b(function(){m(w)&&j({inst:w})})},[b]),d(T),T}function m(b){var S=b.getSnapshot;b=b.value;try{var T=S();return!r(b,T)}catch{return!0}}function g(b,S){return S()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:h;return fg.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:v,fg}var T0;function $S(){return T0||(T0=1,cg.exports=CO()),cg.exports}var mp=$S();const TO=sp.useInsertionEffect,OO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",jO=OO?x.useLayoutEffect:x.useEffect,AO=TO||jO,gp=n=>{const i=x.useRef([n,(...r)=>i[0](...r)]).current;return AO(()=>{i[0]=n}),i[1]},O0=["popstate","pushState","replaceState","hashchange"];let Cu=[];const j0=()=>Cu.forEach(n=>n()),NO=n=>(Cu.push(n)===1&&O0.forEach(i=>addEventListener(i,j0)),()=>{Cu=Cu.filter(i=>i!==n),Cu.length||O0.forEach(i=>removeEventListener(i,j0))}),WS=(n,i)=>mp.useSyncExternalStore(NO,n,i),A0=()=>location.search,MO=({ssrSearch:n}={})=>WS(A0,n!=null?()=>n:A0),N0=()=>location.pathname,zO=({ssrPath:n}={})=>WS(N0,n!=null?()=>n:N0),DO=(n,{replace:i=!1,state:r=null}={})=>history[i?"replaceState":"pushState"](r,"",n),e1=n=>[zO(n),DO],M0=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[M0]>"u"){for(const n of["pushState","replaceState"]){const i=history[n];history[n]=function(){const r=i.apply(this,arguments),a=new Event(n);return a.arguments=arguments,dispatchEvent(a),r}}Object.defineProperty(window,M0,{value:!0})}const _O=n=>(n.match(/\d+[xX]\d+|[A-Z]?[a-z]+|[A-Z]|\d+/g)??[]).join("-").toLowerCase();function kO(n,i,r=[]){if(i==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:_O(n),size:24,node:i,...r.length>0?{aliases:r}:{}}}const LO=n=>{let i="",r=!1;for(const a of n){if(a==="-"||a==="_"||a<=" "){r=i.length>0;continue}i.length===0?i+=a.toLowerCase():i+=r?a.toUpperCase():a,r=!1}return i},UO=n=>{const i=LO(n);return i.charAt(0).toUpperCase()+i.slice(1)},qg=(...n)=>{const i=new Set;for(const r of n)if(typeof r=="string")for(const a of r.split(/\s+/))a&&i.add(a);return[...i].join(" ")},Pa={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function dg(n){return n!=null}function HO(n,i={}){var S,T;const r=i.attributeNames??{},a=C=>r[C]??C,c=n.size??n.width??Pa.width,f=n.size??n.height??Pa.height,d=((S=n.aliases)==null?void 0:S.filter(C=>typeof C=="string"&&C.trim()!=="").map(C=>`lucide-${C}`))??[],h=[...n.name?[`lucide-${n.name}`]:[],...d],m=((T=i.className)==null?void 0:T.split(" ").filter(Boolean))??[],g=i.includeDefaultClasses===!1?qg(...m):qg("lucide",...h,...m);let v=i.strokeWidth??Pa["stroke-width"];if(i.absoluteStrokeWidth){const C=Number(v)*Number(n.size??n.width??Pa.width)/Number(i.size??i.width??Pa.width);Number.isFinite(C)&&(v=C)}return["svg",{...Object.entries(Pa).reduce((C,[w,j])=>(C[a(w)]=j,C),{}),..."color"in i&&i.color&&{[a("stroke")]:i.color},..."size"in i&&dg(i.size)&&{[a("width")]:i.size,[a("height")]:i.size},..."width"in i&&dg(i.width)&&{[a("width")]:i.width},..."height"in i&&dg(i.height)&&{[a("height")]:i.height},[a("stroke-width")]:v,...g&&{[a("class")]:g},[a("viewBox")]:`0 0 ${c} ${f}`,...i.hasA11yProp===!1?{[a("aria-hidden")]:"true"}:{},..."attributes"in i&&i.attributes},n.node.map(C=>{const[w,j,O]=C,E=i.nonScalingStroke?{[a("vector-effect")]:"non-scaling-stroke",...j}:j;return O?[w,E,O]:[w,E]})]}function IO(n,i={}){return HO(n,{...i,attributeNames:{...i.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const VO=n=>{if(n==null||typeof n!="object")return!1;for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&(i.startsWith("aria-")||i==="role"||i==="title")&&n[i]!=null)return!0;return!1},BO=x.createContext({}),qO=()=>x.useContext(BO),PO=x.forwardRef(({color:n,size:i,width:r,height:a,strokeWidth:c,absoluteStrokeWidth:f,nonScalingStroke:d,className:h="",children:m,iconNode:g=[],icon:v={node:g,aliases:[],size:24},...b},S)=>{const{size:T=24,strokeWidth:C=2,absoluteStrokeWidth:w=!1,nonScalingStroke:j=!1,color:O="currentColor",className:E=""}=qO()??{},A=VO(b),[N,L,D=[]]=IO(v,{color:n??O,width:r??i??T,height:a??i??T,strokeWidth:c??C,absoluteStrokeWidth:f??w,nonScalingStroke:d??j,className:qg(E,h),hasA11yProp:A,attributes:b});return x.createElement(N,{ref:S,...L},[...D.map(([_,M])=>x.createElement(_,M)),...Array.isArray(m)?m:[m]])});function jn(n,i=[],r=[]){const a=typeof n=="string"?kO(n,i,r):n,c=x.forwardRef(({className:f,...d},h)=>x.createElement(PO,{ref:h,icon:a,className:f,...d}));return a.name&&(c.displayName=UO(a.name)),c}const t1={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};t1.node;const GO=jn(t1),n1={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};n1.node;const l1=jn(n1),i1={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};i1.node;const s1=jn(i1),r1={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};r1.node;const a1=jn(r1),o1={name:"circle-x",size:24,node:[["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"}]],aliases:["x-circle"]};o1.node;const u1=jn(o1),c1={name:"flask-conical",size:24,node:[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]};c1.node;const YO=jn(c1),f1={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};f1.node;const QO=jn(f1),d1={name:"link-horizontal",size:24,node:[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],aliases:["link-2"]};d1.node;const KO=jn(d1),h1={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};h1.node;const FO=jn(h1),m1={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};m1.node;const XO=jn(m1),g1={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};g1.node;const ZO=jn(g1),p1={name:"play",size:24,node:[["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"}]]};p1.node;const JO=jn(p1),y1={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};y1.node;const b1=jn(y1),v1={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};v1.node;const x1=jn(v1),S1={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};S1.node;const $O=jn(S1),E1={name:"trash",size:24,node:[["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"}]],aliases:["trash-2"]};E1.node;const WO=jn(E1),R1={name:"user-plus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};R1.node;const ej=jn(R1),w1={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};w1.node;const C1=jn(w1);function T1(n){var i,r,a="";if(typeof n=="string"||typeof n=="number")a+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(i=0;i<c;i++)n[i]&&(r=T1(n[i]))&&(a&&(a+=" "),a+=r)}else for(r in n)n[r]&&(a&&(a+=" "),a+=r);return a}function tj(){for(var n,i,r=0,a="",c=arguments.length;r<c;r++)(n=arguments[r])&&(i=T1(n))&&(a&&(a+=" "),a+=i);return a}const nj=(n,i)=>{const r=new Array(n.length+i.length);for(let a=0;a<n.length;a++)r[a]=n[a];for(let a=0;a<i.length;a++)r[n.length+a]=i[a];return r},lj=(n,i)=>({classGroupId:n,validator:i}),O1=(n=new Map,i=null,r)=>({nextPart:n,validators:i,classGroupId:r}),Zf="-",z0=[],ij="arbitrary..",sj=n=>{const i=aj(n),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return rj(d);const h=d.split(Zf),m=h[0]===""&&h.length>1?1:0;return j1(h,m,i)},getConflictingClassGroupIds:(d,h)=>{if(h){const m=a[d],g=r[d];return m?g?nj(g,m):m:g||z0}return r[d]||z0}}},j1=(n,i,r)=>{if(n.length-i===0)return r.classGroupId;const c=n[i],f=r.nextPart.get(c);if(f){const g=j1(n,i+1,f);if(g)return g}const d=r.validators;if(d===null)return;const h=i===0?n.join(Zf):n.slice(i).join(Zf),m=d.length;for(let g=0;g<m;g++){const v=d[g];if(v.validator(h))return v.classGroupId}},rj=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=n.slice(1,-1),r=i.indexOf(":"),a=i.slice(0,r);return a?ij+a:void 0})(),aj=n=>{const{theme:i,classGroups:r}=n;return oj(r,i)},oj=(n,i)=>{const r=O1();for(const a in n){const c=n[a];pp(c,r,a,i)}return r},pp=(n,i,r,a)=>{const c=n.length;for(let f=0;f<c;f++){const d=n[f];uj(d,i,r,a)}},uj=(n,i,r,a)=>{if(typeof n=="string"){cj(n,i,r);return}if(typeof n=="function"){fj(n,i,r,a);return}dj(n,i,r,a)},cj=(n,i,r)=>{const a=n===""?i:A1(i,n);a.classGroupId=r},fj=(n,i,r,a)=>{if(hj(n)){pp(n(a),i,r,a);return}i.validators===null&&(i.validators=[]),i.validators.push(lj(r,n))},dj=(n,i,r,a)=>{const c=Object.entries(n),f=c.length;for(let d=0;d<f;d++){const[h,m]=c[d];pp(m,A1(i,h),r,a)}},A1=(n,i)=>{let r=n;const a=i.split(Zf),c=a.length;for(let f=0;f<c;f++){const d=a[f];let h=r.nextPart.get(d);h||(h=O1(),r.nextPart.set(d,h)),r=h}return r},hj=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,mj=n=>{if(n<1)return{get:()=>{},set:()=>{}};let i=0,r=Object.create(null),a=Object.create(null);const c=(f,d)=>{r[f]=d,i++,i>n&&(i=0,a=r,r=Object.create(null))};return{get(f){let d=r[f];if(d!==void 0)return d;if((d=a[f])!==void 0)return c(f,d),d},set(f,d){f in r?r[f]=d:c(f,d)}}},Tu="!",D0=":",gj=[],_0=(n,i,r,a,c)=>({modifiers:n,hasImportantModifier:i,baseClassName:r,maybePostfixModifierPosition:a,isExternal:c}),pj=n=>{const{prefix:i,experimentalParseClassName:r}=n;let a=c=>{const f=[];let d=0,h=0,m=0,g;const v=c.length;for(let j=0;j<v;j++){const O=c[j];if(d===0&&h===0){if(O===D0){f.push(c.slice(m,j)),m=j+1;continue}if(O==="/"){g=j;continue}}if(O==="[")d++;else if(O==="]")d--;else if(O==="(")h++;else if(O===")")h--;else if(O==="\\")j++;else if(O==='"'||O==="'")for(;++j<v;){const E=c[j];if(E==="\\")j++;else if(E===O)break}}const b=f.length===0?c:c.slice(m);let S=b,T=!1;b.endsWith(Tu)?(S=b.slice(0,-1),T=!0):b.startsWith(Tu)&&(S=b.slice(1),T=!0);const C=T&&b.startsWith(Tu)?Tu.length:0,w=g&&g>m?g-m-C:void 0;return _0(f,T,S,w)};if(i){const c=i+D0,f=a;a=d=>d.startsWith(c)?f(d.slice(c.length)):_0(gj,!1,d,void 0,!0)}if(r){const c=a;a=f=>r({className:f,parseClassName:c})}return a},yj=n=>{const i=new Map;return n.orderSensitiveModifiers.forEach((r,a)=>{i.set(r,1e6+a)}),r=>{const a=[];let c=[];for(let f=0;f<r.length;f++){const d=r[f],h=d[0]==="[",m=i.has(d);h||m?(c.length>0&&(c.sort(),a.push(...c),c=[]),a.push(d)):c.push(d)}return c.length>0&&(c.sort(),a.push(...c)),a}},bj=n=>({cache:mj(n.cacheSize),parseClassName:pj(n),sortModifiers:yj(n),postfixLookupClassGroupIds:vj(n),...sj(n)}),vj=n=>{const i=Object.create(null),r=n.postfixLookupClassGroups;if(r)for(let a=0;a<r.length;a++)i[r[a]]=!0;return i},xj=/\s+/,Sj=(n,i)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:c,sortModifiers:f,postfixLookupClassGroupIds:d}=i,h=[],m=n.trim().split(xj);let g="";for(let v=m.length-1;v>=0;v-=1){const b=m[v],{isExternal:S,modifiers:T,hasImportantModifier:C,baseClassName:w,maybePostfixModifierPosition:j}=r(b);if(S){g=b+(g.length>0?" "+g:g);continue}let O=!!j,E;if(O){const _=w.substring(0,j);E=a(_);const M=E&&d[E]?a(w):void 0;M&&M!==E&&(E=M,O=!1)}else E=a(w);if(!E){if(!O){g=b+(g.length>0?" "+g:g);continue}if(E=a(w),!E){g=b+(g.length>0?" "+g:g);continue}O=!1}const A=T.length===0?"":T.length===1?T[0]:f(T).join(":"),N=C?A+Tu:A,L=N+E;if(h.indexOf(L)>-1)continue;h.push(L);const D=c(E,O);for(let _=0;_<D.length;++_){const M=D[_];h.push(N+M)}g=b+(g.length>0?" "+g:g)}return g},Ej=(...n)=>{let i=0,r,a,c="";for(;i<n.length;)(r=n[i++])&&(a=N1(r))&&(c&&(c+=" "),c+=a);return c},N1=n=>{if(typeof n=="string")return n;let i,r="";for(let a=0;a<n.length;a++)n[a]&&(i=N1(n[a]))&&(r&&(r+=" "),r+=i);return r},Rj=(n,...i)=>{let r,a,c,f;const d=m=>{const g=i.reduce((v,b)=>b(v),n());return r=bj(g),a=r.cache.get,c=r.cache.set,f=h,h(m)},h=m=>{const g=a(m);if(g)return g;const v=Sj(m,r);return c(m,v),v};return f=d,(...m)=>f(Ej(...m))},wj=[],bn=n=>{const i=r=>r[n]||wj;return i.isThemeGetter=!0,i.themeKey=n,i},M1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,z1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Cj=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Tj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Oj=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|Q|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^--spacing\(.+\)|^0$/,jj=/^[+-]?(?:\d*\.)?\d+(?:[eE][+-]?\d+)?(?:r?ic|r(?:cap|ch|ex))$/,D1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark|contrast-color|device-cmyk|--alpha)\(.+\)$/i,Aj=/^(?:_*[+-]?(?:\d|\.\d)|[\w-]+\(|_*(?:inherit|initial|revert(?:-layer)?|unset)_*$)/i,Nj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Mj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,As=n=>Cj.test(n),ut=n=>!!n&&!Number.isNaN(Number(n)),fi=n=>!!n&&Number.isInteger(Number(n)),hg=n=>n.endsWith("%")&&ut(n.slice(0,-1)),Ui=n=>Tj.test(n),_1=()=>!0,zj=n=>(Oj.test(n)||jj.test(n))&&!D1.test(n),Dj=n=>Aj.test(n)&&!D1.test(n),yp=()=>!1,_j=n=>Nj.test(n),kj=n=>Mj.test(n),Lj=n=>!Me(n)&&!ze(n),Uj=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),Hj=n=>Ji(n,U1,yp),Me=n=>M1.test(n),Er=n=>Ji(n,H1,zj),Ij=n=>Ji(n,I1,Dj),Vj=n=>Ji(n,Zj,ut),Bj=n=>Ji(n,B1,_1),qj=n=>Ji(n,V1,yp),Pj=n=>Ji(n,k1,yp),Gj=n=>Ji(n,L1,kj),Of=n=>Ji(n,q1,_j),ze=n=>z1.test(n),Ga=n=>Zs(n,H1),Yj=n=>Zs(n,I1,!0),Qj=n=>Zs(n,V1),k0=n=>Zs(n,k1),Kj=n=>Zs(n,U1),Fj=n=>Zs(n,L1),jf=n=>Zs(n,q1,!0),Xj=n=>Zs(n,B1,!0),Ji=(n,i,r)=>{const a=M1.exec(n);return a?a[1]?i(a[1]):r(a[2]):!1},Zs=(n,i,r=!1)=>{const a=z1.exec(n);return a?a[1]?i(a[1]):r:!1},k1=n=>n==="position"||n==="percentage",L1=n=>n==="image"||n==="url",U1=n=>n==="length"||n==="size"||n==="bg-size",H1=n=>n==="length",I1=n=>n!=="color",Zj=n=>n==="number",V1=n=>n==="family-name",B1=n=>n==="number"||n==="weight",q1=n=>n==="shadow",Jj=()=>{const n=bn("color"),i=bn("font"),r=bn("text"),a=bn("font-weight"),c=bn("tracking"),f=bn("leading"),d=bn("breakpoint"),h=bn("container"),m=bn("spacing"),g=bn("radius"),v=bn("shadow"),b=bn("inset-shadow"),S=bn("text-shadow"),T=bn("drop-shadow"),C=bn("blur"),w=bn("perspective"),j=bn("aspect"),O=bn("ease"),E=bn("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...N(),ze,Me],D=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],M=()=>[ze,Me,m],Q=()=>[As,"full","auto",...M()],J=()=>[fi,"none","subgrid",ze,Me],se=()=>["auto",{span:["full",fi,ze,Me]},fi,ze,Me],te=()=>[fi,"auto",ze,Me],$=()=>["auto","min","max","fr",ut,ze,Me],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...M()],ne=()=>[As,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],F=()=>[h,As,"screen","full","dvw","lvw","svw","min","max","fit",...M()],re=()=>[As,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],K=()=>[n,ze,Me],Re=()=>[...N(),k0,Pj,{position:[ze,Me]}],Ye=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Oe=()=>["auto","cover","contain",Kj,Hj,{size:[ze,Me]}],z=()=>[hg,Ga,Er],B=()=>["","none","full",g,ze,Me],W=()=>["",ut,Ga,Er],ie=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>[ut,hg,Yj,Ij],ae=()=>["","none",C,ze,Me],q=()=>["none",ut,ze,Me],le=()=>["none",ut,ze,Me],pe=()=>[ut,ze,Me],Ke=()=>[As,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ui],breakpoint:[Ui],color:[_1],container:[Ui],"drop-shadow":[Ui],ease:["in","out","in-out"],font:[Lj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ui],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ui],shadow:[Ui],spacing:["px",ut],text:[Ui],"text-shadow":[Ui],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",As,Me,ze,j]}],container:["container"],"container-type":[{"@container":["","normal","size",ze,Me]}],"container-named":[Uj],columns:[{columns:[ut,"auto",Me,ze,h]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only"],"not-sr":["not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],contain:[{contain:["none","content","strict",ze,Me]}],"contain-size":[{contain:["size","inline-size"]}],"contain-layout":["contain-layout"],"contain-paint":["contain-paint"],"contain-style":["contain-style"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{"inset-s":Q(),start:Q()}],end:[{"inset-e":Q(),end:Q()}],"inset-bs":[{"inset-bs":Q()}],"inset-be":[{"inset-be":Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[fi,"auto",ze,Me]}],basis:[{basis:[As,"full","auto",h,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ut,As,"auto","initial","none",ze,Me]}],grow:[{grow:["",ut,ze,Me]}],shrink:[{shrink:["",ut,ze,Me]}],order:[{order:[fi,"first","last","none",ze,Me]}],"grid-cols":[{"grid-cols":J()}],"col-start-end":[{col:se()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":J()}],"row-start-end":[{row:se()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pbs:[{pbs:M()}],pbe:[{pbe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mbs:[{mbs:H()}],mbe:[{mbe:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],"inline-size":[{inline:["auto",...F()]}],"min-inline-size":[{"min-inline":["auto",...F()]}],"max-inline-size":[{"max-inline":["none",...F()]}],"block-size":[{block:["auto",...re()]}],"min-block-size":[{"min-block":["auto",...re()]}],"max-block-size":[{"max-block":["none",...re()]}],w:[{w:[h,"screen",...ne()]}],"min-w":[{"min-w":[h,"screen","none",...ne()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},...ne()]}],h:[{h:["screen","lh",...ne()]}],"min-h":[{"min-h":["screen","lh","none",...ne()]}],"max-h":[{"max-h":["screen","lh","none",...ne()]}],"font-size":[{text:["base",r,Ga,Er]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Xj,Bj]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hg,ze,Me]}],"font-family":[{font:[Qj,qj,i]}],"font-features":[{"font-features":[ze,Me]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,ze,Me]}],"line-clamp":[{"line-clamp":[ut,"none",ze,Me]}],leading:[{leading:["none",f,...M()]}],"list-image":[{"list-image":["none",ze,Me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ze,Me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[ut,"from-font","auto",Ga,k0,Er]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[ut,"auto",ze,Me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["text-ellipsis","text-clip"],truncate:["truncate"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"tab-size":[{tab:[fi,ze,Me]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ze,Me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ze,Me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Re()}],"bg-repeat":[{bg:Ye()}],"bg-size":[{bg:Oe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},fi,ze,Me],radial:["",ze,Me],conic:["",fi,ze,Me]},Fj,Gj]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-bs":[{"border-bs":W()}],"border-w-be":[{"border-be":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ut,ze,Me]}],"outline-w":[{outline:["",ut,Ga,Er]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","inner","none",v,jf,Of]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",b,jf,Of]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[ut,Er]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",S,jf,Of]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[ut,ze,Me]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ut,ze,Me]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[ze,Me]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"mask-image-radial-shape":[{mask:["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":L()}],"mask-image-conic-pos":[{"mask-conic":[ut,ze,Me]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Re()}],"mask-repeat":[{mask:Ye()}],"mask-size":[{mask:Oe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ze,Me]}],filter:[{filter:["","none",ze,Me]}],blur:[{blur:ae()}],brightness:[{brightness:[ut,ze,Me]}],contrast:[{contrast:[ut,ze,Me]}],"drop-shadow":[{"drop-shadow":["","none",T,jf,Of]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",ut,ze,Me]}],"hue-rotate":[{"hue-rotate":[ut,ze,Me]}],invert:[{invert:["",ut,ze,Me]}],saturate:[{saturate:[ut,ze,Me]}],sepia:[{sepia:["",ut,ze,Me]}],"backdrop-filter":[{"backdrop-filter":["","none",ze,Me]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[ut,ze,Me]}],"backdrop-contrast":[{"backdrop-contrast":[ut,ze,Me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ut,ze,Me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ut,ze,Me]}],"backdrop-invert":[{"backdrop-invert":["",ut,ze,Me]}],"backdrop-opacity":[{"backdrop-opacity":[ut,ze,Me]}],"backdrop-saturate":[{"backdrop-saturate":[ut,ze,Me]}],"backdrop-sepia":[{"backdrop-sepia":["",ut,ze,Me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ze,Me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ut,"initial",ze,Me]}],ease:[{ease:["linear","initial",O,ze,Me]}],delay:[{delay:[ut,ze,Me]}],animate:[{animate:["none",E,ze,Me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,ze,Me]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:q()}],"rotate-x":[{"rotate-x":q()}],"rotate-y":[{"rotate-y":q()}],"rotate-z":[{"rotate-z":q()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[ze,Me,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],"transform-box":[{transform:["content","border","fill","stroke","view"]}],translate:[{translate:Ke()}],"translate-x":[{"translate-x":Ke()}],"translate-y":[{"translate-y":Ke()}],"translate-z":[{"translate-z":Ke()}],"translate-none":["translate-none"],"translate-3d":["translate-3d"],zoom:[{zoom:[fi,ze,Me]}],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ze,Me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":K()}],"scrollbar-track-color":[{"scrollbar-track":K()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mbs":[{"scroll-mbs":M()}],"scroll-mbe":[{"scroll-mbe":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pbs":[{"scroll-pbs":M()}],"scroll-pbe":[{"scroll-pbe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ze,Me]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[ut,Ga,Er,Vj]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],"place-content":["align-content","justify-content"],"place-items":["align-items","justify-items"],"place-self":["align-self","justify-self"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],truncate:["text-overflow","overflow","overflow-x","overflow-y","whitespace"],sr:["not-sr","position","size","w","h","p","px","py","ps","pe","pbs","pbe","pt","pr","pb","pl","m","mx","my","ms","me","mbs","mbe","mt","mr","mb","ml","overflow","overflow-x","overflow-y","whitespace"],"not-sr":["sr"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],"mask-image-x-from-pos":["mask-image-r-from-pos","mask-image-l-from-pos"],"mask-image-x-to-pos":["mask-image-r-to-pos","mask-image-l-to-pos"],"mask-image-x-from-color":["mask-image-r-from-color","mask-image-l-from-color"],"mask-image-x-to-color":["mask-image-r-to-color","mask-image-l-to-color"],"mask-image-y-from-pos":["mask-image-t-from-pos","mask-image-b-from-pos"],"mask-image-y-to-pos":["mask-image-t-to-pos","mask-image-b-to-pos"],"mask-image-y-from-color":["mask-image-t-from-color","mask-image-b-from-color"],"mask-image-y-to-color":["mask-image-t-to-color","mask-image-b-to-color"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z","translate-3d"],"translate-x":["translate-none"],"translate-y":["translate-none"],"translate-z":["translate-none"],"translate-3d":["translate-none"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],contain:["contain-size","contain-layout","contain-paint","contain-style"],"contain-size":["contain"],"contain-layout":["contain"],"contain-paint":["contain"],"contain-style":["contain"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},$j=Rj(Jj);function Wj(n,i){if(n instanceof RegExp)return{keys:!1,pattern:n};var r,a,c,f,d=[],h="",m=n.split("/");for(m[0]||m.shift();c=m.shift();)r=c[0],r==="*"?(d.push(r),h+=c[1]==="?"?"(?:/(.*))?":"/(.*)"):r===":"?(a=c.indexOf("?",1),f=c.indexOf(".",1),d.push(c.substring(1,~a?a:~f?f:c.length)),h+=~a&&!~f?"(?:/([^/]+?))?":"/([^/]+?)",~f&&(h+=(~a?"?":"")+"\\"+c.substring(f))):h+="/"+c;return{keys:d,pattern:new RegExp("^"+h+(i?"(?=$|/)":"/?$"),"i")}}const P1=(n="")=>n==="/"?"":n,eA=(n,i)=>n[0]==="~"?n.slice(1):P1(i)+n,G1=(n,i)=>(n=Pg(P1(n)),i=Pg(i),!n||(i.toLowerCase()+"/").startsWith(n.toLowerCase()+"/")?i.slice(n.length)||"/":"~"+i),Pg=n=>{try{return n.includes("%")?decodeURI(n):n}catch{return n}},tA=n=>Pg(n[0]==="?"?n.slice(1):n),Y1={hook:e1,searchHook:MO,parser:Wj,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:n=>n,aroundNav:(n,i,r)=>n(i,r)},Q1=x.createContext(Y1),xo=()=>x.useContext(Q1),K1={},F1=x.createContext(K1),nA=()=>x.useContext(F1),X1=(n,i=n.base)=>G1(i,n.hook(n)[0]),Z1=n=>{const[i,r]=n.hook(n);return[G1(n.base,i),gp((a,c)=>n.aroundNav(r,eA(a,n.base),c))]},bp=()=>Z1(xo()),lA=()=>{const n=xo();return tA(n.searchHook(n))},J1=(n,i,r,a)=>{const{pattern:c,keys:f}=i instanceof RegExp?{pattern:i}:n(i||"*",a),d=c.exec(r);if(!d)return[!1,null];const h={};for(let m=1;m<d.length;m++)h[m-1]=d[m];if(f)for(let m=0;m<f.length;m++)h[f[m]]=d[m+1];else Object.assign(h,d.groups);return a?[!0,h,d[0]]:[!0,h]},$1=({children:n,...i})=>{var m,g;const r=xo(),a=i.hook?Y1:r;let c=a;if(i.ssrPath){const[v,b=i.ssrSearch??""]=i.ssrPath.split("?");v&&(i.ssrSearch=b,i.ssrPath=v)}i.hrefs=i.hrefs??((m=i.hook)==null?void 0:m.hrefs),i.searchHook=i.searchHook??((g=i.hook)==null?void 0:g.searchHook);let f=x.useRef(a),d=f.current,h=d;for(let v in a){const b=v==="base"?a[v]+(i[v]??""):i[v]??a[v];b!==h[v]&&(d===h&&(f.current=h={...h}),h[v]=b),(b!==a[v]||b!==c[v])&&(c=h)}return x.createElement(Q1.Provider,{value:c},n)},iA=({children:n,component:i},r)=>i?x.createElement(i,{params:r}):typeof n=="function"?n(r):n,sA=n=>{let i=x.useRef(K1);const r=i.current,a=Object.keys(n);return i.current=a.length!==Object.keys(r).length||a.some(c=>n[c]!==r[c])?n:r};function fd(){const[n,i]=bp(),r=lA(),a=x.useMemo(()=>new URLSearchParams(r),[r]);let c=a;const f=gp((d,h)=>{c=new URLSearchParams(typeof d=="function"?d(c):d);const m=c.toString();i(n+(m?"?"+m:""),h)});return[a,f]}const Ya=({path:n,nest:i,match:r,...a})=>{const c=xo(),f=X1(c),[d,h,m]=r??J1(c.parser,n,f,i),g=sA({...nA(),...h});if(!d)return null;const v=iA(a,g);return x.createElement(F1.Provider,{value:g},m?x.createElement($1,{base:m},v):v)};x.forwardRef((n,i)=>{const r=xo(),[a,c]=Z1(r),{to:f="",href:d=f,onClick:h,asChild:m,children:g,className:v,replace:b,state:S,transition:T,...C}=n;return C.onClick=gp(w=>{w.ctrlKey||w.metaKey||w.altKey||w.shiftKey||w.button!==0||(h==null||h(w),w.defaultPrevented||(w.preventDefault(),c(d,n)))}),C.href=r.hrefs(d[0]==="~"?d.slice(1):r.base+d,r),v!==void 0&&(C.className=v!=null&&v.call?v(a===d):v),i&&(C.ref=i),m&&x.isValidElement(g)?x.cloneElement(g,C):x.createElement("a",C,g)});const W1=(n,i=[])=>{if(Array.isArray(n))for(const r of n)W1(r&&r.type===x.Fragment?r.props.children:r,i);else i.push(n);return i},rA=({children:n,location:i})=>{const r=xo(),a=X1(r);for(const c of W1(n)){let f=0;if(x.isValidElement(c)&&(f=J1(r.parser,c.props.path,i||a,c.props.nest))[0])return x.cloneElement(c,{match:f})}return null},aA="(prefers-color-scheme: dark)";function vp(){return typeof matchMedia<"u"?matchMedia(aA):void 0}function oA(){var n;return((n=vp())==null?void 0:n.matches)??!1}function xp(){return oA()?"dark":"light"}function eE(n){const i=vp();return i==null||i.addEventListener("change",n),()=>i==null?void 0:i.removeEventListener("change",n)}function uA(n){return n==="system"?xp():n}function tE(n){const i=new Set,r=()=>{try{const h=localStorage.getItem(n);if(h==="light"||h==="dark"||h==="system")return h}catch{}return"system"},a=h=>{try{localStorage.setItem(n,h)}catch{}for(const m of i)m()},c=()=>uA(r()),f=h=>{i.add(h);const m=vp(),g=()=>{r()==="system"&&h()};return m==null||m.addEventListener("change",g),()=>{i.delete(h),m==null||m.removeEventListener("change",g)}};return{storageKey:n,getThemePref:r,setThemePref:a,getResolvedTheme:c,subscribeThemePref:f,initTheme:()=>{if(typeof document>"u")return()=>{};const h=()=>{document.documentElement.dataset.theme=c()};return h(),f(h)}}}const nE=["data-theme","data-mode","data-color-scheme"];function L0(n){var r,a;if(!n)return;if(n.classList.contains("dark"))return"dark";if(n.classList.contains("light"))return"light";for(const c of nE){const f=n.getAttribute(c);if(f==="dark"||f==="light")return f}const i=(a=(r=n.style)==null?void 0:r.colorScheme)==null?void 0:a.trim();if(i==="dark"||i==="light")return i}function cA(n=typeof document<"u"?document.documentElement:void 0,i=typeof document<"u"?document.body:void 0){return L0(n)??L0(i)??xp()}function fA(n){const i=eE(n);if(typeof document>"u"||typeof MutationObserver>"u")return i;const r=new MutationObserver(n),a={attributes:!0,attributeFilter:["class","style",...nE]};return r.observe(document.documentElement,a),document.body&&r.observe(document.body,a),()=>{r.disconnect(),i()}}const lE=x.createContext(null),iE=()=>"light",Gg=()=>()=>{},dA=()=>cA();function hA(n,i){const r=U0(i==="auto"?n.subscribeThemePref:Gg,n.getResolvedTheme),a=U0(i==="inherit"?fA:Gg,dA);return i==="auto"?r:i==="inherit"?a:i}function U0(n,i){return x.useSyncExternalStore(n,i,iE)}function mA({store:n,mode:i="auto",children:r}){const a=hA(n,i),c=x.useMemo(()=>({resolved:a,showToggle:i==="auto",store:n}),[a,i,n]);return p.jsx(lE.Provider,{value:c,children:r(a)})}function Sp(){const n=x.useContext(lE),i=x.useSyncExternalStore(n?Gg:eE,xp,iE);return n??{resolved:i,showToggle:!1,store:void 0}}function gA(n,i){const r=n.hash.replace(/^#/,""),a=r.startsWith("/")?void 0:new URLSearchParams(r),c=new URLSearchParams(n.search),f=(a==null?void 0:a.get("token"))||c.get("token");if(!f)return null;let d=n.search.replace(/^\?/,"");c.has("token")&&(c.delete("token"),d=c.toString());let h=r;return a!=null&&a.has("token")&&(a.delete("token"),h=a.toString()),i(`${n.pathname}${d?`?${d}`:""}${h?`#${h}`:""}`),f}function xt(...n){return $j(tj(n))}function pA(n,i){switch(i.type){case"add":return{toasts:[...n.toasts,i.toast]};case"remove":return{toasts:n.toasts.filter(r=>r.id!==i.id)};default:return n}}const sE=x.createContext(null);function yA(){const n=x.useContext(sE);if(!n)throw new Error("useToast must be used within ToastProvider");return n}const bA={success:"bg-success",error:"bg-destructive",warning:"bg-warning",info:"bg-accent"},vA={success:"border-l-[var(--success)]",error:"border-l-[var(--destructive)]",warning:"border-l-[var(--warning)]",info:"border-l-[var(--accent)]"};function xA({toast:n,onRemove:i}){return x.useEffect(()=>{const r=setTimeout(()=>i(n.id),4500);return()=>clearTimeout(r)},[n.id,i]),p.jsxs("div",{role:"alert",className:xt("flex min-w-[280px] max-w-sm items-start gap-2.5 rounded-lg border border-border bg-card px-3.5 py-3 shadow-lg","border-l-[3px]",vA[n.kind]),style:{animation:"toastIn 160ms ease-out"},children:[p.jsx("span",{className:xt("mt-1 size-2 shrink-0 rounded-full",bA[n.kind]),"aria-hidden":!0}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("p",{className:"m-0 text-[13px] font-medium text-foreground leading-snug",children:n.message}),n.detail&&p.jsx("p",{className:"mt-1 text-xs text-muted-foreground leading-snug",children:n.detail})]}),p.jsx("button",{"aria-label":"Dismiss",onClick:()=>i(n.id),className:"shrink-0 rounded-sm text-muted-foreground hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring outline-none",children:p.jsx(C1,{className:"size-3.5"})}),p.jsx("style",{children:`
58
+ @keyframes toastIn {
59
+ from { opacity: 0; transform: translateY(8px); }
60
+ to { opacity: 1; transform: translateY(0); }
61
+ }
62
+ `})]})}function SA({children:n}){const[i,r]=x.useReducer(pA,{toasts:[]}),a=x.useCallback((f,d,h)=>{r({type:"add",toast:{id:`${Date.now()}-${Math.random()}`,kind:f,message:d,detail:h}})},[]),c=x.useCallback(f=>{r({type:"remove",id:f})},[]);return p.jsxs(sE.Provider,{value:{add:a},children:[n,p.jsx("div",{"aria-live":"polite","aria-atomic":"false",className:"fixed bottom-6 right-6 z-[9999] flex flex-col gap-2",children:i.toasts.map(f=>p.jsx(xA,{toast:f,onRemove:c},f.id))})]})}const EA=[{value:"system",label:"System theme",Icon:XO},{value:"light",label:"Light theme",Icon:$O},{value:"dark",label:"Dark theme",Icon:ZO}];function RA({store:n}={}){const i=Sp(),r=n??i.store;if(!r)throw new Error("ThemeToggle needs a `store` prop or an enclosing <ThemeProvider>.");const[a,c]=x.useState(()=>r.getThemePref()),f=d=>{c(d),r.setThemePref(d)};return p.jsx("div",{role:"group","aria-label":"Theme",className:"inline-flex gap-0.5 rounded-md border border-border bg-secondary/50 p-0.5",children:EA.map(({value:d,label:h,Icon:m})=>{const g=a===d;return p.jsx("button",{type:"button",title:h,"aria-label":h,"aria-pressed":g,onClick:()=>f(d),className:xt("inline-flex h-6 w-7 items-center justify-center rounded-[5px] outline-none transition-colors","focus-visible:ring-2 focus-visible:ring-ring",g?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:p.jsx(m,{className:"size-3.5"})},d)})})}function rE(n){if(typeof window>"u")return{};const i=window[n];return i&&typeof i=="object"?i:{}}const wA=n=>n.portal===!0||n.mode==="portal";function CA(n){const i=n.bootstrap??{},r=Zi({queryKey:n.queryKey??["config"],queryFn:n.getConfig,staleTime:n.staleTime??6e4}),a=r.data??i,c=n.isPortal??wA,f=!!n.forcePortal||!!n.token||c(a),d=r.isSuccess,h=!!i.title;return{config:a,ready:d,loading:r.isLoading&&!h&&!n.forcePortal,failed:r.isError&&!h,portal:f,readonly:a.readonly??!1,adminReady:d&&!f,query:r}}function TA(n={}){const[,i]=bp(),[r]=fd(),a=n.stickyParams??[];return(c,f={})=>{const d=new URLSearchParams;for(const m of a){const g=r.get(m);g&&d.set(m,g)}for(const[m,g]of Object.entries(f))g?d.set(m,g):d.delete(m);const h=d.toString();i(h?`${c}?${h}`:c)}}const OA=n=>i=>n==="/"?i==="/":i===n||i.startsWith(`${n}/`);function jA({title:n,logoUrl:i,brandMark:r,onBrandClick:a,switcher:c,readonly:f,portal:d,portalLabel:h="Portal",headerExtra:m,showThemeToggle:g,tabs:v=[],onNavigate:b,fallback:S,children:T,className:C}){const[w]=bp(),j=Sp(),O=g??j.showToggle;if(S!=null&&S!==!1)return p.jsx("div",{className:"flex h-screen items-center justify-center bg-background px-4 text-center",children:S});const E=i?p.jsx("img",{src:i,alt:n,className:"h-7 max-w-[320px] object-contain"}):p.jsxs(p.Fragment,{children:[r,p.jsx("span",{className:"text-sm font-semibold tracking-tight",children:n})]});return p.jsxs("div",{className:xt("flex h-screen flex-col overflow-hidden bg-background text-foreground",C),children:[p.jsxs("header",{className:"sticky top-0 z-40 border-b border-border bg-background/80 backdrop-blur",children:[p.jsxs("div",{className:"mx-auto flex h-14 max-w-6xl items-center gap-3 px-4 sm:px-6",children:[a?p.jsx("a",{href:"#","data-testid":"shell-brand",onClick:A=>{A.preventDefault(),a()},className:"flex shrink-0 items-center gap-2 rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring",children:E}):p.jsx("div",{"data-testid":"shell-brand",className:"flex shrink-0 items-center gap-2",children:E}),c?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"select-none text-border",children:"/"}),c]}):null,p.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[m,f&&p.jsxs("span",{className:"flex items-center gap-1 rounded-md border border-warning/30 bg-warning/10 px-2 py-0.5 text-xs font-medium text-warning",children:[p.jsx(FO,{className:"size-3"}),"Read-only"]}),d&&p.jsx("span",{className:"rounded-md border border-accent/30 bg-accent/10 px-2 py-0.5 text-xs font-medium text-accent",children:h}),O&&p.jsx(RA,{})]})]}),v.length>1&&p.jsx("nav",{className:"mx-auto flex max-w-6xl items-center gap-1 overflow-x-auto px-2 sm:px-4","aria-label":"Main navigation",children:v.map(({path:A,label:N,match:L})=>{const D=(L??OA(A))(w);return p.jsx("button",{type:"button",onClick:()=>b==null?void 0:b(A),"aria-current":D?"page":void 0,className:xt("whitespace-nowrap px-3 py-2.5 text-[13px] font-medium outline-none transition-colors focus-visible:text-foreground",D?"relative text-foreground after:absolute after:inset-x-3 after:-bottom-px after:h-0.5 after:rounded-full after:bg-accent":"text-muted-foreground hover:text-foreground"),children:N},A)})})]}),p.jsx("main",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:T})]})}function AA(){return p.jsx("p",{className:"text-[13px] text-muted-foreground",children:"Could not load the panel configuration. Check that the API is reachable and that you are signed in."})}function NA(){return new bO({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}})}function MA(n){const i=typeof n.themeKey=="string"?tE(n.themeKey):n.themeKey;i.initTheme();let r=null;if(n.tokenFromUrl){if(!n.api)throw new Error("bootSpa: `tokenFromUrl` needs the product's `api` client.");r=gA(window.location,v=>window.history.replaceState(null,"",v)),r&&n.api.setApiToken(r)}const a=n.queryClient??NA(),c=typeof n.root=="object"?n.root:document.getElementById(n.root??"root");if(!c)throw new Error("Root element not found");const f=(rE(n.configGlobal).basePath??"").replace(/\/$/,""),{App:d}=n,h=n.appProps??{},m=p.jsx(YT,{client:a,children:p.jsx(mA,{store:i,mode:"auto",children:()=>p.jsx(SA,{children:p.jsx(d,{...h,locationHook:e1,base:f})})})}),g=PT.createRoot(c);return g.render(n.strictMode===!1?m:p.jsx(x.StrictMode,{children:m})),{root:g,queryClient:a,themeStore:i,token:r}}let zA;function Ep(){return zA}function Vr({controlled:n,default:i,name:r,state:a="value"}){const{current:c}=x.useRef(n!==void 0),[f,d]=x.useState(i),h=c?n:f,m=x.useCallback(g=>{c||d(g)},[]);return[h,m]}const H0={};function hl(n,i){const r=x.useRef(H0);return r.current===H0&&(r.current=n(i)),r}const mg=sp[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],DA=mg&&mg!==x.useLayoutEffect?mg:n=>n();function _e(n){const i=hl(_A).current;return i.next=n,DA(i.effect),i.trampoline}function _A(){const n={next:void 0,callback:kA,trampoline:(...i)=>{var r;return(r=n.callback)==null?void 0:r.call(n,...i)},effect:()=>{n.callback=n.next}};return n}function kA(){}function Yi(n,i,r,a){const c=hl(aE).current;return UA(c,n,i,r,a)&&oE(c,[n,i,r,a]),c.callback}function LA(n){const i=hl(aE).current;return HA(i,n)&&oE(i,n),i.callback}function aE(){return{callback:null,cleanup:null,refs:[]}}function UA(n,i,r,a,c){return n.refs[0]!==i||n.refs[1]!==r||n.refs[2]!==a||n.refs[3]!==c}function HA(n,i){return n.refs.length!==i.length||n.refs.some((r,a)=>r!==i[a])}function oE(n,i){if(n.refs=i,i.every(r=>r==null)){n.callback=null;return}n.callback=r=>{if(n.cleanup&&(n.cleanup(),n.cleanup=null),r!=null){const a=Array(i.length).fill(null);for(let c=0;c<i.length;c+=1){const f=i[c];if(f!=null)switch(typeof f){case"function":{const d=f(r);typeof d=="function"&&(a[c]=d);break}case"object":{f.current=r;break}}}n.cleanup=()=>{for(let c=0;c<i.length;c+=1){const f=i[c];if(f!=null)switch(typeof f){case"function":{const d=a[c];typeof d=="function"?d():f(null);break}case"object":{f.current=null;break}}}}}}}const IA=()=>{},ke=typeof document<"u"?x.useLayoutEffect:IA,dd={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1};function Gn(n,...i){const r=new URL(`https://base-ui.com/production-error/${n}`);return i.forEach(a=>r.searchParams.append("args[]",a)),`Base UI error #${n}; visit ${r} for the full message.`}const VA=parseInt(x.version,10);function Rp(n){return VA>=n}function I0(n){if(!x.isValidElement(n))return null;const i=n,r=i.props;return(Rp(19)?r==null?void 0:r.ref:i.ref)??null}function Yg(n,i){if(n&&!i)return n;if(!n&&i)return i;if(n||i)return{...n,...i}}function BA(n,i){const r={};for(const a in n){const c=n[a];if(i!=null&&i.hasOwnProperty(a)){const f=i[a](c);f!=null&&Object.assign(r,f);continue}c===!0?r[`data-${a.toLowerCase()}`]="":c&&(r[`data-${a.toLowerCase()}`]=c.toString())}return r}function qA(n,i){return typeof n=="function"?n(i):n}function PA(n,i){return typeof n=="function"?n(i):n}const Nu={};function wp(n,i,r,a,c){let f={...Qg(n,Nu)};return i&&(f=Ou(f,i)),r&&(f=Ou(f,r)),a&&(f=Ou(f,a)),c&&(f=Ou(f,c)),f}function GA(n){if(n.length===0)return Nu;if(n.length===1)return Qg(n[0],Nu);let i={...Qg(n[0],Nu)};for(let r=1;r<n.length;r+=1)i=Ou(i,n[r]);return i}function Ou(n,i){return uE(i)?i(n):YA(n,i)}function YA(n,i){if(!i)return n;for(const r in i){const a=i[r];switch(r){case"style":{n[r]=Yg(n.style,a);break}case"className":{n[r]=cE(n.className,a);break}default:QA(r,a)?n[r]=KA(n[r],a):n[r]=a}}return n}function QA(n,i){const r=n.charCodeAt(0),a=n.charCodeAt(1),c=n.charCodeAt(2);return r===111&&a===110&&c>=65&&c<=90&&(typeof i=="function"||typeof i>"u")}function uE(n){return typeof n=="function"}function Qg(n,i){return uE(n)?n(i):n??Nu}function KA(n,i){return i?n?r=>{if(FA(r)){const c=r;Kg(c);const f=i(c);return c.baseUIHandlerPrevented||n==null||n(c),f}const a=i(r);return n==null||n(r),a}:i:n}function Kg(n){return n.preventBaseUIHandler=()=>{n.baseUIHandlerPrevented=!0},n}function cE(n,i){return i?n?i+" "+n:i:n}function FA(n){return n!=null&&typeof n=="object"&&"nativeEvent"in n}function en(){}const Ul=Object.freeze([]),fn=Object.freeze({}),XA={style:{transition:"none"}},ZA="data-base-ui-click-trigger",fE={fallbackAxisSide:"none"},JA={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function Bt(n,i,r={}){const a=i.render,c=$A(i,r);if(r.enabled===!1)return null;const f=r.state??fn;return WA(n,a,c,f)}function $A(n,i={}){const{className:r,style:a,render:c}=n,{state:f=fn,ref:d,props:h,stateAttributesMapping:m,enabled:g=!0}=i,v=g?qA(r,f):void 0,b=g?PA(a,f):void 0,S=g?BA(f,m):fn,T=g?Yg(S,Array.isArray(h)?GA(h):h)??fn:fn;return typeof document<"u"&&(g?Array.isArray(d)?T.ref=LA([T.ref,I0(c),...d]):T.ref=Yi(T.ref,I0(c),d):Yi(null,null)),g?(v!==void 0&&(T.className=cE(T.className,v)),b!==void 0&&(T.style=Yg(T.style,b)),T):fn}function WA(n,i,r,a){if(i){if(typeof i=="function")return i(r,a);const c=wp(r,i.props);return c.ref=r.ref,x.cloneElement(i,c)}if(n&&typeof n=="string")return e2(n,r);throw new Error(Gn(8))}function e2(n,i){return n==="button"?x.createElement("button",{type:"button",...i,key:i.key}):n==="img"?x.createElement("img",{alt:"",...i,key:i.key}):x.createElement(n,i)}const t2={...sp};let V0=0;function n2(n,i="mui"){const[r,a]=x.useState(n),c=n||r;return x.useEffect(()=>{r==null&&(V0+=1,a(`${i}-${V0}`))},[r,i]),c}const B0=t2.useId;function Gu(n,i){if(B0!==void 0){const r=B0();return n??(i?`${i}-${r}`:r)}return n2(n,i)}function hd(n){return Gu(n,"base-ui")}function md(){return typeof window<"u"}function Js(n){return Cp(n)?(n.nodeName||"").toLowerCase():"#document"}function hn(n){var i;return(n==null||(i=n.ownerDocument)==null?void 0:i.defaultView)||window}function $i(n){var i;return(i=(Cp(n)?n.ownerDocument:n.document)||window.document)==null?void 0:i.documentElement}function Cp(n){return md()?n instanceof Node||n instanceof hn(n).Node:!1}function Vt(n){return md()?n instanceof Element||n instanceof hn(n).Element:!1}function dn(n){return md()?n instanceof HTMLElement||n instanceof hn(n).HTMLElement:!1}function Fg(n){return!md()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof hn(n).ShadowRoot}function So(n){const{overflow:i,overflowX:r,overflowY:a,display:c}=Vl(n);return/auto|scroll|overlay|hidden|clip/.test(i+a+r)&&c!=="inline"&&c!=="contents"}function l2(n){return/^(table|td|th)$/.test(Js(n))}function gd(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const i2=/transform|translate|scale|rotate|perspective|filter/,s2=/paint|layout|strict|content/,Rr=n=>!!n&&n!=="none";let gg;function Tp(n){const i=Vt(n)?Vl(n):n;return Rr(i.transform)||Rr(i.translate)||Rr(i.scale)||Rr(i.rotate)||Rr(i.perspective)||!pd()&&(Rr(i.backdropFilter)||Rr(i.filter))||i2.test(i.willChange||"")||s2.test(i.contain||"")}function r2(n){let i=Fs(n);for(;dn(i)&&!qs(i);){if(Tp(i))return i;if(gd(i))return null;i=Fs(i)}return null}function pd(){return gg==null&&(gg=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),gg}function qs(n){return/^(html|body|#document)$/.test(Js(n))}function Vl(n){return hn(n).getComputedStyle(n)}function yd(n){return Vt(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Fs(n){if(Js(n)==="html")return n;const i=n.assignedSlot||n.parentNode||Fg(n)&&n.host||$i(n);return Fg(i)?i.host:i}function dE(n){const i=Fs(n);return qs(i)?(n.ownerDocument||n).body:dn(i)&&So(i)?i:dE(i)}function Ps(n,i,r){var a;i===void 0&&(i=[]),r===void 0&&(r=!0);const c=dE(n),f=c===((a=n.ownerDocument)==null?void 0:a.body),d=hn(c);if(f){const h=Xg(d);return i.concat(d,d.visualViewport||[],So(c)?c:[],h&&r?Ps(h):[])}else return i.concat(c,Ps(c,[],r))}function Xg(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}const hE=x.createContext(void 0);function mE(n=!1){const i=x.useContext(hE);if(i===void 0&&!n)throw new Error(Gn(16));return i}function a2(n){const{focusableWhenDisabled:i,disabled:r,composite:a=!1,tabIndex:c=0,isNativeButton:f}=n,d=a&&i!==!1,h=a&&i===!1;return{props:x.useMemo(()=>{const g={onKeyDown(v){r&&i&&v.key!=="Tab"&&v.preventDefault()}};return a||(g.tabIndex=c,!f&&r&&(g.tabIndex=i?c:-1)),(f&&(i||d)||!f&&r)&&(g["aria-disabled"]=r),f&&(!i||h)&&(g.disabled=r),g},[a,r,i,d,h,f,c])}}function Yu(n={}){const{disabled:i=!1,focusableWhenDisabled:r,tabIndex:a=0,native:c=!0}=n,f=x.useRef(null),d=mE(!0)!==void 0,h=_e(()=>{const S=f.current;return!!((S==null?void 0:S.tagName)==="A"&&(S!=null&&S.href))}),{props:m}=a2({focusableWhenDisabled:r,disabled:i,composite:d,tabIndex:a,isNativeButton:c}),g=x.useCallback(()=>{const S=f.current;o2(S)&&d&&i&&m.disabled===void 0&&S.disabled&&(S.disabled=!1)},[i,m.disabled,d]);ke(g,[g]);const v=x.useCallback((S={})=>{const{onClick:T,onMouseDown:C,onKeyUp:w,onKeyDown:j,onPointerDown:O,...E}=S;return wp({type:c?"button":void 0,onClick(N){if(i){N.preventDefault();return}T==null||T(N)},onMouseDown(N){i||C==null||C(N)},onKeyDown(N){if(i||(Kg(N),j==null||j(N)),N.baseUIHandlerPrevented)return;const L=N.target===N.currentTarget&&!c&&!h()&&!i,D=N.key==="Enter",_=N.key===" ";L&&((_||D)&&N.preventDefault(),D&&(T==null||T(N)))},onKeyUp(N){i||(Kg(N),w==null||w(N)),!N.baseUIHandlerPrevented&&N.target===N.currentTarget&&!c&&!i&&N.key===" "&&(T==null||T(N))},onPointerDown(N){if(i){N.preventDefault();return}O==null||O(N)}},c?void 0:{role:"button"},m,E)},[i,m,c,h]),b=_e(S=>{f.current=S,g()});return{getButtonProps:v,buttonRef:b}}function o2(n){return dn(n)&&n.tagName==="BUTTON"}let q0=(function(n){return n.disabled="data-disabled",n.valid="data-valid",n.invalid="data-invalid",n.touched="data-touched",n.dirty="data-dirty",n.filled="data-filled",n.focused="data-focused",n})({});const u2={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Op={valid(n){return n===null?null:n?{[q0.valid]:""}:{[q0.invalid]:""}}};var Qi=kS();function c2(n,i){return{...n,state:{...n.state,valid:!i&&n.state.valid}}}const f2=x.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:en,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function jp(){return x.useContext(f2)}const d2=x.createContext({invalid:void 0,name:void 0,validityData:{state:u2,errors:[],error:"",value:"",initialValue:null},setValidityData:en,disabled:void 0,touched:!1,setTouched:en,dirty:!1,setDirty:en,filled:!1,setFilled:en,focused:!1,setFocused:en,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(n=fn)=>n,getInputValidationProps:(n=fn)=>n,inputRef:{current:null},commit:async()=>{}}});function Eo(n=!0){const i=x.useContext(d2);if(i.setValidityData===en&&!n)throw new Error(Gn(28));return i}function gE(n){const{enabled:i=!0,value:r,id:a,name:c,controlRef:f,commit:d}=n,{formRef:h}=jp(),{invalid:m,markedDirtyRef:g,validityData:v,setValidityData:b}=Eo(),S=_e(n.getValue);ke(()=>{if(!i)return;let T=r;T===void 0&&(T=S()),v.initialValue===null&&T!==null&&b(C=>({...C,initialValue:T}))},[i,b,r,v.initialValue,S]),ke(()=>{!i||!a||h.current.fields.set(a,{getValue:S,name:c,controlRef:f,validityData:c2(v,m),validate(){let T=r;T===void 0&&(T=S()),g.current=!0,Qi.flushSync(()=>d(T))}})},[d,f,i,h,S,a,m,g,c,v,r]),ke(()=>{const T=h.current.fields;return()=>{a&&T.delete(a)}},[h,a])}const h2=x.createContext({controlId:void 0,setControlId:en,labelId:void 0,setLabelId:en,messageIds:[],setMessageIds:en,getDescriptionProps:n=>n});function Qu(){return x.useContext(h2)}function pE(n={}){const{id:i,implicit:r=!1,controlRef:a}=n,{controlId:c,setControlId:f}=Qu(),d=hd(i);return ke(()=>{if(!(!r&&!i||f===en)){if(r){const h=a==null?void 0:a.current;Vt(h)&&h.closest("label")!=null?f(i??null):f(c??d)}else i&&f(i);return()=>{i&&f(void 0)}}},[i,a,c,f,r,d]),c??d}const dl="none",Mu="trigger-press",m2="trigger-hover",yE="outside-press",Pf="item-press",Or="input-change",Ms="input-clear",bd="focus-out",bE="escape-key",Gf="list-navigation",g2="cancel-open",p2="imperative-action",y2="window-resize";function We(n,i,r,a){let c=!1,f=!1;const d=fn;return{reason:n,event:i??new Event("base-ui"),cancel(){c=!0},allowPropagation(){f=!0},get isCanceled(){return c},get isPropagationAllowed(){return f},trigger:r,...d}}function xu(n,i,r){const a=r??fn;return{reason:n,event:i??new Event("base-ui"),...a}}function ju(n,i){const r=x.useRef(n),a=_e(i);ke(()=>{r.current!==n&&a(r.current)},[n,a]),ke(()=>{r.current=n},[n])}function vE(n){const i=x.useRef(!0);i.current&&(i.current=!1,n())}function On(n){const i=hl(b2,n).current;return i.next=n,ke(i.effect),i}function b2(n){const i={current:n,next:n,effect:()=>{i.current=i.next}};return i}var v2=class{constructor(n){this.value=n}deref(){return this.value}},x2=()=>typeof WeakRef>"u"?v2:WeakRef,xE=x2(),S2=0,Af=1;function Su(){return{s:S2,v:void 0,o:null,p:null}}function E2(n){return n instanceof xE?n.deref():n}function R2(n,i={}){let r=Su();const{resultEqualityCheck:a,maxSize:c}=i,f=c!==void 0;if(f&&(!Number.isInteger(c)||c<1))throw new TypeError(`maxSize must be a positive integer, received: ${c}`);let d=null,h=0,m,g=0;function v(){h>=c&&(d=r,r=Su(),h=0)}function b(){let S=r;const{length:T}=arguments;for(let j=0,O=T;j<O;j++){const E=arguments[j];if(typeof E=="function"||typeof E=="object"&&E!==null){let A=S.o;A===null&&(S.o=A=new WeakMap);const N=A.get(E);N===void 0?(S=Su(),A.set(E,S)):S=N}else{let A=S.p;A===null&&(S.p=A=new Map);const N=A.get(E);N===void 0?(S=Su(),A.set(E,S),h++):S=N}}if(S.s===Af)return S.v;if(d!==null){let j=d;for(let O=0,E=T;O<E;O++){const A=arguments[O];let N;if(typeof A=="function"||typeof A=="object"&&A!==null){const L=j.o;N=L!==null?L.get(A):void 0}else{const L=j.p;N=L!==null?L.get(A):void 0}if(N===void 0){j=null;break}j=N}if(j!==null&&j.s===Af){const O=S;return O.s=Af,O.v=j.v,v(),j.v}}const C=S;let w=n.apply(null,arguments);if(g++,a){const j=E2(m);j!=null&&a(j,w)&&(w=j,g!==0&&g--),m=typeof w=="object"&&w!==null||typeof w=="function"?new xE(w):w}return C.s=Af,C.v=w,f&&v(),w}return b.clearCache=()=>{r=Su(),d=null,h=0,b.resetResultsCount()},b.resultsCount=()=>g,b.resetResultsCount=()=>{g=0},b}var Ap=Symbol("NOT_FOUND");function w2(n,i=`expected a function, instead received ${typeof n}`){if(typeof n!="function")throw new TypeError(i)}function C2(n,i="expected all items to be functions, instead received the following types: "){if(!n.every(r=>typeof r=="function")){const r=n.map(a=>typeof a=="function"?`function ${a.name||"unnamed"}()`:typeof a).join(", ");throw new TypeError(`${i}[${r}]`)}}var P0=n=>Array.isArray(n)?n:[n];function T2(n){const i=Array.isArray(n[0])?n[0]:n;return C2(i,"createSelector expects all input-selectors to be functions, but received the following types: "),i}function O2(n,...i){const r=typeof n=="function"?{memoize:n,memoizeOptions:i}:n,a=(...c)=>{let f=0,d=0,h,m={},g=c.pop();typeof g=="object"&&(m=g,g=c.pop()),w2(g,`createSelector expects an output function after the inputs, but received: [${typeof g}]`);const v={...r,...m},{memoize:b,memoizeOptions:S=[],argsMemoize:T=R2,argsMemoizeOptions:C=[]}=v,w=P0(S),j=P0(C),O=T2(c),E=b(function(){return f++,g.apply(null,arguments)},...w),A=T(function(){d++;const{length:L}=O,D=new Array(L);for(let _=0;_<L;_++)D[_]=O[_].apply(null,arguments);return h=E.apply(null,D),h},...j);return Object.assign(A,{resultFunc:g,memoizedResultFunc:E,dependencies:O,dependencyRecomputations:()=>d,resetDependencyRecomputations:()=>{d=0},lastResult:()=>h,recomputations:()=>f,resetRecomputations:()=>{f=0},memoize:b,argsMemoize:T})};return Object.assign(a,{withTypes:()=>a}),a}function j2(n){let i;return{get(r){return i&&n(i.key,r)?i.value:Ap},put(r,a){i={key:r,value:a}},findMatchingEntry(r,a){const c=i;return c!==void 0&&a(c.value,r)?c:void 0},clear(){i=void 0}}}function A2(n,i){let r=[];function a(h){const m=r.findIndex(g=>i(g.key,h));if(m>-1){const g=r[m];return m>0&&(r.splice(m,1),r.unshift(g)),g.value}return Ap}function c(h,m){r.unshift({key:h,value:m}),r.length>n&&r.pop()}function f(h,m){const g=r,{length:v}=g;for(let b=0;b<v;b++){const S=g[b];if(m(S.value,h))return S}}function d(){r=[]}return{get:a,put:c,findMatchingEntry:f,clear:d}}var N2=(n,i)=>n===i;function M2(n){return function(r,a){if(r===null||a===null||r.length!==a.length)return!1;const{length:c}=r;for(let f=0;f<c;f++)if(!n(r[f],a[f]))return!1;return!0}}function z2(n,i){const r=typeof i=="object"?i:{equalityCheck:i},{equalityCheck:a=N2,maxSize:c=1,resultEqualityCheck:f}=r,d=M2(a);let h=0;const m=c<=1?j2(d):A2(c,d);function g(){let v=m.get(arguments);if(v===Ap){if(v=n.apply(null,arguments),h++,f){const b=m.findMatchingEntry(v,f);b&&(v=b.value,h!==0&&h--)}m.put(arguments,v)}return v}return g.clearCache=()=>{m.clear(),g.resetResultsCount()},g.resultsCount=()=>h,g.resetResultsCount=()=>{h=0},g}O2({memoize:z2,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ge=(n,i,r,a,c,f,...d)=>{if(d.length>0)throw new Error(Gn(1));let h;if(n)h=n;else throw new Error("Missing arguments");return h};var pg={exports:{}},yg={};/**
63
+ * @license React
64
+ * use-sync-external-store-shim/with-selector.production.js
65
+ *
66
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
67
+ *
68
+ * This source code is licensed under the MIT license found in the
69
+ * LICENSE file in the root directory of this source tree.
70
+ */var G0;function D2(){if(G0)return yg;G0=1;var n=Pu(),i=$S();function r(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var a=typeof Object.is=="function"?Object.is:r,c=i.useSyncExternalStore,f=n.useRef,d=n.useEffect,h=n.useMemo,m=n.useDebugValue;return yg.useSyncExternalStoreWithSelector=function(g,v,b,S,T){var C=f(null);if(C.current===null){var w={hasValue:!1,value:null};C.current=w}else w=C.current;C=h(function(){function O(D){if(!E){if(E=!0,A=D,D=S(D),T!==void 0&&w.hasValue){var _=w.value;if(T(_,D))return N=_}return N=D}if(_=N,a(A,D))return _;var M=S(D);return T!==void 0&&T(_,M)?(A=D,_):(A=D,N=M)}var E=!1,A,N,L=b===void 0?null:b;return[function(){return O(v())},L===null?void 0:function(){return O(L())}]},[v,b,S,T]);var j=c(g,C[0],C[1]);return d(function(){w.hasValue=!0,w.value=j},[j]),m(j),j},yg}var Y0;function _2(){return Y0||(Y0=1,pg.exports=D2()),pg.exports}var k2=_2();const L2=Rp(19),U2=L2?H2:I2;function be(n,i,r,a,c){return U2(n,i,r,a,c)}function H2(n,i,r,a,c){const f=x.useCallback(()=>i(n.getSnapshot(),r,a,c),[n,i,r,a,c]);return mp.useSyncExternalStore(n.subscribe,f,f)}function I2(n,i,r,a,c){return k2.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getSnapshot,f=>i(f,r,a,c))}class Br{constructor(i){Nt(this,"subscribe",i=>(this.listeners.add(i),()=>{this.listeners.delete(i)}));Nt(this,"getSnapshot",()=>this.state);this.state=i,this.listeners=new Set,this.updateTick=0}setState(i){if(this.state===i)return;this.state=i,this.updateTick+=1;const r=this.updateTick;for(const a of this.listeners){if(r!==this.updateTick)return;a(i)}}update(i){for(const r in i)if(!Object.is(this.state[r],i[r])){Br.prototype.setState.call(this,{...this.state,...i});return}}set(i,r){Object.is(this.state[i],r)||Br.prototype.setState.call(this,{...this.state,[i]:r})}notifyAll(){const i={...this.state};Br.prototype.setState.call(this,i)}}class SE extends Br{constructor(r,a={},c){super(r);Nt(this,"controlledValues",new Map);Nt(this,"select",(r,a,c,f)=>{const d=this.selectors[r];return d(this.state,a,c,f)});Nt(this,"useState",(r,a,c,f)=>{x.useDebugValue(r);const d=this.selectors[r];return be(this,d,a,c,f)});this.context=a,this.selectors=c}useSyncedValue(r,a){x.useDebugValue(r),ke(()=>{this.state[r]!==a&&this.set(r,a)},[r,a])}useSyncedValueWithCleanup(r,a){ke(()=>(this.state[r]!==a&&this.set(r,a),()=>{this.set(r,void 0)}),[r,a])}useSyncedValues(r){const a=Object.values(r);ke(()=>{this.update(r)},a)}useControlledProp(r,a,c){x.useDebugValue(r);const f=a!==void 0;this.controlledValues.has(r)||(this.controlledValues.set(r,f),!f&&!Object.is(this.state[r],c)&&super.setState({...this.state,[r]:c})),ke(()=>{f&&!Object.is(this.state[r],a)&&super.setState({...this.state,[r]:a})},[r,a,c,f])}set(r,a){this.controlledValues.get(r)!==!0&&super.set(r,a)}update(r){const a={...r};for(const c in a)if(Object.hasOwn(a,c)&&this.controlledValues.get(c)===!0){delete a[c];continue}super.update(a)}setState(r){const a={...r};for(const c in a)if(Object.hasOwn(a,c)&&this.controlledValues.get(c)===!0){delete a[c];continue}super.setState({...this.state,...a})}useContextCallback(r,a){x.useDebugValue(r);const c=_e(a??en);this.context[r]=c}useStateSetter(r){const a=x.useRef(void 0);return a.current===void 0&&(a.current=c=>{this.set(r,c)}),a.current}observe(r,a){let c;typeof r=="function"?c=r:c=this.selectors[r];let f=c(this.state);return a(f,f,this),this.subscribe(d=>{const h=c(d);if(!Object.is(f,h)){const m=f;f=h,a(h,m,this)}})}}const V2=[];function EE(n){x.useEffect(n,V2)}const Nf=null;class B2{constructor(){Nt(this,"callbacks",[]);Nt(this,"callbacksCount",0);Nt(this,"nextId",1);Nt(this,"startId",1);Nt(this,"isScheduled",!1);Nt(this,"tick",i=>{var c;this.isScheduled=!1;const r=this.callbacks,a=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,a>0)for(let f=0;f<r.length;f+=1)(c=r[f])==null||c.call(r,i)})}request(i){const r=this.nextId;return this.nextId+=1,this.callbacks.push(i),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),r}cancel(i){const r=i-this.startId;r<0||r>=this.callbacks.length||(this.callbacks[r]=null,this.callbacksCount-=1)}}const Mf=new B2;class gi{constructor(){Nt(this,"currentId",Nf);Nt(this,"cancel",()=>{this.currentId!==Nf&&(Mf.cancel(this.currentId),this.currentId=Nf)});Nt(this,"disposeEffect",()=>this.cancel)}static create(){return new gi}static request(i){return Mf.request(i)}static cancel(i){return Mf.cancel(i)}request(i){this.cancel(),this.currentId=Mf.request(()=>{this.currentId=Nf,i()})}}function vd(){const n=hl(gi.create).current;return EE(n.disposeEffect),n}const Eu=0;class go{constructor(){Nt(this,"currentId",Eu);Nt(this,"clear",()=>{this.currentId!==Eu&&(clearTimeout(this.currentId),this.currentId=Eu)});Nt(this,"disposeEffect",()=>this.clear)}static create(){return new go}start(i,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Eu,r()},i)}isStarted(){return this.currentId!==Eu}}function El(){const n=hl(go.create).current;return EE(n.disposeEffect),n}const Kr=typeof navigator<"u",bg=Y2(),RE=K2(),Np=Q2(),wE=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),q2=bg.platform==="MacIntel"&&bg.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(bg.platform),Q0=Kr&&/firefox/i.test(Np),P2=Kr&&/apple/i.test(navigator.vendor),Jf=Kr&&/android/i.test(RE)||/android/i.test(Np);Kr&&RE.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const G2=Np.includes("jsdom/");function Y2(){if(!Kr)return{platform:"",maxTouchPoints:-1};const n=navigator.userAgentData;return n!=null&&n.platform?{platform:n.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function Q2(){if(!Kr)return"";const n=navigator.userAgentData;return n&&Array.isArray(n.brands)?n.brands.map(({brand:i,version:r})=>`${i}/${r}`).join(" "):navigator.userAgent}function K2(){if(!Kr)return"";const n=navigator.userAgentData;return n!=null&&n.platform?n.platform:navigator.platform??""}const Zg="data-base-ui-focusable",CE="active",TE="selected",F2="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Gs="ArrowLeft",Ys="ArrowRight",Mp="ArrowUp",Ku="ArrowDown";function zs(n){var r;let i=n.activeElement;for(;((r=i==null?void 0:i.shadowRoot)==null?void 0:r.activeElement)!=null;)i=i.shadowRoot.activeElement;return i}function Rt(n,i){var a;if(!n||!i)return!1;const r=(a=i.getRootNode)==null?void 0:a.call(i);if(n.contains(i))return!0;if(r&&Fg(r)){let c=i;for(;c;){if(n===c)return!0;c=c.parentNode||c.host}}return!1}function Pn(n){return"composedPath"in n?n.composedPath()[0]:n.target}function Zl(n,i){if(i==null)return!1;if("composedPath"in n)return n.composedPath().includes(i);const r=n;return r.target!=null&&i.contains(r.target)}function X2(n){return n.matches("html,body")}function nl(n){return(n==null?void 0:n.ownerDocument)||document}function OE(n){return dn(n)&&n.matches(F2)}function Jg(n){return n?n.getAttribute("role")==="combobox"&&OE(n):!1}function _u(n){return n?n.hasAttribute(Zg)?n:n.querySelector(`[${Zg}]`)||n:null}function Ka(n,i,r=!0){return n.filter(c=>{var f;return c.parentId===i&&(!r||((f=c.context)==null?void 0:f.open))}).flatMap(c=>[c,...Ka(n,c.id,r)])}function K0(n,i){var c;let r=[],a=(c=n.find(f=>f.id===i))==null?void 0:c.parentId;for(;a;){const f=n.find(d=>d.id===a);a=f==null?void 0:f.parentId,f&&(r=r.concat(f))}return r}function rn(n){n.preventDefault(),n.stopPropagation()}function Z2(n){return"nativeEvent"in n}function jE(n){return n.mozInputSource===0&&n.isTrusted?!0:Jf&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function AE(n){return G2?!1:!Jf&&n.width===0&&n.height===0||Jf&&n.width===1&&n.height===1&&n.pressure===0&&n.detail===0&&n.pointerType==="mouse"||n.width<1&&n.height<1&&n.pressure===0&&n.detail===0&&n.pointerType==="touch"}function F0(n,i){return["mouse","pen"].includes(n)}function NE(n){const i=n.type;return i==="click"||i==="mousedown"||i==="keydown"||i==="keyup"}const J2=["top","right","bottom","left"],po=Math.min,Pi=Math.max,$f=Math.round,Qa=Math.floor,Gi=n=>({x:n,y:n}),$2={left:"right",right:"left",bottom:"top",top:"bottom"};function ME(n,i,r){return Pi(n,po(i,r))}function Ki(n,i){return typeof n=="function"?n(i):n}function Il(n){return n.split("-")[0]}function $s(n){return n.split("-")[1]}function zp(n){return n==="x"?"y":"x"}function Dp(n){return n==="y"?"height":"width"}function Hl(n){const i=n[0];return i==="t"||i==="b"?"y":"x"}function _p(n){return zp(Hl(n))}function W2(n,i,r){r===void 0&&(r=!1);const a=$s(n),c=_p(n),f=Dp(c);let d=c==="x"?a===(r?"end":"start")?"right":"left":a==="start"?"bottom":"top";return i.reference[f]>i.floating[f]&&(d=Wf(d)),[d,Wf(d)]}function eN(n){const i=Wf(n);return[$g(n),i,$g(i)]}function $g(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const X0=["left","right"],Z0=["right","left"],tN=["top","bottom"],nN=["bottom","top"];function lN(n,i,r){switch(n){case"top":case"bottom":return r?i?Z0:X0:i?X0:Z0;case"left":case"right":return i?tN:nN;default:return[]}}function iN(n,i,r,a){const c=$s(n);let f=lN(Il(n),r==="start",a);return c&&(f=f.map(d=>d+"-"+c),i&&(f=f.concat(f.map($g)))),f}function Wf(n){const i=Il(n);return $2[i]+n.slice(i.length)}function sN(n){var i,r,a,c;return{top:(i=n.top)!=null?i:0,right:(r=n.right)!=null?r:0,bottom:(a=n.bottom)!=null?a:0,left:(c=n.left)!=null?c:0}}function zE(n){return typeof n!="number"?sN(n):{top:n,right:n,bottom:n,left:n}}function ed(n){const{x:i,y:r,width:a,height:c}=n;return{width:a,height:c,top:r,left:i,right:i+a,bottom:r+c,x:i,y:r}}function zf(n,i,r){return Math.floor(n/i)!==r}function Fa(n,i){return i<0||i>=n.current.length}function Yf(n,i){return Ln(n,{disabledIndices:i})}function Wg(n,i){return Ln(n,{decrement:!0,startingIndex:n.current.length,disabledIndices:i})}function Ln(n,{startingIndex:i=-1,decrement:r=!1,disabledIndices:a,amount:c=1}={}){let f=i;do f+=r?-c:c;while(f>=0&&f<=n.current.length-1&&Qs(n,f,a));return f}function DE(n,{event:i,orientation:r,loopFocus:a,rtl:c,cols:f,disabledIndices:d,minIndex:h,maxIndex:m,prevIndex:g,stopEvent:v=!1}){let b=g;const S=[],T={};let C=!1;{let O=null,E=-1;n.current.forEach((A,N)=>{if(A==null)return;const L=A.closest('[role="row"]');L&&(C=!0),(L!==O||E===-1)&&(O=L,E+=1,S[E]=[]),S[E].push(N),T[N]=E})}const w=C&&S.length>0&&S.some(O=>O.length!==f);function j(O){if(!w||g===-1)return;const E=T[g];if(E==null)return;const A=S[E].indexOf(g);let N=O==="up"?E-1:E+1;a&&(N<0?N=S.length-1:N>=S.length&&(N=0));const L=new Set;for(;N>=0&&N<S.length&&!L.has(N);){L.add(N);const D=S[N];if(D.length===0){N=O==="up"?N-1:N+1;continue}const _=Math.min(A,D.length-1);for(let M=_;M>=0;M-=1){const Q=D[M];if(!Qs(n,Q,d))return Q}N=O==="up"?N-1:N+1,a&&(N<0?N=S.length-1:N>=S.length&&(N=0))}}if(i.key===Mp){const O=j("up");if(O!==void 0)v&&rn(i),b=O;else{if(v&&rn(i),g===-1)b=m;else if(b=Ln(n,{startingIndex:b,amount:f,decrement:!0,disabledIndices:d}),a&&(g-f<h||b<0)){const E=g%f,A=m%f,N=m-(A-E);A===E?b=m:b=A>E?N:N-f}Fa(n,b)&&(b=g)}}if(i.key===Ku){const O=j("down");O!==void 0?(v&&rn(i),b=O):(v&&rn(i),g===-1?b=h:(b=Ln(n,{startingIndex:g,amount:f,disabledIndices:d}),a&&g+f>m&&(b=Ln(n,{startingIndex:g%f-f,amount:f,disabledIndices:d}))),Fa(n,b)&&(b=g))}if(r==="both"){const O=Qa(g/f);i.key===(c?Gs:Ys)&&(v&&rn(i),g%f!==f-1?(b=Ln(n,{startingIndex:g,disabledIndices:d}),a&&zf(b,f,O)&&(b=Ln(n,{startingIndex:g-g%f-1,disabledIndices:d}))):a&&(b=Ln(n,{startingIndex:g-g%f-1,disabledIndices:d})),zf(b,f,O)&&(b=g)),i.key===(c?Ys:Gs)&&(v&&rn(i),g%f!==0?(b=Ln(n,{startingIndex:g,decrement:!0,disabledIndices:d}),a&&zf(b,f,O)&&(b=Ln(n,{startingIndex:g+(f-g%f),decrement:!0,disabledIndices:d}))):a&&(b=Ln(n,{startingIndex:g+(f-g%f),decrement:!0,disabledIndices:d})),zf(b,f,O)&&(b=g));const E=Qa(m/f)===O;Fa(n,b)&&(a&&E?b=i.key===(c?Ys:Gs)?m:Ln(n,{startingIndex:g-g%f-1,disabledIndices:d}):b=g)}return b}function _E(n,i,r){const a=[];let c=0;return n.forEach(({width:f,height:d},h)=>{let m=!1;for(r&&(c=0);!m;){const g=[];for(let v=0;v<f;v+=1)for(let b=0;b<d;b+=1)g.push(c+v+b*i);c%i+f<=i&&g.every(v=>a[v]==null)?(g.forEach(v=>{a[v]=h}),m=!0):c+=1}}),[...a]}function kE(n,i,r,a,c){if(n===-1)return-1;const f=r.indexOf(n),d=i[n];switch(c){case"tl":return f;case"tr":return d?f+d.width-1:f;case"bl":return d?f+(d.height-1)*a:f;case"br":return r.lastIndexOf(n);default:return-1}}function LE(n,i){return i.flatMap((r,a)=>n.includes(r)?[a]:[])}function Qs(n,i,r){if(typeof r=="function")return r(i);if(r)return r.includes(i);const a=n.current[i];return a?a.hasAttribute("disabled")||a.getAttribute("aria-disabled")==="true":!1}/*!
71
+ * tabbable 6.5.2
72
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
73
+ */var rN=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],td=rN.join(","),UE=typeof Element>"u",yo=UE?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,HE=!UE&&Element.prototype.getRootNode?function(n){return n==null||n.getRootNode==null?void 0:n.getRootNode()}:function(n){return n==null?void 0:n.ownerDocument},nd=function(i,r){r===void 0&&(r=!0);var a=i==null||i.getAttribute==null?void 0:i.getAttribute("inert"),c=a===""||a==="true",f=c||r&&i&&(typeof i.closest=="function"?i.closest("[inert]"):nd(i.parentNode));return f},aN=function(i){var r,a=i==null||i.getAttribute==null||(r=i.getAttribute("contenteditable"))==null?void 0:r.toLowerCase();return a===""||a==="true"||a==="plaintext-only"},IE=function(i,r,a){if(nd(i))return[];var c=Array.prototype.slice.apply(i.querySelectorAll(td));return r&&yo.call(i,td)&&c.unshift(i),c=c.filter(a),c},ld=function(i,r,a){for(var c=[],f=Array.from(i);f.length;){var d=f.shift();if(!nd(d,!1))if(d.tagName==="SLOT"){var h=d.assignedElements(),m=h.length?h:d.children,g=ld(m,!0,a);a.flatten?c.push.apply(c,g):c.push({scopeParent:d,candidates:g})}else{var v=yo.call(d,td);v&&a.filter(d)&&(r||!i.includes(d))&&c.push(d);var b=d.shadowRoot||typeof a.getShadowRoot=="function"&&a.getShadowRoot(d),S=!nd(b,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(d));if(b&&S){var T=ld(b===!0?d.children:b.children,!0,a);a.flatten?c.push.apply(c,T):c.push({scopeParent:d,candidates:T})}else f.unshift.apply(f,d.children)}}return c},VE=function(i){return!isNaN(parseInt(i.getAttribute("tabindex"),10))},BE=function(i){if(!i)throw new Error("No node provided");return i.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(i.tagName)||aN(i))&&!VE(i)?0:i.tabIndex},oN=function(i,r){var a=BE(i);return a<0&&r&&!VE(i)?0:a},uN=function(i,r){return i.tabIndex===r.tabIndex?i.documentOrder-r.documentOrder:i.tabIndex-r.tabIndex},qE=function(i){return i.tagName==="INPUT"},cN=function(i){return qE(i)&&i.type==="hidden"},fN=function(i){var r=i.tagName==="DETAILS"&&Array.prototype.slice.apply(i.children).some(function(a){return a.tagName==="SUMMARY"});return r},dN=function(i,r){for(var a=0;a<i.length;a++)if(i[a].checked&&i[a].form===r)return i[a]},hN=function(i){if(!i.name)return!0;var r=i.form||HE(i),a=function(h){return r.querySelectorAll('input[type="radio"][name="'+h+'"]')},c;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")c=a(window.CSS.escape(i.name));else try{c=a(i.name)}catch(d){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",d.message),!1}var f=dN(c,i.form);return!f||f===i},mN=function(i){return qE(i)&&i.type==="radio"},gN=function(i){return mN(i)&&!hN(i)},J0=function(i){var r=i.getBoundingClientRect(),a=r.width,c=r.height;return a===0&&c===0},pN=function(i,r){var a=r.displayCheck,c=r.getShadowRoot;if(a==="full-native"&&"checkVisibility"in i){var f=i.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!f}var d=getComputedStyle(i),h=d.visibility;if(h==="hidden"||h==="collapse")return!0;var m=yo.call(i,"details>summary:first-of-type"),g=m?i.parentElement:i;if(yo.call(g,"details:not([open]) *"))return!0;if(!a||a==="full"||a==="full-native"||a==="legacy-full"){if(typeof c=="function"){for(var v=i;i;){var b=i.parentElement,S=HE(i);if(b&&!b.shadowRoot&&c(b)===!0)return J0(i);i.assignedSlot?i=i.assignedSlot:!b&&S!==i.ownerDocument?i=S.host:i=b}i=v}if(i.isConnected)return!i.getClientRects().length;if(a!=="legacy-full")return!0}else if(a==="non-zero-area")return J0(i);return!1},yN=function(i){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(i.tagName))for(var r=i.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var a=0;a<r.children.length;a++){var c=r.children.item(a);if(c.tagName==="LEGEND")return yo.call(r,"fieldset[disabled] *")?!0:!c.contains(i)}return!0}r=r.parentElement}return!1},ep=function(i,r){return!(r.disabled||cN(r)||pN(r,i)||fN(r)||yN(r))},tp=function(i,r){return!(gN(r)||BE(r)<0||!ep(i,r))},bN=function(i){var r=parseInt(i.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},PE=function(i){var r=[],a=[];return i.forEach(function(c,f){var d=!!c.scopeParent,h=d?c.scopeParent:c,m=oN(h,d),g=d?PE(c.candidates):h;m===0?d?r.push.apply(r,g):r.push(h):a.push({documentOrder:f,tabIndex:m,item:c,isScope:d,content:g})}),a.sort(uN).reduce(function(c,f){return f.isScope?c.push.apply(c,f.content):c.push(f.content),c},[]).concat(r)},xd=function(i,r){r=r||{};var a;return r.getShadowRoot?a=ld([i],r.includeContainer,{filter:tp.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:bN}):a=IE(i,r.includeContainer,tp.bind(null,r)),PE(a)},vN=function(i,r){r=r||{};var a;return r.getShadowRoot?a=ld([i],r.includeContainer,{filter:ep.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):a=IE(i,r.includeContainer,ep.bind(null,r)),a},GE=function(i,r){if(r=r||{},!i)throw new Error("No node provided");return yo.call(i,td)===!1?!1:tp(r,i)};const Fu=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function YE(n,i){const r=xd(n,Fu()),a=r.length;if(a===0)return;const c=zs(nl(n)),f=r.indexOf(c),d=f===-1?i===1?0:a-1:f+i;return r[d]}function QE(n){return YE(nl(n).body,1)||n}function KE(n){return YE(nl(n).body,-1)||n}function zu(n,i){const r=i||n.currentTarget,a=n.relatedTarget;return!a||!Rt(r,a)}function xN(n){xd(n,Fu()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function $0(n){n.querySelectorAll("[data-tabindex]").forEach(r=>{const a=r.dataset.tabindex;delete r.dataset.tabindex,a?r.setAttribute("tabindex",a):r.removeAttribute("tabindex")})}function SN(){const n=new Map;return{emit(i,r){var a;(a=n.get(i))==null||a.forEach(c=>c(r))},on(i,r){n.has(i)||n.set(i,new Set),n.get(i).add(r)},off(i,r){var a;(a=n.get(i))==null||a.delete(r)}}}const EN=x.createContext(null),RN=x.createContext(null),Sd=()=>{var n;return((n=x.useContext(EN))==null?void 0:n.id)||null},Ed=n=>{const i=x.useContext(RN);return n??i};function id(n){return`data-base-ui-${n}`}function Fi(n){return(n==null?void 0:n.ownerDocument)||document}const sd=x.forwardRef(function(i,r){const[a,c]=x.useState();ke(()=>{P2&&c("button")},[]);const f={tabIndex:0,role:a};return p.jsx("span",{...i,ref:r,style:dd,"aria-hidden":a?void 0:!0,...f,"data-base-ui-focus-guard":""})});let W0=0;function Qf(n,i={}){const{preventScroll:r=!1,cancelPrevious:a=!0,sync:c=!1}=i;a&&cancelAnimationFrame(W0);const f=()=>n==null?void 0:n.focus({preventScroll:r});c?f():W0=requestAnimationFrame(f)}const Xa={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function eS(n){return n==="inert"?Xa.inert:n==="aria-hidden"?Xa["aria-hidden"]:Xa.none}let Df=new WeakSet,_f={},vg=0;const FE=n=>n&&(n.host||FE(n.parentNode)),wN=(n,i)=>i.map(r=>{if(n.contains(r))return r;const a=FE(r);return n.contains(a)?a:null}).filter(r=>r!=null);function CN(n,i,r,a){const c="data-base-ui-inert",f=a?"inert":r?"aria-hidden":null,d=wN(i,n),h=new Set,m=new Set(d),g=[];_f[c]||(_f[c]=new WeakMap);const v=_f[c];d.forEach(b),S(i),h.clear();function b(T){!T||h.has(T)||(h.add(T),T.parentNode&&b(T.parentNode))}function S(T){!T||m.has(T)||[].forEach.call(T.children,C=>{if(Js(C)!=="script")if(h.has(C))S(C);else{const w=f?C.getAttribute(f):null,j=w!==null&&w!=="false",O=eS(f),E=(O.get(C)||0)+1,A=(v.get(C)||0)+1;O.set(C,E),v.set(C,A),g.push(C),E===1&&j&&Df.add(C),A===1&&C.setAttribute(c,""),!j&&f&&C.setAttribute(f,f==="inert"?"":"true")}})}return vg+=1,()=>{g.forEach(T=>{const C=eS(f),j=(C.get(T)||0)-1,O=(v.get(T)||0)-1;C.set(T,j),v.set(T,O),j||(!Df.has(T)&&f&&T.removeAttribute(f),Df.delete(T)),O||T.removeAttribute(c)}),vg-=1,vg||(Xa.inert=new WeakMap,Xa["aria-hidden"]=new WeakMap,Xa.none=new WeakMap,Df=new WeakSet,_f={})}}function TN(n,i=!1,r=!1){const a=nl(n[0]).body;return CN(n.concat(Array.from(a.querySelectorAll("[aria-live]"))),a,i,r)}const XE=x.createContext(null),ZE=()=>x.useContext(XE),ON=id("portal");function jN(n={}){const{ref:i,container:r,componentProps:a=fn,elementProps:c,elementState:f}=n,d=Gu(),h=ZE(),m=h==null?void 0:h.portalNode,[g,v]=x.useState(null),[b,S]=x.useState(null),T=x.useRef(null);ke(()=>{if(r===null){T.current&&(T.current=null,S(null),v(null));return}if(d==null)return;const j=(r&&(Cp(r)?r:r.current))??m??document.body;if(j==null){T.current&&(T.current=null,S(null),v(null));return}T.current!==j&&(T.current=j,S(null),v(j))},[r,m,d]);const C=Bt("div",a,{ref:[i,S],state:f,props:[{id:d,[ON]:""},c]});return{portalNode:b,portalSubtree:g&&C?Qi.createPortal(C,g):null}}const kp=x.forwardRef(function(i,r){const{children:a,container:c,className:f,render:d,renderGuards:h,...m}=i,{portalNode:g,portalSubtree:v}=jN({container:c,ref:r,componentProps:i,elementProps:m}),b=x.useRef(null),S=x.useRef(null),T=x.useRef(null),C=x.useRef(null),[w,j]=x.useState(null),O=w==null?void 0:w.modal,E=w==null?void 0:w.open,A=typeof h=="boolean"?h:!!w&&!w.modal&&w.open&&!!g;x.useEffect(()=>{if(!g||O)return;function L(D){g&&zu(D)&&(D.type==="focusin"?$0:xN)(g)}return g.addEventListener("focusin",L,!0),g.addEventListener("focusout",L,!0),()=>{g.removeEventListener("focusin",L,!0),g.removeEventListener("focusout",L,!0)}},[g,O]),x.useEffect(()=>{!g||E||$0(g)},[E,g]);const N=x.useMemo(()=>({beforeOutsideRef:b,afterOutsideRef:S,beforeInsideRef:T,afterInsideRef:C,portalNode:g,setFocusManagerState:j}),[g]);return p.jsxs(x.Fragment,{children:[v,p.jsxs(XE.Provider,{value:N,children:[A&&g&&p.jsx(sd,{"data-type":"outside",ref:b,onFocus:L=>{var D;if(zu(L,g))(D=T.current)==null||D.focus();else{const _=w?w.domReference:null,M=KE(_);M==null||M.focus()}}}),A&&g&&p.jsx("span",{"aria-owns":g.id,style:JA}),g&&Qi.createPortal(a,g),A&&g&&p.jsx(sd,{"data-type":"outside",ref:S,onFocus:L=>{var D;if(zu(L,g))(D=C.current)==null||D.focus();else{const _=w?w.domReference:null,M=QE(_);M==null||M.focus(),w!=null&&w.closeOnFocusOut&&(w==null||w.onOpenChange(!1,We(bd,L.nativeEvent)))}}})]})]})});function Cr(n){return n==null?n:"current"in n?n.current:n}function AN(n,i){const r=hn(n.target);return n instanceof r.KeyboardEvent?"keyboard":n instanceof r.FocusEvent?i||"keyboard":"pointerType"in n?n.pointerType||"keyboard":"touches"in n?"touch":n instanceof r.MouseEvent?i||(n.detail===0?"keyboard":"mouse"):""}const tS=20;let Bs=[];function Lp(){Bs=Bs.filter(n=>n.isConnected)}function NN(n){Lp(),n&&Js(n)!=="body"&&(Bs.push(n),Bs.length>tS&&(Bs=Bs.slice(-tS)))}function xg(){return Lp(),Bs[Bs.length-1]}function MN(n){if(!n)return null;const i=Fu();return GE(n,i)?n:xd(n,i)[0]||n}function zN(n){return!n||!n.isConnected?!1:typeof n.checkVisibility=="function"?n.checkVisibility():Vl(n).display!=="none"}function nS(n,i){var d;if(!i.current.includes("floating")&&!((d=n.getAttribute("role"))!=null&&d.includes("dialog")))return;const r=Fu(),c=vN(n,r).filter(h=>{const m=h.getAttribute("data-tabindex")||"";return GE(h,r)||h.hasAttribute("data-tabindex")&&!m.startsWith("-")}),f=n.getAttribute("tabindex");i.current.includes("floating")||c.length===0?f!=="0"&&n.setAttribute("tabindex","0"):(f!=="-1"||n.hasAttribute("data-tabindex")&&n.getAttribute("data-tabindex")!=="-1")&&(n.setAttribute("tabindex","-1"),n.setAttribute("data-tabindex","-1"))}function Up(n){const{context:i,children:r,disabled:a=!1,order:c=["content"],initialFocus:f=!0,returnFocus:d=!0,restoreFocus:h=!1,modal:m=!0,closeOnFocusOut:g=!0,openInteractionType:v="",getInsideElements:b=()=>[],nextFocusableElement:S,previousFocusableElement:T,beforeContentFocusGuardRef:C,externalTree:w}=n,j="rootStore"in i?i.rootStore:i,O=j.useState("open"),E=j.useState("domReferenceElement"),A=j.useState("floatingElement"),{events:N,dataRef:L}=j.context,D=_e(()=>{var he;return(he=L.current.floatingContext)==null?void 0:he.nodeId}),_=_e(b),M=f===!1,Q=Jg(E)&&M,J=On(c),se=On(f),te=On(d),$=On(v),oe=Ed(w),V=ZE(),H=x.useRef(null),ne=x.useRef(null),F=x.useRef(!1),re=x.useRef(!1),K=x.useRef(!1),Re=x.useRef(-1),Ye=x.useRef(""),Oe=x.useRef(""),z=El(),B=El(),W=vd(),ie=V!=null,ue=_u(A),me=_e((he=ue)=>he?xd(he,Fu()):[]),ae=_e(he=>{const ye=me(he);return J.current.map(()=>ye).filter(Boolean).flat()});x.useEffect(()=>{if(a||!m)return;function he(de){de.key==="Tab"&&Rt(ue,zs(nl(ue)))&&me().length===0&&!Q&&rn(de)}const ye=nl(ue);return ye.addEventListener("keydown",he),()=>{ye.removeEventListener("keydown",he)}},[a,E,ue,m,J,Q,me,ae]),x.useEffect(()=>{if(a||!A)return;function he(ye){const de=Pn(ye),He=me().indexOf(de);He!==-1&&(Re.current=He)}return A.addEventListener("focusin",he),()=>{A.removeEventListener("focusin",he)}},[a,A,me]),x.useEffect(()=>{if(a||!O)return;const he=nl(ue);function ye(){K.current=!1}function de(He){const je=Pn(He),Ee=Rt(A,je)||Rt(E,je)||Rt(V==null?void 0:V.portalNode,je);K.current=!Ee,Oe.current=He.pointerType||"keyboard"}function Ce(){Oe.current="keyboard"}return he.addEventListener("pointerdown",de,!0),he.addEventListener("pointerup",ye,!0),he.addEventListener("pointercancel",ye,!0),he.addEventListener("keydown",Ce,!0),()=>{he.removeEventListener("pointerdown",de,!0),he.removeEventListener("pointerup",ye,!0),he.removeEventListener("pointercancel",ye,!0),he.removeEventListener("keydown",Ce,!0)}},[a,A,E,ue,O,V]),x.useEffect(()=>{if(a||!g)return;function he(){re.current=!0,B.start(0,()=>{re.current=!1})}function ye(je){const Ee=je.relatedTarget,ve=je.currentTarget,we=Pn(je);queueMicrotask(()=>{const xe=D(),Xe=j.context.triggerElements,$e=!(Rt(E,Ee)||Rt(A,Ee)||Rt(Ee,A)||Rt(V==null?void 0:V.portalNode,Ee)||Ee!=null&&Xe.hasElement(Ee)||Xe.hasMatchingElement(Ve=>Rt(Ve,Ee))||Ee!=null&&Ee.hasAttribute(id("focus-guard"))||oe&&(Ka(oe.nodesRef.current,xe).find(Ve=>{var Ze,lt;return Rt((Ze=Ve.context)==null?void 0:Ze.elements.floating,Ee)||Rt((lt=Ve.context)==null?void 0:lt.elements.domReference,Ee)})||K0(oe.nodesRef.current,xe).find(Ve=>{var Ze,lt,St;return[(Ze=Ve.context)==null?void 0:Ze.elements.floating,_u((lt=Ve.context)==null?void 0:lt.elements.floating)].includes(Ee)||((St=Ve.context)==null?void 0:St.elements.domReference)===Ee})));if(ve===E&&ue&&nS(ue,J),h&&ve!==E&&!zN(we)&&zs(nl(ue))===nl(ue).body){if(dn(ue)&&(ue.focus(),h==="popup")){W.request(()=>{ue.focus()});return}const Ve=Re.current,Ze=me(),lt=Ze[Ve]||Ze[Ze.length-1]||ue;dn(lt)&&lt.focus()}if(L.current.insideReactTree){L.current.insideReactTree=!1;return}(Q||!m)&&Ee&&$e&&!re.current&&(Q||Ee!==xg())&&(F.current=!0,j.setOpen(!1,We(bd,je)))})}function de(){K.current||(L.current.insideReactTree=!0,z.start(0,()=>{L.current.insideReactTree=!1}))}const Ce=dn(E)?E:null,He=[];if(!(!A&&!Ce))return Ce&&(Ce.addEventListener("focusout",ye),Ce.addEventListener("pointerdown",he),He.push(()=>{Ce.removeEventListener("focusout",ye),Ce.removeEventListener("pointerdown",he)})),A&&(A.addEventListener("focusout",ye),V&&(A.addEventListener("focusout",de,!0),He.push(()=>{A.removeEventListener("focusout",de,!0)})),He.push(()=>{A.removeEventListener("focusout",ye)})),()=>{He.forEach(je=>{je()})}},[a,E,A,ue,m,oe,V,j,g,h,me,Q,D,J,L,z,B,W]);const q=x.useRef(null),le=x.useRef(null),pe=Yi(q,C,V==null?void 0:V.beforeInsideRef),Ke=Yi(le,V==null?void 0:V.afterInsideRef);x.useEffect(()=>{var je,Ee,ve;if(a||!A||!O)return;const he=Array.from(((je=V==null?void 0:V.portalNode)==null?void 0:je.querySelectorAll(`[${id("portal")}]`))||[]),de=(ve=(Ee=(oe?K0(oe.nodesRef.current,D()):[]).find(we=>{var xe;return Jg(((xe=we.context)==null?void 0:xe.elements.domReference)||null)}))==null?void 0:Ee.context)==null?void 0:ve.elements.domReference,Ce=[A,de,...he,..._(),H.current,ne.current,q.current,le.current,V==null?void 0:V.beforeOutsideRef.current,V==null?void 0:V.afterOutsideRef.current,Cr(T),Cr(S),Q?E:null].filter(we=>we!=null),He=TN(Ce,m||Q);return()=>{He()}},[O,a,E,A,m,J,V,Q,oe,D,_,S,T]),ke(()=>{if(!O||a||!dn(ue))return;const he=nl(ue),ye=zs(he);queueMicrotask(()=>{const de=ae(ue),Ce=se.current,He=typeof Ce=="function"?Ce($.current||""):Ce;if(He===void 0||He===!1)return;let je;He===!0||He===null?je=de[0]||ue:je=Cr(He),je=je||de[0]||ue,!Rt(ue,ye)&&Qf(je,{preventScroll:je===ue})})},[a,O,ue,M,ae,se,$]),ke(()=>{if(a||!ue)return;const he=nl(ue),ye=zs(he);NN(ye);function de(je){if(je.open||(Ye.current=AN(je.nativeEvent,Oe.current)),je.reason===m2&&je.nativeEvent.type==="mouseleave"&&(F.current=!0),je.reason===yE)if(je.nested)F.current=!1;else if(jE(je.nativeEvent)||AE(je.nativeEvent))F.current=!1;else{let Ee=!1;document.createElement("div").focus({get preventScroll(){return Ee=!0,!1}}),Ee?F.current=!1:F.current=!0}}N.on("openchange",de);const Ce=he.createElement("span");Ce.setAttribute("tabindex","-1"),Ce.setAttribute("aria-hidden","true"),Object.assign(Ce.style,dd),ie&&E&&E.insertAdjacentElement("afterend",Ce);function He(){const je=te.current;let Ee=typeof je=="function"?je(Ye.current):je;if(Ee===void 0||Ee===!1)return null;if(Ee===null&&(Ee=!0),typeof Ee=="boolean"){const we=E||xg();return we&&we.isConnected?we:Ce}const ve=E||xg()||Ce;return Cr(Ee)||ve}return()=>{N.off("openchange",de);const je=zs(he),Ee=Rt(A,je)||oe&&Ka(oe.nodesRef.current,D(),!1).some(we=>{var xe;return Rt((xe=we.context)==null?void 0:xe.elements.floating,je)}),ve=He();queueMicrotask(()=>{const we=MN(ve),xe=typeof te.current!="boolean";te.current&&!F.current&&dn(we)&&(!(!xe&&we!==je&&je!==he.body)||Ee)&&we.focus({preventScroll:!0}),Ce.remove()})}},[a,A,ue,te,L,N,oe,ie,E,D]),x.useEffect(()=>{queueMicrotask(()=>{F.current=!1})},[a]),x.useEffect(()=>{if(a||!O)return;function he(de){const Ce=Pn(de);Ce!=null&&Ce.closest(`[${ZA}]`)&&(re.current=!0)}const ye=nl(ue);return ye.addEventListener("pointerdown",he,!0),()=>{ye.removeEventListener("pointerdown",he,!0)}},[a,O,ue]),ke(()=>{if(!a&&V)return V.setFocusManagerState({modal:m,closeOnFocusOut:g,open:O,onOpenChange:j.setOpen,domReference:E}),()=>{V.setFocusManagerState(null)}},[a,V,m,O,j,g,E]),ke(()=>{if(!(a||!ue))return nS(ue,J),()=>{queueMicrotask(Lp)}},[a,ue,J]);const Se=!a&&(m?!Q:!0)&&(ie||m);return p.jsxs(x.Fragment,{children:[Se&&p.jsx(sd,{"data-type":"inside",ref:pe,onFocus:he=>{var ye;if(m){const de=ae();Qf(de[de.length-1])}else if(V!=null&&V.portalNode)if(F.current=!1,zu(he,V.portalNode)){const de=QE(E);de==null||de.focus()}else(ye=Cr(T??V.beforeOutsideRef))==null||ye.focus()}}),r,Se&&p.jsx(sd,{"data-type":"inside",ref:Ke,onFocus:he=>{var ye;if(m)Qf(ae()[0]);else if(V!=null&&V.portalNode)if(g&&(F.current=!0),zu(he,V.portalNode)){const de=KE(E);de==null||de.focus()}else(ye=Cr(S??V.afterOutsideRef))==null||ye.focus()}})]})}function Hp(n,i={}){const r="rootStore"in n?n.rootStore:n,a=r.context.dataRef,{enabled:c=!0,event:f="click",toggle:d=!0,ignoreMouse:h=!1,stickIfOpen:m=!0,touchOpenDelay:g=0}=i,v=x.useRef(void 0),b=vd(),S=El(),T=x.useMemo(()=>({onPointerDown(C){v.current=C.pointerType},onMouseDown(C){const w=v.current,j=C.nativeEvent,O=r.select("open");if(C.button!==0||f==="click"||F0(w)&&h)return;const E=a.current.openEvent,A=E==null?void 0:E.type,N=r.select("domReferenceElement")!==C.currentTarget,L=O&&N||!(O&&d&&(!(E&&m)||A==="click"||A==="mousedown"));if(OE(j.target)){const _=We(Mu,j,j.target);L&&w==="touch"&&g>0?S.start(g,()=>{r.setOpen(!0,_)}):r.setOpen(L,_);return}const D=C.currentTarget;b.request(()=>{const _=We(Mu,j,D);L&&w==="touch"&&g>0?S.start(g,()=>{r.setOpen(!0,_)}):r.setOpen(L,_)})},onClick(C){if(f==="mousedown-only")return;const w=v.current;if(f==="mousedown"&&w){v.current=void 0;return}if(F0(w)&&h)return;const j=r.select("open"),O=a.current.openEvent,E=r.select("domReferenceElement")!==C.currentTarget,A=j&&E||!(j&&d&&(!(O&&m)||NE(O))),N=We(Mu,C.nativeEvent,C.currentTarget);A&&w==="touch"&&g>0?S.start(g,()=>{r.setOpen(!0,N)}):r.setOpen(A,N)},onKeyDown(){v.current=void 0}}),[a,f,h,r,m,d,b,S,g]);return x.useMemo(()=>c?{reference:T}:fn,[c,T])}function lS(n,i,r){let{reference:a,floating:c}=n;const f=Hl(i),d=_p(i),h=Dp(d),m=Il(i),g=f==="y",v=a.x+a.width/2-c.width/2,b=a.y+a.height/2-c.height/2,S=a[h]/2-c[h]/2;let T;switch(m){case"top":T={x:v,y:a.y-c.height};break;case"bottom":T={x:v,y:a.y+a.height};break;case"right":T={x:a.x+a.width,y:b};break;case"left":T={x:a.x-c.width,y:b};break;default:T={x:a.x,y:a.y}}const C=$s(i);return C&&(T[d]+=S*(C==="end"?1:-1)*(r&&g?-1:1)),T}async function DN(n,i){var r;i===void 0&&(i={});const{x:a,y:c,platform:f,rects:d,elements:h,strategy:m}=n,{boundary:g="clippingAncestors",rootBoundary:v="viewport",elementContext:b="floating",altBoundary:S=!1,padding:T=0}=Ki(i,n),C=zE(T),j=h[S?b==="floating"?"reference":"floating":b],O=ed(await f.getClippingRect({element:(r=await(f.isElement==null?void 0:f.isElement(j)))==null||r?j:j.contextElement||await(f.getDocumentElement==null?void 0:f.getDocumentElement(h.floating)),boundary:g,rootBoundary:v,strategy:m})),E=b==="floating"?{x:a,y:c,width:d.floating.width,height:d.floating.height}:d.reference,A=await(f.getOffsetParent==null?void 0:f.getOffsetParent(h.floating)),N=await(f.isElement==null?void 0:f.isElement(A))&&await(f.getScale==null?void 0:f.getScale(A))||{x:1,y:1},L=ed(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:E,offsetParent:A,strategy:m}):E);return{top:(O.top-L.top+C.top)/N.y,bottom:(L.bottom-O.bottom+C.bottom)/N.y,left:(O.left-L.left+C.left)/N.x,right:(L.right-O.right+C.right)/N.x}}const _N=50,kN=async(n,i,r)=>{const{placement:a="bottom",strategy:c="absolute",middleware:f=[],platform:d}=r,h=d.detectOverflow?d:{...d,detectOverflow:DN},m=await(d.isRTL==null?void 0:d.isRTL(i));let g=await d.getElementRects({reference:n,floating:i,strategy:c}),{x:v,y:b}=lS(g,a,m),S=a,T=0;const C={};for(let w=0;w<f.length;w++){const j=f[w];if(!j)continue;const{name:O,fn:E}=j,{x:A,y:N,data:L,reset:D}=await E({x:v,y:b,initialPlacement:a,placement:S,strategy:c,middlewareData:C,rects:g,platform:h,elements:{reference:n,floating:i}});v=A??v,b=N??b,C[O]={...C[O],...L},D&&T<_N&&(T++,typeof D=="object"&&(D.placement&&(S=D.placement),D.rects&&(g=D.rects===!0?await d.getElementRects({reference:n,floating:i,strategy:c}):D.rects),{x:v,y:b}=lS(g,S,m)),w=-1)}return{x:v,y:b,placement:S,strategy:c,middlewareData:C}},LN=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(i){var r,a;const{placement:c,middlewareData:f,rects:d,initialPlacement:h,platform:m,elements:g}=i,{mainAxis:v=!0,crossAxis:b=!0,fallbackPlacements:S,fallbackStrategy:T="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:w=!0,...j}=Ki(n,i);if((r=f.arrow)!=null&&r.alignmentOffset)return{};const O=Il(c),E=Hl(h),A=Il(h)===h,N=await(m.isRTL==null?void 0:m.isRTL(g.floating)),L=S||(A||!w?[Wf(h)]:eN(h)),D=C!=="none";!S&&D&&L.push(...iN(h,w,C,N));const _=[h,...L],M=await m.detectOverflow(i,j),Q=[];let J=((a=f.flip)==null?void 0:a.overflows)||[];if(v&&Q.push(M[O]),b){const oe=W2(c,d,N);Q.push(M[oe[0]],M[oe[1]])}if(J=[...J,{placement:c,overflows:Q}],!Q.every(oe=>oe<=0)){var se,te;const oe=(((se=f.flip)==null?void 0:se.index)||0)+1,V=_[oe];if(V&&(!(b==="alignment"?E!==Hl(V):!1)||J.every(F=>Hl(F.placement)===E?F.overflows[0]>0:!0)))return{data:{index:oe,overflows:J},reset:{placement:V}};let H=(te=J.filter(ne=>ne.overflows[0]<=0).sort((ne,F)=>ne.overflows[1]-F.overflows[1])[0])==null?void 0:te.placement;if(!H)switch(T){case"bestFit":{var $;const ne=($=J.filter(F=>{if(D){const re=Hl(F.placement);return re===E||re==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(re=>re>0).reduce((re,K)=>re+K,0)]).sort((F,re)=>F[1]-re[1])[0])==null?void 0:$[0];ne&&(H=ne);break}case"initialPlacement":H=h;break}if(c!==H)return{reset:{placement:H}}}return{}}}};function iS(n,i){return{top:n.top-i.height,right:n.right-i.width,bottom:n.bottom-i.height,left:n.left-i.width}}function sS(n){return J2.some(i=>n[i]>=0)}const UN=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(i){const{rects:r,platform:a}=i,{strategy:c="referenceHidden",...f}=Ki(n,i);switch(c){case"referenceHidden":{const d=await a.detectOverflow(i,{...f,elementContext:"reference"}),h=iS(d,r.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:sS(h)}}}case"escaped":{const d=await a.detectOverflow(i,{...f,altBoundary:!0}),h=iS(d,r.floating);return{data:{escapedOffsets:h,escaped:sS(h)}}}default:return{}}}}},JE=new Set(["left","top"]);async function HN(n,i){const{placement:r,platform:a,elements:c}=n,f=await(a.isRTL==null?void 0:a.isRTL(c.floating)),d=Il(r),h=$s(r),m=Hl(r)==="y",g=JE.has(d)?-1:1,v=f&&m?-1:1,b=Ki(i,n);let{mainAxis:S,crossAxis:T,alignmentAxis:C}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return h&&typeof C=="number"&&(T=h==="end"?C*-1:C),m?{x:T*v,y:S*g}:{x:S*g,y:T*v}}const IN=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(i){var r,a;const{x:c,y:f,placement:d,middlewareData:h}=i,m=await HN(i,n);return d===((r=h.offset)==null?void 0:r.placement)&&(a=h.arrow)!=null&&a.alignmentOffset?{}:{x:c+m.x,y:f+m.y,data:{...m,placement:d}}}}},VN=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(i){const{x:r,y:a,placement:c,platform:f}=i,{mainAxis:d=!0,crossAxis:h=!1,limiter:m={fn:E=>{let{x:A,y:N}=E;return{x:A,y:N}}},...g}=Ki(n,i),v={x:r,y:a},b=await f.detectOverflow(i,g),S=Hl(c),T=zp(S);let C=v[T],w=v[S];const j=(E,A)=>ME(A+b[E==="y"?"top":"left"],A,A-b[E==="y"?"bottom":"right"]);d&&(C=j(T,C)),h&&(w=j(S,w));const O=m.fn({...i,[T]:C,[S]:w});return{...O,data:{x:O.x-r,y:O.y-a,enabled:{[T]:d,[S]:h}}}}}},BN=function(n){return n===void 0&&(n={}),{options:n,fn(i){var r,a;const{x:c,y:f,placement:d,rects:h,middlewareData:m}=i,{offset:g=0,mainAxis:v=!0,crossAxis:b=!0}=Ki(n,i),S={x:c,y:f},T=Hl(d),C=zp(T);let w=S[C],j=S[T];const O=Ki(g,i),E=typeof O=="number"?{mainAxis:O,crossAxis:0}:{mainAxis:(r=O.mainAxis)!=null?r:0,crossAxis:(a=O.crossAxis)!=null?a:0};if(v){const L=C==="y"?"height":"width",D=h.reference[C]-h.floating[L]+E.mainAxis,_=h.reference[C]+h.reference[L]-E.mainAxis;w<D?w=D:w>_&&(w=_)}if(b){var A,N;const L=C==="y"?"width":"height",D=JE.has(Il(d)),_=h.reference[T]-h.floating[L]+(D&&((A=m.offset)==null?void 0:A[T])||0)+(D?0:E.crossAxis),M=h.reference[T]+h.reference[L]+(D?0:((N=m.offset)==null?void 0:N[T])||0)-(D?E.crossAxis:0);j<_?j=_:j>M&&(j=M)}return{[C]:w,[T]:j}}}},qN=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(i){const{placement:r,rects:a,platform:c,elements:f}=i,{apply:d=()=>{},...h}=Ki(n,i),m=await c.detectOverflow(i,h),g=Il(r),v=$s(r),b=Hl(r)==="y",{width:S,height:T}=a.floating;let C,w;g==="top"||g==="bottom"?(C=g,w=v===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(w=g,C=v==="end"?"top":"bottom");const j=T-m.top-m.bottom,O=S-m.left-m.right,E=po(T-m[C],j),A=po(S-m[w],O),N=i.middlewareData.shift,L=!N;let D=E,_=A;N!=null&&N.enabled.x&&(_=O),N!=null&&N.enabled.y&&(D=j),L&&!v&&(b?_=S-2*Pi(m.left,m.right):D=T-2*Pi(m.top,m.bottom)),await d({...i,availableWidth:_,availableHeight:D});const M=await c.getDimensions(f.floating);return S!==M.width||T!==M.height?{reset:{rects:!0}}:{}}}};function $E(n){const i=Vl(n);let r=parseFloat(i.width)||0,a=parseFloat(i.height)||0;const c=dn(n),f=c?n.offsetWidth:r,d=c?n.offsetHeight:a,h=$f(r)!==f||$f(a)!==d;return h&&(r=f,a=d),{width:r,height:a,$:h}}function Ip(n){return Vt(n)?n:n.contextElement}function Za(n){const i=Ip(n);if(!dn(i))return Gi(1);const r=i.getBoundingClientRect(),{width:a,height:c,$:f}=$E(i);let d=(f?$f(r.width):r.width)/a,h=(f?$f(r.height):r.height)/c;return(!d||!Number.isFinite(d))&&(d=1),(!h||!Number.isFinite(h))&&(h=1),{x:d,y:h}}const PN=Gi(0);function WE(n){const i=hn(n);return!pd()||!i.visualViewport?PN:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function GN(n,i,r){return i===void 0&&(i=!1),!!r&&i&&r===hn(n)}function Gr(n,i,r,a){i===void 0&&(i=!1),r===void 0&&(r=!1);const c=n.getBoundingClientRect(),f=Ip(n);let d=Gi(1);i&&(a?Vt(a)&&(d=Za(a)):d=Za(n));const h=GN(f,r,a)?WE(f):Gi(0);let m=(c.left+h.x)/d.x,g=(c.top+h.y)/d.y,v=c.width/d.x,b=c.height/d.y;if(f&&a){const S=hn(f),T=Vt(a)?hn(a):a;let C=S,w=Xg(C);for(;w&&T!==C;){const j=Za(w),O=w.getBoundingClientRect(),E=Vl(w),A=O.left+(w.clientLeft+parseFloat(E.paddingLeft))*j.x,N=O.top+(w.clientTop+parseFloat(E.paddingTop))*j.y;m*=j.x,g*=j.y,v*=j.x,b*=j.y,m+=A,g+=N,C=hn(w),w=Xg(C)}}return ed({width:v,height:b,x:m,y:g})}function Rd(n,i){const r=yd(n).scrollLeft;return i?i.left+r:Gr($i(n)).left+r}function eR(n,i){const r=n.getBoundingClientRect(),a=r.left+i.scrollLeft-Rd(n,r),c=r.top+i.scrollTop;return{x:a,y:c}}function YN(n){let{elements:i,rect:r,offsetParent:a,strategy:c}=n;const f=c==="fixed",d=$i(a),h=i?gd(i.floating):!1;if(a===d||h&&f)return r;let m={scrollLeft:0,scrollTop:0},g=Gi(1);const v=Gi(0),b=dn(a);if((b||!f)&&((Js(a)!=="body"||So(d))&&(m=yd(a)),b)){const T=Gr(a);g=Za(a),v.x=T.x+a.clientLeft,v.y=T.y+a.clientTop}const S=d&&!b&&!f?eR(d,m):Gi(0);return{width:r.width*g.x,height:r.height*g.y,x:r.x*g.x-m.scrollLeft*g.x+v.x+S.x,y:r.y*g.y-m.scrollTop*g.y+v.y+S.y}}function QN(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function KN(n){const i=yd(n),r=n.ownerDocument.body,a=Pi(n.scrollWidth,n.clientWidth,r.scrollWidth,r.clientWidth),c=Pi(n.scrollHeight,n.clientHeight,r.scrollHeight,r.clientHeight);let f=-i.scrollLeft+Rd(n);const d=-i.scrollTop;return Vl(r).direction==="rtl"&&(f+=Pi(n.clientWidth,r.clientWidth)-a),{width:a,height:c,x:f,y:d}}const FN=25;function XN(n,i,r){r===void 0&&(r="viewport");const a=r==="layoutViewport",c=hn(n),f=$i(n),d=c.visualViewport;let h=f.clientWidth,m=f.clientHeight,g=0,v=0;if(d){const S=!pd()||i==="fixed";a?S||(g=-d.offsetLeft,v=-d.offsetTop):(h=d.width,m=d.height,S&&(g=d.offsetLeft,v=d.offsetTop))}if(Rd(f)<=0){const S=f.ownerDocument,T=S.body,C=getComputedStyle(T),w=S.compatMode==="CSS1Compat"&&parseFloat(C.marginLeft)+parseFloat(C.marginRight)||0,j=Math.abs(f.clientWidth-T.clientWidth-w),O=getComputedStyle(f).scrollbarGutter==="stable both-edges"?j/2:j;O<=FN&&(h-=O)}return{width:h,height:m,x:g,y:v}}function ZN(n,i){const r=Gr(n,!0,i==="fixed"),a=r.top+n.clientTop,c=r.left+n.clientLeft,f=Za(n),d=n.clientWidth*f.x,h=n.clientHeight*f.y,m=c*f.x,g=a*f.y;return{width:d,height:h,x:m,y:g}}function rS(n,i,r){let a;if(i==="viewport"||i==="layoutViewport")a=XN(n,r,i);else if(i==="document")a=KN($i(n));else if(Vt(i))a=ZN(i,r);else{const c=WE(n);a={x:i.x-c.x,y:i.y-c.y,width:i.width,height:i.height}}return ed(a)}function JN(n,i){const r=i.get(n);if(r)return r;let a=Ps(n,[],!1).filter(h=>Vt(h)&&Js(h)!=="body"),c=null;const f=Vl(n).position==="fixed";let d=f?Fs(n):n;for(;Vt(d)&&!qs(d);){const h=Vl(d),m=Tp(d),g=c?c.position:f?"fixed":"";!m&&(g==="fixed"||g==="absolute"&&h.position==="static")?a=a.filter(b=>b!==d):c=h,d=Fs(d)}return i.set(n,a),a}function $N(n){let{element:i,boundary:r,rootBoundary:a,strategy:c}=n;const d=[...r==="clippingAncestors"?gd(i)?[]:JN(i,this._c):[].concat(r),a],h=rS(i,d[0],c);let m=h.top,g=h.right,v=h.bottom,b=h.left;for(let S=1;S<d.length;S++){const T=rS(i,d[S],c);m=Pi(T.top,m),g=po(T.right,g),v=po(T.bottom,v),b=Pi(T.left,b)}return{width:g-b,height:v-m,x:b,y:m}}function WN(n){const{width:i,height:r}=$E(n);return{width:i,height:r}}function eM(n,i,r){const a=dn(i),c=$i(i),f=r==="fixed",d=Gr(n,!0,f,i);let h={scrollLeft:0,scrollTop:0};const m=Gi(0);if((a||!f)&&((Js(i)!=="body"||So(c))&&(h=yd(i)),a)){const S=Gr(i,!0,f,i);m.x=S.x+i.clientLeft,m.y=S.y+i.clientTop}!a&&c&&(m.x=Rd(c));const g=c&&!a&&!f?eR(c,h):Gi(0),v=d.left+h.scrollLeft-m.x-g.x,b=d.top+h.scrollTop-m.y-g.y;return{x:v,y:b,width:d.width,height:d.height}}function Sg(n){return Vl(n).position==="static"}function aS(n,i){if(!dn(n)||Vl(n).position==="fixed")return null;if(i)return i(n);let r=n.offsetParent;return $i(n)===r&&(r=r.ownerDocument.body),r}function tR(n,i){const r=hn(n);if(gd(n))return r;if(!dn(n)){let c=Fs(n);for(;c&&!qs(c);){if(Vt(c)&&!Sg(c))return c;c=Fs(c)}return r}let a=aS(n,i);for(;a&&l2(a)&&Sg(a);)a=aS(a,i);return a&&qs(a)&&Sg(a)&&!Tp(a)?r:a||r2(n)||r}const tM=async function(n){const i=this.getOffsetParent||tR,r=this.getDimensions,a=await r(n.floating);return{reference:eM(n.reference,await i(n.floating),n.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function nM(n){return Vl(n).direction==="rtl"}const lM={convertOffsetParentRelativeRectToViewportRelativeRect:YN,getDocumentElement:$i,getClippingRect:$N,getOffsetParent:tR,getElementRects:tM,getClientRects:QN,getDimensions:WN,getScale:Za,isElement:Vt,isRTL:nM};function nR(n,i){return n.x===i.x&&n.y===i.y&&n.width===i.width&&n.height===i.height}function iM(n,i,r){let a=null,c;const f=$i(n);function d(){var v;clearTimeout(c),(v=a)==null||v.disconnect(),a=null}function h(v,b){v===void 0&&(v=!1),b===void 0&&(b=1),d();const S=n.getBoundingClientRect(),{left:T,top:C,width:w,height:j}=S;if(v||i(),!w||!j)return;const O=Qa(C),E=Qa(f.clientWidth-(T+w)),A=Qa(f.clientHeight-(C+j)),N=Qa(T),D={rootMargin:-O+"px "+-E+"px "+-A+"px "+-N+"px",threshold:Pi(0,po(1,b))||1};let _=!0;function M(Q){const J=Q[0].intersectionRatio;if(!nR(S,n.getBoundingClientRect()))return h();if(J!==b){if(!_)return h();J?h(!1,J):c=setTimeout(()=>{h(!1,1e-7)},1e3)}_=!1}try{a=new IntersectionObserver(M,{...D,root:f.ownerDocument})}catch{a=new IntersectionObserver(M,D)}a.observe(n)}const m=hn(n),g=()=>h(r);return m.addEventListener("resize",g),h(!0),()=>{m.removeEventListener("resize",g),d()}}function oS(n,i,r,a){a===void 0&&(a={});const{ancestorScroll:c=!0,ancestorResize:f=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:m=!1}=a,g=Ip(n),v=c||f?[...g?Ps(g):[],...i?Ps(i):[]]:[];v.forEach(O=>{c&&O.addEventListener("scroll",r),f&&O.addEventListener("resize",r)});const b=g&&h?iM(g,r,f):null;let S=-1,T=null;d&&(T=new ResizeObserver(O=>{let[E]=O;E&&E.target===g&&T&&i&&(T.unobserve(i),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var A;(A=T)==null||A.observe(i)})),r()}),g&&!m&&T.observe(g),i&&T.observe(i));let C,w=m?Gr(n):null;m&&j();function j(){const O=Gr(n);w&&!nR(w,O)&&r(),w=O,C=requestAnimationFrame(j)}return r(),()=>{var O;v.forEach(E=>{c&&E.removeEventListener("scroll",r),f&&E.removeEventListener("resize",r)}),b==null||b(),(O=T)==null||O.disconnect(),T=null,m&&cancelAnimationFrame(C)}}const sM=IN,rM=VN,aM=LN,oM=qN,uM=UN,cM=BN,fM=(n,i,r)=>{const a=new Map,c=r??{},f={...lM,...c.platform,_c:a};return kN(n,i,{...c,platform:f})};var dM=typeof document<"u",hM=function(){},Kf=dM?x.useLayoutEffect:hM;function rd(n,i){if(n===i)return!0;if(typeof n!=typeof i)return!1;if(typeof n=="function"&&n.toString()===i.toString())return!0;let r,a,c;if(n&&i&&typeof n=="object"){if(Array.isArray(n)){if(r=n.length,r!==i.length)return!1;for(a=r;a--!==0;)if(!rd(n[a],i[a]))return!1;return!0}if(c=Object.keys(n),r=c.length,r!==Object.keys(i).length)return!1;for(a=r;a--!==0;)if(!{}.hasOwnProperty.call(i,c[a]))return!1;for(a=r;a--!==0;){const f=c[a];if(!(f==="_owner"&&n.$$typeof)&&!rd(n[f],i[f]))return!1}return!0}return n!==n&&i!==i}function lR(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function uS(n,i){const r=lR(n);return Math.round(i*r)/r}function Eg(n){const i=x.useRef(n);return Kf(()=>{i.current=n}),i}function mM(n){n===void 0&&(n={});const{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:c,elements:{reference:f,floating:d}={},transform:h=!0,whileElementsMounted:m,open:g}=n,[v,b]=x.useState({x:0,y:0,strategy:r,placement:i,middlewareData:{},isPositioned:!1}),[S,T]=x.useState(a);rd(S,a)||T(a);const[C,w]=x.useState(null),[j,O]=x.useState(null),E=x.useCallback(F=>{F!==D.current&&(D.current=F,w(F))},[]),A=x.useCallback(F=>{F!==_.current&&(_.current=F,O(F))},[]),N=f||C,L=d||j,D=x.useRef(null),_=x.useRef(null),M=x.useRef(v),Q=m!=null,J=Eg(m),se=Eg(c),te=Eg(g),$=x.useCallback(()=>{if(!D.current||!_.current)return;const F={placement:i,strategy:r,middleware:S};se.current&&(F.platform=se.current),fM(D.current,_.current,F).then(re=>{const K={...re,isPositioned:te.current!==!1};oe.current&&!rd(M.current,K)&&(M.current=K,Qi.flushSync(()=>{b(K)}))})},[S,i,r,se,te]);Kf(()=>{g===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,b(F=>({...F,isPositioned:!1})))},[g]);const oe=x.useRef(!1);Kf(()=>(oe.current=!0,()=>{oe.current=!1}),[]),Kf(()=>{if(N&&(D.current=N),L&&(_.current=L),N&&L){if(J.current)return J.current(N,L,$);$()}},[N,L,$,J,Q]);const V=x.useMemo(()=>({reference:D,floating:_,setReference:E,setFloating:A}),[E,A]),H=x.useMemo(()=>({reference:N,floating:L}),[N,L]),ne=x.useMemo(()=>{const F={position:r,left:0,top:0};if(!H.floating)return F;const re=uS(H.floating,v.x),K=uS(H.floating,v.y);return h?{...F,transform:"translate("+re+"px, "+K+"px)",...lR(H.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:re,top:K}},[r,h,H.floating,v.x,v.y]);return x.useMemo(()=>({...v,update:$,refs:V,elements:H,floatingStyles:ne}),[v,$,V,H,ne])}const gM=(n,i)=>{const r=sM(n);return{name:r.name,fn:r.fn,options:[n,i]}},pM=(n,i)=>{const r=rM(n);return{name:r.name,fn:r.fn,options:[n,i]}},yM=(n,i)=>({fn:cM(n).fn,options:[n,i]}),bM=(n,i)=>{const r=aM(n);return{name:r.name,fn:r.fn,options:[n,i]}},vM=(n,i)=>{const r=oM(n);return{name:r.name,fn:r.fn,options:[n,i]}},xM=(n,i)=>{const r=uM(n);return{name:r.name,fn:r.fn,options:[n,i]}},SM={intentional:"onClick",sloppy:"onPointerDown"};function EM(n){return{escapeKey:typeof n=="boolean"?n:(n==null?void 0:n.escapeKey)??!1,outsidePress:typeof n=="boolean"?n:(n==null?void 0:n.outsidePress)??!0}}function Vp(n,i={}){const r="rootStore"in n?n.rootStore:n,a=r.useState("open"),c=r.useState("floatingElement"),f=r.useState("referenceElement"),d=r.useState("domReferenceElement"),{onOpenChange:h,dataRef:m}=r.context,{enabled:g=!0,escapeKey:v=!0,outsidePress:b=!0,outsidePressEvent:S="sloppy",referencePress:T=!1,referencePressEvent:C="sloppy",ancestorScroll:w=!1,bubbles:j,externalTree:O}=i,E=Ed(O),A=_e(typeof b=="function"?b:()=>!1),N=typeof b=="function"?A:b,L=x.useRef(!1),{escapeKey:D,outsidePress:_}=EM(j),M=x.useRef(null),Q=El(),J=El(),se=_e(()=>{J.clear(),m.current.insideReactTree=!1}),te=x.useRef(!1),$=x.useRef(""),oe=_e(q=>{$.current=q.pointerType}),V=_e(()=>{const q=$.current,le=q==="pen"||!q?"mouse":q,pe=typeof S=="function"?S():S;return typeof pe=="string"?pe:pe[le]}),H=_e(q=>{var he;if(!a||!g||!v||q.key!=="Escape"||te.current)return;const le=(he=m.current.floatingContext)==null?void 0:he.nodeId,pe=E?Ka(E.nodesRef.current,le):[];if(!D&&pe.length>0){let ye=!0;if(pe.forEach(de=>{var Ce;(Ce=de.context)!=null&&Ce.open&&!de.context.dataRef.current.__escapeKeyBubbles&&(ye=!1)}),!ye)return}const Ke=Z2(q)?q.nativeEvent:q,Se=We(bE,Ke);r.setOpen(!1,Se),!D&&!Se.isPropagationAllowed&&q.stopPropagation()}),ne=_e(q=>{const le=V();return le==="intentional"&&q.type!=="click"||le==="sloppy"&&q.type==="click"}),F=_e(()=>{m.current.insideReactTree=!0,J.start(0,se)}),re=_e((q,le=!1)=>{var je;if(ne(q)){se();return}if(m.current.insideReactTree){se();return}if(V()==="intentional"&&le||typeof N=="function"&&!N(q))return;const pe=Pn(q),Ke=`[${id("inert")}]`,Se=nl(r.select("floatingElement")).querySelectorAll(Ke),he=r.context.triggerElements;if(pe&&(he.hasElement(pe)||he.hasMatchingElement(Ee=>Rt(Ee,pe))))return;let ye=Vt(pe)?pe:null;for(;ye&&!qs(ye);){const Ee=Fs(ye);if(qs(Ee)||!Vt(Ee))break;ye=Ee}if(Se.length&&Vt(pe)&&!X2(pe)&&!Rt(pe,r.select("floatingElement"))&&Array.from(Se).every(Ee=>!Rt(ye,Ee)))return;if(dn(pe)&&!("touches"in q)){const Ee=qs(pe),ve=Vl(pe),we=/auto|scroll/,xe=Ee||we.test(ve.overflowX),Xe=Ee||we.test(ve.overflowY),$e=xe&&pe.clientWidth>0&&pe.scrollWidth>pe.clientWidth,Ve=Xe&&pe.clientHeight>0&&pe.scrollHeight>pe.clientHeight,Ze=ve.direction==="rtl",lt=Ve&&(Ze?q.offsetX<=pe.offsetWidth-pe.clientWidth:q.offsetX>pe.clientWidth),St=$e&&q.offsetY>pe.clientHeight;if(lt||St)return}const de=(je=m.current.floatingContext)==null?void 0:je.nodeId,Ce=E&&Ka(E.nodesRef.current,de).some(Ee=>{var ve;return Zl(q,(ve=Ee.context)==null?void 0:ve.elements.floating)});if(Zl(q,r.select("floatingElement"))||Zl(q,r.select("domReferenceElement"))||Ce)return;const He=E?Ka(E.nodesRef.current,de):[];if(He.length>0){let Ee=!0;if(He.forEach(ve=>{var we;(we=ve.context)!=null&&we.open&&!ve.context.dataRef.current.__outsidePressBubbles&&(Ee=!1)}),!Ee)return}r.setOpen(!1,We(yE,q)),se()}),K=_e(q=>{V()!=="sloppy"||q.pointerType==="touch"||!r.select("open")||!g||Zl(q,r.select("floatingElement"))||Zl(q,r.select("domReferenceElement"))||re(q)}),Re=_e(q=>{if(V()!=="sloppy"||!r.select("open")||!g||Zl(q,r.select("floatingElement"))||Zl(q,r.select("domReferenceElement")))return;const le=q.touches[0];le&&(M.current={startTime:Date.now(),startX:le.clientX,startY:le.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},Q.start(1e3,()=>{M.current&&(M.current.dismissOnTouchEnd=!1,M.current.dismissOnMouseDown=!1)}))}),Ye=_e(q=>{const le=Pn(q);function pe(){Re(q),le==null||le.removeEventListener(q.type,pe)}le==null||le.addEventListener(q.type,pe)}),Oe=_e(q=>{const le=L.current;if(L.current=!1,Q.clear(),q.type==="mousedown"&&M.current&&!M.current.dismissOnMouseDown)return;const pe=Pn(q);function Ke(){q.type==="pointerdown"?K(q):re(q,le),pe==null||pe.removeEventListener(q.type,Ke)}pe==null||pe.addEventListener(q.type,Ke)}),z=_e(q=>{if(V()!=="sloppy"||!M.current||Zl(q,r.select("floatingElement"))||Zl(q,r.select("domReferenceElement")))return;const le=q.touches[0];if(!le)return;const pe=Math.abs(le.clientX-M.current.startX),Ke=Math.abs(le.clientY-M.current.startY),Se=Math.sqrt(pe*pe+Ke*Ke);Se>5&&(M.current.dismissOnTouchEnd=!0),Se>10&&(re(q),Q.clear(),M.current=null)}),B=_e(q=>{const le=Pn(q);function pe(){z(q),le==null||le.removeEventListener(q.type,pe)}le==null||le.addEventListener(q.type,pe)}),W=_e(q=>{V()!=="sloppy"||!M.current||Zl(q,r.select("floatingElement"))||Zl(q,r.select("domReferenceElement"))||(M.current.dismissOnTouchEnd&&re(q),Q.clear(),M.current=null)}),ie=_e(q=>{const le=Pn(q);function pe(){W(q),le==null||le.removeEventListener(q.type,pe)}le==null||le.addEventListener(q.type,pe)});x.useEffect(()=>{if(!a||!g)return;m.current.__escapeKeyBubbles=D,m.current.__outsidePressBubbles=_;const q=new go;function le(ye){r.setOpen(!1,We(dl,ye))}function pe(){q.clear(),te.current=!0}function Ke(){q.start(pd()?5:0,()=>{te.current=!1})}const Se=nl(c);Se.addEventListener("pointerdown",oe,!0),v&&(Se.addEventListener("keydown",H),Se.addEventListener("compositionstart",pe),Se.addEventListener("compositionend",Ke)),N&&(Se.addEventListener("click",Oe,!0),Se.addEventListener("pointerdown",Oe,!0),Se.addEventListener("touchstart",Ye,!0),Se.addEventListener("touchmove",B,!0),Se.addEventListener("touchend",ie,!0),Se.addEventListener("mousedown",Oe,!0));let he=[];return w&&(Vt(d)&&(he=Ps(d)),Vt(c)&&(he=he.concat(Ps(c))),!Vt(f)&&f&&f.contextElement&&(he=he.concat(Ps(f.contextElement)))),he=he.filter(ye=>{var de;return ye!==((de=Se.defaultView)==null?void 0:de.visualViewport)}),he.forEach(ye=>{ye.addEventListener("scroll",le,{passive:!0})}),()=>{Se.removeEventListener("pointerdown",oe,!0),v&&(Se.removeEventListener("keydown",H),Se.removeEventListener("compositionstart",pe),Se.removeEventListener("compositionend",Ke)),N&&(Se.removeEventListener("click",Oe,!0),Se.removeEventListener("pointerdown",Oe,!0),Se.removeEventListener("touchstart",Ye,!0),Se.removeEventListener("touchmove",B,!0),Se.removeEventListener("touchend",ie,!0),Se.removeEventListener("mousedown",Oe,!0)),he.forEach(ye=>{ye.removeEventListener("scroll",le)}),q.clear()}},[m,c,f,d,v,N,a,h,w,g,D,_,H,re,Oe,K,Ye,B,ie,oe,r]),x.useEffect(se,[N,se]);const ue=x.useMemo(()=>({onKeyDown:H,...T&&{[SM[C]]:q=>{r.setOpen(!1,We(Mu,q.nativeEvent))},...C!=="intentional"&&{onClick(q){r.setOpen(!1,We(Mu,q.nativeEvent))}}}}),[H,r,T,C]),me=_e(q=>{const le=Pn(q.nativeEvent);!Rt(r.select("floatingElement"),le)||q.button!==0||(L.current=!0)}),ae=x.useMemo(()=>({onKeyDown:H,onPointerDown:me,onMouseDown:me,onMouseUp:me,onClickCapture:F,onMouseDownCapture:F,onPointerDownCapture:F,onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[H,me,F]);return x.useMemo(()=>g?{reference:ue,floating:ae,trigger:ue}:{},[g,ue,ae])}const RM={open:ge(n=>n.open),domReferenceElement:ge(n=>n.domReferenceElement),referenceElement:ge(n=>n.positionReference??n.referenceElement),floatingElement:ge(n=>n.floatingElement),floatingId:ge(n=>n.floatingId)};class Bp extends SE{constructor(r){const{nested:a,noEmit:c,onOpenChange:f,triggerElements:d,...h}=r;super({...h,positionReference:h.referenceElement,domReferenceElement:h.referenceElement},{onOpenChange:f,dataRef:{current:{}},events:SN(),nested:a,noEmit:c,triggerElements:d},RM);Nt(this,"setOpen",(r,a)=>{var c,f;if((!r||!this.state.open||NE(a.event))&&(this.context.dataRef.current.openEvent=r?a.event:void 0),!this.context.noEmit){const d={open:r,reason:a.reason,nativeEvent:a.event,nested:this.context.nested,triggerElement:a.trigger};this.context.events.emit("openchange",d)}(f=(c=this.context).onOpenChange)==null||f.call(c,r,a)})}}function wd(n,i=!1,r=!1){const[a,c]=x.useState(n&&i?"idle":void 0),[f,d]=x.useState(n);return n&&!f&&(d(!0),c("starting")),!n&&f&&a!=="ending"&&!r&&c("ending"),!n&&!f&&a==="ending"&&c(void 0),ke(()=>{if(!n&&f&&a!=="ending"&&r){const h=gi.request(()=>{c("ending")});return()=>{gi.cancel(h)}}},[n,f,a,r]),ke(()=>{if(!n||i)return;const h=gi.request(()=>{Qi.flushSync(()=>{c(void 0)})});return()=>{gi.cancel(h)}},[i,n]),ke(()=>{if(!n||!i)return;n&&f&&a!=="idle"&&c("starting");const h=gi.request(()=>{c("idle")});return()=>{gi.cancel(h)}},[i,n,f,c,a]),x.useMemo(()=>({mounted:f,setMounted:d,transitionStatus:a}),[f,a])}function wM(n,i=!1,r=!0){const a=vd();return _e((c,f=null)=>{a.cancel();const d=Cr(n);d!=null&&(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?c():a.request(()=>{function h(){d&&Promise.all(d.getAnimations().map(m=>m.finished)).then(()=>{f!=null&&f.aborted||Qi.flushSync(c)}).catch(()=>{if(r){if(f!=null&&f.aborted)return;Qi.flushSync(c)}else d.getAnimations().length>0&&d.getAnimations().some(m=>m.pending||m.playState!=="finished")&&h()})}i?a.request(h):h()}))})}function Fr(n){const{enabled:i=!0,open:r,ref:a,onComplete:c}=n,f=On(r),d=_e(c),h=wM(a,r);x.useEffect(()=>{i&&h(()=>{r===f.current&&d()})},[i,r,d,h,f])}function CM(n){const i=n.useState("open");ke(()=>{if(i&&!n.select("activeTriggerId")&&n.context.triggerElements.size===1){const r=n.context.triggerElements.entries().next();if(!r.done){const[a,c]=r.value;n.update({activeTriggerId:a,activeTriggerElement:c})}}},[i,n])}function TM(n,i,r){const{mounted:a,setMounted:c,transitionStatus:f}=wd(n);i.useSyncedValues({mounted:a,transitionStatus:f});const d=_e(()=>{var m,g;c(!1),i.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),r==null||r(),(g=(m=i.context).onOpenChangeComplete)==null||g.call(m,!1)}),h=i.useState("preventUnmountingOnClose");return Fr({enabled:!h,open:n,ref:i.context.popupRef,onComplete(){n||d()}}),{forceUnmount:d,transitionStatus:f}}class qp{constructor(){this.elements=new Set,this.idMap=new Map}add(i,r){const a=this.idMap.get(i);a!==r&&(a!==void 0&&this.elements.delete(a),this.elements.add(r),this.idMap.set(i,r))}delete(i){const r=this.idMap.get(i);r&&(this.elements.delete(r),this.idMap.delete(i))}hasElement(i){return this.elements.has(i)}hasMatchingElement(i){for(const r of this.elements)if(i(r))return!0;return!1}getById(i){return this.idMap.get(i)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function OM(){return new Bp({open:!1,floatingElement:null,referenceElement:null,triggerElements:new qp,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function jM(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:OM(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:fn,inactiveTriggerProps:fn,popupProps:fn}}const AM={open:ge(n=>n.open),mounted:ge(n=>n.mounted),transitionStatus:ge(n=>n.transitionStatus),floatingRootContext:ge(n=>n.floatingRootContext),preventUnmountingOnClose:ge(n=>n.preventUnmountingOnClose),payload:ge(n=>n.payload),activeTriggerId:ge(n=>n.activeTriggerId),activeTriggerElement:ge(n=>n.mounted?n.activeTriggerElement:null),isTriggerActive:ge((n,i)=>i!==void 0&&n.activeTriggerId===i),isOpenedByTrigger:ge((n,i)=>i!==void 0&&n.activeTriggerId===i&&n.open),isMountedByTrigger:ge((n,i)=>i!==void 0&&n.activeTriggerId===i&&n.mounted),triggerProps:ge((n,i)=>i?n.activeTriggerProps:n.inactiveTriggerProps),popupProps:ge(n=>n.popupProps),popupElement:ge(n=>n.popupElement),positionerElement:ge(n=>n.positionerElement)};function Pp(n){const{open:i=!1,onOpenChange:r,elements:a={}}=n,c=Gu(),f=Sd()!=null,d=hl(()=>new Bp({open:i,onOpenChange:r,referenceElement:a.reference??null,floatingElement:a.floating??null,triggerElements:a.triggers??new qp,floatingId:c,nested:f,noEmit:n.noEmit||!1})).current;return ke(()=>{const h={open:i,floatingId:c};a.reference!==void 0&&(h.referenceElement=a.reference,h.domReferenceElement=Vt(a.reference)?a.reference:null),a.floating!==void 0&&(h.floatingElement=a.floating),d.update(h)},[i,c,a.reference,a.floating,d]),d.context.onOpenChange=r,d.context.nested=f,d.context.noEmit=n.noEmit||!1,d}function NM(n={}){const{nodeId:i,externalTree:r}=n,a=Pp(n),c=n.rootContext||a,f={reference:c.useState("referenceElement"),floating:c.useState("floatingElement"),domReference:c.useState("domReferenceElement")},[d,h]=x.useState(null),m=x.useRef(null),g=Ed(r);ke(()=>{f.domReference&&(m.current=f.domReference)},[f.domReference]);const v=mM({...n,elements:{...f,...d&&{reference:d}}}),b=x.useCallback(_=>{const M=Vt(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),getClientRects:()=>_.getClientRects(),contextElement:_}:_;h(M),v.refs.setReference(M)},[v.refs]),[S,T]=x.useState(null),[C,w]=x.useState(null);c.useSyncedValue("referenceElement",S),c.useSyncedValue("domReferenceElement",Vt(S)?S:null),c.useSyncedValue("floatingElement",C);const j=x.useCallback(_=>{(Vt(_)||_===null)&&(m.current=_,T(_)),(Vt(v.refs.reference.current)||v.refs.reference.current===null||_!==null&&!Vt(_))&&v.refs.setReference(_)},[v.refs,T]),O=x.useCallback(_=>{w(_),v.refs.setFloating(_)},[v.refs]),E=x.useMemo(()=>({...v.refs,setReference:j,setFloating:O,setPositionReference:b,domReference:m}),[v.refs,j,O,b]),A=x.useMemo(()=>({...v.elements,domReference:f.domReference}),[v.elements,f.domReference]),N=c.useState("open"),L=c.useState("floatingId"),D=x.useMemo(()=>({...v,dataRef:c.context.dataRef,open:N,onOpenChange:c.setOpen,events:c.context.events,floatingId:L,refs:E,elements:A,nodeId:i,rootStore:c}),[v,E,A,i,c,N,L]);return ke(()=>{c.context.dataRef.current.floatingContext=D;const _=g==null?void 0:g.nodesRef.current.find(M=>M.id===i);_&&(_.context=D)}),x.useMemo(()=>({...v,context:D,refs:E,elements:A,rootStore:c}),[v,E,A,D,c])}function MM(n){const{popupStore:i,noEmit:r=!1,treatPopupAsFloatingElement:a=!1,onOpenChange:c}=n,f=Gu(),d=Sd()!=null,h=i.useState("open"),m=i.useState("activeTriggerElement"),g=i.useState(a?"popupElement":"positionerElement"),v=i.context.triggerElements,b=hl(()=>new Bp({open:h,referenceElement:m,floatingElement:g,triggerElements:v,onOpenChange:c,floatingId:f,nested:d,noEmit:r})).current;return ke(()=>{const S={open:h,floatingId:f,referenceElement:m,floatingElement:g};Vt(m)&&(S.domReferenceElement=m),b.update(S)},[h,f,m,g,b]),b.context.onOpenChange=c,b.context.nested=d,b.context.noEmit=r,b}function Gp(n=[]){const i=n.map(g=>g==null?void 0:g.reference),r=n.map(g=>g==null?void 0:g.floating),a=n.map(g=>g==null?void 0:g.item),c=n.map(g=>g==null?void 0:g.trigger),f=x.useCallback(g=>kf(g,n,"reference"),i),d=x.useCallback(g=>kf(g,n,"floating"),r),h=x.useCallback(g=>kf(g,n,"item"),a),m=x.useCallback(g=>kf(g,n,"trigger"),c);return x.useMemo(()=>({getReferenceProps:f,getFloatingProps:d,getItemProps:h,getTriggerProps:m}),[f,d,h,m])}function kf(n,i,r){var d;const a=new Map,c=r==="item",f={};r==="floating"&&(f.tabIndex=-1,f[Zg]="");for(const h in n)c&&n&&(h===CE||h===TE)||(f[h]=n[h]);for(let h=0;h<i.length;h+=1){let m;const g=(d=i[h])==null?void 0:d[r];typeof g=="function"?m=n?g(n):null:m=g,m&&cS(f,m,c,a)}return cS(f,n,c,a),f}function cS(n,i,r,a){var c;for(const f in i){const d=i[f];r&&(f===CE||f===TE)||(f.startsWith("on")?(a.has(f)||a.set(f,[]),typeof d=="function"&&((c=a.get(f))==null||c.push(d),n[f]=(...h)=>{var m;return(m=a.get(f))==null?void 0:m.map(g=>g(...h)).find(g=>g!==void 0)})):n[f]=d)}}const zM="Escape";function Cd(n,i,r){switch(n){case"vertical":return i;case"horizontal":return r;default:return i||r}}function Lf(n,i){return Cd(i,n===Mp||n===Ku,n===Gs||n===Ys)}function Rg(n,i,r){return Cd(i,n===Ku,r?n===Gs:n===Ys)||n==="Enter"||n===" "||n===""}function DM(n,i,r){return Cd(i,r?n===Gs:n===Ys,n===Ku)}function _M(n,i,r,a){const c=r?n===Ys:n===Gs,f=n===Mp;return i==="both"||i==="horizontal"&&a&&a>1?n===zM:Cd(i,c,f)}function iR(n,i){const r="rootStore"in n?n.rootStore:n,a=r.useState("open"),c=r.useState("floatingElement"),f=r.useState("domReferenceElement"),d=r.context.dataRef,{listRef:h,activeIndex:m,onNavigate:g=()=>{},enabled:v=!0,selectedIndex:b=null,allowEscape:S=!1,loopFocus:T=!1,nested:C=!1,rtl:w=!1,virtual:j=!1,focusItemOnOpen:O="auto",focusItemOnHover:E=!0,openOnArrowKeyDown:A=!0,disabledIndices:N=void 0,orientation:L="vertical",parentOrientation:D,cols:_=1,scrollItemIntoView:M=!0,itemSizes:Q,dense:J=!1,id:se,resetOnPointerLeave:te=!0,externalTree:$}=i,oe=_u(c),V=On(oe),H=Sd(),ne=Ed($);ke(()=>{d.current.orientation=L},[d,L]);const F=Jg(f),re=x.useRef(O),K=x.useRef(b??-1),Re=x.useRef(null),Ye=x.useRef(!0),Oe=_e(ve=>{g(K.current===-1?null:K.current,ve)}),z=x.useRef(Oe),B=x.useRef(!!c),W=x.useRef(a),ie=x.useRef(!1),ue=x.useRef(!1),me=On(N),ae=On(a),q=On(M),le=On(b),pe=On(te),Ke=_e(()=>{function ve($e){j?ne==null||ne.events.emit("virtualfocus",$e):Qf($e,{sync:ie.current,preventScroll:!0})}const we=h.current[K.current],xe=ue.current;we&&ve(we),(ie.current?$e=>$e():requestAnimationFrame)(()=>{var lt;const $e=h.current[K.current]||we;if(!$e)return;we||ve($e);const Ve=q.current;Ve&&he&&(xe||!Ye.current)&&((lt=$e.scrollIntoView)==null||lt.call($e,typeof Ve=="boolean"?{block:"nearest",inline:"nearest"}:Ve))})});ke(()=>{v&&(a&&c?(K.current=b??-1,re.current&&b!=null&&(ue.current=!0,Oe())):B.current&&(K.current=-1,z.current()))},[v,a,c,b,Oe]),ke(()=>{if(v){if(!a){ie.current=!1;return}if(c)if(m==null){if(ie.current=!1,le.current!=null)return;if(B.current&&(K.current=-1,Ke()),(!W.current||!B.current)&&re.current&&(Re.current!=null||re.current===!0&&Re.current==null)){let ve=0;const we=()=>{h.current[0]==null?(ve<2&&(ve?requestAnimationFrame:queueMicrotask)(we),ve+=1):(K.current=Re.current==null||Rg(Re.current,L,w)||C?Yf(h):Wg(h),Re.current=null,Oe())};we()}}else Fa(h,m)||(K.current=m,Ke(),ue.current=!1)}},[v,a,c,m,le,C,h,L,w,Oe,Ke,me]),ke(()=>{var $e,Ve;if(!v||c||!ne||j||!B.current)return;const ve=ne.nodesRef.current,we=(Ve=($e=ve.find(Ze=>Ze.id===H))==null?void 0:$e.context)==null?void 0:Ve.elements.floating,xe=zs(nl(c)),Xe=ve.some(Ze=>Ze.context&&Rt(Ze.context.elements.floating,xe));we&&!Xe&&Ye.current&&we.focus({preventScroll:!0})},[v,c,ne,H,j]),ke(()=>{z.current=Oe,W.current=a,B.current=!!c}),ke(()=>{a||(Re.current=null,re.current=O)},[a,O]);const Se=m!=null,he=x.useMemo(()=>{function ve(xe){if(!ae.current)return;const Xe=h.current.indexOf(xe.currentTarget);Xe!==-1&&K.current!==Xe&&(K.current=Xe,Oe(xe))}return{onFocus(xe){ie.current=!0,ve(xe)},onClick:({currentTarget:xe})=>xe.focus({preventScroll:!0}),onMouseMove(xe){ie.current=!0,ue.current=!1,E&&ve(xe)},onPointerLeave(xe){var $e;if(!ae.current||!Ye.current||xe.pointerType==="touch")return;ie.current=!0;const Xe=xe.relatedTarget;!E||h.current.includes(Xe)||pe.current&&(K.current=-1,Oe(xe),j||($e=V.current)==null||$e.focus({preventScroll:!0}))}}},[ae,V,E,h,Oe,pe,j]),ye=x.useCallback(()=>{var ve,we,xe;return D??((xe=(we=(ve=ne==null?void 0:ne.nodesRef.current.find(Xe=>Xe.id===H))==null?void 0:ve.context)==null?void 0:we.dataRef)==null?void 0:xe.current.orientation)},[H,ne,D]),de=_e(ve=>{if(Ye.current=!1,ie.current=!0,ve.which===229||!ae.current&&ve.currentTarget===V.current)return;if(C&&_M(ve.key,L,w,_)){Lf(ve.key,ye())||rn(ve),r.setOpen(!1,We(Gf,ve.nativeEvent)),dn(f)&&(j?ne==null||ne.events.emit("virtualfocus",f):f.focus());return}const we=K.current,xe=Yf(h,N),Xe=Wg(h,N);if(F||(ve.key==="Home"&&(rn(ve),K.current=xe,Oe(ve)),ve.key==="End"&&(rn(ve),K.current=Xe,Oe(ve))),_>1){const $e=Q||Array.from({length:h.current.length},()=>({width:1,height:1})),Ve=_E($e,_,J),Ze=Ve.findIndex(qt=>qt!=null&&!Qs(h,qt,N)),lt=Ve.reduce((qt,gt,Fe)=>gt!=null&&!Qs(h,gt,N)?Fe:qt,-1),St=Ve[DE({current:Ve.map(qt=>qt!=null?h.current[qt]:null)},{event:ve,orientation:L,loopFocus:T,rtl:w,cols:_,disabledIndices:LE([...(typeof N!="function"?N:null)||h.current.map((qt,gt)=>Qs(h,gt,N)?gt:void 0),void 0],Ve),minIndex:Ze,maxIndex:lt,prevIndex:kE(K.current>Xe?xe:K.current,$e,Ve,_,ve.key===Ku?"bl":ve.key===(w?Gs:Ys)?"tr":"tl"),stopEvent:!0})];if(St!=null&&(K.current=St,Oe(ve)),L==="both")return}if(Lf(ve.key,L)){if(rn(ve),a&&!j&&zs(ve.currentTarget.ownerDocument)===ve.currentTarget){K.current=Rg(ve.key,L,w)?xe:Xe,Oe(ve);return}Rg(ve.key,L,w)?T?we>=Xe?S&&we!==h.current.length?K.current=-1:(ie.current=!1,K.current=xe):K.current=Ln(h,{startingIndex:we,disabledIndices:N}):K.current=Math.min(Xe,Ln(h,{startingIndex:we,disabledIndices:N})):T?we<=xe?S&&we!==-1?K.current=h.current.length:(ie.current=!1,K.current=Xe):K.current=Ln(h,{startingIndex:we,decrement:!0,disabledIndices:N}):K.current=Math.max(xe,Ln(h,{startingIndex:we,decrement:!0,disabledIndices:N})),Fa(h,K.current)&&(K.current=-1),Oe(ve)}}),Ce=x.useMemo(()=>j&&a&&Se&&{"aria-activedescendant":`${se}-${m}`},[j,a,Se,se,m]),He=x.useMemo(()=>({"aria-orientation":L==="both"?void 0:L,...F?{}:Ce,onKeyDown(ve){if(ve.key==="Tab"&&ve.shiftKey&&a&&!j){const we=Pn(ve.nativeEvent);if(we&&!Rt(V.current,we))return;rn(ve),r.setOpen(!1,We(bd,ve.nativeEvent)),dn(f)&&f.focus();return}de(ve)},onPointerMove(){Ye.current=!0}}),[Ce,de,V,L,F,r,a,j,f]),je=x.useMemo(()=>{function ve(xe){O==="auto"&&jE(xe.nativeEvent)&&(re.current=!j)}function we(xe){re.current=O,O==="auto"&&AE(xe.nativeEvent)&&(re.current=!0)}return{onKeyDown(xe){const Xe=r.select("open");Ye.current=!1;const $e=xe.key.startsWith("Arrow"),Ve=DM(xe.key,ye(),w),Ze=Lf(xe.key,L),lt=(C?Ve:Ze)||xe.key==="Enter"||xe.key.trim()==="";if(j&&Xe)return de(xe);if(!(!Xe&&!A&&$e)){if(lt){const St=Lf(xe.key,ye());Re.current=C&&St?null:xe.key}if(C){Ve&&(rn(xe),Xe?(K.current=Yf(h,me.current),Oe(xe)):r.setOpen(!0,We(Gf,xe.nativeEvent,xe.currentTarget)));return}Ze&&(le.current!=null&&(K.current=le.current),rn(xe),!Xe&&A?r.setOpen(!0,We(Gf,xe.nativeEvent,xe.currentTarget)):de(xe),Xe&&Oe(xe))}},onFocus(xe){r.select("open")&&!j&&(K.current=-1,Oe(xe))},onPointerDown:we,onPointerEnter:we,onMouseDown:ve,onClick:ve}},[de,me,O,h,C,Oe,r,A,L,ye,w,le,j]),Ee=x.useMemo(()=>({...Ce,...je}),[Ce,je]);return x.useMemo(()=>v?{reference:Ee,floating:He,item:he,trigger:je}:{},[v,Ee,He,je,he])}const kM=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function LM(n,i={}){const r="rootStore"in n?n.rootStore:n,a=r.useState("open"),c=r.useState("floatingId"),f=r.useState("domReferenceElement"),d=r.useState("floatingElement"),{enabled:h=!0,role:m="dialog"}=i,g=Gu(),v=(f==null?void 0:f.id)||g,b=x.useMemo(()=>{var A;return((A=_u(d))==null?void 0:A.id)||c},[d,c]),S=kM.get(m)??m,C=Sd()!=null,w=x.useMemo(()=>S==="tooltip"||m==="label"?fn:{"aria-haspopup":S==="alertdialog"?"dialog":S,"aria-expanded":"false",...S==="listbox"&&{role:"combobox"},...S==="menu"&&C&&{role:"menuitem"},...m==="select"&&{"aria-autocomplete":"none"},...m==="combobox"&&{"aria-autocomplete":"list"}},[S,C,m]),j=x.useMemo(()=>S==="tooltip"||m==="label"?{[`aria-${m==="label"?"labelledby":"describedby"}`]:a?b:void 0}:{...w,"aria-expanded":a?"true":"false","aria-controls":a?b:void 0,...S==="menu"&&{id:v}},[S,b,a,v,m,w]),O=x.useMemo(()=>{const A={id:b,...S&&{role:S}};return S==="tooltip"||m==="label"?A:{...A,...S==="menu"&&{"aria-labelledby":v}}},[S,b,v,m]),E=x.useCallback(({active:A,selected:N})=>{const L={role:"option",...A&&{id:`${b}-fui-option`}};switch(m){case"select":case"combobox":return{...L,"aria-selected":N}}return{}},[b,m]);return x.useMemo(()=>h?{reference:j,floating:O,item:E,trigger:w}:{},[h,j,O,w,E])}function sR(n,i){const r="rootStore"in n?n.rootStore:n,a=r.useState("open"),c=r.context.dataRef,{listRef:f,activeIndex:d,onMatch:h,onTypingChange:m,enabled:g=!0,findMatch:v=null,resetMs:b=750,ignoreKeys:S=Ul,selectedIndex:T=null}=i,C=El(),w=x.useRef(""),j=x.useRef(T??d??-1),O=x.useRef(null);ke(()=>{a&&(C.clear(),O.current=null,w.current="")},[a,C]),ke(()=>{a&&w.current===""&&(j.current=T??d??-1)},[a,T,d]);const E=_e(D=>{D?c.current.typing||(c.current.typing=D,m==null||m(D)):c.current.typing&&(c.current.typing=D,m==null||m(D))}),A=_e(D=>{function _(te,$,oe){const V=v?v($,oe):$.find(H=>(H==null?void 0:H.toLocaleLowerCase().indexOf(oe.toLocaleLowerCase()))===0);return V?te.indexOf(V):-1}const M=f.current;if(w.current.length>0&&w.current[0]!==" "&&(_(M,M,w.current)===-1?E(!1):D.key===" "&&rn(D)),M==null||S.includes(D.key)||D.key.length!==1||D.ctrlKey||D.metaKey||D.altKey)return;a&&D.key!==" "&&(rn(D),E(!0)),M.every(te=>{var $,oe;return te?(($=te[0])==null?void 0:$.toLocaleLowerCase())!==((oe=te[1])==null?void 0:oe.toLocaleLowerCase()):!0})&&w.current===D.key&&(w.current="",j.current=O.current),w.current+=D.key,C.start(b,()=>{w.current="",j.current=O.current,E(!1)});const J=j.current,se=_(M,[...M.slice((J||0)+1),...M.slice(0,(J||0)+1)],w.current);se!==-1?(h==null||h(se),O.current=se):D.key!==" "&&(w.current="",E(!1))}),N=x.useMemo(()=>({onKeyDown:A}),[A]),L=x.useMemo(()=>({onKeyDown:A,onKeyUp(D){D.key===" "&&E(!1)}}),[A,E]);return x.useMemo(()=>g?{reference:N,floating:L}:{},[g,N,L])}const rR=x.createContext(null),aR=x.createContext(null);function Ws(){const n=x.useContext(rR);if(n===null)throw new Error(Gn(60));return n}function oR(){const n=x.useContext(aR);if(n===null)throw new Error(Gn(61));return n}const uR=(n,i)=>Object.is(n,i);function Xi(n,i,r){return n==null||i==null?Object.is(n,i):r(n,i)}function jr(n,i,r){return!n||n.length===0?!1:n.some(a=>a===void 0?!1:Xi(a,i,r))}function bo(n,i,r){return!n||n.length===0?-1:n.findIndex(a=>a===void 0?!1:Xi(a,i,r))}function cR(n,i,r){return n.filter(a=>!Xi(a,i,r))}function np(n){if(n==null)return"";if(typeof n=="string")return n;try{return JSON.stringify(n)}catch{return String(n)}}function fR(n){return n!=null&&n.length>0&&typeof n[0]=="object"&&n[0]!=null&&"items"in n[0]}function vn(n,i){if(i&&n!=null)return i(n)??"";if(n&&typeof n=="object"){if("label"in n&&n.label!=null)return String(n.label);if("value"in n)return String(n.value)}return np(n)}function qr(n,i){return i&&n!=null?i(n)??"":n&&typeof n=="object"&&"value"in n&&"label"in n?np(n.value):np(n)}function UM(n,i,r){if(r&&n!=null)return r(n);if(n&&typeof n=="object"&&"label"in n&&n.label!=null)return n.label;if(i&&!Array.isArray(i))return i[n]??vn(n,r);if(Array.isArray(i)){const a=fR(i)?i.flatMap(c=>c.items):i;if(n==null){const c=a.find(f=>f.value==null);return c&&c.label!=null?c.label:vn(n,r)}if(typeof n!="object"){const c=a.find(f=>f&&f.value===n);return c&&c.label!=null?c.label:vn(n,r)}if("value"in n){const c=a.find(f=>f&&f.value===n.value);if(c&&c.label!=null)return c.label}}return vn(n,r)}function HM(n,i){return!Array.isArray(n)||n.length===0?"":n.map(r=>vn(r,i)).join(", ")}const ft={id:ge(n=>n.id),modal:ge(n=>n.modal),multiple:ge(n=>n.multiple),items:ge(n=>n.items),itemToStringLabel:ge(n=>n.itemToStringLabel),itemToStringValue:ge(n=>n.itemToStringValue),isItemEqualToValue:ge(n=>n.isItemEqualToValue),value:ge(n=>n.value),open:ge(n=>n.open),mounted:ge(n=>n.mounted),forceMount:ge(n=>n.forceMount),transitionStatus:ge(n=>n.transitionStatus),touchModality:ge(n=>n.touchModality),activeIndex:ge(n=>n.activeIndex),selectedIndex:ge(n=>n.selectedIndex),isActive:ge((n,i)=>n.activeIndex===i),isSelected:ge((n,i,r)=>{const a=n.isItemEqualToValue,c=n.value;return n.multiple?Array.isArray(c)&&c.some(f=>Xi(f,r,a)):n.selectedIndex===i&&n.selectedIndex!==null?!0:Xi(c,r,a)}),isSelectedByFocus:ge((n,i)=>n.selectedIndex===i),popupProps:ge(n=>n.popupProps),triggerProps:ge(n=>n.triggerProps),triggerElement:ge(n=>n.triggerElement),positionerElement:ge(n=>n.positionerElement),listElement:ge(n=>n.listElement),scrollUpArrowVisible:ge(n=>n.scrollUpArrowVisible),scrollDownArrowVisible:ge(n=>n.scrollDownArrowVisible),hasScrollArrows:ge(n=>n.hasScrollArrows),serializedValue:ge(n=>{const{multiple:i,value:r,itemToStringValue:a}=n;return i&&Array.isArray(r)&&r.length===0?"":qr(r,a)})};function IM(n){const{id:i,value:r,defaultValue:a=null,onValueChange:c,open:f,defaultOpen:d=!1,onOpenChange:h,name:m,disabled:g=!1,readOnly:v=!1,required:b=!1,modal:S=!0,actionsRef:T,inputRef:C,onOpenChangeComplete:w,items:j,multiple:O=!1,itemToStringLabel:E,itemToStringValue:A,isItemEqualToValue:N=uR,highlightItemOnHover:L=!0,children:D}=n,{clearErrors:_}=jp(),{setDirty:M,shouldValidateOnChange:Q,validityData:J,setFilled:se,name:te,disabled:$,validation:oe}=Eo(),{controlId:V}=Qu(),H=pE({id:i}),ne=$||g,F=te??m,[re,K]=Vr({controlled:r,default:O?a??Ul:a,name:"Select",state:"value"}),[Re,Ye]=Vr({controlled:f,default:d,name:"Select",state:"open"}),Oe=x.useRef([]),z=x.useRef([]),B=x.useRef(null),W=x.useRef(null),ie=x.useRef(0),ue=x.useRef(null),me=x.useRef([]),ae=x.useRef(!1),q=x.useRef(!1),le=x.useRef(null),pe=x.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),Ke=x.useRef(!1),{mounted:Se,setMounted:he,transitionStatus:ye}=wd(Re),de=hl(()=>new Br({id:H,modal:S,multiple:O,itemToStringLabel:E,itemToStringValue:A,isItemEqualToValue:N,value:re,open:Re,mounted:Se,transitionStatus:ye,items:j,forceMount:!1,touchModality:!1,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,Ce=be(de,ft.activeIndex),He=be(de,ft.selectedIndex),je=be(de,ft.triggerElement),Ee=be(de,ft.positionerElement),ve=x.useMemo(()=>O&&Array.isArray(re)&&re.length===0?"":qr(re,A),[O,re,A]),we=On(de.state.triggerElement);gE({id:H,commit:oe.commit,value:re,controlRef:we,name:F,getValue:()=>re});const xe=x.useRef(re);ke(()=>{re!==xe.current&&de.set("forceMount",!0)},[de,re]),ke(()=>{se(re!==null)},[re,se]),ke(function(){if(Re)return;const tt=me.current;if(O){const Pt=Array.isArray(re)?re:[];if(Pt.length===0){de.set("selectedIndex",null);return}const Gt=Pt[Pt.length-1],En=bo(tt,Gt,N);de.set("selectedIndex",En===-1?null:En);return}const Tt=bo(tt,re,N);de.set("selectedIndex",Tt===-1?null:Tt)},[O,Re,re,me,N,de]),ju(re,()=>{_(F),M(re!==J.initialValue),Q()?oe.commit(re):oe.commit(re,!0)});const Xe=_e((Be,tt)=>{if(h==null||h(Be,tt),!tt.isCanceled&&(Ye(Be),!Be&&de.state.activeIndex!==null)){const Tt=Oe.current[de.state.activeIndex];queueMicrotask(()=>{Tt==null||Tt.setAttribute("tabindex","-1")})}}),$e=_e(()=>{he(!1),de.set("activeIndex",null),w==null||w(!1)});Fr({enabled:!T,open:Re,ref:B,onComplete(){Re||$e()}}),x.useImperativeHandle(T,()=>({unmount:$e}),[$e]);const Ve=_e((Be,tt)=>{c==null||c(Be,tt),!tt.isCanceled&&K(Be)}),Ze=_e(()=>{const Be=de.state.listElement||B.current;if(!Be)return;const tt=Be.scrollTop,Tt=Be.scrollTop+Be.clientHeight,Pt=tt>1,Gt=Tt<Be.scrollHeight-1;de.state.scrollUpArrowVisible!==Pt&&de.set("scrollUpArrowVisible",Pt),de.state.scrollDownArrowVisible!==Gt&&de.set("scrollDownArrowVisible",Gt)}),lt=Pp({open:Re,onOpenChange:Xe,elements:{reference:je,floating:Ee}}),St=Hp(lt,{enabled:!v&&!ne,event:"mousedown"}),qt=Vp(lt,{bubbles:!1}),gt=iR(lt,{enabled:!v&&!ne,listRef:Oe,activeIndex:Ce,selectedIndex:He,disabledIndices:Ul,onNavigate(Be){Be===null&&!Re||de.set("activeIndex",Be)},focusItemOnHover:!1}),Fe=sR(lt,{enabled:!v&&!ne&&(Re||!O),listRef:z,activeIndex:Ce,selectedIndex:He,onMatch(Be){Re?de.set("activeIndex",Be):Ve(me.current[Be],We("none"))},onTypingChange(Be){ae.current=Be}}),{getReferenceProps:mn,getFloatingProps:Sn,getItemProps:wl}=Gp([St,qt,gt,Fe]);vE(()=>{de.update({popupProps:Sn(),triggerProps:mn()})}),ke(()=>{de.update({id:H,modal:S,multiple:O,value:re,open:Re,mounted:Se,transitionStatus:ye,popupProps:Sn(),triggerProps:mn(),items:j,itemToStringLabel:E,itemToStringValue:A,isItemEqualToValue:N})},[de,H,S,O,re,Re,Se,ye,Sn,mn,j,E,A,N]);const tn=x.useMemo(()=>({store:de,name:F,required:b,disabled:ne,readOnly:v,multiple:O,itemToStringLabel:E,itemToStringValue:A,highlightItemOnHover:L,setValue:Ve,setOpen:Xe,listRef:Oe,popupRef:B,scrollHandlerRef:W,handleScrollArrowVisibility:Ze,scrollArrowsMountedCountRef:ie,getItemProps:wl,events:lt.context.events,valueRef:ue,valuesRef:me,labelsRef:z,typingRef:ae,selectionRef:pe,selectedItemTextRef:le,validation:oe,onOpenChangeComplete:w,keyboardActiveRef:q,alignItemWithTriggerActiveRef:Ke,initialValueRef:xe}),[de,F,b,ne,v,O,E,A,L,Ve,Xe,wl,lt.context.events,oe,w,Ze]),it=Yi(C,oe.inputRef),st=O&&Array.isArray(re)&&re.length>0,gn=x.useMemo(()=>!O||!Array.isArray(re)||!F?null:re.map(Be=>{const tt=qr(Be,A);return p.jsx("input",{type:"hidden",name:F,value:tt},tt)}),[O,re,F,A]);return p.jsx(rR.Provider,{value:tn,children:p.jsxs(aR.Provider,{value:lt,children:[D,p.jsx("input",{...oe.getInputValidationProps({onFocus(){var Be;(Be=de.state.triggerElement)==null||Be.focus()},onChange(Be){if(Be.nativeEvent.defaultPrevented)return;const tt=Be.target.value,Tt=We(dl,Be.nativeEvent);function Pt(){if(O)return;const Gt=me.current.find(En=>qr(En,A).toLowerCase()===tt.toLowerCase());Gt!=null&&(M(Gt!==J.initialValue),Ve(Gt,Tt),Q()&&oe.commit(Gt))}de.set("forceMount",!0),queueMicrotask(Pt)}}),id:i||V||void 0,name:O?void 0:F,value:ve,disabled:ne,required:b&&!st,readOnly:v,ref:it,style:dd,tabIndex:-1,"aria-hidden":!0}),gn]})})}let ad=(function(n){return n.startingStyle="data-starting-style",n.endingStyle="data-ending-style",n})({});const VM={[ad.startingStyle]:""},BM={[ad.endingStyle]:""},Xu={transitionStatus(n){return n==="starting"?VM:n==="ending"?BM:null}};let Ar=(function(n){return n.open="data-open",n.closed="data-closed",n[n.startingStyle=ad.startingStyle]="startingStyle",n[n.endingStyle=ad.endingStyle]="endingStyle",n.anchorHidden="data-anchor-hidden",n})({}),lp=(function(n){return n.popupOpen="data-popup-open",n.pressed="data-pressed",n})({});const qM={[lp.popupOpen]:""},PM={[lp.popupOpen]:"",[lp.pressed]:""},GM={[Ar.open]:""},YM={[Ar.closed]:""},QM={[Ar.anchorHidden]:""},KM={open(n){return n?qM:null}},Yp={open(n){return n?PM:null}},Ro={open(n){return n?GM:YM},anchorHidden(n){return n?QM:null}};function dR(n){const i=n.getBoundingClientRect(),r=window.getComputedStyle(n,"::before"),a=window.getComputedStyle(n,"::after");if(!(r.content!=="none"||a.content!=="none"))return i;const f=parseFloat(r.width)||0,d=parseFloat(r.height)||0,h=parseFloat(a.width)||0,m=parseFloat(a.height)||0,g=Math.max(i.width,f,h),v=Math.max(i.height,d,m),b=g-i.width,S=v-i.height;return{left:i.left-b/2,right:i.right+b/2,top:i.top-S/2,bottom:i.bottom+S/2}}const Uf=2,FM={...Yp,...Op,value:()=>null},XM=x.forwardRef(function(i,r){const{render:a,className:c,disabled:f=!1,nativeButton:d=!0,...h}=i,{setTouched:m,setFocused:g,validationMode:v,state:b,disabled:S}=Eo(),{labelId:T}=Qu(),{store:C,setOpen:w,selectionRef:j,validation:O,readOnly:E,alignItemWithTriggerActiveRef:A,disabled:N,keyboardActiveRef:L}=Ws(),D=S||N||f,_=be(C,ft.open),M=be(C,ft.value),Q=be(C,ft.triggerProps),J=be(C,ft.positionerElement),se=be(C,ft.listElement),te=be(C,ft.serializedValue),$=On(J),oe=x.useRef(null),V=El(),H=El(),{getButtonProps:ne,buttonRef:F}=Yu({disabled:D,native:d}),re=_e(W=>{C.set("triggerElement",W)}),K=Yi(r,oe,F,re),Re=El(),Ye=El();x.useEffect(()=>{if(_)return Ye.start(200,()=>{j.current.allowUnselectedMouseUp=!0,Re.start(200,()=>{j.current.allowSelectedMouseUp=!0})}),()=>{Re.clear(),Ye.clear()};j.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},H.clear()},[_,j,H,Re,Ye]);const Oe=x.useMemo(()=>{var W;return(se==null?void 0:se.id)??((W=_u(J))==null?void 0:W.id)},[se,J]),z=wp(Q,{role:"combobox","aria-expanded":_?"true":"false","aria-haspopup":"listbox","aria-controls":_?Oe:void 0,"aria-labelledby":T,"aria-readonly":E||void 0,tabIndex:D?-1:0,ref:K,onFocus(W){g(!0),_&&A.current&&w(!1,We(bd,W.nativeEvent)),V.start(0,()=>{C.set("forceMount",!0)})},onBlur(){m(!0),g(!1),v==="onBlur"&&O.commit(M)},onPointerMove({pointerType:W}){L.current=!1,C.set("touchModality",W==="touch")},onPointerDown({pointerType:W}){C.set("touchModality",W==="touch")},onKeyDown(){L.current=!0},onMouseDown(W){if(_)return;const ie=Fi(W.currentTarget);function ue(me){if(!oe.current)return;const ae=me.target;if(Rt(oe.current,ae)||Rt($.current,ae)||ae===oe.current)return;const q=dR(oe.current);me.clientX>=q.left-Uf&&me.clientX<=q.right+Uf&&me.clientY>=q.top-Uf&&me.clientY<=q.bottom+Uf||w(!1,We(g2,me))}H.start(0,()=>{ie.addEventListener("mouseup",ue,{once:!0})})}},O.getValidationProps,h,ne);z.role="combobox";const B=x.useMemo(()=>({...b,open:_,disabled:D,value:M,readOnly:E,placeholder:!te}),[b,_,D,M,E,te]);return Bt("button",i,{ref:[r,oe],state:B,stateAttributesMapping:FM,props:z})}),ZM={value:()=>null},JM=x.forwardRef(function(i,r){const{className:a,render:c,children:f,...d}=i,{store:h,valueRef:m}=Ws(),g=be(h,ft.value),v=be(h,ft.items),b=be(h,ft.itemToStringLabel),S=be(h,ft.serializedValue),T=x.useMemo(()=>({value:g,placeholder:!S}),[g,S]),C=typeof f=="function"?f(g):f??(Array.isArray(g)?HM(g,b):UM(g,v,b));return Bt("span",i,{state:T,ref:[r,m],props:[{children:C},d],stateAttributesMapping:ZM})}),$M=x.forwardRef(function(i,r){const{className:a,render:c,...f}=i,{store:d}=Ws(),h=be(d,ft.open),m=x.useMemo(()=>({open:h}),[h]);return Bt("span",i,{state:m,ref:r,props:[{"aria-hidden":!0,children:"▼"},f],stateAttributesMapping:KM})}),WM=x.createContext(void 0),e3=x.forwardRef(function(i,r){const{store:a}=Ws(),c=be(a,ft.mounted),f=be(a,ft.forceMount);return c||f?p.jsx(WM.Provider,{value:!0,children:p.jsx(kp,{ref:r,...i})}):null});function Qp(n){return Rp(19)?n:n?"true":void 0}let fS={},dS={},hS="";function t3(n){if(typeof document>"u")return!1;const i=Fi(n);return hn(i).innerWidth-i.documentElement.clientWidth>0}function n3(n){const i=Fi(n),r=i.documentElement,a=i.body,c=So(r)?r:a,f=c.style.overflow;return c.style.overflow="hidden",()=>{c.style.overflow=f}}function l3(n){var S,T;const i=Fi(n),r=i.documentElement,a=i.body,c=hn(r);let f=0,d=0;const h=gi.create(),m=typeof CSS<"u"&&((S=CSS.supports)==null?void 0:S.call(CSS,"scrollbar-gutter","stable"));if(wE&&(((T=c.visualViewport)==null?void 0:T.scale)??1)!==1)return()=>{};function g(){const C=c.getComputedStyle(r),w=c.getComputedStyle(a),E=(C.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";f=r.scrollTop,d=r.scrollLeft,fS={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY,overflowX:r.style.overflowX},hS=r.style.scrollBehavior,dS={position:a.style.position,height:a.style.height,width:a.style.width,boxSizing:a.style.boxSizing,overflowY:a.style.overflowY,overflowX:a.style.overflowX,scrollBehavior:a.style.scrollBehavior};const A=r.scrollHeight>r.clientHeight,N=r.scrollWidth>r.clientWidth,L=C.overflowY==="scroll"||w.overflowY==="scroll",D=C.overflowX==="scroll"||w.overflowX==="scroll",_=Math.max(0,c.innerWidth-r.clientWidth),M=Math.max(0,c.innerHeight-r.clientHeight),Q=parseFloat(w.marginTop)+parseFloat(w.marginBottom),J=parseFloat(w.marginLeft)+parseFloat(w.marginRight),se=So(r)?r:a;if(m){r.style.scrollbarGutter=E,se.style.overflowY="hidden",se.style.overflowX="hidden";return}Object.assign(r.style,{scrollbarGutter:E,overflowY:"hidden",overflowX:"hidden"}),(A||L)&&(r.style.overflowY="scroll"),(N||D)&&(r.style.overflowX="scroll"),Object.assign(a.style,{position:"relative",height:Q||M?`calc(100dvh - ${Q+M}px)`:"100dvh",width:J||_?`calc(100vw - ${J+_}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),a.scrollTop=f,a.scrollLeft=d,r.setAttribute("data-base-ui-scroll-locked",""),r.style.scrollBehavior="unset"}function v(){Object.assign(r.style,fS),Object.assign(a.style,dS),m||(r.scrollTop=f,r.scrollLeft=d,r.removeAttribute("data-base-ui-scroll-locked"),r.style.scrollBehavior=hS)}function b(){v(),h.request(g)}return g(),c.addEventListener("resize",b),()=>{h.cancel(),v(),typeof c.removeEventListener=="function"&&c.removeEventListener("resize",b)}}class i3{constructor(){Nt(this,"lockCount",0);Nt(this,"restore",null);Nt(this,"timeoutLock",go.create());Nt(this,"timeoutUnlock",go.create());Nt(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});Nt(this,"unlock",()=>{var i;this.lockCount===0&&this.restore&&((i=this.restore)==null||i.call(this),this.restore=null)})}acquire(i){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(i)),this.release}lock(i){if(this.lockCount===0||this.restore!==null)return;const a=Fi(i).documentElement,c=hn(a).getComputedStyle(a).overflowY;if(c==="hidden"||c==="clip"){this.restore=en;return}const f=q2||!t3(i);this.restore=f?n3(i):l3(i)}}const s3=new i3;function Kp(n=!0,i=null){ke(()=>{if(n)return s3.acquire(i)},[n,i])}const hR=x.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function r3(){return x.useContext(hR)}function Fp(n){const{children:i,elementsRef:r,labelsRef:a,onMapChange:c}=n,f=_e(c),d=x.useRef(0),h=hl(o3).current,m=hl(a3).current,[g,v]=x.useState(0),b=x.useRef(g),S=_e((O,E)=>{m.set(O,E??null),b.current+=1,v(b.current)}),T=_e(O=>{m.delete(O),b.current+=1,v(b.current)}),C=x.useMemo(()=>{const O=new Map;return Array.from(m.keys()).filter(A=>A.isConnected).sort(u3).forEach((A,N)=>{const L=m.get(A)??{};O.set(A,{...L,index:N})}),O},[m,g]);ke(()=>{if(typeof MutationObserver!="function"||C.size===0)return;const O=new MutationObserver(E=>{const A=new Set,N=L=>A.has(L)?A.delete(L):A.add(L);E.forEach(L=>{L.removedNodes.forEach(N),L.addedNodes.forEach(N)}),A.size===0&&(b.current+=1,v(b.current))});return C.forEach((E,A)=>{A.parentElement&&O.observe(A.parentElement,{childList:!0})}),()=>{O.disconnect()}},[C]),ke(()=>{b.current===g&&(r.current.length!==C.size&&(r.current.length=C.size),a&&a.current.length!==C.size&&(a.current.length=C.size),d.current=C.size),f(C)},[f,C,r,a,g]),ke(()=>()=>{r.current=[]},[r]),ke(()=>()=>{a&&(a.current=[])},[a]);const w=_e(O=>(h.add(O),()=>{h.delete(O)}));ke(()=>{h.forEach(O=>O(C))},[h,C]);const j=x.useMemo(()=>({register:S,unregister:T,subscribeMapChange:w,elementsRef:r,labelsRef:a,nextIndexRef:d}),[S,T,w,r,a,d]);return p.jsx(hR.Provider,{value:j,children:i})}function a3(){return new Map}function o3(){return new Set}function u3(n,i){const r=n.compareDocumentPosition(i);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}const c3=x.createContext(void 0);function Xp(){const n=x.useContext(c3);return(n==null?void 0:n.direction)??"ltr"}const f3=n=>({name:"arrow",options:n,async fn(i){var re,K;const{x:r,y:a,placement:c,rects:f,platform:d,elements:h,middlewareData:m}=i,{element:g,padding:v=0,offsetParent:b="real"}=Ki(n,i)||{};if(g==null)return{};const S=zE(v),T={x:r,y:a},C=_p(c),w=Dp(C),j=await d.getDimensions(g),O=C==="y",E=O?"top":"left",A=O?"bottom":"right",N=O?"clientHeight":"clientWidth",L=f.reference[w]+f.reference[C]-T[C]-f.floating[w],D=T[C]-f.reference[C],_=b==="real"?await((re=d.getOffsetParent)==null?void 0:re.call(d,g)):h.floating;let M=h.floating[N]||f.floating[w];(!M||!await((K=d.isElement)==null?void 0:K.call(d,_)))&&(M=h.floating[N]||f.floating[w]);const Q=L/2-D/2,J=M/2-j[w]/2-1,se=Math.min(S[E],J),te=Math.min(S[A],J),$=se,oe=M-j[w]-te,V=M/2-j[w]/2+Q,H=ME($,V,oe),ne=!m.arrow&&$s(c)!=null&&V!==H&&f.reference[w]/2-(V<$?se:te)-j[w]/2<0,F=ne?V<$?V-$:V-oe:0;return{[C]:T[C]+F,data:{[C]:H,centerOffset:V-H-F,...ne&&{alignmentOffset:F}},reset:ne}}}),d3=(n,i)=>({...f3(n),options:[n,i]}),h3={name:"hide",async fn(n){var h;const{width:i,height:r,x:a,y:c}=n.rects.reference,f=i===0&&r===0&&a===0&&c===0;return{data:{referenceHidden:((h=(await xM().fn(n)).data)==null?void 0:h.referenceHidden)||f}}}},m3={sideX:"left",sideY:"top"};function mR(n,i,r){const a=n==="inline-start"||n==="inline-end";return{top:"top",right:a?r?"inline-start":"inline-end":"right",bottom:"bottom",left:a?r?"inline-end":"inline-start":"left"}[i]}function mS(n,i,r){const{rects:a,placement:c}=n;return{side:mR(i,Il(c),r),align:$s(c)||"center",anchor:{width:a.reference.width,height:a.reference.height},positioner:{width:a.floating.width,height:a.floating.height}}}function gR(n){var wl,tn;const{anchor:i,positionMethod:r="absolute",side:a="bottom",sideOffset:c=0,align:f="center",alignOffset:d=0,collisionBoundary:h,collisionPadding:m=5,sticky:g=!1,arrowPadding:v=5,disableAnchorTracking:b=!1,keepMounted:S=!1,floatingRootContext:T,mounted:C,collisionAvoidance:w,shiftCrossAxis:j=!1,nodeId:O,adaptiveOrigin:E,lazyFlip:A=!1,externalTree:N}=n,[L,D]=x.useState(null);!C&&L!==null&&D(null);const _=w.side||"flip",M=w.align||"flip",Q=w.fallbackAxisSide||"end",J=typeof i=="function"?i:void 0,se=_e(J),te=J?se:i,$=On(i),V=Xp()==="rtl",H=L||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":V?"left":"right","inline-start":V?"right":"left"}[a],ne=f==="center"?H:`${H}-${f}`;let F=m;const re=1,K=a==="bottom"?re:0,Re=a==="top"?re:0,Ye=a==="right"?re:0,Oe=a==="left"?re:0;typeof F=="number"?F={top:F+K,right:F+Oe,bottom:F+Re,left:F+Ye}:F&&(F={top:(F.top||0)+K,right:(F.right||0)+Oe,bottom:(F.bottom||0)+Re,left:(F.left||0)+Ye});const z={boundary:h==="clipping-ancestors"?"clippingAncestors":h,padding:F},B=x.useRef(null),W=On(c),ie=On(d),ae=[gM(it=>{const st=mS(it,a,V),gn=typeof W.current=="function"?W.current(st):W.current,Be=typeof ie.current=="function"?ie.current(st):ie.current;return{mainAxis:gn,crossAxis:Be,alignmentAxis:Be}},[typeof c!="function"?c:0,typeof d!="function"?d:0,V,a])],q=M==="none"&&_!=="shift",le=!q&&(g||j||_==="shift"),pe=_==="none"?null:bM({...z,padding:{top:F.top+re,right:F.right+re,bottom:F.bottom+re,left:F.left+re},mainAxis:!j&&_==="flip",crossAxis:M==="flip"?"alignment":!1,fallbackAxisSideDirection:Q}),Ke=q?null:pM(it=>{const st=Fi(it.elements.floating).documentElement;return{...z,rootBoundary:j?{x:0,y:0,width:st.clientWidth,height:st.clientHeight}:void 0,mainAxis:M!=="none",crossAxis:le,limiter:g||j?void 0:yM(gn=>{if(!B.current)return{};const{width:Be,height:tt}=B.current.getBoundingClientRect(),Tt=Hl(Il(gn.placement)),Pt=Tt==="y"?Be:tt,Gt=Tt==="y"?F.left+F.right:F.top+F.bottom;return{offset:Pt/2+Gt/2}})}},[z,g,j,F,M]);_==="shift"||M==="shift"||f==="center"?ae.push(Ke,pe):ae.push(pe,Ke),ae.push(vM({...z,apply({elements:{floating:it},rects:{reference:st},availableWidth:gn,availableHeight:Be}){Object.entries({"--available-width":`${gn}px`,"--available-height":`${Be}px`,"--anchor-width":`${st.width}px`,"--anchor-height":`${st.height}px`}).forEach(([tt,Tt])=>{it.style.setProperty(tt,Tt)})}}),d3(()=>({element:B.current||document.createElement("div"),padding:v,offsetParent:"floating"}),[v]),{name:"transformOrigin",fn(it){var sl,Yn,Tl;const{elements:st,middlewareData:gn,placement:Be,rects:tt,y:Tt}=it,Pt=Il(Be),Gt=Hl(Pt),En=B.current,pn=((sl=gn.arrow)==null?void 0:sl.x)||0,Yt=((Yn=gn.arrow)==null?void 0:Yn.y)||0,Zt=(En==null?void 0:En.clientWidth)||0,Qe=(En==null?void 0:En.clientHeight)||0,Bl=pn+Zt/2,Wi=Yt+Qe/2,vi=Math.abs(((Tl=gn.shift)==null?void 0:Tl.y)||0),ql=tt.reference.height/2,Cl=typeof c=="function"?c(mS(it,a,V)):c,Pl=vi>Cl,Hn={top:`${Bl}px calc(100% + ${Cl}px)`,bottom:`${Bl}px ${-Cl}px`,left:`calc(100% + ${Cl}px) ${Wi}px`,right:`${-Cl}px ${Wi}px`}[Pt],il=`${Bl}px ${tt.reference.y+ql-Tt}px`;return st.floating.style.setProperty("--transform-origin",le&&Gt==="y"&&Pl?il:Hn),{}}},h3,E),ke(()=>{!C&&T&&T.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[C,T]);const Se=x.useMemo(()=>({elementResize:!b&&typeof ResizeObserver<"u",layoutShift:!b&&typeof IntersectionObserver<"u"}),[b]),{refs:he,elements:ye,x:de,y:Ce,middlewareData:He,update:je,placement:Ee,context:ve,isPositioned:we,floatingStyles:xe}=NM({rootContext:T,placement:ne,middleware:ae,strategy:r,whileElementsMounted:S?void 0:(...it)=>oS(...it,Se),nodeId:O,externalTree:N}),{sideX:Xe,sideY:$e}=He.adaptiveOrigin||m3,Ve=we?r:"fixed",Ze=x.useMemo(()=>E?{position:Ve,[Xe]:de,[$e]:Ce}:{position:Ve,...xe},[E,Ve,Xe,de,$e,Ce,xe]),lt=x.useRef(null);ke(()=>{if(!C)return;const it=$.current,st=typeof it=="function"?it():it,Be=(gS(st)?st.current:st)||null||null;Be!==lt.current&&(he.setPositionReference(Be),lt.current=Be)},[C,he,te,$]),x.useEffect(()=>{if(!C)return;const it=$.current;typeof it!="function"&&gS(it)&&it.current!==lt.current&&(he.setPositionReference(it.current),lt.current=it.current)},[C,he,te,$]),x.useEffect(()=>{if(S&&C&&ye.domReference&&ye.floating)return oS(ye.domReference,ye.floating,je,Se)},[S,C,ye,je,Se]);const St=Il(Ee),qt=mR(a,St,V),gt=$s(Ee)||"center",Fe=!!((wl=He.hide)!=null&&wl.referenceHidden);ke(()=>{A&&C&&we&&D(St)},[A,C,we,St]);const mn=x.useMemo(()=>{var it,st;return{position:"absolute",top:(it=He.arrow)==null?void 0:it.y,left:(st=He.arrow)==null?void 0:st.x}},[He.arrow]),Sn=((tn=He.arrow)==null?void 0:tn.centerOffset)!==0;return x.useMemo(()=>({positionerStyles:Ze,arrowStyles:mn,arrowRef:B,arrowUncentered:Sn,side:qt,align:gt,physicalSide:St,anchorHidden:Fe,refs:he,context:ve,isPositioned:we,update:je}),[Ze,mn,B,Sn,qt,gt,St,Fe,he,ve,we,je])}function gS(n){return n!=null&&"current"in n}const pR=x.createContext(void 0);function g3(){const n=x.useContext(pR);if(!n)throw new Error(Gn(59));return n}const Zp=x.forwardRef(function(i,r){const{cutout:a,...c}=i;let f;if(a){const d=a==null?void 0:a.getBoundingClientRect();f=`polygon(
74
+ 0% 0%,
75
+ 100% 0%,
76
+ 100% 100%,
77
+ 0% 100%,
78
+ 0% 0%,
79
+ ${d.left}px ${d.top}px,
80
+ ${d.left}px ${d.bottom}px,
81
+ ${d.right}px ${d.bottom}px,
82
+ ${d.right}px ${d.top}px,
83
+ ${d.left}px ${d.top}px
84
+ )`}return p.jsx("div",{ref:r,role:"presentation","data-base-ui-inert":"",...c,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:f}})});function od(n,i){n&&Object.assign(n.style,i)}const p3={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},y3={position:"fixed"},b3=x.forwardRef(function(i,r){const{anchor:a,positionMethod:c="absolute",className:f,render:d,side:h="bottom",align:m="center",sideOffset:g=0,alignOffset:v=0,collisionBoundary:b="clipping-ancestors",collisionPadding:S,arrowPadding:T=5,sticky:C=!1,disableAnchorTracking:w,alignItemWithTrigger:j=!0,collisionAvoidance:O=fE,...E}=i,{store:A,listRef:N,labelsRef:L,alignItemWithTriggerActiveRef:D,selectedItemTextRef:_,valuesRef:M,initialValueRef:Q,popupRef:J,setValue:se}=Ws(),te=oR(),$=be(A,ft.open),oe=be(A,ft.mounted),V=be(A,ft.modal),H=be(A,ft.value),ne=be(A,ft.touchModality),F=be(A,ft.positionerElement),re=be(A,ft.triggerElement),K=be(A,ft.isItemEqualToValue),Re=x.useRef(null),Ye=x.useRef(null),[Oe,z]=x.useState(j),B=oe&&Oe&&!ne;!oe&&Oe!==j&&z(j),ke(()=>{oe||(ft.scrollUpArrowVisible(A.state)&&A.set("scrollUpArrowVisible",!1),ft.scrollDownArrowVisible(A.state)&&A.set("scrollDownArrowVisible",!1))},[A,oe]),x.useImperativeHandle(D,()=>B),Kp((B||V)&&$&&!ne,re);const W=gR({anchor:a,floatingRootContext:te,positionMethod:c,mounted:oe,side:h,sideOffset:g,align:m,alignOffset:v,arrowPadding:T,collisionBoundary:b,collisionPadding:S,sticky:C,disableAnchorTracking:w??B,collisionAvoidance:O,keepMounted:!0}),ie=B?"none":W.side,ue=B?y3:W.positionerStyles,me=x.useMemo(()=>{const he={};return $||(he.pointerEvents="none"),{role:"presentation",hidden:!oe,style:{...ue,...he}}},[$,oe,ue]),ae=x.useMemo(()=>({open:$,side:ie,align:W.align,anchorHidden:W.anchorHidden}),[$,ie,W.align,W.anchorHidden]),q=_e(he=>{A.set("positionerElement",he)}),le=Bt("div",i,{ref:[r,q],state:ae,stateAttributesMapping:Ro,props:[me,E]}),pe=x.useRef(0),Ke=_e(he=>{if(he.size===0&&pe.current===0||M.current.length===0)return;const ye=pe.current;if(pe.current=he.size,he.size===ye)return;const de=We(dl);if(ye!==0&&!A.state.multiple&&H!==null&&bo(M.current,H,K)===-1){const He=Q.current,Ee=He!=null&&jr(M.current,He,K)?He:null;se(Ee,de),Ee===null&&(A.set("selectedIndex",null),_.current=null)}if(ye!==0&&A.state.multiple&&Array.isArray(H)){const Ce=H.filter(He=>jr(M.current,He,K));(Ce.length!==H.length||Ce.some(He=>!jr(H,He,K)))&&(se(Ce,de),Ce.length===0&&(A.set("selectedIndex",null),_.current=null))}if($&&B){A.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const Ce={height:""};od(F,Ce),od(J.current,Ce)}}),Se=x.useMemo(()=>({...W,side:ie,alignItemWithTriggerActive:B,setControlledAlignItemWithTrigger:z,scrollUpArrowRef:Re,scrollDownArrowRef:Ye}),[W,ie,B,z]);return p.jsx(Fp,{elementsRef:N,labelsRef:L,onMapChange:Ke,children:p.jsxs(pR.Provider,{value:Se,children:[oe&&V&&p.jsx(Zp,{inert:Qp(!$),cutout:re}),le]})})});function yR(n){const i=n.currentTarget.getBoundingClientRect();return i.top+1<=n.clientY&&n.clientY<=i.bottom-1&&i.left+1<=n.clientX&&n.clientX<=i.right-1}const Hf="base-ui-disable-scrollbar",pS={className:Hf,element:p.jsx("style",{href:Hf,precedence:"base-ui:low",children:`.${Hf}{scrollbar-width:none}.${Hf}::-webkit-scrollbar{display:none}`})},v3=x.createContext(void 0);function bR(n){return x.useContext(v3)}const Ja="ArrowUp",Nr="ArrowDown",ku="ArrowLeft",$a="ArrowRight",Zu="Home",Ju="End",vR=new Set([ku,$a]),x3=new Set([ku,$a,Zu,Ju]),xR=new Set([Ja,Nr]),S3=new Set([Ja,Nr,Zu,Ju]),SR=new Set([...vR,...xR]),E3=new Set([...SR,Zu,Ju]),ER=new Set([Ja,Nr,ku,$a,Zu,Ju]),R3="Shift",w3="Control",C3="Alt",T3="Meta",O3=new Set([R3,w3,C3,T3]);function j3(n){return dn(n)&&n.tagName==="INPUT"}function yS(n){return!!(j3(n)&&n.selectionStart!=null||dn(n)&&n.tagName==="TEXTAREA")}function bS(n,i,r,a){if(!n||!i||!i.scrollTo)return;let c=n.scrollLeft,f=n.scrollTop;const d=n.clientWidth<n.scrollWidth,h=n.clientHeight<n.scrollHeight;if(d&&a!=="vertical"){const m=vS(n,i,"left"),g=If(n),v=If(i);r==="ltr"&&(m+i.offsetWidth+v.scrollMarginRight>n.scrollLeft+n.clientWidth-g.scrollPaddingRight?c=m+i.offsetWidth+v.scrollMarginRight-n.clientWidth+g.scrollPaddingRight:m-v.scrollMarginLeft<n.scrollLeft+g.scrollPaddingLeft&&(c=m-v.scrollMarginLeft-g.scrollPaddingLeft)),r==="rtl"&&(m-v.scrollMarginRight<n.scrollLeft+g.scrollPaddingLeft?c=m-v.scrollMarginLeft-g.scrollPaddingLeft:m+i.offsetWidth+v.scrollMarginRight>n.scrollLeft+n.clientWidth-g.scrollPaddingRight&&(c=m+i.offsetWidth+v.scrollMarginRight-n.clientWidth+g.scrollPaddingRight))}if(h&&a!=="horizontal"){const m=vS(n,i,"top"),g=If(n),v=If(i);m-v.scrollMarginTop<n.scrollTop+g.scrollPaddingTop?f=m-v.scrollMarginTop-g.scrollPaddingTop:m+i.offsetHeight+v.scrollMarginBottom>n.scrollTop+n.clientHeight-g.scrollPaddingBottom&&(f=m+i.offsetHeight+v.scrollMarginBottom-n.clientHeight+g.scrollPaddingBottom)}n.scrollTo({left:c,top:f,behavior:"auto"})}function vS(n,i,r){const a=r==="left"?"offsetLeft":"offsetTop";let c=0;for(;i.offsetParent&&(c+=i[a],i.offsetParent!==n);)i=i.offsetParent;return c}function If(n){const i=getComputedStyle(n);return{scrollMarginTop:parseFloat(i.scrollMarginTop)||0,scrollMarginRight:parseFloat(i.scrollMarginRight)||0,scrollMarginBottom:parseFloat(i.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(i.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(i.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(i.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(i.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(i.scrollPaddingLeft)||0}}function RR(n){return n==="starting"?XA:fn}const A3={...Ro,...Xu},N3=x.forwardRef(function(i,r){const{render:a,className:c,...f}=i,{store:d,popupRef:h,onOpenChangeComplete:m,setOpen:g,valueRef:v,selectedItemTextRef:b,keyboardActiveRef:S,multiple:T,handleScrollArrowVisibility:C,scrollHandlerRef:w}=Ws(),{side:j,align:O,alignItemWithTriggerActive:E,setControlledAlignItemWithTrigger:A,scrollDownArrowRef:N,scrollUpArrowRef:L}=g3(),D=bR()!=null,_=oR(),M=El(),Q=be(d,ft.id),J=be(d,ft.open),se=be(d,ft.mounted),te=be(d,ft.popupProps),$=be(d,ft.transitionStatus),oe=be(d,ft.triggerElement),V=be(d,ft.positionerElement),H=be(d,ft.listElement),ne=x.useRef(0),F=x.useRef(!1),re=x.useRef(0),K=x.useRef(!1),Re=x.useRef({}),Ye=vd(),Oe=_e(ie=>{if(!V||!h.current||!K.current)return;if(F.current||!E){C();return}const ue=V.style.top==="0px",me=V.style.bottom==="0px",ae=V.getBoundingClientRect().height,q=Fi(V),le=getComputedStyle(V),pe=parseFloat(le.marginTop),Ke=parseFloat(le.marginBottom),Se=q.documentElement.clientHeight-pe-Ke,he=ie.scrollTop,ye=ie.scrollHeight,de=ie.clientHeight,Ce=ye-de;let He=null,je=null,Ee=!1;if(ue){const ve=Ce-he,we=ae+ve,xe=Math.min(we,Se);He=xe,xe!==Se?je=Ce:Ee=!0}else if(me){const ve=he-0,we=ae+ve,xe=Math.min(we,Se),Xe=we-Se;He=xe,xe!==Se?je=0:(Ee=!0,he<Ce&&(je=he-(ve-Xe)))}He!=null&&(V.style.height=`${He}px`),je!=null&&(ie.scrollTop=je),Ee&&(F.current=!0),C()});x.useImperativeHandle(w,()=>Oe,[Oe]),Fr({open:J,ref:h,onComplete(){J&&(m==null||m(!0))}});const z=x.useMemo(()=>({open:J,transitionStatus:$,side:j,align:O}),[J,$,j,O]);ke(()=>{!V||!h.current||Object.keys(Re.current).length||(Re.current={top:V.style.top||"0",left:V.style.left||"0",right:V.style.right,height:V.style.height,bottom:V.style.bottom,minHeight:V.style.minHeight,maxHeight:V.style.maxHeight,marginTop:V.style.marginTop,marginBottom:V.style.marginBottom})},[h,V]),ke(()=>{se||E||(K.current=!1,F.current=!1,ne.current=0,re.current=0,od(V,Re.current))},[se,E,V,h]),ke(()=>{const ie=h.current;if(!(!se||!oe||!V||!ie)){if(!E){K.current=!0,Ye.request(C);return}queueMicrotask(()=>{var tt;const ue=getComputedStyle(V),me=getComputedStyle(ie),ae=Fi(oe),q=hn(V),le=oe.getBoundingClientRect(),pe=V.getBoundingClientRect(),Ke=le.left,Se=le.height,he=H||ie,ye=he.scrollHeight,de=parseFloat(me.borderBottomWidth),Ce=parseFloat(ue.marginTop)||10,He=parseFloat(ue.marginBottom)||10,je=parseFloat(ue.minHeight)||100,Ee=5,ve=5,we=20,xe=ae.documentElement.clientHeight-Ce-He,Xe=ae.documentElement.clientWidth,$e=xe-le.bottom+Se,Ve=b.current,Ze=v.current;let lt=0,St=0;if(Ve&&Ze){const Tt=Ze.getBoundingClientRect(),Pt=Ve.getBoundingClientRect(),Gt=Tt.left-Ke,En=Pt.left-pe.left,pn=Tt.top-le.top+Tt.height/2,Yt=Pt.top-pe.top+Pt.height/2;lt=Gt-En,St=Yt-pn}const qt=$e+St+He+de;let gt=Math.min(xe,qt);const Fe=xe-Ce-He,mn=qt-gt,Sn=Math.max(Ee,Ke+lt),wl=Xe-ve,tn=Math.max(0,Sn+pe.width-wl);V.style.left=`${Sn-tn}px`,V.style.height=`${gt}px`,V.style.maxHeight="auto",V.style.marginTop=`${Ce}px`,V.style.marginBottom=`${He}px`,ie.style.height="100%";const it=he.scrollHeight-he.clientHeight,st=mn>=it;st&&(gt=Math.min(xe,pe.height)-(mn-it));const gn=le.top<we||le.bottom>xe-we||gt<Math.min(ye,je),Be=(((tt=q.visualViewport)==null?void 0:tt.scale)??1)!==1&&wE;if(gn||Be){K.current=!0,od(V,Re.current),Qi.flushSync(()=>A(!1));return}if(st){const Tt=Math.max(0,xe-qt);V.style.top=pe.height>=Fe?"0":`${Tt}px`,V.style.height=`${gt}px`,he.scrollTop=he.scrollHeight-he.clientHeight,ne.current=Math.max(je,gt)}else V.style.bottom="0",ne.current=Math.max(je,gt),he.scrollTop=mn;ne.current===xe&&(F.current=!0),C(),setTimeout(()=>{K.current=!0})})}},[d,se,V,oe,v,b,h,C,E,A,Ye,N,L,H]),x.useEffect(()=>{if(!E||!V||!se)return;const ie=hn(V);function ue(me){g(!1,We(y2,me))}return ie.addEventListener("resize",ue),()=>{ie.removeEventListener("resize",ue)}},[g,E,V,se]);const B={...H?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":T||void 0,id:`${Q}-list`},onKeyDown(ie){S.current=!0,D&&ER.has(ie.key)&&ie.stopPropagation()},onMouseMove(){S.current=!1},onPointerLeave(ie){if(yR(ie)||ie.pointerType==="touch")return;const ue=ie.currentTarget;M.start(0,()=>{d.set("activeIndex",null),ue.focus({preventScroll:!0})})},onScroll(ie){var ue;H||(ue=w.current)==null||ue.call(w,ie.currentTarget)},...E&&{style:H?{height:"100%"}:p3}},W=Bt("div",i,{ref:[r,h],state:z,stateAttributesMapping:A3,props:[te,B,RR($),{className:!H&&E?pS.className:void 0},f]});return p.jsxs(x.Fragment,{children:[pS.element,p.jsx(Up,{context:_,modal:!1,disabled:!se,restoreFocus:!0,children:W})]})});let Jp=(function(n){return n[n.None=0]="None",n[n.GuessFromOrder=1]="GuessFromOrder",n})({});function $p(n={}){const{label:i,metadata:r,textRef:a,indexGuessBehavior:c,index:f}=n,{register:d,unregister:h,subscribeMapChange:m,elementsRef:g,labelsRef:v,nextIndexRef:b}=r3(),S=x.useRef(-1),[T,C]=x.useState(f??(c===Jp.GuessFromOrder?()=>{if(S.current===-1){const O=b.current;b.current+=1,S.current=O}return S.current}:-1)),w=x.useRef(null),j=x.useCallback(O=>{var E;if(w.current=O,T!==-1&&O!==null&&(g.current[T]=O,v)){const A=i!==void 0;v.current[T]=A?i:((E=a==null?void 0:a.current)==null?void 0:E.textContent)??O.textContent}},[T,g,v,i,a]);return ke(()=>{if(f!=null)return;const O=w.current;if(O)return d(O,r),()=>{h(O)}},[f,d,h,r]),ke(()=>{if(f==null)return m(O=>{var A;const E=w.current?(A=O.get(w.current))==null?void 0:A.index:null;E!=null&&C(E)})},[f,m,C]),x.useMemo(()=>({ref:j,index:T}),[T,j])}const wR=x.createContext(void 0);function Wp(){const n=x.useContext(wR);if(!n)throw new Error(Gn(57));return n}const M3=x.memo(x.forwardRef(function(i,r){const{render:a,className:c,value:f=null,label:d,disabled:h=!1,nativeButton:m=!1,...g}=i,v=x.useRef(null),b=$p({label:d,textRef:v,indexGuessBehavior:Jp.GuessFromOrder}),{store:S,getItemProps:T,setOpen:C,setValue:w,selectionRef:j,typingRef:O,valuesRef:E,keyboardActiveRef:A,multiple:N,highlightItemOnHover:L}=Ws(),D=El(),_=be(S,ft.isActive,b.index),M=be(S,ft.isSelected,b.index,f),Q=be(S,ft.isSelectedByFocus,b.index),J=be(S,ft.isItemEqualToValue),se=b.index,te=se!==-1,$=x.useRef(null),oe=On(se);ke(()=>{if(!te)return;const W=E.current;return W[se]=f,()=>{delete W[se]}},[te,se,f,E]),ke(()=>{if(!te)return;const W=S.state.value;let ie=W;N&&Array.isArray(W)&&W.length>0&&(ie=W[W.length-1]),ie!==void 0&&Xi(ie,f,J)&&S.set("selectedIndex",se)},[te,se,N,J,S,f]);const V=x.useMemo(()=>({disabled:h,selected:M,highlighted:_}),[h,M,_]),H=T({active:_,selected:M});H.onFocus=void 0,H.id=void 0;const ne=x.useRef(null),F=x.useRef("mouse"),re=x.useRef(!1),{getButtonProps:K,buttonRef:Re}=Yu({disabled:h,focusableWhenDisabled:!0,native:m});function Ye(W){const ie=S.state.value;if(N){const ue=Array.isArray(ie)?ie:[],me=M?cR(ue,f,J):[...ue,f];w(me,We(Pf,W))}else w(f,We(Pf,W)),C(!1,We(Pf,W))}const Oe={role:"option","aria-selected":M,"aria-disabled":h||void 0,tabIndex:_?0:-1,onFocus(){S.set("activeIndex",se)},onMouseEnter(){!A.current&&S.state.selectedIndex===null&&S.set("activeIndex",se)},onMouseMove(){L&&S.set("activeIndex",se)},onMouseLeave(W){!L||A.current||yR(W)||D.start(0,()=>{S.state.activeIndex===se&&S.set("activeIndex",null)})},onTouchStart(){j.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(W){ne.current=W.key,S.set("activeIndex",se)},onClick(W){re.current=!1,!(W.type==="keydown"&&ne.current===null)&&(h||ne.current===" "&&O.current||F.current!=="touch"&&!_||(ne.current=null,Ye(W.nativeEvent)))},onPointerEnter(W){F.current=W.pointerType},onPointerDown(W){F.current=W.pointerType,re.current=!0},onMouseUp(W){if(h)return;if(re.current){re.current=!1;return}const ie=!j.current.allowSelectedMouseUp&&M,ue=!j.current.allowUnselectedMouseUp&&!M;ie||ue||F.current!=="touch"&&!_||Ye(W.nativeEvent)}},z=Bt("div",i,{ref:[Re,r,b.ref,$],state:V,props:[H,Oe,g,K]}),B=x.useMemo(()=>({selected:M,indexRef:oe,textRef:v,selectedByFocus:Q,hasRegistered:te}),[M,oe,v,Q,te]);return p.jsx(wR.Provider,{value:B,children:z})})),z3=x.forwardRef(function(i,r){const a=i.keepMounted??!1,{selected:c}=Wp();return a||c?p.jsx(D3,{...i,ref:r}):null}),D3=x.memo(x.forwardRef((n,i)=>{const{render:r,className:a,keepMounted:c,...f}=n,{selected:d}=Wp(),h=x.useRef(null),{transitionStatus:m,setMounted:g}=wd(d),v=x.useMemo(()=>({selected:d,transitionStatus:m}),[d,m]),b=Bt("span",n,{ref:[i,h],state:v,props:[{"aria-hidden":!0,children:"✔️"},f],stateAttributesMapping:Xu});return Fr({open:d,ref:h,onComplete(){d||g(!1)}}),b})),_3=x.memo(x.forwardRef(function(i,r){const{indexRef:a,textRef:c,selectedByFocus:f,hasRegistered:d}=Wp(),{selectedItemTextRef:h}=Ws(),{className:m,render:g,...v}=i,b=x.useCallback(T=>{if(!T||!d)return;const C=h.current===null||!h.current.isConnected;(f||C&&a.current===0)&&(h.current=T)},[h,a,f,d]);return Bt("div",i,{ref:[b,r,c],props:v})})),CR=x.createContext(void 0),TR=x.createContext(void 0),OR=x.createContext(void 0),jR=x.createContext("");function er(){const n=x.useContext(CR);if(!n)throw new Error(Gn(22));return n}function Td(){const n=x.useContext(TR);if(!n)throw new Error(Gn(23));return n}function Xr(){const n=x.useContext(OR);if(!n)throw new Error(Gn(24));return n}function AR(){return x.useContext(jR)}const Le={id:ge(n=>n.id),query:ge(n=>n.query),items:ge(n=>n.items),selectedValue:ge(n=>n.selectedValue),open:ge(n=>n.open),mounted:ge(n=>n.mounted),forceMounted:ge(n=>n.forceMounted),inline:ge(n=>n.inline),activeIndex:ge(n=>n.activeIndex),selectedIndex:ge(n=>n.selectedIndex),isActive:ge((n,i)=>n.activeIndex===i),isSelected:ge((n,i)=>{const r=n.isItemEqualToValue,a=n.selectedValue;return Array.isArray(a)?a.some(c=>Xi(c,i,r)):Xi(a,i,r)}),transitionStatus:ge(n=>n.transitionStatus),popupProps:ge(n=>n.popupProps),inputProps:ge(n=>n.inputProps),triggerProps:ge(n=>n.triggerProps),getItemProps:ge(n=>n.getItemProps),positionerElement:ge(n=>n.positionerElement),listElement:ge(n=>n.listElement),triggerElement:ge(n=>n.triggerElement),inputElement:ge(n=>n.inputElement),popupSide:ge(n=>n.popupSide),openMethod:ge(n=>n.openMethod),inputInsidePopup:ge(n=>n.inputInsidePopup),selectionMode:ge(n=>n.selectionMode),listRef:ge(n=>n.listRef),labelsRef:ge(n=>n.labelsRef),popupRef:ge(n=>n.popupRef),emptyRef:ge(n=>n.emptyRef),inputRef:ge(n=>n.inputRef),keyboardActiveRef:ge(n=>n.keyboardActiveRef),chipsContainerRef:ge(n=>n.chipsContainerRef),clearRef:ge(n=>n.clearRef),valuesRef:ge(n=>n.valuesRef),allValuesRef:ge(n=>n.allValuesRef),name:ge(n=>n.name),disabled:ge(n=>n.disabled),readOnly:ge(n=>n.readOnly),required:ge(n=>n.required),grid:ge(n=>n.grid),isGrouped:ge(n=>n.isGrouped),virtualized:ge(n=>n.virtualized),onOpenChangeComplete:ge(n=>n.onOpenChangeComplete),openOnInputClick:ge(n=>n.openOnInputClick),itemToStringLabel:ge(n=>n.itemToStringLabel),isItemEqualToValue:ge(n=>n.isItemEqualToValue),modal:ge(n=>n.modal),autoHighlight:ge(n=>n.autoHighlight),submitOnItemClick:ge(n=>n.submitOnItemClick)};function k3(n,i){return(r,a)=>{if(r==null)return!1;const c=vn(r,i);return n.contains(c,a)}}function L3(n,i,r){return(a,c)=>{if(a==null)return!1;if(!c)return!0;const f=vn(a,i),d=r!=null?vn(r,i):"";return d&&n.contains(d,c)&&d.length===c.length?!0:n.contains(f,c)}}const xS=new Map;function NR(n){return Array.isArray(n)?n.map(i=>NR(i)).join(","):n==null?"":String(n)}function U3(n={}){const i={usage:"search",sensitivity:"base",ignorePunctuation:!0,...n},r=`${NR(n.locale)}|${JSON.stringify(i)}`,a=xS.get(r);if(a)return a;const c=new Intl.Collator(n.locale,i),f={contains(d,h,m){if(!h)return!0;const g=vn(d,m);for(let v=0;v<=g.length-h.length;v+=1)if(c.compare(g.slice(v,v+h.length),h)===0)return!0;return!1},startsWith(d,h,m){if(!h)return!0;const g=vn(d,m);return c.compare(g.slice(0,h.length),h)===0},endsWith(d,h,m){if(!h)return!0;const g=vn(d,m),v=h.length;return g.length>=v&&c.compare(g.slice(g.length-v),h)===0}};return xS.set(r,f),f}const H3=U3;function I3(n){const i=x.useRef(""),r=x.useCallback(c=>{c.defaultPrevented||(i.current=c.pointerType,n(c,c.pointerType))},[n]);return{onClick:x.useCallback(c=>{if(c.detail===0){n(c,"keyboard");return}"pointerType"in c&&n(c,c.pointerType),n(c,i.current),i.current=""},[n]),onPointerDown:r}}function MR(n){const[i,r]=x.useState(null),a=_e((h,m)=>{n||r(m)}),c=x.useCallback(()=>{r(null)},[]),{onClick:f,onPointerDown:d}=I3(a);return x.useMemo(()=>({openMethod:i,reset:c,triggerProps:{onClick:f,onPointerDown:d}}),[i,c,f,d])}const zR=Symbol("none"),wr={value:zR,index:-1};function V3(n){const{id:i,onOpenChangeComplete:r,defaultSelectedValue:a=null,selectedValue:c,onSelectedValueChange:f,defaultInputValue:d,inputValue:h,selectionMode:m="none",onItemHighlighted:g,name:v,disabled:b=!1,readOnly:S=!1,required:T=!1,inputRef:C,grid:w=!1,items:j,filteredItems:O,filter:E,openOnInputClick:A=!0,autoHighlight:N=!1,keepHighlight:L=!1,highlightItemOnHover:D=!0,itemToStringLabel:_,itemToStringValue:M,isItemEqualToValue:Q=uR,virtualized:J=!1,inline:se=!1,fillInputOnItemPress:te=!0,modal:$=!1,limit:oe=-1,autoComplete:V="list",locale:H,submitOnItemClick:ne=!1}=n,{clearErrors:F}=jp(),{setDirty:re,validityData:K,shouldValidateOnChange:Re,setFilled:Ye,name:Oe,disabled:z,validation:B}=Eo(),W=pE({id:i}),ie=H3({locale:H}),[ue,me]=x.useState(!1),[ae,q]=x.useState(null),le=x.useRef([]),pe=x.useRef([]),Ke=x.useRef(null),Se=x.useRef(null),he=x.useRef(null),ye=x.useRef(!0),de=x.useRef(!1),Ce=x.useRef(null),He=x.useRef(null),je=x.useRef(null),Ee=x.useRef(wr),ve=x.useRef(null),we=x.useRef([]),xe=x.useRef([]),Xe=z||b,$e=Oe??v,Ve=m==="multiple",Ze=m==="single",lt=h!==void 0||d!==void 0,St=j!==void 0,qt=O!==void 0;let gt;N==="always"?gt="always":gt=N?"input-change":!1;const[Fe,mn]=Vr({controlled:c,default:Ve?a??Ul:a,name:"Combobox",state:"selectedValue"}),Sn=x.useMemo(()=>E===null?()=>!0:E!==void 0?E:Ze&&!ue?L3(ie,_,Fe):k3(ie,_),[E,Ze,Fe,ue,ie,_]),wl=hl(()=>lt?d??"":Ze?vn(Fe,_):"").current,[tn,it]=Vr({controlled:h,default:wl,name:"Combobox",state:"inputValue"}),[st,gn]=Vr({controlled:n.open,default:n.defaultOpen,name:"Combobox",state:"open"}),Be=fR(j),tt=ae??(tn===""?"":String(tn).trim()),Tt=Ze?vn(Fe,_):"",Pt=Ze&&!ue&&tt!==""&&Tt!==""&&Tt.length===tt.length&&ie.contains(Tt,tt),Gt=Pt?"":tt,En=St&&qt&&Pt,pn=x.useMemo(()=>j?Be?j.flatMap(Ne=>Ne.items):j:Ul,[j,Be]),Yt=x.useMemo(()=>{if(O&&!En)return O;if(!j)return Ul;if(Be){const qe=j,nt=[];let Ie=0;for(const Qt of qe){if(oe>-1&&Ie>=oe)break;const nn=Gt===""?Qt.items:Qt.items.filter(ln=>Sn(ln,Gt,_));if(nn.length===0)continue;const Ol=oe>-1?oe-Ie:1/0,Vn=nn.slice(0,Ol);if(Vn.length>0){const ln={...Qt,items:Vn};nt.push(ln),Ie+=Vn.length}}return nt}if(Gt==="")return oe>-1?pn.slice(0,oe):pn;const Ne=[];for(const qe of pn){if(oe>-1&&Ne.length>=oe)break;Sn(qe,Gt,_)&&Ne.push(qe)}return Ne},[O,En,j,Be,Gt,oe,Sn,_,pn]),Zt=x.useMemo(()=>Be?Yt.flatMap(qe=>qe.items):Yt,[Yt,Be]),Qe=hl(()=>new Br({id:W,selectedValue:Fe,open:st,filter:Sn,query:tt,items:j,selectionMode:m,listRef:le,labelsRef:pe,popupRef:Ke,emptyRef:he,inputRef:Se,keyboardActiveRef:ye,chipsContainerRef:Ce,clearRef:He,valuesRef:we,allValuesRef:xe,selectionEventRef:je,name:$e,disabled:Xe,readOnly:S,required:T,grid:w,isGrouped:Be,virtualized:J,openOnInputClick:A,itemToStringLabel:_,isItemEqualToValue:Q,modal:$,autoHighlight:gt,submitOnItemClick:ne,hasInputValue:lt,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:se,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:r||en,setOpen:en,setInputValue:en,setSelectedValue:en,setIndices:en,onItemHighlighted:en,handleSelection:en,getItemProps:()=>fn,forceMount:en,requestSubmit:en})).current,Bl=m==="none"?tn:Fe,Wi=_e(g),vi=_e(r),ql=be(Qe,Le.activeIndex),Cl=be(Qe,Le.selectedIndex),Pl=be(Qe,Le.positionerElement),Hn=be(Qe,Le.listElement),il=be(Qe,Le.triggerElement),sl=be(Qe,Le.inputElement),Yn=be(Qe,Le.inline),Tl=be(Qe,Le.inputInsidePopup),ec=On(il),{mounted:Jr,setMounted:tr,transitionStatus:Oo}=wd(st),{openMethod:jo,triggerProps:$r,reset:tc}=MR(st);gE({id:W,name:$e,commit:B.commit,value:Bl,controlRef:Tl?ec:Se,getValue:()=>Bl});const es=_e(()=>{j?pe.current=Zt.map(Ne=>vn(Ne,_)):Qe.set("forceMounted",!0)}),Ao=x.useRef(Fe);ke(()=>{Fe!==Ao.current&&es()},[es,Fe]);const Qn=_e(Ne=>{Qe.update(Ne);const qe=Ne.type||"none";if(Ne.activeIndex!==void 0)if(Ne.activeIndex===null)Ee.current!==wr&&(Ee.current=wr,Wi(void 0,xu(qe,void 0,{index:-1})));else{const nt=we.current[Ne.activeIndex];Ee.current={value:nt,index:Ne.activeIndex},Wi(nt,xu(qe,void 0,{index:Ne.activeIndex}))}}),Kn=_e((Ne,qe)=>{var nt;if(de.current=qe.reason===Ms,(nt=n.onInputValueChange)==null||nt.call(n,Ne,qe),!qe.isCanceled){if(qe.reason===Or){const Ie=Ne.trim()!=="";Ie&&me(!0),ve.current={hasQuery:Ie},Ie&&gt&&Qe.state.activeIndex==null&&Qe.set("activeIndex",0)}it(Ne)}}),Fn=_e((Ne,qe)=>{var nt;st!==Ne&&(qe.reason==="escape-key"&&St&&Zt.length===0&&!Qe.state.emptyRef.current&&qe.allowPropagation(),(nt=n.onOpenChange)==null||nt.call(n,Ne,qe),!qe.isCanceled&&(!Ne&&ue&&(Ze?(q(tt),tt===""&&me(!1)):Ve&&(Yn||Tl?Qn({activeIndex:null}):q(tt),Kn("",We(Ms,qe.event)))),gn(Ne)))}),Ut=_e((Ne,qe)=>{if(f==null||f(Ne,qe),qe.isCanceled)return;mn(Ne),(m==="none"&&Ke.current&&te||Ze&&!Qe.state.inputInsidePopup)&&Kn(vn(Ne,_),We(qe.reason,qe.event)),Ze&&Ne!=null&&qe.reason!==Or&&ue&&q(tt)}),In=_e((Ne,qe)=>{var Vn;let nt=qe;if(nt===void 0){if(ql===null)return;nt=we.current[ql]}const Ie=Pn(Ne),Qt=je.current??Ne;je.current=null;const nn=We(Pf,Qt),Ol=(Vn=Ie==null?void 0:Ie.closest("a"))==null?void 0:Vn.getAttribute("href");if(Ol){Ol.startsWith("#")&&Fn(!1,nn);return}if(Ve){const ln=Array.isArray(Fe)?Fe:[],Dd=jr(ln,nt,Qe.state.isItemEqualToValue)?cR(ln,nt,Qe.state.isItemEqualToValue):[...ln,nt];if(Ut(Dd,nn),!(Se.current?Se.current.value.trim()!=="":!1))return;Qe.state.inputInsidePopup?Kn("",We(Ms,nn.event)):Fn(!1,nn)}else Ut(nt,nn),Fn(!1,nn)}),$l=_e(()=>{var qe;if(!Qe.state.submitOnItemClick)return;const Ne=(qe=Qe.state.inputElement)==null?void 0:qe.form;Ne&&typeof Ne.requestSubmit=="function"&&Ne.requestSubmit()}),Wr=_e(()=>{if(tr(!1),vi==null||vi(!1),me(!1),tc(),q(null),Qn(m==="none"?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),Ve&&Se.current&&Se.current.value!==""&&!de.current&&Kn("",We(Ms)),Ze)if(Qe.state.inputInsidePopup)Se.current&&Se.current.value!==""&&Kn("",We(Ms));else{const Ne=vn(Fe,_);Se.current&&Se.current.value!==Ne&&Kn(Ne,We(Ne===""?Ms:dl))}}),Nd=x.useMemo(()=>Yn&&Pl?{current:Pl.closest('[role="dialog"]')}:Ke,[Yn,Pl]);Fr({enabled:!n.actionsRef,open:st,ref:Nd,onComplete(){st||Wr()}}),x.useImperativeHandle(n.actionsRef,()=>({unmount:Wr}),[Wr]),ke(function(){if(st||m==="none")return;const qe=j?pn:xe.current;if(Ve){const nt=Array.isArray(Fe)?Fe:[],Ie=nt[nt.length-1],Qt=bo(qe,Ie,Q);Qn({selectedIndex:Qt===-1?null:Qt})}else{const nt=bo(qe,Fe,Q);Qn({selectedIndex:nt===-1?null:nt})}},[st,Fe,j,m,pn,Ve,Q,Qn]),ke(()=>{j&&(we.current=Zt,le.current.length=Zt.length)},[j,Zt]),ke(()=>{const Ne=ve.current;if(Ne&&(Ne.hasQuery?gt&&Qe.set("activeIndex",0):gt==="always"&&Qe.set("activeIndex",0),ve.current=null),!st&&!Yn)return;const nt=St||qt?Zt:we.current,Ie=Qe.state.activeIndex;if(Ie==null){if(gt==="always"&&nt.length>0){Qe.set("activeIndex",0);return}Ee.current!==wr&&(Ee.current=wr,Qe.state.onItemHighlighted(void 0,xu(dl,void 0,{index:-1})));return}if(Ie>=nt.length){Ee.current!==wr&&(Ee.current=wr,Qe.state.onItemHighlighted(void 0,xu(dl,void 0,{index:-1}))),Qe.set("activeIndex",null);return}const Qt=nt[Ie],nn=Ee.current.value,Ol=nn!==zR&&Qe.state.isItemEqualToValue(Qt,nn);(Ee.current.index!==Ie||!Ol)&&(Ee.current={value:Qt,index:Ie},Qe.state.onItemHighlighted(Qt,xu(dl,void 0,{index:Ie})))},[ql,gt,qt,St,Zt,Yn,st,Qe]),ke(()=>{if(!j||m==="none")return;const Ne=pn;if(Ve){const Ie=Array.isArray(Fe)?Fe:Ul,Qt=Ie.filter(nn=>jr(Ne,nn,Qe.state.isItemEqualToValue));Qt.length!==Ie.length&&mn(Qt);return}if(Fe==null?!0:jr(Ne,Fe,Qe.state.isItemEqualToValue))return;let nt=null;if(a!=null&&jr(Ne,a,Qe.state.isItemEqualToValue)&&(nt=a),mn(nt),!Qe.state.inputInsidePopup){const Ie=vn(nt,_);Se.current&&Se.current.value!==Ie&&Kn(Ie,We(dl))}},[j,pn,Ve,m,Fe,a,mn,_,Qe,Kn]),ke(()=>{if(m==="none"){Ye(String(tn)!=="");return}Ye(Ve?Array.isArray(Fe)&&Fe.length>0:Fe!=null)},[Ye,m,tn,Fe,Ve]),x.useEffect(()=>{St&&gt&&Zt.length===0&&Qn({activeIndex:null})},[St,gt,Zt.length,Qn]),ju(tt,()=>{!st||tt===""||tt===String(wl)||me(!0)}),ju(Fe,()=>{if(m!=="none"&&(F($e),re(Fe!==K.initialValue),Re()?B.commit(Fe):B.commit(Fe,!0),Ve&&Qe.state.selectedIndex!==null&&(!Array.isArray(Fe)||Fe.length===0)&&Qn({activeIndex:null,selectedIndex:null}),Ze&&!lt&&!Tl)){const Ne=vn(Fe,_);tn!==Ne&&Kn(Ne,We(dl))}}),ju(tn,()=>{m==="none"&&(F($e),re(tn!==K.initialValue),Re()?B.commit(tn):B.commit(tn,!0))}),ju(j,()=>{if(!Ze||lt||Tl||ue)return;const Ne=vn(Fe,_);tn!==Ne&&Kn(Ne,We(dl))});const ea=Pp({open:Yn?!0:st,onOpenChange:Fn,elements:{reference:Tl?il:sl,floating:Pl}});let ta,xi;Yn||(ta=w?"grid":"listbox",xi=st?"true":"false");const na=x.useMemo(()=>{const Ne=(sl==null?void 0:sl.tagName)==="INPUT",qe=Ne||st,nt=Ne?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return qe&&(nt.role="combobox",nt["aria-expanded"]=xi,nt["aria-haspopup"]=ta,nt["aria-controls"]=st?Hn==null?void 0:Hn.id:void 0,nt["aria-autocomplete"]=V),{reference:nt,floating:{role:"presentation"}}},[sl,st,xi,ta,Hn==null?void 0:Hn.id,V]),la=Hp(ea,{enabled:!S&&!Xe&&A,event:"mousedown-only",toggle:!1,touchOpenDelay:Tl?0:50}),Si=Vp(ea,{enabled:!S&&!Xe&&!Yn,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:Yn?!0:void 0,outsidePress(Ne){const qe=Pn(Ne);return!Rt(il,qe)&&!Rt(He.current,qe)&&!Rt(Ce.current,qe)}}),ts=iR(ea,{enabled:!S&&!Xe,id:W,listRef:le,activeIndex:ql,selectedIndex:Cl,virtual:!0,loopFocus:!0,allowEscape:!gt,focusItemOnOpen:ue||m==="none"&&!gt?!1:"auto",focusItemOnHover:D,resetOnPointerLeave:!L,cols:w?2:1,orientation:w?"horizontal":void 0,disabledIndices:Ul,onNavigate(Ne,qe){!qe&&!st||Oo==="ending"||Qn(qe?{activeIndex:Ne,type:ye.current?"keyboard":"pointer"}:{activeIndex:Ne})}}),{getReferenceProps:Ei,getFloatingProps:Wl,getItemProps:Jt}=Gp([na,la,Si,ts]);vE(()=>{Qe.update({inline:se,popupProps:Wl(),inputProps:Ei(),triggerProps:$r,getItemProps:Jt,setOpen:Fn,setInputValue:Kn,setSelectedValue:Ut,setIndices:Qn,onItemHighlighted:Wi,handleSelection:In,forceMount:es,requestSubmit:$l})}),ke(()=>{Qe.update({id:W,selectedValue:Fe,open:st,mounted:Jr,transitionStatus:Oo,items:j,inline:se,popupProps:Wl(),inputProps:Ei(),triggerProps:$r,openMethod:jo,getItemProps:Jt,selectionMode:m,name:$e,disabled:Xe,readOnly:S,required:T,grid:w,isGrouped:Be,virtualized:J,onOpenChangeComplete:vi,openOnInputClick:A,itemToStringLabel:_,modal:$,autoHighlight:gt,isItemEqualToValue:Q,submitOnItemClick:ne,hasInputValue:lt,requestSubmit:$l})},[Qe,W,Fe,st,Jr,Oo,j,Wl,Ei,Jt,jo,$r,m,$e,Xe,S,T,B,w,Be,J,vi,A,_,$,Q,ne,lt,se,$l,gt]);const nc=Yi(C,B.inputRef),lc=x.useMemo(()=>({query:tt,filteredItems:Yt,flatFilteredItems:Zt}),[tt,Yt,Zt]),ic=x.useMemo(()=>Array.isArray(Bl)?"":qr(Bl,M),[Bl,M]),Ri=Ve&&Array.isArray(Fe)&&Fe.length>0,ns=x.useMemo(()=>!Ve||!Array.isArray(Fe)||!$e?null:Fe.map(Ne=>{const qe=qr(Ne,M);return p.jsx("input",{type:"hidden",name:$e,value:qe},qe)}),[Ve,Fe,$e,M]),Md=p.jsxs(x.Fragment,{children:[n.children,p.jsx("input",{...B.getInputValidationProps({onFocus(){var Ne;if(Tl){il==null||il.focus();return}(Ne=Se.current||il)==null||Ne.focus()},onChange(Ne){if(Ne.nativeEvent.defaultPrevented)return;const qe=Ne.target.value,nt=We(Or,Ne.nativeEvent);function Ie(){if(Ve)return;if(m==="none"){re(qe!==K.initialValue),Kn(qe,nt),Re()&&B.commit(qe);return}const Qt=we.current.find(nn=>qr(nn,M).toLowerCase()===qe.toLowerCase());Qt!=null&&(re(Qt!==K.initialValue),Ut==null||Ut(Qt,nt),Re()&&B.commit(Qt))}j?Ie():(es(),queueMicrotask(Ie))}}),id:W,name:Ve||m==="none"?void 0:$e,disabled:Xe,required:T&&!Ri,readOnly:S,value:ic,ref:nc,style:dd,tabIndex:-1,"aria-hidden":!0}),ns]});return p.jsx(CR.Provider,{value:Qe,children:p.jsx(TR.Provider,{value:ea,children:p.jsx(OR.Provider,{value:lc,children:p.jsx(jR.Provider,{value:tn,children:Md})})})})}function B3(n){const{multiple:i=!1,defaultValue:r,value:a,onValueChange:c,...f}=n;return p.jsx(V3,{...f,selectionMode:i?"multiple":"single",selectedValue:a,defaultSelectedValue:r,onSelectedValueChange:c})}const q3=x.createContext(void 0);function P3(){return x.useContext(q3)}const DR=x.createContext(void 0);function ey(n){const i=x.useContext(DR);if(i===void 0&&!n)throw new Error(Gn(21));return i}const G3={...Yp,...Op,popupSide:n=>n?{"data-popup-side":n}:null,listEmpty:n=>n?{"data-list-empty":""}:null},Y3=x.forwardRef(function(i,r){const{render:a,className:c,disabled:f=!1,id:d,...h}=i,{state:m,disabled:g,setTouched:v,setFocused:b,validationMode:S,validation:T}=Eo(),{labelId:C}=Qu(),w=P3(),O=!!ey(!0),E=er(),{filteredItems:A}=Xr(),N=AR(),L=hd(d),D=Xp(),_=be(E,Le.disabled),M=be(E,Le.readOnly),Q=be(E,Le.name),J=be(E,Le.selectionMode),se=be(E,Le.autoHighlight),te=be(E,Le.inputProps),$=be(E,Le.triggerProps),oe=be(E,Le.open),V=be(E,Le.mounted),H=be(E,Le.selectedValue),ne=be(E,Le.popupSide),F=be(E,Le.positionerElement),re=!!se,K=V&&F?ne:null,Re=g||_||f,Ye=A.length===0,[Oe,z]=x.useState(null),B=x.useRef(!1),W=_e(ae=>{const q=O||E.state.inline;q&&!E.state.hasInputValue&&E.state.setInputValue("",We(dl)),E.update({inputElement:ae,inputInsidePopup:q})}),ie=x.useMemo(()=>({...m,open:oe,disabled:Re,readOnly:M,popupSide:K,listEmpty:Ye}),[m,oe,Re,M,K,Ye]);function ue(ae){if(!w)return;let q;const{highlightedChipIndex:le}=w;if(le!==void 0){if(ae.key==="ArrowLeft")ae.preventDefault(),le>0?q=le-1:q=void 0;else if(ae.key==="ArrowRight")ae.preventDefault(),le<H.length-1?q=le+1:q=void 0;else if(ae.key==="Backspace"||ae.key==="Delete"){ae.preventDefault();const pe=le>=H.length-1?H.length-2:le;q=pe>=0?pe:void 0,E.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return q}return ae.key==="ArrowLeft"&&(ae.currentTarget.selectionStart??0)===0&&H.length>0?(ae.preventDefault(),q=Math.max(H.length-1,0)):ae.key==="Backspace"&&ae.currentTarget.value===""&&H.length>0&&(E.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),ae.preventDefault()),q}return Bt("input",i,{state:ie,ref:[r,E.state.inputRef,W],props:[te,$,{type:"text",value:i.value??Oe??N,"aria-readonly":M||void 0,"aria-labelledby":C,disabled:Re,readOnly:M,...J==="none"&&Q&&{name:Q},id:L,onFocus(){b(!0)},onBlur(){if(v(!0),b(!1),S==="onBlur"){const ae=J==="none"?N:H;T.commit(ae)}},onCompositionStart(ae){Jf||(B.current=!0,z(ae.currentTarget.value))},onCompositionEnd(ae){B.current=!1;const q=ae.currentTarget.value;z(null),E.state.setInputValue(q,We(Or,ae.nativeEvent))},onChange(ae){if(B.current){const Ke=ae.currentTarget.value;z(Ke),Ke===""&&!E.state.openOnInputClick&&!E.state.inputInsidePopup&&E.state.setOpen(!1,We(Ms,ae.nativeEvent));const Se=Ke.trim(),he=re&&Se!=="";!M&&!Re&&Se!==""&&(E.state.setOpen(!0,We(Or,ae.nativeEvent)),re||E.state.setIndices({activeIndex:null,selectedIndex:null,type:E.state.keyboardActiveRef.current?"keyboard":"pointer"})),oe&&E.state.activeIndex!==null&&!he&&E.state.setIndices({activeIndex:null,selectedIndex:null,type:E.state.keyboardActiveRef.current?"keyboard":"pointer"});return}E.state.setInputValue(ae.currentTarget.value,We(Or,ae.nativeEvent));const q=ae.currentTarget.value==="",le=We(Ms,ae.nativeEvent);q&&!E.state.inputInsidePopup&&(J==="single"&&E.state.setSelectedValue(null,le),E.state.openOnInputClick||E.state.setOpen(!1,le));const pe=ae.currentTarget.value.trim();!M&&!Re&&pe!==""&&(E.state.setOpen(!0,We(Or,ae.nativeEvent)),re||E.state.setIndices({activeIndex:null,selectedIndex:null,type:E.state.keyboardActiveRef.current?"keyboard":"pointer"})),oe&&E.state.activeIndex!==null&&!re&&E.state.setIndices({activeIndex:null,selectedIndex:null,type:E.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(ae){var Se,he;if(Re||M||ae.ctrlKey||ae.shiftKey||ae.altKey||ae.metaKey)return;E.state.keyboardActiveRef.current=!0;const q=ae.currentTarget,le=q.scrollWidth-q.clientWidth,pe=D==="rtl";if(ae.key==="Home"){rn(ae);const ye=Q0&&pe?q.value.length:0;q.setSelectionRange(ye,ye),q.scrollLeft=0;return}if(ae.key==="End"){rn(ae);const ye=Q0&&pe?0:q.value.length;q.setSelectionRange(ye,ye),q.scrollLeft=pe?-le:le;return}if(!V&&ae.key==="Escape"){const ye=J==="multiple"&&Array.isArray(H)?H.length===0:H===null,de=We(bE,ae.nativeEvent),Ce=J==="multiple"?[]:null;E.state.setInputValue("",de),E.state.setSelectedValue(Ce,de),!ye&&!E.state.inline&&!de.isPropagationAllowed&&ae.stopPropagation();return}if(w&&ae.key==="Backspace"&&q.value===""&&w.highlightedChipIndex===void 0&&Array.isArray(H)&&H.length>0){const ye=H.slice(0,-1);E.state.setIndices({activeIndex:null,selectedIndex:null,type:E.state.keyboardActiveRef.current?"keyboard":"pointer"}),E.state.setSelectedValue(ye,We(dl,ae.nativeEvent));return}const Ke=ue(ae);if(w==null||w.setHighlightedChipIndex(Ke),Ke!==void 0?(Se=w==null?void 0:w.chipsRef.current[Ke])==null||Se.focus():(he=E.state.inputRef.current)==null||he.focus(),ae.which!==229&&ae.key==="Enter"&&oe){const ye=E.state.activeIndex,de=ae.nativeEvent;if(ye===null){E.state.setOpen(!1,We(dl,de));return}rn(ae);const Ce=E.state.listRef.current[ye];Ce&&(E.state.selectionEventRef.current=de,Ce.click(),E.state.selectionEventRef.current=null)}},onPointerMove(){E.state.keyboardActiveRef.current=!1},onPointerDown(){E.state.keyboardActiveRef.current=!1}},T?T.getValidationProps(h):h],stateAttributesMapping:G3})}),Vf=2,Q3={...Yp,...Op},K3=x.forwardRef(function(i,r){const{render:a,className:c,nativeButton:f=!0,disabled:d=!1,...h}=i,{state:m,disabled:g,setTouched:v,setFocused:b,validationMode:S,validation:T}=Eo(),{labelId:C}=Qu(),w=er(),j=be(w,Le.selectionMode),O=be(w,Le.disabled),E=be(w,Le.readOnly),A=be(w,Le.listElement),N=be(w,Le.triggerProps),L=be(w,Le.triggerElement),D=be(w,Le.inputInsidePopup),_=be(w,Le.open),M=be(w,Le.selectedValue),Q=be(w,Le.activeIndex),J=be(w,Le.selectedIndex),se=Td(),te=AR(),$=El(),oe=g||O||d,V=x.useRef("");function H(B){V.current=B.pointerType}const ne=se.select("domReferenceElement");x.useEffect(()=>{D&&L&&L!==ne&&se.set("domReferenceElement",L)},[L,ne,se,D]);const{reference:F}=sR(se,{enabled:!_&&!E&&!O&&j==="single",listRef:w.state.labelsRef,activeIndex:Q,selectedIndex:J,onMatch(B){const W=w.state.valuesRef.current[B];W!==void 0&&w.state.setSelectedValue(W,We("none"))}}),{reference:re}=Hp(se,{enabled:!E&&!O,event:"mousedown"}),{buttonRef:K,getButtonProps:Re}=Yu({native:f,disabled:oe}),Ye=x.useMemo(()=>({...m,open:_,disabled:oe}),[m,_,oe]),Oe=_e(B=>{w.set("triggerElement",B)});return Bt("button",i,{ref:[r,K,Oe],state:Ye,props:[N,re,F,{tabIndex:D?0:-1,disabled:oe,role:D?"combobox":void 0,"aria-expanded":_?"true":"false","aria-haspopup":D?"dialog":"listbox","aria-controls":_?A==null?void 0:A.id:void 0,"aria-readonly":E||void 0,"aria-labelledby":C,onPointerDown:H,onPointerEnter:H,onFocus(){b(!0),!(oe||E)&&$.start(0,w.state.forceMount)},onBlur(){if(v(!0),b(!1),S==="onBlur"){const B=j==="none"?te:M;T.commit(B)}},onMouseDown(B){var ue;if(oe||E||(D||se.set("domReferenceElement",B.currentTarget),w.state.forceMount(),V.current!=="touch"&&((ue=w.state.inputRef.current)==null||ue.focus(),D||B.preventDefault()),_))return;const W=Fi(B.currentTarget);function ie(me){if(!L)return;const ae=Pn(me),q=w.state.positionerElement,le=w.state.listElement;if(Rt(L,ae)||Rt(q,ae)||Rt(le,ae)||ae===L)return;const pe=dR(L),Ke=me.clientX>=pe.left-Vf&&me.clientX<=pe.right+Vf,Se=me.clientY>=pe.top-Vf&&me.clientY<=pe.bottom+Vf;Ke&&Se||w.state.setOpen(!1,We("cancel-open",me))}D&&W.addEventListener("mouseup",ie,{once:!0})},onKeyDown(B){var W;oe||E||(B.key==="ArrowDown"||B.key==="ArrowUp")&&(rn(B),w.state.setOpen(!0,We(Gf,B.nativeEvent)),(W=w.state.inputRef.current)==null||W.focus())}},T?T.getValidationProps(h):h,Re],stateAttributesMapping:Q3})}),F3=x.createContext(null);function X3(){return x.useContext(F3)}function Z3(n){const{children:i}=n,{filteredItems:r}=Xr(),a=X3(),c=a?a.items:r;return c?p.jsx(x.Fragment,{children:c.map(i)}):null}const J3=x.forwardRef(function(i,r){var a;const{render:c,className:f,children:d,...h}=i,m=er(),g=Td(),v=!!ey(!0),{filteredItems:b}=Xr(),S=be(m,Le.items),T=be(m,Le.labelsRef),C=be(m,Le.listRef),w=be(m,Le.selectionMode),j=be(m,Le.grid),O=be(m,Le.popupProps),E=be(m,Le.disabled),A=be(m,Le.readOnly),N=be(m,Le.virtualized),L=w==="multiple",D=b.length===0,_=_e($=>{m.set("positionerElement",$)}),M=_e($=>{m.set("listElement",$)}),Q=x.useMemo(()=>typeof d=="function"?a||(a=p.jsx(Z3,{children:d})):d,[d]),J=x.useMemo(()=>({empty:D}),[D]),se=g.useState("floatingId"),te=Bt("div",i,{state:J,ref:[r,M,v?null:_],props:[O,{children:Q,tabIndex:-1,id:se,role:j?"grid":"listbox","aria-multiselectable":L?"true":void 0,onKeyDown($){if(!(E||A)&&$.key==="Enter"){const oe=m.state.activeIndex;if(oe==null)return;rn($);const V=$.nativeEvent,H=m.state.listRef.current[oe];H&&(m.state.selectionEventRef.current=V,H.click(),m.state.selectionEventRef.current=null)}},onKeyDownCapture(){m.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){m.state.keyboardActiveRef.current=!1}},h]});return N?te:p.jsx(Fp,{elementsRef:C,labelsRef:S?void 0:T,children:te})}),_R=x.createContext(void 0);function $3(){const n=x.useContext(_R);if(n===void 0)throw new Error(Gn(20));return n}const W3=x.forwardRef(function(i,r){const{keepMounted:a=!1,...c}=i,f=er(),d=be(f,Le.mounted),h=be(f,Le.forceMounted);return d||a||h?p.jsx(_R.Provider,{value:a,children:p.jsx(kp,{ref:r,...c})}):null}),e4=x.forwardRef(function(i,r){const{render:a,className:c,anchor:f,positionMethod:d="absolute",side:h="bottom",align:m="center",sideOffset:g=0,alignOffset:v=0,collisionBoundary:b="clipping-ancestors",collisionPadding:S=5,arrowPadding:T=5,sticky:C=!1,disableAnchorTracking:w=!1,collisionAvoidance:j=fE,...O}=i,E=er(),{filteredItems:A}=Xr(),N=Td(),L=$3(),D=be(E,Le.modal),_=be(E,Le.open),M=be(E,Le.mounted),Q=be(E,Le.openMethod),J=be(E,Le.triggerElement),se=be(E,Le.inputElement),te=be(E,Le.inputInsidePopup),$=A.length===0,V=gR({anchor:f??(te?J:se),floatingRootContext:N,positionMethod:d,mounted:M,side:h,sideOffset:g,align:m,alignOffset:v,arrowPadding:T,collisionBoundary:b,collisionPadding:S,sticky:C,disableAnchorTracking:w,keepMounted:L,collisionAvoidance:j,lazyFlip:!0});Kp(_&&D&&Q!=="touch",J);const H=x.useMemo(()=>{const Re={...V.positionerStyles};return _||(Re.pointerEvents="none"),{role:"presentation",hidden:!M,style:Re}},[_,M,V.positionerStyles]),ne=x.useMemo(()=>({open:_,side:V.side,align:V.align,anchorHidden:V.anchorHidden,empty:$}),[_,V.side,V.align,V.anchorHidden,$]);ke(()=>{E.set("popupSide",V.side)},[E,V.side]);const F=x.useMemo(()=>({side:V.side,align:V.align,arrowRef:V.arrowRef,arrowUncentered:V.arrowUncentered,arrowStyles:V.arrowStyles,anchorHidden:V.anchorHidden,isPositioned:V.isPositioned}),[V.side,V.align,V.arrowRef,V.arrowUncentered,V.arrowStyles,V.anchorHidden,V.isPositioned]),re=_e(Re=>{E.set("positionerElement",Re)}),K=Bt("div",i,{state:ne,ref:[r,re],props:[H,O],stateAttributesMapping:Ro});return p.jsxs(DR.Provider,{value:F,children:[M&&D&&p.jsx(Zp,{inert:Qp(!_),cutout:se??J}),K]})}),t4={...Ro,...Xu},n4=x.forwardRef(function(i,r){const{render:a,className:c,initialFocus:f,finalFocus:d,...h}=i,m=er(),g=ey(),v=Td(),{filteredItems:b}=Xr(),S=be(m,Le.mounted),T=be(m,Le.open),C=be(m,Le.openMethod),w=be(m,Le.transitionStatus),j=be(m,Le.inputInsidePopup),O=be(m,Le.inputElement),E=b.length===0;Fr({open:T,ref:m.state.popupRef,onComplete(){T&&m.state.onOpenChangeComplete(!0)}});const A=x.useMemo(()=>({open:T,side:g.side,align:g.align,anchorHidden:g.anchorHidden,transitionStatus:w,empty:E}),[T,g.side,g.align,g.anchorHidden,w,E]),N=Bt("div",i,{state:A,ref:[r,m.state.popupRef],props:[{role:j?"dialog":"presentation",tabIndex:-1,onFocus(M){var J;const Q=Pn(M.nativeEvent);C!=="touch"&&(Rt(m.state.listElement,Q)||Q===M.currentTarget)&&((J=m.state.inputRef.current)==null||J.focus())}},RR(w),h],stateAttributesMapping:t4}),D=f===void 0?j?M=>M==="touch"?m.state.popupRef.current:O:!1:f;let _;return d!=null?_=d:_=j?void 0:!1,p.jsx(Up,{context:v,disabled:!S,modal:!j,openInteractionType:C,initialFocus:D,returnFocus:_,children:N})}),l4=x.createContext(void 0),i4=x.createContext(!1);function s4(){return x.useContext(i4)}const r4=x.memo(x.forwardRef(function(i,r){const{render:a,className:c,value:f=null,index:d,disabled:h=!1,nativeButton:m=!1,...g}=i,v=x.useRef(!1),b=x.useRef(null),S=$p({index:d,textRef:b,indexGuessBehavior:Jp.GuessFromOrder}),T=er(),C=s4(),{flatFilteredItems:w}=Xr(),j=be(T,Le.open),O=be(T,Le.selectionMode),E=be(T,Le.readOnly),A=be(T,Le.virtualized),N=be(T,Le.isItemEqualToValue),L=O!=="none",D=d??(A?bo(w,f,N):S.index),_=S.index!==-1,M=be(T,Le.id),Q=be(T,Le.isActive,D),J=be(T,Le.isSelected,f),se=be(T,Le.items),te=be(T,Le.getItemProps),$=x.useRef(null),oe=M!=null&&_?`${M}-${D}`:void 0,V=J&&L;ke(()=>{if(!(_&&(A||d!=null)))return;const B=T.state.listRef.current;return B[D]=$.current,()=>{delete B[D]}},[_,A,D,d,T]),ke(()=>{if(!_||se)return;const z=T.state.valuesRef.current;return z[D]=f,O!=="none"&&T.state.allValuesRef.current.push(f),()=>{delete z[D]}},[_,se,D,f,T,O]),ke(()=>{if(!j){v.current=!1;return}if(!_||se)return;const z=T.state.selectedValue,B=Array.isArray(z)?z[z.length-1]:z;Xi(B,f,N)&&T.set("selectedIndex",D)},[_,se,j,T,D,f,N]);const H=x.useMemo(()=>({disabled:h,selected:V,highlighted:Q}),[h,V,Q]),ne=te({active:Q,selected:V});ne.id=void 0,ne.onFocus=void 0;const{getButtonProps:F,buttonRef:re}=Yu({disabled:h,focusableWhenDisabled:!0,native:m});function K(z){function B(){T.state.handleSelection(z,f)}T.state.submitOnItemClick?(Qi.flushSync(B),T.state.requestSubmit()):B()}const Re={id:oe,role:C?"gridcell":"option","aria-disabled":h||void 0,"aria-selected":L?V:void 0,tabIndex:void 0,onPointerDownCapture(z){v.current=!0,z.preventDefault()},onClick(z){h||E||K(z.nativeEvent)},onMouseUp(z){const B=v.current;v.current=!1,!(h||E||z.button!==0||B||!Q)&&K(z.nativeEvent)}},Ye=Bt("div",i,{ref:[re,r,S.ref,$],state:H,props:[ne,Re,g,F]}),Oe=x.useMemo(()=>({selected:V,textRef:b}),[V,b]);return p.jsx(l4.Provider,{value:Oe,children:Ye})})),a4=x.forwardRef(function(i,r){const{render:a,className:c,children:f,...d}=i,{filteredItems:h}=Xr(),m=er(),g=h.length===0?f:null;return Bt("div",i,{ref:[r,m.state.emptyRef],props:[{children:g,role:"status","aria-live":"polite","aria-atomic":!0},d]})});function o4(n){return n==null||n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}const u4="data-composite-item-active",c4=[];function f4(n){const{itemSizes:i,cols:r=1,loopFocus:a=!0,dense:c=!1,orientation:f="both",direction:d,highlightedIndex:h,onHighlightedIndexChange:m,rootRef:g,enableHomeAndEndKeys:v=!1,stopEventPropagation:b=!1,disabledIndices:S,modifierKeys:T=c4}=n,[C,w]=x.useState(0),j=r>1,O=x.useRef(null),E=Yi(O,g),A=x.useRef([]),N=x.useRef(!1),L=h??C,D=_e((Q,J=!1)=>{if((m??w)(Q),J){const se=A.current[Q];bS(O.current,se,d,f)}}),_=_e(Q=>{if(Q.size===0||N.current)return;N.current=!0;const J=Array.from(Q.keys()),se=J.find($=>$==null?void 0:$.hasAttribute(u4))??null,te=se?J.indexOf(se):-1;te!==-1&&D(te),bS(O.current,se,d,f)}),M=x.useMemo(()=>({"aria-orientation":f==="both"?void 0:f,ref:E,onFocus(Q){!O.current||!yS(Q.target)||Q.target.setSelectionRange(0,Q.target.value.length??0)},onKeyDown(Q){const J=v?E3:SR;if(!J.has(Q.key)||d4(Q,T)||!O.current)return;const te=d==="rtl",$=te?ku:$a,oe={horizontal:$,vertical:Nr,both:$}[f],V=te?$a:ku,H={horizontal:V,vertical:Ja,both:V}[f];if(yS(Q.target)&&!o4(Q.target)){const Oe=Q.target.selectionStart,z=Q.target.selectionEnd,B=Q.target.value??"";if(Oe==null||Q.shiftKey||Oe!==z||Q.key!==H&&Oe<B.length||Q.key!==oe&&Oe>0)return}let ne=L;const F=Yf(A,S),re=Wg(A,S);if(j){const Oe=i||Array.from({length:A.current.length},()=>({width:1,height:1})),z=_E(Oe,r,c),B=z.findIndex(ie=>ie!=null&&!Qs(A,ie,S)),W=z.reduce((ie,ue,me)=>ue!=null&&!Qs(A,ue,S)?me:ie,-1);ne=z[DE({current:z.map(ie=>ie?A.current[ie]:null)},{event:Q,orientation:f,loopFocus:a,cols:r,disabledIndices:LE([...S||A.current.map((ie,ue)=>Qs(A,ue)?ue:void 0),void 0],z),minIndex:B,maxIndex:W,prevIndex:kE(L>re?F:L,Oe,z,r,Q.key===Nr?"bl":Q.key===$a?"tr":"tl"),rtl:te})]}const K={horizontal:[$],vertical:[Nr],both:[$,Nr]}[f],Re={horizontal:[V],vertical:[Ja],both:[V,Ja]}[f],Ye=j?J:{horizontal:v?x3:vR,vertical:v?S3:xR,both:J}[f];v&&(Q.key===Zu?ne=F:Q.key===Ju&&(ne=re)),ne===L&&(K.includes(Q.key)||Re.includes(Q.key))&&(a&&ne===re&&K.includes(Q.key)?ne=F:a&&ne===F&&Re.includes(Q.key)?ne=re:ne=Ln(A,{startingIndex:ne,decrement:Re.includes(Q.key),disabledIndices:S})),ne!==L&&!Fa(A,ne)&&(b&&Q.stopPropagation(),Ye.has(Q.key)&&Q.preventDefault(),D(ne,!0),queueMicrotask(()=>{var Oe;(Oe=A.current[ne])==null||Oe.focus()}))}}),[r,c,d,S,A,v,L,j,i,a,E,T,D,f,b]);return x.useMemo(()=>({props:M,highlightedIndex:L,onHighlightedIndexChange:D,elementsRef:A,disabledIndices:S,onMapChange:_,relayKeyboardEvent:M.onKeyDown}),[M,L,D,A,S,_])}function d4(n,i){for(const r of O3.values())if(!i.includes(r)&&n.getModifierState(r))return!0;return!1}function h4(n){const{render:i,className:r,refs:a=Ul,props:c=Ul,state:f=fn,stateAttributesMapping:d,highlightedIndex:h,onHighlightedIndexChange:m,orientation:g,dense:v,itemSizes:b,loopFocus:S,cols:T,enableHomeAndEndKeys:C,onMapChange:w,stopEventPropagation:j=!0,rootRef:O,disabledIndices:E,modifierKeys:A,highlightItemOnHover:N=!1,tag:L="div",...D}=n,_=Xp(),{props:M,highlightedIndex:Q,onHighlightedIndexChange:J,elementsRef:se,onMapChange:te,relayKeyboardEvent:$}=f4({itemSizes:b,cols:T,loopFocus:S,dense:v,orientation:g,highlightedIndex:h,onHighlightedIndexChange:m,rootRef:O,stopEventPropagation:j,enableHomeAndEndKeys:C,direction:_,disabledIndices:E,modifierKeys:A}),oe=Bt(L,n,{state:f,ref:a,props:[M,...c,D],stateAttributesMapping:d}),V=x.useMemo(()=>({highlightedIndex:Q,onHighlightedIndexChange:J,highlightItemOnHover:N,relayKeyboardEvent:$}),[Q,J,N,$]);return p.jsx(hE.Provider,{value:V,children:p.jsx(Fp,{elementsRef:se,onMapChange:H=>{w==null||w(H),te(H)},children:oe})})}const kR=x.createContext(void 0);function m4(n=!0){const i=x.useContext(kR);if(i===void 0&&!n)throw new Error(Gn(7));return i}let g4=(function(n){return n.disabled="data-disabled",n.orientation="data-orientation",n.multiple="data-multiple",n})({});const SS={multiple(n){return n?{[g4.multiple]:""}:null}},p4=x.forwardRef(function(i,r){const{defaultValue:a,disabled:c=!1,loopFocus:f=!0,onValueChange:d,orientation:h="horizontal",multiple:m=!1,value:g,className:v,render:b,...S}=i,T=bR(),C=x.useMemo(()=>{if(g===void 0)return a??[]},[g,a]),w=((T==null?void 0:T.disabled)??!1)||c,[j,O]=Vr({controlled:g,default:C,name:"ToggleGroup",state:"value"}),E=_e((_,M,Q)=>{let J;if(m?(J=j.slice(),M?J.push(_):J.splice(j.indexOf(_),1)):J=M?[_]:[],Array.isArray(J)){if(d==null||d(J,Q),Q.isCanceled)return;O(J)}}),A=x.useMemo(()=>({disabled:w,multiple:m,orientation:h}),[w,h,m]),N=x.useMemo(()=>({disabled:w,orientation:h,setGroupValue:E,value:j}),[w,h,E,j]),L={role:"group"},D=Bt("div",i,{enabled:!!T,state:A,ref:r,props:[L,S],stateAttributesMapping:SS});return p.jsx(kR.Provider,{value:N,children:T?D:p.jsx(h4,{render:b,className:v,state:A,refs:[r],props:[L,S],stateAttributesMapping:SS,loopFocus:f})})});function y4(n={}){const{highlightItemOnHover:i,highlightedIndex:r,onHighlightedIndexChange:a}=mE(),{ref:c,index:f}=$p(n),d=r===f,h=x.useRef(null),m=Yi(c,h);return{compositeProps:x.useMemo(()=>({tabIndex:d?0:-1,onFocus(){a(f)},onMouseMove(){const v=h.current;if(!i||!v)return;const b=v.hasAttribute("disabled")||v.ariaDisabled==="true";!d&&!b&&v.focus()}}),[d,a,f,i]),compositeRef:m,index:f}}function b4(n){const{render:i,className:r,state:a=fn,props:c=Ul,refs:f=Ul,metadata:d,stateAttributesMapping:h,tag:m="div",...g}=n,{compositeProps:v,compositeRef:b}=y4({metadata:d});return Bt(m,n,{state:a,ref:[...f,b],props:[v,...c,g],stateAttributesMapping:h})}const v4=x.forwardRef(function(i,r){const{className:a,defaultPressed:c=!1,disabled:f=!1,form:d,onPressedChange:h,pressed:m,render:g,type:v,value:b,nativeButton:S=!0,...T}=i,C=b??"",w=m4(),j=(w==null?void 0:w.value)??[],O=w?void 0:c,E=(f||(w==null?void 0:w.disabled))??!1,[A,N]=Vr({controlled:w&&C?(j==null?void 0:j.indexOf(C))>-1:m,default:O,name:"Toggle",state:"pressed"}),L=_e((te,$)=>{var oe;(oe=w==null?void 0:w.setGroupValue)==null||oe.call(w,C,te,$),h==null||h(te,$)}),{getButtonProps:D,buttonRef:_}=Yu({disabled:E,native:S}),M=x.useMemo(()=>({disabled:E,pressed:A}),[E,A]),Q=[_,r],J=[{"aria-pressed":A,onClick(te){const $=!A,oe=We(dl,te.nativeEvent);L($,oe),!oe.isCanceled&&N($)}},T,D],se=Bt("button",i,{enabled:!w,state:M,ref:Q,props:J});return w?p.jsx(b4,{tag:"button",render:g,className:a,state:M,refs:Q,props:J}):se}),LR=x.createContext(void 0);function wo(n){const i=x.useContext(LR);if(n===!1&&i===void 0)throw new Error(Gn(27));return i}const x4={...Ro,...Xu},S4=x.forwardRef(function(i,r){const{render:a,className:c,forceRender:f=!1,...d}=i,{store:h}=wo(),m=h.useState("open"),g=h.useState("nested"),v=h.useState("mounted"),b=h.useState("transitionStatus"),S=x.useMemo(()=>({open:m,transitionStatus:b}),[m,b]);return Bt("div",i,{state:S,ref:[h.context.backdropRef,r],stateAttributesMapping:x4,props:[{role:"presentation",hidden:!v,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:f||!g})}),E4=x.forwardRef(function(i,r){const{render:a,className:c,id:f,...d}=i,{store:h}=wo(),m=hd(f);return h.useSyncedValueWithCleanup("descriptionElementId",m),Bt("p",i,{ref:r,props:[{id:m},d]})});let R4=(function(n){return n.nestedDialogs="--nested-dialogs",n})({}),w4=(function(n){return n[n.open=Ar.open]="open",n[n.closed=Ar.closed]="closed",n[n.startingStyle=Ar.startingStyle]="startingStyle",n[n.endingStyle=Ar.endingStyle]="endingStyle",n.nested="data-nested",n.nestedDialogOpen="data-nested-dialog-open",n})({});const UR=x.createContext(void 0);function C4(){const n=x.useContext(UR);if(n===void 0)throw new Error(Gn(26));return n}const T4={...Ro,...Xu,nestedDialogOpen(n){return n?{[w4.nestedDialogOpen]:""}:null}},O4=x.forwardRef(function(i,r){const{className:a,finalFocus:c,initialFocus:f,render:d,...h}=i,{store:m}=wo(),g=m.useState("descriptionElementId"),v=m.useState("disablePointerDismissal"),b=m.useState("floatingRootContext"),S=m.useState("popupProps"),T=m.useState("modal"),C=m.useState("mounted"),w=m.useState("nested"),j=m.useState("nestedOpenDialogCount"),O=m.useState("open"),E=m.useState("openMethod"),A=m.useState("titleElementId"),N=m.useState("transitionStatus"),L=m.useState("role");C4(),Fr({open:O,ref:m.context.popupRef,onComplete(){var se,te;O&&((te=(se=m.context).onOpenChangeComplete)==null||te.call(se,!0))}});function D(se){return se==="touch"?m.context.popupRef.current:!0}const _=f===void 0?D:f,M=j>0,Q=x.useMemo(()=>({open:O,nested:w,transitionStatus:N,nestedDialogOpen:M}),[O,w,N,M]),J=Bt("div",i,{state:Q,props:[S,{"aria-labelledby":A??void 0,"aria-describedby":g??void 0,role:L,tabIndex:-1,hidden:!C,onKeyDown(se){ER.has(se.key)&&se.stopPropagation()},style:{[R4.nestedDialogs]:j}},h],ref:[r,m.context.popupRef,m.useStateSetter("popupElement")],stateAttributesMapping:T4});return p.jsx(Up,{context:b,openInteractionType:E,disabled:!C,closeOnFocusOut:!v,initialFocus:_,returnFocus:c,modal:T!==!1,restoreFocus:"popup",children:J})}),j4=x.forwardRef(function(i,r){const{keepMounted:a=!1,...c}=i,{store:f}=wo(),d=f.useState("mounted"),h=f.useState("modal");return d||a?p.jsx(UR.Provider,{value:a,children:p.jsxs(kp,{ref:r,...c,children:[d&&h===!0&&p.jsx(Zp,{ref:f.context.internalBackdropRef,inert:Qp(!open)}),i.children]})}):null});function A4(n){const{store:i,parentContext:r,actionsRef:a}=n,c=i.useState("open"),f=i.useState("disablePointerDismissal"),d=i.useState("modal"),h=i.useState("popupElement"),{openMethod:m,triggerProps:g,reset:v}=MR(c);CM(i);const{forceUnmount:b}=TM(c,i,()=>{v()}),S=_e(J=>{const se=We(J);return se.preventUnmountOnClose=()=>{i.set("preventUnmountingOnClose",!0)},se}),T=x.useCallback(()=>{i.setOpen(!1,S(p2))},[i,S]);x.useImperativeHandle(a,()=>({unmount:b,close:T}),[b,T]);const C=MM({popupStore:i,onOpenChange:i.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[w,j]=x.useState(0),O=w===0,E=LM(C),A=Vp(C,{outsidePressEvent(){return i.context.internalBackdropRef.current||i.context.backdropRef.current?"intentional":{mouse:d==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(J){if("button"in J&&J.button!==0||"touches"in J&&J.touches.length!==1)return!1;const se=Pn(J);if(O&&!f){const te=se;return d&&(i.context.internalBackdropRef.current||i.context.backdropRef.current)?i.context.internalBackdropRef.current===te||i.context.backdropRef.current===te||Rt(te,h)&&!(te!=null&&te.hasAttribute("data-base-ui-portal")):!0}return!1},escapeKey:O});Kp(c&&d===!0,h);const{getReferenceProps:N,getFloatingProps:L,getTriggerProps:D}=Gp([E,A]);i.useContextCallback("onNestedDialogOpen",J=>{j(J+1)}),i.useContextCallback("onNestedDialogClose",()=>{j(0)}),x.useEffect(()=>(r!=null&&r.onNestedDialogOpen&&c&&r.onNestedDialogOpen(w),r!=null&&r.onNestedDialogClose&&!c&&r.onNestedDialogClose(),()=>{r!=null&&r.onNestedDialogClose&&c&&r.onNestedDialogClose()}),[c,r,w]);const _=x.useMemo(()=>N(g),[N,g]),M=x.useMemo(()=>D(g),[D,g]),Q=x.useMemo(()=>L(),[L]);i.useSyncedValues({openMethod:m,activeTriggerProps:_,inactiveTriggerProps:M,popupProps:Q,floatingRootContext:C,nestedOpenDialogCount:w})}const N4={...AM,modal:ge(n=>n.modal),nested:ge(n=>n.nested),nestedOpenDialogCount:ge(n=>n.nestedOpenDialogCount),disablePointerDismissal:ge(n=>n.disablePointerDismissal),openMethod:ge(n=>n.openMethod),descriptionElementId:ge(n=>n.descriptionElementId),titleElementId:ge(n=>n.titleElementId),viewportElement:ge(n=>n.viewportElement),role:ge(n=>n.role)};class M4 extends SE{constructor(r){super(z4(r),{popupRef:x.createRef(),backdropRef:x.createRef(),internalBackdropRef:x.createRef(),triggerElements:new qp,onOpenChange:void 0,onOpenChangeComplete:void 0},N4);Nt(this,"setOpen",(r,a)=>{var h,m,g,v;if(a.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!r&&a.trigger==null&&this.state.activeTriggerId!=null&&(a.trigger=this.state.activeTriggerElement??void 0),(m=(h=this.context).onOpenChange)==null||m.call(h,r,a),a.isCanceled)return;const c={open:r,nativeEvent:a.event,reason:a.reason,nested:this.state.nested};(g=this.state.floatingRootContext.context.events)==null||g.emit("openchange",c);const f={open:r},d=((v=a.trigger)==null?void 0:v.id)??null;(d||r)&&(f.activeTriggerId=d,f.activeTriggerElement=a.trigger??null),this.update(f)})}}function z4(n={}){return{...jM(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...n}}function D4(n){const{children:i,open:r,defaultOpen:a=!1,onOpenChange:c,onOpenChangeComplete:f,disablePointerDismissal:d=!1,modal:h=!0,actionsRef:m,handle:g,triggerId:v,defaultTriggerId:b=null}=n,S=wo(!0),T=!!S,C=hl(()=>(g==null?void 0:g.store)??new M4({open:r??a,activeTriggerId:v!==void 0?v:b,modal:h,disablePointerDismissal:d,nested:T})).current;C.useControlledProp("open",r,a),C.useControlledProp("activeTriggerId",v,b),C.useSyncedValues({disablePointerDismissal:d,nested:T,modal:h}),C.useContextCallback("onOpenChange",c),C.useContextCallback("onOpenChangeComplete",f);const w=C.useState("payload");A4({store:C,actionsRef:m,parentContext:S==null?void 0:S.store.context});const j=x.useMemo(()=>({store:C}),[C]);return p.jsx(LR.Provider,{value:j,children:typeof i=="function"?i({payload:w}):i})}const _4=x.forwardRef(function(i,r){const{render:a,className:c,id:f,...d}=i,{store:h}=wo(),m=hd(f);return h.useSyncedValueWithCleanup("titleElementId",m),Bt("h2",i,{ref:r,props:[{id:m},d]})});var HR=class extends Error{constructor(i,r){super(r.error||`HTTP ${i}`);Nt(this,"status");Nt(this,"body");this.name="ApiError",this.status=i,this.body=r}};function k4(n){const i=new URLSearchParams;for(const[a,c]of Object.entries(n))c==null||c===""||(typeof c=="object"?c.length&&i.set(a,c.join(",")):i.set(a,String(c)));const r=i.toString();return r?`?${r}`:""}async function L4(n){const i=n.statusText||`HTTP ${n.status}`;let r;try{r=await n.json()}catch{return{error:i,status:n.status}}const a=r&&typeof r=="object"&&!Array.isArray(r)?r:{},c=typeof a.error=="string"&&a.error?a.error:i;return{...a,error:c,status:n.status}}function U4(n={}){const i=n.errorClass??HR;let r=(n.base??"").replace(/\/$/,""),a=n.credentials??"same-origin",c=n.fetch??((m,g)=>fetch(m,g)),f=null;const d=m=>r?`${r}/${m}`:m,h=async(m,g)=>{const v=new Headers;typeof(g==null?void 0:g.body)=="string"&&v.set("content-type","application/json"),f&&v.set("authorization",`Bearer ${f}`),new Headers(g==null?void 0:g.headers).forEach((S,T)=>v.set(T,S));const b=await c(d(m),{credentials:a,...g,headers:Object.fromEntries(v.entries())});if(!b.ok)throw new i(b.status,await L4(b));return b};return{setApiBase(m,g){r=m.replace(/\/$/,""),g!=null&&g.credentials&&(a=g.credentials),g!=null&&g.fetch&&(c=g.fetch)},setApiToken(m){f=m},getApiToken:()=>f,apiUrl:d,send:h,async req(m,g){const v=await(await h(m,g)).text();if(v)return JSON.parse(v)},query:k4}}function IR(n){if(n==null||n==="")return;const i=n instanceof Date?n:new Date(n);return Number.isNaN(i.getTime())?void 0:i}function Du(n,i={}){const r=IR(n);return r?new Intl.DateTimeFormat(i.locale,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",...i.seconds?{second:"2-digit"}:{},...i.timeZone?{timeZone:i.timeZone}:{}}).format(r):"—"}const H4=[[1e3,"s"],[6e4,"m"],[36e5,"h"],[864e5,"d"],[30*864e5,"mo"],[365*864e5,"y"]];function I4(n,i=Date.now()){const r=IR(n);if(!r)return"—";const a=i-r.getTime(),c=Math.abs(a);if(c<1e4)return"just now";let f=Math.floor(c/1e3),d="s";for(const[h,m]of H4)c>=h&&(f=Math.floor(c/h),d=m);return a>=0?`${f}${d} ago`:`in ${f}${d}`}function wg(n,i="en-US"){return n==null||!Number.isFinite(n)?"—":new Intl.NumberFormat(i).format(Math.round(n))}function VR({value:n,onValueChange:i,options:r,size:a="md"}){return p.jsx(p4,{value:[n],onValueChange:c=>{const f=c.find(d=>d!==n)??c[0];f&&i(f)},className:"inline-flex items-center gap-0.5 rounded-md border border-border bg-secondary/50 p-0.5",children:r.map(c=>p.jsx(v4,{value:c.value,"aria-label":c["aria-label"],className:xt("inline-flex items-center justify-center gap-1.5 rounded-[5px] font-medium text-muted-foreground outline-none transition-colors","hover:text-foreground","data-[pressed]:bg-card data-[pressed]:text-foreground data-[pressed]:shadow-sm","focus-visible:ring-2 focus-visible:ring-ring",a==="sm"?"h-6 px-2 text-xs":"h-7 px-2.5 text-[13px]"),children:c.label},c.value))})}function Ks({value:n,onValueChange:i,options:r,placeholder:a="Select…",disabled:c,className:f,"aria-label":d}){return p.jsxs(IM,{items:r,value:n,onValueChange:h=>i(h),disabled:c,children:[p.jsxs(XM,{"aria-label":d,className:xt("inline-flex h-9 min-w-0 items-center justify-between gap-2 rounded-md border border-input bg-secondary/40 px-3 text-[13px] text-foreground outline-none transition-colors","hover:bg-secondary/70 focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50 data-[popup-open]:border-ring",f),children:[p.jsx(JM,{className:"truncate",children:h=>{const m=r.find(g=>g.value===h);return m?m.label:p.jsx("span",{className:"text-muted-foreground",children:a})}}),p.jsx($M,{children:p.jsx(s1,{className:"size-3.5 shrink-0 text-muted-foreground"})})]}),p.jsx(e3,{container:Ep(),children:p.jsx(b3,{sideOffset:6,className:"z-50 outline-none",alignItemWithTrigger:!1,children:p.jsx(N3,{className:xt("max-h-[min(20rem,var(--available-height))] min-w-[var(--anchor-width)] overflow-y-auto rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-xl outline-none","origin-[var(--transform-origin)] transition-[transform,opacity] data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0"),children:r.map(h=>p.jsxs(M3,{value:h.value,className:xt("flex cursor-pointer select-none items-start gap-2 rounded-md py-1.5 pl-2 pr-2 text-[13px] outline-none","data-[highlighted]:bg-accent/15 data-[highlighted]:text-foreground"),children:[p.jsx("span",{className:"flex w-4 shrink-0 items-center justify-center pt-0.5",children:p.jsx(z3,{children:p.jsx(l1,{className:"size-3.5 text-accent"})})}),p.jsxs("span",{className:"flex flex-col",children:[p.jsx(_3,{children:h.label}),h.description?p.jsx("span",{className:"text-xs text-muted-foreground",children:h.description}):null]})]},h.value))})})})]})}function V4({value:n,options:i,onSelect:r,onCreate:a,placeholder:c="Select…",createLabel:f=g=>`Create "${g}"`,disabled:d,className:h,"aria-label":m}){const[g,v]=x.useState(""),b=g.trim(),S=b.toLowerCase(),T=i.map(O=>({value:O,label:O})),C=b?T.filter(O=>O.label.toLowerCase().includes(S)):T,w=i.some(O=>O.toLowerCase()===S),j=b&&!w?[...C,{value:"\0create",label:f(b),create:!0}]:C;return p.jsxs(B3,{items:j,filter:null,inputValue:g,onInputValueChange:v,onOpenChange:O=>{O||v("")},onValueChange:O=>{O&&(O.create?a(b):r(O.value),v(""))},itemToStringLabel:O=>O.label,disabled:d,children:[p.jsxs(K3,{"aria-label":m,className:xt("inline-flex h-9 min-w-0 items-center justify-between gap-2 rounded-md border border-input bg-secondary/40 px-3 text-[13px] text-foreground outline-none transition-colors","hover:bg-secondary/70 focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50 data-[popup-open]:border-ring",h),children:[p.jsx("span",{className:xt("truncate",!n&&"text-muted-foreground"),children:n||c}),p.jsx(s1,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),p.jsx(W3,{container:Ep(),children:p.jsx(e4,{sideOffset:6,className:"z-50 outline-none",children:p.jsxs(n4,{className:xt("w-[max(var(--anchor-width),13rem)] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-xl outline-none","origin-[var(--transform-origin)] transition-[transform,opacity] data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0"),children:[p.jsx(Y3,{placeholder:"Search or create…",className:"mb-1 h-8 w-full rounded-md border border-input bg-secondary/40 px-2.5 text-[13px] text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring"}),p.jsx(a4,{className:"px-2 py-2 text-[13px] text-muted-foreground",children:"No matches."}),p.jsx(J3,{className:"max-h-64 overflow-y-auto",children:O=>p.jsxs(r4,{value:O,className:xt("flex cursor-pointer select-none items-center gap-2 rounded-md py-1.5 pl-2 pr-2 text-[13px] outline-none","data-[highlighted]:bg-accent/15 data-[highlighted]:text-foreground",O.create&&"text-accent"),children:[O.create?p.jsx(b1,{className:"size-3.5 shrink-0"}):p.jsx("span",{className:"flex w-4 shrink-0 items-center justify-center",children:O.value===n&&p.jsx(l1,{className:"size-3.5 text-accent"})}),p.jsx("span",{className:"truncate",children:O.label})]},O.value)})]})})})]})}const Un=x.forwardRef(function({className:i,...r},a){return p.jsx("input",{ref:a,className:xt("h-9 w-full rounded-md border border-input bg-secondary/40 px-3 text-[13px] text-foreground outline-none transition-colors placeholder:text-muted-foreground","hover:bg-secondary/60 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",i),...r})}),B4=x.forwardRef(function({className:i,...r},a){return p.jsx("textarea",{ref:a,className:xt("w-full rounded-md border border-input bg-secondary/40 px-3 py-2 text-[13px] text-foreground outline-none transition-colors placeholder:text-muted-foreground","hover:bg-secondary/60 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",i),...r})}),q4={primary:"bg-primary text-primary-foreground hover:bg-primary/90 border border-transparent",secondary:"bg-secondary/60 text-foreground border border-border hover:bg-secondary",ghost:"bg-transparent text-muted-foreground hover:bg-secondary/60 hover:text-foreground border border-transparent",danger:"bg-transparent text-destructive border border-destructive/30 hover:bg-destructive/10"},P4={sm:"h-7 px-2.5 text-xs gap-1.5",md:"h-9 px-3.5 text-[13px] gap-2",icon:"h-8 w-8 justify-center"},Lt=x.forwardRef(function({className:i,variant:r="secondary",size:a="md",loading:c=!1,icon:f,children:d,disabled:h,...m},g){return p.jsxs("button",{ref:g,disabled:h||c,className:xt("inline-flex shrink-0 items-center rounded-md font-medium outline-none transition-colors","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50",q4[r],P4[a],i),...m,children:[c?p.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",className:"animate-spin","aria-hidden":!0,children:p.jsx("circle",{cx:"7",cy:"7",r:"5",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"20",strokeDashoffset:"10",strokeLinecap:"round"})}):f,d]})});function Wa({className:n,children:i}){return p.jsx("span",{className:xt("inline-flex items-center gap-1 rounded-md border px-1.5 py-0.5 text-[11px] font-medium uppercase tracking-wide","border-border bg-secondary/60 text-muted-foreground",n),children:i})}function G4(n){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(n)}`}const ES=n=>n.trimStart().startsWith("<")?G4(n):n;function Y4({light:n,dark:i,className:r,alt:a=""}){const{store:c,resolved:f}=Sp(),d=x.useMemo(()=>ES(n),[n]),h=x.useMemo(()=>i?ES(i):d,[i,d]),m=a?void 0:!0;return c?p.jsx("img",{src:f==="dark"?h:d,alt:a,"aria-hidden":m,className:xt("shrink-0",r)}):p.jsxs(p.Fragment,{children:[p.jsx("img",{src:d,alt:a,"aria-hidden":m,className:xt("shrink-0 dark:hidden",r)}),p.jsx("img",{src:h,alt:"","aria-hidden":!0,className:xt("hidden shrink-0 dark:block",r)})]})}function Q4({className:n}){return p.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:xt("animate-spin",n),"aria-hidden":!0,children:p.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"24",strokeDashoffset:"12",strokeLinecap:"round"})})}function Co({label:n}){return p.jsxs("div",{className:"mt-8 flex items-center justify-center gap-2 text-[13px] text-muted-foreground",children:[p.jsx(Q4,{}),n]})}function Dt({className:n,children:i}){return p.jsx("span",{className:xt("font-mono text-[12px] text-foreground",n),children:i})}function Xs({children:n,wide:i,className:r}){return p.jsx("div",{className:xt("mx-auto px-4 py-8 sm:px-6",i?"max-w-7xl":"max-w-6xl",r),children:n})}function Yr({title:n,description:i,actions:r}){return p.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:n}),i?p.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:i}):null]}),r?p.jsx("div",{className:"flex flex-wrap items-center gap-2",children:r}):null]})}function yi({title:n,description:i,actions:r,children:a,className:c,bodyClassName:f,flush:d,id:h,"aria-label":m}){return p.jsxs("section",{id:h,"aria-label":m??(typeof n=="string"?n:void 0),className:xt("rounded-xl border border-border bg-card",c),children:[p.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border px-4 py-3",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("h2",{className:"text-[13px] font-semibold text-foreground",children:n}),i?p.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:i}):null]}),r?p.jsx("div",{className:"flex items-center gap-2",children:r}):null]}),p.jsx("div",{className:xt(d?"":"px-4 py-4",f),children:a})]})}function $u({open:n,onClose:i,title:r,description:a,children:c,footer:f,wide:d}){return p.jsx(D4,{open:n,onOpenChange:h=>!h&&i(),children:p.jsxs(j4,{container:Ep(),children:[p.jsx(S4,{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm"}),p.jsxs(O4,{className:xt("fixed left-1/2 top-1/2 z-50 flex max-h-[85vh] w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col rounded-xl border border-border bg-card text-card-foreground shadow-2xl outline-none",d?"max-w-2xl":"max-w-md"),children:[p.jsxs("div",{className:"border-b border-border px-5 py-4",children:[p.jsx(_4,{className:"text-[15px] font-semibold text-foreground",children:r}),a?p.jsx(E4,{className:"mt-0.5 text-xs text-muted-foreground",children:a}):null]}),p.jsx("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-5 py-5",children:c}),f?p.jsx("div",{className:"flex items-center justify-end gap-2 border-t border-border px-5 py-3",children:f}):null]})]})})}function BR({open:n,onClose:i,onConfirm:r,title:a,confirmLabel:c,danger:f,loading:d,children:h,confirmDisabled:m}){return p.jsx($u,{open:n,onClose:i,title:a,footer:p.jsxs(p.Fragment,{children:[p.jsx(Lt,{variant:"secondary",onClick:i,disabled:d,children:"Cancel"}),p.jsx(Lt,{variant:f?"danger":"primary",loading:d,disabled:m,onClick:r,children:c})]}),children:h})}function bi({children:n,icon:i,action:r,className:a}){return p.jsxs("div",{className:xt("mt-4 flex flex-col items-center gap-3 rounded-xl border border-dashed border-border bg-card px-4 py-14 text-center",a),children:[i?p.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-accent/10 text-accent",children:i}):null,p.jsx("div",{className:"max-w-sm text-[13px] text-muted-foreground",children:n}),r]})}let Au=[];const RS=()=>Au.forEach(n=>n()),K4=n=>(Au.push(n)===1&&addEventListener("hashchange",RS),()=>{Au=Au.filter(i=>i!==n),Au.length||removeEventListener("hashchange",RS)}),qR=/^#?\/?/,F4=()=>"/"+location.hash.replace(qR,""),X4=(n,{state:i=null,replace:r=!1}={})=>{const a=location.href,[c,f]=n.replace(qR,"").split("?"),d=new URL(a);d.hash=`/${c}`,f!==void 0&&(d.search=f);const h=d.href;history[r?"replaceState":"pushState"](i,"",h);const m=typeof HashChangeEvent<"u"?new HashChangeEvent("hashchange",{oldURL:a,newURL:h}):new Event("hashchange",{detail:{oldURL:a,newURL:h}});dispatchEvent(m)},PR=({ssrPath:n="/"}={})=>[mp.useSyncExternalStore(K4,F4,()=>n),X4];PR.hrefs=n=>"#"+n;class Z4 extends HR{constructor(){super(...arguments);Nt(this,"name","PermissionsApiError")}}function ud(n){return n instanceof Error?n.message:typeof n=="string"?n:"Something went wrong"}const GR=U4({errorClass:Z4}),ll=GR.req,Od=GR.query,cd=encodeURIComponent,Zr=(n,i)=>({method:n,headers:{"content-type":"application/json"},...i===void 0?{}:{body:JSON.stringify(i)}});function J4(){return ll("config")}function YR(){return ll("api/catalog")}async function QR(){return(await ll("api/subjects")).subjects}function $4(n){return ll(`api/subjects/${cd(n)}`)}function W4(n,i){return ll(`api/subjects/${cd(n)}`,Zr("PUT",i))}function ez(n){return ll("api/grants",Zr("POST",n))}function tz(n,i,r){return ll(`api/grants/${cd(n)}/${cd(i)}`,Zr("DELETE",r?{reason:r}:void 0))}function KR(n={}){return ll(`api/history${Od(n)}`)}function nz(n){return ll("api/check",Zr("POST",n))}function lz(n={}){return ll(`api/relationships${Od(n)}`)}function iz(n){return ll("api/relationships",Zr("POST",n))}function sz(n){return ll("api/relationships",Zr("DELETE",n))}function rz(n){return ll("api/relationships/check",Zr("POST",n))}async function az(n){return(await ll(`api/relationships/objects${Od(n)}`)).objects}async function oz(n){return(await ll(`api/relationships/subjects${Od(n)}`)).subjects}const Rl={config:["config"],catalog:["catalog"],subjects:["subjects"],subject:n=>["subject",n],history:["history"],relationships:["relationships"]};function uz(n){const i=new Map(n.roles.map(a=>[a.key,a])),r=new Map(n.assignable.map(a=>[a.key,a]));return{view:n,roleLabel:a=>{var c;return a?((c=i.get(a))==null?void 0:c.label)??a:""},permission:a=>r.get(a)??{key:a,label:a},effectiveRole:a=>a&&i.has(a)?{role:a,stored:!0}:{role:n.defaultRole,stored:!1},relations:n.relations??[]}}function To(){return Zi({queryKey:Rl.catalog,queryFn:YR,staleTime:5*6e4,select:uz})}function Wu(n,i){const r=rp(),a=yA();return Bg({mutationFn:n,onSuccess:async(c,f)=>{var d;await Promise.all([r.invalidateQueries({queryKey:["subject"]}),r.invalidateQueries({queryKey:Rl.subjects}),r.invalidateQueries({queryKey:Rl.history}),r.invalidateQueries({queryKey:Rl.relationships})]),a.add("success",typeof i.success=="function"?i.success(f,c):i.success),(d=i.onSuccess)==null||d.call(i,c,f)},onError:c=>a.add("error",i.error,ud(c))})}function Qr({head:n,children:i,label:r}){return p.jsx("div",{className:"overflow-x-auto",children:p.jsxs("table",{className:"w-full border-collapse","aria-label":r,children:[p.jsx("thead",{children:p.jsx("tr",{className:"border-b border-border",children:n.map((a,c)=>{const{label:f,className:d}=typeof a=="string"?{label:a}:a;return p.jsx("th",{className:xt("whitespace-nowrap px-4 py-2.5 text-left text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",d),children:f},f||c)})})}),p.jsx("tbody",{className:"divide-y divide-border",children:i})]})})}function ty({children:n,className:i}){return p.jsx("div",{className:xt("overflow-hidden rounded-xl border border-border bg-card",i),children:n})}function Lu({role:n,catalog:i,muted:r}){const a=(i==null?void 0:i.roleLabel(n))??n;return p.jsx("span",{title:n,"data-role":n,className:xt("inline-flex items-center rounded-md border px-1.5 py-0.5 text-xs font-medium",r?"border-dashed border-border text-muted-foreground":"border-accent/35 bg-accent/10 text-accent"),children:a})}function cz({permission:n,catalog:i}){const r=(i==null?void 0:i.permission(n))??{key:n,label:n};return p.jsxs("span",{className:"flex flex-col",children:[p.jsx("span",{className:"text-[13px] font-medium text-foreground",children:r.label}),r.label!==r.key?p.jsx(Dt,{className:"text-xs text-muted-foreground",children:r.key}):null]})}function Xt({label:n,hint:i,htmlFor:r,children:a}){return p.jsxs("div",{className:"flex flex-col gap-1.5",children:[p.jsx("label",{htmlFor:r,className:"text-[13px] font-medium text-foreground",children:n}),a,i?p.jsx("span",{className:"text-xs text-muted-foreground",children:i}):null]})}function jd({at:n}){return n?p.jsx("time",{dateTime:n,title:Du(n),className:"whitespace-nowrap tabular-nums",children:I4(n)}):p.jsx("span",{className:"text-muted-foreground",children:"—"})}const fz=(n,i=Date.now())=>!!n&&Date.parse(n)<=i;function dz({expiresAt:n}){return n?fz(n)?p.jsx("span",{className:"flex items-center gap-1.5",title:Du(n),children:p.jsx(Wa,{className:"border-destructive/30 bg-destructive/10 text-destructive",children:"Expired"})}):p.jsx("time",{dateTime:n,title:Du(n),className:"tabular-nums",children:Du(n)}):p.jsx("span",{className:"text-muted-foreground",children:"never"})}const hz={grant:"border-success/30 bg-success/10 text-success",revoke:"border-destructive/30 bg-destructive/10 text-destructive",role:"border-info/30 bg-info/10 text-info",relate:"border-success/30 bg-success/10 text-success",unrelate:"border-destructive/30 bg-destructive/10 text-destructive"};function FR({type:n}){return p.jsx(Wa,{className:hz[n],children:n})}function XR({entry:n,catalog:i}){if(n.type==="relate"||n.type==="unrelate")return p.jsx("span",{className:"flex flex-col text-[13px]",children:p.jsxs(Dt,{className:"text-[13px]",children:[n.object,"#",n.relation]})});if(n.type==="role"){const a=n.previousRole??null,c=n.role??null;return p.jsxs("span",{className:"flex flex-wrap items-center gap-1.5 text-[13px]",children:[a?p.jsx(Lu,{role:a,catalog:i,muted:!0}):p.jsx("span",{className:"text-muted-foreground",children:"default"}),p.jsx("span",{"aria-hidden":!0,className:"text-muted-foreground",children:"→"}),c?p.jsx(Lu,{role:c,catalog:i}):p.jsx("span",{className:"text-muted-foreground",children:"cleared"})]})}const r=n.permission?(i==null?void 0:i.permission(n.permission).label)??n.permission:"";return p.jsxs("span",{className:"flex flex-col text-[13px]",children:[p.jsx("span",{className:"font-medium",children:r}),n.permission&&r!==n.permission?p.jsx(Dt,{className:"text-xs text-muted-foreground",children:n.permission}):null,n.type==="grant"&&n.expiresAt?p.jsxs("span",{className:"text-xs text-muted-foreground",children:["until ",Du(n.expiresAt)]}):null]})}function Ad({actor:n}){return n?p.jsx(Dt,{className:"text-[13px]",children:n}):p.jsx("span",{className:"text-muted-foreground",children:"system"})}const mz=(n,i)=>!i||[n.id,n.name,n.email,n.role].some(r=>typeof r=="string"&&r.toLowerCase().includes(i));function gz({ctx:n}){const i=To().data,r=Zi({queryKey:Rl.subjects,queryFn:QR,staleTime:1e4}),[a,c]=dt.useState(""),[f,d]=dt.useState(!1),h=a.trim().toLowerCase(),m=(r.data??[]).filter(g=>mz(g,h));return p.jsxs(Xs,{children:[p.jsx(Yr,{title:"Subjects",description:"Everyone with a stored role or a grant. A subject without a stored role gets the auth provider's role, else the catalog's default role.",actions:n.canWrite("grants:write")||n.canWrite("roles:write")?p.jsx(Lt,{icon:p.jsx(ej,{className:"size-4"}),onClick:()=>d(!0),children:"Add subject"}):null}),p.jsxs("div",{className:"mt-6 flex items-center gap-2",children:[p.jsxs("div",{className:"relative w-full max-w-sm",children:[p.jsx(x1,{className:"pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),p.jsx(Un,{"aria-label":"Search subjects",placeholder:"Search by id, name, email or role",value:a,onChange:g=>c(g.target.value),className:"pl-8"})]}),r.data?p.jsxs("span",{className:"text-[13px] text-muted-foreground",children:[wg(m.length)," of ",wg(r.data.length)]}):null]}),r.isLoading?p.jsx(Co,{label:"Loading subjects…"}):r.isError?p.jsx(bi,{className:"mt-4",children:"Failed to load subjects."}):m.length===0?p.jsx(bi,{className:"mt-4",children:h?"No subject matches.":"No subjects yet. Grant a permission or assign a role to add one."}):p.jsx(ty,{className:"mt-4",children:p.jsx(Qr,{label:"Subjects",head:["Subject","Role",{label:"Grants",className:"text-right"},""],children:m.map(g=>{const v=(i==null?void 0:i.effectiveRole(g.role))??{role:g.role??"",stored:!!g.role};return p.jsxs("tr",{className:"cursor-pointer hover:bg-secondary/40",onClick:()=>n.go(Ff(g.id)),children:[p.jsxs("td",{className:"px-4 py-3",children:[p.jsx(Dt,{className:"text-[13px] font-medium",children:g.id}),g.name||g.email?p.jsx("span",{className:"block text-xs text-muted-foreground",children:[g.name,g.email].filter(Boolean).join(" · ")}):null]}),p.jsx("td",{className:"px-4 py-3",children:v.role?p.jsxs("span",{className:"flex items-center gap-1.5",children:[p.jsx(Lu,{role:v.role,catalog:i,muted:!v.stored}),v.stored?null:p.jsx("span",{className:"text-xs text-muted-foreground",children:"default"})]}):null}),p.jsx("td",{className:"px-4 py-3 text-right text-[13px] tabular-nums",children:wg(g.grantCount)}),p.jsx("td",{className:"px-4 py-3 text-right",children:p.jsx(Lt,{size:"sm",variant:"ghost",onClick:b=>{b.stopPropagation(),n.go(Ff(g.id))},children:"Open"})})]},g.id)})})}),p.jsx(pz,{open:f,onClose:()=>d(!1),onOpen:g=>n.go(Ff(g))})]})}function pz({open:n,onClose:i,onOpen:r}){const[a,c]=dt.useState(""),f=d=>{d==null||d.preventDefault();const h=a.trim();h&&(c(""),i(),r(h))};return p.jsx($u,{open:n,onClose:i,title:"Add subject",description:"Subjects are your users' ids. Open one to grant a permission or assign a role.",footer:p.jsxs(p.Fragment,{children:[p.jsx(Lt,{variant:"secondary",onClick:i,children:"Cancel"}),p.jsx(Lt,{onClick:()=>f(),disabled:!a.trim(),children:"Open subject"})]}),children:p.jsx("form",{onSubmit:f,children:p.jsx(Xt,{label:"Subject id",htmlFor:"new-subject-id",children:p.jsx(Un,{id:"new-subject-id",autoFocus:!0,placeholder:"user_123",value:a,onChange:d=>c(d.target.value),className:"font-mono"})})})})}function yz({id:n,ctx:i}){var T,C;const r=To().data,a=Zi({queryKey:Rl.subject(n),queryFn:()=>$4(n),staleTime:5e3}),[c,f]=dt.useState(!1),[d,h]=dt.useState(!1),[m,g]=dt.useState(null),v=a.data,b=(T=v==null?void 0:v.record)==null?void 0:T.name,S=(C=v==null?void 0:v.record)==null?void 0:C.email;return p.jsxs(Xs,{children:[p.jsxs("button",{type:"button",onClick:()=>i.go("/"),className:"mb-3 inline-flex items-center gap-1 text-[13px] text-muted-foreground hover:text-foreground",children:[p.jsx(GO,{className:"size-3.5"})," Subjects"]}),p.jsx(Yr,{title:p.jsx(Dt,{className:"text-xl",children:n}),description:b||S?[b,S].filter(Boolean).join(" · "):void 0,actions:i.can("check:run")?p.jsx(Lt,{variant:"secondary",icon:p.jsx(YO,{className:"size-4"}),onClick:()=>i.go("/check",{subject:n}),children:"Check as subject"}):null}),a.isLoading?p.jsx(Co,{label:"Loading subject…"}):a.isError||!v?p.jsx(bi,{className:"mt-6",children:"Failed to load this subject."}):p.jsxs("div",{className:"mt-6 grid gap-6",children:[p.jsx(bz,{subject:v,catalog:r,canWrite:i.canWrite("roles:write"),onChange:()=>h(!0)}),p.jsx(yi,{title:"Grants",description:"Assignable permissions granted to this subject. The role's rules decide what each one unlocks.",flush:!0,actions:i.canWrite("grants:write")?p.jsx(Lt,{size:"sm",icon:p.jsx(b1,{className:"size-4"}),onClick:()=>f(!0),children:"Grant permission"}):null,children:v.grants.length===0?p.jsx("p",{className:"px-5 py-6 text-[13px] text-muted-foreground",children:"No grants."}):p.jsx(Qr,{label:"Grants",head:["Permission","Granted by","Granted","Reason","Expires",""],children:v.grants.map(w=>p.jsxs("tr",{"data-permission":w.permission,children:[p.jsx("td",{className:"px-4 py-3",children:p.jsx(cz,{permission:w.permission,catalog:r})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(Ad,{actor:w.grantedBy})}),p.jsx("td",{className:"px-4 py-3 text-[13px]",children:p.jsx(jd,{at:w.grantedAt})}),p.jsx("td",{className:"max-w-64 px-4 py-3 text-[13px] text-muted-foreground",children:w.reason??"—"}),p.jsx("td",{className:"px-4 py-3 text-[13px]",children:p.jsx(dz,{expiresAt:w.expiresAt})}),p.jsx("td",{className:"px-4 py-3 text-right",children:i.canWrite("grants:write")?p.jsx(Lt,{size:"sm",variant:"ghost",onClick:()=>g(w),children:"Revoke"}):null})]},w.permission))})}),i.can("history:read")?p.jsx(Rz,{id:n,ctx:i,catalog:r}):null]}),v&&r?p.jsxs(p.Fragment,{children:[p.jsx(xz,{open:c,onClose:()=>f(!1),subject:v,catalog:r}),p.jsx(Ez,{open:d,onClose:()=>h(!1),subject:v,catalog:r})]}):null,p.jsx(Sz,{grant:m,catalog:r,onClose:()=>g(null)})]})}function bz({subject:n,catalog:i,canWrite:r,onChange:a}){const c={role:n.effectiveRole,stored:n.role!==null};return p.jsx(yi,{title:"Role",actions:r?p.jsx(Lt,{size:"sm",variant:"secondary",icon:p.jsx(QO,{className:"size-4"}),onClick:a,children:"Change role"}):null,children:p.jsxs("div",{className:"flex flex-wrap items-center gap-3","data-testid":"subject-role",children:[c.role?p.jsx(Lu,{role:c.role,catalog:i,muted:!c.stored}):null,p.jsx("span",{className:"text-[13px] text-muted-foreground",children:c.stored?"Stored assignment: it overrides the auth provider's role.":"No stored role: the auth provider's role applies, else the catalog's default role (shown)."})]})})}const vz=n=>{if(!n)return null;const i=new Date(n).getTime();return Number.isNaN(i)?null:new Date(i).toISOString()};function xz({open:n,onClose:i,subject:r,catalog:a}){const c=new Set(r.grants.map(E=>E.permission)),f=a.view.assignable.filter(E=>!c.has(E.key)).map(E=>({value:E.key,label:E.label,...E.description?{description:E.description}:{}})),[d,h]=dt.useState(""),[m,g]=dt.useState(""),[v,b]=dt.useState(""),S=()=>{h(""),g(""),b("")},T=()=>{S(),i()},C=Wu(ez,{success:(E,A)=>A.created?`Granted ${a.permission(E.permission).label} to ${E.subject}`:`${E.subject} already had ${a.permission(E.permission).label}`,error:"Could not grant the permission",onSuccess:T}),w=vz(v),j=w!==null&&Date.parse(w)<=Date.now(),O=()=>C.mutate({subject:r.id,permission:d,...m.trim()?{reason:m.trim()}:{},...w?{expiresAt:w}:{}});return p.jsx($u,{open:n,onClose:T,title:"Grant permission",description:p.jsxs(p.Fragment,{children:["To ",p.jsx(Dt,{children:r.id}),". Granting is idempotent: granting a held permission changes nothing."]}),footer:p.jsxs(p.Fragment,{children:[p.jsx(Lt,{variant:"secondary",onClick:T,disabled:C.isPending,children:"Cancel"}),p.jsx(Lt,{onClick:O,loading:C.isPending,disabled:!d||j,children:"Grant"})]}),children:p.jsxs("div",{className:"grid gap-4",children:[p.jsx(Xt,{label:"Permission",children:f.length===0?p.jsx("span",{className:"text-[13px] text-muted-foreground",children:"Every assignable permission is already granted."}):p.jsx(Ks,{"aria-label":"Permission",value:d,onValueChange:h,options:f,placeholder:"Choose a permission"})}),p.jsx(Xt,{label:"Reason",htmlFor:"grant-reason",hint:"Recorded with the grant and in the history.",children:p.jsx(Un,{id:"grant-reason",placeholder:"e.g. Support escalation #4521",value:m,maxLength:1e3,onChange:E=>g(E.target.value)})}),p.jsx(Xt,{label:"Expires",htmlFor:"grant-expires",hint:j?"Must be in the future.":"Optional: leave empty for a grant that never expires.",children:p.jsx(Un,{id:"grant-expires",type:"datetime-local",value:v,onChange:E=>b(E.target.value)})})]})})}function Sz({grant:n,catalog:i,onClose:r}){const[a,c]=dt.useState(""),f=()=>{c(""),r()},d=n?(i==null?void 0:i.permission(n.permission).label)??n.permission:"",h=Wu(m=>tz(m.subject,m.permission,m.reason),{success:m=>`Revoked ${d} from ${m.subject}`,error:"Could not revoke the permission",onSuccess:f});return p.jsx(BR,{open:n!==null,onClose:f,onConfirm:()=>n&&h.mutate({subject:n.subject,permission:n.permission,...a.trim()?{reason:a.trim()}:{}}),title:"Revoke permission",confirmLabel:"Revoke",danger:!0,loading:h.isPending,children:p.jsxs("div",{className:"grid gap-4",children:[p.jsxs("p",{className:"text-[13px] text-muted-foreground",children:["Revoke ",p.jsx("strong",{className:"text-foreground",children:d})," from"," ",p.jsx(Dt,{children:n==null?void 0:n.subject}),"? Checks stop counting it right away."]}),p.jsx(Xt,{label:"Reason",htmlFor:"revoke-reason",hint:"Recorded in the history.",children:p.jsx(Un,{id:"revoke-reason",placeholder:"e.g. Escalation closed",value:a,maxLength:1e3,onChange:m=>c(m.target.value)})})]})})}const Bf="__default__";function Ez({open:n,onClose:i,subject:r,catalog:a}){const[c,f]=dt.useState(r.role??Bf),[d,h]=dt.useState("");dt.useEffect(()=>{n&&f(r.role??Bf)},[n,r.role]);const m=()=>{h(""),i()},g=Wu(S=>W4(r.id,{role:S.role,...S.reason?{reason:S.reason}:{}}),{success:S=>S.role?`${r.id} is now ${a.roleLabel(S.role)}`:`Cleared the stored role of ${r.id}`,error:"Could not change the role",onSuccess:m}),v=[{value:Bf,label:"No stored role",description:`The auth provider's role, else ${a.roleLabel(a.view.defaultRole)}`},...a.view.roles.filter(S=>S.key!==a.view.guestRole).map(S=>({value:S.key,label:S.label,...S.description?{description:S.description}:{}}))],b=c===Bf?null:c;return p.jsx($u,{open:n,onClose:m,title:"Change role",description:p.jsxs(p.Fragment,{children:["The stored role of ",p.jsx(Dt,{children:r.id})," overrides the role the auth provider reports."]}),footer:p.jsxs(p.Fragment,{children:[p.jsx(Lt,{variant:"secondary",onClick:m,disabled:g.isPending,children:"Cancel"}),p.jsx(Lt,{onClick:()=>g.mutate({role:b,...d.trim()?{reason:d.trim()}:{}}),loading:g.isPending,disabled:b===(r.role??null),children:"Save role"})]}),children:p.jsxs("div",{className:"grid gap-4",children:[p.jsx(Xt,{label:"Role",children:p.jsx(Ks,{"aria-label":"Role",value:c,onValueChange:f,options:v})}),p.jsx(Xt,{label:"Reason",htmlFor:"role-reason",hint:"Recorded in the history.",children:p.jsx(Un,{id:"role-reason",placeholder:"e.g. Promoted to editor",value:d,maxLength:1e3,onChange:S=>h(S.target.value)})})]})})}function Rz({id:n,ctx:i,catalog:r}){var f;const a=Zi({queryKey:[...Rl.history,n,"recent"],queryFn:()=>KR({subject:n,limit:10}),staleTime:5e3}),c=((f=a.data)==null?void 0:f.entries)??[];return p.jsx(yi,{title:"Recent history",flush:!0,actions:p.jsx(Lt,{size:"sm",variant:"ghost",onClick:()=>i.go("/history",{subject:n}),children:"All history"}),children:a.isLoading?p.jsx("p",{className:"px-5 py-6 text-[13px] text-muted-foreground",children:"Loading…"}):c.length===0?p.jsx("p",{className:"px-5 py-6 text-[13px] text-muted-foreground",children:"No history yet."}):p.jsx(Qr,{label:"Recent history",head:["When","Change","Detail","By","Reason"],children:c.map(d=>p.jsxs("tr",{children:[p.jsx("td",{className:"px-4 py-3 text-[13px]",children:p.jsx(jd,{at:d.at})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(FR,{type:d.type})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(XR,{entry:d,catalog:r})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(Ad,{actor:d.actor})}),p.jsx("td",{className:"max-w-64 px-4 py-3 text-[13px] text-muted-foreground",children:d.reason??"—"})]},d.id))})})}function wz(){const n=To(),i=n.data;return p.jsxs(Xs,{children:[p.jsx(Yr,{title:"Catalog",description:"Declared in code with definePermissions() and shared by the server, the browser and this panel. Read-only here: change it in code."}),n.isLoading?p.jsx(Co,{label:"Loading catalog…"}):i?p.jsxs("div",{className:"mt-6 grid gap-6",children:[p.jsx(yi,{title:"Roles",description:"Ordered least → most privileged. A subject with several roles gets the most privileged one.",flush:!0,children:p.jsx(Qr,{label:"Roles",head:["#","Role","Description",""],children:i.view.roles.map((r,a)=>p.jsxs("tr",{"data-role":r.key,children:[p.jsx("td",{className:"w-10 px-4 py-3 text-[13px] tabular-nums text-muted-foreground",children:a+1}),p.jsxs("td",{className:"px-4 py-3",children:[p.jsx("span",{className:"block text-[13px] font-medium",children:r.label}),r.label!==r.key?p.jsx(Dt,{className:"text-xs text-muted-foreground",children:r.key}):null]}),p.jsx("td",{className:"px-4 py-3 text-[13px] text-muted-foreground",children:r.description??"—"}),p.jsx("td",{className:"px-4 py-3",children:p.jsxs("span",{className:"flex flex-wrap justify-end gap-1.5",children:[r.key===i.view.guestRole?p.jsx(Wa,{children:"Guest"}):null,r.key===i.view.defaultRole?p.jsx(Wa,{children:"Default"}):null,i.view.managerRoles.includes(r.key)?p.jsx(Wa,{className:"border-accent/35 bg-accent/10 text-accent",children:"Manager"}):null]})})]},r.key))})}),p.jsx(yi,{title:"Assignable permissions",description:i.view.directGrants?"Granted per subject. Direct grants are on: a grant named like a checked path allows it outright.":"Granted per subject; the role's rules decide what each one unlocks.",flush:!0,children:i.view.assignable.length===0?p.jsx("p",{className:"px-5 py-6 text-[13px] text-muted-foreground",children:"None: this catalog is roles only."}):p.jsx(Qr,{label:"Assignable permissions",head:["Permission","Description"],children:i.view.assignable.map(r=>p.jsxs("tr",{"data-permission":r.key,children:[p.jsxs("td",{className:"px-4 py-3",children:[p.jsx("span",{className:"block text-[13px] font-medium",children:r.label}),r.label!==r.key?p.jsx(Dt,{className:"text-xs text-muted-foreground",children:r.key}):null]}),p.jsx("td",{className:"px-4 py-3 text-[13px] text-muted-foreground",children:r.description??"—"})]},r.key))})}),i.view.paths&&i.view.paths.length>0?p.jsx(yi,{title:"Rule paths",description:"Every path the roles' rules define, as checked by can() and the playground.",children:p.jsx("div",{className:"flex flex-wrap gap-1.5",children:i.view.paths.map(r=>p.jsx(Dt,{className:"rounded-md border border-border bg-secondary/50 px-1.5 py-0.5 text-xs",children:r},r))})}):null]}):p.jsx(bi,{className:"mt-6",children:"Failed to load the catalog."})]})}function Cz(n){if(!n.trim())return{ok:!0,value:void 0};try{return{ok:!0,value:JSON.parse(n)}}catch(i){return{ok:!1,error:ud(i)}}}const Tz={grant:()=>"A non-expired grant named like the path allowed it (direct grants are on).","role-rule":(n,i)=>`The ${(i==null?void 0:i.roleLabel(n.role))??n.role} role's rule allowed it.`,"denied-by-rule":(n,i)=>`The ${(i==null?void 0:i.roleLabel(n.role))??n.role} role's rule denied it.`,"rule-threw":()=>"The rule threw, so the check denied it.","unknown-path":(n,i)=>`The ${(i==null?void 0:i.roleLabel(n.role))??n.role} role has no rule at this path, so the check denied it.`},Oz={constant:"a constant (true / false)",predicate:"a predicate (a function of the data)",threw:"a predicate that threw",missing:"no rule (missing path)"},jz=n=>typeof n=="string"?n:n&&typeof n=="object"&&"message"in n?String(n.message):JSON.stringify(n);function Az({ctx:n}){var V;const i=To().data,[r]=fd(),a=Zi({queryKey:Rl.subjects,queryFn:QR,staleTime:1e4,enabled:n.can("subjects:read")}),[c,f]=dt.useState(r.get("role")?"role":r.has("guest")?"guest":r.has("relation")?"relation":"subject"),[d,h]=dt.useState(r.get("subject")??""),[m,g]=dt.useState(r.get("role")??""),[v,b]=dt.useState(r.get("path")??""),[S,T]=dt.useState(""),C=Cz(S),w=(i==null?void 0:i.view.roles)??[],j=m||(i?i.view.defaultRole:""),O=(i==null?void 0:i.view.paths)??[],E=Bg({mutationFn:H=>nz(H)}),A=(i==null?void 0:i.relations)??[],[N,L]=dt.useState(r.get("subject")??""),[D,_]=dt.useState(r.get("relation")??""),[M,Q]=dt.useState(r.get("object")??""),J=M.includes(":")?M.slice(0,M.indexOf(":")):"",se=(((V=A.find(H=>H.type===J))==null?void 0:V.relations)??A.flatMap(H=>H.relations)).map(H=>H.name).filter((H,ne,F)=>F.indexOf(H)===ne),te=Bg({mutationFn:H=>rz(H)}),$=c==="relation"?N.trim()!==""&&D!==""&&M.trim()!=="":v.trim()!==""&&C.ok&&(c!=="subject"||d.trim()!==""),oe=H=>{if(H==null||H.preventDefault(),!!$){if(c==="relation"){te.mutate({subject:N.trim(),relation:D,object:M.trim()});return}C.ok&&E.mutate({path:v.trim(),...C.value!==void 0?{data:C.value}:{},...c==="subject"?{subject:d.trim()}:{},...c==="role"?{role:j}:{},...c==="guest"?{subject:null}:{}})}};return p.jsxs(Xs,{children:[p.jsx(Yr,{title:"Check playground",description:"Run a check the way the server does — same catalog, same rules — and see what decided it."}),p.jsxs("div",{className:"mt-6 grid gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]",children:[p.jsx(yi,{title:"Check",children:p.jsxs("form",{onSubmit:oe,className:"grid gap-4",children:[p.jsx(Xt,{label:"As",children:p.jsx(VR,{value:c,onValueChange:f,options:[{value:"subject",label:"Subject"},{value:"role",label:"Role"},{value:"guest",label:"Guest"},...A.length>0?[{value:"relation",label:"Relation (ReBAC)"}]:[]]})}),c==="relation"?p.jsxs(p.Fragment,{children:[p.jsx(Xt,{label:"Subject",htmlFor:"rel-check-subject",hint:"user:ana, or a userset such as group:eng#member.",children:p.jsx(Un,{id:"rel-check-subject",placeholder:"user:ana",value:N,onChange:H=>L(H.target.value),className:"font-mono"})}),p.jsx(Xt,{label:"Object",htmlFor:"rel-check-object",hint:"type:id, e.g. doc:1.",children:p.jsx(Un,{id:"rel-check-object",placeholder:"doc:1",value:M,onChange:H=>Q(H.target.value),className:"font-mono"})}),p.jsx(Xt,{label:"Relation",children:p.jsx(Ks,{"aria-label":"Relation",value:D,onValueChange:_,placeholder:"Choose a relation",options:se.map(H=>({value:H,label:H}))})})]}):c==="subject"?p.jsxs(Xt,{label:"Subject id",htmlFor:"check-subject",hint:"Its stored role and grants apply; without a stored role, the default role.",children:[p.jsx(Un,{id:"check-subject",list:"check-subjects",placeholder:"user_123",value:d,onChange:H=>h(H.target.value),className:"font-mono"}),p.jsx("datalist",{id:"check-subjects",children:(a.data??[]).map(H=>p.jsx("option",{value:H.id,children:H.name??H.email??""},H.id))})]}):c==="role"?p.jsx(Xt,{label:"Role",hint:"A signed-in subject with this role and no grants.",children:p.jsx(Ks,{"aria-label":"Role",value:j,onValueChange:g,options:w.filter(H=>H.key!==(i==null?void 0:i.view.guestRole)).map(H=>({value:H.key,label:H.label}))})}):p.jsxs("p",{className:"text-[13px] text-muted-foreground",children:["No session: the ",(i==null?void 0:i.roleLabel(i.view.guestRole))??"guest"," role, no grants."]}),c==="relation"?null:p.jsxs(p.Fragment,{children:[p.jsx(Xt,{label:"Path",hint:"A permix path, e.g. post.publish.",children:O.length>0?p.jsx(V4,{"aria-label":"Path",value:v,options:O,onSelect:b,onCreate:b,placeholder:"Choose a path",createLabel:H=>`Check "${H}"`,className:"font-mono"}):p.jsx(Un,{"aria-label":"Path",placeholder:"post.publish",value:v,onChange:H=>b(H.target.value),className:"font-mono"})}),p.jsx(Xt,{label:"Data (JSON)",htmlFor:"check-data",hint:C.ok?"The checked resource, for rules that read it. Leave empty for none.":p.jsxs("span",{className:"text-destructive",children:["Invalid JSON: ",C.error]}),children:p.jsx(B4,{id:"check-data",rows:7,spellCheck:!1,placeholder:'{ "authorId": "user_123" }',value:S,onChange:H=>T(H.target.value),"aria-invalid":!C.ok,className:"font-mono text-xs"})})]}),p.jsx("div",{children:p.jsx(Lt,{type:"submit",icon:p.jsx(JO,{className:"size-4"}),loading:E.isPending||te.isPending,disabled:!$,children:"Run check"})})]})}),p.jsx(yi,{title:"Result",children:c==="relation"?te.isError?p.jsx("p",{className:"text-[13px] text-destructive",role:"alert",children:ud(te.error)}):te.data?p.jsx(Mz,{result:te.data,query:te.variables}):p.jsx("p",{className:"text-[13px] text-muted-foreground",children:"Run a check to see the decision and the path of relations."}):E.isError?p.jsx("p",{className:"text-[13px] text-destructive",role:"alert",children:ud(E.error)}):E.data?p.jsx(Nz,{result:E.data,catalog:i}):p.jsx("p",{className:"text-[13px] text-muted-foreground",children:"Run a check to see the decision."})})]})]})}function Nz({result:n,catalog:i}){const{explanation:r}=n,a=(r==null?void 0:r.permissions)??[];return p.jsxs("div",{className:"grid gap-4","data-testid":"check-result","data-allowed":String(n.allowed),children:[p.jsxs("div",{className:xt("flex items-center gap-3 rounded-lg border px-4 py-3",n.allowed?"border-success/30 bg-success/10 text-success":"border-destructive/30 bg-destructive/10 text-destructive"),children:[n.allowed?p.jsx(a1,{className:"size-6"}):p.jsx(u1,{className:"size-6"}),p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:"text-lg font-semibold",children:n.allowed?"Allowed":"Denied"}),p.jsx(Dt,{className:"text-xs opacity-80",children:n.path})]}),p.jsx(Wa,{className:"ml-auto",children:n.reason})]}),p.jsx("p",{className:"text-[13px] text-foreground",children:(Tz[n.reason]??(()=>n.reason))(n,i)}),p.jsxs("dl",{className:"grid grid-cols-[max-content_1fr] gap-x-4 gap-y-2.5 text-[13px]",children:[p.jsx("dt",{className:"text-muted-foreground",children:"Subject"}),p.jsx("dd",{children:n.subject?p.jsx(Dt,{children:n.subject}):p.jsx("span",{className:"text-muted-foreground",children:"guest / none"})}),p.jsx("dt",{className:"text-muted-foreground",children:"Role"}),p.jsx("dd",{children:p.jsx(Lu,{role:n.role,catalog:i})}),p.jsx("dt",{className:"text-muted-foreground",children:"Decided by"}),p.jsx("dd",{children:Oz[r==null?void 0:r.decidedBy]??(r==null?void 0:r.decidedBy)??"—"}),p.jsx("dt",{className:"text-muted-foreground",children:"Permissions seen"}),p.jsx("dd",{className:"flex flex-wrap gap-1.5",children:a.length===0?p.jsx("span",{className:"text-muted-foreground",children:"none"}):a.map(c=>p.jsx(Dt,{className:"rounded-md border border-border bg-secondary/50 px-1.5 py-0.5 text-xs",children:c},c))}),(r==null?void 0:r.decidedBy)==="threw"&&r.error!==void 0?p.jsxs(p.Fragment,{children:[p.jsx("dt",{className:"text-muted-foreground",children:"Error"}),p.jsx("dd",{className:"font-mono text-xs text-destructive",children:jz(r.error)})]}):null]})]})}function Mz({result:n,query:i}){return p.jsxs("div",{className:"grid gap-4","data-testid":"relation-result","data-allowed":String(n.allowed),children:[p.jsxs("div",{className:xt("flex items-center gap-3 rounded-lg border px-4 py-3",n.allowed?"border-success/30 bg-success/10 text-success":"border-destructive/30 bg-destructive/10 text-destructive"),children:[n.allowed?p.jsx(a1,{className:"size-6"}):p.jsx(u1,{className:"size-6"}),p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:"text-lg font-semibold",children:n.allowed?"Allowed":"Denied"}),p.jsxs(Dt,{className:"text-xs opacity-80",children:[i.subject," → ",i.object,"#",i.relation]})]})]}),n.allowed?p.jsxs("div",{className:"grid gap-2",children:[p.jsx("span",{className:"text-[13px] text-muted-foreground",children:"Path (object → subject), each hop grants the one above it:"}),p.jsx("ol",{className:"grid gap-1.5","data-testid":"relation-path",children:n.path.map((r,a)=>p.jsxs("li",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"w-5 text-right text-xs tabular-nums text-muted-foreground",children:a+1}),p.jsx(Dt,{className:"rounded-md border border-border bg-secondary/50 px-1.5 py-0.5 text-xs",children:r})]},`${a}-${r}`))})]}):p.jsx("p",{className:"text-[13px] text-foreground",children:"No chain of relations connects the subject to this relation on the object (or an exclusion removed it)."})]})}const zz=50;function Dz({ctx:n}){var g;const i=To().data,[r]=fd(),a=r.get("subject")??"",[c,f]=dt.useState(a);dt.useEffect(()=>f(a),[a]);const d=JS({queryKey:[...Rl.history,"page",a],queryFn:({pageParam:v})=>KR({limit:zz,...a?{subject:a}:{},...v?{cursor:v}:{}}),initialPageParam:"",getNextPageParam:v=>v.nextCursor??void 0,staleTime:5e3}),h=((g=d.data)==null?void 0:g.pages.flatMap(v=>v.entries))??[],m=v=>{v==null||v.preventDefault(),n.go("/history",{subject:c.trim()})};return p.jsxs(Xs,{children:[p.jsx(Yr,{title:"History",description:"Every grant, revoke, role change and relationship, with who did it and why."}),p.jsxs("form",{onSubmit:m,className:"mt-6 flex items-center gap-2",children:[p.jsx(Un,{"aria-label":"Filter by subject",placeholder:"Filter by subject id",value:c,onChange:v=>f(v.target.value),className:"max-w-xs font-mono"}),p.jsx(Lt,{type:"submit",variant:"secondary",children:"Filter"}),a?p.jsx(Lt,{type:"button",variant:"ghost",icon:p.jsx(C1,{className:"size-4"}),onClick:()=>n.go("/history",{subject:""}),children:"Clear"}):null]}),d.isLoading?p.jsx(Co,{label:"Loading history…"}):d.isError?p.jsx(bi,{className:"mt-4",children:"Failed to load the history."}):h.length===0?p.jsx(bi,{className:"mt-4",children:a?p.jsxs(p.Fragment,{children:["No history for ",p.jsx(Dt,{children:a}),"."]}):"No history yet."}):p.jsxs(p.Fragment,{children:[p.jsx(ty,{className:"mt-4",children:p.jsx(Qr,{label:"History",head:["When","Change","Subject","Detail","By","Reason"],children:h.map(v=>p.jsxs("tr",{"data-type":v.type,children:[p.jsx("td",{className:"px-4 py-3 text-[13px]",children:p.jsx(jd,{at:v.at})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(FR,{type:v.type})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx("button",{type:"button",className:"font-mono text-[13px] hover:underline",onClick:()=>v.type==="relate"||v.type==="unrelate"?n.go("/relationships",{subject:v.subject}):n.go(Ff(v.subject)),children:v.subject})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(XR,{entry:v,catalog:i})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(Ad,{actor:v.actor})}),p.jsx("td",{className:"max-w-64 px-4 py-3 text-[13px] text-muted-foreground",children:v.reason??"—"})]},v.id))})}),d.hasNextPage?p.jsx("div",{className:"mt-4 flex justify-center",children:p.jsx(Lt,{variant:"secondary",loading:d.isFetchingNextPage,onClick:()=>void d.fetchNextPage(),children:"Load older"})}):null]})]})}const _z=100,Cg="__any__",kz=n=>{const i=n.indexOf(":");return i===-1?{type:n,id:""}:{type:n.slice(0,i),id:n.slice(i+1)}};function Lz({ctx:n}){var se,te;const i=To().data,r=(i==null?void 0:i.relations)??[],[a]=fd(),c=a.get("subject")??"",f=a.get("object")??"",d=a.get("relation")??"",h=c?"subject":"object",[m,g]=dt.useState(h),[v,b]=dt.useState(f),[S,T]=dt.useState(c),[C,w]=dt.useState(d);dt.useEffect(()=>{g(h),b(f),T(c),w(d)},[h,f,c,d]);const[j,O]=dt.useState(!1),[E,A]=dt.useState(null),N=n.canWrite("relationships:write"),L={...f?{object:f}:{},...c?{subject:c}:{},...d?{relation:d}:{}},D=JS({queryKey:[...Rl.relationships,"page",L],queryFn:({pageParam:$})=>lz({...L,limit:_z,...$?{cursor:$}:{}}),initialPageParam:"",getNextPageParam:$=>$.nextCursor??void 0,staleTime:5e3}),_=((se=D.data)==null?void 0:se.pages.flatMap($=>$.relationships))??[],M=$=>{$==null||$.preventDefault(),n.go("/relationships",m==="object"?{object:v.trim(),relation:C,subject:""}:{subject:S.trim(),relation:C,object:""})},Q=kz(v).type,J=(m==="object"?((te=r.find($=>$.type===Q))==null?void 0:te.relations)??[]:r.flatMap($=>$.relations)).map($=>$.name).filter(($,oe,V)=>V.indexOf($)===oe);return i&&r.length===0?p.jsxs(Xs,{children:[p.jsx(Yr,{title:"Relationships"}),p.jsxs(bi,{className:"mt-6",children:["This catalog declares no relations. Pass ",p.jsx(Dt,{children:"relations"})," (a"," ",p.jsx(Dt,{children:"defineRelations"})," schema) to ",p.jsx(Dt,{children:"definePermissions"})," to use relationship-based access control."]})]}):p.jsxs(Xs,{children:[p.jsx(Yr,{title:"Relationships",description:"Relationship tuples (ReBAC): who has which relation on which object, directly. Checks follow groups, parents and the schema's rules from here.",actions:N?p.jsx(Lt,{icon:p.jsx(KO,{className:"size-4"}),onClick:()=>O(!0),children:"Write relationship"}):null}),p.jsxs("form",{onSubmit:M,className:"mt-6 flex flex-wrap items-end gap-2",children:[p.jsx(VR,{value:m,onValueChange:g,options:[{value:"object",label:"By object"},{value:"subject",label:"By subject"}]}),m==="object"?p.jsx(Un,{"aria-label":"Object",placeholder:"doc:1, or a type: doc",value:v,onChange:$=>b($.target.value),className:"max-w-xs font-mono"}):p.jsx(Un,{"aria-label":"Subject",placeholder:"user:ana, group:eng#member",value:S,onChange:$=>T($.target.value),className:"max-w-xs font-mono"}),p.jsx(Ks,{"aria-label":"Relation",value:C||Cg,onValueChange:$=>w($===Cg?"":$),options:[{value:Cg,label:"Any relation"},...J.map($=>({value:$,label:$}))]}),p.jsx(Lt,{type:"submit",variant:"secondary",icon:p.jsx(x1,{className:"size-4"}),children:"Show"})]}),D.isLoading?p.jsx(Co,{label:"Loading relationships…"}):D.isError?p.jsx(bi,{className:"mt-4",children:"Failed to load relationships."}):_.length===0?p.jsx(bi,{className:"mt-4",children:"No relationships match."}):p.jsxs(p.Fragment,{children:[p.jsx(ty,{className:"mt-4",children:p.jsx(Qr,{label:"Relationships",head:["Object","Relation","Subject","By","When","Reason",""],children:_.map($=>p.jsxs("tr",{"data-testid":"relationship-row",children:[p.jsx("td",{className:"px-4 py-3",children:p.jsx("button",{type:"button",className:"font-mono text-[13px] hover:underline",onClick:()=>n.go("/relationships",{object:$.object,subject:""}),children:$.object})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(Dt,{className:"text-[13px]",children:$.relation})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx("button",{type:"button",className:"font-mono text-[13px] hover:underline",onClick:()=>n.go("/relationships",{subject:$.subject,object:""}),children:$.subject})}),p.jsx("td",{className:"px-4 py-3",children:p.jsx(Ad,{actor:$.createdBy})}),p.jsx("td",{className:"px-4 py-3 text-[13px]",children:p.jsx(jd,{at:$.createdAt})}),p.jsx("td",{className:"max-w-64 px-4 py-3 text-[13px] text-muted-foreground",children:$.reason??"—"}),p.jsx("td",{className:"px-4 py-3 text-right",children:N?p.jsx(Lt,{variant:"ghost",size:"sm","aria-label":`Delete ${$.object}#${$.relation}@${$.subject}`,icon:p.jsx(WO,{className:"size-4"}),onClick:()=>A($)}):null})]},`${$.object}#${$.relation}@${$.subject}`))})}),D.hasNextPage?p.jsx("div",{className:"mt-4 flex justify-center",children:p.jsx(Lt,{variant:"secondary",loading:D.isFetchingNextPage,onClick:()=>void D.fetchNextPage(),children:"Load more"})}):null]}),d&&f.includes(":")?p.jsx(Uz,{object:f,relation:d}):null,d&&c?p.jsx(Hz,{subject:c,relation:d,types:r}):null,p.jsx(Iz,{open:j,onClose:()=>O(!1),types:r}),p.jsx(Vz,{relationship:E,onClose:()=>A(null)})]})}function Uz({object:n,relation:i}){const r=Zi({queryKey:[...Rl.relationships,"subjects",n,i],queryFn:()=>oz({object:n,relation:i}),staleTime:5e3});return p.jsx("div",{"data-testid":"effective-subjects",children:p.jsx(yi,{title:`Effective: who is ${i} of ${n}`,className:"mt-6",children:p.jsx(ZR,{query:r,empty:"Nobody."})})})}function Hz({subject:n,relation:i,types:r}){const a=r.filter(f=>f.relations.some(d=>d.name===i)),c=Zi({queryKey:[...Rl.relationships,"objects",n,i,a.map(f=>f.type)],enabled:a.length>0,queryFn:async()=>(await Promise.all(a.map(f=>az({subject:n,relation:i,type:f.type})))).flat(),staleTime:5e3});return p.jsx("div",{"data-testid":"effective-objects",children:p.jsx(yi,{title:`Effective: where ${n} is ${i}`,className:"mt-6",children:p.jsx(ZR,{query:{...c,isLoading:c.isPending},empty:"Nowhere."})})})}function ZR({query:n,empty:i}){var a;if(n.isLoading)return p.jsx(Co,{label:"Expanding…"});if(n.isError)return p.jsx("p",{className:"text-[13px] text-destructive",children:String((a=n.error)==null?void 0:a.message)});const r=n.data??[];return r.length===0?p.jsx("p",{className:"text-[13px] text-muted-foreground",children:i}):p.jsx("ul",{className:"flex flex-wrap gap-1.5",children:r.map(c=>p.jsx("li",{children:p.jsx(Dt,{className:"rounded-md border border-border bg-secondary/50 px-1.5 py-0.5 text-xs",children:c})},c))})}function Iz({open:n,onClose:i,types:r}){var J,se;const a=r.filter(te=>te.relations.some($=>$.subjects.length>0)),[c,f]=dt.useState(""),[d,h]=dt.useState(""),[m,g]=dt.useState(""),[v,b]=dt.useState(""),[S,T]=dt.useState(""),[C,w]=dt.useState(""),j=c||((J=a[0])==null?void 0:J.type)||"",O=(((se=r.find(te=>te.type===j))==null?void 0:se.relations)??[]).filter(te=>te.subjects.length>0),E=O.find(te=>te.name===m)??O[0],A=(E!=null&&E.subjects.includes(v)?v:E==null?void 0:E.subjects[0])??"",N=A.endsWith(":*"),L=N?A:A.includes("#")?`${A.slice(0,A.indexOf("#"))}:${S.trim()}${A.slice(A.indexOf("#"))}`:`${A}:${S.trim()}`,D=()=>{f(""),h(""),g(""),b(""),T(""),w(""),i()},_=Wu(te=>iz(te),{success:(te,$)=>$.created?`Wrote ${te.object}#${te.relation}@${te.subject}`:"Already stored: nothing changed",error:"Could not write the relationship",onSuccess:D}),M=!!E&&d.trim()!==""&&(N||S.trim()!==""),Q=()=>M&&_.mutate({object:`${j}:${d.trim()}`,relation:E.name,subject:L,...C.trim()?{reason:C.trim()}:{}});return p.jsx($u,{open:n,onClose:D,title:"Write relationship",description:"Stores one tuple. Writing a stored tuple changes nothing.",footer:p.jsxs(p.Fragment,{children:[p.jsx(Lt,{variant:"secondary",onClick:D,disabled:_.isPending,children:"Cancel"}),p.jsx(Lt,{onClick:Q,loading:_.isPending,disabled:!M,children:"Write"})]}),children:p.jsxs("div",{className:"grid gap-4",children:[p.jsxs("div",{className:"grid grid-cols-[minmax(0,10rem)_minmax(0,1fr)] gap-2",children:[p.jsx(Xt,{label:"Object type",children:p.jsx(Ks,{"aria-label":"Object type",value:j,onValueChange:te=>{f(te),g(""),b("")},options:a.map(te=>({value:te.type,label:te.type}))})}),p.jsx(Xt,{label:"Object id",htmlFor:"rel-object-id",children:p.jsx(Un,{id:"rel-object-id",placeholder:"1",value:d,onChange:te=>h(te.target.value),className:"font-mono"})})]}),p.jsx(Xt,{label:"Relation",hint:E?p.jsx(Dt,{className:"text-xs",children:E.rule}):void 0,children:p.jsx(Ks,{"aria-label":"Relation",value:(E==null?void 0:E.name)??"",onValueChange:te=>{g(te),b("")},options:O.map(te=>({value:te.name,label:te.name}))})}),p.jsxs("div",{className:"grid grid-cols-[minmax(0,10rem)_minmax(0,1fr)] gap-2",children:[p.jsx(Xt,{label:"Subject kind",children:p.jsx(Ks,{"aria-label":"Subject kind",value:A,onValueChange:b,options:((E==null?void 0:E.subjects)??[]).map(te=>({value:te,label:te.endsWith(":*")?`every ${te.slice(0,-2)}`:te}))})}),N?p.jsx(Xt,{label:"Subject",children:p.jsx(Dt,{className:"py-2 text-[13px]",children:A})}):p.jsx(Xt,{label:"Subject id",htmlFor:"rel-subject-id",children:p.jsx(Un,{id:"rel-subject-id",placeholder:"ana",value:S,onChange:te=>T(te.target.value),className:"font-mono"})})]}),p.jsxs("p",{className:"text-xs text-muted-foreground",children:["Tuple: ",p.jsx(Dt,{children:`${j}:${d.trim()||"…"}#${(E==null?void 0:E.name)??"…"}@${L}`})]}),p.jsx(Xt,{label:"Reason",htmlFor:"rel-reason",hint:"Recorded with the tuple and in the history.",children:p.jsx(Un,{id:"rel-reason",placeholder:"e.g. Shared with the design team",value:C,maxLength:1e3,onChange:te=>w(te.target.value)})})]})})}function Vz({relationship:n,onClose:i}){const[r,a]=dt.useState(""),c=()=>{a(""),i()},f=Wu(d=>sz(d),{success:d=>`Deleted ${d.object}#${d.relation}@${d.subject}`,error:"Could not delete the relationship",onSuccess:c});return p.jsx(BR,{open:n!==null,onClose:c,onConfirm:()=>n&&f.mutate({object:n.object,relation:n.relation,subject:n.subject,...r.trim()?{reason:r.trim()}:{}}),title:"Delete relationship",confirmLabel:"Delete",danger:!0,loading:f.isPending,children:p.jsxs("div",{className:"grid gap-4",children:[p.jsxs("p",{className:"text-[13px] text-muted-foreground",children:["Delete"," ",p.jsxs(Dt,{children:[n==null?void 0:n.object,"#",n==null?void 0:n.relation,"@",n==null?void 0:n.subject]}),"? Checks stop following it right away."]}),p.jsx(Xt,{label:"Reason",htmlFor:"unrelate-reason",hint:"Recorded in the history.",children:p.jsx(Un,{id:"unrelate-reason",placeholder:"e.g. Left the project",value:r,maxLength:1e3,onChange:d=>a(d.target.value)})})]})})}const Bz=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="96 280.0 832 450.0" width="832" height="450.0" role="img" aria-label="xtandard-permissions">
85
+ <title>xtandard-permissions</title>
86
+ <defs><linearGradient id="lime" x1="250" y1="250" x2="760" y2="740" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#D9F99D"/><stop offset=".42" stop-color="#A3E635"/><stop offset="1" stop-color="#65A30D"/></linearGradient></defs>
87
+ <g fill="none" stroke="#5B6167" stroke-width="40" stroke-linecap="round" stroke-linejoin="round"><path d="M190 438L118 512L190 586"/><path d="M834 438L906 512L834 586"/></g>
88
+ <path d="M250 300L395 300L560 512L395 724L250 724L415 512Z" fill="url(#lime)"/>
89
+ <path d="M580.0 300L725.0 300L583.0 482.4L510.5 389.3Z" fill="url(#lime)"/>
90
+ <path d="M580.0 724L725.0 724L583.0 541.6L510.5 634.7Z" fill="url(#lime)"/>
91
+ <path d="M707.8 312.3L774.1 363.9L746.1 399.9L679.8 348.3Z" fill="url(#lime)" stroke="url(#lime)" stroke-width="8" stroke-linejoin="round"/>
92
+ <path d="M654.9 380.3L700.7 415.9L675.8 447.9L630.0 412.3Z" fill="url(#lime)" stroke="url(#lime)" stroke-width="8" stroke-linejoin="round"/>
93
+ </svg>
94
+ `,qz=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="96 280.0 832 450.0" width="832" height="450.0" role="img" aria-label="xtandard-permissions">
95
+ <title>xtandard-permissions</title>
96
+ <defs><linearGradient id="lime" x1="250" y1="250" x2="760" y2="740" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#A3E635"/><stop offset=".42" stop-color="#84CC16"/><stop offset="1" stop-color="#4D7C0F"/></linearGradient></defs>
97
+ <g fill="none" stroke="#8B939C" stroke-width="40" stroke-linecap="round" stroke-linejoin="round"><path d="M190 438L118 512L190 586"/><path d="M834 438L906 512L834 586"/></g>
98
+ <path d="M250 300L395 300L560 512L395 724L250 724L415 512Z" fill="url(#lime)"/>
99
+ <path d="M580.0 300L725.0 300L583.0 482.4L510.5 389.3Z" fill="url(#lime)"/>
100
+ <path d="M580.0 724L725.0 724L583.0 541.6L510.5 634.7Z" fill="url(#lime)"/>
101
+ <path d="M707.8 312.3L774.1 363.9L746.1 399.9L679.8 348.3Z" fill="url(#lime)" stroke="url(#lime)" stroke-width="8" stroke-linejoin="round"/>
102
+ <path d="M654.9 380.3L700.7 415.9L675.8 447.9L630.0 412.3Z" fill="url(#lime)" stroke="url(#lime)" stroke-width="8" stroke-linejoin="round"/>
103
+ </svg>
104
+ `,Pz=[{path:"/",label:"Subjects",match:n=>n==="/"||n.startsWith("/subjects"),requires:"subjects:read"},{path:"/catalog",label:"Catalog",match:n=>n.startsWith("/catalog"),requires:"catalog:read"},{path:"/relationships",label:"Relationships",match:n=>n.startsWith("/relationships"),requires:"relationships:read"},{path:"/check",label:"Check",match:n=>n.startsWith("/check"),requires:"check:run"},{path:"/history",label:"History",match:n=>n.startsWith("/history"),requires:"history:read"}],Ff=n=>`/subjects/${encodeURIComponent(n)}`;function Gz({locationHook:n,searchHook:i,base:r="",logoUrl:a,showThemeToggle:c}){return p.jsx($1,{hook:n??PR,searchHook:i,base:r,children:p.jsx(Yz,{logoUrl:a,showThemeToggle:c})})}function Yz({logoUrl:n,showThemeToggle:i}){var T;const r=CA({getConfig:J4,bootstrap:rE("__PERMISSIONS_CONFIG__")}),a=r.config,{readonly:c}=r,f=C=>!a.allowed||a.allowed.includes(C),d=C=>!c&&f(C),h=TA(),m=Zi({queryKey:Rl.catalog,queryFn:YR,staleTime:5*6e4,enabled:r.ready&&a.authenticated!==!1&&f("catalog:read")}).data,g=(((T=m==null?void 0:m.relations)==null?void 0:T.length)??0)>0,v=Pz.filter(C=>f(C.requires)&&(C.path!=="/relationships"||g)).map(({path:C,label:w,match:j})=>({path:C,label:w,match:j})),b={config:a,readonly:c,go:h,can:f,canWrite:d},S=a.principal?p.jsx("span",{className:`hidden truncate text-[13px] text-muted-foreground sm:inline ${a.principal.name?"":"font-mono"}`,title:a.principal.id,children:a.principal.name??a.principal.id}):null;return p.jsx(jA,{title:a.title||"Permissions",logoUrl:n??a.logoUrl,brandMark:p.jsx(Y4,{light:qz,dark:Bz,className:"h-6 w-auto"}),onBrandClick:()=>h("/"),headerExtra:S,readonly:c,showThemeToggle:i,tabs:v,onNavigate:C=>h(C),fallback:r.failed?p.jsx(AA,{}):null,children:r.loading?null:r.ready&&a.authenticated===!1?p.jsx(Xs,{children:p.jsx(bi,{className:"mt-6",children:"Sign in to manage permissions: this panel needs an authenticated principal."})}):p.jsxs(rA,{children:[p.jsx(Ya,{path:"/subjects/:id",children:C=>p.jsx(yz,{id:decodeURIComponent(C.id),ctx:b})}),p.jsx(Ya,{path:"/catalog",children:p.jsx(wz,{})}),p.jsx(Ya,{path:"/relationships",children:p.jsx(Lz,{ctx:b})}),p.jsx(Ya,{path:"/check",children:p.jsx(Az,{ctx:b})}),p.jsx(Ya,{path:"/history",children:p.jsx(Dz,{ctx:b})}),p.jsx(Ya,{children:p.jsx(gz,{ctx:b})})]})})}const JR=tE("xtandard-permissions:theme"),{getThemePref:Fz,setThemePref:Xz}=JR;MA({App:Gz,configGlobal:"__PERMISSIONS_CONFIG__",themeKey:JR});