@remit/web-client-dist 0.0.697 → 0.0.699

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 (217) hide show
  1. package/assets/{BriefPane-BQx5RRpb.js → BriefPane-CVojVy4N.js} +1 -1
  2. package/assets/{CalendarEventEditor-B3bVY-Oc.js → CalendarEventEditor-BcGWIsNu.js} +1 -1
  3. package/assets/{CalendarEventPopup-D6PNfUfu.js → CalendarEventPopup-MzsWR5GB.js} +1 -1
  4. package/assets/{CalendarLoadFailed-Cm6trTQZ.js → CalendarLoadFailed-Bq0_jt4H.js} +1 -1
  5. package/assets/{CalendarQuickCreate-B_n983kv.js → CalendarQuickCreate-m3dyD7gG.js} +1 -1
  6. package/assets/{CalendarSession-BosFoHg2.js → CalendarSession-D2sxMFYX.js} +1 -1
  7. package/assets/{CollectionPane-BzktgIp0.js → CollectionPane-BykvWdR8.js} +1 -1
  8. package/assets/{DesktopChrome-GxTHTvqD.js → DesktopChrome-D8EtAdwf.js} +1 -1
  9. package/assets/{DropdownMenu-C2J8u8zN.js → DropdownMenu-BuKAMdhw.js} +1 -1
  10. package/assets/{EmptyState-BJU14tbt.js → EmptyState-DEGumQTC.js} +1 -1
  11. package/assets/{ErrorState-BTHOmsYP.js → ErrorState-g7-Y1uhe.js} +1 -1
  12. package/assets/{FullCompose-DiZNltCL.js → FullCompose-CN22d_2q.js} +1 -1
  13. package/assets/{LabelApplyTrigger-P8IoLKME.js → LabelApplyTrigger-Ds7qPw1w.js} +1 -1
  14. package/assets/{MailShell-tKLYT5hn.js → MailShell-DemzOx8u.js} +1 -1
  15. package/assets/{MailViewChrome-CLgaFbe-.js → MailViewChrome-pi6cPv-J.js} +1 -1
  16. package/assets/MailboxPane-DGJQyeZU.js +135 -0
  17. package/assets/{MessageBody-jG4Dhul6.js → MessageBody-Lnqqwldl.js} +1 -1
  18. package/assets/MessageToolbar-HTPVoP6C.js +1 -0
  19. package/assets/{NavMenuButton-CLp6InRG.js → NavMenuButton-BWwWmGhg.js} +1 -1
  20. package/assets/{OnboardingWizard-BSlPpmI5.js → OnboardingWizard-C9TeAtWU.js} +1 -1
  21. package/assets/{OutboxPane-B6UfixBP.js → OutboxPane-dfNu0jGv.js} +1 -1
  22. package/assets/{ReportLink-BELrQR40.js → ReportLink-qkDHdkiE.js} +1 -1
  23. package/assets/_calendarObjectId-DbDEB7MM.js +1 -0
  24. package/assets/_labelId-DeoXHX88.js +1 -0
  25. package/assets/_mailboxId-BGYGT6QY.js +1 -0
  26. package/assets/_messageId-Bqhz_qdo.js +1 -0
  27. package/assets/_messageId-DNugF3h5.js +1 -0
  28. package/assets/_messageId-DXnZth67.js +1 -0
  29. package/assets/_messageId-DtLyjaix.js +1 -0
  30. package/assets/_outboxMessageId-CphlQb-y.js +1 -0
  31. package/assets/_recurrenceId-De3orc9t.js +1 -0
  32. package/assets/{_slotId-DQqfctAf.js → _slotId-Cl3N41sT.js} +1 -1
  33. package/assets/_threadId-BJhKtdZn.js +1 -0
  34. package/assets/_threadId-Bjt3wKzI.js +1 -0
  35. package/assets/_threadId-Cp8WdX2x.js +1 -0
  36. package/assets/_threadId-LaejKsjM.js +1 -0
  37. package/assets/_view._date-CjV2fY7h.js +1 -0
  38. package/assets/{account-service-status-DsLvRU-X.js → account-service-status-CHNkQEDe.js} +1 -1
  39. package/assets/{accounts-D0rPQMGH.js → accounts-BLUtQMSv.js} +1 -1
  40. package/assets/{advanced-q_hG98BB.js → advanced-Cbpc8AqG.js} +1 -1
  41. package/assets/{agenda-time-D0yU-H44.js → agenda-time-BwFncCBt.js} +1 -1
  42. package/assets/{app-chrome-BfyGOiSA.js → app-chrome-CGYf2rTW.js} +1 -1
  43. package/assets/{appearance-DM1k2Ta7.js → appearance-Pwj-DY3o.js} +1 -1
  44. package/assets/{avatar-Bq7beWCy.js → avatar-CVmRGlvx.js} +1 -1
  45. package/assets/{badge-BB80tGxy.js → badge-CDOouHHB.js} +1 -1
  46. package/assets/{bottom-sheet-DKF_Dkid.js → bottom-sheet-Bl-_mC2x.js} +1 -1
  47. package/assets/{brief-8diVJSZ9.js → brief-0MZHMWP6.js} +1 -1
  48. package/assets/brief-Cm-kx12Z.js +1 -0
  49. package/assets/{calendar-BqFIadRy.js → calendar-BDEdchBU.js} +1 -1
  50. package/assets/{calendar-Ds9kgvU8.js → calendar-BHWGBart.js} +1 -1
  51. package/assets/{calendar-event-popup-Cr_LW8IP.js → calendar-event-popup-O-JrsyRu.js} +1 -1
  52. package/assets/{calendar-event-sidebar-B_eR1h5J.js → calendar-event-sidebar-BUwhXGT2.js} +1 -1
  53. package/assets/{calendar-failure-note-C4gNXDQV.js → calendar-failure-note-_XD99AnH.js} +1 -1
  54. package/assets/{calendar-guests-Cay9Ub8h.js → calendar-guests-BVwUAczN.js} +1 -1
  55. package/assets/{calendar-suggestion-EosZrXZC.js → calendar-suggestion-DnD4hQ5U.js} +1 -1
  56. package/assets/calendars-DmhTUU22.js +1 -0
  57. package/assets/{card-CLJYKox8.js → card-D8MhhaRw.js} +1 -1
  58. package/assets/{checkbox-CYOm-zGr.js → checkbox-DQCA_mSq.js} +1 -1
  59. package/assets/{chevron-down-De4wQzka.js → chevron-down-DeNyJr8d.js} +1 -1
  60. package/assets/{chevron-left-CUHU8UT9.js → chevron-left-Co8HGTow.js} +1 -1
  61. package/assets/{circle-check-DlR8I4Hf.js → circle-check-BoVmBAEX.js} +1 -1
  62. package/assets/{circle-check-big-CMsxQSjY.js → circle-check-big-DSc97Qaj.js} +1 -1
  63. package/assets/{circle-question-mark-DhNa_A16.js → circle-question-mark-DuTpeMvV.js} +1 -1
  64. package/assets/{classification-BgDJ1gwK.js → classification-9tqOMgRd.js} +1 -1
  65. package/assets/{clock-Dds4zv6u.js → clock--ouhjt6L.js} +1 -1
  66. package/assets/{cloud-off-BYulqayx.js → cloud-off-DEwqlx6S.js} +1 -1
  67. package/assets/compose._-_outboxMessageId_-BAzIb9up.js +1 -0
  68. package/assets/compose._-_outboxMessageId_-C8ETLKa8.js +1 -0
  69. package/assets/compose._-_outboxMessageId_-CAFZwe5_.js +1 -0
  70. package/assets/compose._-_outboxMessageId_-CS88venz.js +1 -0
  71. package/assets/compose._-_outboxMessageId_-CVS1GWS6.js +1 -0
  72. package/assets/{config-import-VTZQj3gU.js → config-import-B-pJhKeZ.js} +1 -1
  73. package/assets/{confirm-dialog-XvccFJdE.js → confirm-dialog-BdT5xj08.js} +1 -1
  74. package/assets/{copy-BokIobZ4.js → copy-CCCumQLf.js} +1 -1
  75. package/assets/{credential-steps-O1OzlOow.js → credential-steps-BIgbwjRe.js} +1 -1
  76. package/assets/{download-DEuAIIIQ.js → download-BrsKwaQk.js} +1 -1
  77. package/assets/{draft-BEiHkDpm.js → draft-B-aWKHzd.js} +1 -1
  78. package/assets/edit-Cn1GEm6M.js +1 -0
  79. package/assets/edit-sXk685Tf.js +1 -0
  80. package/assets/{external-link-L7NXOTeQ.js → external-link-D__EDlgs.js} +1 -1
  81. package/assets/{file-braces-BN8-S---.js → file-braces-BtzbF80p.js} +1 -1
  82. package/assets/filters-B0cQUlmN.js +1 -0
  83. package/assets/flagged-BH8DBC_m.js +1 -0
  84. package/assets/{flagged-B-j-3yRr.js → flagged-DHdIwzxj.js} +1 -1
  85. package/assets/folder-failure-BphZCUyZ.js +1 -0
  86. package/assets/{folder-input-B0q8wLhf.js → folder-input-C_5R00h6.js} +1 -1
  87. package/assets/folders-DlGCVINx.js +1 -0
  88. package/assets/{help-copy-DUjzIPXf.js → help-copy-Cy9gka_E.js} +1 -1
  89. package/assets/{import-DLM5VFnJ.js → import-D8rex9A_.js} +1 -1
  90. package/assets/index-1RsOqxw1.js +1 -0
  91. package/assets/index-BON2Uz34.js +1 -0
  92. package/assets/index-Bc1xPJmS.js +1 -0
  93. package/assets/index-Bqhz_qdo.js +1 -0
  94. package/assets/index-C2US5ZnK.js +222 -0
  95. package/assets/index-CPXeIqob.js +1 -0
  96. package/assets/index-D4tg2bgX.js +1 -0
  97. package/assets/index-DEDbYXlC.js +1 -0
  98. package/assets/index-DNugF3h5.js +1 -0
  99. package/assets/index-Da8RbG-l.js +1 -0
  100. package/assets/index-Dq3u3q5n.js +1 -0
  101. package/assets/index-G-mQoWoq.js +1 -0
  102. package/assets/index-SJfI-AF0.js +1 -0
  103. package/assets/{index-Caon2n2j.js → index-v9nM8Dsp.js} +4 -4
  104. package/assets/{kbd-jzPSd-a2.js → kbd-C052hWKm.js} +1 -1
  105. package/assets/{label-chip-DtBVyALF.js → label-chip-D_oZixyY.js} +1 -1
  106. package/assets/labels--8vbvW8D.js +1 -0
  107. package/assets/list-pages-BCUbyyea.js +1 -0
  108. package/assets/{mail-BzFJWQZy.js → mail-Cqr91KmH.js} +1 -1
  109. package/assets/mail-DTcPvSJ6.js +1 -0
  110. package/assets/{menu-Bh94jr77.js → menu-CEGeda9s.js} +1 -1
  111. package/assets/{nav-link-ed0mFCCx.js → nav-link-Df_MDzvJ.js} +1 -1
  112. package/assets/new-B_AuEYbG.js +1 -0
  113. package/assets/onboarding-B2cpYesO.js +1 -0
  114. package/assets/{onboarding-completion-qKzJSmsI.js → onboarding-completion-2pWLyByk.js} +1 -1
  115. package/assets/outbox-BOxaEnp0.js +1 -0
  116. package/assets/{pencil-BDbmS56C.js → pencil-C1yBZXUb.js} +1 -1
  117. package/assets/{people-eWwwIt4_.js → people-BTPHUD8U.js} +1 -1
  118. package/assets/{plus-D5-2sA5v.js → plus-DY_LOTJC.js} +1 -1
  119. package/assets/{popover-menu-DhcuKv1N.js → popover-menu-D4kT-xqh.js} +1 -1
  120. package/assets/{refresh-cw-Cu9_I3cT.js → refresh-cw-CY0SJjI-.js} +1 -1
  121. package/assets/{reply-CXuSMyqp.js → reply-CijQsg4o.js} +1 -1
  122. package/assets/{rich-text-Ds4rQc2o.js → rich-text-CY6eh-tS.js} +1 -1
  123. package/assets/{rich-text-spellcheck-worker-provider-ChKzrvjg.js → rich-text-spellcheck-worker-provider-BoNiweeq.js} +1 -1
  124. package/assets/{rotate-ccw-hQhPZwrx.js → rotate-ccw-CfAs8Xij.js} +1 -1
  125. package/assets/{roving-focus-DZX7IpN4.js → roving-focus-C0jnB7ie.js} +1 -1
  126. package/assets/{row-actions-BDfQKXdD.js → row-actions-gLlnd0fC.js} +1 -1
  127. package/assets/{search-mirror-B2xnwy77.js → search-mirror-B_HO5zGq.js} +1 -1
  128. package/assets/{search-scope-B-3MTDpD.js → search-scope-7jHRUZbg.js} +1 -1
  129. package/assets/{search-token-index-BYKMNlJD.js → search-token-index-BymL-AGz.js} +1 -1
  130. package/assets/{sections-DpRVKuXF.js → sections-FtpeSpRq.js} +1 -1
  131. package/assets/{segmented-control-BwvsufVp.js → segmented-control-CMV1-H2S.js} +1 -1
  132. package/assets/{select-TYdrgtW5.js → select-DhVwx5IO.js} +1 -1
  133. package/assets/{senders-vh4OQfD0.js → senders-ZFBTlEw_.js} +1 -1
  134. package/assets/settings-aaApx7r_.js +1 -0
  135. package/assets/{settings-screen-DTYVWAkg.js → settings-screen-zihVEeS9.js} +1 -1
  136. package/assets/{shield-check-C-tOrPEx.js → shield-check-CvFo5QUy.js} +1 -1
  137. package/assets/spam-CN0HeRYz.js +1 -0
  138. package/assets/{suggest-list-BCqr1j26.js → suggest-list-DJUWGfG3.js} +1 -1
  139. package/assets/{suggested-vips--pG2iuOT.js → suggested-vips-DNc6wPf9.js} +1 -1
  140. package/assets/suggestion._suggestionId-DCu4Y3bg.js +1 -0
  141. package/assets/{switch-CyAtRlCz.js → switch-Bza9700F.js} +1 -1
  142. package/assets/task._calendarTaskId-B9lXR7O6.js +1 -0
  143. package/assets/{undo-2-D1IMLq7c.js → undo-2-BHa76eIs.js} +1 -1
  144. package/assets/{useCalendarData-DFG3pzeG.js → useCalendarData-AQi5DlI1.js} +1 -1
  145. package/assets/{useCalendarScheduling-B_INtO-h.js → useCalendarScheduling-BzXa0l-K.js} +1 -1
  146. package/assets/useCalendarSuggestions-CJGnqdiK.js +1 -0
  147. package/assets/{useCalendarTasks-b_UNFPQH.js → useCalendarTasks-BBv_7Q0J.js} +1 -1
  148. package/assets/{useClassificationSettings-DBRecrmp.js → useClassificationSettings-Dh7qfWbF.js} +1 -1
  149. package/assets/{useCollectionThreads-DgofDKen.js → useCollectionThreads-B1vimpsO.js} +1 -1
  150. package/assets/{useDebouncedValue-CFZ4EPXW.js → useDebouncedValue-C3FljUyl.js} +1 -1
  151. package/assets/{useFilters-DHWZEIQe.js → useFilters-BoddpA09.js} +1 -1
  152. package/assets/{useInfiniteQuery-B-vOuANs.js → useInfiniteQuery-Dd0GYAxg.js} +1 -1
  153. package/assets/{useJunkMailboxIds-CW7aI25D.js → useJunkMailboxIds-D3M8TbeX.js} +1 -1
  154. package/assets/useLabels-DnF0cYWq.js +1 -0
  155. package/assets/{useLayoutTier-BNUKvwJD.js → useLayoutTier-lXeQo_2w.js} +1 -1
  156. package/assets/{useMediaQuery-Hy81MQ2M.js → useMediaQuery-BaUDTtu8.js} +1 -1
  157. package/assets/{useMessageBodyContent-CpTD2HGg.js → useMessageBodyContent-DwHmQdO9.js} +1 -1
  158. package/assets/{useQueries-DPH-PeHV.js → useQueries-B-1XtDe8.js} +1 -1
  159. package/assets/{useRefreshControl-DdbTrGxq.js → useRefreshControl-CJGMdQve.js} +1 -1
  160. package/assets/{useResultFolderIndex-BVyfzXH5.js → useResultFolderIndex-D_NiyNtK.js} +1 -1
  161. package/assets/{useSignature-W9HBbZ_n.js → useSignature-cMh39FpD.js} +1 -1
  162. package/assets/{warnings-B2sNE31D.js → warnings-DzSQHNtz.js} +1 -1
  163. package/index.html +2 -2
  164. package/package.json +1 -1
  165. package/assets/MailboxPane-BxNCkl6s.js +0 -135
  166. package/assets/MessageToolbar-DeDUhCvg.js +0 -1
  167. package/assets/_calendarObjectId-BiaBDCEt.js +0 -1
  168. package/assets/_labelId-DLeWLaow.js +0 -1
  169. package/assets/_mailboxId-DWvQ-9gi.js +0 -1
  170. package/assets/_messageId-BB9xOwfs.js +0 -1
  171. package/assets/_messageId-C2YSZxRF.js +0 -1
  172. package/assets/_messageId-CPvSvBZB.js +0 -1
  173. package/assets/_messageId-DbVH08AL.js +0 -1
  174. package/assets/_outboxMessageId-BFgW_k_u.js +0 -1
  175. package/assets/_recurrenceId-96pqeQMh.js +0 -1
  176. package/assets/_threadId-Bm7b75jN.js +0 -1
  177. package/assets/_threadId-CCwEReI2.js +0 -1
  178. package/assets/_threadId-Db39B53v.js +0 -1
  179. package/assets/_threadId-Dht02PUZ.js +0 -1
  180. package/assets/_view._date-BQeaBjoE.js +0 -1
  181. package/assets/brief-CFBkxoDK.js +0 -1
  182. package/assets/calendars-52NaEZbX.js +0 -1
  183. package/assets/compose._-_outboxMessageId_-BY1Sf-7o.js +0 -1
  184. package/assets/compose._-_outboxMessageId_-ByGI1c-o.js +0 -1
  185. package/assets/compose._-_outboxMessageId_-CvOAO1iL.js +0 -1
  186. package/assets/compose._-_outboxMessageId_-EZpX9L3H.js +0 -1
  187. package/assets/compose._-_outboxMessageId_-urlj3DLH.js +0 -1
  188. package/assets/edit-B9dhadKH.js +0 -1
  189. package/assets/edit-vn6fIBd6.js +0 -1
  190. package/assets/filters-VSaDpnX3.js +0 -1
  191. package/assets/flagged-BZJepVc-.js +0 -1
  192. package/assets/folder-failure-CqkVSsrb.js +0 -1
  193. package/assets/folders-CTNX9Hcm.js +0 -1
  194. package/assets/index-B--m5QrT.js +0 -1
  195. package/assets/index-BuawSiTp.js +0 -1
  196. package/assets/index-C2YSZxRF.js +0 -1
  197. package/assets/index-CO1X8-aP.js +0 -1
  198. package/assets/index-CPvSvBZB.js +0 -1
  199. package/assets/index-ChWo5_90.js +0 -1
  200. package/assets/index-DGb7Ls8y.js +0 -1
  201. package/assets/index-DLRo9M2D.js +0 -1
  202. package/assets/index-DemsYVll.js +0 -1
  203. package/assets/index-Dylwxpr-.js +0 -1
  204. package/assets/index-YwusJB4d.js +0 -1
  205. package/assets/index-Zfii_-4V.js +0 -1
  206. package/assets/index-fsuIswbe.js +0 -213
  207. package/assets/labels-CUXsONgB.js +0 -1
  208. package/assets/mail-BodKXw3C.js +0 -1
  209. package/assets/new-DlRrHbU8.js +0 -1
  210. package/assets/onboarding-8O2rW7qq.js +0 -1
  211. package/assets/outbox-nrXvnMTk.js +0 -1
  212. package/assets/settings-MlHARJWl.js +0 -1
  213. package/assets/spam-CecFwFHS.js +0 -1
  214. package/assets/suggestion._suggestionId-DiMWWP0r.js +0 -1
  215. package/assets/task._calendarTaskId-D-wpEifQ.js +0 -1
  216. package/assets/useCalendarSuggestions-DXbA0boT.js +0 -1
  217. package/assets/useLabels-k1VKuQrr.js +0 -1
@@ -1,213 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/calendar-BqFIadRy.js","assets/DesktopChrome-GxTHTvqD.js","assets/useLayoutTier-BNUKvwJD.js","assets/useMediaQuery-Hy81MQ2M.js","assets/nav-link-ed0mFCCx.js","assets/reply-CXuSMyqp.js","assets/sections-DpRVKuXF.js","assets/avatar-Bq7beWCy.js","assets/popover-menu-DhcuKv1N.js","assets/roving-focus-DZX7IpN4.js","assets/mail-BzFJWQZy.js","assets/app-chrome-BfyGOiSA.js","assets/calendar-Ds9kgvU8.js","assets/ErrorState-BTHOmsYP.js","assets/import-DLM5VFnJ.js","assets/credential-steps-O1OzlOow.js","assets/select-TYdrgtW5.js","assets/chevron-down-De4wQzka.js","assets/badge-BB80tGxy.js","assets/card-CLJYKox8.js","assets/config-import-VTZQj3gU.js","assets/file-braces-BN8-S---.js","assets/onboarding-completion-qKzJSmsI.js","assets/mail-BodKXw3C.js","assets/useMessageBodyContent-CpTD2HGg.js","assets/pencil-BDbmS56C.js","assets/MailShell-tKLYT5hn.js","assets/FullCompose-DiZNltCL.js","assets/index-Caon2n2j.js","assets/useSignature-W9HBbZ_n.js","assets/account-form-helpers-DhckT_PN.js","assets/useDebouncedValue-CFZ4EPXW.js","assets/suggest-list-BCqr1j26.js","assets/confirm-dialog-XvccFJdE.js","assets/search-scope-B-3MTDpD.js","assets/useRefreshControl-DdbTrGxq.js","assets/circle-check-big-CMsxQSjY.js","assets/refresh-cw-Cu9_I3cT.js","assets/useQueries-DPH-PeHV.js","assets/search-token-index-BYKMNlJD.js","assets/useLabels-k1VKuQrr.js","assets/menu-Bh94jr77.js","assets/useResultFolderIndex-BVyfzXH5.js","assets/useCollectionThreads-DgofDKen.js","assets/useInfiniteQuery-B-vOuANs.js","assets/folder-failure-CqkVSsrb.js","assets/outbox-status-BlKn6P0x.js","assets/account-service-status-DsLvRU-X.js","assets/kbd-jzPSd-a2.js","assets/onboarding-8O2rW7qq.js","assets/OnboardingWizard-BSlPpmI5.js","assets/checkbox-CYOm-zGr.js","assets/_mailboxId-DWvQ-9gi.js","assets/MailboxPane-BxNCkl6s.js","assets/MessageToolbar-DeDUhCvg.js","assets/MessageBody-jG4Dhul6.js","assets/useJunkMailboxIds-CW7aI25D.js","assets/undo-2-D1IMLq7c.js","assets/DropdownMenu-C2J8u8zN.js","assets/download-DEuAIIIQ.js","assets/EmptyState-BJU14tbt.js","assets/circle-question-mark-DhNa_A16.js","assets/useFilters-DHWZEIQe.js","assets/plus-D5-2sA5v.js","assets/calendar-suggestion-EosZrXZC.js","assets/useCalendarSuggestions-DXbA0boT.js","assets/agenda-time-D0yU-H44.js","assets/calendar-format-BwCpz-JZ.js","assets/calendar-failure-note-C4gNXDQV.js","assets/clock-Dds4zv6u.js","assets/segmented-control-BwvsufVp.js","assets/folder-input-B0q8wLhf.js","assets/label-chip-DtBVyALF.js","assets/cloud-off-BYulqayx.js","assets/LabelApplyTrigger-P8IoLKME.js","assets/MailViewChrome-CLgaFbe-.js","assets/NavMenuButton-CLp6InRG.js","assets/shield-check-C-tOrPEx.js","assets/bottom-sheet-DKF_Dkid.js","assets/circle-check-DlR8I4Hf.js","assets/search-mirror-B2xnwy77.js","assets/brief-8diVJSZ9.js","assets/brief-CFBkxoDK.js","assets/BriefPane-BQx5RRpb.js","assets/wizard-selection-zWa1qc6-.js","assets/flagged-B-j-3yRr.js","assets/flagged-BZJepVc-.js","assets/CollectionPane-BzktgIp0.js","assets/outbox-nrXvnMTk.js","assets/OutboxPane-B6UfixBP.js","assets/row-actions-BDfQKXdD.js","assets/rotate-ccw-hQhPZwrx.js","assets/_slotId-DQqfctAf.js","assets/settings-screen-DTYVWAkg.js","assets/chevron-left-CUHU8UT9.js","assets/accounts-D0rPQMGH.js","assets/switch-CyAtRlCz.js","assets/help-copy-DUjzIPXf.js","assets/advanced-q_hG98BB.js","assets/external-link-L7NXOTeQ.js","assets/appearance-DM1k2Ta7.js","assets/calendars-52NaEZbX.js","assets/useCalendarScheduling-B_INtO-h.js","assets/calendar-guests-Cay9Ub8h.js","assets/calendar-event-popup-Cr_LW8IP.js","assets/copy-BokIobZ4.js","assets/classification-BgDJ1gwK.js","assets/useClassificationSettings-DBRecrmp.js","assets/ReportLink-BELrQR40.js","assets/filters-VSaDpnX3.js","assets/folders-CTNX9Hcm.js","assets/labels-CUXsONgB.js","assets/people-eWwwIt4_.js","assets/senders-vh4OQfD0.js","assets/spam-CecFwFHS.js","assets/warnings-B2sNE31D.js","assets/_view._date-BQeaBjoE.js","assets/useCalendarTasks-b_UNFPQH.js","assets/useCalendarData-DFG3pzeG.js","assets/CalendarLoadFailed-Cm6trTQZ.js","assets/CalendarQuickCreate-B_n983kv.js","assets/draft-BEiHkDpm.js","assets/CalendarSession-BosFoHg2.js","assets/_view-CtgngRpB.css","assets/index-DLRo9M2D.js","assets/index-Dylwxpr-.js","assets/index-CO1X8-aP.js","assets/_labelId-DLeWLaow.js","assets/index-B--m5QrT.js","assets/new-DlRrHbU8.js","assets/CalendarEventEditor-B3bVY-Oc.js","assets/calendar-event-sidebar-B_eR1h5J.js","assets/index-C2YSZxRF.js","assets/_messageId-C2YSZxRF.js","assets/compose._-_outboxMessageId_-CvOAO1iL.js","assets/index-CPvSvBZB.js","assets/_messageId-CPvSvBZB.js","assets/compose._-_outboxMessageId_-EZpX9L3H.js","assets/index-YwusJB4d.js","assets/_messageId-BB9xOwfs.js","assets/compose._-_outboxMessageId_-urlj3DLH.js","assets/index-BuawSiTp.js","assets/compose._-_outboxMessageId_-ByGI1c-o.js","assets/_outboxMessageId-BFgW_k_u.js","assets/index-DGb7Ls8y.js","assets/CalendarEventPopup-D6PNfUfu.js","assets/edit-vn6fIBd6.js","assets/suggestion._suggestionId-DiMWWP0r.js","assets/task._calendarTaskId-D-wpEifQ.js","assets/index-ChWo5_90.js","assets/_messageId-DbVH08AL.js","assets/compose._-_outboxMessageId_-BY1Sf-7o.js","assets/index-DemsYVll.js","assets/edit-B9dhadKH.js"])))=>i.map(i=>d[i]);
2
- function gF(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();var pm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Eu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var w1={exports:{}},$d={};var jN;function RZ(){if(jN)return $d;jN=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var c in o)c!=="key"&&(s[c]=o[c])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:s}}return $d.Fragment=t,$d.jsx=n,$d.jsxs=n,$d}var BN;function TZ(){return BN||(BN=1,w1.exports=RZ()),w1.exports}var T=TZ();const OZ="Logging",MZ="x-amz-user-agent",PZ="NoHubcallbackProvidedException";var Lr;(function(e){e.DEBUG="DEBUG",e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e.VERBOSE="VERBOSE",e.NONE="NONE"})(Lr||(Lr={}));const HN={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class Wn{constructor(t,n=Lr.WARN){this.name=t,this.level=n,this._pluggables=[]}_padding(t){return t<10?"0"+t:""+t}_ts(){const t=new Date;return[this._padding(t.getMinutes()),this._padding(t.getSeconds())].join(":")+"."+t.getMilliseconds()}configure(t){return t?(this._config=t,this._config):this._config}_log(t,...n){let r=this.level;Wn.LOG_LEVEL&&(r=Wn.LOG_LEVEL),typeof window<"u"&&window.LOG_LEVEL&&(r=window.LOG_LEVEL);const o=HN[r];if(!(HN[t]>=o))return;let a=console.log.bind(console);t===Lr.ERROR&&console.error&&(a=console.error.bind(console)),t===Lr.WARN&&console.warn&&(a=console.warn.bind(console)),Wn.BIND_ALL_LOG_LEVELS&&(t===Lr.INFO&&console.info&&(a=console.info.bind(console)),t===Lr.DEBUG&&console.debug&&(a=console.debug.bind(console)));const c=`[${t}] ${this._ts()} ${this.name}`;let u="";if(n.length===1&&typeof n[0]=="string")u=`${c} - ${n[0]}`,a(u);else if(n.length===1)u=`${c} ${n[0]}`,a(c,n[0]);else if(typeof n[0]=="string"){let f=n.slice(1);f.length===1&&(f=f[0]),u=`${c} - ${n[0]} ${f}`,a(`${c} - ${n[0]}`,f)}else u=`${c} ${n}`,a(c,n);for(const f of this._pluggables){const h={message:u,timestamp:Date.now()};f.pushLogs([h])}}log(...t){this._log(Lr.INFO,...t)}info(...t){this._log(Lr.INFO,...t)}warn(...t){this._log(Lr.WARN,...t)}error(...t){this._log(Lr.ERROR,...t)}debug(...t){this._log(Lr.DEBUG,...t)}verbose(...t){this._log(Lr.VERBOSE,...t)}addPluggable(t){t&&t.getCategoryName()===OZ&&(this._pluggables.push(t),t.configure(this._config))}listPluggables(){return this._pluggables}}Wn.LOG_LEVEL=null;Wn.BIND_ALL_LOG_LEVELS=!1;class Sr extends Error{constructor({message:t,name:n,recoverySuggestion:r,underlyingError:o,metadata:s}){if(super(t),this.name=n,this.underlyingError=o,this.recoverySuggestion=r,s){const{extendedRequestId:a,httpStatusCode:c,requestId:u}=s;this.metadata={extendedRequestId:a,httpStatusCode:c,requestId:u}}this.constructor=Sr,Object.setPrototypeOf(this,Sr.prototype)}}var Gi;(function(e){e.NoEndpointId="NoEndpointId",e.PlatformNotSupported="PlatformNotSupported",e.Unknown="Unknown",e.NetworkError="NetworkError"})(Gi||(Gi={}));const uy=(e,t=Sr)=>(n,r,o)=>{const{message:s,recoverySuggestion:a}=e[r];if(!n)throw new t({name:r,message:o?`${s} ${o}`:s,recoverySuggestion:a})},Go=typeof Symbol<"u"?Symbol("amplify_default"):"@@amplify_default",zd=new Wn("Hub");class vF{constructor(t){this.listeners=new Map,this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=t}_remove(t,n){const r=this.listeners.get(t);if(!r){zd.warn(`No listeners for ${t}`);return}this.listeners.set(t,[...r.filter(({callback:o})=>o!==n)])}dispatch(t,n,r,o){typeof t=="string"&&this.protectedChannels.indexOf(t)>-1&&(o===Go||zd.warn(`WARNING: ${t} is protected and dispatching on it can have unintended consequences`));const s={channel:t,payload:{...n},source:r,patternInfo:[]};try{this._toListeners(s)}catch(a){zd.error(a)}}listen(t,n,r="noname"){let o;if(typeof n!="function")throw new Sr({name:PZ,message:"No callback supplied to Hub"});o=n;let s=this.listeners.get(t);return s||(s=[],this.listeners.set(t,s)),s.push({name:r,callback:o}),()=>{this._remove(t,o)}}_toListeners(t){const{channel:n,payload:r}=t,o=this.listeners.get(n);o&&o.forEach(s=>{zd.debug(`Dispatching to ${n} with `,r);try{s.callback(t)}catch(a){zd.error(a)}})}}const Ko=new vF("__default__"),nv=new vF("internal-hub"),MA=()=>{if(typeof window=="object"&&typeof window.crypto=="object")return window.crypto;if(typeof crypto=="object")return crypto;throw new Sr({name:"MissingPolyfill",message:"Cannot resolve the `crypto` function from the environment."})},NZ=()=>{if(typeof window<"u"&&typeof window.btoa=="function")return window.btoa;if(typeof btoa=="function")return btoa;throw new Sr({name:"Base64EncoderError",message:"Cannot resolve the `btoa` function from the environment."})},kZ=()=>{if(typeof window<"u"&&typeof window.atob=="function")return window.atob;if(typeof atob=="function")return atob;throw new Sr({name:"Base64EncoderError",message:"Cannot resolve the `atob` function from the environment."})},PA={convert(e,t){let n=e;return t?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),kZ()(n)}};var qo;(function(e){e.AuthTokenConfigException="AuthTokenConfigException",e.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",e.AuthUserPoolException="AuthUserPoolException",e.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",e.OAuthNotConfigureException="OAuthNotConfigureException"})(qo||(qo={}));const DZ={[qo.AuthTokenConfigException]:{message:"Auth Token Provider not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app."},[qo.AuthUserPoolAndIdentityPoolException]:{message:"Auth UserPool or IdentityPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."},[qo.AuthUserPoolException]:{message:"Auth UserPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."},[qo.InvalidIdentityPoolIdException]:{message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."},[qo.OAuthNotConfigureException]:{message:"oauth param not configured.",recoverySuggestion:"Make sure to call Amplify.configure with oauth parameter in your app."}},NA=uy(DZ);function et(e){let t=!0;e?t=!!e.userPoolId&&!!e.userPoolClientId:t=!1,NA(t,qo.AuthUserPoolException)}function dy(e){const t=!!e?.loginWith?.oauth?.domain&&!!e?.loginWith?.oauth?.redirectSignOut&&!!e?.loginWith?.oauth?.redirectSignIn&&!!e?.loginWith?.oauth?.responseType;NA(t,qo.OAuthNotConfigureException)}function Ag(e){const t=!!e?.identityPoolId;NA(t,qo.InvalidIdentityPoolIdException)}function $s(e){const t=e.split(".");if(t.length!==3)throw new Error("Invalid token");try{const r=t[1].replace(/-/g,"+").replace(/_/g,"/"),o=decodeURIComponent(PA.convert(r).split("").map(a=>`%${`00${a.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),s=JSON.parse(o);return{toString:()=>e,payload:s}}catch{throw new Error("Invalid token payload")}}const yF=e=>{const t=Reflect.ownKeys(e);for(const n of t){const r=e[n];(r&&typeof r=="object"||typeof r=="function")&&yF(r)}return Object.freeze(e)},LZ=new Wn("parseAWSExports"),UZ={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},FZ=(e={})=>{if(!Object.prototype.hasOwnProperty.call(e,"aws_project_region"))throw new Sr({name:"InvalidParameterException",message:"Invalid config parameter.",recoverySuggestion:"Ensure passing the config object imported from `amplifyconfiguration.json`."});const{aws_appsync_apiKey:t,aws_appsync_authenticationType:n,aws_appsync_graphqlEndpoint:r,aws_appsync_region:o,aws_bots_config:s,aws_cognito_identity_pool_id:a,aws_cognito_sign_up_verification_method:c,aws_cognito_mfa_configuration:u,aws_cognito_mfa_types:f,aws_cognito_password_protection_settings:h,aws_cognito_verification_mechanisms:m,aws_cognito_signup_attributes:g,aws_cognito_social_providers:v,aws_cognito_username_attributes:C,aws_mandatory_sign_in:b,aws_mobile_analytics_app_id:E,aws_mobile_analytics_app_region:x,aws_user_files_s3_bucket:I,aws_user_files_s3_bucket_region:R,aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing:O,aws_user_pools_id:D,aws_user_pools_web_client_id:N,geo:M,oauth:L,predictions:$,aws_cloud_logic_custom:G,Notifications:j,modelIntrospection:F}=e,q={};E&&(q.Analytics={Pinpoint:{appId:E,region:x}});const{InAppMessaging:J,Push:Se}=j??{};if(J?.AWSPinpoint||Se?.AWSPinpoint){if(J?.AWSPinpoint){const{appId:ae,region:be}=J.AWSPinpoint;q.Notifications={InAppMessaging:{Pinpoint:{appId:ae,region:be}}}}if(Se?.AWSPinpoint){const{appId:ae,region:be}=Se.AWSPinpoint;q.Notifications={...q.Notifications,PushNotification:{Pinpoint:{appId:ae,region:be}}}}}if(Array.isArray(s)&&(q.Interactions={LexV1:Object.fromEntries(s.map(ae=>[ae.name,ae]))}),r){const ae=UZ[n];ae||LZ.debug(`Invalid authentication type ${n}. Falling back to IAM.`),q.API={GraphQL:{endpoint:r,apiKey:t,region:o,defaultAuthMode:ae??"iam"}},F&&(q.API.GraphQL.modelIntrospection=F)}const V=u?{status:u&&u.toLowerCase(),totpEnabled:f?.includes("TOTP")??!1,smsEnabled:f?.includes("SMS")??!1}:void 0,ee=h?{minLength:h.passwordPolicyMinLength,requireLowercase:h.passwordPolicyCharacters?.includes("REQUIRES_LOWERCASE")??!1,requireUppercase:h.passwordPolicyCharacters?.includes("REQUIRES_UPPERCASE")??!1,requireNumbers:h.passwordPolicyCharacters?.includes("REQUIRES_NUMBERS")??!1,requireSpecialCharacters:h.passwordPolicyCharacters?.includes("REQUIRES_SYMBOLS")??!1}:void 0,ge=Array.from(new Set([...m??[],...g??[]])).reduce((ae,be)=>({...ae,[be.toLowerCase()]:{required:!0}}),{}),Te=C?.includes("EMAIL")??!1,z=C?.includes("PHONE_NUMBER")??!1;(a||D)&&(q.Auth={Cognito:{identityPoolId:a,allowGuestAccess:b!=="enable",signUpVerificationMethod:c,userAttributes:ge,userPoolClientId:N,userPoolId:D,mfa:V,passwordFormat:ee,loginWith:{username:!(Te||z),email:Te,phone:z}}});const te=L?Object.keys(L).length>0:!1,fe=v?v.length>0:!1;if(q.Auth&&te&&(q.Auth.Cognito.loginWith={...q.Auth.Cognito.loginWith,oauth:{...$Z(L),...fe&&{providers:zZ(v)}}}),I&&(q.Storage={S3:{bucket:I,region:R,dangerouslyConnectToHttpEndpointForTesting:O}}),M){const{amazon_location_service:ae}=M;q.Geo={LocationService:{maps:ae.maps,geofenceCollections:ae.geofenceCollections,searchIndices:ae.search_indices,region:ae.region}}}if(G&&(q.API={...q.API,REST:G.reduce((ae,be)=>{const{name:Fe,endpoint:ke,region:le,service:Re}=be;return{...ae,[Fe]:{endpoint:ke,...Re?{service:Re}:void 0,...le?{region:le}:void 0}}},{})}),$){const{VoiceId:ae}=$?.convert?.speechGenerator?.defaults??{};q.Predictions=ae?{...$,convert:{...$.convert,speechGenerator:{...$.convert.speechGenerator,defaults:{voiceId:ae}}}}:$}return q},qN=e=>e?.split(",")??[],$Z=({domain:e,scope:t,redirectSignIn:n,redirectSignOut:r,responseType:o})=>({domain:e,scopes:t,redirectSignIn:qN(n),redirectSignOut:qN(r),responseType:o}),zZ=e=>e.map(t=>{const n=t.toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}),bF=Symbol("oauth-listener"),Hn=[];for(let e=0;e<256;++e)Hn.push((e+256).toString(16).slice(1));function jZ(e,t=0){return(Hn[e[t+0]]+Hn[e[t+1]]+Hn[e[t+2]]+Hn[e[t+3]]+"-"+Hn[e[t+4]]+Hn[e[t+5]]+"-"+Hn[e[t+6]]+Hn[e[t+7]]+"-"+Hn[e[t+8]]+Hn[e[t+9]]+"-"+Hn[e[t+10]]+Hn[e[t+11]]+Hn[e[t+12]]+Hn[e[t+13]]+Hn[e[t+14]]+Hn[e[t+15]]).toLowerCase()}let E1;const BZ=new Uint8Array(16);function HZ(){if(!E1){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");E1=crypto.getRandomValues.bind(crypto)}return E1(BZ)}const qZ=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),VN={randomUUID:qZ};function VZ(e,t,n){e=e||{};const r=e.random??e.rng?.()??HZ();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n=n||0,n<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[n+o]=r[o];return t}return jZ(r)}function Gc(e,t,n){return VN.randomUUID&&!t&&!e?VN.randomUUID():VZ(e,t,n)}function WZ(e){const{version:t}=e;return t?t.startsWith("1"):!1}function GZ(e){if(!e)return;const{bucket_name:t,aws_region:n,buckets:r}=e;return{S3:{bucket:t,region:n,buckets:r&&oY(r)}}}function KZ(e){if(!e)return;const{user_pool_id:t,user_pool_client_id:n,identity_pool_id:r,password_policy:o,mfa_configuration:s,mfa_methods:a,unauthenticated_identities_enabled:c,oauth:u,username_attributes:f,standard_required_attributes:h,groups:m,passwordless:g}=e,v={Cognito:{userPoolId:t,userPoolClientId:n,groups:m}};return r&&(v.Cognito={...v.Cognito,identityPoolId:r}),o&&(v.Cognito.passwordFormat={requireLowercase:o.require_lowercase,requireNumbers:o.require_numbers,requireUppercase:o.require_uppercase,requireSpecialCharacters:o.require_symbols,minLength:o.min_length??6}),s&&(v.Cognito.mfa={status:rY(s),smsEnabled:a?.includes("SMS"),totpEnabled:a?.includes("TOTP")}),c&&(v.Cognito.allowGuestAccess=c),u&&(v.Cognito.loginWith={oauth:{domain:u.domain,redirectSignIn:u.redirect_sign_in_uri,redirectSignOut:u.redirect_sign_out_uri,responseType:u.response_type==="token"?"token":"code",scopes:u.scopes,providers:nY(u.identity_providers)}}),f&&(v.Cognito.loginWith={...v.Cognito.loginWith,email:f.includes("email"),phone:f.includes("phone_number"),username:f.includes("username")}),h&&(v.Cognito.userAttributes=h.reduce((C,b)=>({...C,[b]:{required:!0}}),{})),g&&(v.Cognito.passwordless={emailOtpEnabled:g.email_otp_enabled,smsOtpEnabled:g.sms_otp_enabled,webAuthn:g.web_authn?{relyingPartyId:g.web_authn.relying_party_id,userVerification:g.web_authn.user_verification}:void 0,preferredChallenge:g.preferred_challenge}),v}function ZZ(e){if(!e?.amazon_pinpoint)return;const{amazon_pinpoint:t}=e;return{Pinpoint:{appId:t.app_id,region:t.aws_region}}}function YZ(e){if(!e)return;const{aws_region:t,geofence_collections:n,maps:r,search_indices:o}=e;return{LocationService:{region:t,searchIndices:o,geofenceCollections:n,maps:r}}}function QZ(e){if(!e)return;const{aws_region:t,default_authorization_type:n,url:r,api_key:o,model_introspection:s}=e;return{GraphQL:{endpoint:r,defaultAuthMode:SF(n),region:t,apiKey:o,modelIntrospection:s}}}function JZ(e){if(!e?.events)return;const{url:t,aws_region:n,api_key:r,default_authorization_type:o}=e.events;return{Events:{endpoint:t,defaultAuthMode:SF(o),region:n,apiKey:r}}}function XZ(e){if(!e)return;const{aws_region:t,channels:n,amazon_pinpoint_app_id:r}=e,o=n.includes("IN_APP_MESSAGING"),s=n.includes("APNS")||n.includes("FCM");if(!(o||s))return;const a={};return o&&(a.InAppMessaging={Pinpoint:{appId:r,region:t}}),s&&(a.PushNotification={Pinpoint:{appId:r,region:t}}),a}function eY(e){const t={};if(e.storage&&(t.Storage=GZ(e.storage)),e.auth&&(t.Auth=KZ(e.auth)),e.analytics&&(t.Analytics=ZZ(e.analytics)),e.geo&&(t.Geo=YZ(e.geo)),e.data&&(t.API=QZ(e.data)),e.custom){const n=JZ(e.custom);n&&"Events"in n&&(t.API={...t.API,...n})}return e.notifications&&(t.Notifications=XZ(e.notifications)),t}const tY={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"};function SF(e){return tY[e]}const WN={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"};function nY(e=[]){return e.reduce((t,n)=>(WN[n]!==void 0&&t.push(WN[n]),t),[])}function rY(e){return e==="OPTIONAL"?"optional":e==="REQUIRED"?"on":"off"}function oY(e){const t={};return e.forEach(({name:n,bucket_name:r,aws_region:o,paths:s})=>{if(n in t)throw new Error(`Duplicate friendly name found: ${n}. Name must be unique.`);const a=s?Object.entries(s).reduce((c,[u,f])=>(f!==void 0&&(c[u]=f),c),{}):void 0;t[n]={bucketName:r,region:o,paths:a}}),t}const CF=e=>Object.keys(e).some(t=>t.startsWith("aws_"))?FZ(e):WZ(e)?eY(e):e;var GN=function(){return GN=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},GN.apply(this,arguments)};function mze(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function sY(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function c(h){try{f(r.next(h))}catch(m){a(m)}}function u(h){try{f(r.throw(h))}catch(m){a(m)}}function f(h){h.done?s(h.value):o(h.value).then(c,u)}f((r=r.apply(e,t||[])).next())})}function iY(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(f){return function(h){return u([f,h])}}function u(f){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,f[0]&&(n=0)),n;)try{if(r=1,o&&(s=f[0]&2?o.return:f[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,f[1])).done)return s;switch(o=0,s&&(f=[f[0]&2,s.value]),f[0]){case 0:case 1:s=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,o=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!s||f[1]>s[0]&&f[1]<s[3])){n.label=f[1];break}if(f[0]===6&&n.label<s[1]){n.label=s[1],s=f;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(f);break}s[2]&&n.ops.pop(),n.trys.pop();continue}f=t.call(e,n)}catch(h){f=[6,h],o=0}finally{r=s=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}function gze(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var no=64,aY=32,lY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),cY=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],uY=Math.pow(2,53)-1,Rg=(function(){function e(){this.state=Int32Array.from(cY),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var n=0,r=t.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>uY)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=t[n++],r--,this.bufferLength===no&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%no>=no-8){for(var o=this.bufferLength;o<no;o++)n.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(var o=this.bufferLength;o<no-8;o++)n.setUint8(o,0);n.setUint32(no-8,Math.floor(t/4294967296),!0),n.setUint32(no-4,t),this.hashBuffer(),this.finished=!0}for(var s=new Uint8Array(aY),o=0;o<8;o++)s[o*4]=this.state[o]>>>24&255,s[o*4+1]=this.state[o]>>>16&255,s[o*4+2]=this.state[o]>>>8&255,s[o*4+3]=this.state[o]>>>0&255;return s},e.prototype.hashBuffer=function(){for(var t=this,n=t.buffer,r=t.state,o=r[0],s=r[1],a=r[2],c=r[3],u=r[4],f=r[5],h=r[6],m=r[7],g=0;g<no;g++){if(g<16)this.temp[g]=(n[g*4]&255)<<24|(n[g*4+1]&255)<<16|(n[g*4+2]&255)<<8|n[g*4+3]&255;else{var v=this.temp[g-2],C=(v>>>17|v<<15)^(v>>>19|v<<13)^v>>>10;v=this.temp[g-15];var b=(v>>>7|v<<25)^(v>>>18|v<<14)^v>>>3;this.temp[g]=(C+this.temp[g-7]|0)+(b+this.temp[g-16]|0)}var E=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&f^~u&h)|0)+(m+(lY[g]+this.temp[g]|0)|0)|0,x=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&s^o&a^s&a)|0;m=h,h=f,f=u,u=c+E|0,c=a,a=s,s=o,o=E+x|0}r[0]+=o,r[1]+=s,r[2]+=a,r[3]+=c,r[4]+=u,r[5]+=f,r[6]+=h,r[7]+=m},e})();const dY=e=>new TextEncoder().encode(e);var fY=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:dY;function wF(e){return e instanceof Uint8Array?e:typeof e=="string"?fY(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function hY(e){return typeof e=="string"?e.length===0:e.byteLength===0}var nl=(function(){function e(t){this.secret=t,this.hash=new Rg,this.reset()}return e.prototype.update=function(t){if(!(hY(t)||this.error))try{this.hash.update(wF(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return sY(this,void 0,void 0,function(){return iY(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Rg,this.secret){this.outer=new Rg;var t=pY(this.secret),n=new Uint8Array(no);n.set(t);for(var r=0;r<no;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(var r=0;r<t.byteLength;r++)t[r]=0}},e})();function pY(e){var t=wF(e);if(t.byteLength>no){var n=new Rg;n.update(t),t=n.digest()}var r=new Uint8Array(no);return r.set(t),r}for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`)}var bn;(function(e){e.WebUnknown="0",e.React="1",e.NextJs="2",e.Angular="3",e.VueJs="4",e.Nuxt="5",e.Svelte="6",e.ServerSideUnknown="100",e.ReactSSR="101",e.NextJsSSR="102",e.AngularSSR="103",e.VueJsSSR="104",e.NuxtSSR="105",e.SvelteSSR="106",e.ReactNative="201",e.Expo="202"})(bn||(bn={}));var lo;(function(e){e.AI="ai",e.API="api",e.Auth="auth",e.Analytics="analytics",e.DataStore="datastore",e.Geo="geo",e.InAppMessaging="inappmessaging",e.Interactions="interactions",e.Predictions="predictions",e.PubSub="pubsub",e.PushNotification="pushnotification",e.Storage="storage"})(lo||(lo={}));var Ts;(function(e){e.CreateConversation="1",e.GetConversation="2",e.ListConversations="3",e.DeleteConversation="4",e.SendMessage="5",e.ListMessages="6",e.OnMessage="7",e.Generation="8",e.UpdateConversation="9"})(Ts||(Ts={}));var KN;(function(e){e.Record="1",e.IdentifyUser="2"})(KN||(KN={}));var ZN;(function(e){e.GraphQl="1",e.Get="2",e.Post="3",e.Put="4",e.Patch="5",e.Del="6",e.Head="7"})(ZN||(ZN={}));var Ve;(function(e){e.SignUp="1",e.ConfirmSignUp="2",e.ResendSignUpCode="3",e.SignIn="4",e.FetchMFAPreference="6",e.UpdateMFAPreference="7",e.SetUpTOTP="10",e.VerifyTOTPSetup="11",e.ConfirmSignIn="12",e.DeleteUserAttributes="15",e.DeleteUser="16",e.UpdateUserAttributes="17",e.FetchUserAttributes="18",e.ConfirmUserAttribute="22",e.SignOut="26",e.UpdatePassword="27",e.ResetPassword="28",e.ConfirmResetPassword="29",e.FederatedSignIn="30",e.RememberDevice="32",e.ForgetDevice="33",e.FetchDevices="34",e.SendUserAttributeVerificationCode="35",e.SignInWithRedirect="36",e.StartWebAuthnRegistration="37",e.CompleteWebAuthnRegistration="38",e.ListWebAuthnCredentials="39",e.DeleteWebAuthnCredential="40"})(Ve||(Ve={}));var YN;(function(e){e.Subscribe="1",e.GraphQl="2"})(YN||(YN={}));var xf;(function(e){e.SearchByText="0",e.SearchByCoordinates="1",e.SearchForSuggestions="2",e.SearchByPlaceId="3",e.SaveGeofences="4",e.GetGeofence="5",e.ListGeofences="6",e.DeleteGeofences="7"})(xf||(xf={}));var y_;(function(e){e.SyncMessages="1",e.IdentifyUser="2",e.NotifyMessageInteraction="3"})(y_||(y_={}));var QN;(function(e){e.None="0"})(QN||(QN={}));var JN;(function(e){e.Convert="1",e.Identify="2",e.Interpret="3"})(JN||(JN={}));var XN;(function(e){e.Subscribe="1"})(XN||(XN={}));var ek;(function(e){e.InitializePushNotifications="1",e.IdentifyUser="2"})(ek||(ek={}));var Co;(function(e){e.UploadData="1",e.DownloadData="2",e.List="3",e.Copy="4",e.Remove="5",e.GetProperties="6",e.GetUrl="7",e.GetDataAccess="8",e.ListCallerAccessGrants="9"})(Co||(Co={}));const mY="6.18.0",fy=()=>typeof global<"u",xu=()=>typeof window<"u",EF=()=>typeof document<"u",kA=()=>typeof process<"u",$f=(e,t)=>!!Object.keys(e).find(n=>n.startsWith(t));var tk={};function gY(){const e=r=>r.startsWith("_react")||r.startsWith("__react"),t=r=>Object.keys(r).find(e),n=()=>Array.from(document.querySelectorAll("[id]"));return EF()&&n().some(t)}function vY(){return kA()&&typeof tk<"u"&&!!Object.keys(tk).find(e=>e.includes("react"))}function yY(){return xu()&&$f(window,"__VUE")}function bY(){return fy()&&$f(global,"__VUE")}var nk={};function SY(){return xu()&&$f(window,"__SVELTE")}function CY(){return kA()&&typeof nk<"u"&&!!Object.keys(nk).find(e=>e.includes("svelte"))}function wY(){return xu()&&window.next&&typeof window.next=="object"}function EY(){return fy()&&($f(global,"__next")||$f(global,"__NEXT"))}function xY(){return xu()&&(window.__NUXT__!==void 0||window.$nuxt!==void 0)}function _Y(){return fy()&&typeof global.__NUXT_PATHS__<"u"}var rk={};function IY(){const e=!!(EF()&&document.querySelector("[ng-version]")),t=!!(xu()&&typeof window.ng<"u");return e||t}function AY(){return kA()&&typeof rk=="object"&&rk.npm_lifecycle_script?.startsWith("ng ")||!1}function RY(){return typeof navigator<"u"&&typeof navigator.product<"u"&&navigator.product==="ReactNative"}function TY(){return fy()&&typeof global.expo<"u"}function OY(){return xu()}const MY=[{platform:bn.Expo,detectionMethod:TY},{platform:bn.ReactNative,detectionMethod:RY},{platform:bn.NextJs,detectionMethod:wY},{platform:bn.Nuxt,detectionMethod:xY},{platform:bn.Angular,detectionMethod:IY},{platform:bn.React,detectionMethod:gY},{platform:bn.VueJs,detectionMethod:yY},{platform:bn.Svelte,detectionMethod:SY},{platform:bn.WebUnknown,detectionMethod:OY},{platform:bn.NextJsSSR,detectionMethod:EY},{platform:bn.NuxtSSR,detectionMethod:_Y},{platform:bn.ReactSSR,detectionMethod:vY},{platform:bn.VueJsSSR,detectionMethod:bY},{platform:bn.AngularSSR,detectionMethod:AY},{platform:bn.SvelteSSR,detectionMethod:CY}];function PY(){return MY.find(e=>e.detectionMethod())?.platform||bn.ServerSideUnknown}let _f;const x1=[];let b_=!1;const NY=10,kY=10,DY=1e3,xF=()=>{if(!_f){if(_f=PY(),b_)for(;x1.length;)x1.pop()?.();else x1.forEach(e=>{e()});ok(bn.ServerSideUnknown,NY),ok(bn.WebUnknown,kY)}return _f};function LY(){_f=void 0}function ok(e,t){_f===e&&!b_&&setTimeout(()=>{LY(),b_=!0,setTimeout(xF,DY)},t)}const Oi={},Es=e=>{Oi[e.category]=e.apis.reduce((r,o)=>({...r,[o]:{refCount:r[o]?.refCount?r[o].refCount+1:1,additionalDetails:e.additionalDetails}}),Oi[e.category]??{});let t=!1;return()=>{t||(t=!0,e.apis.forEach(r=>{const o=Oi[e.category][r].refCount;o>1?Oi[e.category][r].refCount=o-1:(delete Oi[e.category][r],Object.keys(Oi[e.category]).length||delete Oi[e.category])}))}},UY=(e,t)=>Oi[e]?.[t]?.additionalDetails,FY="aws-amplify",$Y=e=>e.replace(/\+.*/,""),zY=({category:e,action:t}={})=>{const n=[[FY,$Y(mY)]];if(e&&n.push([e,t]),n.push(["framework",xF()]),e&&t){const r=UY(e,t);r&&r.forEach(o=>{n.push(o)})}return n},hy=e=>zY(e).map(([r,o])=>r&&o?`${r}/${o}`:r).join(" "),py=()=>typeof window<"u"&&typeof window.document<"u",sk=new Wn("Auth");class jY{configure(t,n){this.authConfig=t,this.authOptions=n,t&&t.Cognito?.userPoolEndpoint&&sk.warn(ik("Amazon Cognito User Pool")),t&&t.Cognito?.identityPoolEndpoint&&sk.warn(ik("Amazon Cognito Identity Pool"))}async fetchAuthSession(t={}){let n,r;const o=await this.getTokens(t);return o?(r=o.accessToken?.payload?.sub,n=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,tokens:o,authenticated:!0,forceRefresh:t.forceRefresh})):n=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,authenticated:!1,forceRefresh:t.forceRefresh}),{tokens:o,credentials:n?.credentials,identityId:n?.identityId,userSub:r}}async clearCredentials(){await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId()}async getTokens(t){return await this.authOptions?.tokenProvider?.getTokens(t)??void 0}}const ik=e=>`You are using a custom Amazon ${e} endpoint, ensure the endpoint is correct.`;class BY{constructor(){this.oAuthListener=void 0,this.isConfigured=!1,this.resourcesConfig={},this.libraryOptions={},this.Auth=new jY}configure(t,n){const r=CF(t);this.resourcesConfig=r,n&&(this.libraryOptions=n),this.resourcesConfig=yF(this.resourcesConfig),this.Auth.configure(this.resourcesConfig.Auth,this.libraryOptions.Auth),(this.resourcesConfig.Analytics?.Pinpoint||this.resourcesConfig.Notifications?.InAppMessaging?.Pinpoint||this.resourcesConfig.Notifications?.PushNotification?.Pinpoint)&&console.warn("AWS will end support for Amazon Pinpoint on October 30, 2026. The guidance is to use AWS End User Messaging for push notifications and SMS, Amazon Simple Email Service for sending emails, Amazon Connect for campaigns, journeys, endpoints, and engagement analytics. Pinpoint recommends Amazon Kinesis for event collection and mobile analytics."),Ko.dispatch("core",{event:"configure",data:this.resourcesConfig},"Configure",Go),this.notifyOAuthListener(),this.isConfigured=!0}getConfig(){return this.isConfigured||console.warn("Amplify has not been configured. Please call Amplify.configure() before using this service."),this.resourcesConfig}[bF](t){this.resourcesConfig.Auth?.Cognito.loginWith?.oauth?t(this.resourcesConfig.Auth?.Cognito):this.oAuthListener=t}notifyOAuthListener(){!this.resourcesConfig.Auth?.Cognito.loginWith?.oauth||!this.oAuthListener||(this.oAuthListener(this.resourcesConfig.Auth?.Cognito),this.oAuthListener=void 0)}}const Ut=new BY,_F=(e,t)=>e.Auth.fetchAuthSession(t),my=e=>_F(Ut,e);function IF(){return Ut.Auth.clearCredentials()}const gy=e=>{const{headers:t,statusCode:n}=e;return{...HY(e)?e.$metadata:{},httpStatusCode:n,requestId:t["x-amzn-requestid"]??t["x-amzn-request-id"]??t["x-amz-request-id"],extendedRequestId:t["x-amz-id-2"],cfId:t["x-amz-cf-id"]}},HY=e=>typeof e?.$metadata=="object",_u=async e=>{if(!e||e.statusCode<300)return;const t=await Sh(e),r=(a=>{const[c]=a.toString().split(/[,:]+/);return c.includes("#")?c.split("#")[1]:c})(e.headers["x-amzn-errortype"]??t.code??t.__type??"UnknownError"),o=t.message??t.Message??"Unknown error",s=new Error(o);return Object.assign(s,{name:r,$metadata:gy(e)})},Sh=async e=>{if(!e.body)throw new Error("Missing response payload");const t=await e.body.json();return Object.assign(t,{$metadata:gy(e)})},Cn=(e,t,n,r)=>async(o,s)=>{const a={...r,...o},c=await a.endpointResolver(a,s),u=await t(s,c),f=await e(u,{...a});return n(f)},qY=300*1e3;function VY(e=qY){return r=>{const o=2**r*100+100*Math.random();return o>e?!1:o}}const AF=3,ak="amz-sdk-invocation-id",WY="amz-sdk-request",lk=300*1e3,RF=e=>{const n=VY(lk)(e);return n===!1?lk:n},GY=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],KY=e=>!!e&&GY.includes(e),TF=e=>async(t,n)=>{const r=n??await e(t)??void 0,o=r?.code||r?.name,s=t?.statusCode;return{retryable:JY(n)||QY(s,o)||KY(o)||XY(s,o)}},ZY=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],YY=["TimeoutError","RequestTimeout","RequestTimeoutException"],QY=(e,t)=>e===429||!!t&&ZY.includes(t),JY=e=>[Gi.NetworkError,"ERR_NETWORK"].includes(e?.name),XY=(e,t)=>!!e&&[500,502,503,504].includes(e)||!!t&&YY.includes(t),OF="cognito-identity",MF={service:OF,retryDecider:TF(_u),computeDelay:RF,cache:"no-store"},eQ=({maxAttempts:e=AF,retryDecider:t,computeDelay:n,abortSignal:r})=>{if(e<1)throw new Error("maxAttempts must be greater than 0");return(o,s)=>async function(c){let u,f=s.attemptsCount??0,h;const m=()=>{if(h)return ck(h,f),h;throw ck(u,f),u};for(;!r?.aborted&&f<e;){try{h=await o(c),u=void 0}catch(C){u=C,h=void 0}f=(s.attemptsCount??0)>f?s.attemptsCount??0:f+1,s.attemptsCount=f;const{isCredentialsExpiredError:g,retryable:v}=await t(h,u,s);if(v){if(s.isCredentialsExpired=!!g,!r?.aborted&&f<e){const C=n(f);await tQ(C,r)}continue}else return m()}if(r?.aborted)throw new Error("Request aborted.");return m()}},tQ=(e,t)=>{if(t?.aborted)return Promise.resolve();let n,r;const o=new Promise(s=>{r=s,n=setTimeout(s,e)});return t?.addEventListener("abort",function s(a){clearTimeout(n),t?.removeEventListener("abort",s),r()}),o},ck=(e,t)=>{Object.prototype.toString.call(e)==="[object Object]"&&(e.$metadata={...e.$metadata??{},attempts:t})},nQ=Gc,rQ=()=>e=>async function(n){return n.headers[ak]||(n.headers[ak]=nQ()),e(n)},oQ=({maxAttempts:e=AF})=>(t,n)=>async function(o){const s=n.attemptsCount??0;return o.headers[WY]=`attempt=${s+1}; max=${e}`,t(o)},sQ=({userAgentHeader:e="x-amz-user-agent",userAgentValue:t=""})=>n=>async function(o){if(t.trim().length===0)return await n(o);{const s=e.toLowerCase();return o.headers[s]=o.headers[s]?`${o.headers[s]} ${t}`:t,await n(o)}},DA=(e,t)=>(n,r)=>{const o={};let s=a=>e(a,r);for(let a=t.length-1;a>=0;a--){const c=t[a];s=c(r)(s,o)}return s(n)},_1=e=>{let t;return()=>(t||(t=e()),t)},iQ=e=>!["HEAD","GET"].includes(e.toUpperCase()),aQ=async({url:e,method:t,headers:n,body:r},{abortSignal:o,cache:s,withCrossDomainCredentials:a})=>{let c;try{c=await fetch(e,{method:t,headers:n,body:iQ(t)?r:void 0,signal:o,cache:s,credentials:a?"include":"same-origin"})}catch(m){throw m instanceof TypeError?new Sr({name:Gi.NetworkError,message:"A network error has occurred.",underlyingError:m}):m}const u={};c.headers?.forEach((m,g)=>{u[g.toLowerCase()]=m});const f={statusCode:c.status,headers:u,body:null},h=Object.assign(c.body??{},{text:_1(()=>c.text()),blob:_1(()=>c.blob()),json:_1(()=>c.json())});return{...f,body:h}},PF=DA(aQ,[sQ,rQ,eQ,oQ]),lQ=()=>e=>async function(n){return n.headers["cache-control"]="no-store",e(n)},NF=DA(PF,[lQ]),kF=e=>(t,n)=>{const r=cQ(e),o=JSON.stringify(t);return uQ(n,r,o)},cQ=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}),uQ=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"}),uk=e=>Cn(NF,kF("GetCredentialsForIdentity"),dQ,{...MF,...e,userAgentValue:hy()}),dQ=async e=>{if(e.statusCode>=300)throw await _u(e);const t=await Sh(e);return{IdentityId:t.IdentityId,Credentials:fQ(t.Credentials),$metadata:gy(e)}},fQ=({Expiration:e,...t}={})=>({...t,Expiration:e&&new Date(e*1e3)}),hQ=e=>Cn(NF,kF("GetId"),pQ,{...MF,...e,userAgentValue:hy()}),pQ=async e=>{if(e.statusCode>=300)throw await _u(e);return{IdentityId:(await Sh(e)).IdentityId,$metadata:gy(e)}},DF={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},mQ={partitions:[DF,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},LF=e=>{const{partitions:t}=mQ;for(const{regions:n,outputs:r,regionRegex:o}of t){const s=new RegExp(o);if(n.includes(e)||s.test(e))return r.dnsSuffix}return DF.outputs.dnsSuffix},oa=URL,gQ=({region:e})=>({url:new oa(`https://${OF}.${e}.${LF(e)}`)});class df extends Sr{constructor(){super({name:Gi.PlatformNotSupported,message:"Function not supported on current platform"})}}class UF{constructor(t){this.storage=t}async setItem(t,n){if(!this.storage)throw new df;this.storage.setItem(t,n)}async getItem(t){if(!this.storage)throw new df;return this.storage.getItem(t)}async removeItem(t){if(!this.storage)throw new df;this.storage.removeItem(t)}async clear(){if(!this.storage)throw new df;this.storage.clear()}}class FF{constructor(){this.storage=new Map}get length(){return this.storage.size}key(t){return t>this.length-1?null:Array.from(this.storage.keys())[t]}setItem(t,n){this.storage.set(t,n)}getItem(t){return this.storage.get(t)??null}removeItem(t){this.storage.delete(t)}clear(){this.storage.clear()}}const $F=new Wn("CoreStorageUtils"),vQ=()=>{try{if(typeof window<"u"&&window.localStorage)return window.localStorage}catch{$F.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new FF},zF=()=>{try{if(typeof window<"u"&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw new Error("sessionStorage is not defined")}catch{return $F.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new FF}};class yQ extends UF{constructor(){super(vQ())}}class bQ extends UF{constructor(){super(zF())}}class SQ{constructor(t){this._storage=t}get storage(){if(!this._storage)throw new df;return this._storage}setItem(t,n){this.storage.setItem(t,n)}getItem(t){return this.storage.getItem(t)}removeItem(t){this.storage.removeItem(t)}clear(){this.storage.clear()}}class CQ extends SQ{constructor(){super(zF())}}function mm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)r!=="__proto__"&&(e[r]=n[r])}return e}var wQ={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function S_(e,t){function n(o,s,a){if(!(typeof document>"u")){a=mm({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in a)a[u]&&(c+="; "+u,a[u]!==!0&&(c+="="+a[u].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+c}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],a={},c=0;c<s.length;c++){var u=s[c].split("="),f=u.slice(1).join("=");try{var h=decodeURIComponent(u[0]);if(h in a||(a[h]=e.read(f,h)),o===h)break}catch{}}return o?a[o]:a}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",mm({},s,{expires:-1}))},withAttributes:function(o){return S_(this.converter,mm({},this.attributes,o))},withConverter:function(o){return S_(mm({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var gm=S_(wQ,{path:"/"});class EQ{constructor(t={}){const{path:n,domain:r,expires:o,sameSite:s,secure:a}=t;if(this.domain=r,this.path=n||"/",this.expires=Object.prototype.hasOwnProperty.call(t,"expires")?o:365,this.secure=Object.prototype.hasOwnProperty.call(t,"secure")?a:!0,Object.prototype.hasOwnProperty.call(t,"sameSite")){if(!s||!["strict","lax","none"].includes(s))throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if(s==="none"&&!this.secure)throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=s}}async setItem(t,n){gm.set(t,n,this.getData())}async getItem(t){return gm.get(t)??null}async removeItem(t){gm.remove(t,this.getData())}async clear(){const t=gm.get(),n=Object.keys(t).map(r=>this.removeItem(r));await Promise.all(n)}getData(){return{path:this.path,expires:this.expires,domain:this.domain,secure:this.secure,...this.sameSite&&{sameSite:this.sameSite}}}}const Ch=new yQ;new bQ;const Ns=new CQ,xQ=new Wn("I18n");let _Q=class{constructor(){this._options=null,this._lang=null,this._dict={}}setDefaultLanguage(){!this._lang&&typeof window<"u"&&window&&window.navigator&&(this._lang=window.navigator.language),xQ.debug(this._lang)}setLanguage(t){this._lang=t}get(t,n=void 0){if(this.setDefaultLanguage(),!this._lang)return typeof n<"u"?n:t;const r=this._lang;let o=this.getByLanguage(t,r);return o||(r.indexOf("-")>0&&(o=this.getByLanguage(t,r.split("-")[0])),o)?o:typeof n<"u"?n:t}getByLanguage(t,n,r=null){if(!n)return r;const o=this._dict[n];return o?o[t]:r}putVocabulariesForLanguage(t,n){let r=this._dict[t];r||(r=this._dict[t]={}),this._dict[t]={...r,...n}}putVocabularies(t){Object.keys(t).forEach(n=>{this.putVocabulariesForLanguage(n,t[n])})}};var Ua;(function(e){e.NotConfigured="NotConfigured"})(Ua||(Ua={}));const IQ={[Ua.NotConfigured]:{message:"i18n is not configured."}},vm=uy(IQ),dk=new Wn("I18n");let ym={language:null},vo=null,jF=class Da{static configure(t){return dk.debug("configure I18n"),t&&(ym=Object.assign({},ym,t.I18n||t),Da.createInstance()),ym}static getModuleName(){return"I18n"}static createInstance(){dk.debug("create I18n instance"),!vo&&(vo=new _Q)}static setLanguage(t){Da.checkConfig(),vm(!!vo,Ua.NotConfigured),vo.setLanguage(t)}static get(t,n){return Da.checkConfig(),vm(!!vo,Ua.NotConfigured),vo.get(t,n)}static putVocabulariesForLanguage(t,n){Da.checkConfig(),vm(!!vo,Ua.NotConfigured),vo.putVocabulariesForLanguage(t,n)}static putVocabularies(t){Da.checkConfig(),vm(!!vo,Ua.NotConfigured),vo.putVocabularies(t)}static checkConfig(){return vo||Da.createInstance(),!0}};jF.createInstance();const AQ=e=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=new Uint8Array(e);MA().getRandomValues(r);for(const o of r)n.push(t[o%t.length]);return n.join("")};function RQ(e){return(e.match(/.{2}/g)||[]).map(n=>String.fromCharCode(parseInt(n,16))).join("")}function TQ(e){return e.split("").map(t=>t.charCodeAt(0).toString(16).padStart(2,"0")).join("")}const OQ=e=>{let t;return async(...n)=>t||(t=new Promise((r,o)=>{e(...n).then(s=>{r(s)}).catch(s=>{o(s)}).finally(()=>{t=void 0})}),t)};function fk({expiresAt:e,clockDrift:t,tolerance:n=5e3}){return Date.now()+t+n>e}const MQ=async()=>{const{userAgentData:e}=navigator;if(!e)return navigator.userAgent;const{platform:t="",platformVersion:n="",model:r="",architecture:o="",fullVersionList:s=[]}=await e.getHighEntropyValues(["platform","platformVersion","architecture","model","fullVersionList"]),a=s.map(u=>`${u.brand}/${u.version}`).join(";");return[t,n,o,r,t,a].filter(u=>u).join(" ")||navigator.userAgent};function PQ(e){return Array.from(e,t=>String.fromCodePoint(t)).join("")}const nu={convert(e,t={urlSafe:!1,skipPadding:!1}){const n=typeof e=="string"?e:PQ(e);let r=NZ()(n);return t.urlSafe&&(r=r.replace(/\+/g,"-").replace(/\//g,"_")),t.skipPadding&&(r=r.replace(/=/g,"")),r}};function NQ(){return MA().getRandomValues(new Uint32Array(1))[0]}function kQ(e){const{words:t}=e,{sigBytes:n}=e,r=[];for(let o=0;o<n;o++){const s=t[o>>>2]>>>24-o%4*8&255;r.push((s>>>4).toString(16)),r.push((s&15).toString(16))}return r.join("")}class LA{constructor(t,n){this.words=[];let r=t;r=this.words=r||[],n!==void 0?this.sigBytes=n:this.sigBytes=r.length*4}random(t){const n=[];for(let r=0;r<t;r+=4)n.push(NQ());return new LA(n,t)}toString(){return kQ(this)}}var qe;(function(e){e.EmptySignInUsername="EmptySignInUsername",e.EmptySignInPassword="EmptySignInPassword",e.CustomAuthSignInPassword="CustomAuthSignInPassword",e.EmptySignUpUsername="EmptySignUpUsername",e.EmptySignUpPassword="EmptySignUpPassword",e.EmptyConfirmSignUpUsername="EmptyConfirmSignUpUsername",e.EmptyConfirmSignUpCode="EmptyConfirmSignUpCode",e.EmptyResendSignUpCodeUsername="EmptyresendSignUpCodeUsername",e.EmptyChallengeResponse="EmptyChallengeResponse",e.EmptyConfirmResetPasswordUsername="EmptyConfirmResetPasswordUsername",e.EmptyConfirmResetPasswordNewPassword="EmptyConfirmResetPasswordNewPassword",e.EmptyConfirmResetPasswordConfirmationCode="EmptyConfirmResetPasswordConfirmationCode",e.EmptyResetPasswordUsername="EmptyResetPasswordUsername",e.EmptyVerifyTOTPSetupCode="EmptyVerifyTOTPSetupCode",e.EmptyConfirmUserAttributeCode="EmptyConfirmUserAttributeCode",e.IncorrectMFAMethod="IncorrectMFAMethod",e.EmptyUpdatePassword="EmptyUpdatePassword",e.InvalidPreferredChallenge="InvalidPreferredChallenge"})(qe||(qe={}));const BF={[qe.EmptyChallengeResponse]:{message:"challengeResponse is required to confirmSignIn"},[qe.EmptyConfirmResetPasswordUsername]:{message:"username is required to confirmResetPassword"},[qe.EmptyConfirmSignUpCode]:{message:"code is required to confirmSignUp"},[qe.EmptyConfirmSignUpUsername]:{message:"username is required to confirmSignUp"},[qe.EmptyConfirmResetPasswordConfirmationCode]:{message:"confirmationCode is required to confirmResetPassword"},[qe.EmptyConfirmResetPasswordNewPassword]:{message:"newPassword is required to confirmResetPassword"},[qe.EmptyResendSignUpCodeUsername]:{message:"username is required to confirmSignUp"},[qe.EmptyResetPasswordUsername]:{message:"username is required to resetPassword"},[qe.EmptySignInPassword]:{message:"password is required to signIn"},[qe.EmptySignInUsername]:{message:"username is required to signIn"},[qe.EmptySignUpPassword]:{message:"password is required to signUp"},[qe.EmptySignUpUsername]:{message:"username is required to signUp"},[qe.CustomAuthSignInPassword]:{message:"A password is not needed when signing in with CUSTOM_WITHOUT_SRP",recoverySuggestion:"Do not include a password in your signIn call."},[qe.IncorrectMFAMethod]:{message:"Incorrect MFA method was chosen. It should be either SMS, TOTP, or EMAIL",recoverySuggestion:"Try to pass SMS, TOTP, or EMAIL as the challengeResponse"},[qe.EmptyVerifyTOTPSetupCode]:{message:"code is required to verifyTotpSetup"},[qe.EmptyUpdatePassword]:{message:"oldPassword and newPassword are required to changePassword"},[qe.EmptyConfirmUserAttributeCode]:{message:"confirmation code is required to confirmUserAttribute"},[qe.InvalidPreferredChallenge]:{message:"The preferred challenge is not enabled in your backend configuration",recoverySuggestion:"Ensure the authentication method is enabled in your Amplify backend configuration"}};var Pn;(function(e){e.DEFAULT_MSG="Authentication Error",e.EMPTY_EMAIL="Email cannot be empty",e.EMPTY_PHONE="Phone number cannot be empty",e.EMPTY_USERNAME="Username cannot be empty",e.INVALID_USERNAME="The username should either be a string or one of the sign in types",e.EMPTY_PASSWORD="Password cannot be empty",e.EMPTY_CODE="Confirmation code cannot be empty",e.SIGN_UP_ERROR="Error creating account",e.NO_MFA="No valid MFA method provided",e.INVALID_MFA="Invalid MFA type",e.EMPTY_CHALLENGE="Challenge response cannot be empty",e.NO_USER_SESSION="Failed to get the session because the user is empty",e.NETWORK_ERROR="Network Error",e.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",e.AUTOSIGNIN_ERROR="Please use your credentials to sign in",e.OAUTH_ERROR="Couldn't finish OAuth flow, check your User Pool HostedUI settings"})(Pn||(Pn={}));var Zo;(function(e){e.SignInException="SignInException",e.OAuthSignInError="OAuthSignInException"})(Zo||(Zo={}));class Ue extends Sr{constructor(t){super(t),this.constructor=Ue,Object.setPrototypeOf(this,Ue.prototype)}}function an(e,t){const{message:n,recoverySuggestion:r}=BF[t];if(!e)throw new Ue({name:t,message:n,recoverySuggestion:r})}function dt(e){const t=e?.split("_")[0];if(!e||e.indexOf("_")<0||!t||typeof t!="string")throw new Ue({name:"InvalidUserPoolId",message:"Invalid user pool id provided."});return t}function C_(e){if(!e||!e.includes(":"))throw new Ue({name:"InvalidIdentityPoolIdException",message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."});return e.split(":")[0]}function hk(e){return Object.entries(e).map(([t,n])=>({Name:t,Value:n}))}function DQ(e){const t={};return e?.forEach(n=>{n.Name&&(t[n.Name]=n.Value)}),t}var pk;(function(e){e.ConcurrentModificationException="ConcurrentModificationException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"})(pk||(pk={}));var mk;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(mk||(mk={}));var gk;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UsernameExistsException="UsernameExistsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(gk||(gk={}));var vk;(function(e){e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyFailedAttemptsException="TooManyFailedAttemptsException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(vk||(vk={}));var yk;(function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyFailedAttemptsException="TooManyFailedAttemptsException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"})(yk||(yk={}));var bk;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(bk||(bk={}));var Sk;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Sk||(Sk={}));var Ck;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Ck||(Ck={}));var wk;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"})(wk||(wk={}));var Ek;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Ek||(Ek={}));var xk;(function(e){e.ExternalServiceException="ExternalServiceException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceConflictException="ResourceConflictException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException"})(xk||(xk={}));var _k;(function(e){e.ExternalServiceException="ExternalServiceException",e.InternalErrorException="InternalErrorException",e.InvalidIdentityPoolConfigurationException="InvalidIdentityPoolConfigurationException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceConflictException="ResourceConflictException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException"})(_k||(_k={}));var Ik;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Ik||(Ik={}));var Ak;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException"})(Ak||(Ak={}));var rv;(function(e){e.PasswordResetRequiredException="PasswordResetRequiredException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(rv||(rv={}));var Rk;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"})(Rk||(Rk={}));var Tk;(function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.MFAMethodNotFoundException="MFAMethodNotFoundException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Tk||(Tk={}));var Ok;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Ok||(Ok={}));var w_;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UsernameExistsException="UsernameExistsException"})(w_||(w_={}));var Mk;(function(e){e.AliasExistsException="AliasExistsException",e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Mk||(Mk={}));var Pk;(function(e){e.CodeMismatchException="CodeMismatchException",e.EnableSoftwareTokenMFAException="EnableSoftwareTokenMFAException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Pk||(Pk={}));var Nk;(function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Nk||(Nk={}));var kk;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(kk||(kk={}));var Dk;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Dk||(Dk={}));const vy="UserUnAuthenticatedException",LQ="UserAlreadyAuthenticatedException",UQ="DeviceMetadataNotFoundException",HF="AutoSignInException",FQ="InvalidRedirectException",$Q="InvalidAppSchemeException",zQ="InvalidPreferredRedirectUrlException",jQ=new Ue({name:FQ,message:"signInRedirect or signOutRedirect had an invalid format or was not found.",recoverySuggestion:"Please make sure the signIn/Out redirect in your oauth config is valid."});new Ue({name:$Q,message:"A valid non-http app scheme was not found in the config.",recoverySuggestion:"Please make sure a valid custom app scheme is present in the config."});new Ue({name:zQ,message:"The given preferredRedirectUrl does not match any items in the redirectSignOutUrls array from the config.",recoverySuggestion:"Please make sure a matching preferredRedirectUrl is provided."});const BQ="InvalidOriginException",HQ=new Ue({name:BQ,message:"redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin",recoverySuggestion:"Please call signInWithRedirect from the same origin."}),qQ="OAuthSignOutException",VQ="TokenRefreshException",WQ="UnexpectedSignInInterruptionException";function Iu(e){if(!e||!e.accessToken)throw new Ue({name:vy,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}function GQ(e){if(!e||!e.idToken)throw new Ue({name:vy,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}const KQ=new Ue({name:VQ,message:`Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow.
3
- Please change your oauth configuration to use 'code grant' flow.`,recoverySuggestion:`Please logout and change your Amplify configuration to use "code grant" flow.
4
- E.g { responseType: 'code' }`}),ZQ=new Ue({name:vy,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function qF(e){if(JQ(e))throw KQ;if(!QQ(e))throw ZQ}function VF(e){if(!e||!e.deviceKey||!e.deviceGroupKey||!e.randomPassword)throw new Ue({name:UQ,message:"Either deviceKey, deviceGroupKey or secretPassword were not found during the sign-in process.",recoverySuggestion:"Make sure to not clear storage after calling the signIn API."})}const YQ={inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"};function WF(e){return e?.accessToken||e?.idToken}function QQ(e){return WF(e)&&e?.refreshToken}function JQ(e){return WF(e)&&!e?.refreshToken}const XQ=async e=>{const t=e.getConfig().Auth?.Cognito;et(t);const n=await e.Auth.getTokens({forceRefresh:!1});Iu(n);const{"cognito:username":r,sub:o}=n.idToken?.payload??{},s={username:r,userId:o},a=eJ(n);return a&&(s.signInDetails=a),s};function eJ(e){return e?.signInDetails}const yy=async()=>XQ(Ut),It=(e,t)=>hy({category:lo.Auth,action:e,...t}),Nn=e=>(t,n)=>{const r=tJ(e),o=JSON.stringify(t);return nJ(n,r,o)},tJ=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${e}`}),nJ=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"});function co(e){if(!e||e.name==="Error"||e instanceof TypeError)throw new Ue({name:Gi.Unknown,message:"An unknown error has occurred.",underlyingError:e})}const Gn=()=>async e=>{if(e.statusCode>=300){const t=await _u(e);throw co(t),new Ue({name:t.name,message:t.message,metadata:t.$metadata})}return Sh(e)},rJ=()=>(e,t)=>async function(r){return r.headers={...r.headers,"cache-control":"no-store",...await Ut.libraryOptions?.Auth?.headers?.()},e(r)},kn=DA(PF,[rJ]),GF="cognito-idp",Dn={service:GF,retryDecider:TF(_u),computeDelay:RF,get userAgentValue(){return hy()},cache:"no-store"},wh=e=>Cn(kn,Nn("InitiateAuth"),Gn(),{...Dn,...e}),$r=e=>Cn(kn,Nn("RespondToAuthChallenge"),Gn(),{...Dn,...e}),oJ=e=>Cn(kn,Nn("VerifySoftwareToken"),Gn(),{...Dn,...e}),sJ=e=>Cn(kn,Nn("AssociateSoftwareToken"),Gn(),{...Dn,...e}),iJ=({region:e})=>({url:new oa(`https://${GF}.${e}.${LF(e)}`)}),ft=({endpointOverride:e})=>t=>e?{url:new oa(e)}:iJ(t),aJ=e=>Cn(kn,Nn("GetTokensFromRefreshToken"),Gn(),{...Dn,...e}),lJ=async({tokens:e,authConfig:t,username:n,clientMetadata:r})=>{et(t?.Cognito);const{userPoolId:o,userPoolClientId:s,userPoolEndpoint:a}=t.Cognito,c=dt(o);qF(e);const u=aJ({endpointResolver:ft({endpointOverride:a})}),{AuthenticationResult:f}=await u({region:c},{ClientId:s,RefreshToken:e.refreshToken,DeviceKey:e.deviceMetadata?.deviceKey,ClientMetadata:r}),h=$s(f?.AccessToken??""),m=f?.IdToken?$s(f.IdToken):void 0,{iat:g}=h.payload;if(!g)throw new Ue({name:"iatNotFoundException",message:"iat not found in access token"});const v=g*1e3-new Date().getTime();return{accessToken:h,idToken:m,clockDrift:v,refreshToken:f?.RefreshToken??e.refreshToken,username:n}},cJ=OQ(lJ),uJ={accessToken:"accessToken",idToken:"idToken",oidcProvider:"oidcProvider",clockDrift:"clockDrift",refreshToken:"refreshToken",deviceKey:"deviceKey",randomPasswordKey:"randomPasswordKey",deviceGroupKey:"deviceGroupKey",signInDetails:"signInDetails",oauthMetadata:"oauthMetadata"};var ov;(function(e){e.InvalidAuthTokens="InvalidAuthTokens"})(ov||(ov={}));const dJ={[ov.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},fJ=uy(dJ),Lk="CognitoIdentityServiceProvider";class hJ{getKeyValueStorage(){if(!this.keyValueStorage)throw new Ue({name:"KeyValueStorageNotFoundException",message:"KeyValueStorage was not found in TokenStore"});return this.keyValueStorage}setKeyValueStorage(t){this.keyValueStorage=t}setAuthConfig(t){this.authConfig=t}async loadTokens(){try{const t=await this.getAuthKeys(),n=await this.getKeyValueStorage().getItem(t.accessToken);if(!n)throw new Ue({name:"NoSessionFoundException",message:"Auth session was not found. Make sure to call signIn."});const r=$s(n),o=await this.getKeyValueStorage().getItem(t.idToken),s=o?$s(o):void 0,a=await this.getKeyValueStorage().getItem(t.refreshToken)??void 0,c=await this.getKeyValueStorage().getItem(t.clockDrift)??"0",u=Number.parseInt(c),f=await this.getKeyValueStorage().getItem(t.signInDetails),h={accessToken:r,idToken:s,refreshToken:a,deviceMetadata:await this.getDeviceMetadata()??void 0,clockDrift:u,username:await this.getLastAuthUser()};return f&&(h.signInDetails=JSON.parse(f)),h}catch{return null}}async storeTokens(t){fJ(t!==void 0,ov.InvalidAuthTokens);const n=t.username;await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(),n);const r=await this.getAuthKeys();await this.getKeyValueStorage().setItem(r.accessToken,t.accessToken.toString()),t.idToken?await this.getKeyValueStorage().setItem(r.idToken,t.idToken.toString()):await this.getKeyValueStorage().removeItem(r.idToken),t.refreshToken?await this.getKeyValueStorage().setItem(r.refreshToken,t.refreshToken):await this.getKeyValueStorage().removeItem(r.refreshToken),t.deviceMetadata&&(t.deviceMetadata.deviceKey&&await this.getKeyValueStorage().setItem(r.deviceKey,t.deviceMetadata.deviceKey),t.deviceMetadata.deviceGroupKey&&await this.getKeyValueStorage().setItem(r.deviceGroupKey,t.deviceMetadata.deviceGroupKey),await this.getKeyValueStorage().setItem(r.randomPasswordKey,t.deviceMetadata.randomPassword)),t.signInDetails?await this.getKeyValueStorage().setItem(r.signInDetails,JSON.stringify(t.signInDetails)):await this.getKeyValueStorage().removeItem(r.signInDetails),await this.getKeyValueStorage().setItem(r.clockDrift,`${t.clockDrift}`)}async clearTokens(){const t=await this.getAuthKeys();await Promise.all([this.getKeyValueStorage().removeItem(t.accessToken),this.getKeyValueStorage().removeItem(t.idToken),this.getKeyValueStorage().removeItem(t.clockDrift),this.getKeyValueStorage().removeItem(t.refreshToken),this.getKeyValueStorage().removeItem(t.signInDetails),this.getKeyValueStorage().removeItem(this.getLastAuthUserKey()),this.getKeyValueStorage().removeItem(t.oauthMetadata)])}async getDeviceMetadata(t){const n=await this.getAuthKeys(t),r=await this.getKeyValueStorage().getItem(n.deviceKey),o=await this.getKeyValueStorage().getItem(n.deviceGroupKey),s=await this.getKeyValueStorage().getItem(n.randomPasswordKey);return s&&o&&r?{deviceKey:r,deviceGroupKey:o,randomPassword:s}:null}async clearDeviceMetadata(t){const n=await this.getAuthKeys(t);await Promise.all([this.getKeyValueStorage().removeItem(n.deviceKey),this.getKeyValueStorage().removeItem(n.deviceGroupKey),this.getKeyValueStorage().removeItem(n.randomPasswordKey)])}async getAuthKeys(t){et(this.authConfig?.Cognito);const n=t??await this.getLastAuthUser();return pJ(Lk,`${this.authConfig.Cognito.userPoolClientId}.${n}`)}getLastAuthUserKey(){et(this.authConfig?.Cognito);const t=this.authConfig.Cognito.userPoolClientId;return`${Lk}.${t}.LastAuthUser`}async getLastAuthUser(){return await this.getKeyValueStorage().getItem(this.getLastAuthUserKey())??"username"}async setOAuthMetadata(t){const{oauthMetadata:n}=await this.getAuthKeys();await this.getKeyValueStorage().setItem(n,JSON.stringify(t))}async getOAuthMetadata(){const{oauthMetadata:t}=await this.getAuthKeys(),n=await this.getKeyValueStorage().getItem(t);return n&&JSON.parse(n)}}const pJ=(e,t)=>UA(uJ)(`${e}`,t);function UA(e){const t=Object.values({...e});return(n,r)=>t.reduce((o,s)=>({...o,[s]:`${n}.${r}.${s}`}),{})}const Uk="amplify-signin-with-hostedUI",Uo="CognitoIdentityServiceProvider";class KF{constructor(t){this.keyValueStorage=t}async clearOAuthInflightData(){et(this.cognitoConfig);const t=Fo(Uo,this.cognitoConfig.userPoolClientId);await Promise.all([this.keyValueStorage.removeItem(t.inflightOAuth),this.keyValueStorage.removeItem(t.oauthPKCE),this.keyValueStorage.removeItem(t.oauthState)])}async clearOAuthData(){et(this.cognitoConfig);const t=Fo(Uo,this.cognitoConfig.userPoolClientId);return await this.clearOAuthInflightData(),await this.keyValueStorage.removeItem(Uk),this.keyValueStorage.removeItem(t.oauthSignIn)}loadOAuthState(){et(this.cognitoConfig);const t=Fo(Uo,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(t.oauthState)}storeOAuthState(t){et(this.cognitoConfig);const n=Fo(Uo,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthState,t)}loadPKCE(){et(this.cognitoConfig);const t=Fo(Uo,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(t.oauthPKCE)}storePKCE(t){et(this.cognitoConfig);const n=Fo(Uo,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthPKCE,t)}setAuthConfig(t){this.cognitoConfig=t}async loadOAuthInFlight(){et(this.cognitoConfig);const t=Fo(Uo,this.cognitoConfig.userPoolClientId);return await this.keyValueStorage.getItem(t.inflightOAuth)==="true"}async storeOAuthInFlight(t){et(this.cognitoConfig);const n=Fo(Uo,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(n.inflightOAuth,`${t}`)}async loadOAuthSignIn(){et(this.cognitoConfig);const t=Fo(Uo,this.cognitoConfig.userPoolClientId),n=await this.keyValueStorage.getItem(Uk),[r,o]=(await this.keyValueStorage.getItem(t.oauthSignIn))?.split(",")??[];return{isOAuthSignIn:r==="true"||n==="true",preferPrivateSession:o==="true"}}async storeOAuthSignIn(t,n=!1){et(this.cognitoConfig);const r=Fo(Uo,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(r.oauthSignIn,`${t},${n}`)}}const Fo=(e,t)=>UA(YQ)(e,t),gr=new KF(Ch),E_=[],mJ=e=>{E_.push(e)},ZF=()=>{for(;E_.length;)E_.pop()?.()};class gJ{constructor(){this.waitForInflightOAuth=py()?async()=>{if(await gr.loadOAuthInFlight())return this.inflightPromise?this.inflightPromise:(this.inflightPromise=new Promise((t,n)=>{mJ(t)}),this.inflightPromise)}:async()=>{}}setAuthConfig(t){gr.setAuthConfig(t.Cognito),this.authConfig=t}setTokenRefresher(t){this.tokenRefresher=t}setAuthTokenStore(t){this.tokenStore=t}getTokenStore(){if(!this.tokenStore)throw new Ue({name:"EmptyTokenStoreException",message:"TokenStore not set"});return this.tokenStore}getTokenRefresher(){if(!this.tokenRefresher)throw new Ue({name:"EmptyTokenRefresherException",message:"TokenRefresher not set"});return this.tokenRefresher}setClientMetadataProvider(t){this.clientMetadataProvider=t}async getTokens(t){let n;try{et(this.authConfig?.Cognito)}catch{return null}await this.waitForInflightOAuth(),this.inflightPromise=void 0,n=await this.getTokenStore().loadTokens();const r=await this.getTokenStore().getLastAuthUser();if(n===null)return null;const o=!!n?.idToken&&fk({expiresAt:(n.idToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0}),s=fk({expiresAt:(n.accessToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0});return(t?.forceRefresh||o||s)&&(n=await this.refreshTokens({tokens:n,username:r,clientMetadata:t?.clientMetadata??await this.clientMetadataProvider?.()}),n===null)?null:{accessToken:n?.accessToken,idToken:n?.idToken,signInDetails:n?.signInDetails}}async refreshTokens({tokens:t,username:n,clientMetadata:r}){try{const{signInDetails:o}=t,s=await this.getTokenRefresher()({tokens:t,authConfig:this.authConfig,username:n,clientMetadata:r});return s.signInDetails=o,await this.setTokens({tokens:s}),Ko.dispatch("auth",{event:"tokenRefresh"},"Auth",Go),s}catch(o){return this.handleErrors(o)}}handleErrors(t){if(co(t),this.isAuthenticationError(t)&&this.clearTokens(),Ko.dispatch("auth",{event:"tokenRefresh_failure",data:{error:t}},"Auth",Go),t.name.startsWith("NotAuthorizedException"))return null;throw t}isAuthenticationError(t){return["NotAuthorizedException","TokenRevokedException","UserNotFoundException","PasswordResetRequiredException","UserNotConfirmedException","RefreshTokenReuseException"].some(r=>t?.name?.startsWith?.(r))}async setTokens({tokens:t}){return this.getTokenStore().storeTokens(t)}async clearTokens(){return this.getTokenStore().clearTokens()}getDeviceMetadata(t){return this.getTokenStore().getDeviceMetadata(t)}clearDeviceMetadata(t){return this.getTokenStore().clearDeviceMetadata(t)}setOAuthMetadata(t){return this.getTokenStore().setOAuthMetadata(t)}getOAuthMetadata(){return this.getTokenStore().getOAuthMetadata()}}class vJ{constructor(){this.authTokenStore=new hJ,this.authTokenStore.setKeyValueStorage(Ch),this.tokenOrchestrator=new gJ,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(cJ)}getTokens(t={}){return this.tokenOrchestrator.getTokens(t)}setKeyValueStorage(t){this.authTokenStore.setKeyValueStorage(t)}setClientMetadataProvider(t){this.tokenOrchestrator.setClientMetadataProvider(t)}setAuthConfig(t){this.authTokenStore.setAuthConfig(t),this.tokenOrchestrator.setAuthConfig(t)}}const Tg=new vJ,{tokenOrchestrator:Cr}=Tg;async function Zs(e){if(e.AccessToken){const t=$s(e.AccessToken),n=(t.payload.iat||0)*1e3,r=new Date().getTime(),o=n>0?n-r:0;let s,a,c;e.RefreshToken&&(a=e.RefreshToken),e.IdToken&&(s=$s(e.IdToken)),e?.NewDeviceMetadata&&(c=e.NewDeviceMetadata);const u={accessToken:t,idToken:s,refreshToken:a,clockDrift:o,deviceMetadata:c,username:e.username};e?.signInDetails&&(u.signInDetails=e.signInDetails),await Cr.setTokens({tokens:u})}else throw new Sr({message:"Invalid tokens",name:"InvalidTokens",recoverySuggestion:"Check Cognito UserPool settings"})}const yJ="Unable to get user session following successful sign-in.",sa=async()=>{try{Ko.dispatch("auth",{event:"signedIn",data:await yy()},"Auth",Go)}catch(e){throw e.name===vy?new Ue({name:WQ,message:yJ,recoverySuggestion:"This most likely is due to auth tokens not being persisted. If you are using cookie store, please ensure cookies can be correctly set from your server."}):e}};function YF(){return{active:!1}}const bJ=(e,t)=>{switch(t.type){case"SET_USERNAME":return{...e,username:t.value};case"SET_SESSION":return{...e,session:t.value};case"START":return{...e,active:!0};case"RESET":return YF();default:return e}},SJ=e=>{let t=e(YF(),{type:"RESET"});return{getState:()=>t,dispatch:n=>{t=e(t,n)}}},zi=SJ(bJ),CJ=180*1e3,bm="CognitoSignInState",ks={username:`${bm}.username`,challengeName:`${bm}.challengeName`,signInSession:`${bm}.signInSession`,expiry:`${bm}.expiry`},wJ=(e,t)=>{switch(t.type){case"SET_SIGN_IN_SESSION":return Sm({signInSession:t.value}),{...e,signInSession:t.value};case"SET_SIGN_IN_STATE":return Sm(t.value),{...t.value};case"SET_CHALLENGE_NAME":return Sm({challengeName:t.value}),{...e,challengeName:t.value};case"SET_USERNAME":return Sm({username:t.value}),{...e,username:t.value};case"SET_INITIAL_STATE":return xJ();case"RESET_STATE":return QF(),FA();default:return e}},EJ=e=>{const t=Number(e),n=Date.now();return t<=n},Ro=()=>{Yo.dispatch({type:"RESET_STATE"})},QF=()=>{for(const e of Object.values(ks))Ns.removeItem(e)},FA=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),xJ=()=>{const e=Ns.getItem(ks.expiry);if(!e||EJ(e))return QF(),FA();const t=Ns.getItem(ks.username)??void 0,n=Ns.getItem(ks.challengeName)??void 0,r=Ns.getItem(ks.signInSession)??void 0;return{username:t,challengeName:n,signInSession:r}},_J=e=>{let t=e(FA(),{type:"SET_INITIAL_STATE"});return{getState:()=>t,dispatch:n=>{t=e(t,n)}}},Yo=_J(wJ);function gl(e){Yo.dispatch({type:"SET_SIGN_IN_STATE",value:e})}const Sm=({challengeName:e,signInSession:t,username:n})=>{n&&Ns.setItem(ks.username,n),e&&Ns.setItem(ks.challengeName,e),t&&(Ns.setItem(ks.signInSession,t),Ns.setItem(ks.expiry,String(Date.now()+CJ)))},Fk="Passkeys may not be supported on this device. Ensure your application is running in a secure context (HTTPS) and Web Authentication API is supported.";class ao extends Sr{constructor(t){super(t),this.constructor=ao,Object.setPrototypeOf(this,ao.prototype)}}var Dt;(function(e){e.PasskeyNotSupported="PasskeyNotSupported",e.PasskeyAlreadyExists="PasskeyAlreadyExists",e.InvalidPasskeyRegistrationOptions="InvalidPasskeyRegistrationOptions",e.InvalidPasskeyAuthenticationOptions="InvalidPasskeyAuthenticationOptions",e.RelyingPartyMismatch="RelyingPartyMismatch",e.PasskeyRegistrationFailed="PasskeyRegistrationFailed",e.PasskeyRetrievalFailed="PasskeyRetrievalFailed",e.PasskeyRegistrationCanceled="PasskeyRegistrationCanceled",e.PasskeyAuthenticationCanceled="PasskeyAuthenticationCanceled",e.PasskeyOperationAborted="PasskeyOperationAborted"})(Dt||(Dt={}));const I1="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",$k="Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.",ru={[Dt.PasskeyNotSupported]:{message:"Passkeys may not be supported on this device.",recoverySuggestion:Fk},[Dt.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:$k},[Dt.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:$k},[Dt.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:Fk},[Dt.PasskeyRetrievalFailed]:{message:"Device failed to retrieve passkey.",recoverySuggestion:"Passkeys may not be available on this device. Try an alternative authentication factor like PASSWORD, EMAIL_OTP, or SMS_OTP."},[Dt.PasskeyAlreadyExists]:{message:"Passkey already exists in authenticator.",recoverySuggestion:"Proceed with existing passkey or try again after deleting the credential."},[Dt.PasskeyRegistrationCanceled]:{message:"Passkey registration ceremony has been canceled.",recoverySuggestion:I1},[Dt.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:I1},[Dt.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:I1},[Dt.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},Au=uy(ru,ao),JF=e=>{if(e instanceof Error){if(e.name==="AbortError"){const{message:t,recoverySuggestion:n}=ru[Dt.PasskeyOperationAborted];return new ao({name:Dt.PasskeyOperationAborted,message:t,recoverySuggestion:n,underlyingError:e})}if(e.name==="SecurityError"){const{message:t,recoverySuggestion:n}=ru[Dt.RelyingPartyMismatch];return new ao({name:Dt.RelyingPartyMismatch,message:t,recoverySuggestion:n,underlyingError:e})}}return new ao({name:Gi.Unknown,message:"An unknown error has occurred.",underlyingError:e})},IJ=e=>{if(e instanceof ao)return e;if(e instanceof Error&&e.name==="NotAllowedError"){const{message:t,recoverySuggestion:n}=ru[Dt.PasskeyAuthenticationCanceled];return new ao({name:Dt.PasskeyAuthenticationCanceled,message:t,recoverySuggestion:n,underlyingError:e})}return JF(e)},XF=()=>py()&&window.isSecureContext&&"credentials"in navigator&&typeof window.PublicKeyCredential=="function",Vo=e=>nu.convert(new Uint8Array(e),{urlSafe:!0,skipPadding:!0}),If=e=>Uint8Array.from(PA.convert(e,{urlSafe:!0}),t=>t.charCodeAt(0)).buffer,AJ=e=>{const t=If(e.user.id),n=If(e.challenge),r=(e.excludeCredentials||[]).map(o=>({...o,id:If(o.id)}));return{...e,excludeCredentials:r,challenge:n,user:{...e.user,id:t}}},RJ=e=>{const t={clientDataJSON:Vo(e.response.clientDataJSON),attestationObject:Vo(e.response.attestationObject),transports:e.response.getTransports(),publicKeyAlgorithm:e.response.getPublicKeyAlgorithm(),authenticatorData:Vo(e.response.getAuthenticatorData())},n=e.response.getPublicKey();n&&(t.publicKey=Vo(n));const r={type:e.type,id:e.id,rawId:Vo(e.rawId),clientExtensionResults:e.getClientExtensionResults(),response:t};return e.authenticatorAttachment&&(r.authenticatorAttachment=e.authenticatorAttachment),r},TJ=e=>{const t=If(e.challenge),n=(e.allowCredentials||[]).map(r=>({...r,id:If(r.id)}));return{...e,challenge:t,allowCredentials:n}},OJ=e=>{const t={clientDataJSON:Vo(e.response.clientDataJSON),authenticatorData:Vo(e.response.authenticatorData),signature:Vo(e.response.signature)};e.response.userHandle&&(t.userHandle=Vo(e.response.userHandle));const n={id:e.id,rawId:Vo(e.rawId),type:e.type,clientExtensionResults:e.getClientExtensionResults(),response:t};return e.authenticatorAttachment&&(n.authenticatorAttachment=e.authenticatorAttachment),n};function MJ(e){Au([!!e,!!e?.challenge,!!e?.user,!!e?.rp,!!e?.pubKeyCredParams].every(Boolean),Dt.InvalidPasskeyRegistrationOptions)}function PJ(e){Au(e&&e instanceof PublicKeyCredential&&e.response instanceof AuthenticatorAttestationResponse,Dt.PasskeyRegistrationFailed)}function NJ(e){Au(e&&e instanceof PublicKeyCredential&&e.response instanceof AuthenticatorAssertionResponse,Dt.PasskeyRetrievalFailed)}const kJ=async e=>{try{const t=XF();Au(t,Dt.PasskeyNotSupported);const n=TJ(e),r=await navigator.credentials.get({publicKey:n});return NJ(r),OJ(r)}catch(t){throw IJ(t)}},DJ=e=>Cn(kn,Nn("ConfirmDevice"),Gn(),{...Dn,...e}),Og={convert(e){return new TextEncoder().encode(e)}};function Ae(e,t){e!=null&&this.fromString(e,t)}function ir(){return new Ae(null,null)}let qi;const LJ=0xdeadbeefcafe,zk=(LJ&16777215)===15715070;function UJ(e,t,n,r,o,s){for(;--s>=0;){const a=t*this[e++]+n[r]+o;o=Math.floor(a/67108864),n[r++]=a&67108863}return o}function FJ(e,t,n,r,o,s){const a=t&32767,c=t>>15;for(;--s>=0;){let u=this[e]&32767;const f=this[e++]>>15,h=c*u+f*a;u=a*u+((h&32767)<<15)+n[r]+(o&1073741823),o=(u>>>30)+(h>>>15)+c*f+(o>>>30),n[r++]=u&1073741823}return o}function $J(e,t,n,r,o,s){const a=t&16383,c=t>>14;for(;--s>=0;){let u=this[e]&16383;const f=this[e++]>>14,h=c*u+f*a;u=a*u+((h&16383)<<14)+n[r]+o,o=(u>>28)+(h>>14)+c*f,n[r++]=u&268435455}return o}const jk=typeof navigator<"u";jk&&zk&&navigator.appName==="Microsoft Internet Explorer"?(Ae.prototype.am=FJ,qi=30):jk&&zk&&navigator.appName!=="Netscape"?(Ae.prototype.am=UJ,qi=26):(Ae.prototype.am=$J,qi=28);Ae.prototype.DB=qi;Ae.prototype.DM=(1<<qi)-1;Ae.prototype.DV=1<<qi;const $A=52;Ae.prototype.FV=Math.pow(2,$A);Ae.prototype.F1=$A-qi;Ae.prototype.F2=2*qi-$A;const zJ="0123456789abcdefghijklmnopqrstuvwxyz",by=[];let Ru,oo;Ru=48;for(oo=0;oo<=9;++oo)by[Ru++]=oo;Ru=97;for(oo=10;oo<36;++oo)by[Ru++]=oo;Ru=65;for(oo=10;oo<36;++oo)by[Ru++]=oo;function Bk(e){return zJ.charAt(e)}function jJ(e,t){const n=by[e.charCodeAt(t)];return n??-1}function BJ(e){for(let t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function HJ(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0}function zA(e){const t=ir();return t.fromInt(e),t}function qJ(e,t){let n;if(t===16)n=4;else if(t===8)n=3;else if(t===2)n=1;else if(t===32)n=5;else if(t===4)n=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;let r=e.length,o=!1,s=0;for(;--r>=0;){const a=jJ(e,r);if(a<0){e.charAt(r)==="-"&&(o=!0);continue}o=!1,s===0?this[this.t++]=a:s+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,s+=n,s>=this.DB&&(s-=this.DB)}this.clamp(),o&&Ae.ZERO.subTo(this,this)}function VJ(){const e=this.s&this.DM;for(;this.t>0&&this[this.t-1]==e;)--this.t}function WJ(e){if(this.s<0)return"-"+this.negate().toString(e);let t;if(e==16)t=4;else if(e===8)t=3;else if(e===2)t=1;else if(e===32)t=5;else if(e===4)t=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");const n=(1<<t)-1;let r,o=!1,s="",a=this.t,c=this.DB-a*this.DB%t;if(a-- >0)for(c<this.DB&&(r=this[a]>>c)>0&&(o=!0,s=Bk(r));a>=0;)c<t?(r=(this[a]&(1<<c)-1)<<t-c,r|=this[--a]>>(c+=this.DB-t)):(r=this[a]>>(c-=t)&n,c<=0&&(c+=this.DB,--a)),r>0&&(o=!0),o&&(s+=Bk(r));return o?s:"0"}function GJ(){const e=ir();return Ae.ZERO.subTo(this,e),e}function KJ(){return this.s<0?this.negate():this}function ZJ(e){let t=this.s-e.s;if(t!=0)return t;let n=this.t;if(t=n-e.t,t!=0)return this.s<0?-t:t;for(;--n>=0;)if((t=this[n]-e[n])!=0)return t;return 0}function jA(e){let t=1,n;return(n=e>>>16)!==0&&(e=n,t+=16),(n=e>>8)!==0&&(e=n,t+=8),(n=e>>4)!==0&&(e=n,t+=4),(n=e>>2)!==0&&(e=n,t+=2),(n=e>>1)!==0&&(e=n,t+=1),t}function YJ(){return this.t<=0?0:this.DB*(this.t-1)+jA(this[this.t-1]^this.s&this.DM)}function QJ(e,t){let n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s}function JJ(e,t){for(let n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s}function XJ(e,t){const n=e%this.DB,r=this.DB-n,o=(1<<r)-1,s=Math.floor(e/this.DB);let a=this.s<<n&this.DM,c;for(c=this.t-1;c>=0;--c)t[c+s+1]=this[c]>>r|a,a=(this[c]&o)<<n;for(c=s-1;c>=0;--c)t[c]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()}function eX(e,t){t.s=this.s;const n=Math.floor(e/this.DB);if(n>=this.t){t.t=0;return}const r=e%this.DB,o=this.DB-r,s=(1<<r)-1;t[0]=this[n]>>r;for(let a=n+1;a<this.t;++a)t[a-n-1]|=(this[a]&s)<<o,t[a-n]=this[a]>>r;r>0&&(t[this.t-n-1]|=(this.s&s)<<o),t.t=this.t-n,t.clamp()}function tX(e,t){let n=0,r=0;const o=Math.min(e.t,this.t);for(;n<o;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()}function nX(e,t){const n=this.abs(),r=e.abs();let o=n.t;for(t.t=o+r.t;--o>=0;)t[o]=0;for(o=0;o<r.t;++o)t[o+n.t]=n.am(0,r[o],t,o,0,n.t);t.s=0,t.clamp(),this.s!==e.s&&Ae.ZERO.subTo(t,t)}function rX(e){const t=this.abs();let n=e.t=2*t.t;for(;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){const r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()}function oX(e,t,n){const r=e.abs();if(r.t<=0)return;const o=this.abs();if(o.t<r.t){t?.fromInt(0),n!=null&&this.copyTo(n);return}n===null&&(n=ir());const s=ir(),a=this.s,c=e.s,u=this.DB-jA(r[r.t-1]);u>0?(r.lShiftTo(u,s),o.lShiftTo(u,n)):(r.copyTo(s),o.copyTo(n));const f=s.t,h=s[f-1];if(h===0)return;const m=h*(1<<this.F1)+(f>1?s[f-2]>>this.F2:0),g=this.FV/m,v=(1<<this.F1)/m,C=1<<this.F2;let b=n.t,E=b-f;const x=t===null?ir():t;for(s.dlShiftTo(E,x),n.compareTo(x)>=0&&(n[n.t++]=1,n.subTo(x,n)),Ae.ONE.dlShiftTo(f,x),x.subTo(s,s);s.t<f;)s[s.t++]=0;for(;--E>=0;){let I=n[--b]===h?this.DM:Math.floor(n[b]*g+(n[b-1]+C)*v);if((n[b]+=s.am(0,I,n,E,0,f))<I)for(s.dlShiftTo(E,x),n.subTo(x,n);n[b]<--I;)n.subTo(x,n)}t!==null&&(n.drShiftTo(f,t),a!==c&&Ae.ZERO.subTo(t,t)),n.t=f,n.clamp(),u>0&&n.rShiftTo(u,n),a<0&&Ae.ZERO.subTo(n,n)}function sX(e){const t=ir();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(Ae.ZERO)>0&&e.subTo(t,t),t}function iX(){if(this.t<1)return 0;const e=this[0];if((e&1)===0)return 0;let t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function aX(e){return this.compareTo(e)===0}function lX(e,t){let n=0,r=0;const o=Math.min(e.t,this.t);for(;n<o;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()}function cX(e){const t=ir();return this.addTo(e,t),t}function uX(e){const t=ir();return this.subTo(e,t),t}function dX(e){const t=ir();return this.multiplyTo(e,t),t}function fX(e){const t=ir();return this.divRemTo(e,t,null),t}function Tu(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function hX(e){const t=ir();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(Ae.ZERO)>0&&this.m.subTo(t,t),t}function pX(e){const t=ir();return e.copyTo(t),this.reduce(t),t}function mX(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(let t=0;t<this.m.t;++t){let n=e[t]&32767;const r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e[n]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function gX(e,t){e.squareTo(t),this.reduce(t)}function vX(e,t,n){e.multiplyTo(t,n),this.reduce(n)}Tu.prototype.convert=hX;Tu.prototype.revert=pX;Tu.prototype.reduce=mX;Tu.prototype.mulTo=vX;Tu.prototype.sqrTo=gX;function yX(e,t,n){let r=e.bitLength(),o,s=zA(1);const a=new Tu(t);if(r<=0)return s;r<18?o=1:r<48?o=3:r<144?o=4:r<768?o=5:o=6;const c=[];let u=3;const f=o-1,h=(1<<o)-1;if(c[1]=a.convert(this),o>1){const x=ir();for(a.sqrTo(c[1],x);u<=h;)c[u]=ir(),a.mulTo(x,c[u-2],c[u]),u+=2}let m=e.t-1,g,v=!0,C=ir(),b;for(r=jA(e[m])-1;m>=0;){for(r>=f?g=e[m]>>r-f&h:(g=(e[m]&(1<<r+1)-1)<<f-r,m>0&&(g|=e[m-1]>>this.DB+r-f)),u=o;(g&1)===0;)g>>=1,--u;if((r-=u)<0&&(r+=this.DB,--m),v)c[g].copyTo(s),v=!1;else{for(;u>1;)a.sqrTo(s,C),a.sqrTo(C,s),u-=2;u>0?a.sqrTo(s,C):(b=s,s=C,C=b),a.mulTo(C,c[g],s)}for(;m>=0&&(e[m]&1<<r)===0;)a.sqrTo(s,C),b=s,s=C,C=b,--r<0&&(r=this.DB-1,--m)}const E=a.revert(s);return n(null,E),E}Ae.prototype.copyTo=BJ;Ae.prototype.fromInt=HJ;Ae.prototype.fromString=qJ;Ae.prototype.clamp=VJ;Ae.prototype.dlShiftTo=QJ;Ae.prototype.drShiftTo=JJ;Ae.prototype.lShiftTo=XJ;Ae.prototype.rShiftTo=eX;Ae.prototype.subTo=tX;Ae.prototype.multiplyTo=nX;Ae.prototype.squareTo=rX;Ae.prototype.divRemTo=oX;Ae.prototype.invDigit=iX;Ae.prototype.addTo=lX;Ae.prototype.toString=WJ;Ae.prototype.negate=GJ;Ae.prototype.abs=KJ;Ae.prototype.compareTo=ZJ;Ae.prototype.bitLength=YJ;Ae.prototype.mod=sX;Ae.prototype.equals=aX;Ae.prototype.add=cX;Ae.prototype.subtract=uX;Ae.prototype.multiply=dX;Ae.prototype.divide=fX;Ae.prototype.modPow=yX;Ae.ZERO=zA(0);Ae.ONE=zA(1);const bX=async({a:e,g:t,k:n,x:r,B:o,N:s,U:a})=>new Promise((c,u)=>{t.modPow(r,s,(f,h)=>{if(f){u(f);return}o.subtract(n.multiply(h)).modPow(e.add(a.multiply(r)),s,(m,g)=>{if(m){u(m);return}c(g.mod(s))})})}),SX="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",e$={},x_={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),e$[e]=t,x_[t]=e}const ou=e=>{if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(r in x_)t[n/2]=x_[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return t},BA=e=>{let t="";for(let n=0;n<e.byteLength;n++)t+=e$[e[n]];return t},__=e=>{const t=new nl;t.update(e);const n=t.digestSync(),r=BA(n);return new Array(64-r.length).join("0")+r},Mg=e=>__(ou(e)),CX=/^[89a-f]/i,Os=e=>{if(!(e instanceof Ae))throw new Error("Not a BigInteger");const t=e.compareTo(Ae.ZERO)<0;let n=e.abs().toString(16);if(n=n.length%2!==0?`0${n}`:n,n=CX.test(n)?`00${n}`:n,t){const r=n.split("").map(s=>{const a=~parseInt(s,16)&15;return"0123456789ABCDEF".charAt(a)}).join("");n=new Ae(r,16).add(Ae.ONE).toString(16),n.toUpperCase().startsWith("FF8")&&(n=n.substring(2))}return n},wX=({A:e,B:t})=>{const n=new Ae(Mg(Os(e)+Os(t)),16);if(n.equals(Ae.ZERO))throw new Error("U cannot be zero.");return n},EX=(e,t,n)=>{const r=new nl(t);r.update(e);const o=r.digestSync(),s=new nl(o);return s.update(n),s.digestSync().slice(0,16)},HA=e=>{const t=new LA().random(e).toString();return ou(t)},xX=()=>nu.convert(HA(40));class _X{constructor({userPoolName:t,a:n,g:r,A:o,N:s}){this.encoder=Og,this.userPoolName=t,this.a=n,this.g=r,this.A=o,this.N=s,this.k=new Ae(Mg(`${Os(s)}${Os(r)}`),16)}getRandomPassword(){if(!this.randomPassword)throw new Ue({name:"EmptyBigIntegerRandomPassword",message:"random password is empty"});return this.randomPassword}getSaltToHashDevices(){if(!this.saltToHashDevices)throw new Ue({name:"EmptyBigIntegersaltToHashDevices",message:"saltToHashDevices is empty"});return this.saltToHashDevices}getVerifierDevices(){if(!this.verifierDevices)throw new Ue({name:"EmptyBigIntegerVerifierDevices",message:"verifyDevices is empty"});return this.verifierDevices}async generateHashDevice(t,n){this.randomPassword=xX();const r=`${t}${n}:${this.randomPassword}`,o=__(r),s=BA(HA(16));return this.saltToHashDevices=Os(new Ae(s,16)),new Promise((a,c)=>{this.g.modPow(new Ae(Mg(this.saltToHashDevices+o),16),this.N,(u,f)=>{if(u){c(u);return}this.verifierDevices=Os(f),a()})})}async getPasswordAuthenticationKey({username:t,password:n,serverBValue:r,salt:o}){if(r.mod(this.N).equals(Ae.ZERO))throw new Error("B cannot be zero.");const s=wX({A:this.A,B:r}),a=`${this.userPoolName}${t}:${n}`,c=__(a),u=new Ae(Mg(Os(o)+c),16),f=await bX({a:this.a,g:this.g,k:this.k,x:u,B:r,N:this.N,U:s}),h=this.encoder.convert("Caldera Derived Key"),m=this.encoder.convert(""),g=new Uint8Array(h.byteLength+m.byteLength);return g.set(h,0),g.set(m,h.byteLength),EX(ou(Os(f)),ou(Os(s)),g)}}const IX=async({a:e,g:t,N:n})=>new Promise((r,o)=>{t.modPow(e,n,(s,a)=>{if(s){o(s);return}if(a.mod(n).equals(Ae.ZERO)){o(new Error("Illegal parameter. A mod N cannot be 0."));return}r(a)})}),Eh=async e=>{const t=new Ae(SX,16),n=new Ae("2",16),r=AX(),o=await IX({a:r,g:n,N:t});return new _X({userPoolName:e,a:r,g:n,A:o,N:t})},AX=()=>{const e=BA(HA(128));return new Ae(e,16)};async function vl({userPoolId:e,userPoolEndpoint:t,newDeviceMetadata:n,accessToken:r}){if(!n)return;const o=e.split("_")[1]||"",s=await Eh(o),a=n?.DeviceKey,c=n?.DeviceGroupKey;try{await s.generateHashDevice(c??"",a??"")}catch{return}const u={Salt:nu.convert(ou(s.getSaltToHashDevices())),PasswordVerifier:nu.convert(ou(s.getVerifierDevices()))},f=s.getRandomPassword();try{return await DJ({endpointResolver:ft({endpointOverride:t})})({region:dt(e)},{AccessToken:r,DeviceName:await MQ(),DeviceKey:n?.DeviceKey,DeviceSecretVerifierConfig:u}),{deviceKey:a,deviceGroupKey:c,randomPassword:f}}catch{return}}async function RX(e){const t=Ut.getConfig().Auth?.Cognito;et(t);const{username:n,signInSession:r,signInDetails:o,challengeName:s}=Yo.getState();if(s!=="WEB_AUTHN"||!n)throw new Ue({name:Zo.SignInException,message:"Unable to proceed due to invalid sign in state."});const{CREDENTIAL_REQUEST_OPTIONS:a}=e;Au(!!a,Dt.InvalidPasskeyAuthenticationOptions);const c=await kJ(JSON.parse(a)),u=$r({endpointResolver:ft({endpointOverride:t.userPoolEndpoint})}),{ChallengeName:f,ChallengeParameters:h,AuthenticationResult:m,Session:g}=await u({region:dt(t.userPoolId),userAgentValue:It(Ve.ConfirmSignIn)},{ChallengeName:"WEB_AUTHN",ChallengeResponses:{USERNAME:n,CREDENTIAL:JSON.stringify(c)},ClientId:t.userPoolClientId,Session:r});if(gl({signInSession:g,username:n,challengeName:f,signInDetails:o}),m)return await Zs({...m,username:n,NewDeviceMetadata:await vl({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:m.NewDeviceMetadata,accessToken:m.AccessToken}),signInDetails:o}),Yo.dispatch({type:"RESET_STATE"}),await sa(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};if(f==="WEB_AUTHN")throw new Ue({name:Zo.SignInException,message:"Sequential WEB_AUTHN challenges returned from underlying service cannot be handled."});return{challengeName:f,challengeParameters:h}}function Ln({username:e,userPoolId:t,userPoolClientId:n}){if(typeof window>"u")return;const r=window.AmazonCognitoAdvancedSecurityData;if(typeof r>"u")return;const o=r.getData(e,t,n);return o?{EncodedData:o}:{}}const TX=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],OX=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],t$=()=>{const e=new Date,t=OX[e.getUTCDay()],n=TX[e.getUTCMonth()],r=e.getUTCDate();let o=e.getUTCHours();o<10&&(o=`0${o}`);let s=e.getUTCMinutes();s<10&&(s=`0${s}`);let a=e.getUTCSeconds();a<10&&(a=`0${a}`);const c=e.getUTCFullYear();return`${t} ${n} ${r} ${o}:${s}:${a} UTC ${c}`},n$=({userPoolName:e,username:t,challengeParameters:n,dateNow:r,hkdf:o})=>{const s=Og.convert(e),a=Og.convert(t),c=MX(n.SECRET_BLOCK),u=Og.convert(r),f=new Uint8Array(s.byteLength+a.byteLength+c.byteLength+u.byteLength);f.set(s,0),f.set(a,s.byteLength),f.set(c,s.byteLength+a.byteLength),f.set(u,s.byteLength+a.byteLength+c.byteLength);const h=new nl(o);h.update(f);const m=h.digestSync();return nu.convert(m)},MX=e=>{const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),r=PA.convert(n),o=new Uint8Array(r.length);for(let s=0;s<r.length;++s)o[s]=r.charCodeAt(s);return o};async function xh({username:e,config:t,clientMetadata:n,session:r,tokenOrchestrator:o}){const{userPoolId:s,userPoolEndpoint:a}=t,c=t.userPoolClientId,u=await o?.getDeviceMetadata(e);VF(u);const f=await Eh(u.deviceGroupKey),h={USERNAME:e,SRP_A:f.A.toString(16),DEVICE_KEY:u.deviceKey},m={ChallengeName:"DEVICE_SRP_AUTH",ClientId:c,ChallengeResponses:h,ClientMetadata:n,Session:r},g=$r({endpointResolver:ft({endpointOverride:a})}),{ChallengeParameters:v,Session:C}=await g({region:dt(s)},m);return PX(e,v,n,C,f,t,o)}async function PX(e,t,n,r,o,{userPoolId:s,userPoolClientId:a,userPoolEndpoint:c},u){const f=await u?.getDeviceMetadata(e);VF(f);const h=new Ae(t?.SRP_B,16),m=new Ae(t?.SALT,16),{deviceKey:g}=f,{deviceGroupKey:v}=f,C=await o.getPasswordAuthenticationKey({username:f.deviceKey,password:f.randomPassword,serverBValue:h,salt:m}),b=t$(),E={USERNAME:t?.USERNAME??e,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:b,PASSWORD_CLAIM_SIGNATURE:n$({username:g,userPoolName:v,challengeParameters:t,dateNow:b,hkdf:C}),DEVICE_KEY:g},x=Ln({username:e,userPoolId:s,userPoolClientId:a}),I={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:a,ChallengeResponses:E,Session:r,ClientMetadata:n,UserContextData:x};return $r({endpointResolver:ft({endpointOverride:c})})({region:dt(s)},I)}async function qA(e,t,n,r,o,s,a){const{userPoolId:c,userPoolClientId:u,userPoolEndpoint:f}=s,h=c?.split("_")[1]||"",m=new Ae(t?.SRP_B,16),g=new Ae(t?.SALT,16),v=t?.USER_ID_FOR_SRP;if(!v)throw new Ue({name:"EmptyUserIdForSRPException",message:"USER_ID_FOR_SRP was not found in challengeParameters"});const C=await o.getPasswordAuthenticationKey({username:v,password:e,serverBValue:m,salt:g}),b=t$(),E={USERNAME:v,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:b,PASSWORD_CLAIM_SIGNATURE:n$({username:v,userPoolName:h,challengeParameters:t,dateNow:b,hkdf:C})},x=await a.getDeviceMetadata(v);x&&x.deviceKey&&(E.DEVICE_KEY=x.deviceKey);const I=Ln({username:v,userPoolId:c,userPoolClientId:u}),R={ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:E,ClientMetadata:n,Session:r,ClientId:u,UserContextData:I},D=await $r({endpointResolver:ft({endpointOverride:f})})({region:dt(c)},R);return D.ChallengeName==="DEVICE_SRP_AUTH"?xh({username:v,config:s,clientMetadata:n,session:D.Session,tokenOrchestrator:a}):D}async function Ou(e,t,n,r){try{return await e(...t)}catch(o){if(o instanceof Ue&&o.name==="ResourceNotFoundException"&&o.message.includes("Device does not exist."))return await r.clearDeviceMetadata(n),e(...t);throw o}}function yl(e){const{dispatch:t}=Yo;t({type:"SET_USERNAME",value:e})}async function r$({username:e,password:t,clientMetadata:n,config:r,tokenOrchestrator:o,authFlow:s,preferredChallenge:a}){const{userPoolId:c,userPoolClientId:u,userPoolEndpoint:f}=r,h=c?.split("_")[1]||"",m=await Eh(h),g={USERNAME:e,SRP_A:m.A.toString(16)};s==="USER_AUTH"&&a&&(g.PREFERRED_CHALLENGE=a);const v=Ln({username:e,userPoolId:c,userPoolClientId:u}),C={AuthFlow:s,AuthParameters:g,ClientMetadata:n,ClientId:u,UserContextData:v},E=await wh({endpointResolver:ft({endpointOverride:f})})({region:dt(c),userAgentValue:It(Ve.SignIn)},C),{ChallengeParameters:x,Session:I}=E,R=x?.USERNAME??e;return yl(R),E.ChallengeName==="PASSWORD_VERIFIER"?Ou(qA,[t,x,n,I,m,r,o],R,o):E}async function NX({username:e,session:t,selectedChallenge:n,config:r,clientMetadata:o}){return $r({endpointResolver:ft({endpointOverride:r.userPoolEndpoint})})({region:dt(r.userPoolId),userAgentValue:It(Ve.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:{USERNAME:e,ANSWER:n},ClientId:r.userPoolClientId,Session:t,ClientMetadata:o})}async function kX(e,t,n,r,o){const{userPoolId:s,userPoolClientId:a,userPoolEndpoint:c}=r,u={ANSWER:"PASSWORD",USERNAME:e,PASSWORD:t},f=Ln({username:e,userPoolId:s,userPoolClientId:a}),m=await $r({endpointResolver:ft({endpointOverride:c})})({region:dt(s),userAgentValue:It(Ve.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:u,ClientId:a,ClientMetadata:n,Session:o,UserContextData:f}),g=m.ChallengeParameters?.USERNAME??e;return yl(g),m}async function DX(e,t,n,r,o,s){const{userPoolId:a,userPoolClientId:c,userPoolEndpoint:u}=r,f=a.split("_")[1]||"",h=await Eh(f),m={ANSWER:"PASSWORD_SRP",USERNAME:e,SRP_A:h.A.toString(16)},g=Ln({username:e,userPoolId:a,userPoolClientId:c}),C=await $r({endpointResolver:ft({endpointOverride:u})})({region:dt(a),userAgentValue:It(Ve.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:m,ClientId:c,ClientMetadata:n,Session:o,UserContextData:g}),b=C.ChallengeParameters?.USERNAME??e;return yl(b),C.ChallengeName==="PASSWORD_VERIFIER"?Ou(qA,[t,C.ChallengeParameters,n,C.Session,h,r,s],b,s):C}const I_="userAttributes.";function LX(e){return"isSignedIn"in e&&"nextStep"in e}async function UX({challengeResponse:e,clientMetadata:t,session:n,username:r,config:o,tokenOrchestrator:s}){const{userPoolId:a,userPoolClientId:c,userPoolEndpoint:u}=o,f={USERNAME:r,ANSWER:e},h=await s?.getDeviceMetadata(r);h&&h.deviceKey&&(f.DEVICE_KEY=h.deviceKey);const m=Ln({username:r,userPoolId:a,userPoolClientId:c}),g={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:f,Session:n,ClientMetadata:t,ClientId:c,UserContextData:m},C=await $r({endpointResolver:ft({endpointOverride:u})})({region:dt(a),userAgentValue:It(Ve.ConfirmSignIn)},g);return C.ChallengeName==="DEVICE_SRP_AUTH"?xh({username:r,config:o,clientMetadata:t,session:C.Session,tokenOrchestrator:s}):C}async function FX({challengeResponse:e,username:t,clientMetadata:n,session:r,deviceName:o,config:s}){const{userPoolId:a,userPoolClientId:c,userPoolEndpoint:u}=s;if(e==="EMAIL")return{ChallengeName:"MFA_SETUP",Session:r,ChallengeParameters:{MFAS_CAN_SETUP:'["EMAIL_OTP"]'},$metadata:{}};if(e==="TOTP")return{ChallengeName:"MFA_SETUP",Session:r,ChallengeParameters:{MFAS_CAN_SETUP:'["SOFTWARE_TOKEN_MFA"]'},$metadata:{}};const f={USERNAME:t};if(/^\d+$/.test(e)){const g=oJ({endpointResolver:ft({endpointOverride:u})}),{Session:v}=await g({region:dt(a),userAgentValue:It(Ve.ConfirmSignIn)},{UserCode:e,Session:r,FriendlyDeviceName:o});Yo.dispatch({type:"SET_SIGN_IN_SESSION",value:v});const C={ChallengeName:"MFA_SETUP",ChallengeResponses:f,Session:v,ClientMetadata:n,ClientId:c};return $r({endpointResolver:ft({endpointOverride:u})})({region:dt(a),userAgentValue:It(Ve.ConfirmSignIn)},C)}if(e.includes("@")){f.EMAIL=e;const g={ChallengeName:"MFA_SETUP",ChallengeResponses:f,Session:r,ClientMetadata:n,ClientId:c};return $r({endpointResolver:ft({endpointOverride:u})})({region:dt(a),userAgentValue:It(Ve.ConfirmSignIn)},g)}throw new Ue({name:Zo.SignInException,message:`Cannot proceed with MFA setup using challengeResponse: ${e}`,recoverySuggestion:'Try passing "EMAIL", "TOTP", a valid email, or OTP code as the challengeResponse.'})}async function $X({challengeResponse:e,username:t,clientMetadata:n,session:r,config:o}){const{userPoolId:s,userPoolClientId:a,userPoolEndpoint:c}=o;an(e==="TOTP"||e==="SMS"||e==="EMAIL",qe.IncorrectMFAMethod);const u={USERNAME:t,ANSWER:ZX(e)},f=Ln({username:t,userPoolId:s,userPoolClientId:a}),h={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:u,Session:r,ClientMetadata:n,ClientId:a,UserContextData:f};return $r({endpointResolver:ft({endpointOverride:c})})({region:dt(s),userAgentValue:It(Ve.ConfirmSignIn)},h)}async function zX({challengeResponse:e,clientMetadata:t,session:n,username:r,requiredAttributes:o,config:s}){const{userPoolId:a,userPoolClientId:c,userPoolEndpoint:u}=s,f={...GX(o),NEW_PASSWORD:e,USERNAME:r},h=Ln({username:r,userPoolId:a,userPoolClientId:c}),m={ChallengeName:"NEW_PASSWORD_REQUIRED",ChallengeResponses:f,ClientMetadata:t,Session:n,ClientId:c,UserContextData:h};return $r({endpointResolver:ft({endpointOverride:u})})({region:dt(a),userAgentValue:It(Ve.ConfirmSignIn)},m)}async function jX(e,t,n,r,o){const{userPoolClientId:s,userPoolId:a,userPoolEndpoint:c}=r,u={USERNAME:e,PASSWORD:t},f=await o.getDeviceMetadata(e);f&&f.deviceKey&&(u.DEVICE_KEY=f.deviceKey);const h=Ln({username:e,userPoolId:a,userPoolClientId:s}),m={AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:u,ClientMetadata:n,ClientId:s,UserContextData:h},v=await wh({endpointResolver:ft({endpointOverride:c})})({region:dt(a),userAgentValue:It(Ve.SignIn)},m),C=v.ChallengeParameters?.USERNAME??v.ChallengeParameters?.USER_ID_FOR_SRP??e;return yl(C),v.ChallengeName==="DEVICE_SRP_AUTH"?xh({username:C,config:r,clientMetadata:n,session:v.Session,tokenOrchestrator:o}):v}async function BX(e,t,n,r,o){return r$({username:e,password:t,clientMetadata:n,config:r,tokenOrchestrator:o,authFlow:"USER_SRP_AUTH"})}async function HX(e,t,n,r){const{userPoolClientId:o,userPoolId:s,userPoolEndpoint:a}=n,c={USERNAME:e},u=await r.getDeviceMetadata(e);u&&u.deviceKey&&(c.DEVICE_KEY=u.deviceKey);const f=Ln({username:e,userPoolId:s,userPoolClientId:o}),h={AuthFlow:"CUSTOM_AUTH",AuthParameters:c,ClientMetadata:t,ClientId:o,UserContextData:f},g=await wh({endpointResolver:ft({endpointOverride:a})})({region:dt(s),userAgentValue:It(Ve.SignIn)},h),v=g.ChallengeParameters?.USERNAME??e;return yl(v),g.ChallengeName==="DEVICE_SRP_AUTH"?xh({username:v,config:n,clientMetadata:t,session:g.Session,tokenOrchestrator:r}):g}async function qX(e,t,n,r,o){et(r);const{userPoolId:s,userPoolClientId:a,userPoolEndpoint:c}=r,u=s?.split("_")[1]||"",f=await Eh(u),h={USERNAME:e,SRP_A:f.A.toString(16),CHALLENGE_NAME:"SRP_A"},m=Ln({username:e,userPoolId:s,userPoolClientId:a}),g={AuthFlow:"CUSTOM_AUTH",AuthParameters:h,ClientMetadata:n,ClientId:a,UserContextData:m},v=wh({endpointResolver:ft({endpointOverride:c})}),{ChallengeParameters:C,Session:b}=await v({region:dt(s),userAgentValue:It(Ve.SignIn)},g),E=C?.USERNAME??e;return yl(E),Ou(qA,[t,C,n,b,f,r,o],E,o)}async function bl(e){const{challengeName:t,challengeParameters:n,availableChallenges:r}=e,o=Ut.getConfig().Auth?.Cognito;switch(et(o),t){case"CUSTOM_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE",additionalInfo:n}};case"MFA_SETUP":{const{signInSession:s,username:a}=Yo.getState(),c=Hk(qk(n.MFAS_CAN_SETUP))||[],u=QX(c),f=u.includes("TOTP"),h=u.includes("EMAIL");if(f&&h)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION",allowedMFATypes:u}};if(h)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"}};if(f){const m=sJ({endpointResolver:ft({endpointOverride:o.userPoolEndpoint})}),{Session:g,SecretCode:v}=await m({region:dt(o.userPoolId)},{Session:s});return Yo.dispatch({type:"SET_SIGN_IN_SESSION",value:g}),{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_TOTP_SETUP",totpSetupDetails:VX(v,a)}}}throw new Ue({name:Zo.SignInException,message:`Cannot initiate MFA setup from available types: ${c}`})}case"NEW_PASSWORD_REQUIRED":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",missingAttributes:WX(n.requiredAttributes)}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:Hk(qk(n.MFAS_CAN_CHOOSE))}};case"SMS_OTP":case"SMS_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_SMS_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"SOFTWARE_TOKEN_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_TOTP_CODE"}};case"EMAIL_OTP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_EMAIL_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"WEB_AUTHN":{const s=await RX(n);return LX(s)?s:bl(s)}case"PASSWORD":case"PASSWORD_SRP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_PASSWORD"}};case"SELECT_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION",availableChallenges:r}}}throw new Ue({name:Zo.SignInException,message:`An error occurred during the sign in process. ${t} challengeName returned by the underlying service was not addressed.`})}function VX(e,t){return{sharedSecret:e,getSetupUri:(n,r)=>{const o=`otpauth://totp/${n}:${r??t}?secret=${e}&issuer=${n}`;return new oa(o)}}}function Mu(e){if(e===rv.PasswordResetRequiredException)return{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}};if(e===rv.UserNotConfirmedException)return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}}function WX(e){return e?JSON.parse(e).map(n=>n.includes(I_)?n.replace(I_,""):n):[]}function GX(e){if(!e)return{};const t={};return Object.entries(e).forEach(([n,r])=>{r&&(t[`${I_}${n}`]=r)}),t}async function KX(e,t,n,r,o,s,a,c){const u=c?.userAttributes,f=c?.friendlyDeviceName;switch(t){case"WEB_AUTHN":case"SELECT_CHALLENGE":return r==="PASSWORD_SRP"||r==="PASSWORD"?{ChallengeName:r,Session:n,$metadata:{}}:NX({username:e,session:n,selectedChallenge:r,config:o,clientMetadata:a});case"SELECT_MFA_TYPE":return $X({challengeResponse:r,clientMetadata:a,session:n,username:e,config:o});case"MFA_SETUP":return FX({challengeResponse:r,clientMetadata:a,session:n,username:e,deviceName:f,config:o});case"NEW_PASSWORD_REQUIRED":return zX({challengeResponse:r,clientMetadata:a,session:n,username:e,requiredAttributes:u,config:o});case"CUSTOM_CHALLENGE":return Ou(UX,[{challengeResponse:r,clientMetadata:a,session:n,username:e,config:o,tokenOrchestrator:s}],e,s);case"SMS_MFA":case"SOFTWARE_TOKEN_MFA":case"SMS_OTP":case"EMAIL_OTP":return JX({challengeName:t,challengeResponse:r,clientMetadata:a,session:n,username:e,config:o,tokenOrchestrator:s});case"PASSWORD":return kX(e,r,a,o,n);case"PASSWORD_SRP":return DX(e,r,a,o,n,s)}throw new Ue({name:Zo.SignInException,message:`An error occurred during the sign in process.
5
- ${t} challengeName returned by the underlying service was not addressed.`})}function ZX(e){let t="SMS_MFA";return e==="TOTP"&&(t="SOFTWARE_TOKEN_MFA"),e==="EMAIL"&&(t="EMAIL_OTP"),t}function YX(e){if(e==="SMS_MFA")return"SMS";if(e==="SOFTWARE_TOKEN_MFA")return"TOTP";if(e==="EMAIL_OTP")return"EMAIL"}function Hk(e){if(e)return e.map(YX).filter(Boolean)}function qk(e){return e?JSON.parse(e):[]}function QX(e){return e.filter(t=>t==="EMAIL"||t==="TOTP")}async function o$(){let e;try{e=await yy()}catch{}if(e&&e.userId&&e.username)throw new Ue({name:LQ,message:"There is already a signed in user.",recoverySuggestion:"Call signOut before calling signIn again."})}function _h(e){return Yo.getState().username??e}async function JX({challengeName:e,challengeResponse:t,clientMetadata:n,session:r,username:o,config:s,tokenOrchestrator:a}){const{userPoolId:c,userPoolClientId:u,userPoolEndpoint:f}=s,h={USERNAME:o};e==="EMAIL_OTP"&&(h.EMAIL_OTP_CODE=t),e==="SMS_MFA"&&(h.SMS_MFA_CODE=t),e==="SMS_OTP"&&(h.SMS_OTP_CODE=t),e==="SOFTWARE_TOKEN_MFA"&&(h.SOFTWARE_TOKEN_MFA_CODE=t);const m=await a?.getDeviceMetadata(o);m&&m.deviceKey&&(h.DEVICE_KEY=m.deviceKey);const g=Ln({username:o,userPoolId:c,userPoolClientId:u}),v={ChallengeName:e,ChallengeResponses:h,Session:r,ClientMetadata:n,ClientId:u,UserContextData:g},b=await $r({endpointResolver:ft({endpointOverride:f})})({region:dt(c),userAgentValue:It(Ve.ConfirmSignIn)},v);return b.ChallengeName==="DEVICE_SRP_AUTH"?xh({username:o,config:s,clientMetadata:n,session:b.Session,tokenOrchestrator:a}):b}async function XX(e){const t=Ut.getConfig().Auth?.Cognito;et(t);const{username:n,password:r,options:o}=e,s={loginId:n,authFlowType:"CUSTOM_WITHOUT_SRP"},a=o?.clientMetadata;an(!!n,qe.EmptySignInUsername),an(!r,qe.CustomAuthSignInPassword);try{const{ChallengeName:c,ChallengeParameters:u,AuthenticationResult:f,Session:h}=await Ou(HX,[n,a,t,Cr],n,Cr),m=_h(n);return gl({signInSession:h,username:m,challengeName:c,signInDetails:s}),f?(await Zs({username:m,...f,NewDeviceMetadata:await vl({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:s}),Ro(),await sa(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):bl({challengeName:c,challengeParameters:u})}catch(c){Ro(),co(c);const u=Mu(c.name);if(u)return u;throw c}}async function eee(e){const{username:t,password:n,options:r}=e,o={loginId:t,authFlowType:"CUSTOM_WITH_SRP"},s=Ut.getConfig().Auth?.Cognito;et(s);const a=r?.clientMetadata;an(!!t,qe.EmptySignInUsername),an(!!n,qe.EmptySignInPassword);try{const{ChallengeName:c,ChallengeParameters:u,AuthenticationResult:f,Session:h}=await qX(t,n,a,s,Cr),m=_h(t);return gl({signInSession:h,username:m,challengeName:c,signInDetails:o}),f?(await Zs({username:m,...f,NewDeviceMetadata:await vl({userPoolId:s.userPoolId,userPoolEndpoint:s.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:o}),Ro(),await sa(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):bl({challengeName:c,challengeParameters:u})}catch(c){Ro(),co(c);const u=Mu(c.name);if(u)return u;throw c}}const s$=async()=>{throw new Ue({name:HF,message:"The autoSignIn flow has not started, or has been cancelled/completed.",recoverySuggestion:"Please try to use the signIn API or log out before starting a new autoSignIn flow."})};let VA=s$;function A_(e){VA=e}function yr(e=!0){e&&(VA=s$),zi.dispatch({type:"RESET"})}async function Vk(e){const{username:t,password:n}=e,r=Ut.getConfig().Auth?.Cognito,o={loginId:t,authFlowType:"USER_SRP_AUTH"};et(r);const s=e.options?.clientMetadata;an(!!t,qe.EmptySignInUsername),an(!!n,qe.EmptySignInPassword);try{const{ChallengeName:a,ChallengeParameters:c,AuthenticationResult:u,Session:f}=await BX(t,n,s,r,Cr),h=_h(t);return gl({signInSession:f,username:h,challengeName:a,signInDetails:o}),u?(await Zs({username:h,...u,NewDeviceMetadata:await vl({userPoolId:r.userPoolId,userPoolEndpoint:r.userPoolEndpoint,newDeviceMetadata:u.NewDeviceMetadata,accessToken:u.AccessToken}),signInDetails:o}),Ro(),await sa(),yr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):bl({challengeName:a,challengeParameters:c})}catch(a){Ro(),yr(),co(a);const c=Mu(a.name);if(c)return c;throw a}}async function tee(e){const{username:t,password:n,options:r}=e,o=Ut.getConfig().Auth?.Cognito,s={loginId:t,authFlowType:"USER_PASSWORD_AUTH"};et(o);const a=r?.clientMetadata;an(!!t,qe.EmptySignInUsername),an(!!n,qe.EmptySignInPassword);try{const{ChallengeName:c,ChallengeParameters:u,AuthenticationResult:f,Session:h}=await Ou(jX,[t,n,a,o,Cr],t,Cr),m=_h(t);return gl({signInSession:h,username:m,challengeName:c,signInDetails:s}),f?(await Zs({...f,username:m,NewDeviceMetadata:await vl({userPoolId:o.userPoolId,userPoolEndpoint:o.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:s}),Ro(),await sa(),yr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):bl({challengeName:c,challengeParameters:u})}catch(c){Ro(),yr(),co(c);const u=Mu(c.name);if(u)return u;throw c}}async function nee({username:e,clientMetadata:t,config:n,tokenOrchestrator:r,preferredChallenge:o,password:s,session:a}){const{userPoolId:c,userPoolClientId:u,userPoolEndpoint:f}=n,h=Ln({username:e,userPoolId:c,userPoolClientId:u}),m={USERNAME:e};if(o){if(n.passwordless&&(o==="EMAIL_OTP"&&!n.passwordless.emailOtpEnabled||o==="SMS_OTP"&&!n.passwordless.smsOtpEnabled||o==="WEB_AUTHN"&&!n.passwordless.webAuthn)&&an(!1,qe.InvalidPreferredChallenge),o==="PASSWORD_SRP")return an(!!s,qe.EmptySignInPassword),r$({username:e,password:s,clientMetadata:t,config:n,tokenOrchestrator:r,authFlow:"USER_AUTH",preferredChallenge:o});o==="PASSWORD"&&(an(!!s,qe.EmptySignInPassword),m.PASSWORD=s),m.PREFERRED_CHALLENGE=o}const g={AuthFlow:"USER_AUTH",AuthParameters:m,ClientMetadata:t,ClientId:u,UserContextData:h};a&&(g.Session=a);const C=await wh({endpointResolver:ft({endpointOverride:f})})({region:dt(c),userAgentValue:It(Ve.SignIn)},g);return yl(e),C}async function i$(e){const{username:t,password:n,options:r}=e,o=Ut.getConfig().Auth?.Cognito,s={loginId:t,authFlowType:"USER_AUTH"};et(o);const a=r?.clientMetadata,c=r?.preferredChallenge??o?.passwordless?.preferredChallenge;an(!!t,qe.EmptySignInUsername);try{const u={username:t,config:o,tokenOrchestrator:Cr,clientMetadata:a,preferredChallenge:c,password:n},f=zi.getState();f.active&&f.username===t&&(u.session=f.session);const h=await nee(u),m=_h(t);return gl({signInSession:h.Session,username:m,challengeName:h.ChallengeName,signInDetails:s}),h.AuthenticationResult?(await Zs({username:m,...h.AuthenticationResult,NewDeviceMetadata:await vl({userPoolId:o.userPoolId,userPoolEndpoint:o.userPoolEndpoint,newDeviceMetadata:h.AuthenticationResult.NewDeviceMetadata,accessToken:h.AuthenticationResult.AccessToken}),signInDetails:s}),Ro(),await sa(),yr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):bl({challengeName:h.ChallengeName,challengeParameters:h.ChallengeParameters,availableChallenges:"AvailableChallenges"in h?h.AvailableChallenges:void 0})}catch(u){Ro(),yr(),co(u);const f=Mu(u.name);if(f)return f;throw u}}async function WA(e){yr(!1);const t=e.options?.authFlowType;switch(await o$(),t){case"USER_SRP_AUTH":return Vk(e);case"USER_PASSWORD_AUTH":return tee(e);case"CUSTOM_WITHOUT_SRP":return XX(e);case"CUSTOM_WITH_SRP":return eee(e);case"USER_AUTH":return i$(e);default:return Vk(e)}}const a$=180*1e3;function ree(e){const t=nv.listen("auth-internal",async({payload:r})=>{r.event==="confirmSignUp"&&r.data?.isSignUpComplete&&(nv.dispatch("auth-internal",{event:"autoSignIn"}),A_(c$(e)),t())}),n=setTimeout(()=>{t(),clearTimeout(n),yr()},a$)}function l$(e,t){let n;return r=>{n||e(...r),clearTimeout(n),n=setTimeout(()=>{n=void 0},t)}}function oee(e,t,n){const r=Date.now(),o=setInterval(async()=>{if(Date.now()-r>a$)clearInterval(o),n(new Ue({name:HF,message:"The account was not confirmed on time.",recoverySuggestion:"Try to verify your account by clicking the link sent your email or phone and then login manually."})),yr();else try{const c=await WA(e);c.nextStep.signInStep!=="CONFIRM_SIGN_UP"&&(t(c),clearInterval(o),yr())}catch(c){clearInterval(o),n(c),yr()}},5e3)}const see=l$(oee,300),iee=l$(lee,300);function aee(e){return async()=>new Promise((t,n)=>{see([e,t,n])})}async function lee(e,t,n){try{const r=e?.options?.authFlowType==="USER_AUTH"?await i$(e):await WA(e);t(r),yr()}catch(r){n(r),yr()}}function c$(e){return async()=>new Promise((t,n)=>{iee([e,t,n])})}const cee=c$,uee=()=>async e=>{if(e.statusCode>=300){const t=await _u(e);if(co(t),t.name===w_.InvalidParameterException&&/'password'/.test(t.message)&&/Member must not be null/.test(t.message)){const n=qe.EmptySignUpPassword,{message:r,recoverySuggestion:o}=BF[n];throw new Ue({name:n,message:r,recoverySuggestion:o})}throw new Ue({name:t.name,message:t.message})}return Sh(e)},dee=e=>Cn(kn,Nn("SignUp"),uee(),{...Dn,...e});async function fee(e){const{username:t,password:n,options:r}=e,o=Ut.getConfig().Auth?.Cognito,s=o?.signUpVerificationMethod??"code",{clientMetadata:a,validationData:c,autoSignIn:u}=e.options??{};et(o),an(!!t,qe.EmptySignUpUsername);const f=typeof u!="boolean"?u:void 0,h={username:t,options:f};f?.authFlowType!=="CUSTOM_WITHOUT_SRP"&&(h.password=n);const{userPoolId:m,userPoolClientId:g,userPoolEndpoint:v}=o,C=dee({endpointResolver:ft({endpointOverride:v})}),b={Username:t,Password:void 0,UserAttributes:r?.userAttributes&&hk(r?.userAttributes),ClientMetadata:a,ValidationData:c&&hk(c),ClientId:g,UserContextData:Ln({username:t,userPoolId:m,userPoolClientId:g})};n&&(b.Password=n);const{UserSub:E,CodeDeliveryDetails:x,UserConfirmed:I,Session:R}=await C({region:dt(m),userAgentValue:It(Ve.SignUp)},b);(f||u===!0)&&(zi.dispatch({type:"START"}),zi.dispatch({type:"SET_USERNAME",value:t}),zi.dispatch({type:"SET_SESSION",value:R}));const O={destination:x?.Destination,deliveryMedium:x?.DeliveryMedium,attributeName:x?.AttributeName},D=!!I,N=zi.getState().active;if(D)return N?(A_(cee(h)),{isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"},userId:E}):{isSignUpComplete:!0,nextStep:{signUpStep:"DONE"},userId:E};if(N){if(s==="link")return A_(aee(h)),{isSignUpComplete:!1,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN",codeDeliveryDetails:O},userId:E};ree(h)}return{isSignUpComplete:!1,nextStep:{signUpStep:"CONFIRM_SIGN_UP",codeDeliveryDetails:O},userId:E}}const hee=e=>Cn(kn,Nn("ForgotPassword"),Gn(),{...Dn,...e});async function u$(e){const{username:t}=e;an(!!t,qe.EmptyResetPasswordUsername);const n=Ut.getConfig().Auth?.Cognito;et(n);const{userPoolClientId:r,userPoolId:o,userPoolEndpoint:s}=n,a=e.options?.clientMetadata,c=Ln({username:t,userPoolId:o,userPoolClientId:r}),h=(await hee({endpointResolver:ft({endpointOverride:s})})({region:dt(o),userAgentValue:It(Ve.ResetPassword)},{Username:t,ClientMetadata:a,ClientId:r,UserContextData:c})).CodeDeliveryDetails;return{isPasswordReset:!1,nextStep:{resetPasswordStep:"CONFIRM_RESET_PASSWORD_WITH_CODE",codeDeliveryDetails:{deliveryMedium:h?.DeliveryMedium,destination:h?.Destination,attributeName:h?.AttributeName}}}}const pee=e=>Cn(kn,Nn("ConfirmForgotPassword"),Gn(),{...Dn,...e});async function mee(e){const t=Ut.getConfig().Auth?.Cognito;et(t);const{userPoolClientId:n,userPoolId:r,userPoolEndpoint:o}=t,{username:s,newPassword:a}=e;an(!!s,qe.EmptyConfirmResetPasswordUsername),an(!!a,qe.EmptyConfirmResetPasswordNewPassword);const c=e.confirmationCode;an(!!c,qe.EmptyConfirmResetPasswordConfirmationCode);const u=e.options?.clientMetadata,f=Ln({username:s,userPoolId:r,userPoolClientId:n});await pee({endpointResolver:ft({endpointOverride:o})})({region:dt(t.userPoolId),userAgentValue:It(Ve.ConfirmResetPassword)},{Username:s,ConfirmationCode:c,Password:a,ClientMetadata:u,ClientId:t.userPoolClientId,UserContextData:f})}const gee=e=>Cn(kn,Nn("ResendConfirmationCode"),Gn(),{...Dn,...e});async function vee(e){const{username:t}=e;an(!!t,qe.EmptySignUpUsername);const n=Ut.getConfig().Auth?.Cognito;et(n);const{userPoolClientId:r,userPoolId:o,userPoolEndpoint:s}=n,a=e.options?.clientMetadata,c=Ln({username:t,userPoolId:o,userPoolClientId:r}),u=gee({endpointResolver:ft({endpointOverride:s})}),{CodeDeliveryDetails:f}=await u({region:dt(n.userPoolId),userAgentValue:It(Ve.ResendSignUpCode)},{Username:t,ClientMetadata:a,ClientId:n.userPoolClientId,UserContextData:c}),{DeliveryMedium:h,AttributeName:m,Destination:g}={...f};return{destination:g,deliveryMedium:h,attributeName:m||void 0}}const yee=e=>Cn(kn,Nn("ConfirmSignUp"),Gn(),{...Dn,...e});async function bee(e){const{username:t,confirmationCode:n,options:r}=e,o=Ut.getConfig().Auth?.Cognito;et(o);const{userPoolId:s,userPoolClientId:a,userPoolEndpoint:c}=o,u=r?.clientMetadata;an(!!t,qe.EmptyConfirmSignUpUsername),an(!!n,qe.EmptyConfirmSignUpCode);const f=Ln({username:t,userPoolId:s,userPoolClientId:a}),h=yee({endpointResolver:ft({endpointOverride:c})}),{Session:m}=await h({region:dt(o.userPoolId),userAgentValue:It(Ve.ConfirmSignUp)},{Username:t,ConfirmationCode:n,ClientMetadata:u,ForceAliasCreation:r?.forceAliasCreation,ClientId:o.userPoolClientId,UserContextData:f});return new Promise((g,v)=>{try{const C={isSignUpComplete:!0,nextStep:{signUpStep:"DONE"}},b=zi.getState();if(!b.active||b.username!==t){g(C),yr();return}zi.dispatch({type:"SET_SESSION",value:m});const E=nv.listen("auth-internal",({payload:x})=>{x.event==="autoSignIn"&&(g({isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"}}),E())});nv.dispatch("auth-internal",{event:"confirmSignUp",data:C})}catch(C){v(C)}})}async function d$(e){const{challengeResponse:t,options:n}=e,{username:r,challengeName:o,signInSession:s,signInDetails:a}=Yo.getState(),c=Ut.getConfig().Auth?.Cognito;et(c);const u=n?.clientMetadata;if(an(!!t,qe.EmptyChallengeResponse),!r||!o||!s)throw new Ue({name:Zo.SignInException,message:`
6
- An error occurred during the sign in process.
7
-
8
- This most likely occurred due to:
9
- 1. signIn was not called before confirmSignIn.
10
- 2. signIn threw an exception.
11
- 3. page was refreshed during the sign in flow and session has expired.
12
- `,recoverySuggestion:"Make sure a successful call to signIn is made before calling confirmSignInand that the session has not expired."});try{const{Session:f,ChallengeName:h,AuthenticationResult:m,ChallengeParameters:g}=await KX(r,o,s,t,c,Cr,u,n);return gl({signInSession:f,username:r,challengeName:h,signInDetails:a}),m?(await Zs({username:r,...m,NewDeviceMetadata:await vl({userPoolId:c.userPoolId,userPoolEndpoint:c.userPoolEndpoint,newDeviceMetadata:m.NewDeviceMetadata,accessToken:m.AccessToken}),signInDetails:a}),Ro(),await sa(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):bl({challengeName:h,challengeParameters:g})}catch(f){co(f);const h=Mu(f.name);if(h)return h;throw f}}const See=e=>Cn(kn,Nn("GetUser"),Gn(),{...Dn,...e}),Cee=e=>Cn(kn,Nn("VerifyUserAttribute"),Gn(),{...Dn,...e});async function wee(e){const t=Ut.getConfig().Auth?.Cognito;et(t);const{userPoolEndpoint:n,userPoolId:r}=t,{confirmationCode:o,userAttributeKey:s}=e;an(!!o,qe.EmptyConfirmUserAttributeCode);const{tokens:a}=await my({forceRefresh:!1});Iu(a),await Cee({endpointResolver:ft({endpointOverride:n})})({region:dt(r),userAgentValue:It(Ve.ConfirmUserAttribute)},{AccessToken:a.accessToken.toString(),AttributeName:s,Code:o})}new Wn("AuthError");const Eee={oauthSignInError:{message:Pn.OAUTH_ERROR,log:"Make sure Cognito Hosted UI has been configured correctly"},noConfig:{message:Pn.DEFAULT_MSG},missingAuthConfig:{message:Pn.DEFAULT_MSG},emptyUsername:{message:Pn.EMPTY_USERNAME},invalidUsername:{message:Pn.INVALID_USERNAME},emptyPassword:{message:Pn.EMPTY_PASSWORD},emptyCode:{message:Pn.EMPTY_CODE},signUpError:{message:Pn.SIGN_UP_ERROR},noMFA:{message:Pn.NO_MFA},invalidMFA:{message:Pn.INVALID_MFA},emptyChallengeResponse:{message:Pn.EMPTY_CHALLENGE},noUserSession:{message:Pn.NO_USER_SESSION},deviceConfig:{message:Pn.DEVICE_CONFIG},networkError:{message:Pn.NETWORK_ERROR},autoSignInError:{message:Pn.AUTOSIGNIN_ERROR},default:{message:Pn.DEFAULT_MSG}},Ki=(e,t)=>new Ue({message:e??"An error has occurred during the oauth process.",name:Zo.OAuthSignInError,recoverySuggestion:Eee.oauthSignInError.log});var R_;(function(e){e.NoConfig="noConfig",e.MissingAuthConfig="missingAuthConfig",e.EmptyUsername="emptyUsername",e.InvalidUsername="invalidUsername",e.EmptyPassword="emptyPassword",e.EmptyCode="emptyCode",e.SignUpError="signUpError",e.NoMFA="noMFA",e.InvalidMFA="invalidMFA",e.EmptyChallengeResponse="emptyChallengeResponse",e.NoUserSession="noUserSession",e.Default="default",e.DeviceConfig="deviceConfig",e.NetworkError="networkError",e.AutoSignInError="autoSignInError",e.OAuthSignInError="oauthSignInError"})(R_||(R_={}));const xee="`signInWithRedirect` has been canceled.",_ee="An error occurred while validating the state.",Iee="Try to initiate an OAuth flow from Amplify",f$=async e=>{const t=await gr.loadOAuthState(),n=e===t?t:void 0;if(!n)throw new Ue({name:R_.OAuthSignInError,message:e===null?xee:_ee,recoverySuggestion:e===null?void 0:Iee});return n},h$=async({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:r,responseType:o,domain:s,preferPrivateSession:a})=>{const c=new oa(e),u=c.searchParams.get("error"),f=c.searchParams.get("error_description");if(u)throw Ki(f??u);return o==="code"?Aee({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:r,domain:s,preferPrivateSession:a}):Ree({currentUrl:e,redirectUri:r,preferPrivateSession:a})},Aee=async({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:r,domain:o,preferPrivateSession:s})=>{const a=new oa(e),c=a.searchParams.get("code"),u=a.searchParams.get("state");if(!c||!u)throw Ki("User cancelled OAuth flow.");const f=await f$(u),h="https://"+o+"/oauth2/token",m=await gr.loadPKCE(),g={grant_type:"authorization_code",code:c,client_id:n,redirect_uri:r,...m?{code_verifier:m}:{}},v=Object.entries(g).map(([N,M])=>`${encodeURIComponent(N)}=${encodeURIComponent(M)}`).join("&"),{access_token:C,refresh_token:b,id_token:E,error:x,error_message:I,token_type:R,expires_in:O}=await(await fetch(h,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",[MZ]:t},body:v})).json();if(x)throw Ki(I??x);const D=(C&&$s(C).payload.username)??"username";return await Zs({username:D,AccessToken:C,IdToken:E,RefreshToken:b}),p$({redirectUri:r,state:f,preferPrivateSession:s})},Ree=async({currentUrl:e,redirectUri:t,preferPrivateSession:n})=>{const r=new oa(e),{id_token:o,access_token:s,state:a,token_type:c,expires_in:u,error_description:f,error:h}=(r.hash??"#").substring(1).split("&").map(v=>v.split("=")).reduce((v,[C,b])=>({...v,[C]:b}),{id_token:void 0,access_token:void 0,state:void 0,token_type:void 0,expires_in:void 0,error_description:void 0,error:void 0});if(h)throw Ki(f??h);if(!s)throw Ki("No access token returned from OAuth flow.");const m=await f$(a),g=(s&&$s(s).payload.username)??"username";return await Zs({username:g,AccessToken:s,IdToken:o}),p$({redirectUri:t,state:m,preferPrivateSession:n})},p$=async({redirectUri:e,state:t,preferPrivateSession:n})=>{await Cr.setOAuthMetadata({oauthSignIn:!0}),await gr.clearOAuthData(),await gr.storeOAuthSignIn(!0,n),ZF(),Mee(e),Tee(t)&&Ko.dispatch("auth",{event:"customOAuthState",data:RQ(Oee(t))},"Auth",Go),Ko.dispatch("auth",{event:"signInWithRedirect"},"Auth",Go),await sa()},Tee=e=>/-/.test(e),Oee=e=>e.split("-").splice(1).join("-"),Mee=e=>{typeof window<"u"&&typeof window.history<"u"&&window.history.replaceState(window.history.state,"",e)};function GA(e,t){{const n=e?.find(Pee)??e?.find(Nee),r=e?.find(Dee)??e?.find(kee);if(n)return n;throw r?HQ:jQ}}const Pee=e=>e.startsWith(String(window.location.origin+(window.location.pathname||"/"))),Nee=e=>e.includes(String(window.location.hostname)),kee=e=>e.startsWith("http://"),Dee=e=>e.startsWith("https://"),KA=async e=>{ZF(),await gr.clearOAuthInflightData(),Ko.dispatch("auth",{event:"signInWithRedirect_failure",data:{error:e}},"Auth",Go)},Lee=async e=>{try{et(e),dy(e),gr.setAuthConfig(e)}catch{return}if(await gr.loadOAuthInFlight())try{const t=window.location.href,{loginWith:n,userPoolClientId:r}=e,{domain:o,redirectSignIn:s,responseType:a}=n.oauth,c=GA(s);await h$({currentUrl:t,clientId:r,domain:o,redirectUri:c,responseType:a,userAgentValue:It(Ve.SignInWithRedirect)})}catch(t){await KA(t)}};py()&&Ut[bF](Lee);const Uee={Google:"Google",Facebook:"Facebook",Amazon:"LoginWithAmazon",Apple:"SignInWithApple"},m$=async e=>{window?.location&&(window.location.href=e.replace("http://","https://"))},Wk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Fee=e=>{const t=new Uint8Array(e);MA().getRandomValues(t);let n="",r;for(const o of t)n+=Wk.charAt(o%Wk.length);return{value:n,method:"S256",toCodeChallenge(){return r||(r=$ee(n),r)}}};function $ee(e){const t=new nl;return t.update(e),zee(nu.convert(t.digestSync(),{urlSafe:!0}))}function zee(e){return e.replace(/=/g,"")}const jee=()=>AQ(32),Bee=e=>{async function t(n){if(n.persisted&&await e.loadOAuthInFlight()){const o=Ki("User cancelled OAuth flow.");await KA(o)}window.removeEventListener("pageshow",t)}window.addEventListener("pageshow",t)};async function g$(e){const t=Ut.getConfig().Auth?.Cognito;et(t),dy(t),gr.setAuthConfig(t),e?.options?.prompt||await o$();let n="COGNITO",r;return typeof e?.provider=="string"?n=Uee[e.provider]:e?.provider?.custom?n=e.provider.custom:e?.provider?.idpIdentifier&&({idpIdentifier:r}=e.provider),Hee({oauthConfig:t.loginWith.oauth,clientId:t.userPoolClientId,provider:n,idpIdentifier:r,customState:e?.customState,preferPrivateSession:e?.options?.preferPrivateSession,options:{loginHint:e?.options?.loginHint,lang:e?.options?.lang,nonce:e?.options?.nonce,prompt:e?.options?.prompt},authSessionOpener:e?.options?.authSessionOpener})}const Hee=async({oauthConfig:e,provider:t,idpIdentifier:n,clientId:r,customState:o,preferPrivateSession:s,options:a,authSessionOpener:c})=>{const{domain:u,redirectSignIn:f,responseType:h,scopes:m}=e,{loginHint:g,lang:v,nonce:C,prompt:b}=a??{},E=jee(),x=c||m$,I=o?`${E}-${TQ(o)}`:E,{value:R,method:O,toCodeChallenge:D}=Fee(128),N=GA(e.redirectSignIn);py()&&gr.storeOAuthInFlight(!0),gr.storeOAuthState(I),gr.storePKCE(R);const M=new URLSearchParams;M.append("redirect_uri",N),M.append("response_type",h),M.append("client_id",r),n?M.append("idp_identifier",n):M.append("identity_provider",t),M.append("scope",m.join(" ")),g&&M.append("login_hint",g),v&&M.append("lang",v),C&&M.append("nonce",C),b&&M.append("prompt",b.toLowerCase()),M.append("state",I),h==="code"&&(M.append("code_challenge",D()),M.append("code_challenge_method",O));const L=`https://${u}/oauth2/authorize?${M.toString()}`;Bee(gr);const{type:$,error:G,url:j}=await x(L,f,s)??{};try{if($==="error")throw Ki(String(G));if($==="canceled")throw Ki(String($));$==="success"&&j&&await h$({currentUrl:j,clientId:r,domain:u,redirectUri:N,responseType:h,userAgentValue:It(Ve.SignInWithRedirect),preferPrivateSession:s})}catch(F){throw await KA(F),F}},qee=async e=>{const t=e.getConfig().Auth?.Cognito;et(t);const{userPoolEndpoint:n,userPoolId:r}=t,{tokens:o}=await _F(e,{forceRefresh:!1});Iu(o);const s=See({endpointResolver:ft({endpointOverride:n})}),{UserAttributes:a}=await s({region:dt(r),userAgentValue:It(Ve.FetchUserAttributes)},{AccessToken:o.accessToken.toString()});return DQ(a)},v$=()=>qee(Ut),Vee=async e=>{await e.clearOAuthData(),Cr.clearTokens(),await IF(),Ko.dispatch("auth",{event:"signedOut"},"Auth",Go)},Wee=async(e,t=!1,n)=>{dy(e);const{loginWith:r,userPoolClientId:o}=e,{domain:s,redirectSignOut:a}=r.oauth,c=GA(a),u=`https://${s}/logout?${Object.entries({client_id:o,logout_uri:encodeURIComponent(c)}).map(([f,h])=>`${f}=${h}`).join("&")}`;return m$(u)},Gee=async(e,t,n,r)=>{const{isOAuthSignIn:o}=await t.loadOAuthSignIn(),s=await n.getOAuthMetadata();if(await Vee(t),o||s?.oauthSignIn)return Wee(e,!1)},Kee=e=>Cn(kn,Nn("RevokeToken"),Gn(),{...Dn,...e}),Zee=new Wn("Auth");async function Yee(e){const t=Ut.getConfig().Auth?.Cognito;et(t),await Qee(t);let n;try{dy(t),n=!0}catch{n=!1}if(n){const r=new KF(Ch);r.setAuthConfig(t);const{type:o}=await Gee(t,r,Cr)??{};if(o==="error")throw new Ue({name:qQ,message:"An error occurred when attempting to log out from OAuth provider."})}else Cr.clearTokens(),await IF(),Ko.dispatch("auth",{event:"signedOut"},"Auth",Go)}async function Qee(e){try{const{userPoolEndpoint:t,userPoolId:n,userPoolClientId:r}=e,o=await Cr.getTokenStore().loadTokens();qF(o),Jee(o.accessToken)&&await Kee({endpointResolver:ft({endpointOverride:t})})({region:dt(n),userAgentValue:It(Ve.SignOut)},{ClientId:r,Token:o.refreshToken})}catch{Zee.debug("Client signOut error caught but will proceed with token removal")}}const Jee=e=>!!e?.payload?.origin_jti,Xee=e=>Cn(kn,Nn("GetUserAttributeVerificationCode"),Gn(),{...Dn,...e}),ete=async e=>{const{userAttributeKey:t,options:n}=e,r=Ut.getConfig().Auth?.Cognito,o=n?.clientMetadata;et(r);const{userPoolEndpoint:s,userPoolId:a}=r,{tokens:c}=await my({forceRefresh:!1});Iu(c);const u=Xee({endpointResolver:ft({endpointOverride:s})}),{CodeDeliveryDetails:f}=await u({region:dt(a),userAgentValue:It(Ve.SendUserAttributeVerificationCode)},{AccessToken:c.accessToken.toString(),ClientMetadata:o,AttributeName:t}),{DeliveryMedium:h,AttributeName:m,Destination:g}={...f};return{destination:g,deliveryMedium:h,attributeName:m}},tte={identityId:"identityId"},nte=new Wn("DefaultIdentityIdStore");class y${setAuthConfig(t){Ag(t.Cognito),this.authConfig=t,this._authKeys=rte("Cognito",t.Cognito.identityPoolId)}constructor(t){this._authKeys={},this._hasGuestIdentityId=!1,this.keyValueStorage=t}async loadIdentityId(){Ag(this.authConfig?.Cognito);try{if(this._primaryIdentityId)return{id:this._primaryIdentityId,type:"primary"};{const t=await this.keyValueStorage.getItem(this._authKeys.identityId);return t?(this._hasGuestIdentityId=!0,{id:t,type:"guest"}):null}}catch(t){return nte.log("Error getting stored IdentityId.",t),null}}async storeIdentityId(t){Ag(this.authConfig?.Cognito),t.type==="guest"?(this.keyValueStorage.setItem(this._authKeys.identityId,t.id),this._primaryIdentityId=void 0,this._hasGuestIdentityId=!0):(this._primaryIdentityId=t.id,this._hasGuestIdentityId&&(this.keyValueStorage.removeItem(this._authKeys.identityId),this._hasGuestIdentityId=!1))}async clearIdentityId(){this._primaryIdentityId=void 0,await this.keyValueStorage.removeItem(this._authKeys.identityId)}}const rte=(e,t)=>UA(tte)(`com.amplify.${e}`,t),T_=({endpointOverride:e})=>t=>e?{url:new oa(e)}:gQ(t);function b$(e){const t=$s(e).payload.iss,n={};if(!t)throw new Ue({name:"InvalidIdTokenException",message:"Invalid Idtoken."});const r=t.replace(/(^\w+:|^)\/\//,"");return n[r]=e,n}async function ote({tokens:e,authConfig:t,identityIdStore:n}){n.setAuthConfig({Cognito:t});const r=await n.loadIdentityId();if(r)return r.id;const o=e?.idToken?b$(e.idToken.toString()):{},s=await ste(o,t);return n.storeIdentityId({id:s,type:e?"primary":"guest"}),s}async function ste(e,t){const n=t?.identityPoolId,r=C_(n),o=hQ({endpointResolver:T_({endpointOverride:t.identityPoolEndpoint})});let s;try{s=(await o({region:r},{IdentityPoolId:n,Logins:e})).IdentityId}catch(a){throw co(a),new Ue(a)}if(!s)throw new Ue({name:"GetIdResponseException",message:"Received undefined response from getId operation",recoverySuggestion:"Make sure to pass a valid identityPoolId in the configuration."});return s}const Cm=new Wn("CognitoCredentialsProvider"),Gk=3e3*1e3;class S${constructor(t){this._nextCredentialsRefresh=0,this._identityIdStore=t}async clearCredentialsAndIdentityId(){Cm.debug("Clearing out credentials and identityId"),this._credentialsAndIdentityId=void 0,await this._identityIdStore.clearIdentityId()}async clearCredentials(){Cm.debug("Clearing out in-memory credentials"),this._credentialsAndIdentityId=void 0}async getCredentialsAndIdentityId(t){const n=t.authenticated,{tokens:r}=t,{authConfig:o}=t;try{Ag(o?.Cognito)}catch{return}if(!n&&!o.Cognito.allowGuestAccess)return;const{forceRefresh:s}=t,a=this.hasTokenChanged(r),c=await ote({tokens:r,authConfig:o.Cognito,identityIdStore:this._identityIdStore});return(s||a)&&this.clearCredentials(),n?(GQ(r),this.credsForOIDCTokens(o.Cognito,r,c)):this.getGuestCredentials(c,o.Cognito)}async getGuestCredentials(t,n){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&this._credentialsAndIdentityId.isAuthenticatedCreds===!1)return Cm.info("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const r=C_(n.identityPoolId),o=uk({endpointResolver:T_({endpointOverride:n.identityPoolEndpoint})});let s;try{s=await o({region:r},{IdentityId:t})}catch(a){throw co(a),new Ue(a)}if(s?.Credentials?.AccessKeyId&&s?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+Gk;const a={credentials:{accessKeyId:s.Credentials.AccessKeyId,secretAccessKey:s.Credentials.SecretKey,sessionToken:s.Credentials.SessionToken,expiration:s.Credentials.Expiration},identityId:t};return s.IdentityId&&(a.identityId=s.IdentityId,this._identityIdStore.storeIdentityId({id:s.IdentityId,type:"guest"})),this._credentialsAndIdentityId={...a,isAuthenticatedCreds:!1},a}else throw new Ue({name:"CredentialsNotFoundException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}async credsForOIDCTokens(t,n,r){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&this._credentialsAndIdentityId.isAuthenticatedCreds===!0)return Cm.debug("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const o=n.idToken?b$(n.idToken.toString()):{},s=C_(t.identityPoolId),a=uk({endpointResolver:T_({endpointOverride:t.identityPoolEndpoint})});let c;try{c=await a({region:s},{IdentityId:r,Logins:o})}catch(u){throw co(u),new Ue(u)}if(c?.Credentials?.AccessKeyId&&c?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+Gk;const u={credentials:{accessKeyId:c.Credentials.AccessKeyId,secretAccessKey:c.Credentials.SecretKey,sessionToken:c.Credentials.SessionToken,expiration:c.Credentials.Expiration},identityId:r};return c.IdentityId&&(u.identityId=c.IdentityId,this._identityIdStore.storeIdentityId({id:c.IdentityId,type:"primary"})),this._credentialsAndIdentityId={...u,isAuthenticatedCreds:!0,associatedIdToken:n.idToken?.toString()},u}else throw new Ue({name:"CredentialsException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}isPastTTL(){return this._nextCredentialsRefresh===void 0?!0:this._nextCredentialsRefresh<=Date.now()}hasTokenChanged(t){return!!t&&!!this._credentialsAndIdentityId?.associatedIdToken&&t.idToken?.toString()!==this._credentialsAndIdentityId.associatedIdToken}}const ite=new S$(new y$(Ch)),C$={configure(e,t){const n=CF(e),r=new EQ({sameSite:"lax"}),o=t?.ssr?r:Ch,s=t?.ssr?new S$(new y$(r)):ite;if(!n.Auth||t?.Auth){Ut.configure(n,t);return}Tg.setAuthConfig(n.Auth),Tg.setKeyValueStorage(o),Ut.configure(n,{...t,Auth:{tokenProvider:Tg,credentialsProvider:s}})},getConfig(){return Ut.getConfig()}},ate="https://github.com/remit-mail/reader/issues/new",lte=["internal","acme","tailscale","off"],cte=["self","managed"],Kk=(e,t,n)=>e.find(r=>r===t)??n,Pu=()=>{const e=globalThis.__REMIT_CONFIG__??{};return{apiUrl:e.apiUrl??"/api",appOrigin:e.appOrigin??"",betterAuthEnabled:e.betterAuthEnabled??!1,cognito:{userPoolId:e.cognito?.userPoolId??"",clientId:e.cognito?.clientId??"",domain:e.cognito?.domain??"",region:e.cognito?.region??""},rum:{appMonitorId:e.rum?.appMonitorId??"",identityPoolId:e.rum?.identityPoolId??"",region:e.rum?.region??"eu-west-1"},mailboxPollIntervalSeconds:e.mailboxPollIntervalSeconds!=null?String(e.mailboxPollIntervalSeconds):void 0,disableDevtools:e.disableDevtools??!1,tlsMode:Kk(lte,e.tlsMode,"off"),issuesUrl:e.issuesUrl??ate,updateMode:Kk(cte,e.updateMode,"self")}},w$=()=>{const e=Pu(),{userPoolId:t,clientId:n,domain:r,region:o}=e.cognito;return!t||!n?null:{userPoolId:t,userPoolClientId:n,domain:r,region:o,appOrigin:e.appOrigin}},Sy=()=>w$()!==null,E$=()=>{const e=w$();if(!e){console.warn("[auth] Cognito user pool is not configured. Running in local dev mode without Cognito auth.");return}const{userPoolId:t,userPoolClientId:n,domain:r,appOrigin:o}=e;C$.configure({Auth:{Cognito:{userPoolId:t,userPoolClientId:n,loginWith:r?{oauth:{domain:r,scopes:["openid","email","profile"],redirectSignIn:o?[o]:[],redirectSignOut:o?[o]:[],responseType:"code"}}:void 0}}})};var ute={};const Pg=Object.create(null),jd=e=>ute||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Pg:globalThis),Mi=new Proxy(Pg,{get(e,t){return jd()[t]??Pg[t]},has(e,t){return t in jd()||t in Pg},set(e,t,n){const r=jd(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=jd(!0);return delete n[t],!0},ownKeys(){const e=jd(!0);return Object.keys(e)}});Mi.NODE_ENV;var Ng=class extends Error{constructor(e,t){super(e,t),this.name="BetterAuthError",this.message=e,this.stack=""}};const dte=47;function x$(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===dte;)t--;return t===e.length?e:e.slice(0,t)}function fte(e){try{return(x$(new URL(e).pathname)||"/")!=="/"}catch{throw new Ng(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function hte(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Ng(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Ng?t:new Ng(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function Zk(e,t="/api/auth"){if(hte(e),fte(e))return e;const n=x$(e);return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function pte(e,t,n,r,o){{const s=Mi.BETTER_AUTH_URL||Mi.NEXT_PUBLIC_BETTER_AUTH_URL||Mi.PUBLIC_BETTER_AUTH_URL||Mi.NUXT_PUBLIC_BETTER_AUTH_URL||Mi.NUXT_PUBLIC_AUTH_URL||(Mi.BASE_URL!=="/"?Mi.BASE_URL:void 0);if(s)return Zk(s,t)}if(typeof window<"u"&&window.location)return Zk(window.location.origin,t)}const mte={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},gte=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Yk={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},vte=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function yte(e){return e instanceof Date&&!isNaN(e.getTime())}function bte(e){const t=vte.exec(e);if(!t)return null;const[,n,r,o,s,a,c,u,f,h,m]=t,g=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(o,10),parseInt(s,10),parseInt(a,10),parseInt(c,10),u?parseInt(u.padEnd(3,"0"),10):0));if(f){const v=(parseInt(h,10)*60+parseInt(m,10))*(f==="+"?-1:1);g.setUTCMinutes(g.getUTCMinutes()+v)}return yte(g)?g:null}function Ste(e,t={}){const{strict:n=!1,warnings:r=!1,reviver:o,parseDates:s=!0}=t;if(typeof e!="string")return e;const a=e.trim(),c=a.toLowerCase();if(c.length<=9&&c in Yk)return Yk[c];if(!gte.test(a)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(mte).some(([u,f])=>{const h=f.test(a);return h&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${u} pattern`),h})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(a,(f,h)=>{if(f==="__proto__"||f==="constructor"&&h&&typeof h=="object"&&"prototype"in h){r&&console.warn(`[better-json] Dropping "${f}" key to prevent prototype pollution`);return}if(s&&typeof h=="string"){const m=bte(h);if(m)return m}return o?o(f,h):h})}catch(u){if(n)throw u;return e}}function Cte(e,t={strict:!0}){return Ste(e,t)}const wte=["javascript:","data:","vbscript:"];function Ete(e){let t;try{t=new URL(e)}catch{return!0}return!wte.includes(t.protocol)}const xte={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&Ete(e.data.url)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};let Eo=[],Pi=0;const kg=4,_te=globalThis.nanostoresGlobal||={epoch:0};let Ite=()=>{for(Pi=0;Pi<Eo.length;Pi+=kg)Eo[Pi](Eo[Pi+1].value,Eo[Pi+2],Eo[Pi+3]);Eo.length=0};const _$=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(r){return n.lc=t.push(r),()=>{for(let s=Pi+kg;s<Eo.length;)Eo[s]===r?Eo.splice(s,kg):s+=kg;let o=t.indexOf(r);~o&&(t.splice(o,1),--n.lc||n.off())}},notify(r,o){_te.epoch++;let s=!Eo.length&&!0;for(let a of t)Eo.push(a,n,r,o);s&&Ite()},off(){},set(r){let o=n.value;o!==r&&(n.value=r,n.notify(o))},subscribe(r){let o=n.listen(r);return r(n.value),o},value:e};return n},Ate=2,Rte=5,wm=6,Em=10;let I$=(e,t,n,r)=>(e.events=e.events||{},e.events[n+Em]||(e.events[n+Em]=r(o=>{e.events[n].reduceRight((s,a)=>(a(s),s),{shared:{},...o})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let o=e.events[n],s=o.indexOf(t);o.splice(s,1),o.length||(delete e.events[n],e.events[n+Em](),delete e.events[n+Em])}),Tte=(e,t)=>I$(e,t,Ate,n=>{let r=e.set,o=e.setKey;return e.setKey&&(e.setKey=(s,a)=>{let c;if(n({abort:()=>{c=!0},changed:s,newValue:{...e.value,[s]:a}}),!c)return o(s,a)}),e.set=s=>{let a;if(n({abort:()=>{a=!0},newValue:s}),!a)return r(s)},()=>{e.set=r,e.setKey=o}});const A$=1e3;let Ote=(e,t)=>I$(e,r=>{let o=t(r);o&&e.events[wm].push(o)},Rte,r=>{let o=e.listen;e.listen=(...a)=>(!e.lc&&!e.active&&(e.active=!0,r()),o(...a));let s=e.off;return e.events[wm]=[],e.off=()=>{s(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let a of e.events[wm])a();e.events[wm]=[]}},A$)},()=>{e.listen=o,e.off=s}});function Mte(e,t,n){let r=new Set(t);return e.listen((o,s,a)=>{(a===void 0?t.some(c=>o[c]!==s[c]):r.has(a)||r.has(a.split(/\.|\[/)[0]))&&n(o,s,a)})}function Qk(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function sv(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!sv(e[n],t[n]))return!1;return!0}if(Qk(e)&&Qk(t)){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!(o in t)||!sv(e[o],t[o]))return!1;return!0}return!1}function Pte(e,t){return Tte(e,({newValue:n,abort:r})=>{t(e.value,n)&&r()})}const O_=Symbol.for("better-auth:auth-query");function Nte(e){return O_ in e&&e[O_]===!0}function kte(e){const t=_$(e);return Object.defineProperty(t,O_,{value:!0}),t}const A1=Symbol.for("better-auth:broadcast-channel"),Dte=()=>Math.floor(Date.now()/1e3);var Lte=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:Dte()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=t=>{if(t.key!==this.name)return;const n=JSON.parse(t.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(r=>r(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function R1(e="better-auth.message"){return globalThis[A1]||(globalThis[A1]=new Lte(e)),globalThis[A1]}const T1=Symbol.for("better-auth:focus-manager");var Ute=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function Jk(){return globalThis[T1]||(globalThis[T1]=new Ute),globalThis[T1]}const O1=Symbol.for("better-auth:online-manager");var Fte=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function M1(){return globalThis[O1]||(globalThis[O1]=new Fte),globalThis[O1]}const P1=()=>Math.floor(Date.now()/1e3),$te=5;function zte(e){const{fetchSession:t,shouldPollSession:n=()=>!0,sessionSignal:r,options:o={}}=e,s=o.sessionOptions?.refetchInterval??0,a=o.sessionOptions?.refetchOnWindowFocus??!0,c=o.sessionOptions?.refetchWhenOffline??!1,u={isInitialized:!1,lastSessionRequest:0},f=()=>c||M1().isOnline,h=R=>{if(f()){if(R?.event==="storage"){t();return}if(R?.event==="poll"){u.lastSessionRequest=P1(),t();return}if(R?.event==="visibilitychange"){if(P1()-u.lastSessionRequest<$te)return;u.lastSessionRequest=P1(),t();return}t()}},m=R=>{R1().post({event:"session",data:{trigger:R},clientId:Math.random().toString(36).substring(7)})},g=()=>{s&&s>0&&(u.pollInterval=setInterval(()=>{n()&&h({event:"poll"})},s*1e3))},v=()=>{u.unsubscribeBroadcast=R1().subscribe(()=>{h({event:"storage"})})},C=()=>{a&&(u.unsubscribeFocus=Jk().subscribe(()=>{h({event:"visibilitychange"})}))},b=()=>{u.unsubscribeOnline=M1().subscribe(R=>{R&&h({event:"visibilitychange"})})},E=()=>{u.unsubscribeSignal=r.listen(()=>{t()})};return{init:()=>{u.isInitialized||(u.isInitialized=!0,g(),v(),C(),b(),E(),u.cleanupBroadcastSetup=R1().setup(),u.cleanupFocusSetup=Jk().setup(),u.cleanupOnlineSetup=M1().setup())},cleanup:()=>{u.isInitialized&&(u.pollInterval&&(clearInterval(u.pollInterval),u.pollInterval=void 0),u.unsubscribeBroadcast&&(u.unsubscribeBroadcast(),u.unsubscribeBroadcast=void 0),u.unsubscribeFocus&&(u.unsubscribeFocus(),u.unsubscribeFocus=void 0),u.unsubscribeOnline&&(u.unsubscribeOnline(),u.unsubscribeOnline=void 0),u.unsubscribeSignal&&(u.unsubscribeSignal(),u.unsubscribeSignal=void 0),u.cleanupBroadcastSetup&&(u.cleanupBroadcastSetup(),u.cleanupBroadcastSetup=void 0),u.cleanupFocusSetup&&(u.cleanupFocusSetup(),u.cleanupFocusSetup=void 0),u.cleanupOnlineSetup&&(u.cleanupOnlineSetup(),u.cleanupOnlineSetup=void 0),u.isInitialized=!1,u.lastSessionRequest=0)},triggerRefetch:h,broadcastSessionUpdate:m}}const jte=()=>typeof window>"u",Bte=A$;function Hte(e,t){if(typeof window>"u")return;const n=e.get();n.data!==null||t===null||e.set({...n,data:t,error:null,isPending:!1})}function Xk(e){return typeof e=="object"&&e!==null&&"data"in e&&"error"in e?e:{data:e,error:null}}function qte(e){return!e||e.session===null&&e.user===null?null:e}function Vte(e,t){return sv(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function Wte(e,t){const n=_$(!1);let r,o=0,s=0;n.listen(()=>{s++,o=0});const a=v=>h(v),c=kte({data:null,error:null,isPending:!0,isRefetching:!1,refetch:a});Pte(c,Vte);const u=async(v,C)=>{const b=c.value;if(c.set({...b,isPending:b.data===null,isRefetching:!0,error:null,refetch:a}),v.aborted)return"aborted";try{const E=await e("/get-session",{method:"GET",query:C?.query,signal:v});if(v.aborted)return"aborted";let{data:x,error:I}=Xk(E),R="fresh";if(x?.needsRefresh)try{const M=await e("/get-session",{method:"POST",signal:v});if(v.aborted)return"aborted";({data:x,error:I}=Xk(M))}catch{if(v.aborted)return"aborted";R="stale"}if(I){const M=c.value,L=I?.status===401;return c.set({data:L?null:M.data,error:I,isPending:!1,isRefetching:!1,refetch:a}),"failed"}const O=qte(x),D=c.value,N=D.data!=null&&O!=null&&sv(D.data,O)?D.data:O;return c.set({data:N,error:null,isPending:!1,isRefetching:!1,refetch:a}),R}catch(E){if(v.aborted)return"aborted";const x=c.value;return c.set({data:x.data,error:E,isPending:!1,isRefetching:!1,refetch:a}),"failed"}},f=()=>{const v=c.value.data?.session?.expiresAt,C=v instanceof Date?v.getTime():Number.POSITIVE_INFINITY;return Math.min(Date.now()+Bte,C)},h=v=>{o=0,r?.cancel();const C=new AbortController,b={cancel:()=>C.abort(),promise:Promise.resolve().then(()=>C.signal.aborted?"aborted":u(C.signal,v)),revision:s};r=b;const E=x=>{r===b&&(r=void 0,x==="fresh"&&b.revision===s&&(o=f()))};return b.promise.then(E,()=>E("failed")),b.promise.then(()=>{})},m=()=>r?.revision===s?r.promise.then(()=>{}):Date.now()<o?Promise.resolve():h();let g=()=>{};return Ote(c,()=>{let v;jte()||(v=setTimeout(()=>{m()},0));const C=zte({fetchSession:h,shouldPollSession:()=>c.value.data!=null,sessionSignal:n,options:t});return C.init(),g=C.broadcastSessionUpdate,()=>{v&&clearTimeout(v),C.cleanup()}}),{session:c,$sessionSignal:n,broadcastSessionUpdate:v=>g(v)}}function N1(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function M_(e,t,n=".",r){if(!N1(t))return M_(e,{},n,r);const o={...t};for(const s of Object.keys(e)){if(s==="__proto__"||s==="constructor")continue;const a=e[s];a!=null&&(r&&r(o,s,a,n)||(Array.isArray(a)&&Array.isArray(o[s])?o[s]=[...a,...o[s]]:N1(a)&&N1(o[s])?o[s]=M_(a,o[s],(n?`${n}.`:"")+s.toString(),r):o[s]=a))}return o}function Gte(e){return(...t)=>t.reduce((n,r)=>M_(n,r,"",e),{})}const Kte=Gte();var Zte=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}};const Yte=async(e,t)=>{let n=t||{};const r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(const h of t?.plugins||[]){var o,s,a,c,u;if(h.init){var f;const m=await((f=h.init)===null||f===void 0?void 0:f.call(h,e.toString(),n));n=m.options||n,e=m.url}r.onRequest.push((o=h.hooks)===null||o===void 0?void 0:o.onRequest),r.onResponse.push((s=h.hooks)===null||s===void 0?void 0:s.onResponse),r.onSuccess.push((a=h.hooks)===null||a===void 0?void 0:a.onSuccess),r.onError.push((c=h.hooks)===null||c===void 0?void 0:c.onError),r.onRetry.push((u=h.hooks)===null||u===void 0?void 0:u.onRetry)}return{url:e,options:n,hooks:r}};var e3=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},Qte=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function Jte(e){if(typeof e=="number")return new e3({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new e3(e);case"exponential":return new Qte(e);default:throw new Error("Invalid retry strategy")}}const Xte=["get","post","put","patch","delete"];function ZA(e){if(!e.startsWith("@"))return{method:void 0,path:e};const t=e.indexOf("/"),n=e.slice(1,t===-1?void 0:t);return Xte.includes(n)?{method:n,path:t===-1?e:e.slice(t+1)}:{method:void 0,path:e}}const ene=e=>e==="."||e==="..",tne=e=>e.split(":").map(t=>encodeURIComponent(t)).join(":");function nne(e,t){const n=t.get(e);if(n===void 0)return tne(e);if(ene(n))throw new TypeError("Path parameters cannot be reserved path segments");return encodeURIComponent(n)}function rne(e,t){const{baseURL:n,params:r,query:o}=t||{query:{},params:{},baseURL:""};let s=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";const{path:a}=ZA(e);a!==e&&(e=`/${a}`),s.endsWith("/")||(s+="/");let[c,u]=e.replace(s,"").split("?");const f=new URLSearchParams(u);for(const[g,v]of Object.entries(o||{})){if(v==null)continue;let C;if(typeof v=="string")C=v;else if(Array.isArray(v)){for(const b of v)f.append(g,b);continue}else C=JSON.stringify(v);f.set(g,C)}const h=new Map;if(r)if(Array.isArray(r)){const g=c.split("/").filter(v=>v.startsWith(":"));for(const[v,C]of g.entries()){const b=r[v];h.set(C,String(b))}}else for(const[g,v]of Object.entries(r))h.set(`:${g}`,String(v));c=c.split("/").map(g=>nne(g,h)).join("/"),c=c.replace(/^\/+/,"");let m=f.toString();return m=m.length>0?`?${m}`.replace(/\+/g,"%20"):"",s.startsWith("http")?new URL(`${c}${m}`,s):`${s}${c}${m}`}const one=async e=>{const t={},n=async r=>typeof r=="function"?await r():r;if(e?.auth){if(e.auth.type==="Bearer"){const r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type==="Basic"){const[r,o]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!o)return t;t.authorization=`Basic ${btoa(`${r}:${o}`)}`}else if(e.auth.type==="Custom"){const[r,o]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!o)return t;t.authorization=`${r??""} ${o}`}}return t},sne=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function ine(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const r=t.split(";").shift()||"";return sne.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function ane(e){try{return JSON.parse(e),!0}catch{return!1}}function R$(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function t3(e){try{return JSON.parse(e)}catch{return e}}function n3(e){return typeof e=="function"}function lne(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&n3(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&n3(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}function T$(...e){const t={};for(const n of e)if(n)if(n instanceof Headers)n.forEach((r,o)=>{t[o]=r});else{const r=Array.isArray(n)?n:Object.entries(n);for(const[o,s]of r)s!=null&&(t[o]=s)}return t}async function cne(e){const t=new Headers(T$(e?.headers,await one(e)));if(!t.has("content-type")){const n=une(e?.body);n&&t.set("content-type",n)}return t}function une(e){return R$(e)?"application/json":null}function dne(e){const t=e.get("content-type");return t?t.split(";")[0].trim().toLowerCase():null}function fne(e,t){const{body:n}=e;return n?!R$(n)||typeof n=="string"?n:dne(t)==="application/x-www-form-urlencoded"?new URLSearchParams(n).toString():JSON.stringify(n):null}function hne(e,t){if(t?.method)return t.method.toUpperCase();const{method:n}=ZA(e);return n?n.toUpperCase():t?.body?"POST":"GET"}function pne(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var mne=class O$ extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,O$.prototype)}};async function ff(e,t){const n=await e["~standard"].validate(t);if(n.issues)throw new mne(n.issues);return n.value}function zf(e){"@babel/helpers - typeof";return zf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zf(e)}function gne(e,t){if(zf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vne(e){var t=gne(e,"string");return zf(t)=="symbol"?t:t+""}function yne(e,t,n){return(t=vne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?r3(Object(n),!0).forEach(function(r){yne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const P_=async(e,t)=>{var n,r,o;const{hooks:s,url:a,options:c}=await Yte(e,t),u=lne(c),f=new AbortController,h=(n=c.signal)!==null&&n!==void 0?n:f.signal,m=rne(a,c),g=await cne(c),v=fne(c,g),C=hne(a,c),b=St(St({},c),{},{url:m,headers:g,body:v,method:C,signal:h});for(const q of s.onRequest)if(q){const J=await q(b);typeof J=="object"&&J!==null&&Object.assign(b,J)}("pipeTo"in b&&typeof b.pipeTo=="function"||typeof(t==null||(r=t.body)===null||r===void 0?void 0:r.pipe)=="function")&&("duplex"in b||(b.duplex="half"));const{clearTimeout:E}=pne(c,f);let x=await u(b.url,b);E();const I={response:x,request:b};for(const q of s.onResponse)if(q){var R;const J=await q(St(St({},I),{},{response:!(t==null||(R=t.hookOptions)===null||R===void 0)&&R.cloneResponse?x.clone():x}));J instanceof Response?x=J:typeof J=="object"&&J!==null&&(x=J.response)}if(x.ok){if(b.method==="HEAD")return{data:"",error:null};const q=ine(x),J={data:null,response:x,request:b};if(q==="json"||q==="text"){var O;const Se=await x.text();J.data=await((O=b.jsonParser)!==null&&O!==void 0?O:t3)(Se)}else J.data=await x[q]();b?.output&&b.output&&!b.disableValidation&&(J.data=await ff(b.output,J.data));for(const Se of s.onSuccess)if(Se){var D;await Se(St(St({},J),{},{response:!(t==null||(D=t.hookOptions)===null||D===void 0)&&D.cloneResponse?x.clone():x}))}return t?.throw?J.data:{data:J.data,error:null}}const N=(o=t?.jsonParser)!==null&&o!==void 0?o:t3,M=await x.text(),L=ane(M),$=L?await N(M):null,G={response:x,responseText:M,request:b,error:St(St({},$),{},{status:x.status,statusText:x.statusText})};for(const q of s.onError)if(q){var j;await q(St(St({},G),{},{response:!(t==null||(j=t.hookOptions)===null||j===void 0)&&j.cloneResponse?x.clone():x}))}if(t?.retry){var F;const q=Jte(t.retry),J=(F=t.retryAttempt)!==null&&F!==void 0?F:0;if(await q.shouldAttemptRetry(J,x)){for(const V of s.onRetry)V&&await V(I);const Se=q.getDelay(J);return await new Promise(V=>setTimeout(V,Se)),await P_(e,St(St({},t),{},{retryAttempt:J+1}))}}if(t?.throw)throw new Zte(x.status,x.statusText,L?$:M);return{data:null,error:St(St({},$),{},{status:x.status,statusText:x.statusText})}},bne=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r;let o=St(St({},n),e.query!==void 0&&{query:St(St({},e.query),n?.query)});const s=((r=e.plugins)===null||r===void 0||(r=r.find(f=>{var h;return!((h=f.schema)===null||h===void 0)&&h.config?t.startsWith(f.schema.config.baseURL||"")||t.startsWith(f.schema.config.prefix||""):!1}))===null||r===void 0?void 0:r.schema)||e.schema;if(s){var a,c;let f=t;!((a=s.config)===null||a===void 0)&&a.prefix&&f.startsWith(s.config.prefix)&&(f=f.replace(s.config.prefix,""),s.config.baseURL&&(t=t.replace(s.config.prefix,s.config.baseURL))),!((c=s.config)===null||c===void 0)&&c.baseURL&&f.startsWith(s.config.baseURL)&&(f=f.replace(s.config.baseURL,"")),f.startsWith("/")&&f.charAt(1)==="@"&&(f=f.substring(1));const h=s.schema[f];if(h){var u;const{method:m,path:g}=ZA(f);m&&(t=t.slice(0,t.length-f.length)+g);let v=n?.headers;if(h.headers&&!n?.disableValidation){const b={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((I,R)=>{b[R.toLowerCase()]=I});else if(typeof n.headers=="object")for(const[I,R]of Object.entries(n.headers))R!=null&&(b[I.toLowerCase()]=R)}const E=await ff(h.headers,b),x={};for(const[I,R]of Object.entries(E))x[I.toLowerCase()]=R;v=x}const C=(u=h.method)!==null&&u!==void 0?u:m;if(o=St(St(St(St({},o),C!==void 0&&{method:C}),h.output!==void 0&&{output:h.output}),v!==void 0&&{headers:v}),!n?.disableValidation){if(h.query&&(o.query=await ff(h.query,n?.query),o.query!==null&&typeof o.query=="object")){const b=St({},e.query);for(const E of Object.keys(b))n?.query&&Object.prototype.hasOwnProperty.call(n.query,E)&&(b[E]=n.query[E]);o.query=St(St({},b),o.query)}o=St(St({},o),{},{body:h.input?await ff(h.input,n?.body):n?.body,params:h.params?await ff(h.params,n?.params):n?.params})}return{url:t,options:o}}}return St({url:t},(n!==void 0||e.query!==void 0)&&{options:o})}}),Sne=e=>{async function t(n,r){const o=St(St(St({},e),r),{},{headers:T$(e?.headers,r?.headers),plugins:[...e?.plugins||[],bne(e||{}),...r?.plugins||[]]});if(e?.catchAllError)try{return await P_(n,o)}catch(s){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:s}}}return await P_(n,o)}return t};var Pa={};const Cne=e=>{if(typeof process>"u")return;const t="/api/auth";if(Pa.NEXT_PUBLIC_AUTH_URL)return Pa.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(Pa.NEXTAUTH_URL)try{return Pa.NEXTAUTH_URL}catch{}if(Pa.VERCEL_URL)try{const n=Pa.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${n}${Pa.VERCEL_URL}`).origin}${t}`}catch{}}},wne=e=>e==="/sign-out"||e==="/update-user"||e==="/update-session"||e==="/sign-up/email"||e==="/sign-in/email"||e==="/delete-user"||e==="/verify-email"||e==="/revoke-sessions"||e==="/revoke-session"||e==="/revoke-other-sessions"||e==="/change-email"||e==="/change-password",Ene=(e,t)=>{const n="credentials"in Request.prototype,r=pte(e?.baseURL,e?.basePath)??Cne()??"/api/auth",o=[],s={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:a,onError:c,onRequest:u,onResponse:f,...h}={},m=Sne({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(M){return M?Cte(M,{strict:!1}):null},customFetchImpl:fetch,...h,plugins:[s,...h.plugins||[],xte,...o]}),{$sessionSignal:g,session:v,broadcastSessionUpdate:C}=Wte(m,e);let b=!1;const E=M=>{b||M===null||(b=!0,Hte(v,M))},x=[];let I={};const R={$sessionSignal:g,session:v},O={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},D=[{signal:"$sessionSignal",matcher:wne,callback(M){M==="/sign-out"?C("signout"):(M==="/update-user"||M==="/update-session")&&C("updateUser")}}];for(const M of x)M.getAtoms&&Object.assign(R,M.getAtoms?.(m)),M.pathMethods&&Object.assign(O,M.pathMethods),M.atomListeners&&D.push(...M.atomListeners);const N={notify:M=>{R[M].set(!R[M].get())},listen:(M,L)=>{R[M].subscribe(L)},atoms:R};for(const M of x)M.getActions&&(I=Kte(M.getActions?.(m,N,e)??{},I));return{get baseURL(){return r},pluginsActions:I,pluginsAtoms:R,pluginPathMethods:O,atomListeners:D,hydrateSession:E,$sessionSignal:g,$fetch:m,$store:N}};function xne(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function _ne(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Ine=new RegExp("[\\p{Ll}\\d]+|\\p{Lu}+(?!\\p{Ll})|\\p{Lu}[\\p{Ll}\\d]+|\\p{Lo}+","gu"),Ane=/['\u2019]/g;function Rne(e){return e.replace(Ane,"").match(Ine)??[]}function Tne(e){return Rne(e).map(t=>t.toLowerCase()).join("-")}function One(e,t,n){const r=t[e],{fetchOptions:o,query:s,...a}=n||{};return r||(o?.method?o.method:a&&Object.keys(a).length>0?"POST":"GET")}function Mne(e,t,n,r,o){function s(a=[]){return new Proxy(function(){},{get(c,u){if(typeof u!="string"||u==="then"||u==="catch"||u==="finally")return;const f=[...a,u];let h=e;for(const m of f)if(h&&typeof h=="object"&&m in h)h=h[m];else{h=void 0;break}return typeof h=="function"||xne(h)?h:s(f)},apply:async(c,u,f)=>{const h="/"+a.map(Tne).join("/"),m=f[0]||{},g=f[1]||{},{query:v,fetchOptions:C,...b}=m,E={...g,...C},x=One(h,n,m);return await t(h,{...E,body:x==="GET"?void 0:{...b,...E?.body||{}},query:v||E?.query,method:x,async onSuccess(I){if(await E?.onSuccess?.(I),!o||E.disableSignal)return;const R=o.filter(D=>D.matcher(h));if(!R.length)return;const O=new Set;for(const D of R){const N=r[D.signal];if(!N)return;if(O.has(D.signal))continue;O.add(D.signal);const M=N.get();setTimeout(()=>{N.set(!M)},10),D.callback?.(h)}}})}})}return s()}var k1={exports:{}},He={};var o3;function Pne(){if(o3)return He;o3=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function v(z){return z===null||typeof z!="object"?null:(z=g&&z[g]||z["@@iterator"],typeof z=="function"?z:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,E={};function x(z,te,fe){this.props=z,this.context=te,this.refs=E,this.updater=fe||C}x.prototype.isReactComponent={},x.prototype.setState=function(z,te){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,te,"setState")},x.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function I(){}I.prototype=x.prototype;function R(z,te,fe){this.props=z,this.context=te,this.refs=E,this.updater=fe||C}var O=R.prototype=new I;O.constructor=R,b(O,x.prototype),O.isPureReactComponent=!0;var D=Array.isArray;function N(){}var M={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function $(z,te,fe){var ae=fe.ref;return{$$typeof:e,type:z,key:te,ref:ae!==void 0?ae:null,props:fe}}function G(z,te){return $(z.type,te,z.props)}function j(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function F(z){var te={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(fe){return te[fe]})}var q=/\/+/g;function J(z,te){return typeof z=="object"&&z!==null&&z.key!=null?F(""+z.key):te.toString(36)}function Se(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(N,N):(z.status="pending",z.then(function(te){z.status==="pending"&&(z.status="fulfilled",z.value=te)},function(te){z.status==="pending"&&(z.status="rejected",z.reason=te)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function V(z,te,fe,ae,be){var Fe=typeof z;(Fe==="undefined"||Fe==="boolean")&&(z=null);var ke=!1;if(z===null)ke=!0;else switch(Fe){case"bigint":case"string":case"number":ke=!0;break;case"object":switch(z.$$typeof){case e:case t:ke=!0;break;case h:return ke=z._init,V(ke(z._payload),te,fe,ae,be)}}if(ke)return be=be(z),ke=ae===""?"."+J(z,0):ae,D(be)?(fe="",ke!=null&&(fe=ke.replace(q,"$&/")+"/"),V(be,te,fe,"",function(rt){return rt})):be!=null&&(j(be)&&(be=G(be,fe+(be.key==null||z&&z.key===be.key?"":(""+be.key).replace(q,"$&/")+"/")+ke)),te.push(be)),1;ke=0;var le=ae===""?".":ae+":";if(D(z))for(var Re=0;Re<z.length;Re++)ae=z[Re],Fe=le+J(ae,Re),ke+=V(ae,te,fe,Fe,be);else if(Re=v(z),typeof Re=="function")for(z=Re.call(z),Re=0;!(ae=z.next()).done;)ae=ae.value,Fe=le+J(ae,Re++),ke+=V(ae,te,fe,Fe,be);else if(Fe==="object"){if(typeof z.then=="function")return V(Se(z),te,fe,ae,be);throw te=String(z),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return ke}function ee(z,te,fe){if(z==null)return z;var ae=[],be=0;return V(z,ae,"","",function(Fe){return te.call(fe,Fe,be++)}),ae}function me(z){if(z._status===-1){var te=z._result;te=te(),te.then(function(fe){(z._status===0||z._status===-1)&&(z._status=1,z._result=fe)},function(fe){(z._status===0||z._status===-1)&&(z._status=2,z._result=fe)}),z._status===-1&&(z._status=0,z._result=te)}if(z._status===1)return z._result.default;throw z._result}var ge=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=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(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},Te={map:ee,forEach:function(z,te,fe){ee(z,function(){te.apply(this,arguments)},fe)},count:function(z){var te=0;return ee(z,function(){te++}),te},toArray:function(z){return ee(z,function(te){return te})||[]},only:function(z){if(!j(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return He.Activity=m,He.Children=Te,He.Component=x,He.Fragment=n,He.Profiler=o,He.PureComponent=R,He.StrictMode=r,He.Suspense=u,He.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,He.__COMPILER_RUNTIME={__proto__:null,c:function(z){return M.H.useMemoCache(z)}},He.cache=function(z){return function(){return z.apply(null,arguments)}},He.cacheSignal=function(){return null},He.cloneElement=function(z,te,fe){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var ae=b({},z.props),be=z.key;if(te!=null)for(Fe in te.key!==void 0&&(be=""+te.key),te)!L.call(te,Fe)||Fe==="key"||Fe==="__self"||Fe==="__source"||Fe==="ref"&&te.ref===void 0||(ae[Fe]=te[Fe]);var Fe=arguments.length-2;if(Fe===1)ae.children=fe;else if(1<Fe){for(var ke=Array(Fe),le=0;le<Fe;le++)ke[le]=arguments[le+2];ae.children=ke}return $(z.type,be,ae)},He.createContext=function(z){return z={$$typeof:a,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:s,_context:z},z},He.createElement=function(z,te,fe){var ae,be={},Fe=null;if(te!=null)for(ae in te.key!==void 0&&(Fe=""+te.key),te)L.call(te,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(be[ae]=te[ae]);var ke=arguments.length-2;if(ke===1)be.children=fe;else if(1<ke){for(var le=Array(ke),Re=0;Re<ke;Re++)le[Re]=arguments[Re+2];be.children=le}if(z&&z.defaultProps)for(ae in ke=z.defaultProps,ke)be[ae]===void 0&&(be[ae]=ke[ae]);return $(z,Fe,be)},He.createRef=function(){return{current:null}},He.forwardRef=function(z){return{$$typeof:c,render:z}},He.isValidElement=j,He.lazy=function(z){return{$$typeof:h,_payload:{_status:-1,_result:z},_init:me}},He.memo=function(z,te){return{$$typeof:f,type:z,compare:te===void 0?null:te}},He.startTransition=function(z){var te=M.T,fe={};M.T=fe;try{var ae=z(),be=M.S;be!==null&&be(fe,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(N,ge)}catch(Fe){ge(Fe)}finally{te!==null&&fe.types!==null&&(te.types=fe.types),M.T=te}},He.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},He.use=function(z){return M.H.use(z)},He.useActionState=function(z,te,fe){return M.H.useActionState(z,te,fe)},He.useCallback=function(z,te){return M.H.useCallback(z,te)},He.useContext=function(z){return M.H.useContext(z)},He.useDebugValue=function(){},He.useDeferredValue=function(z,te){return M.H.useDeferredValue(z,te)},He.useEffect=function(z,te){return M.H.useEffect(z,te)},He.useEffectEvent=function(z){return M.H.useEffectEvent(z)},He.useId=function(){return M.H.useId()},He.useImperativeHandle=function(z,te,fe){return M.H.useImperativeHandle(z,te,fe)},He.useInsertionEffect=function(z,te){return M.H.useInsertionEffect(z,te)},He.useLayoutEffect=function(z,te){return M.H.useLayoutEffect(z,te)},He.useMemo=function(z,te){return M.H.useMemo(z,te)},He.useOptimistic=function(z,te){return M.H.useOptimistic(z,te)},He.useReducer=function(z,te,fe){return M.H.useReducer(z,te,fe)},He.useRef=function(z){return M.H.useRef(z)},He.useState=function(z){return M.H.useState(z)},He.useSyncExternalStore=function(z,te,fe){return M.H.useSyncExternalStore(z,te,fe)},He.useTransition=function(){return M.H.useTransition()},He.version="19.2.7",He}var s3;function Ih(){return s3||(s3=1,k1.exports=Pne()),k1.exports}var _=Ih();const B=Eu(_),Nne=gF({__proto__:null,default:B},[_]);function kne(e,t={}){const n=_.useRef(e.get()),{keys:r,deps:o=[e,r]}=t,s=_.useCallback(c=>{const u=f=>{n.current!==f&&(n.current=f,c())};return u(e.value),r?.length?Mte(e,r,u):e.listen(u)},o),a=()=>n.current;return _.useSyncExternalStore(s,a,Nte(e)?()=>e.init:a)}function Dne(e){return`use${_ne(e)}`}function Lne(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,hydrateSession:o,$fetch:s,$store:a,atomListeners:c}=Ene(e),u={};for(const[f,h]of Object.entries(r))u[Dne(f)]=()=>kne(h);return Mne({...n,...u,hydrateSession:o,$fetch:s,$store:a},s,t,r,c)}const Une=10,Kc=[],Fne=["x-correlation-id","x-request-id","x-amzn-requestid","x-amzn-trace-id","apigw-requestid","x-trace-id"];function $ne(e){const t=typeof e=="string"?e:e instanceof URL?e.href:e.url;try{return new URL(t,window.location.origin).pathname}catch{return t.split(/[?#]/)[0]}}function zne(e,t){return t?.method?t.method.toUpperCase():typeof e!="string"&&!(e instanceof URL)&&e.method?e.method.toUpperCase():"GET"}function jne(e){for(const t of Fne){const n=e.headers.get(t);if(n)return n}}function Bne(e){Kc.push(e),Kc.length>Une&&Kc.shift()}function i3(e){const{input:t,init:n,response:r,durationMs:o}=e;Bne({method:zne(t,n),path:$ne(t),status:r?.status??0,durationMs:Math.round(o),correlationId:r?jne(r):void 0,timestamp:new Date().toISOString()})}function Hne(){return Kc.slice()}function qne(){for(let e=Kc.length-1;e>=0;e--){const t=Kc[e];if(t.status===0||t.status>=400)return t}}class YA extends Error{constructor(t){super(t instanceof Error&&t.message?t.message:"The request could not be completed.",{cause:t}),this.name="NetworkError"}}const Vne=e=>typeof e=="object"&&e!==null&&"name"in e&&e.name==="AbortError",M$=async(e,t)=>{const n=performance.now();try{const r=await fetch(e,{...t,redirect:"manual"}),o=r.type==="opaqueredirect"?new Response(null,{status:401}):r;return i3({input:e,init:t,response:o,durationMs:performance.now()-n}),o}catch(r){throw Vne(r)?r:(i3({input:e,init:t,durationMs:performance.now()-n}),new YA(r))}},QA=()=>{try{return globalThis.sessionStorage??null}catch{return null}},Cy=()=>Pu().betterAuthEnabled,Wne="EMAIL_PASSWORD_SIGN_UP_DISABLED",Gne=e=>typeof e=="object"&&e!==null&&e.code===Wne,rl=Lne(),Kne=60,Zne=30,N_="remit.better-auth.token",Yne=()=>{const e=QA()?.getItem(N_);if(!e)return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.value=="string"&&typeof t.expiresAt=="number")return{value:t.value,expiresAt:t.expiresAt}}catch{}return null},P$=e=>{const t=QA();if(t)try{if(!e){t.removeItem(N_);return}t.setItem(N_,JSON.stringify(e))}catch{}};let Fa=null,iv=0;const Qne=()=>Fa||(Fa=Yne(),Fa),qa=()=>Math.floor(Date.now()/1e3),Jne=e=>{const[,t]=e.split(".");if(!t)return qa();try{const n=JSON.parse(atob(t.replace(/-/g,"+").replace(/_/g,"/")));return typeof n.exp=="number"?n.exp:qa()}catch{return qa()}};class av extends Error{status;constructor(t,n){super(t),this.name="AuthTokenError",this.status=n}}const Xne=async()=>{const e=await M$("/api/auth/token",{credentials:"include"});if(!e.ok)throw new av(`Could not mint a session token: ${e.status} ${e.statusText}`,e.status);const t=await e.json();if(t&&typeof t=="object"&&"token"in t&&typeof t.token=="string")return t.token;throw new av("The token endpoint returned no token")};let Bd=null;const ere=()=>Bd||(Bd=Xne().then(e=>(Fa={value:e,expiresAt:Jne(e)},P$(Fa),iv=0,e)).finally(()=>{Bd=null}),Bd),tre=e=>e.expiresAt-Kne>qa(),a3=e=>e.expiresAt>qa(),nre=e=>e instanceof YA?!0:e instanceof av?e.status===408||e.status===429||(e.status??0)>=500:!1,rre=e=>e instanceof av&&(e.status===401||e.status===403),ore=async()=>{const e=Qne();if(e&&tre(e)||e&&a3(e)&&qa()<iv)return e.value;try{return await ere()}catch(t){if(rre(t))throw JA(),t.status===403&&rl.$store.notify("$sessionSignal"),t;if(e&&a3(e)&&nre(t))return iv=qa()+Zne,e.value;throw t}},JA=()=>{iv=0,P$(null),Fa=null};const sre=e=>e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function ire(e,t,n=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:sre(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}const are=e=>{let t="",n=!1;for(const r of e){if(r==="-"||r==="_"||r<=" "){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t};const lre=e=>{const t=are(e);return t.charAt(0).toUpperCase()+t.slice(1)};const k_=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const Na={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 D1(e){return e!=null}function cre(e,t={}){const n=t.attributeNames??{},r=g=>n[g]??g,o=e.size??e.width??Na.width,s=e.size??e.height??Na.height,a=e.aliases?.filter(g=>typeof g=="string"&&g.trim()!=="").map(g=>`lucide-${g}`)??[],c=[...e.name?[`lucide-${e.name}`]:[],...a],u=t.className?.split(" ").filter(Boolean)??[],f=t.includeDefaultClasses===!1?k_(...u):k_("lucide",...c,...u),h=t.absoluteStrokeWidth?Number(t.strokeWidth??Na["stroke-width"])*Number(e.size??e.width??Na.width)/Number(t.size??t.width??Na.width):t.strokeWidth??Na["stroke-width"];return["svg",{...Object.entries(Na).reduce((g,[v,C])=>(g[r(v)]=C,g),{}),..."color"in t&&t.color&&{[r("stroke")]:t.color},..."size"in t&&D1(t.size)&&{[r("width")]:t.size,[r("height")]:t.size},..."width"in t&&D1(t.width)&&{[r("width")]:t.width},..."height"in t&&D1(t.height)&&{[r("height")]:t.height},[r("stroke-width")]:h,...f&&{[r("class")]:f},[r("viewBox")]:`0 0 ${o} ${s}`,...t.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(g=>{const[v,C,b]=g,E=t.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...C}:C;return b?[v,E,b]:[v,E]})]}function ure(e,t={}){return cre(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const dre=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},fre=_.createContext({}),hre=()=>_.useContext(fre),pre=_.forwardRef(({color:e,size:t,width:n,height:r,strokeWidth:o,absoluteStrokeWidth:s,nonScalingStroke:a,className:c="",children:u,iconNode:f=[],icon:h={node:f,aliases:[],size:24},...m},g)=>{const{size:v=24,strokeWidth:C=2,absoluteStrokeWidth:b=!1,nonScalingStroke:E=!1,color:x="currentColor",className:I=""}=hre()??{},R=!!u||dre(m),[O,D,N=[]]=ure(h,{color:e??x,width:n??t??v,height:r??t??v,strokeWidth:o??C,absoluteStrokeWidth:s??b,nonScalingStroke:a??E,className:k_(I,c),hasA11yProp:R,attributes:m});return _.createElement(O,{ref:g,...D},[...N.map(([M,L])=>_.createElement(M,L)),...Array.isArray(u)?u:[u]])});function Et(e,t=[],n=[]){const r=typeof e=="string"?ire(e,t,n):e,o=_.forwardRef(({className:s,...a},c)=>_.createElement(pre,{ref:c,icon:r,className:s,...a}));return r.name&&(o.displayName=lre(r.name)),o}const N$={name:"archive",size:24,node:[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]};N$.node;const mre=Et(N$);const k$={name:"calendar-days",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M8 13h.01",key:"1sbv64"}],["path",{d:"M12 13h.01",key:"y0uutt"}],["path",{d:"M16 13h.01",key:"wip0gl"}],["path",{d:"M8 17h.01",key:"p3bg7i"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M16 17h.01",key:"ql8jdd"}]]};k$.node;const gre=Et(k$);const D$={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};D$.node;const L$=Et(D$);const U$={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};U$.node;const vre=Et(U$);const F$={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};F$.node;const $$=Et(F$);const z$={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};z$.node;const yre=Et(z$);const j$={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};j$.node;const bre=Et(j$);const B$={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};B$.node;const Sre=Et(B$);const H$={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};H$.node;const Cre=Et(H$);const q$={name:"folder-plus",size:24,node:[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};q$.node;const wre=Et(q$);const V$={name:"folder-tree",size:24,node:[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]};V$.node;const Ere=Et(V$);const W$={name:"funnel",size:24,node:[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],aliases:["filter"]};W$.node;const xre=Et(W$);const G$={name:"inbox",size:24,node:[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]};G$.node;const K$=Et(G$);const Z$={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};Z$.node;const _re=Et(Z$);const Y$={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};Y$.node;const Q$=Et(Y$);const J$={name:"log-in",size:24,node:[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]};J$.node;const l3=Et(J$);const X$={name:"mails",size:24,node:[["path",{d:"M17 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 1-1.732",key:"1vyzll"}],["path",{d:"m22 5.5-6.419 4.179a2 2 0 0 1-2.162 0L7 5.5",key:"k7ramc"}],["rect",{x:"7",y:"3",width:"15",height:"12",rx:"2",key:"17196g"}]]};X$.node;const Ire=Et(X$);const ez={name:"octagon-alert",size:24,node:[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],aliases:["alert-octagon"]};ez.node;const XA=Et(ez);const tz={name:"palette",size:24,node:[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]};tz.node;const Are=Et(tz);const nz={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};nz.node;const Rre=Et(nz);const rz={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};rz.node;const Tre=Et(rz);const oz={name:"shield-alert",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};oz.node;const Ore=Et(oz);const sz={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};sz.node;const Mre=Et(sz);const iz={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};iz.node;const Pre=Et(iz);const az={name:"tag",size:24,node:[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};az.node;const Nre=Et(az);const lz={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"]};lz.node;const kre=Et(lz);const cz={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};cz.node;const eR=Et(cz);const uz={name:"user-cog",size:24,node:[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};uz.node;const Dre=Et(uz);const dz={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};dz.node;const Lre=Et(dz);const fz={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};fz.node;const Ure=Et(fz);const hz={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};hz.node;const D_=Et(hz);function pz(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=pz(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Fre(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=pz(e))&&(r&&(r+=" "),r+=t);return r}const tR="-",$re=e=>{const t=jre(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const c=a.split(tR);return c[0]===""&&c.length!==1&&c.shift(),mz(c,t)||zre(a)},getConflictingClassGroupIds:(a,c)=>{const u=n[a]||[];return c&&r[a]?[...u,...r[a]]:u}}},mz=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?mz(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(tR);return t.validators.find(({validator:a})=>a(s))?.classGroupId},c3=/^\[(.+)\]$/,zre=e=>{if(c3.test(e)){const t=c3.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},jre=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Hre(Object.entries(e.classGroups),n).forEach(([s,a])=>{L_(a,r,s,t)}),r},L_=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:u3(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Bre(o)){L_(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,a])=>{L_(a,u3(t,s),n,r)})})},u3=(e,t)=>{let n=e;return t.split(tR).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Bre=e=>e.isThemeGetter,Hre=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,c])=>[t+a,c])):s);return[n,o]}):e,qre=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return o(s,a),a},set(s,a){n.has(s)?n.set(s,a):o(s,a)}}},gz="!",Vre=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,a=c=>{const u=[];let f=0,h=0,m;for(let E=0;E<c.length;E++){let x=c[E];if(f===0){if(x===o&&(r||c.slice(E,E+s)===t)){u.push(c.slice(h,E)),h=E+s;continue}if(x==="/"){m=E;continue}}x==="["?f++:x==="]"&&f--}const g=u.length===0?c:c.substring(h),v=g.startsWith(gz),C=v?g.substring(1):g,b=m&&m>h?m-h:void 0;return{modifiers:u,hasImportantModifier:v,baseClassName:C,maybePostfixModifierPosition:b}};return n?c=>n({className:c,parseClassName:a}):a},Wre=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Gre=e=>({cache:qre(e.cacheSize),parseClassName:Vre(e),...$re(e)}),Kre=/\s+/,Zre=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],a=e.trim().split(Kre);let c="";for(let u=a.length-1;u>=0;u-=1){const f=a[u],{modifiers:h,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}=n(f);let C=!!v,b=r(C?g.substring(0,v):g);if(!b){if(!C){c=f+(c.length>0?" "+c:c);continue}if(b=r(g),!b){c=f+(c.length>0?" "+c:c);continue}C=!1}const E=Wre(h).join(":"),x=m?E+gz:E,I=x+b;if(s.includes(I))continue;s.push(I);const R=o(b,C);for(let O=0;O<R.length;++O){const D=R[O];s.push(x+D)}c=f+(c.length>0?" "+c:c)}return c};function Yre(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=vz(t))&&(r&&(r+=" "),r+=n);return r}const vz=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=vz(e[r]))&&(n&&(n+=" "),n+=t);return n};function Qre(e,...t){let n,r,o,s=a;function a(u){const f=t.reduce((h,m)=>m(h),e());return n=Gre(f),r=n.cache.get,o=n.cache.set,s=c,c(u)}function c(u){const f=r(u);if(f)return f;const h=Zre(u,n);return o(u,h),h}return function(){return s(Yre.apply(null,arguments))}}const qt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},yz=/^\[(?:([a-z-]+):)?(.+)\]$/i,Jre=/^\d+\/\d+$/,Xre=new Set(["px","full","screen"]),eoe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,toe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,noe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,roe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ooe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xs=e=>Zc(e)||Xre.has(e)||Jre.test(e),Ai=e=>Nu(e,"length",foe),Zc=e=>!!e&&!Number.isNaN(Number(e)),L1=e=>Nu(e,"number",Zc),Hd=e=>!!e&&Number.isInteger(Number(e)),soe=e=>e.endsWith("%")&&Zc(e.slice(0,-1)),Ze=e=>yz.test(e),Ri=e=>eoe.test(e),ioe=new Set(["length","size","percentage"]),aoe=e=>Nu(e,ioe,bz),loe=e=>Nu(e,"position",bz),coe=new Set(["image","url"]),uoe=e=>Nu(e,coe,poe),doe=e=>Nu(e,"",hoe),qd=()=>!0,Nu=(e,t,n)=>{const r=yz.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},foe=e=>toe.test(e)&&!noe.test(e),bz=()=>!1,hoe=e=>roe.test(e),poe=e=>ooe.test(e),moe=()=>{const e=qt("colors"),t=qt("spacing"),n=qt("blur"),r=qt("brightness"),o=qt("borderColor"),s=qt("borderRadius"),a=qt("borderSpacing"),c=qt("borderWidth"),u=qt("contrast"),f=qt("grayscale"),h=qt("hueRotate"),m=qt("invert"),g=qt("gap"),v=qt("gradientColorStops"),C=qt("gradientColorStopPositions"),b=qt("inset"),E=qt("margin"),x=qt("opacity"),I=qt("padding"),R=qt("saturate"),O=qt("scale"),D=qt("sepia"),N=qt("skew"),M=qt("space"),L=qt("translate"),$=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",Ze,t],F=()=>[Ze,t],q=()=>["",xs,Ai],J=()=>["auto",Zc,Ze],Se=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>["start","end","center","between","around","evenly","stretch"],ge=()=>["","0",Ze],Te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[Zc,Ze];return{cacheSize:500,separator:":",theme:{colors:[qd],spacing:[xs,Ai],blur:["none","",Ri,Ze],brightness:z(),borderColor:[e],borderRadius:["none","","full",Ri,Ze],borderSpacing:F(),borderWidth:q(),contrast:z(),grayscale:ge(),hueRotate:z(),invert:ge(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[soe,Ai],inset:j(),margin:j(),opacity:z(),padding:F(),saturate:z(),scale:z(),sepia:ge(),skew:z(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",Ze]}],container:["container"],columns:[{columns:[Ri]}],"break-after":[{"break-after":Te()}],"break-before":[{"break-before":Te()}],"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"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Se(),Ze]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Hd,Ze]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ze]}],grow:[{grow:ge()}],shrink:[{shrink:ge()}],order:[{order:["first","last","none",Hd,Ze]}],"grid-cols":[{"grid-cols":[qd]}],"col-start-end":[{col:["auto",{span:["full",Hd,Ze]},Ze]}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":[qd]}],"row-start-end":[{row:["auto",{span:[Hd,Ze]},Ze]}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ze]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ze]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...me()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...me(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...me(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[E]}],mx:[{mx:[E]}],my:[{my:[E]}],ms:[{ms:[E]}],me:[{me:[E]}],mt:[{mt:[E]}],mr:[{mr:[E]}],mb:[{mb:[E]}],ml:[{ml:[E]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ze,t]}],"min-w":[{"min-w":[Ze,t,"min","max","fit"]}],"max-w":[{"max-w":[Ze,t,"none","full","min","max","fit","prose",{screen:[Ri]},Ri]}],h:[{h:[Ze,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ze,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ze,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ze,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ri,Ai]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",L1]}],"font-family":[{font:[qd]}],"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:["tighter","tight","normal","wide","wider","widest",Ze]}],"line-clamp":[{"line-clamp":["none",Zc,L1]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",xs,Ze]}],"list-image":[{"list-image":["none",Ze]}],"list-style-type":[{list:["none","disc","decimal",Ze]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",xs,Ai]}],"underline-offset":[{"underline-offset":["auto",xs,Ze]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ze]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Se(),loe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",aoe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},uoe]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:V()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[xs,Ze]}],"outline-w":[{outline:[xs,Ai]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[xs,Ai]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ri,doe]}],"shadow-color":[{shadow:[qd]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Ri,Ze]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[m]}],saturate:[{saturate:[R]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[R]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ze]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",Ze]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ze]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[Hd,Ze]}],"translate-x":[{"translate-x":[L]}],"translate-y":[{"translate-y":[L]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ze]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"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]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[xs,Ai,L1]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["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"],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-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},goe=Qre(moe);function Xt(...e){return goe(Fre(e))}var U1={exports:{}},Zn={};var d3;function voe(){if(d3)return Zn;d3=1;var e=Ih();function t(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(u,f,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:m==null?null:""+m,children:u,containerInfo:f,implementation:h}}var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Zn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Zn.createPortal=function(u,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return s(u,f,null,h)},Zn.flushSync=function(u){var f=a.T,h=r.p;try{if(a.T=null,r.p=2,u)return u()}finally{a.T=f,r.p=h,r.d.f()}},Zn.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(u,f))},Zn.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},Zn.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var h=f.as,m=c(h,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:v}):h==="script"&&r.d.X(u,{crossOrigin:m,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Zn.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=c(f.as,f.crossOrigin);r.d.M(u,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(u)},Zn.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,m=c(h,f.crossOrigin);r.d.L(u,h,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Zn.preloadModule=function(u,f){if(typeof u=="string")if(f){var h=c(f.as,f.crossOrigin);r.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(u)},Zn.requestFormReset=function(u){r.d.r(u)},Zn.unstable_batchedUpdates=function(u,f){return u(f)},Zn.useFormState=function(u,f,h){return a.H.useFormState(u,f,h)},Zn.useFormStatus=function(){return a.H.useHostTransitionStatus()},Zn.version="19.2.7",Zn}var f3;function Sz(){if(f3)return U1.exports;f3=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),U1.exports=voe(),U1.exports}var yoe=Sz();const Vd={action:null,nextPrefix:null,preventDefault:!1},boe={b:"goBrief",i:"goInbox",s:"goSent",f:"goFlagged",",":"goSettings"},Soe={j:{action:"focusNext"},k:{action:"focusPrevious"},arrowdown:{action:"focusNext"},arrowup:{action:"focusPrevious"},home:{action:"focusFirst"},end:{action:"focusLast"},enter:{action:"openFocused"}," ":{action:"toggleSelect"},delete:{action:"delete"},backspace:{action:"delete"},u:{action:"toggleRead"},x:{action:"toggleSelect"},r:{action:"reply"},a:{action:"replyAll"},f:{action:"forward"},"#":{action:"delete"},s:{action:"toggleStar"},m:{action:"muteSender"},b:{action:"blockSender"},v:{action:"vipSender"},"!":{action:"markJunk"},i:{action:"toggleIntelligence"},d:{action:"toggleDensity"},"/":{action:"focusSearch"},c:{action:"compose"},"?":{action:"help"}};function Coe(e,t){const n=e.key.toLowerCase(),r=e.metaKey||e.ctrlKey;if(e.inEditable)return{...Vd,nextPrefix:t==="g"?null:t};if(e.onControl&&(n==="enter"||n===" "))return{...Vd,nextPrefix:t==="g"?null:t};if(r&&n==="n")return{action:"compose",nextPrefix:null,preventDefault:!0};if(r&&n==="a")return{action:"selectAll",nextPrefix:null,preventDefault:!0};if(r)return{...Vd,nextPrefix:t==="g"?null:t};if(n==="escape")return{action:"back",nextPrefix:null,preventDefault:!1};if(t==="g"){const a=boe[n===","?",":n]??null;return{action:a,nextPrefix:null,preventDefault:a!==null}}if(n==="g"&&!e.shiftKey)return{action:null,nextPrefix:"g",preventDefault:!0};if(e.shiftKey){const s=n==="j"||n==="arrowdown";if(s||(n==="k"||n==="arrowup"))return{action:s?"extendSelectDown":"extendSelectUp",nextPrefix:null,preventDefault:!0}}const o=Soe[n];if(o){const s=o.requireShift===!0,a=n.length===1&&!/[a-z0-9]/.test(n);return!s&&e.shiftKey&&!a?Vd:{action:o.action,nextPrefix:null,preventDefault:!0}}return Vd}function woe(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable}const Eoe="data-message-row",xoe='button, a[href], summary, [role="button"], [role="menuitem"], [role="tab"], [role="switch"], [role="checkbox"]';function _oe(e){if(!(e instanceof HTMLElement))return!1;const t=e.closest(xoe);return t?!t.hasAttribute(Eoe):!1}const Ioe=["reply","replyAll","forward","delete","toggleStar","toggleRead","muteSender","blockSender","vipSender","markJunk"],Aoe=["focusNext","focusPrevious","focusFirst","focusLast","openFocused","toggleSelect","extendSelectDown","extendSelectUp","selectAll","toggleDensity"],Mn=(e,...t)=>({action:e,requires:t});Mn("help"),Mn("goBrief",{listIsNot:"brief"}),Mn("goFlagged",{listIsNot:"flagged"}),Mn("goInbox",{listIsNot:"inbox"}),Mn("goSent",{listIsNot:"sent"}),Mn("goSettings"),Mn("compose"),Mn("focusSearch"),Mn("toggleIntelligence"),[...Aoe.map(e=>Mn(e,"listVisible")),...Ioe.map(e=>Mn(e,"aimed")),Mn("back","selection")],Mn("focusNext","threadOpen",{not:"listVisible"}),Mn("focusPrevious","threadOpen",{not:"listVisible"}),Mn("reply","threadOpen"),Mn("replyAll","threadOpen"),Mn("forward","threadOpen"),Mn("back");function Roe(e,t){const n=t.at(-1);return n?n.handles.includes(e)?{outcome:"act",target:{kind:"overlay",frame:n}}:{outcome:"contained",by:{kind:"overlay",frame:n}}:null}const Toe="[data-escape-owner]";let su=[],Ooe=0;const Moe=()=>++Ooe;function Cz(){const[e]=_.useState(Moe);return e}const Poe=(e,t)=>e.depth-t.depth;function Noe(){return[...su].sort(Poe).map(e=>({id:e.id,handles:Object.entries(e.run()).filter(([,t])=>t).map(([t])=>t)}))}function koe(){let e;for(const t of su)(!e||t.depth>e.depth)&&(e=t);return e}function yze(e){return Roe(e,Noe())}function Doe(e){if(e.key==="Escape"){const t=document.activeElement;return t instanceof Element&&t.closest(Toe)?null:"back"}return Coe({key:e.key,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,inEditable:woe(e.target),onControl:_oe(e.target)},null).action}function h3(e){const t=koe();if(!t)return;const n=Doe(e);if(!n)return;const r=t.run()[n];r&&(e.preventDefault(),e.stopImmediatePropagation(),r())}function p3(e){const t=su.length===0;if(su=e,t!==(e.length===0)){if(e.length>0){window.addEventListener("keydown",h3,!0);return}window.removeEventListener("keydown",h3,!0)}}function wy({id:e,open:t,answers:n={}}){const r=_.useRef(n);r.current=n;const o=Cz();_.useEffect(()=>{if(!t)return;const s={id:e,depth:o,run:()=>r.current};return p3([...su,s]),()=>{p3(su.filter(a=>a!==s))}},[e,t,o])}const nR="inline-flex items-center justify-center gap-2 rounded-md font-medium whitespace-nowrap transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface disabled:opacity-50 disabled:pointer-events-none",rR={primary:"bg-accent text-accent-fg hover:bg-accent-hover",secondary:"bg-surface text-fg border border-line hover:bg-surface-sunken hover:border-line-strong",ghost:"text-fg-muted hover:bg-surface-sunken hover:text-fg",danger:"bg-danger text-accent-fg hover:opacity-90"},oR={sm:"h-7 px-2.5 text-xs",md:"h-9 px-3.5 text-sm",touch:"h-11 w-11 text-sm"},bze=({variant:e="primary",size:t="md"})=>Xt(nR,rR[e],oR[t]);function Vn({variant:e="primary",size:t="md",icon:n,className:r,children:o,ref:s,...a}){return T.jsxs("button",{type:"button",ref:s,className:Xt(nR,rR[e],oR[t],r),...a,children:[n,o]})}function Loe({variant:e="primary",size:t="md",icon:n,external:r,className:o,children:s,...a}){return T.jsxs("a",{className:Xt(nR,rR[e],oR[t],o),...r?{target:"_blank",rel:"noopener noreferrer"}:{},...a,children:[n,s]})}const Uoe='a[href], button, input, select, textarea, iframe, [tabindex], [contenteditable]:not([contenteditable="false"])';function Foe(e){if(Number(e.getAttribute("tabindex")??0)<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"||e.closest("[inert], [hidden], [aria-hidden='true']"))return!1;const t=getComputedStyle(e);return t.display!=="none"&&t.visibility!=="hidden"}function m3(e){const t=e.querySelectorAll('[role="dialog"][aria-modal="true"]');return[...(t[t.length-1]??e).querySelectorAll(Uoe)].filter(Foe)}const U_=new Set;function $oe(e){for(const t of U_)if(t>e)return!1;return!0}function zoe(e,t){return!(t instanceof HTMLElement)||t===document.body||t===document.documentElement?!1:!e.contains(t)}function Ey(e,t){const n=Cz();_.useEffect(()=>{if(t)return U_.add(n),()=>{U_.delete(n)}},[t,n]),_.useEffect(()=>{if(!t)return;const r=document.activeElement instanceof HTMLElement?document.activeElement:null,o=e.current;return o&&(m3(o)[0]??o).focus(),()=>{r?.isConnected&&r.focus()}},[t,e]),_.useEffect(()=>{if(!t)return;const r=o=>{if(o.key!=="Tab"||o.defaultPrevented||!$oe(n))return;const s=e.current;if(!s)return;const a=document.activeElement;if(zoe(s,a))return;const c=m3(s),u=c[0],f=c.at(-1);if(!u||!f){o.preventDefault(),s.focus();return}const h=a instanceof HTMLElement&&c.includes(a);if(o.shiftKey){(!h||a===u)&&(o.preventDefault(),f.focus());return}(!h||a===f)&&(o.preventDefault(),u.focus())};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[t,e,n])}const joe=({label:e,onDismiss:t,className:n})=>T.jsx("button",{type:"button","aria-label":e,tabIndex:-1,onClick:t,className:Xt("absolute inset-0 bg-canvas/80",n)}),Boe={info:"bg-accent-2/15 text-accent-2 border-accent-2/40",success:"bg-positive/15 text-positive border-positive/40",warning:"bg-warning/15 text-warning border-warning/40",danger:"bg-danger/15 text-danger border-danger/40"},Hoe={info:"bg-surface-sunken text-fg-muted",success:"bg-positive/10 text-positive",warning:"bg-warning/10 text-warning",danger:"bg-danger-soft text-danger"},qoe={info:"status",success:"status",warning:"alert",danger:"alert"};function so({tone:e="info",variant:t="framed",onDismiss:n,role:r,className:o,children:s,...a}){const c=t==="soft";return T.jsxs("div",{role:r??qoe[e],className:Xt("flex gap-2 px-3 py-2 text-sm",c?Xt("items-start rounded-md",Hoe[e]):Xt("items-center border",Boe[e]),o),...a,children:[T.jsx("div",{className:"flex-1 min-w-0",children:s}),n&&(c?T.jsx(Vn,{variant:"ghost",size:"sm",icon:T.jsx(D_,{className:"size-3.5"}),onClick:n,"aria-label":"Dismiss",className:"-mr-1 shrink-0"}):T.jsx("button",{type:"button",onClick:n,"aria-label":"Dismiss",className:"shrink-0 rounded-md p-1 hover:bg-fg/10 transition-colors",children:T.jsx(D_,{className:"size-4","aria-hidden":"true"})}))]})}function g3({open:e,onClose:t,title:n,children:r,className:o,anchor:s="center"}){const a=_.useRef(null);if(wy({id:"dialog",open:e,answers:{back:t}}),Ey(a,e),!e)return null;const c=s==="left",u=s==="right";return T.jsxs("div",{className:Xt("fixed inset-0 z-50 flex",c?"items-stretch justify-start":u?"items-stretch justify-end":"items-center justify-center px-4"),children:[T.jsx(joe,{label:"Dismiss dialog",onDismiss:t}),T.jsxs("div",{ref:a,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title",tabIndex:-1,className:Xt("relative z-10 overflow-hidden border-line bg-surface shadow-xl",c?"safe-area-frame h-full w-72 max-w-[85vw] border-r":u?"safe-area-frame h-full w-[80vw] max-w-[320px] border-l":"w-full max-w-lg rounded-md border",o),children:[T.jsx("h2",{id:"dialog-title",className:"sr-only",children:n}),r]})]})}function wz({children:e,label:t}){return T.jsxs("span",{className:"relative inline-flex",children:[e,t!==void 0&&T.jsxs(T.Fragment,{children:[T.jsx("span",{"data-testid":"attention-dot",className:"absolute -right-1 -top-1 size-2 rounded-full bg-accent-2"}),T.jsx("span",{className:"sr-only",children:t})]})]})}function xy({children:e,className:t}){return T.jsx("div",{"data-auth-page":!0,className:Xt("flex min-h-dvh w-full flex-col items-center justify-center overflow-y-auto bg-surface-sunken pb-[max(2rem,env(safe-area-inset-bottom,0px))] pl-[max(1rem,env(safe-area-inset-left,0px))] pr-[max(1rem,env(safe-area-inset-right,0px))] pt-[max(2rem,env(safe-area-inset-top,0px))] text-fg",t),style:{backgroundImage:"radial-gradient(at 20% 0%, color-mix(in oklch, var(--accent) 8%, transparent) 0px, transparent 50%), radial-gradient(at 80% 100%, color-mix(in oklch, var(--accent) 8%, transparent) 0px, transparent 50%)"},children:T.jsx("div",{className:"w-full max-w-[26rem]",children:e})})}const Voe="Secure sign-in powered by AWS Cognito";function sR(e){const t=e?.note??"Secure sign-in";return T.jsx("div",{className:"text-center pt-5",children:T.jsx("p",{className:"text-xs text-fg-muted",children:t})})}const Woe=()=>T.jsxs("svg",{width:"36",height:"36",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"text-accent",children:[T.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),T.jsx("path",{d:"M3 7l9 6 9-6"})]});function _y({wordmark:e="remit,",tagline:t="your email client in the cloud.",mark:n=T.jsx(Woe,{})}){return T.jsxs("div",{className:"text-center pb-6",children:[T.jsx("div",{className:"flex items-center justify-center pb-3",children:n}),T.jsx("h1",{className:"text-[1.75rem] font-semibold tracking-[-0.01em] text-fg",children:e}),T.jsx("p",{className:"mt-1 text-sm text-fg-muted",children:t})]})}const Goe={default:Xt("flex h-9 items-center gap-2 rounded-md border border-line bg-surface-sunken px-3 text-sm","focus-within:border-line-strong focus-within:ring-2 focus-within:ring-ring/30 transition-colors"),inline:"flex items-center gap-2 bg-transparent text-sm"};function jf({icon:e,className:t,variant:n="default",trailing:r,ref:o,...s}){return T.jsxs("div",{className:Xt(Goe[n],t),children:[e&&T.jsx("span",{className:"text-fg-subtle shrink-0",children:e}),T.jsx("input",{ref:o,className:"min-w-0 flex-1 bg-transparent text-fg placeholder:text-fg-subtle outline-none",...s}),r]})}const Koe={info:"bg-accent-2",success:"bg-positive",warning:"bg-warning",danger:"bg-danger"};function F1({value:e,max:t,tone:n="info",indeterminate:r=!1,className:o}){const s=r?100:t<=0?0:Math.min(100,Math.max(0,e/t*100));return T.jsx("div",{role:"progressbar","aria-valuenow":r?void 0:e,"aria-valuemin":r?void 0:0,"aria-valuemax":r?void 0:t,className:Xt("h-1.5 w-full overflow-hidden rounded-full bg-surface-sunken",o),children:T.jsx("div",{className:Xt("h-full rounded-full transition-[width] duration-300 ease-out",Koe[n],r&&"w-1/3 animate-pulse"),style:r?void 0:{width:`${s}%`}})})}const Ez={DmarcFail:"It failed the sender domain's DMARC check.",DkimDmarcFail:"The sender's domain did not sign it, and its authentication failed.",SignerMismatch:"It was signed by a different domain than its sender.",ReplyToMismatch:"Replies would go to a different domain than the sender's.",LinkTextMismatch:"A link's text shows one domain and opens another.",LinkDomainDistant:"A link leads to a domain unrelated to the sender's.",PunycodeDomain:"A domain in it is written in punycode, which can hide lookalike letters.",MixedScriptDomain:"A domain in it mixes letters from different alphabets.",ConfusableDomains:"Two different domains in it look the same.",SingleOffDomainLink:"Its only link leads away from the sender's domain.",GeneratedName:"The sender's address looks machine-generated.",FirstContactDomain:"The sender's domain has sent you nothing before.",RecentlyRegisteredDomain:"The sender's domain was registered recently.",UnknownRegistrationDate:"The sender's domain has no public registration date.",ClassifierSpam:"Remit's classifier rated it as likely spam.",ClassifierPhishing:"Remit's classifier rated it as likely phishing.",ProviderSpam:"Your provider marked it as spam.",DisplayNameForeignAddress:"The display name spells out an address at another domain.",DisplayNameLookalike:"The display name looks like a different domain's name.",ModelImpersonation:"The model judged that it claims an organisation its sender does not belong to.",ModelSpam:"The model judged it spam.",ModelClean:"The model judged it legitimate.",ListedPhishingLink:"A link in it is on a list of known phishing pages."},Zoe=new Set(["ModelImpersonation","ModelSpam","ModelClean"]),Yoe=e=>Zoe.has(e.name),Qoe="Remit ran a check this version can't describe.",Sze="Remit couldn't check this message",Cze="Only the basic checks ran",Joe=e=>Object.hasOwn(Ez,e);function Xoe(e){return Joe(e)?Ez[e]:void 0}function ese(e){return e.reduce((t,n)=>t&&t.score>=n.score?t:n,void 0)}function wze(e){const t=ese(e);return t?Xoe(t.name)??Qoe:""}function Eze(e){if(e.modelOutcome!=="Answered")return;const t=e.reasons.find(Yoe);if(!(!t||t.options.length===0))return t.options.join(" ")}const tse={NotConfigured:"this account has no model set up.",DailyLimit:"this account reached its daily model limit.",RateLimited:"the model provider asked Remit to slow down."};function xze(e){const t=e.modelOutcome;if(!(t==="Answered"||t==="OutOfBand"))return tse[t]}const _ze={Unreachable:"the spam service could not be reached",TimedOut:"the spam service did not answer in time",ServiceError:"the spam service answered with an error",Unparseable:"Remit could not read the spam service's answer"},xz={RateLimited:"try again in a minute.",DailyCap:"try again tomorrow (daily model limit).",NotSettled:"a move is still settling. Remit will retry it once the move lands.",NotFound:"the message is gone from the server. No retry for this one.",NotPermitted:"the server refused access to this message. No retry for this one."},Ize={NeverSpam:"You marked this sender Never in Spam.",Vip:"This sender is a VIP.",WellKnown:"You know this sender well.",Newsletter:"It is a newsletter from a sender you already get mail from."},Aze=e=>`Your filter "${e}" matched it.`,Rze={Spam:"Remit suspects this is spam",Phishing:"Remit suspects this message impersonates someone"},xm=e=>e.toFixed(2),Tze=(e,t)=>t.state==="Set"?`Score ${xm(e)}. Remit warns from ${xm(t.cleanBelow)} and moves to Spam from ${xm(t.spamAt)}.`:`Score ${xm(e)}. The spam service applies its own thresholds.`;function nse(e){const t=[e.nowSpam>0&&`${e.nowSpam} now reach Spam`,e.nowSuspected>0&&`${e.nowSuspected} ${e.nowSuspected===1?"is":"are"} now suspected`,e.noLongerSuspected>0&&`${e.noLongerSuspected} ${e.noLongerSuspected===1?"is":"are"} no longer suspected`].filter(o=>typeof o=="string"),n=e.nowSpam+e.nowSuspected+e.noLongerSuspected,r=e.nowSpam>0?"Nothing moved. Open a message to move it to Spam.":"Nothing moved.";return n===0?`Nothing changed. ${r}`:`${n} changed: ${t.join(", ")}. ${r}`}const $1=e=>t=>{t.key==="Escape"&&(t.stopPropagation(),e())};function z1({children:e,onKeyDown:t}){return T.jsx("section",{"aria-label":"Check again",onKeyDown:t,className:"w-full max-w-md space-y-3 rounded-lg border border-line bg-surface p-4 text-sm shadow-lg",children:e})}function rse(e){const t=_.useRef(null),{state:n}=e;if(_.useEffect(()=>{t.current?.focus()},[n]),e.state==="Running")return T.jsxs(z1,{onKeyDown:$1(e.onStop),children:[T.jsx("p",{"aria-live":"polite",className:"font-semibold text-fg tabular-nums",children:`Checked ${e.checked} of ${e.total}`}),T.jsx(F1,{value:e.checked,max:e.total}),T.jsx("p",{className:"text-fg-muted",children:"Remit sends ten at a time and waits for each answer. Keep this page open until it finishes."}),T.jsx(Vn,{ref:t,variant:"secondary",size:"md",onClick:e.onStop,children:"Stop"})]});if(e.state==="Done")return T.jsxs(z1,{onKeyDown:$1(e.onDone),children:[T.jsx("p",{"aria-live":"polite",className:"font-semibold text-fg tabular-nums",children:`Checked ${e.total} of ${e.total}`}),T.jsx(F1,{value:e.total,max:e.total,tone:"success"}),T.jsx("p",{className:"text-fg-muted",children:nse(e.summary)}),T.jsx(Vn,{ref:t,variant:"primary",size:"md",onClick:e.onDone,children:"Done"})]});const r=e.failures.filter(o=>o.retryable).length;return T.jsxs(z1,{onKeyDown:$1(e.onClose),children:[T.jsx("p",{"aria-live":"polite",className:"font-semibold text-fg tabular-nums",children:`Checked ${e.checked} of ${e.total}. ${e.failures.length} couldn't be checked.`}),T.jsx(F1,{value:e.checked,max:e.total,tone:"warning"}),T.jsx("ul",{className:"list-disc space-y-1 pl-4 text-fg-muted marker:text-fg-subtle",children:e.failures.map(o=>T.jsxs("li",{children:[T.jsx("span",{className:"text-fg",children:o.subject}),":"," ",xz[o.code]]},o.messageId))}),T.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r>0&&T.jsx(Vn,{ref:t,variant:"primary",size:"md",onClick:e.onRetry,children:`Try again for ${r}`}),T.jsx(Loe,{variant:"ghost",size:"md",href:e.reportIssueHref,external:!0,children:"Report an issue"}),T.jsx(Vn,{ref:r>0?void 0:t,variant:"secondary",size:"md",onClick:e.onClose,children:"Close"})]})]})}const ose={error:{container:"border-danger/50 bg-danger-soft",icon:"text-danger",title:"text-danger"},warning:{container:"border-warning/50 bg-warning-soft",icon:"text-warning",title:"text-warning"},info:{container:"border-accent-2/50 bg-accent-2-soft",icon:"text-accent-2",title:"text-accent-2"}},sse={error:$$,warning:eR,info:_re},ise={error:"Error",warning:"Warning",info:"Information"},ase=({id:e,severity:t,title:n,detail:r,action:o,onRetry:s,onDismiss:a})=>{const c=ose[t],u=sse[t];return T.jsxs("div",{role:t==="error"?"alert":"status","aria-live":t==="error"?"assertive":"polite",className:Xt("pointer-events-auto flex items-start gap-3 rounded-md border bg-canvas px-3 py-2 shadow-lg",c.container),children:[T.jsx(u,{className:Xt("size-5 shrink-0 mt-0.5",c.icon),"aria-hidden":"true"}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsx("p",{className:Xt("text-sm font-medium",c.title),children:n}),r&&T.jsx("p",{className:"mt-0.5 text-xs text-fg-muted break-words",children:r}),(s||o)&&T.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-4 gap-y-1",children:[s&&T.jsx(Vn,{variant:"secondary",size:"sm",onClick:()=>{a(e),s()},children:"Try again"}),o&&T.jsx("a",{href:o.href,target:"_blank",rel:"noopener noreferrer",className:"inline-block text-xs font-medium text-accent-2 underline underline-offset-2",children:o.label})]})]}),T.jsx("button",{type:"button",onClick:()=>a(e),className:"shrink-0 rounded-md p-1 text-fg-muted hover:bg-surface-raised hover:text-fg transition-colors","aria-label":`Dismiss ${ise[t].toLowerCase()}`,children:T.jsx(D_,{className:"size-4","aria-hidden":"true"})})]})},lse=({errors:e,onDismiss:t})=>e.length===0?null:T.jsx("section",{"aria-label":"Notifications",className:"pointer-events-none fixed inset-x-0 top-0 z-[60] flex flex-col items-center gap-2 px-4 pt-[calc(1rem+env(safe-area-inset-top,0px))] sm:items-end sm:pr-6",children:T.jsx("div",{className:"flex w-full max-w-md flex-col gap-2",children:e.map(n=>T.jsx(ase,{id:n.id,severity:n.severity,title:n.title,detail:n.detail,action:n.action,onRetry:n.onRetry,onDismiss:t},n.id))})});function cse({className:e,children:t,...n}){return T.jsx("label",{className:Xt("mb-1 block text-xs font-medium text-fg-muted",e),...n,children:t})}const use="Matches on what the messages say about themselves — sender, subject, list. No reading involved.",dse={From:"From",Subject:"Subject",HasWords:"Has the words",ListId:"List",FromDomain:"Domain"};function fse(e){return dse[e]}const hse={ListId:"The mailing list's List-Id header, matched exactly. New mail is matched as it arrives — mail delivered before this was set up may not carry it yet.",FromDomain:"The sender's registrable domain — matches anyone at it, subdomains included (a look-alike like example.com.evil.test never matches)."};function Oze(e){return hse[e]}function pse(e){return e==="HasWords"}function _z(e){return e.clauses.length>0}function Iz(e){return e.clauses.filter(t=>pse(t.field))}const Mze=["From","Subject","HasWords","ListId","FromDomain"],mse={all:"Match all",any:"Match any"};function Pze(e){return mse[e]}function gse(e){return e==="all"?"and":"or"}function Nze(e){if(e.status==="loading")return"Counting matches…";if(e.status==="error")return e.reason;if(e.count===0)return"No mail matches yet";const t=e.count===1?"message":"messages",n=`${e.count} ${t} match`;return e.stale?`${n} — recounting`:n}const vse={once:"Just once",standing:"Keep doing this",until:"Until a date"};function kze(e){return vse[e]}function Dze(e){return e==="once"?"Apply now":e==="standing"?"Save rule":"Save until then"}const ro={noMatch:"Add a clause so the rule has something to match.",bodyTextOnce:"Applying once can't read message bodies. Save this as a rule instead, or drop the “has the words” clause.",noAction:"Pick a folder to move into, or a label to apply.",unnamed:"Name this rule so you can find it later.",noUntilDate:"Pick the date this rule should stop on.",counting:"Counting matches — save once the count settles.",recounting:"Recounting matches — save once the count settles."},Lze="Can't count matches — “has the words” reads message bodies, which only a saved rule does.";function Az(e){if(e.status==="loading")return ro.counting;if(e.status==="ready"&&e.stale)return ro.recounting}function Uze(e,t){return _z(e)?e.scope==="once"&&Iz(e).length>0?ro.bodyTextOnce:!e.moveMailboxId&&!e.labelId?ro.noAction:(e.scope==="standing"||e.scope==="until")&&(e.name??"").trim()===""?ro.unnamed:e.scope==="until"&&!e.until?ro.noUntilDate:Az(t):ro.noMatch}const iR=(e,t)=>t.length===0?[e]:e.split(t),yse=(e,t)=>{const n=iR(e,t);return n[n.length-1]||e},Bf=(e,t)=>{if(t.length===0)return"";const n=e.lastIndexOf(t);return n===-1?"":e.slice(0,n)},bse=(e,t)=>iR(e,t).length-1,Hf=(e,t)=>{const n=[];let r=e,o=Bf(r,t);for(;o&&o.length<r.length;)n.push(o),r=o,o=Bf(r,t);return n},Sse=(e,t)=>{const n=new Set(e.map(a=>a.path)),r=new Set,o=[],s=a=>{if(!r.has(a.path)){r.add(a.path),o.push(a);for(const c of e)Bf(c.path,t)===a.path&&s(c)}};for(const a of e){const c=Bf(a.path,t);c&&n.has(c)||s(a)}return o},Rz=(e,t)=>e.label.toLowerCase().includes(t)||e.path.toLowerCase().includes(t),Cse=(e,t,n)=>{const r=new Set;if(!t)return r;for(const o of e)if(Rz(o,t))for(const s of Hf(o.path,n))r.add(s);return r},wse=(e,t,n,r=new Set)=>{const o=(c,u)=>({folder:c,depth:bse(c.path,n),context:u,expanded:r.has(c.path)});if(!t)return e.map(c=>o(c,!1));const s=new Set;for(const c of e)Rz(c,t)&&s.add(c.path);const a=new Set(s);for(const c of s)for(const u of Hf(c,n))a.add(u);return e.filter(c=>a.has(c.path)).map(c=>o(c,!s.has(c.path)))},Ese=(e,t,n)=>{const r=new Set(e.map(o=>o.path));return e.flatMap(o=>{const s=Hf(o.path,n).filter(a=>r.has(a));return s.every(a=>t.has(a))?[{folder:o,depth:s.length,context:!1,expanded:t.has(o.path)}]:[]})},xse=(e,t)=>{if(t.length===0)return e.map((s,a)=>({kind:"folder",row:s,index:a}));const n=[],r=[],o=s=>{for(;r.length>0;){const a=r[r.length-1];if(!a||s?.startsWith(`${a.folder.path}${t}`))break;r.pop(),n.push({kind:"create",parent:a.folder,depth:a.depth+1})}};return e.forEach((s,a)=>{o(s.folder.path),n.push({kind:"folder",row:s,index:a}),s.expanded&&r.push(s)}),o(null),n},_se=e=>typeof e=="object"&&e!==null&&"name"in e&&e.name==="AbortError",Ho=e=>e!==void 0&&!e.context,j1=e=>e!==void 0&&!e.folder.isCurrent&&!e.context,B1=e=>{for(let t=0;t<e.length;t+=1)if(Ho(e[t]))return t;return-1},Ise=e=>{for(let t=e.length-1;t>=0;t-=1)if(Ho(e[t]))return t;return-1},v3=(e,t,n)=>{const r=e.length;if(r<=0)return-1;const o=t<0?n===1?-1:r:t;for(let s=1;s<=r;s+=1){const a=((o+n*s)%r+r)%r;if(Ho(e[a]))return a}return-1},Ase=(e,t,n)=>{const r=e[t];if(!r)return-1;const o=Bf(r.folder.path,n);if(!o)return-1;for(let s=t-1;s>=0;s-=1)if(e[s]?.folder.path===o)return Ho(e[s])?s:-1;return-1},F_="flex min-h-11 min-w-0 flex-1 items-center gap-2 px-3 py-2.5 text-left text-sm transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",Tz=14,Rse=60,$_=({depth:e})=>e>0?T.jsx("span",{"aria-hidden":"true",className:"shrink-0",style:{width:e*Tz}}):null,z_=({depth:e})=>T.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute right-0 bottom-0 h-px bg-line",style:{left:Rse+e*Tz}}),Tse=({label:e,depth:t,expanded:n,ariaLabel:r,selected:o=!1,context:s=!1,current:a=!1,currentTag:c,messageCount:u,failure:f,separated:h=!1,actions:m,tabIndex:g,onActivate:v,onFocus:C,ref:b})=>{const E=T.jsx(vre,{className:Xt("size-4 shrink-0 text-fg-subtle transition-transform",n&&"rotate-90"),"aria-hidden":"true"}),x=T.jsx(Cre,{className:"size-4 shrink-0 text-fg-subtle","aria-hidden":"true"}),I=u===void 0?null:T.jsxs("span",{"aria-hidden":"true",className:"shrink-0 text-2xs text-fg-subtle",children:[u," ",u===1?"msg":"msgs"]}),R=T.jsxs("span",{className:"min-w-0 flex-1",children:[T.jsx("span",{className:"block truncate",children:e}),f&&T.jsxs("span",{className:"flex items-center gap-1 text-2xs text-danger",children:[T.jsx($$,{className:"size-3 shrink-0","aria-hidden":"true"}),T.jsx("span",{className:"truncate",children:f})]})]}),O=f?`${r} — ${f}`:r;return s?T.jsxs("div",{className:"relative flex items-center",children:[T.jsxs("div",{role:"treeitem","aria-level":t+1,"aria-selected":!1,"aria-expanded":n,"aria-label":O,className:Xt(F_,"opacity-60"),children:[T.jsx($_,{depth:t}),E,x,R,I]}),m,h&&T.jsx(z_,{depth:t})]}):T.jsxs("div",{className:"relative flex items-center",children:[T.jsxs("button",{ref:b,type:"button",role:"treeitem","aria-level":t+1,"aria-selected":o,"aria-expanded":n,"aria-current":a?"true":void 0,"aria-label":O,tabIndex:g,onClick:v,onFocus:C,className:Xt(F_,"hover:bg-surface-raised active:bg-surface-sunken",a&&"text-fg-muted"),children:[T.jsx($_,{depth:t}),E,x,R,I,a&&c&&T.jsx("span",{className:"shrink-0 text-xs text-fg-muted",children:c}),o&&T.jsx(L$,{className:"size-4 shrink-0 text-accent","aria-hidden":"true"})]}),m,h&&T.jsx(z_,{depth:t})]})},y3=({label:e,ariaLabel:t,depth:n=0,prominence:r="prominent",separated:o=!1,onOpen:s})=>T.jsxs("div",{className:Xt("relative",r==="prominent"&&"p-2"),children:[T.jsxs("button",{type:"button",onClick:s,"aria-label":t,"data-prominence":r,className:Xt(F_,"w-full active:bg-surface-sunken",r==="prominent"?"rounded-lg border border-line-strong border-dashed font-medium text-fg-muted hover:border-accent-2 hover:text-accent-2":"text-fg-subtle hover:bg-surface-raised hover:text-fg-muted"),children:[T.jsx($_,{depth:n}),T.jsx("span",{"aria-hidden":"true",className:"size-4 shrink-0"}),T.jsx(wre,{className:"size-4 shrink-0","aria-hidden":"true"}),T.jsx("span",{className:"min-w-0 flex-1 truncate",children:e})]}),o&&T.jsx(z_,{depth:n})]}),Oz={nameLabel:"Folder name",namePlaceholder:"Hotels",insideLabel:"Inside",create:"Create folder",cancel:"Cancel",createPending:"Creating folder…"},Ose=({parentLabel:e,name:t,onNameChange:n,onSubmit:r,onCancel:o,pending:s=!1,error:a,labels:c})=>{const u={...Oz,...c},f=_.useId(),h=_.useRef(null),m=_.useRef(null);return _.useEffect(()=>{h.current?.focus({preventScroll:!0}),m.current?.scrollIntoView({block:"nearest"})},[]),T.jsxs("div",{ref:m,className:"space-y-3 border-y border-line bg-surface-sunken px-3 py-3",children:[T.jsxs("div",{children:[T.jsx(cse,{htmlFor:f,children:u.nameLabel}),T.jsx(jf,{id:f,ref:h,value:t,placeholder:u.namePlaceholder,onChange:g=>n(g.target.value),onKeyDown:g=>{g.key==="Enter"&&(g.preventDefault(),r()),g.key==="Escape"&&(g.preventDefault(),o())}})]}),T.jsxs("p",{className:"text-xs text-fg-muted",children:[u.insideLabel," ",T.jsx("span",{className:"font-medium text-fg",children:e})]}),a&&T.jsx("p",{className:"text-xs text-danger",role:"alert",children:a}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx(Vn,{variant:"ghost",size:"md",onClick:o,className:"min-h-11 shrink-0",children:u.cancel}),T.jsx(Vn,{variant:"secondary",size:"md",onClick:r,disabled:s,className:"min-h-11 shrink-0",children:s?u.createPending:u.create})]})]})},Mse={...Oz,filterPlaceholder:"Filter folders…",filterAriaLabel:"Filter folders",treeAriaLabel:"Destination folders",currentSuffix:"(current folder)",currentTag:"current",contextSuffix:"(containing folder)",emptyMessage:e=>`No folders match "${e}"`,noFolders:"No folders to show",optionLabel:e=>`Move to ${e.label}`,newFolder:"New folder",newSubfolder:e=>`New folder inside ${e}`,topLevel:"Top level",nameRequired:"Give the folder a name.",createError:"Couldn't create that folder. Please try again."},Pse=({folders:e,selectedId:t,onSelect:n,rowActions:r,rowFailure:o,onCreateFolder:s,onCancel:a,delimiter:c="/",labels:u,autoFocusFilter:f=!1})=>{const h={...Mse,...u},[m,g]=_.useState(""),[v,C]=_.useState(()=>{const le=e.find(Re=>Re.id===t);return new Set(le?Hf(le.path,c):[])}),[b,E]=_.useState(null),[x,I]=_.useState(""),[R,O]=_.useState(),[D,N]=_.useState(!1),[M,L]=_.useState(-1),$=_.useRef([]),G=_.useRef(null),j=_.useRef(!1),F=_.useRef(null);_.useEffect(()=>()=>F.current?.abort(),[]),_.useEffect(()=>{f&&G.current?.focus()},[f]);const q=m.trim().toLowerCase(),J=_.useMemo(()=>Sse(e,c),[e,c]),Se=_.useMemo(()=>{const le=Cse(J,q,c);return le.size===0?v:new Set([...v,...le])},[J,v,q,c]),V=_.useMemo(()=>q?wse(J,q,c,Se):Ese(J,Se,c),[J,q,c,Se]),ee=_.useMemo(()=>s?xse(V,c):void 0,[V,c,s]);_.useEffect(()=>{L(le=>Ho(V[le])?le:B1(V))},[V]),_.useEffect(()=>{j.current&&(j.current=!1,!(M<0)&&$.current[M]?.focus())},[M]);const me=_.useCallback((le,Re)=>{C(rt=>{if(Re)return new Set([...Hf(le,c),le]);const xe=new Set(rt);return xe.delete(le),xe})},[c]),ge=_.useCallback(le=>{j1(le)&&n?.(le.folder.id),me(le.folder.path,!le.expanded)},[n,me]),Te=_.useCallback(()=>{F.current?.abort(),E(null),I(""),O(void 0),N(!1)},[]),z=_.useCallback(le=>{F.current?.abort(),E({anchorId:le?.id??null,parentPath:le?.path??"",parentLabel:le?.label??h.topLevel}),I(""),O(void 0),N(!1)},[h.topLevel]),te=_.useCallback(()=>{if(!s||!b||D)return;const le=x.trim();if(le===""){O(h.nameRequired);return}N(!0),O(void 0),F.current?.abort();const Re=new AbortController;F.current=Re;const rt=b.parentPath;s(le,rt,Re.signal).then(xe=>{N(!1),E(null),I(""),rt&&me(rt,!0),n?.(xe.id)}).catch(xe=>{_se(xe)||(O(xe instanceof Error?xe.message:h.createError),N(!1))})},[s,b,D,x,n,me,h.nameRequired,h.createError]),fe=_.useCallback(le=>{const Re=le.target;if(!(Re instanceof Element)||!Re.closest('[role="treeitem"]'))return;const rt=xt=>{le.preventDefault(),j.current=!0,L(xt)},xe=V[M];switch(le.key){case"ArrowDown":return rt(v3(V,M,1));case"ArrowUp":return rt(v3(V,M,-1));case"Home":return rt(B1(V));case"End":return rt(Ise(V));case"ArrowRight":{if(!Ho(xe)||!xe)return;if(le.preventDefault(),!xe.expanded){me(xe.folder.path,!0);return}const xt=M+1;Ho(V[xt])&&rt(xt);return}case"ArrowLeft":{if(!Ho(xe)||!xe)return;if(le.preventDefault(),xe.expanded){me(xe.folder.path,!1);return}const xt=Ase(V,M,c);xt>=0&&rt(xt);return}case"Enter":case" ":{if(!Ho(xe)||!xe)return;le.preventDefault(),ge(xe);return}case"Escape":le.preventDefault(),a?.();return;default:return}},[V,M,c,ge,me,a]),ae=b!==null&&b.anchorId!==null&&(ee?.some(le=>le.kind==="create"&&le.parent.id===b.anchorId)??!1),be=b&&T.jsx(Ose,{parentLabel:b.parentLabel,name:x,onNameChange:le=>{I(le),O(void 0)},onSubmit:te,onCancel:Te,pending:D,error:R,labels:h}),Fe=le=>le.context?`${le.folder.label} ${h.contextSuffix}`:j1(le)?h.optionLabel(le.folder):`${le.folder.label} ${h.currentSuffix}`,ke=(le,Re,rt)=>{const{folder:xe,depth:xt}=le,_t=j1(le);return T.jsx(Tse,{ref:ot=>{$.current[Re]=ot},label:xe.label,depth:xt,expanded:le.expanded,context:le.context,current:xe.isCurrent,currentTag:h.currentTag,messageCount:xe.messageCount,selected:_t&&xe.id===t,separated:rt,failure:o?.(xe),actions:r?.(xe),ariaLabel:Fe(le),tabIndex:Re===M?0:-1,onActivate:()=>ge(le),onFocus:()=>L(Re)})};return T.jsxs("div",{className:"flex min-h-0 w-full min-w-0 flex-col",children:[T.jsx(jf,{ref:G,variant:"inline",className:"border-b border-line px-3 py-2",icon:T.jsx(Rre,{className:"size-4","aria-hidden":"true"}),type:"search",value:m,onChange:le=>g(le.target.value),onKeyDown:le=>{if(le.key==="Escape"){le.preventDefault(),a?.();return}if(le.key!=="ArrowDown")return;le.preventDefault();const Re=Ho(V[M])?M:B1(V);Re<0||(j.current=!0,L(Re),$.current[Re]?.focus())},placeholder:h.filterPlaceholder,"aria-label":h.filterAriaLabel}),s&&T.jsx("div",{className:"shrink-0 border-b border-line","data-create-anchor":"top",children:b&&!ae?be:T.jsx(y3,{label:h.newFolder,ariaLabel:h.newFolder,prominence:"prominent",onOpen:()=>z(null)})}),V.length===0?T.jsx("p",{className:"px-3 py-3 text-sm text-fg-muted","aria-live":"polite",children:e.length===0?h.noFolders:h.emptyMessage(m)}):T.jsx("div",{role:"tree","aria-label":h.treeAriaLabel,className:"min-h-0 flex-1 overflow-y-auto overflow-x-hidden pb-24",onKeyDown:fe,children:(ee??V.map((le,Re)=>({kind:"folder",row:le,index:Re}))).map((le,Re,rt)=>{const xe=Re<rt.length-1;return le.kind==="create"?T.jsx("div",{role:"none","data-create-anchor":le.parent.id,children:b?.anchorId===le.parent.id?be:T.jsx(y3,{label:h.newFolder,ariaLabel:h.newSubfolder(le.parent.label),depth:le.depth,prominence:"quiet",separated:xe,onOpen:()=>z(le.parent)})},`new:${le.parent.id}`):T.jsx("div",{role:"none",children:ke(le.row,le.index,xe)},le.row.folder.id)})})]})},Nse={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Spam",trash:"Trash",flagged:"Starred",all:"All Mail"};function kse(e){return Nse[e]}const Dse=new Set(["all","flagged"]);function Lse(e){return Dse.has(e)}const Use=new Set(["[Gmail]","[Google Mail]"]);function Fse(e){if(e.role)return Lse(e.role)?void 0:kse(e.role);if(!e.providerPath)return;const t=iR(e.providerPath,e.hierarchyDelimiter);if(!Use.has(t[0]))return yse(e.providerPath,e.hierarchyDelimiter)}function Fze(e){return e==="inbox"?T.jsx(K$,{className:"size-4"}):e==="drafts"?T.jsx(Sre,{className:"size-4"}):e==="sent"?T.jsx(Tre,{className:"size-4"}):e==="archive"?T.jsx(mre,{className:"size-4"}):e==="junk"?T.jsx(XA,{className:"size-4"}):e==="trash"?T.jsx(kre,{className:"size-4"}):e==="flagged"?T.jsx(Pre,{className:"size-4"}):T.jsx(Ire,{className:"size-4"})}const $se={Inbox:"Inbox",Drafts:"Drafts",Sent:"Sent",Archive:"Archive",Junk:"Junk",Trash:"Trash",All:"All",Flagged:"Flagged"},$ze={Body:"Body"},zze={Mail:"Mail",Calendar:"Calendar"},yc={Appointed:"Appointed",Flagged:"Flagged",Reserved:"Reserved",Proposed:"Proposed",Stale:"Stale",None:"None"},Va={SignInDisabled:"sign_in_disabled",CallerDisabled:"caller_disabled",ForeignOrigin:"foreign_origin",StepUpRequired:"step_up_required",WrongPassword:"wrong_password",StepUpLocked:"step_up_locked",CannotDisableSelf:"cannot_disable_self"},b3={synced:"synced",failed:"failed"},jze={Saved:"Saved",Deployment:"Deployment",Default:"Default"},Bze={NoBaseUrl:"NoBaseUrl",NoApiKey:"NoApiKey"},Hze={uncategorized:"uncategorized",personal:"personal",newsletter:"newsletter",marketing:"marketing",automated:"automated",transactional:"transactional",social:"social",coldOutreach:"coldOutreach"},qze={abandoned:"abandoned"},Vze={none:"none",move:"move",delete:"delete"},Wze={MoveToInbox:"MoveToInbox",MoveToJunk:"MoveToJunk"},Gze={Confident:"Confident",Unsure:"Unsure"},Kze={Attachment:"attachment"},Zze={None:"None"},Yze={Retrying:"Retrying",GaveUp:"GaveUp"};function Mz(e){const[t,n]=_.useState(!1),r=t?bre:yre,o=t?"Hide password":"Show password";return T.jsx(jf,{...e,type:t?"text":"password",trailing:T.jsx("button",{type:"button","aria-label":o,"aria-pressed":t,title:o,onClick:()=>n(s=>!s),className:"-my-1 -mr-2 flex size-11 shrink-0 cursor-pointer items-center justify-center rounded-md text-fg-subtle transition-colors hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:T.jsx(r,{className:"size-4","aria-hidden":!0})})})}const zse=e=>e===1?"message":"messages",lv=e=>`${e.toLocaleString()} ${zse(e)}`,H1=(e,t)=>e.kind==="delete"?`delete ${lv(e.count)}`:t===void 0?"empty it":`empty ${lv(t)}`,Pz=e=>e.kind==="delete"?"Nothing has been deleted.":"Nothing has been emptied.",jse=(e,t,n={})=>{const{trashFolderLabel:r,staleFolderLabel:o,selectedCount:s}=n,a=Pz(t);if(e==="none")return{title:"No folder is set as Trash",description:`${a} reader files deleted mail in the folder you set as Trash, and this account has none.`,pickerPrompt:"Which folder does this account use for deleted mail?",confirmLabel:`Set as Trash and ${H1(t,void 0)}`,cancelLabel:"Cancel"};if(e==="stale")return{title:"The Trash folder you chose is gone",description:o?`${a} You set ${o} as this account's Trash and it is no longer on the mail server — another mail app may have renamed or removed it.`:`${a} The folder you set as this account's Trash is no longer on the mail server — another mail app may have renamed or removed it.`,pickerPrompt:"Which folder should reader use instead?",confirmLabel:`Set as Trash and ${H1(t,void 0)}`,cancelLabel:"Cancel"};const c=t.kind==="delete"?`Deleting ${lv(t.count)} there erases them from the mail server, and that cannot be restored.`:"Emptying a folder erases everything in it from the mail server, and that cannot be restored.";return{title:"Confirm this account's Trash folder",description:r?`${a} reader files this account's deleted mail in ${r} because of its name — you never chose it, and the mail server doesn't mark it as Trash. ${c}`:`${a} reader files this account's deleted mail in a folder it matched by name — you never chose it, and the mail server doesn't mark it as Trash. ${c}`,pickerPrompt:r?`Confirm ${r}, or pick the folder this account really uses.`:"Pick the folder this account really uses for deleted mail.",confirmLabel:`Set as Trash and ${H1(t,s)}`,cancelLabel:"Cancel"}},Bse=(e,t,n,r)=>e.kind==="appointing"?{headline:"Setting the Trash folder…",status:n}:t.kind==="delete"?{headline:`Deleting ${lv(t.count)}…`,status:r?`Erasing them from ${n}. This can't be undone.`:`Moving them to ${n}`}:{headline:`Emptying ${n}…`,status:"This can't be undone."},Hse=(e,t,n,r)=>e==="unconfirmed"&&t.kind==="delete"&&n!==void 0&&r===n,qse=(e,t,n)=>e==="mailbox-pending"?`${n} is still being created on the mail server. Wait for it to finish, then try again.`:`Couldn't set that folder as Trash. ${Pz(t)} Please try again.`,Vse=({open:e,reason:t,action:n,folders:r,delimiter:o,trashFolderLabel:s,guessedMailboxId:a,staleFolderLabel:c,accountEmail:u,phase:f,selectedId:h,onSelect:m,onCreateFolder:g,onConfirm:v,onCancel:C})=>{const b=_.useRef(null),E=f.kind==="appointing"||f.kind==="acting";_.useEffect(()=>{E&&b.current?.focus()},[E]);const x=r.find(D=>D.id===h),I=jse(t,n,{trashFolderLabel:s,staleFolderLabel:c,selectedCount:x?.messageCount}),R=Hse(t,n,a,h),O=n.kind==="emptyTrash"||R;if(!e)return null;if(E){const D=Bse(f,n,x?.label??"",R);return T.jsx(g3,{open:e,onClose:()=>{},title:I.title,children:T.jsxs("div",{ref:b,"data-escape-owner":!0,tabIndex:-1,className:"flex flex-col items-center gap-3 px-5 py-10 text-center outline-none",children:[T.jsx(Q$,{className:"size-8 animate-spin text-accent-2"}),T.jsx("p",{className:"text-sm font-medium text-fg",children:D.headline}),T.jsx("p",{className:"text-xs text-fg-muted",role:"status","aria-live":"polite",children:D.status})]})})}return T.jsxs(g3,{open:e,onClose:C,title:I.title,children:[T.jsxs("header",{className:"flex items-center gap-2 border-b border-line px-5 py-3",children:[T.jsx(eR,{className:`size-4 shrink-0 ${O?"text-danger":"text-warning"}`}),T.jsx("span",{className:"flex-1 text-sm font-semibold text-fg",children:I.title})]}),T.jsxs("div",{className:"flex max-h-[70vh] flex-col",children:[T.jsxs("div",{className:"space-y-1 px-5 py-4",children:[T.jsx("p",{className:"text-sm text-fg-muted",children:I.description}),u&&T.jsx("p",{className:"text-xs text-fg-subtle",children:u})]}),f.kind==="appoint-failed"&&T.jsx("div",{className:"px-5 pb-3",children:T.jsx(so,{tone:"danger",variant:"soft",children:qse(f.cause,n,x?.label??"That folder")})}),T.jsx("p",{className:"px-5 pb-2 text-sm text-fg-muted",children:I.pickerPrompt}),T.jsx("div",{className:"flex h-[26rem] min-h-0 flex-1 overflow-hidden",children:T.jsx(Pse,{folders:r,selectedId:h,delimiter:o,onSelect:m,onCreateFolder:t==="none"?g:void 0,onCancel:C,labels:{treeAriaLabel:"Folders on this account",optionLabel:D=>`Set ${D.label}${D.messageCount===void 0?"":`, ${D.messageCount} messages`}, as Trash`}})})]}),T.jsxs("footer",{className:"flex items-center justify-end gap-2 border-t border-line px-5 py-3",children:[T.jsx(Vn,{variant:"secondary",size:"sm",onClick:C,children:I.cancelLabel}),x&&T.jsx(Vn,{variant:O?"danger":"primary",size:"sm",onClick:()=>v(x.id),children:T.jsx("span",{className:"truncate",children:I.confirmLabel})})]})]})},Wse={delete:{label:"Delete",present:"Deleting",past:"Deleted",destructive:!0},move:{label:"Move",present:"Moving",past:"Moved",destructive:!1},junk:{label:"Junk",present:"Marking as junk",past:"Marked as junk",destructive:!0},markRead:{label:"Mark read",present:"Marking read",past:"Marked read",destructive:!1},organize:{label:"Organize",present:"Organizing",past:"Organized",destructive:!1}},Gse=e=>Wse[e],Kse={match:"Apply to",properties:"Properties",folder:"Folder",rule:"Rule",name:"Name",review:"Review",run:"Run"},Qze=e=>Kse[e],Jze=({verb:e,mode:t,scope:n,fromSearch:r})=>{const o=r?["properties"]:t==="properties"?["match","properties"]:["match"];return e==="move"?[...o,"folder","review","run"]:e==="organize"?n==="standing"||n==="until"?[...o,"folder","rule","name","review","run"]:[...o,"folder","rule","review","run"]:[...o,"review","run"]},Nz=(e,t)=>Math.max(0,e.indexOf(t)),Xze=(e,t)=>Nz(e,t)===0||t==="run",kz=(e,t)=>({clauses:[...e.clauses],matchOperator:e.matchOperator,moveMailboxId:e.moveMailboxId,scope:t,until:e.until,name:e.name}),Zse=e=>Iz(kz(e,e.scope??"once")),S3=e=>{if(!(e.scope!=="standing"&&e.scope!=="until")&&!_z(kz(e,e.scope)))return ro.noMatch},Yse="A rule only works within one account — clear the selection, or pick messages from a single account.",Qse="A destination only works within one account — clear the selection, or pick messages from a single account.",e9e="Matching beyond the messages you picked only works within one account — clear the selection, or pick messages from a single account.",Jse="A rule only works within one folder — clear the selection, or pick messages from a single folder.",Xse="A destination only works within one folder — clear the selection, or pick messages from a single folder.",eie={spansAccounts:{rule:Yse,destination:Qse},spansFolders:{rule:Jse,destination:Xse}},tie="A match this wide applies once — use “Make this a filter” above the results to keep doing it.",t9e=(e,t)=>e==="escalated"?tie:t.rule,n9e=(e,t)=>{const n=e===void 0?"spansAccounts":t;if(!n)return{accountId:e};const r=eie[n];return{accountId:n==="spansAccounts"?void 0:e,rule:r.rule,destination:r.destination}},r9e=e=>e===void 0?["selected"]:["selected","properties"],nie="This matches no messages, so there is nothing to do. Go back and change what it applies to.",rie="Fill in every property, or take the empty one off.",oie="Pick a destination first.",sie="Choose one of the three first.",o9e=(e,t,n)=>{if(e==="properties")return t.clauses.length===0?ro.noMatch:t.clauses.some(r=>r.value.trim()==="")?rie:void 0;if(e==="folder")return t.moveMailboxId?void 0:oie;if(e==="rule"){if(!t.scope)return sie;const r=S3(t);return r||(t.scope==="once"&&Zse(t).length>0?ro.bodyTextOnce:t.scope==="until"&&!t.until?.trim()?ro.noUntilDate:void 0)}if(e==="name"&&!t.name?.trim())return ro.unnamed;if(e==="review"){const r=S3(t);return r||(n.status==="uncounted"?void 0:n.status==="ready"&&n.count===0&&!n.stale?nie:Az(n))}},s9e="Nothing matches this yet. Widen a property, or match on a different one.",i9e=({state:e,verb:t,scope:n,matched:r,applied:o,failed:s,failureReason:a})=>{const{label:c,present:u,past:f}=Gse(t),h=f.toLowerCase(),m=n==="standing"||n==="until",v={screenTitle:e==="saving"||e==="backApplyRunning"||e==="statusUnknown"||e==="commitFailed"?c:"Done",showProgress:e==="backApplyRunning"||e==="backApplyComplete"||e==="backApplyFailed"||e==="backApplyRestartFailed"||e==="statusUnknown"||e==="runStopped",failureListLabel:`Not ${h}`};return e==="saving"?{...v,title:m?"Saving rule…":"Applying…",detail:"Nothing has been changed yet.",tone:"progress",dismissLabel:"Close"}:e==="backApplyRunning"?{...v,title:m?"Rule saved. Moving the mail already in your mailbox…":`${u} ${r} messages…`,detail:"This keeps running if you close the wizard.",tone:"progress",dismissLabel:"Close",cancelLabel:"Stop the run"}:e==="statusUnknown"?{...v,title:m?"Rule saved. Its progress over your existing mail is unknown":`${u} — progress unknown`,detail:m?"The connection dropped, so the bar shows the last that was read. The pass runs on the mail server, and the rule keeps working on new mail either way. This keeps checking.":"The connection dropped, so the bar shows the last that was read. The run is on the mail server and carries on either way. This keeps checking.",tone:"warning",dismissLabel:"Close",retryLabel:"Check again"}:e==="backApplyComplete"?{...v,title:m?"Rule saved and applied":`${f} ${o}`,detail:m?`${o} of ${r} already in your mailbox ${h}. New mail follows the rule as it arrives.`:`Every message the match reached was ${h}. Your mail server is still catching up, so the list can lag behind.`,tone:"success",dismissLabel:"Done"}:e==="backApplyFailed"?{...v,title:m?"Rule saved — some mail stayed put":`Not everything was ${h}`,detail:`${o} of ${r} ${h} · the mail server rejected ${s}.${m?" The rule itself is saved and keeps working on new mail.":""}`,tone:"warning",dismissLabel:"Close",retryLabel:`Retry ${s}`}:e==="runStopped"?{...v,title:`Stopped after ${o}`,detail:`${o} of ${r} ${h}. The rest were not sent, apart from the ones already on their way when you stopped — those may still have gone through.`,tone:"warning",dismissLabel:"Close",retryLabel:`Retry ${s}`}:e==="backApplyRestartFailed"?{...v,title:m?"Rule saved — the retry didn't start":"The retry didn't start",detail:`${o} of ${r} ${h} · the mail server rejected ${s}, which are still where they were.${m?" The rule itself is saved and keeps working on new mail.":""} Check your connection and try again.`,tone:"warning",dismissLabel:"Close",retryLabel:`Retry ${s}`}:e==="backApplyStartFailed"?{...v,title:"Rule saved",detail:"New mail follows it automatically. The pass over the mail already in your mailbox never started.",tone:"warning",dismissLabel:"Not now",retryLabel:"Run it over existing mail"}:e==="filterSaved"?{...v,title:"Filter saved",detail:"There is no mail in your mailbox to apply it to yet. New mail follows it as it arrives. You can see it, and when it expires, under Settings › Filters.",tone:"success",dismissLabel:"Done"}:{...v,title:m?"Couldn't save the rule":`Couldn't start ${c.toLowerCase()}`,detail:a??"Nothing has changed.",tone:"danger",dismissLabel:a===void 0?"Not now":"Close",retryLabel:a===void 0?"Try again":void 0}},iie=e=>`${fse(e.field)} "${e.value}"`,Dz=(e,t)=>e.map(iie).join(` ${gse(t)} `),aie=(e,t)=>e==="selected"?`These ${t} messages`:"Its properties",a9e=e=>e==="selected"?"Only the messages ticked in the list.":use,lie=e=>`Every message ${e}`,Lz="the list is showing",l9e="This reaches every match on the mail server, including the ones the list has not loaded. The search is already the match, so there is nothing to widen.",c9e="This covers messages not shown in the list, and anything else matching by the time it runs.",u9e=({mode:e,selectedCount:t,clauses:n,matchOperator:r,escalatedScope:o})=>e==="escalated"?lie(o??Lz):e==="properties"?Dz(n,r):aie(e,t),d9e=({mode:e,selectedCount:t,clauses:n,matchOperator:r,escalatedScope:o,escalatedCount:s})=>{if(e==="selected")return`${t} messages`;if(e==="escalated"){const a=o??Lz;return s===void 0?`every message ${a}`:`all ${s.toLocaleString()} messages ${a}`}return n.length===0?"every message":`every message where ${Dz(n,r)}`},cie={preparing:"Getting the new version ready",restarting:"Restarting Remit",reconnecting:"Waiting for Remit to answer again"};function C3(e){return cie[e]}function uie(e){return e<90?"This usually takes about a minute.":e<240?"Longer than usual. Remit is still trying to reach the server.":"Still no answer. Remit keeps trying."}function f9e(e,t=Date.now()){const n=Math.floor((t-e)/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function h9e(e){return new Date(e).toLocaleDateString(void 0,{dateStyle:"medium"})}const w3=["preparing","restarting","reconnecting"],Uz="fixed inset-0 z-50 flex flex-col items-center justify-center gap-6 bg-canvas p-6 text-center outline-none";function die({target:e,phase:t,elapsedSeconds:n}){const r=_.useRef(null);Ey(r,!0),wy({id:"self-update",open:!0});const o=w3.indexOf(t);return T.jsxs("div",{ref:r,role:"dialog","aria-modal":"true","aria-labelledby":"self-update-progress-title",tabIndex:-1,className:Uz,children:[T.jsxs("div",{className:"max-w-md space-y-2",children:[T.jsxs("h1",{id:"self-update-progress-title",className:"text-lg font-semibold text-fg",children:["Installing Remit ",e]}),T.jsx("p",{className:"text-sm text-fg-muted",children:"Remit is restarting, so this page has no server to talk to for a moment. Leave this open — it reconnects on its own."})]}),T.jsx("ol",{className:"w-full max-w-sm space-y-2 text-left",children:w3.map((s,a)=>{const c=a<o,u=a===o;return T.jsxs("li",{className:Xt("flex items-center gap-3 rounded-sm border px-row-inset py-2 text-sm",u?"border-line-strong bg-surface text-fg":"border-line bg-surface-sunken text-fg-subtle"),children:[c?T.jsx(L$,{className:"size-4 shrink-0 text-positive","aria-hidden":!0}):u?T.jsx(Q$,{className:"size-4 shrink-0 animate-spin text-accent-2","aria-hidden":!0}):T.jsx("span",{className:"size-4 shrink-0 rounded-full border border-line-strong"}),C3(s)]},s)})}),T.jsxs("p",{"aria-live":"polite",className:"max-w-md text-xs text-fg-subtle",children:[T.jsx("span",{className:"sr-only",children:`${C3(t)}. `}),uie(n)]})]})}function fie({attemptedVersion:e,previousVersion:t,elapsedSeconds:n,logsCommand:r,onRetryConnection:o}){const s=_.useRef(null);Ey(s,!0);const a=Math.max(1,Math.round(n/60));return T.jsxs("div",{ref:s,role:"alertdialog","aria-modal":"true","aria-labelledby":"self-update-unreachable-title",tabIndex:-1,className:Uz,children:[T.jsx(XA,{className:"size-12 shrink-0 text-danger","aria-hidden":!0}),T.jsxs("div",{className:"max-w-lg space-y-3",children:[T.jsx("h1",{id:"self-update-unreachable-title",className:"text-lg font-semibold text-fg",children:"Remit has not answered since the restart"}),T.jsxs("p",{className:"text-sm text-fg-muted",children:["Installing ",e," started ",a," minute",a===1?"":"s"," ago and the server has been silent since. Your mail is safe at your provider — it was never part of the update."]}),T.jsxs("p",{className:"text-sm text-fg-muted",children:["Remit rolls back to ",t," on its own when the new version fails to start, but this page cannot confirm that from here. Check the server directly:"]}),T.jsx("code",{className:"block rounded-xs bg-surface-sunken px-3 py-2 text-left text-xs text-fg-muted",children:r})]}),T.jsx("div",{className:"flex flex-wrap items-center justify-center gap-2",children:T.jsx(Vn,{size:"sm",onClick:o,children:"Try connecting again"})})]})}const hie=()=>T.jsxs("div",{className:"hidden h-full w-[17%] min-w-40 max-w-64 shrink-0 flex-col gap-1 border-r border-line p-3 md:flex",children:[T.jsx("div",{className:"mb-3 h-6 w-24 rounded bg-surface-sunken"}),Array.from({length:6}).map((e,t)=>T.jsxs("div",{className:"flex items-center gap-2 py-1.5",children:[T.jsx("div",{className:"size-5 shrink-0 rounded bg-surface-sunken"}),T.jsx("div",{className:"h-3.5 flex-1 rounded bg-surface-sunken"})]},t))]}),pie=()=>T.jsx("div",{className:"min-w-0 flex-1",children:Array.from({length:8}).map((e,t)=>T.jsxs("div",{className:"flex items-start gap-3 border-b border-line py-2 pl-5 pr-4",children:[T.jsx("div",{className:"mt-0.5 size-7 shrink-0 rounded-full bg-surface-sunken"}),T.jsxs("div",{className:"flex-1 space-y-1.5",children:[T.jsxs("div",{className:"flex justify-between gap-2",children:[T.jsx("div",{className:"h-3.5 w-28 rounded bg-surface-sunken"}),T.jsx("div",{className:"h-3 w-12 rounded bg-surface-sunken"})]}),T.jsx("div",{className:"h-3.5 w-48 rounded bg-surface-sunken"}),T.jsx("div",{className:"h-3 w-full rounded bg-surface-sunken"})]})]},t))}),Iy=()=>T.jsxs("div",{className:"flex h-full animate-pulse bg-canvas","aria-hidden":"true",children:[T.jsx(hie,{}),T.jsx(pie,{})]}),Ay="7990ad379f352d8ac65fa35f79dade75edd9c08a",mie="2026-11-15T17:00:40.874Z",gie=Ay.slice(0,7),vie=/^[0-9a-f]{40}$/.test(Ay),yie=vie?`https://github.com/remit-mail/reader/commit/${Ay}`:void 0;class Ah extends Error{constructor(t,n,r){super(t),this.status=n,this.body=r,this.name="ApiError"}status;body}const j_=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Sl=e=>{const t=e instanceof Ah?e.body:e;if(!j_(t))return;const{code:n,details:r}=t;if(typeof n=="string")return{code:n,details:j_(r)?r:void 0}},bie=(e,t)=>{if(j_(e)&&e.message!==void 0&&e.message!==null){const n=String(e.message);if(n)return n}return`Request failed with status ${t}`},Sie=(e,t)=>new Ah(bie(e,t),t,e),wn=e=>{if(e instanceof Ah)return e.status;if(e&&typeof e=="object"){const t=e;if(typeof t.status=="number")return t.status;if(typeof t.statusCode=="number")return t.statusCode}},Fz=e=>wn(e)!==void 0,Ry=e=>{const t=wn(e);return t!==void 0&&t>=500&&t<=599},Ty=e=>!!(typeof DOMException<"u"&&e instanceof DOMException&&e.name==="AbortError"||e&&typeof e=="object"&&"name"in e&&e.name==="AbortError"),Cie=()=>typeof navigator<"u"&&navigator.onLine===!1,Oy=e=>Ty(e)||Fz(e)?!1:e instanceof YA?!0:Cie(),wie=e=>!Fz(e)&&!Ty(e)&&!Oy(e),$z=e=>Ry(e)||wie(e),Eie=e=>e instanceof Error&&e.name==="AuthTokenError"&&wn(e)===403,My=e=>wn(e)===401||Eie(e),xie=(e,t)=>{if(t?.softError===!0)return!0;const n=t?.softErrorStatuses;if(!Array.isArray(n))return!1;const r=wn(e);return r!==void 0&&n.includes(r)},_ie=[502,503,504],Iie=(e,t)=>{if(t?.restartExpected!==!0)return!1;const n=wn(e);return n!==void 0&&_ie.includes(n)},Aie=(e,t)=>Ry(e)?!Iie(e,t)&&t?.ownsServerErrors!==!0:Ty(e)||Oy(e)||My(e)?!1:$z(e)?!0:!xie(e,t),aR={softError:!0},Py=(...e)=>({softErrorStatuses:e}),Rie={restartExpected:!0},Tie={ownsServerErrors:!0},zz=e=>wn(e)===404,Oie=e=>Ry(e),B_=new Set;let jz=null,Bz=null;const Mie=e=>{Bz=e},Pie=e=>e instanceof Error?e:new Error(Hz(e)),Hz=e=>e instanceof Error?e.message||e.name:typeof e=="string"?e:e&&typeof e=="object"&&"message"in e&&typeof e.message=="string"?e.message:"An unexpected server error occurred.",Nie=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`fatal-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,iu=(e,t)=>{const n={error:e,message:Hz(e),correlationId:Nie(),at:Date.now(),recoverable:t?.recoverable??Oie(e),stack:e instanceof Error?e.stack:void 0,componentStack:t?.componentStack};jz=n,$ie(`Fatal: ${n.message} [${n.correlationId}]`),Bz?.recordError(Pie(e),{fatal:"true",correlationId:n.correlationId});for(const r of B_)r(n);return n},kie=e=>(B_.add(e),()=>{B_.delete(e)}),Die=()=>jz,Lie=20,Dg=[],Uie=new Set(["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"]);function Fie(e){return typeof e!="string"?!1:Uie.has(e.replace(/\.\s*$/,""))}function Lg(e){Dg.push(e),Dg.length>Lie&&Dg.shift()}function $ie(e){Lg(e)}function zie(e){return e.map(t=>{if(typeof t=="string")return t;if(t instanceof Error)return`${t.name}: ${t.message}`;try{return JSON.stringify(t)}catch{return String(t)}}).join(" ")}function jie(){const e=console.error.bind(console);console.error=(...t)=>{Lg(zie(t)),e(...t)},window.addEventListener("error",t=>{Fie(t.message)||(Lg(`Uncaught ${t.error instanceof Error?`${t.error.name}: ${t.error.message}`:String(t.message)} (${t.filename}:${t.lineno})`),iu(t.error??t.message))}),window.addEventListener("unhandledrejection",t=>{const n=t.reason,r=n instanceof Error?`${n.name}: ${n.message}`:String(n);Lg(`Unhandled rejection: ${r}`),iu(n)})}function Bie(){return Dg.slice()}const Hie=8,Pc=[];function qie(e){const t=e.split(/[?#]/)[0],n=Pc[Pc.length-1];n&&n.path===t||(Pc.push({path:t,timestamp:new Date().toISOString()}),Pc.length>Hie&&Pc.shift())}function Vie(){return Pc.slice()}const q1=7500,E3=`
13
- … (truncated — the copy action on this screen has the full report)`;function ol(e){return{appShortSha:gie,appCommitUrl:yie,appBuildTime:mie,userAgent:navigator.userAgent,viewport:`${window.innerWidth}×${window.innerHeight}`,timestamp:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,href:window.location.href,recentErrors:Bie(),requests:Hne(),routes:Vie(),failingRequest:qne(),errorMessage:e?.errorMessage,stack:e?.stack,componentStack:e?.componentStack,quarantine:e?.quarantine,syncWarning:e?.syncWarning,title:e?.title}}function V1(e){return["```",e,"```"].join(`
14
- `)}function qz(e){const t=/T(\d{2}:\d{2}:\d{2})/.exec(e);return t?t[1]:e}function Wie(e){return`- **Version**: ${e.appCommitUrl?`[\`${e.appShortSha}\`](${e.appCommitUrl})`:`\`${e.appShortSha}\``} built ${e.appBuildTime}`}function Gie(e){const t=e.status===0?"no response (transport failure)":`${e.status}`;return["## Failing request",`- **Endpoint**: \`${e.path}\``,`- **Method**: ${e.method}`,`- **Status**: ${t}`,`- **Correlation id**: ${e.correlationId??"(none)"}`,""]}function Kie(e){return e.length===0?["## Recent API requests","(none)",""]:["## Recent API requests","| Time | Method | Path | Status | Duration | Correlation |","| --- | --- | --- | --- | --- | --- |",...e.map(n=>{const r=n.status===0?"ERR":`${n.status}`;return`| ${qz(n.timestamp)} | ${n.method} | \`${n.path}\` | ${r} | ${n.durationMs}ms | ${n.correlationId??""} |`}),""]}function Zie(e){return e.length===0?["## Navigation trail","(none)",""]:["## Navigation trail",...e.map(n=>`- ${qz(n.timestamp)} \`${n.path}\``),""]}function Vz(e,t){const n=e.recentErrors.length>0?e.recentErrors.map(s=>` - ${s}`).join(`
15
- `):" (none)",r=["## Environment",Wie(e),`- **Browser**: ${e.userAgent}`,`- **Viewport**: ${e.viewport}`,`- **Time**: ${e.timestamp} (${e.timezone})`,"","## URL",e.href,""];if(e.errorMessage&&r.push("## Error",e.errorMessage,""),e.failingRequest&&r.push(...Gie(e.failingRequest)),e.quarantine){const s=t?.quarantineStructure??e.quarantine.structure;r.push(e.quarantine.head,"",V1(s),"",e.quarantine.disclaimer,"")}e.syncWarning&&r.push(e.syncWarning,"");const o=t?.stack??e.stack;return o&&r.push("## Stacktrace",V1(o),""),e.componentStack&&r.push("## Component stack",V1(e.componentStack),""),r.push(...Kie(e.requests)),r.push(...Zie(e.routes)),r.push("## Recent console errors",n,"","## Steps to reproduce","1. ","","## Expected behaviour","","## Actual behaviour",""),r.join(`
16
- `)}function Yie(e){if(e.title)return e.title;if(!e.errorMessage)return"Bug: ";const t=e.errorMessage.split(`
17
- `)[0].trim();return`Bug: ${t.length>120?`${t.slice(0,117)}…`:t}`}function _m(e,t){const n=new URLSearchParams({title:Yie(e),body:Vz(e,t)});return`${Pu().issuesUrl}?${n.toString()}`}function Qie(e){return Vz(e)}function ku(e){const t=_m(e);if(t.length<=q1)return t;const n={...e,componentStack:void 0},r=[];e.stack&&r.push(["stack",e.stack]),e.quarantine?.structure&&r.push(["quarantineStructure",e.quarantine.structure]),r.sort((s,a)=>a[1].length-s[1].length);let o={};for(const[s,a]of r){if(_m(n,o).length<=q1)break;let c=0,u=a.length,f=0;for(;c<=u;){const h=c+u>>1;_m(n,{...o,[s]:a.slice(0,h)+E3}).length<=q1?(f=h,c=h+1):u=h-1}o={...o,[s]:a.slice(0,f)+E3}}return _m(n,o)}function Jie(){const e=ku(ol());window.open(e,"_blank","noopener,noreferrer")}const Xie="/mail",Wz=()=>{const[e,t]=_.useState(()=>Die());return _.useEffect(()=>kie(t),[]),e?T.jsx(Gz,{fatal:e}):null},x3=e=>({errorMessage:e.message,stack:e.stack,componentStack:e.componentStack}),Gz=({fatal:e,onRetry:t})=>{wy({id:"fatal-error",open:!0});const[n,r]=_.useState(!1),o=()=>{window.location.reload()},s=()=>{if(t){t();return}o()},a=()=>{const f=ku(ol(x3(e)));window.open(f,"_blank","noopener,noreferrer")},c=async()=>{const f=Qie(ol(x3(e)));await navigator.clipboard.writeText(f),r(!0),window.setTimeout(()=>r(!1),2e3)},u=e.recoverable?"The server returned an unexpected error. This is not your fault — nothing was saved or sent. Retry, or report a bug so we can fix it.":"Something went wrong and this page can't recover. This is not your fault — nothing was saved or sent. Go to your inbox, or report a bug so we can fix it.";return T.jsxs("div",{role:"alert","aria-live":"assertive","data-testid":"fatal-error-overlay",className:"fixed inset-0 z-[1000] flex flex-col items-center justify-center gap-6 bg-red-700 p-6 text-center text-white",children:[T.jsx(XA,{className:"size-16 shrink-0","aria-hidden":"true"}),T.jsxs("div",{className:"max-w-lg space-y-3",children:[T.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Something broke"}),T.jsx("p",{className:"text-base text-red-50",children:u}),T.jsx("p",{className:"break-words font-mono text-sm text-red-100",children:e.message}),T.jsxs("p",{className:"font-mono text-xs text-red-200",children:["Reference: ",e.correlationId]})]}),T.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[e.recoverable?T.jsx("button",{type:"button",onClick:s,className:"inline-flex min-h-11 items-center rounded-md bg-white px-5 text-sm font-semibold text-red-700 transition-colors hover:bg-red-50",children:"Retry"}):T.jsx("a",{href:Xie,className:"inline-flex min-h-11 items-center rounded-md bg-white px-5 text-sm font-semibold text-red-700 transition-colors hover:bg-red-50",children:"Go to inbox"}),T.jsx("button",{type:"button",onClick:a,className:"inline-flex min-h-11 items-center rounded-md border border-white/70 px-5 text-sm font-semibold text-white transition-colors hover:bg-white/10",children:"Report a bug"}),T.jsx("button",{type:"button",onClick:c,className:"inline-flex min-h-11 items-center rounded-md border border-white/70 px-5 text-sm font-semibold text-white transition-colors hover:bg-white/10",children:n?"Copied":"Copy full details"})]})]})},eae=({betterAuthEnabled:e,cognitoConfigured:t})=>e?"betterAuth":t?"cognito":"none",lR=e=>eae(e)==="cognito"?Voe:void 0,tae="Fetch Error",nae=429,cR=(e,t)=>{if(e&&typeof e=="object"&&t in e){const n=e[t];if(typeof n=="string"&&n.trim().length>0)return n}},qf=e=>cR(e,"message"),rae=e=>Ty(e)?!1:cR(e,"statusText")===tae?!0:wn(e)===void 0,Kz=e=>{if(rae(e))return"network";const t=wn(e);return t===void 0?"fatal":t===nae?"rateLimited":t===404||t>=500?"fatal":qf(e)?"validation":"fatal"},oae="Can't reach the server. You may be offline — check your connection and try again.",sae="Too many requests from this address. Everyone behind the same address — other people on this network, and every tab you have open — shares one limit. Wait a minute and try again.",iae=(e,t)=>t==="network"?oae:t==="rateLimited"?sae:qf(e)??"Please check your details and try again.",aae=e=>{const t=wn(e);if(t===void 0)return"no response";const n=cR(e,"statusText");return n?`${t} ${n}`:String(t)},lae=(e,t)=>{const n=aae(e),r=wn(e)===404?"The endpoint did not respond as expected — check that the backend is running and up to date (see the deployment guide's troubleshooting section).":"The server returned an unexpected response.",o=qf(e),s=o?` Server said: ${o}.`:"";return`${t.method} ${t.path} failed: ${n}. ${r}${s}`},cae=(e,t)=>{iu(new Error(lae(e,t)),{recoverable:!1})},uae={SIGN_IN_DISABLED:"signInOff",ACCOUNT_DISABLED:"accountDisabled"},uR=e=>{if(wn(e)!==403||!e||typeof e!="object"||!("code"in e))return;const{code:t}=e;return typeof t=="string"?uae[t]:void 0},dae=/\/reset-password\/([^/]+)\/?$/,fae=e=>{const t=dae.exec(e);return t?.[1]?decodeURIComponent(t[1]):void 0},hae="Your password was not set",pae=e=>ku({...ol({title:`Reset password: ${e}`,errorMessage:e}),href:`${window.location.origin}/reset-password/<token>`}),mae=e=>{if(uR(e)==="signInOff")return{kind:"signInOff"};const t=e&&typeof e=="object"&&"code"in e?e.code:void 0;if(t==="INVALID_TOKEN")return{kind:"deadLink"};if(t==="PASSWORD_TOO_SHORT"||t==="PASSWORD_TOO_LONG")return{kind:"password",message:qf(e)??"Use 12 to 128 characters."};const n=Kz(e);if(n==="network")return{kind:"inline",message:"Can't reach the server. You may be offline. Check your connection and try again."};if(n==="rateLimited")return{kind:"inline",message:"Too many tries from this address. Wait a minute and try again."};const r=wn(e),o=qf(e);return{kind:"server",message:`${hae}. The server answered ${r??"nothing"}${o?`: ${o}`:""}.`}};function gae({token:e,onDone:t}){const[n,r]=_.useState(""),[o,s]=_.useState(null),[a,c]=_.useState(!1),u=_.useRef(null);_.useEffect(()=>{u.current?.focus()},[]);const f=async h=>{if(h.preventDefault(),a)return;s(null),c(!0);const m=await rl.resetPassword({newPassword:n,token:e}).then(g=>g.error??null,g=>g);if(c(!1),!m){t();return}s(mae(m))};return T.jsxs(xy,{children:[T.jsx(_y,{}),T.jsxs("form",{onSubmit:f,className:"mt-6 flex flex-col gap-4 rounded-lg border border-line bg-surface p-7 shadow-lg",children:[T.jsx("h1",{className:"text-base font-semibold text-fg",children:"Choose a new password"}),o?.kind==="deadLink"&&T.jsx(so,{tone:"danger",children:"This link no longer works. Ask for a new one."}),o?.kind==="signInOff"&&T.jsxs(so,{tone:"info",children:[T.jsx("p",{className:"font-medium",children:"Sign-in is turned off on this server."}),T.jsx("p",{className:"mt-1",children:"The link works once the person who runs this server turns sign-in back on."})]}),o?.kind==="inline"&&T.jsx(so,{tone:"danger",children:o.message}),o?.kind==="server"&&T.jsxs(so,{tone:"danger",children:[T.jsx("p",{children:o.message}),T.jsx("a",{href:pae(o.message),target:"_blank",rel:"noreferrer",className:"mt-1 inline-block font-medium text-accent hover:underline",children:"Report an issue"})]}),T.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[T.jsx("label",{htmlFor:"reset-new-password",className:"text-fg-muted",children:"New password"}),T.jsx(Mz,{ref:u,id:"reset-new-password",autoComplete:"new-password",value:n,onChange:h=>{r(h.target.value),o?.kind==="password"&&s(null)},placeholder:"12 to 128 characters","aria-invalid":o?.kind==="password","aria-describedby":"reset-new-password-hint",required:!0}),T.jsx("p",{id:"reset-new-password-hint",className:"text-xs text-fg-muted",children:o?.kind==="password"?T.jsx("span",{className:"text-danger",role:"alert",children:o.message}):"Use 12 to 128 characters. Spaces and any symbols are fine. A long phrase is easy to remember."})]}),T.jsx(Vn,{type:"submit","aria-busy":a,children:"Set password"})]}),T.jsx(sR,{note:lR({betterAuthEnabled:!0,cognitoConfigured:!1})})]})}const vae=({onRetry:e,onReport:t})=>T.jsxs(xy,{children:[T.jsx(_y,{}),T.jsxs("div",{className:"flex flex-col gap-4 rounded-lg border border-line bg-surface p-7 shadow-lg",children:[T.jsxs(so,{tone:"warning",children:[T.jsx("p",{className:"font-medium",children:"Too many requests from this address"}),T.jsx("p",{className:"mt-1",children:"The server is limiting requests from your network address, so it could not check whether you are signed in. You have not been signed out."})]}),T.jsx("p",{className:"text-sm text-fg-muted",children:"Wait a minute and try again. Everyone behind the same address — other people on this network, and every tab you have open — shares one limit."}),T.jsx(Vn,{onClick:e,children:"Try again"}),T.jsx(Vn,{variant:"ghost",size:"sm",onClick:t,children:"Report an issue"})]})]}),yae=429,bae=({data:e,isPending:t,error:n})=>{const r=uR(n);return r?{kind:"refused",refusal:r}:e?{kind:"active"}:t?{kind:"pending"}:wn(n)===yae?{kind:"rateLimited"}:{kind:"signedOut"}},Sae={method:"POST",path:"/api/auth/sign-up/email"},Cae={method:"POST",path:"/api/auth/sign-in/email"},wae=({notice:e})=>{const t=_.useRef(null);return _.useEffect(()=>{t.current?.focus()},[]),T.jsxs("div",{ref:t,tabIndex:-1,className:"outline-none",children:[e==="signInOff"&&T.jsxs(so,{tone:"info",children:[T.jsx("p",{className:"font-medium",children:"Sign-in is turned off on this server."}),T.jsx("p",{className:"mt-1",children:"The person who runs this server turned it off. Ask them when it is back."})]}),e==="accountDisabled"&&T.jsxs(so,{tone:"danger",children:[T.jsx("p",{className:"font-medium",children:"This account is disabled."}),T.jsx("p",{className:"mt-1",children:"Ask the person who runs this server."})]}),e==="passwordChanged"&&T.jsx(so,{tone:"success",children:"Password changed. Sign in with your new password."})]})},_3=({notice:e})=>{const[t,n]=_.useState("signIn"),[r,o]=_.useState(""),[s,a]=_.useState(""),[c,u]=_.useState(""),[f,h]=_.useState(null),[m,g]=_.useState(!1),[v,C]=_.useState(!1),[b,E]=_.useState(e),x=b==="signInOff",I=v||x?"signIn":t,R=(D,N)=>{const M=uR(D);if(M){E(M);return}if(Gne(D)){C(!0),n("signIn");return}const L=Kz(D);if(L==="fatal"){cae(D,N);return}h(iae(D,L))},O=async D=>{if(D.preventDefault(),m)return;h(null),E(void 0),g(!0);const N=I==="signUp"?Sae:Cae,M=await(I==="signUp"?rl.signUp.email({email:s,password:c,name:r}):rl.signIn.email({email:s,password:c})).then(L=>L.error??null,L=>L);g(!1),M&&R(M,N)};return T.jsxs(T.Fragment,{children:[T.jsx(Wz,{}),T.jsxs(xy,{children:[T.jsx(_y,{}),T.jsxs("form",{onSubmit:O,className:"mt-6 flex flex-col gap-4 rounded-lg border border-line bg-surface p-7 shadow-lg",children:[b&&T.jsx(wae,{notice:b},b),x?null:v?T.jsx(so,{tone:"info",children:"New signups are currently closed. Sign in with an existing account, or contact your administrator for access."}):T.jsxs("div",{className:"flex gap-1",children:[T.jsx(Vn,{size:"sm",variant:I==="signIn"?"secondary":"ghost","aria-pressed":I==="signIn",onClick:()=>n("signIn"),children:"Sign in"}),T.jsx(Vn,{size:"sm",variant:I==="signUp"?"secondary":"ghost","aria-pressed":I==="signUp",onClick:()=>n("signUp"),children:"Create account"})]}),f&&T.jsx(so,{tone:"danger",children:f}),I==="signUp"&&T.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[T.jsx("label",{htmlFor:"ba-name",className:"text-fg-muted",children:"Name"}),T.jsx(jf,{id:"ba-name",type:"text",autoComplete:"name",value:r,onChange:D=>o(D.target.value),placeholder:"Your name",required:!0})]}),T.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[T.jsx("label",{htmlFor:"ba-email",className:"text-fg-muted",children:"Email"}),T.jsx(jf,{id:"ba-email",type:"email",autoComplete:"email",value:s,onChange:D=>a(D.target.value),placeholder:"you@example.com",required:!0,disabled:x})]}),T.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[T.jsx("label",{htmlFor:"ba-password",className:"text-fg-muted",children:"Password"}),T.jsx(Mz,{id:"ba-password",autoComplete:I==="signUp"?"new-password":"current-password",value:c,onChange:D=>u(D.target.value),placeholder:"Your password",required:!0,disabled:x})]}),T.jsx(Vn,{type:"submit",disabled:x,children:I==="signUp"?"Create account":"Sign in"})]}),T.jsx(sR,{note:lR({betterAuthEnabled:Cy(),cognitoConfigured:!1})})]})]})},Eae=({session:e,onRetry:t,notice:n,children:r})=>{const o=bae(e);return o.kind==="active"?T.jsx(T.Fragment,{children:r}):o.kind==="pending"?T.jsx(Iy,{}):o.kind==="rateLimited"?T.jsx(vae,{onRetry:t,onReport:Jie}):o.kind==="refused"?T.jsx(_3,{notice:o.refusal},o.refusal):T.jsx(_3,{notice:n})},xae=({children:e})=>{const{data:t,isPending:n,error:r,refetch:o}=rl.useSession(),[s,a]=_.useState(()=>fae(window.location.pathname)),[c,u]=_.useState(void 0);return s?T.jsx(gae,{token:s,onDone:()=>{window.history.replaceState(null,"","/"),a(void 0),u("passwordChanged")}}):T.jsx(Eae,{session:{data:t,isPending:n,error:r},onRetry:()=>{o()},notice:c,children:e})},_ae=({children:e,fallback:t=null})=>{const{data:n}=rl.useSession();if(!n)return T.jsx(T.Fragment,{children:t});const r=async()=>{await rl.signOut(),JA()};return T.jsx(T.Fragment,{children:e({email:n.user.email??null,signOut:r})})},cv={configure:()=>{},getToken:ore,resetToken:JA,Shell:xae,Account:_ae};var W1,I3;function Iae(){if(I3)return W1;I3=1;function e(){this.__data__=[],this.size=0}return W1=e,W1}var G1,A3;function Rh(){if(A3)return G1;A3=1;function e(t,n){return t===n||t!==t&&n!==n}return G1=e,G1}var K1,R3;function Ny(){if(R3)return K1;R3=1;var e=Rh();function t(n,r){for(var o=n.length;o--;)if(e(n[o][0],r))return o;return-1}return K1=t,K1}var Z1,T3;function Aae(){if(T3)return Z1;T3=1;var e=Ny(),t=Array.prototype,n=t.splice;function r(o){var s=this.__data__,a=e(s,o);if(a<0)return!1;var c=s.length-1;return a==c?s.pop():n.call(s,a,1),--this.size,!0}return Z1=r,Z1}var Y1,O3;function Rae(){if(O3)return Y1;O3=1;var e=Ny();function t(n){var r=this.__data__,o=e(r,n);return o<0?void 0:r[o][1]}return Y1=t,Y1}var Q1,M3;function Tae(){if(M3)return Q1;M3=1;var e=Ny();function t(n){return e(this.__data__,n)>-1}return Q1=t,Q1}var J1,P3;function Oae(){if(P3)return J1;P3=1;var e=Ny();function t(n,r){var o=this.__data__,s=e(o,n);return s<0?(++this.size,o.push([n,r])):o[s][1]=r,this}return J1=t,J1}var X1,N3;function ky(){if(N3)return X1;N3=1;var e=Iae(),t=Aae(),n=Rae(),r=Tae(),o=Oae();function s(a){var c=-1,u=a==null?0:a.length;for(this.clear();++c<u;){var f=a[c];this.set(f[0],f[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=o,X1=s,X1}var eC,k3;function Mae(){if(k3)return eC;k3=1;var e=ky();function t(){this.__data__=new e,this.size=0}return eC=t,eC}var tC,D3;function Pae(){if(D3)return tC;D3=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return tC=e,tC}var nC,L3;function Nae(){if(L3)return nC;L3=1;function e(t){return this.__data__.get(t)}return nC=e,nC}var rC,U3;function kae(){if(U3)return rC;U3=1;function e(t){return this.__data__.has(t)}return rC=e,rC}var oC,F3;function Zz(){if(F3)return oC;F3=1;var e=typeof pm=="object"&&pm&&pm.Object===Object&&pm;return oC=e,oC}var sC,$3;function ts(){if($3)return sC;$3=1;var e=Zz(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return sC=n,sC}var iC,z3;function Dy(){if(z3)return iC;z3=1;var e=ts(),t=e.Symbol;return iC=t,iC}var aC,j3;function Dae(){if(j3)return aC;j3=1;var e=Dy(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function s(a){var c=n.call(a,o),u=a[o];try{a[o]=void 0;var f=!0}catch{}var h=r.call(a);return f&&(c?a[o]=u:delete a[o]),h}return aC=s,aC}var lC,B3;function Lae(){if(B3)return lC;B3=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return lC=n,lC}var cC,H3;function Du(){if(H3)return cC;H3=1;var e=Dy(),t=Dae(),n=Lae(),r="[object Null]",o="[object Undefined]",s=e?e.toStringTag:void 0;function a(c){return c==null?c===void 0?o:r:s&&s in Object(c)?t(c):n(c)}return cC=a,cC}var uC,q3;function Ys(){if(q3)return uC;q3=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return uC=e,uC}var dC,V3;function dR(){if(V3)return dC;V3=1;var e=Du(),t=Ys(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",s="[object Proxy]";function a(c){if(!t(c))return!1;var u=e(c);return u==r||u==o||u==n||u==s}return dC=a,dC}var fC,W3;function Uae(){if(W3)return fC;W3=1;var e=ts(),t=e["__core-js_shared__"];return fC=t,fC}var hC,G3;function Fae(){if(G3)return hC;G3=1;var e=Uae(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return hC=n,hC}var pC,K3;function Yz(){if(K3)return pC;K3=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return pC=n,pC}var mC,Z3;function $ae(){if(Z3)return mC;Z3=1;var e=dR(),t=Fae(),n=Ys(),r=Yz(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,a=Function.prototype,c=Object.prototype,u=a.toString,f=c.hasOwnProperty,h=RegExp("^"+u.call(f).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m(g){if(!n(g)||t(g))return!1;var v=e(g)?h:s;return v.test(r(g))}return mC=m,mC}var gC,Y3;function zae(){if(Y3)return gC;Y3=1;function e(t,n){return t?.[n]}return gC=e,gC}var vC,Q3;function Cl(){if(Q3)return vC;Q3=1;var e=$ae(),t=zae();function n(r,o){var s=t(r,o);return e(s)?s:void 0}return vC=n,vC}var yC,J3;function fR(){if(J3)return yC;J3=1;var e=Cl(),t=ts(),n=e(t,"Map");return yC=n,yC}var bC,X3;function Ly(){if(X3)return bC;X3=1;var e=Cl(),t=e(Object,"create");return bC=t,bC}var SC,eD;function jae(){if(eD)return SC;eD=1;var e=Ly();function t(){this.__data__=e?e(null):{},this.size=0}return SC=t,SC}var CC,tD;function Bae(){if(tD)return CC;tD=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return CC=e,CC}var wC,nD;function Hae(){if(nD)return wC;nD=1;var e=Ly(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function o(s){var a=this.__data__;if(e){var c=a[s];return c===t?void 0:c}return r.call(a,s)?a[s]:void 0}return wC=o,wC}var EC,rD;function qae(){if(rD)return EC;rD=1;var e=Ly(),t=Object.prototype,n=t.hasOwnProperty;function r(o){var s=this.__data__;return e?s[o]!==void 0:n.call(s,o)}return EC=r,EC}var xC,oD;function Vae(){if(oD)return xC;oD=1;var e=Ly(),t="__lodash_hash_undefined__";function n(r,o){var s=this.__data__;return this.size+=this.has(r)?0:1,s[r]=e&&o===void 0?t:o,this}return xC=n,xC}var _C,sD;function Wae(){if(sD)return _C;sD=1;var e=jae(),t=Bae(),n=Hae(),r=qae(),o=Vae();function s(a){var c=-1,u=a==null?0:a.length;for(this.clear();++c<u;){var f=a[c];this.set(f[0],f[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=o,_C=s,_C}var IC,iD;function Gae(){if(iD)return IC;iD=1;var e=Wae(),t=ky(),n=fR();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return IC=r,IC}var AC,aD;function Kae(){if(aD)return AC;aD=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return AC=e,AC}var RC,lD;function Uy(){if(lD)return RC;lD=1;var e=Kae();function t(n,r){var o=n.__data__;return e(r)?o[typeof r=="string"?"string":"hash"]:o.map}return RC=t,RC}var TC,cD;function Zae(){if(cD)return TC;cD=1;var e=Uy();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return TC=t,TC}var OC,uD;function Yae(){if(uD)return OC;uD=1;var e=Uy();function t(n){return e(this,n).get(n)}return OC=t,OC}var MC,dD;function Qae(){if(dD)return MC;dD=1;var e=Uy();function t(n){return e(this,n).has(n)}return MC=t,MC}var PC,fD;function Jae(){if(fD)return PC;fD=1;var e=Uy();function t(n,r){var o=e(this,n),s=o.size;return o.set(n,r),this.size+=o.size==s?0:1,this}return PC=t,PC}var NC,hD;function hR(){if(hD)return NC;hD=1;var e=Gae(),t=Zae(),n=Yae(),r=Qae(),o=Jae();function s(a){var c=-1,u=a==null?0:a.length;for(this.clear();++c<u;){var f=a[c];this.set(f[0],f[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=o,NC=s,NC}var kC,pD;function Xae(){if(pD)return kC;pD=1;var e=ky(),t=fR(),n=hR(),r=200;function o(s,a){var c=this.__data__;if(c instanceof e){var u=c.__data__;if(!t||u.length<r-1)return u.push([s,a]),this.size=++c.size,this;c=this.__data__=new n(u)}return c.set(s,a),this.size=c.size,this}return kC=o,kC}var DC,mD;function pR(){if(mD)return DC;mD=1;var e=ky(),t=Mae(),n=Pae(),r=Nae(),o=kae(),s=Xae();function a(c){var u=this.__data__=new e(c);this.size=u.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=o,a.prototype.set=s,DC=a,DC}var LC,gD;function ele(){if(gD)return LC;gD=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return LC=t,LC}var UC,vD;function tle(){if(vD)return UC;vD=1;function e(t){return this.__data__.has(t)}return UC=e,UC}var FC,yD;function nle(){if(yD)return FC;yD=1;var e=hR(),t=ele(),n=tle();function r(o){var s=-1,a=o==null?0:o.length;for(this.__data__=new e;++s<a;)this.add(o[s])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,FC=r,FC}var $C,bD;function rle(){if(bD)return $C;bD=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r<o;)if(n(t[r],r,t))return!0;return!1}return $C=e,$C}var zC,SD;function ole(){if(SD)return zC;SD=1;function e(t,n){return t.has(n)}return zC=e,zC}var jC,CD;function Qz(){if(CD)return jC;CD=1;var e=nle(),t=rle(),n=ole(),r=1,o=2;function s(a,c,u,f,h,m){var g=u&r,v=a.length,C=c.length;if(v!=C&&!(g&&C>v))return!1;var b=m.get(a),E=m.get(c);if(b&&E)return b==c&&E==a;var x=-1,I=!0,R=u&o?new e:void 0;for(m.set(a,c),m.set(c,a);++x<v;){var O=a[x],D=c[x];if(f)var N=g?f(D,O,x,c,a,m):f(O,D,x,a,c,m);if(N!==void 0){if(N)continue;I=!1;break}if(R){if(!t(c,function(M,L){if(!n(R,L)&&(O===M||h(O,M,u,f,m)))return R.push(L)})){I=!1;break}}else if(!(O===D||h(O,D,u,f,m))){I=!1;break}}return m.delete(a),m.delete(c),I}return jC=s,jC}var BC,wD;function Jz(){if(wD)return BC;wD=1;var e=ts(),t=e.Uint8Array;return BC=t,BC}var HC,ED;function sle(){if(ED)return HC;ED=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o,s){r[++n]=[s,o]}),r}return HC=e,HC}var qC,xD;function ile(){if(xD)return qC;xD=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o){r[++n]=o}),r}return qC=e,qC}var VC,_D;function ale(){if(_D)return VC;_D=1;var e=Dy(),t=Jz(),n=Rh(),r=Qz(),o=sle(),s=ile(),a=1,c=2,u="[object Boolean]",f="[object Date]",h="[object Error]",m="[object Map]",g="[object Number]",v="[object RegExp]",C="[object Set]",b="[object String]",E="[object Symbol]",x="[object ArrayBuffer]",I="[object DataView]",R=e?e.prototype:void 0,O=R?R.valueOf:void 0;function D(N,M,L,$,G,j,F){switch(L){case I:if(N.byteLength!=M.byteLength||N.byteOffset!=M.byteOffset)return!1;N=N.buffer,M=M.buffer;case x:return!(N.byteLength!=M.byteLength||!j(new t(N),new t(M)));case u:case f:case g:return n(+N,+M);case h:return N.name==M.name&&N.message==M.message;case v:case b:return N==M+"";case m:var q=o;case C:var J=$&a;if(q||(q=s),N.size!=M.size&&!J)return!1;var Se=F.get(N);if(Se)return Se==M;$|=c,F.set(N,M);var V=r(q(N),q(M),$,G,j,F);return F.delete(N),V;case E:if(O)return O.call(N)==O.call(M)}return!1}return VC=D,VC}var WC,ID;function Xz(){if(ID)return WC;ID=1;function e(t,n){for(var r=-1,o=n.length,s=t.length;++r<o;)t[s+r]=n[r];return t}return WC=e,WC}var GC,AD;function Qs(){if(AD)return GC;AD=1;var e=Array.isArray;return GC=e,GC}var KC,RD;function e9(){if(RD)return KC;RD=1;var e=Xz(),t=Qs();function n(r,o,s){var a=o(r);return t(r)?a:e(a,s(r))}return KC=n,KC}var ZC,TD;function lle(){if(TD)return ZC;TD=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,s=0,a=[];++r<o;){var c=t[r];n(c,r,t)&&(a[s++]=c)}return a}return ZC=e,ZC}var YC,OD;function t9(){if(OD)return YC;OD=1;function e(){return[]}return YC=e,YC}var QC,MD;function n9(){if(MD)return QC;MD=1;var e=lle(),t=t9(),n=Object.prototype,r=n.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(a){return a==null?[]:(a=Object(a),e(o(a),function(c){return r.call(a,c)}))}:t;return QC=s,QC}var JC,PD;function cle(){if(PD)return JC;PD=1;function e(t,n){for(var r=-1,o=Array(t);++r<t;)o[r]=n(r);return o}return JC=e,JC}var XC,ND;function wl(){if(ND)return XC;ND=1;function e(t){return t!=null&&typeof t=="object"}return XC=e,XC}var ew,kD;function ule(){if(kD)return ew;kD=1;var e=Du(),t=wl(),n="[object Arguments]";function r(o){return t(o)&&e(o)==n}return ew=r,ew}var tw,DD;function mR(){if(DD)return tw;DD=1;var e=ule(),t=wl(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(a){return t(a)&&r.call(a,"callee")&&!o.call(a,"callee")};return tw=s,tw}var hf={exports:{}},nw,LD;function dle(){if(LD)return nw;LD=1;function e(){return!1}return nw=e,nw}hf.exports;var UD;function gR(){return UD||(UD=1,(function(e,t){var n=ts(),r=dle(),o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===o,c=a?n.Buffer:void 0,u=c?c.isBuffer:void 0,f=u||r;e.exports=f})(hf,hf.exports)),hf.exports}var rw,FD;function Fy(){if(FD)return rw;FD=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,o){var s=typeof r;return o=o??e,!!o&&(s=="number"||s!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<o}return rw=n,rw}var ow,$D;function vR(){if($D)return ow;$D=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return ow=t,ow}var sw,zD;function fle(){if(zD)return sw;zD=1;var e=Du(),t=vR(),n=wl(),r="[object Arguments]",o="[object Array]",s="[object Boolean]",a="[object Date]",c="[object Error]",u="[object Function]",f="[object Map]",h="[object Number]",m="[object Object]",g="[object RegExp]",v="[object Set]",C="[object String]",b="[object WeakMap]",E="[object ArrayBuffer]",x="[object DataView]",I="[object Float32Array]",R="[object Float64Array]",O="[object Int8Array]",D="[object Int16Array]",N="[object Int32Array]",M="[object Uint8Array]",L="[object Uint8ClampedArray]",$="[object Uint16Array]",G="[object Uint32Array]",j={};j[I]=j[R]=j[O]=j[D]=j[N]=j[M]=j[L]=j[$]=j[G]=!0,j[r]=j[o]=j[E]=j[s]=j[x]=j[a]=j[c]=j[u]=j[f]=j[h]=j[m]=j[g]=j[v]=j[C]=j[b]=!1;function F(q){return n(q)&&t(q.length)&&!!j[e(q)]}return sw=F,sw}var iw,jD;function hle(){if(jD)return iw;jD=1;function e(t){return function(n){return t(n)}}return iw=e,iw}var pf={exports:{}};pf.exports;var BD;function ple(){return BD||(BD=1,(function(e,t){var n=Zz(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===r,a=s&&n.process,c=(function(){try{var u=o&&o.require&&o.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}})();e.exports=c})(pf,pf.exports)),pf.exports}var aw,HD;function yR(){if(HD)return aw;HD=1;var e=fle(),t=hle(),n=ple(),r=n&&n.isTypedArray,o=r?t(r):e;return aw=o,aw}var lw,qD;function r9(){if(qD)return lw;qD=1;var e=cle(),t=mR(),n=Qs(),r=gR(),o=Fy(),s=yR(),a=Object.prototype,c=a.hasOwnProperty;function u(f,h){var m=n(f),g=!m&&t(f),v=!m&&!g&&r(f),C=!m&&!g&&!v&&s(f),b=m||g||v||C,E=b?e(f.length,String):[],x=E.length;for(var I in f)(h||c.call(f,I))&&!(b&&(I=="length"||v&&(I=="offset"||I=="parent")||C&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||o(I,x)))&&E.push(I);return E}return lw=u,lw}var cw,VD;function bR(){if(VD)return cw;VD=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||e;return n===o}return cw=t,cw}var uw,WD;function o9(){if(WD)return uw;WD=1;function e(t,n){return function(r){return t(n(r))}}return uw=e,uw}var dw,GD;function mle(){if(GD)return dw;GD=1;var e=o9(),t=e(Object.keys,Object);return dw=t,dw}var fw,KD;function gle(){if(KD)return fw;KD=1;var e=bR(),t=mle(),n=Object.prototype,r=n.hasOwnProperty;function o(s){if(!e(s))return t(s);var a=[];for(var c in Object(s))r.call(s,c)&&c!="constructor"&&a.push(c);return a}return fw=o,fw}var hw,ZD;function $y(){if(ZD)return hw;ZD=1;var e=dR(),t=vR();function n(r){return r!=null&&t(r.length)&&!e(r)}return hw=n,hw}var pw,YD;function s9(){if(YD)return pw;YD=1;var e=r9(),t=gle(),n=$y();function r(o){return n(o)?e(o):t(o)}return pw=r,pw}var mw,QD;function vle(){if(QD)return mw;QD=1;var e=e9(),t=n9(),n=s9();function r(o){return e(o,n,t)}return mw=r,mw}var gw,JD;function yle(){if(JD)return gw;JD=1;var e=vle(),t=1,n=Object.prototype,r=n.hasOwnProperty;function o(s,a,c,u,f,h){var m=c&t,g=e(s),v=g.length,C=e(a),b=C.length;if(v!=b&&!m)return!1;for(var E=v;E--;){var x=g[E];if(!(m?x in a:r.call(a,x)))return!1}var I=h.get(s),R=h.get(a);if(I&&R)return I==a&&R==s;var O=!0;h.set(s,a),h.set(a,s);for(var D=m;++E<v;){x=g[E];var N=s[x],M=a[x];if(u)var L=m?u(M,N,x,a,s,h):u(N,M,x,s,a,h);if(!(L===void 0?N===M||f(N,M,c,u,h):L)){O=!1;break}D||(D=x=="constructor")}if(O&&!D){var $=s.constructor,G=a.constructor;$!=G&&"constructor"in s&&"constructor"in a&&!(typeof $=="function"&&$ instanceof $&&typeof G=="function"&&G instanceof G)&&(O=!1)}return h.delete(s),h.delete(a),O}return gw=o,gw}var vw,XD;function ble(){if(XD)return vw;XD=1;var e=Cl(),t=ts(),n=e(t,"DataView");return vw=n,vw}var yw,e5;function Sle(){if(e5)return yw;e5=1;var e=Cl(),t=ts(),n=e(t,"Promise");return yw=n,yw}var bw,t5;function Cle(){if(t5)return bw;t5=1;var e=Cl(),t=ts(),n=e(t,"Set");return bw=n,bw}var Sw,n5;function wle(){if(n5)return Sw;n5=1;var e=Cl(),t=ts(),n=e(t,"WeakMap");return Sw=n,Sw}var Cw,r5;function Ele(){if(r5)return Cw;r5=1;var e=ble(),t=fR(),n=Sle(),r=Cle(),o=wle(),s=Du(),a=Yz(),c="[object Map]",u="[object Object]",f="[object Promise]",h="[object Set]",m="[object WeakMap]",g="[object DataView]",v=a(e),C=a(t),b=a(n),E=a(r),x=a(o),I=s;return(e&&I(new e(new ArrayBuffer(1)))!=g||t&&I(new t)!=c||n&&I(n.resolve())!=f||r&&I(new r)!=h||o&&I(new o)!=m)&&(I=function(R){var O=s(R),D=O==u?R.constructor:void 0,N=D?a(D):"";if(N)switch(N){case v:return g;case C:return c;case b:return f;case E:return h;case x:return m}return O}),Cw=I,Cw}var ww,o5;function xle(){if(o5)return ww;o5=1;var e=pR(),t=Qz(),n=ale(),r=yle(),o=Ele(),s=Qs(),a=gR(),c=yR(),u=1,f="[object Arguments]",h="[object Array]",m="[object Object]",g=Object.prototype,v=g.hasOwnProperty;function C(b,E,x,I,R,O){var D=s(b),N=s(E),M=D?h:o(b),L=N?h:o(E);M=M==f?m:M,L=L==f?m:L;var $=M==m,G=L==m,j=M==L;if(j&&a(b)){if(!a(E))return!1;D=!0,$=!1}if(j&&!$)return O||(O=new e),D||c(b)?t(b,E,x,I,R,O):n(b,E,M,x,I,R,O);if(!(x&u)){var F=$&&v.call(b,"__wrapped__"),q=G&&v.call(E,"__wrapped__");if(F||q){var J=F?b.value():b,Se=q?E.value():E;return O||(O=new e),R(J,Se,x,I,O)}}return j?(O||(O=new e),r(b,E,x,I,R,O)):!1}return ww=C,ww}var Ew,s5;function i9(){if(s5)return Ew;s5=1;var e=xle(),t=wl();function n(r,o,s,a,c){return r===o?!0:r==null||o==null||!t(r)&&!t(o)?r!==r&&o!==o:e(r,o,s,a,n,c)}return Ew=n,Ew}var xw={exports:{}},_w={},Iw={exports:{}},Aw={};var i5;function _le(){if(i5)return Aw;i5=1;var e=Ih();function t(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function c(m,g){var v=g(),C=r({inst:{value:v,getSnapshot:g}}),b=C[0].inst,E=C[1];return s(function(){b.value=v,b.getSnapshot=g,u(b)&&E({inst:b})},[m,v,g]),o(function(){return u(b)&&E({inst:b}),m(function(){u(b)&&E({inst:b})})},[m]),a(v),v}function u(m){var g=m.getSnapshot;m=m.value;try{var v=g();return!n(m,v)}catch{return!0}}function f(m,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return Aw.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Aw}var a5;function Ile(){return a5||(a5=1,Iw.exports=_le()),Iw.exports}var l5;function Ale(){if(l5)return _w;l5=1;var e=Ih(),t=Ile();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,a=e.useEffect,c=e.useMemo,u=e.useDebugValue;return _w.useSyncExternalStoreWithSelector=function(f,h,m,g,v){var C=s(null);if(C.current===null){var b={hasValue:!1,value:null};C.current=b}else b=C.current;C=c(function(){function x(N){if(!I){if(I=!0,R=N,N=g(N),v!==void 0&&b.hasValue){var M=b.value;if(v(M,N))return O=M}return O=N}if(M=O,r(R,N))return M;var L=g(N);return v!==void 0&&v(M,L)?(R=N,M):(R=N,O=L)}var I=!1,R,O,D=m===void 0?null:m;return[function(){return x(h())},D===null?void 0:function(){return x(D())}]},[h,m,g,v]);var E=o(f,C[0],C[1]);return a(function(){b.hasValue=!0,b.value=E},[E]),u(E),E},_w}var c5;function Rle(){return c5||(c5=1,xw.exports=Ale()),xw.exports}var a9=Rle();var ve=function(){return ve=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ve.apply(this,arguments)};function SR(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function lt(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function vt(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(c){a={error:c}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s}function Gt(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Tt;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(Tt||(Tt={}));var sl;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(sl||(sl={}));var H_=Tt.Start,CR=Tt.Stop,Th=Tt.Raise,zy=Tt.Send,l9=Tt.Cancel,Tle=Tt.NullEvent,wR=Tt.Assign;Tt.After;Tt.DoneState;var c9=Tt.Log,Ole=Tt.Init,q_=Tt.Invoke;Tt.ErrorExecution;var u5=Tt.ErrorPlatform,Mle=Tt.ErrorCustom,ER=Tt.Update,Ple=Tt.Choose,Nle=Tt.Pure,u9=".",d5={},V_="xstate.guard",kle="",Im;function xR(e,t,n){n===void 0&&(n=u9);var r=Af(e,n),o=Af(t,n);return Ct(o)?Ct(r)?o===r:!1:Ct(r)?r in o:Object.keys(r).every(function(s){return s in o?xR(r[s],o[s]):!1})}function d9(e){try{return Ct(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function W_(e,t){try{return Lu(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function Dle(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function Af(e,t){if(Dle(e))return e.value;if(Lu(e))return uv(e);if(typeof e!="string")return e;var n=W_(e,t);return uv(n)}function uv(e){if(e.length===1)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function mf(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var s=r[o];n[s]=t(e[s],s,e,o)}return n}function f5(e,t,n){var r,o,s={};try{for(var a=lt(Object.keys(e)),c=a.next();!c.done;c=a.next()){var u=c.value,f=e[u];n(f)&&(s[u]=t(f,u,e))}}catch(h){r={error:h}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return s}var Lle=function(e){return function(t){var n,r,o=t;try{for(var s=lt(e),a=s.next();!a.done;a=s.next()){var c=a.value;o=o[c]}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o}};function Ule(e,t){return function(n){var r,o,s=n;try{for(var a=lt(e),c=a.next();!c.done;c=a.next()){var u=c.value;s=s[t][u]}}catch(f){r={error:f}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return s}}function Ug(e){if(!e)return[[]];if(Ct(e))return[[e]];var t=sn(Object.keys(e).map(function(n){var r=e[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:Ug(e[n]).map(function(o){return[n].concat(o)})}));return t}function sn(e){var t;return(t=[]).concat.apply(t,Gt([],vt(e),!1))}function f9(e){return Lu(e)?e:[e]}function bo(e){return e===void 0?[]:f9(e)}function dv(e,t,n){var r,o;if(wt(e))return e(t,n.data);var s={};try{for(var a=lt(Object.keys(e)),c=a.next();!c.done;c=a.next()){var u=c.value,f=e[u];wt(f)?s[u]=f(t,n.data):s[u]=f}}catch(h){r={error:h}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return s}function Fle(e){return/^(done|error)\./.test(e)}function h5(e){return!!(e instanceof Promise||e!==null&&(wt(e)||typeof e=="object")&&wt(e.then))}function $le(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function zle(e,t){var n,r,o=vt([[],[]],2),s=o[0],a=o[1];try{for(var c=lt(e),u=c.next();!u.done;u=c.next()){var f=u.value;t(f)?s.push(f):a.push(f)}}catch(h){n={error:h}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return[s,a]}function h9(e,t){return mf(e.states,function(n,r){if(n){var o=(Ct(t)?void 0:t[r])||(n?n.current:void 0);if(o)return{current:o,states:h9(n,o)}}})}function jle(e,t){return{current:t,states:h9(e,t)}}function p5(e,t,n,r){var o=e&&n.reduce(function(s,a){var c,u,f=a.assignment,h={state:r,action:a,_event:t},m={};if(wt(f))m=f(s,t.data,h);else try{for(var g=lt(Object.keys(f)),v=g.next();!v.done;v=g.next()){var C=v.value,b=f[C];m[C]=wt(b)?b(s,t.data,h):b}}catch(E){c={error:E}}finally{try{v&&!v.done&&(u=g.return)&&u.call(g)}finally{if(c)throw c.error}}return Object.assign({},s,m)},e);return o}var Ble=function(){};function Lu(e){return Array.isArray(e)}function wt(e){return typeof e=="function"}function Ct(e){return typeof e=="string"}function p9(e,t){if(e)return Ct(e)?{type:V_,name:e,predicate:t?t[e]:void 0}:wt(e)?{type:V_,name:e.name,predicate:e}:e}function Hle(e){try{return"subscribe"in e&&wt(e.subscribe)}catch{return!1}}var Ui=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();Im={},Im[Ui]=function(){return this},Im[Symbol.observable]=function(){return this};function au(e){return!!e&&"__xstatenode"in e}function qle(e){return!!e&&typeof e.send=="function"}var Vle=(function(){var e=0;return function(){return e++,e.toString(16)}})();function jy(e,t){return Ct(e)||typeof e=="number"?ve({type:e},t):e}function qn(e,t){if(!Ct(e)&&"$$type"in e&&e.$$type==="scxml")return e;var n=jy(e);return ve({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function bc(e,t){var n=f9(t).map(function(r){return typeof r>"u"||typeof r=="string"||au(r)?{target:r,event:e}:ve(ve({},r),{event:e})});return n}function Wle(e){if(!(e===void 0||e===kle))return bo(e)}function m9(e,t,n,r,o){var s=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===V_)return(s?.[t.name]||t.predicate)(n,r.data,a);var c=s?.[t.type];if(!c)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return c(n,r.data,a)}function g9(e){return typeof e=="string"?{type:e}:e}function Rf(e,t,n){var r=function(){},o=typeof e=="object",s=o?e:null;return{next:((o?e.next:e)||r).bind(s),error:((o?e.error:t)||r).bind(s),complete:((o?e.complete:n)||r).bind(s)}}function Am(e,t){return"".concat(e,":invocation[").concat(t,"]")}function G_(e){return(e.type===Th||e.type===zy&&e.to===sl.Internal)&&typeof e.delay!="number"}var Wa=qn({type:Ole});function fv(e,t){return t&&t[e]||void 0}function lu(e,t){var n;if(Ct(e)||typeof e=="number"){var r=fv(e,t);wt(r)?n={type:e,exec:r}:r?n=r:n={type:e,exec:void 0}}else if(wt(e))n={type:e.name||e.toString(),exec:e};else{var r=fv(e.type,t);if(wt(r))n=ve(ve({},e),{exec:r});else if(r){var o=r.type||e.type;n=ve(ve(ve({},r),e),{type:o})}else n=e}return n}var Ps=function(e,t){if(!e)return[];var n=Lu(e)?e:[e];return n.map(function(r){return lu(r,t)})};function By(e){var t=lu(e);return ve(ve({id:Ct(e)?e:t.id},t),{type:t.type})}function v9(e,t){return{type:Th,event:typeof e=="function"?e:jy(e),delay:t?t.delay:void 0,id:t?.id}}function y9(e,t,n,r){var o={_event:n},s=qn(wt(e.event)?e.event(t,n.data,o):e.event),a;if(Ct(e.delay)){var c=r&&r[e.delay];a=wt(c)?c(t,n.data,o):c}else a=wt(e.delay)?e.delay(t,n.data,o):e.delay;return ve(ve({},e),{type:Th,_event:s,delay:a})}function Hy(e,t){return{to:t?t.to:void 0,type:zy,event:wt(e)?e:jy(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:wt(e)?e.name:d9(e)}}function b9(e,t,n,r){var o={_event:n},s=qn(wt(e.event)?e.event(t,n.data,o):e.event),a;if(Ct(e.delay)){var c=r&&r[e.delay];a=wt(c)?c(t,n.data,o):c}else a=wt(e.delay)?e.delay(t,n.data,o):e.delay;var u=wt(e.to)?e.to(t,n.data,o):e.to;return ve(ve({},e),{to:u,_event:s,event:s.data,delay:a})}function S9(e,t){return Hy(e,ve(ve({},t),{to:sl.Parent}))}function C9(){return S9(ER)}var w9=function(e,t,n){return ve(ve({},e),{value:Ct(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},E9=function(e){return{type:l9,sendId:e}};function x9(e){var t=By(e);return{type:Tt.Start,activity:t,exec:void 0}}function _9(e){var t=wt(e)?e:By(e);return{type:Tt.Stop,activity:t,exec:void 0}}function I9(e,t,n){var r=wt(e.activity)?e.activity(t,n.data):e.activity,o=typeof r=="string"?{id:r}:r,s={type:Tt.Stop,activity:o};return s}var A9=function(e){return{type:wR,assignment:e}};function R9(e,t){var n=t?"#".concat(t):"";return"".concat(Tt.After,"(").concat(e,")").concat(n)}function gf(e,t){var n="".concat(Tt.DoneState,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function Tf(e,t){var n="".concat(Tt.DoneInvoke,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function Fc(e,t){var n="".concat(Tt.ErrorPlatform,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function T9(e,t){return Hy(function(n,r){return r},ve(ve({},t),{to:e}))}function Gle(e){return{type:Tt.Choose,conds:e}}var Kle=function(e){var t,n,r=[];try{for(var o=lt(e),s=o.next();!s.done;s=o.next())for(var a=s.value,c=0;c<a.actions.length;){if(a.actions[c].type===wR){r.push(a.actions[c]),a.actions.splice(c,1);continue}c++}}catch(u){t={error:u}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r};function Vf(e,t,n,r,o,s,a){a===void 0&&(a=!1);var c=a?[]:Kle(o),u=c.length?p5(n,r,c,t):n,f=a?[n]:void 0,h=[];function m(C,b){var E;switch(b.type){case Th:{var x=y9(b,u,r,e.options.delays);return s&&typeof x.delay=="number"&&s(x,u,r),x}case zy:var I=b9(b,u,r,e.options.delays);return s&&I.to!==sl.Internal&&(C==="entry"?h.push(I):s(I,u,r)),I;case c9:{var R=w9(b,u,r);return s?.(R,u,r),R}case Ple:{var O=b,D=(E=O.conds.find(function(V){var ee=p9(V.cond,e.options.guards);return!ee||m9(e,ee,u,r,s?void 0:t)}))===null||E===void 0?void 0:E.actions;if(!D)return[];var N=vt(Vf(e,t,u,r,[{type:C,actions:Ps(bo(D),e.options.actions)}],s,a),2),M=N[0],L=N[1];return u=L,f?.push(u),M}case Nle:{var D=b.get(u,r.data);if(!D)return[];var $=vt(Vf(e,t,u,r,[{type:C,actions:Ps(bo(D),e.options.actions)}],s,a),2),G=$[0],j=$[1];return u=j,f?.push(u),G}case CR:{var R=I9(b,u,r);return s?.(R,n,r),R}case wR:{u=p5(u,r,[b],s?void 0:t),f?.push(u);break}default:var F=lu(b,e.options.actions),q=F.exec;if(s)s(F,u,r);else if(q&&f){var J=f.length-1,Se=ve(ve({},F),{exec:function(V){for(var ee=[],me=1;me<arguments.length;me++)ee[me-1]=arguments[me];q.apply(void 0,Gt([f[J]],vt(ee),!1))}});F=Se}return F}}function g(C){var b,E,x=[];try{for(var I=lt(C.actions),R=I.next();!R.done;R=I.next()){var O=R.value,D=m(C.type,O);D&&(x=x.concat(D))}}catch(N){b={error:N}}finally{try{R&&!R.done&&(E=I.return)&&E.call(I)}finally{if(b)throw b.error}}return h.forEach(function(N){s(N,u,r)}),h.length=0,x}var v=sn(o.map(g));return[v,u]}const O9=Object.freeze(Object.defineProperty({__proto__:null,after:R9,assign:A9,cancel:E9,choose:Gle,done:gf,doneInvoke:Tf,error:Fc,forwardTo:T9,getActionFunction:fv,initEvent:Wa,raise:v9,resolveActions:Vf,resolveLog:w9,resolveRaise:y9,resolveSend:b9,resolveStop:I9,send:Hy,sendParent:S9,sendUpdate:C9,start:x9,stop:_9,toActionObject:lu,toActionObjects:Ps,toActivityDefinition:By},Symbol.toStringTag,{value:"Module"}));var hv=[],Nc=function(e,t){hv.push(e);var n=t(e);return hv.pop(),n},Zle=function(e){return e(hv[hv.length-1])};function M9(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[Ui]=function(){return this},t}function Yle(e,t,n,r){var o,s=g9(e.src),a=(o=t?.options.services)===null||o===void 0?void 0:o[s.type],c=e.data?dv(e.data,n,r):void 0,u=a?_R(a,e.id,c):M9(e.id);return u.meta=e,u}function _R(e,t,n){var r=M9(t);if(r.deferred=!0,au(e)){var o=r.state=Nc(void 0,function(){return(n?e.withContext(n):e).initialState});r.getSnapshot=function(){return o}}return r}function Qle(e){try{return typeof e.send=="function"}catch{return!1}}function Jle(e){return Qle(e)&&"id"in e}function Xle(e){var t;return ve((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[Ui]=function(){return this},t),e)}var pv=function(e){return e.type==="atomic"||e.type==="final"};function P9(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function Wf(e){return P9(e).filter(function(t){return t.type!=="history"})}function N9(e){var t=[e];return pv(e)?t:t.concat(sn(Wf(e).map(N9)))}function vf(e,t){var n,r,o,s,a,c,u,f,h=new Set(e),m=K_(h),g=new Set(t);try{for(var v=lt(g),C=v.next();!C.done;C=v.next())for(var b=C.value,E=b.parent;E&&!g.has(E);)g.add(E),E=E.parent}catch($){n={error:$}}finally{try{C&&!C.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var x=K_(g);try{for(var I=lt(g),R=I.next();!R.done;R=I.next()){var b=R.value;if(b.type==="compound"&&(!x.get(b)||!x.get(b).length))m.get(b)?m.get(b).forEach(function(G){return g.add(G)}):b.initialStateNodes.forEach(function(G){return g.add(G)});else if(b.type==="parallel")try{for(var O=(a=void 0,lt(Wf(b))),D=O.next();!D.done;D=O.next()){var N=D.value;g.has(N)||(g.add(N),m.get(N)?m.get(N).forEach(function(G){return g.add(G)}):N.initialStateNodes.forEach(function(G){return g.add(G)}))}}catch(G){a={error:G}}finally{try{D&&!D.done&&(c=O.return)&&c.call(O)}finally{if(a)throw a.error}}}}catch($){o={error:$}}finally{try{R&&!R.done&&(s=I.return)&&s.call(I)}finally{if(o)throw o.error}}try{for(var M=lt(g),L=M.next();!L.done;L=M.next())for(var b=L.value,E=b.parent;E&&!g.has(E);)g.add(E),E=E.parent}catch($){u={error:$}}finally{try{L&&!L.done&&(f=M.return)&&f.call(M)}finally{if(u)throw u.error}}return g}function k9(e,t){var n=t.get(e);if(!n)return{};if(e.type==="compound"){var r=n[0];if(r){if(pv(r))return r.key}else return{}}var o={};return n.forEach(function(s){o[s.key]=k9(s,t)}),o}function K_(e){var t,n,r=new Map;try{for(var o=lt(e),s=o.next();!s.done;s=o.next()){var a=s.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(c){t={error:c}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function ece(e,t){var n=vf([e],t);return k9(e,K_(n))}function yf(e,t){return Array.isArray(e)?e.some(function(n){return n===t}):e instanceof Set?e.has(t):!1}function tce(e){return Gt([],vt(new Set(sn(Gt([],vt(e.map(function(t){return t.ownEvents})),!1)))),!1)}function Fg(e,t){return t.type==="compound"?Wf(t).some(function(n){return n.type==="final"&&yf(e,n)}):t.type==="parallel"?Wf(t).every(function(n){return Fg(e,n)}):!1}function nce(e){return e===void 0&&(e=[]),e.reduce(function(t,n){return n.meta!==void 0&&(t[n.id]=n.meta),t},{})}function m5(e){return new Set(sn(e.map(function(t){return t.tags})))}function D9(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(Ct(e)||Ct(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(function(o){return D9(e[o],t[o])})}function rce(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function oce(e,t){var n=e.exec,r=ve(ve({},e),{exec:n!==void 0?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return r}var So=(function(){function e(t){var n=this,r;this.actions=[],this.activities=d5,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||d5,this.meta=nce(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(r=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&r!==void 0?r:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return tce(n.configuration)}})}return e.from=function(t,n){if(t instanceof e)return t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,events:[],configuration:[],transitions:[],children:{}}):t;var r=Wa;return new e({value:t,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=Wa;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(t,n){var r=this;if(t===void 0&&(t=this.value),n===void 0&&(n="."),Ct(t))return[t];var o=Object.keys(t);return o.concat.apply(o,Gt([],vt(o.map(function(s){return r.toStrings(t[s],n).map(function(a){return s+n+a})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var n=t.tags;t.machine;var r=SR(t,["configuration","transitions","tags","machine"]);return ve(ve({},r),{tags:Array.from(n)})},e.prototype.matches=function(t){return xR(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var n;Ble(!!this.machine);var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,t);return!!r?.transitions.length&&r.transitions.some(function(o){return o.target!==void 0||o.actions.length})},e})(),sce={deferEvents:!1},g5=(function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=ve(ve({},sce),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},e})(),Rw=new Map,ice=0,Wd={bookId:function(){return"x:".concat(ice++)},register:function(e,t){return Rw.set(e,t),e},get:function(e){return Rw.get(e)},free:function(e){Rw.delete(e)}};function IR(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function ace(){var e=IR();if(e&&"__xstate__"in e)return e.__xstate__}function lce(e){if(IR()){var t=ace();t&&t.register(e)}}function cce(e,t){t===void 0&&(t={});var n=e.initialState,r=new Set,o=[],s=!1,a=function(){if(!s){for(s=!0;o.length>0;){var f=o.shift();n=e.transition(n,f,u),r.forEach(function(h){return h.next(n)})}s=!1}},c=Xle({id:t.id,send:function(f){o.push(f),a()},getSnapshot:function(){return n},subscribe:function(f,h,m){var g=Rf(f,h,m);return r.add(g),g.next(n),{unsubscribe:function(){r.delete(g)}}}}),u={parent:t.parent,self:c,id:t.id||"anonymous",observers:r};return n=e.start?e.start(u):n,c}var Z_={sync:!1,autoForward:!1},_n;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(_n||(_n={}));var uce=(function(){function e(t,n){n===void 0&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=_n.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(h,m){if(Lu(h))return r.batch(h),r.state;var g=qn(jy(h,m));if(r.status===_n.Stopped)return r.state;if(r.status!==_n.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(g.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
18
- Event: `).concat(JSON.stringify(g.data)));return r.scheduler.schedule(function(){r.forward(g);var v=r._nextState(g);r.update(v,g)}),r._state},this.sendTo=function(h,m,g){var v=r.parent&&(m===sl.Parent||r.parent.id===m),C=v?r.parent:Ct(m)?m===sl.Internal?r:r.children.get(m)||Wd.get(m):qle(m)?m:void 0;if(!C){if(!v)throw new Error("Unable to send event to child '".concat(m,"' from service '").concat(r.id,"'."));return}if("machine"in C){if(r.status!==_n.Stopped||r.parent!==C||r.state.done){var b=ve(ve({},h),{name:h.name===Mle?"".concat(Fc(r.id)):h.name,origin:r.sessionId});!g&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([C,b]):C.send(b)}}else!g&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([C,h.data]):C.send(h.data)},this._exec=function(h,m,g,v){v===void 0&&(v=r.machine.options.actions);var C=h.exec||fv(h.type,v),b=wt(C)?C:C?C.exec:h.exec;if(b)try{return b(m,g.data,r.machine.config.predictableActionArguments?{action:h,_event:g}:{action:h,state:r.state,_event:g})}catch(J){throw r.parent&&r.parent.send({type:"xstate.error",data:J}),J}switch(h.type){case Th:{var E=h;r.defer(E);break}case zy:var x=h;if(typeof x.delay=="number"){r.defer(x);return}else x.to?r.sendTo(x._event,x.to,g===Wa):r.send(x._event);break;case l9:r.cancel(h.sendId);break;case H_:{if(r.status!==_n.Running)return;var I=h.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[I.id||I.type])break;if(I.type===Tt.Invoke){var R=g9(I.src),O=r.machine.options.services?r.machine.options.services[R.type]:void 0,D=I.id,N=I.data,M="autoForward"in I?I.autoForward:!!I.forward;if(!O)return;var L=N?dv(N,m,g):void 0;if(typeof O=="string")return;var $=wt(O)?O(m,g.data,{data:L,src:R,meta:I.meta}):O;if(!$)return;var G=void 0;au($)&&($=L?$.withContext(L):$,G={autoForward:M}),r.spawn($,D,G)}else r.spawnActivity(I);break}case CR:{r.stopChild(h.activity.id);break}case c9:var j=h,F=j.label,q=j.value;F?r.logger(F,q):r.logger(q);break}};var o=ve(ve({},e.defaultOptions),n),s=o.clock,a=o.logger,c=o.parent,u=o.id,f=u!==void 0?u:t.id;this.id=f,this.logger=a,this.clock=s,this.parent=c,this.options=o,this.scheduler=new g5({deferEvents:this.options.deferEvents}),this.sessionId=Wd.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:Nc(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,n){var r,o;try{for(var s=lt(t.actions),a=s.next();!a.done;a=s.next()){var c=a.value;this.exec(c,t,n)}}catch(u){r={error:u}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}},e.prototype.update=function(t,n){var r,o,s,a,c,u,f,h,m=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||n===Wa)&&this.options.execute)this.execute(this.state);else for(var g=void 0;g=this._outgoingQueue.shift();)g[0].send(g[1]);if(this.children.forEach(function($){m.state.children[$.id]=$}),this.devTools&&this.devTools.send(n.data,t),t.event)try{for(var v=lt(this.eventListeners),C=v.next();!C.done;C=v.next()){var b=C.value;b(t.event)}}catch($){r={error:$}}finally{try{C&&!C.done&&(o=v.return)&&o.call(v)}finally{if(r)throw r.error}}try{for(var E=lt(this.listeners),x=E.next();!x.done;x=E.next()){var b=x.value;b(t,t.event)}}catch($){s={error:$}}finally{try{x&&!x.done&&(a=E.return)&&a.call(E)}finally{if(s)throw s.error}}try{for(var I=lt(this.contextListeners),R=I.next();!R.done;R=I.next()){var O=R.value;O(this.state.context,this.state.history?this.state.history.context:void 0)}}catch($){c={error:$}}finally{try{R&&!R.done&&(u=I.return)&&u.call(I)}finally{if(c)throw c.error}}if(this.state.done){var D=t.configuration.find(function($){return $.type==="final"&&$.parent===m.machine}),N=D&&D.doneData?dv(D.doneData,t.context,n):void 0;this._doneEvent=Tf(this.id,N);try{for(var M=lt(this.doneListeners),L=M.next();!L.done;L=M.next()){var b=L.value;b(this._doneEvent)}}catch($){f={error:$}}finally{try{L&&!L.done&&(h=M.return)&&h.call(M)}finally{if(f)throw f.error}}this._stop(),this._stopChildren(),Wd.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===_n.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,n,r){var o=this,s=Rf(t,n,r);this.listeners.add(s.next),this.status!==_n.NotStarted&&s.next(this.state);var a=function(){o.doneListeners.delete(a),o.stopListeners.delete(a),s.complete()};return this.status===_n.Stopped?s.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){o.listeners.delete(s.next),o.doneListeners.delete(a),o.stopListeners.delete(a)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===_n.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var n=this;if(this.status===_n.Running)return this;this.machine._init(),Wd.register(this.sessionId,this),this.initialized=!0,this.status=_n.Running;var r=t===void 0?this.initialState:Nc(this,function(){return rce(t)?n.machine.resolveState(t):n.machine.resolveState(So.from(t,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,Wa)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){wt(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,n,r,o,s,a,c,u,f,h;try{for(var m=lt(this.listeners),g=m.next();!g.done;g=m.next()){var v=g.value;this.listeners.delete(v)}}catch(M){t={error:M}}finally{try{g&&!g.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}try{for(var C=lt(this.stopListeners),b=C.next();!b.done;b=C.next()){var v=b.value;v(),this.stopListeners.delete(v)}}catch(M){r={error:M}}finally{try{b&&!b.done&&(o=C.return)&&o.call(C)}finally{if(r)throw r.error}}try{for(var E=lt(this.contextListeners),x=E.next();!x.done;x=E.next()){var v=x.value;this.contextListeners.delete(v)}}catch(M){s={error:M}}finally{try{x&&!x.done&&(a=E.return)&&a.call(E)}finally{if(s)throw s.error}}try{for(var I=lt(this.doneListeners),R=I.next();!R.done;R=I.next()){var v=R.value;this.doneListeners.delete(v)}}catch(M){c={error:M}}finally{try{R&&!R.done&&(u=I.return)&&u.call(I)}finally{if(c)throw c.error}}if(!this.initialized)return this;this.initialized=!1,this.status=_n.Stopped,this._initialState=void 0;try{for(var O=lt(Object.keys(this.delayedEventsMap)),D=O.next();!D.done;D=O.next()){var N=D.value;this.clock.clearTimeout(this.delayedEventsMap[N])}}catch(M){f={error:M}}finally{try{D&&!D.done&&(h=O.return)&&h.call(O)}finally{if(f)throw f.error}}this.scheduler.clear(),this.scheduler=new g5({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r;if(!(!((r=t._state)===null||r===void 0)&&r.done)){var o=qn({type:"xstate.stop"}),s=Nc(t,function(){var a=sn(Gt([],vt(t.state.configuration),!1).sort(function(m,g){return g.order-m.order}).map(function(m){return Ps(m.onExit,t.machine.options.actions)})),c=vt(Vf(t.machine,t.state,t.state.context,o,[{type:"exit",actions:a}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),u=c[0],f=c[1],h=new So({value:t.state.value,context:f,_event:o,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:u.filter(function(m){return!G_(m)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return h.changed=!0,h});t.update(s,o),t._stopChildren(),Wd.free(t.sessionId)}}),this},e.prototype.batch=function(t){var n=this;if(!(this.status===_n.NotStarted&&this.options.deferEvents)){if(this.status!==_n.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(t.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var o,s,a=n.state,c=!1,u=[],f=function(v){var C=qn(v);n.forward(C),a=Nc(n,function(){return n.machine.transition(a,C,void 0,r||void 0)}),u.push.apply(u,Gt([],vt(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(b){return oce(b,a)})),!1)),c=c||!!a.changed};try{for(var h=lt(t),m=h.next();!m.done;m=h.next()){var g=m.value;f(g)}}catch(v){o={error:v}}finally{try{m&&!m.done&&(s=h.return)&&s.call(h)}finally{if(o)throw o.error}}a.changed=c,a.actions=u,n.update(a,qn(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var o=qn(t);if(o.name.indexOf(u5)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(u5)===0}))throw o.data.data;var s=Nc(this,function(){return r.machine.transition(r.state,o,void 0,n||void 0)});return s},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var n,r;try{for(var o=lt(this.forwardTo),s=o.next();!s.done;s=o.next()){var a=s.value,c=this.children.get(a);if(!c)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));c.send(t)}}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.defer=function(t){var n=this,r=this.clock.setTimeout(function(){"to"in t&&t.to?n.sendTo(t._event,t.to,!0):n.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=r)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(t,n.context,n._event,r)},e.prototype.removeChild=function(t){var n;this.children.delete(t),this.forwardTo.delete(t),(n=this.state)===null||n===void 0||delete n.children[t]},e.prototype.stopChild=function(t){var n=this.children.get(t);n&&(this.removeChild(t),wt(n.stop)&&n.stop())},e.prototype.spawn=function(t,n,r){if(this.status!==_n.Running)return _R(t,n);if(h5(t))return this.spawnPromise(Promise.resolve(t),n);if(wt(t))return this.spawnCallback(t,n);if(Jle(t))return this.spawnActor(t,n);if(Hle(t))return this.spawnObservable(t,n);if(au(t))return this.spawnMachine(t,ve(ve({},r),{id:n}));if($le(t))return this.spawnBehavior(t,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,n){var r=this;n===void 0&&(n={});var o=new e(t,ve(ve({},this.options),{parent:this,id:n.id||t.id})),s=ve(ve({},Z_),n);s.sync&&o.onTransition(function(c){r.send(ER,{state:c,id:o.id})});var a=o;return this.children.set(o.id,a),s.autoForward&&this.forwardTo.add(o.id),o.onDone(function(c){r.removeChild(o.id),r.send(qn(c,{origin:o.id}))}).start(),a},e.prototype.spawnBehavior=function(t,n){var r=cce(t,{id:n,parent:this});return this.children.set(n,r),r},e.prototype.spawnPromise=function(t,n){var r,o=this,s=!1,a;t.then(function(u){s||(a=u,o.removeChild(n),o.send(qn(Tf(n,u),{origin:n})))},function(u){if(!s){o.removeChild(n);var f=Fc(n,u);try{o.send(qn(f,{origin:n}))}catch{o.devTools&&o.devTools.send(f,o.state),o.machine.strict&&o.stop()}}});var c=(r={id:n,send:function(){},subscribe:function(u,f,h){var m=Rf(u,f,h),g=!1;return t.then(function(v){g||(m.next(v),!g&&m.complete())},function(v){g||m.error(v)}),{unsubscribe:function(){return g=!0}}},stop:function(){s=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return a}},r[Ui]=function(){return this},r);return this.children.set(n,c),c},e.prototype.spawnCallback=function(t,n){var r,o=this,s=!1,a=new Set,c=new Set,u,f=function(g){u=g,c.forEach(function(v){return v(g)}),!s&&o.send(qn(g,{origin:n}))},h;try{h=t(f,function(g){a.add(g)})}catch(g){this.send(Fc(n,g))}if(h5(h))return this.spawnPromise(h,n);var m=(r={id:n,send:function(g){return a.forEach(function(v){return v(g)})},subscribe:function(g){var v=Rf(g);return c.add(v.next),{unsubscribe:function(){c.delete(v.next)}}},stop:function(){s=!0,wt(h)&&h()},toJSON:function(){return{id:n}},getSnapshot:function(){return u}},r[Ui]=function(){return this},r);return this.children.set(n,m),m},e.prototype.spawnObservable=function(t,n){var r,o=this,s,a=t.subscribe(function(u){s=u,o.send(qn(u,{origin:n}))},function(u){o.removeChild(n),o.send(qn(Fc(n,u),{origin:n}))},function(){o.removeChild(n),o.send(qn(Tf(n),{origin:n}))}),c=(r={id:n,send:function(){},subscribe:function(u,f,h){return t.subscribe(u,f,h)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return s},toJSON:function(){return{id:n}}},r[Ui]=function(){return this},r);return this.children.set(n,c),c},e.prototype.spawnActor=function(t,n){return this.children.set(n,t),t},e.prototype.spawnActivity=function(t){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(n){var r=n(this.state.context,t);this.spawnEffect(t.id,r)}},e.prototype.spawnEffect=function(t,n){var r;this.children.set(t,(r={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},r[Ui]=function(){return this},r))},e.prototype.attachDev=function(){var t=IR();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(ve(ve({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:ve({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}lce(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Ui]=function(){return this},e.prototype.getSnapshot=function(){return this.status===_n.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,n){return setTimeout(t,n)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=L9,e})(),dce=function(e){return Ct(e)?ve(ve({},Z_),{name:e}):ve(ve(ve({},Z_),{name:Vle()}),e)};function Gd(e,t){var n=dce(t);return Zle(function(r){return r?r.spawn(e,n.name,n):_R(e,n.name)})}function L9(e,t){var n=new uce(e,t);return n}function fce(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function Rm(e){return ve(ve({type:q_},e),{toJSON:function(){e.onDone,e.onError;var t=SR(e,["onDone","onError"]);return ve(ve({},t),{type:q_,src:fce(e.src)})}})}var Tm="",Y_="#",Tw="*",Sc={},Cc=function(e){return e[0]===Y_},hce=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},pce=(function(){function e(t,n,r,o){r===void 0&&(r="context"in t?t.context:void 0);var s=this,a;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(hce(),n),this.parent=o?.parent,this.key=this.config.key||o?.key||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:u9),this.id=this.config.id||Gt([this.machine.key],vt(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?mf(this.config.states,function(f,h){var m,g=new e(f,{},void 0,{parent:s,key:h});return Object.assign(s.idMap,ve((m={},m[g.id]=g,m),g.idMap)),g}):Sc;var c=0;function u(f){var h,m;f.order=c++;try{for(var g=lt(P9(f)),v=g.next();!v.done;v=g.next()){var C=v.value;u(C)}}catch(b){h={error:b}}finally{try{v&&!v.done&&(m=g.return)&&m.call(g)}finally{if(h)throw h.error}}}u(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(f){var h=f.event;return h===Tm}):Tm in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=bo(this.config.entry||this.config.onEntry).map(function(f){return lu(f)}),this.onExit=bo(this.config.exit||this.config.onExit).map(function(f){return lu(f)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=bo(this.config.invoke).map(function(f,h){var m,g;if(au(f)){var v=Am(s.id,h);return s.machine.options.services=ve((m={},m[v]=f,m),s.machine.options.services),Rm({src:v,id:v})}else if(Ct(f.src)){var v=f.id||Am(s.id,h);return Rm(ve(ve({},f),{id:v,src:f.src}))}else if(au(f.src)||wt(f.src)){var v=f.id||Am(s.id,h);return s.machine.options.services=ve((g={},g[v]=f.src,g),s.machine.options.services),Rm(ve(ve({id:v},f),{src:v}))}else{var C=f.src;return Rm(ve(ve({id:Am(s.id,h)},f),{src:C}))}}),this.activities=bo(this.config.activities).concat(this.invoke).map(function(f){return By(f)}),this.transition=this.transition.bind(this),this.tags=bo(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||N9(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,s=r.activities,a=r.guards,c=r.services,u=r.delays;return new e(this.config,{actions:ve(ve({},o),t.actions),activities:ve(ve({},s),t.activities),guards:ve(ve({},a),t.guards),services:ve(ve({},c),t.services),delays:ve(ve({},u),t.delays)},n??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return wt(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:mf(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var n=t===Tm,r=this.transitions.filter(function(o){var s=o.eventType===t;return n?s:s||o.eventType===Tw});return this.__cache.candidates[t]=r,r},e.prototype.getDelayedTransitions=function(){var t=this,n=this.config.after;if(!n)return[];var r=function(s,a){var c=wt(s)?"".concat(t.id,":delay[").concat(a,"]"):s,u=R9(c,t.id);return t.onEntry.push(Hy(u,{delay:s})),t.onExit.push(E9(u)),u},o=Lu(n)?n.map(function(s,a){var c=r(s.delay,a);return ve(ve({},s),{event:c})}):sn(Object.keys(n).map(function(s,a){var c=n[s],u=Ct(c)?{target:c}:c,f=isNaN(+s)?s:+s,h=r(f,a);return bo(u).map(function(m){return ve(ve({},m),{event:h,delay:f})})}));return o.map(function(s){var a=s.delay;return ve(ve({},t.formatTransition(s)),{delay:a})})},e.prototype.getStateNodes=function(t){var n,r=this;if(!t)return[];var o=t instanceof So?t.value:Af(t,this.delimiter);if(Ct(o)){var s=this.getStateNode(o).initial;return s!==void 0?this.getStateNodes((n={},n[o]=s,n)):[this,this.states[o]]}var a=Object.keys(o),c=[this];return c.push.apply(c,Gt([],vt(sn(a.map(function(u){return r.getStateNode(u).getStateNodes(o[u])}))),!1)),c},e.prototype.handles=function(t){var n=d9(t);return this.events.includes(n)},e.prototype.resolveState=function(t){var n=t instanceof So?t:So.create(t),r=Array.from(vf([],this.getStateNodes(n.value)));return new So(ve(ve({},n),{value:this.resolve(n.value),configuration:r,done:Fg(r,this),tags:m5(r),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,n,r){var o=this.getStateNode(t),s=o.next(n,r);return!s||!s.transitions.length?this.next(n,r):s},e.prototype.transitionCompoundNode=function(t,n,r){var o=Object.keys(t),s=this.getStateNode(o[0]),a=s._transition(t[o[0]],n,r);return!a||!a.transitions.length?this.next(n,r):a},e.prototype.transitionParallelNode=function(t,n,r){var o,s,a={};try{for(var c=lt(Object.keys(t)),u=c.next();!u.done;u=c.next()){var f=u.value,h=t[f];if(h){var m=this.getStateNode(f),g=m._transition(h,n,r);g&&(a[f]=g)}}}catch(x){o={error:x}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(o)throw o.error}}var v=Object.keys(a).map(function(x){return a[x]}),C=sn(v.map(function(x){return x.transitions})),b=v.some(function(x){return x.transitions.length>0});if(!b)return this.next(n,r);var E=sn(Object.keys(a).map(function(x){return a[x].configuration}));return{transitions:C,exitSet:sn(v.map(function(x){return x.exitSet})),configuration:E,source:n,actions:sn(Object.keys(a).map(function(x){return a[x].actions}))}},e.prototype._transition=function(t,n,r){return Ct(t)?this.transitionLeafNode(t,n,r):Object.keys(t).length===1?this.transitionCompoundNode(t,n,r):this.transitionParallelNode(t,n,r)},e.prototype.getTransitionData=function(t,n){return this._transition(t.value,t,qn(n))},e.prototype.next=function(t,n){var r,o,s=this,a=n.name,c=[],u=[],f;try{for(var h=lt(this.getCandidates(a)),m=h.next();!m.done;m=h.next()){var g=m.value,v=g.cond,C=g.in,b=t.context,E=C?Ct(C)&&Cc(C)?t.matches(Af(this.getStateNodeById(C).path,this.delimiter)):xR(Af(C,this.delimiter),Lle(this.path.slice(0,-2))(t.value)):!0,x=!1;try{x=!v||m9(this.machine,v,b,n,t)}catch(O){throw new Error("Unable to evaluate guard '".concat(v.name||v.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
19
- `).concat(O.message))}if(x&&E){g.target!==void 0&&(u=g.target),c.push.apply(c,Gt([],vt(g.actions),!1)),f=g;break}}}catch(O){r={error:O}}finally{try{m&&!m.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}if(f){if(!u.length)return{transitions:[f],exitSet:[],configuration:t.value?[this]:[],source:t,actions:c};var I=sn(u.map(function(O){return s.getRelativeStateNodes(O,t.historyValue)})),R=!!f.internal;return{transitions:[f],exitSet:R?[]:sn(u.map(function(O){return s.getPotentiallyReenteringNodes(O)})),configuration:I,source:t,actions:c}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var n=[],r=this,o=t;r&&r!==o;)n.push(r),r=r.parent;return r!==o?[]:(n.push(o),n)},e.prototype.getActions=function(t,n,r,o,s,a,c){var u,f,h,m,g=this,v=a?vf([],this.getStateNodes(a.value)):[],C=new Set;try{for(var b=lt(Array.from(t).sort(function(j,F){return j.order-F.order})),E=b.next();!E.done;E=b.next()){var x=E.value;(!yf(v,x)||yf(r.exitSet,x)||x.parent&&C.has(x.parent))&&C.add(x)}}catch(j){u={error:j}}finally{try{E&&!E.done&&(f=b.return)&&f.call(b)}finally{if(u)throw u.error}}try{for(var I=lt(v),R=I.next();!R.done;R=I.next()){var x=R.value;(!yf(t,x)||yf(r.exitSet,x.parent))&&r.exitSet.push(x)}}catch(j){h={error:j}}finally{try{R&&!R.done&&(m=I.return)&&m.call(I)}finally{if(h)throw h.error}}r.exitSet.sort(function(j,F){return F.order-j.order});var O=Array.from(C).sort(function(j,F){return j.order-F.order}),D=new Set(r.exitSet),N=sn(O.map(function(j){var F=[];if(j.type!=="final")return F;var q=j.parent;if(!q.parent)return F;F.push(gf(j.id,j.doneData),gf(q.id,j.doneData?dv(j.doneData,o,s):void 0));var J=q.parent;return J.type==="parallel"&&Wf(J).every(function(Se){return Fg(r.configuration,Se)})&&F.push(gf(J.id)),F})),M=O.map(function(j){var F=j.onEntry,q=j.activities.map(function(J){return x9(J)});return{type:"entry",actions:Ps(c?Gt(Gt([],vt(F),!1),vt(q),!1):Gt(Gt([],vt(q),!1),vt(F),!1),g.machine.options.actions)}}).concat({type:"state_done",actions:N.map(function(j){return v9(j)})}),L=Array.from(D).map(function(j){return{type:"exit",actions:Ps(Gt(Gt([],vt(j.onExit),!1),vt(j.activities.map(function(F){return _9(F)})),!1),g.machine.options.actions)}}),$=L.concat({type:"transition",actions:Ps(r.actions,this.machine.options.actions)}).concat(M);if(n){var G=Ps(sn(Gt([],vt(t),!1).sort(function(j,F){return F.order-j.order}).map(function(j){return j.onExit})),this.machine.options.actions).filter(function(j){return!G_(j)});return $.concat({type:"stop",actions:G})}return $},e.prototype.transition=function(t,n,r,o){t===void 0&&(t=this.initialState);var s=qn(n),a;if(t instanceof So)a=r===void 0?t:this.resolveState(So.from(t,r));else{var c=Ct(t)?this.resolve(uv(this.getResolvedPath(t))):this.resolve(t),u=r??this.machine.context;a=this.resolveState(So.from(c,u))}if(this.strict&&!this.events.includes(s.name)&&!Fle(s.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(s.name,"'"));var f=this._transition(a.value,a,s)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},h=vf([],this.getStateNodes(a.value)),m=f.configuration.length?vf(h,f.configuration):h;return f.configuration=Gt([],vt(m),!1),this.resolveTransition(f,a,a.context,o,s)},e.prototype.resolveRaisedTransition=function(t,n,r,o){var s,a=t.actions;return t=this.transition(t,n,void 0,o),t._event=r,t.event=r.data,(s=t.actions).unshift.apply(s,Gt([],vt(a),!1)),t},e.prototype.resolveTransition=function(t,n,r,o,s){var a,c,u,f,h=this;s===void 0&&(s=Wa);var m=t.configuration,g=!n||t.transitions.length>0,v=g?t.configuration:n?n.configuration:[],C=Fg(v,this),b=g?ece(this.machine,m):void 0,E=n?n.historyValue?n.historyValue:t.source?this.machine.historyValue(n.value):void 0:void 0,x=this.getActions(new Set(v),C,t,r,s,n,o),I=n?ve({},n.activities):{};try{for(var R=lt(x),O=R.next();!O.done;O=R.next()){var D=O.value;try{for(var N=(u=void 0,lt(D.actions)),M=N.next();!M.done;M=N.next()){var L=M.value;L.type===H_?I[L.activity.id||L.activity.type]=L:L.type===CR&&(I[L.activity.id||L.activity.type]=!1)}}catch(ae){u={error:ae}}finally{try{M&&!M.done&&(f=N.return)&&f.call(N)}finally{if(u)throw u.error}}}}catch(ae){a={error:ae}}finally{try{O&&!O.done&&(c=R.return)&&c.call(R)}finally{if(a)throw a.error}}var $=vt(Vf(this,n,r,s,x,o,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),G=$[0],j=$[1],F=vt(zle(G,G_),2),q=F[0],J=F[1],Se=G.filter(function(ae){var be;return ae.type===H_&&((be=ae.activity)===null||be===void 0?void 0:be.type)===q_}),V=Se.reduce(function(ae,be){return ae[be.activity.id]=Yle(be.activity,h.machine,j,s),ae},n?ve({},n.children):{}),ee=new So({value:b||n.value,context:j,_event:s,_sessionid:n?n._sessionid:null,historyValue:b?E?jle(E,b):void 0:n?n.historyValue:void 0,history:!b||t.source?n:void 0,actions:b?J:[],activities:b?I:n?n.activities:{},events:[],configuration:v,transitions:t.transitions,children:V,done:C,tags:m5(v),machine:this}),me=r!==j;ee.changed=s.name===ER||me;var ge=ee.history;ge&&delete ge.history;var Te=!C&&(this._transient||m.some(function(ae){return ae._transient}));if(!g&&(!Te||s.name===Tm))return ee;var z=ee;if(!C)for(Te&&(z=this.resolveRaisedTransition(z,{type:Tle},s,o));q.length;){var te=q.shift();z=this.resolveRaisedTransition(z,te._event,s,o)}var fe=z.changed||(ge?!!z.actions.length||me||typeof ge.value!=typeof z.value||!D9(z.value,ge.value):void 0);return z.changed=fe,z.history=ge,z},e.prototype.getStateNode=function(t){if(Cc(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[t];if(!n)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return n},e.prototype.getStateNodeById=function(t){var n=Cc(t)?t.slice(Y_.length):t;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&Cc(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var n=W_(t,this.delimiter).slice(),r=this;n.length;){var o=n.shift();if(!o.length)break;r=r.getStateNode(o)}return r},e.prototype.resolve=function(t){var n,r=this;if(!t)return this.initialStateValue||Sc;switch(this.type){case"parallel":return mf(this.initialStateValue,function(s,a){return s?r.getStateNode(a).resolve(t[a]||s):Sc});case"compound":if(Ct(t)){var o=this.getStateNode(t);return o.type==="parallel"||o.type==="compound"?(n={},n[t]=o.initialStateValue,n):t}return Object.keys(t).length?mf(t,function(s,a){return s?r.getStateNode(a).resolve(s):Sc}):this.initialStateValue||{};default:return t||Sc}},e.prototype.getResolvedPath=function(t){if(Cc(t)){var n=this.machine.idMap[t.slice(Y_.length)];if(!n)throw new Error("Unable to find state node '".concat(t,"'"));return n.path}return W_(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=f5(this.states,function(r){return r.initialStateValue||Sc},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=pv(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,n){this._init();var r=this.getStateNodes(t);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var n=this.config;Ct(n.target)?t=Cc(n.target)?uv(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:t=n.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,n,r){return r===void 0&&(r=!0),r?t.type==="history"?t.resolveHistory(n):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(pv(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=Ug(this.initialStateValue);return sn(n.map(function(r){return t.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var n=vt(t),r=n[0],o=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var s=this.getStateNode(r);if(s.type==="history")return s.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(o)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:f5(this.states,function(n,r){if(!t)return n.historyValue();var o=Ct(t)?void 0:t[r];return n.historyValue(o||n.initialStateValue)},function(n){return!n.history})}},e.prototype.resolveHistory=function(t){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!t){var o=this.target;return o?sn(Ug(o).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var s=Ule(r.path,"states")(t).current;return Ct(s)?[r.getStateNode(s)]:sn(Ug(s).map(function(a){return n.history==="deep"?r.getFromRelativePath(a):[r.states[a[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,n=sn(Object.keys(this.states).map(function(r){return t.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,n,r,o;if(this.__cache.events)return this.__cache.events;var s=this.states,a=new Set(this.ownEvents);if(s)try{for(var c=lt(Object.keys(s)),u=c.next();!u.done;u=c.next()){var f=u.value,h=s[f];if(h.states)try{for(var m=(r=void 0,lt(h.events)),g=m.next();!g.done;g=m.next()){var v=g.value;a.add("".concat(v))}}catch(C){r={error:C}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(r)throw r.error}}}}catch(C){t={error:C}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var n=this;if(t!==void 0)return t.map(function(r){if(!Ct(r))return r;var o=r[0]===n.delimiter;if(o&&!n.parent)return n.getStateNodeByPath(r.slice(1));var s=o?n.key+r:r;if(n.parent)try{var a=n.parent.getStateNodeByPath(s);return a}catch(c){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
20
- `).concat(c.message))}else return n.getStateNodeByPath(s)})},e.prototype.formatTransition=function(t){var n=this,r=Wle(t.target),o="internal"in t?t.internal:r?r.some(function(u){return Ct(u)&&u[0]===n.delimiter}):!0,s=this.machine.options.guards,a=this.resolveTarget(r),c=ve(ve({},t),{actions:Ps(bo(t.actions)),cond:p9(t.cond,s),target:a,source:this,internal:o,eventType:t.event,toJSON:function(){return ve(ve({},c),{target:c.target?c.target.map(function(u){return"#".concat(u.id)}):void 0,source:"#".concat(n.id)})}});return c},e.prototype.formatTransitions=function(){var t,n,r=this,o;if(!this.config.on)o=[];else if(Array.isArray(this.config.on))o=this.config.on;else{var s=this.config.on,a=Tw,c=s[a],u=c===void 0?[]:c,f=SR(s,[typeof a=="symbol"?a:a+""]);o=sn(Object.keys(f).map(function(I){var R=bc(I,f[I]);return R}).concat(bc(Tw,u)))}var h=this.config.always?bc("",this.config.always):[],m=this.config.onDone?bc(String(gf(this.id)),this.config.onDone):[],g=sn(this.invoke.map(function(I){var R=[];return I.onDone&&R.push.apply(R,Gt([],vt(bc(String(Tf(I.id)),I.onDone)),!1)),I.onError&&R.push.apply(R,Gt([],vt(bc(String(Fc(I.id)),I.onError)),!1)),R})),v=this.after,C=sn(Gt(Gt(Gt(Gt([],vt(m),!1),vt(g),!1),vt(o),!1),vt(h),!1).map(function(I){return bo(I).map(function(R){return r.formatTransition(R)})}));try{for(var b=lt(v),E=b.next();!E.done;E=b.next()){var x=E.value;C.push(x)}}catch(I){t={error:I}}finally{try{E&&!E.done&&(n=b.return)&&n.call(b)}finally{if(t)throw t.error}}return C},e})();function Uu(e,t){return new pce(e,t)}var _s=A9,qy=C9,mce=T9,gce=_.useLayoutEffect;function v5(e){var t=_.useRef();return t.current||(t.current={v:e()}),t.current.v}var mv=function(){return mv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},mv.apply(this,arguments)},vce=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},yce=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(c){a={error:c}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s};function bce(e,t){var n=v5(function(){return typeof e=="function"?e():e}),r=t.context,o=t.guards,s=t.actions,a=t.activities,c=t.services,u=t.delays;t.state;var f=vce(t,["context","guards","actions","activities","services","delays","state"]),h=v5(function(){var m={context:r,guards:o,actions:s,activities:a,services:c,delays:u},g=n.withConfig(m,function(){return mv(mv({},n.context),r)});return L9(g,f)});return gce(function(){Object.assign(h.machine.options.actions,s),Object.assign(h.machine.options.guards,o),Object.assign(h.machine.options.activities,a),Object.assign(h.machine.options.services,c),Object.assign(h.machine.options.delays,u)},[s,o,a,c,u]),h}function Sce(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=yce(t,2),o=r[0],s=o===void 0?{}:o,a=r[1],c=bce(e,s);return _.useEffect(function(){if(a){var u=c.subscribe(Rf(a));return function(){u.unsubscribe()}}},[a]),_.useEffect(function(){var u=s.state;return c.start(u?So.create(u):void 0),function(){c.stop(),c.status=_n.NotStarted}},[]),c}function Cce(e){return e.status!==0?e.getSnapshot():e.machine.initialState}function wce(e){return"state"in e&&"machine"in e}function Ece(e){return"state"in e}var xce=function(e,t){return e===t},_ce=function(e,t){if(wce(e)){if(e.status===0&&t.current)return t.current;var n=Cce(e);return t.current=e.status===0?n:null,n}return Ece(e)?e.state:void 0};function Ice(e,t,n,r){n===void 0&&(n=xce);var o=_.useRef(null),s=_.useCallback(function(u){var f=e.subscribe(u).unsubscribe;return f},[e]),a=_.useCallback(function(){return _ce(e,o)},[e,r]),c=a9.useSyncExternalStoreWithSelector(s,a,a,t,n);return c}const Ace=e=>{if(e instanceof ao)return e;if(e instanceof Error){if(e.name==="InvalidStateError"){const{message:t,recoverySuggestion:n}=ru[Dt.PasskeyAlreadyExists];return new ao({name:Dt.PasskeyAlreadyExists,message:t,recoverySuggestion:n,underlyingError:e})}if(e.name==="NotAllowedError"){const{message:t,recoverySuggestion:n}=ru[Dt.PasskeyRegistrationCanceled];return new ao({name:Dt.PasskeyRegistrationCanceled,message:t,recoverySuggestion:n,underlyingError:e})}}return JF(e)},Rce=async e=>{try{const t=XF();Au(t,Dt.PasskeyNotSupported);const n=AJ(e),r=await navigator.credentials.create({publicKey:n});return PJ(r),RJ(r)}catch(t){throw Ace(t)}},Tce=e=>Cn(kn,Nn("StartWebAuthnRegistration"),Gn(),{...Dn,...e}),Oce=e=>Cn(kn,Nn("CompleteWebAuthnRegistration"),Gn(),{...Dn,...e});async function Mce(){const e=Ut.getConfig().Auth?.Cognito;et(e);const{userPoolEndpoint:t,userPoolId:n}=e,{tokens:r}=await my();Iu(r);const o=Tce({endpointResolver:ft({endpointOverride:t})}),{CredentialCreationOptions:s}=await o({region:dt(n),userAgentValue:It(Ve.StartWebAuthnRegistration)},{AccessToken:r.accessToken.toString()});MJ(s);const a=await Rce(s);await Oce({endpointResolver:ft({endpointOverride:t})})({region:dt(n),userAgentValue:It(Ve.CompleteWebAuthnRegistration)},{AccessToken:r.accessToken.toString(),Credential:a})}const Pce=e=>Cn(kn,Nn("ListWebAuthnCredentials"),Gn(),{...Dn,...e});async function Nce(e,t){const n=e.getConfig().Auth?.Cognito;et(n);const{userPoolEndpoint:r,userPoolId:o}=n,{tokens:s}=await e.Auth.fetchAuthSession();Iu(s);const a=Pce({endpointResolver:ft({endpointOverride:r})}),{Credentials:c=[],NextToken:u}=await a({region:dt(o),userAgentValue:It(Ve.ListWebAuthnCredentials)},{AccessToken:s.accessToken.toString(),MaxResults:t?.pageSize,NextToken:t?.nextToken});return{credentials:c.map(h=>({credentialId:h.CredentialId,friendlyCredentialName:h.FriendlyCredentialName,relyingPartyId:h.RelyingPartyId,authenticatorAttachment:h.AuthenticatorAttachment,authenticatorTransports:h.AuthenticatorTransports,createdAt:h.CreatedAt?new Date(h.CreatedAt*1e3):void 0})),nextToken:u}}async function AR(e){return Nce(Ut,e)}const RR=e=>e.context.actorRef?.getSnapshot(),Gf=e=>RR(e)?.context,kce={category:lo.AI,apis:[Ts.CreateConversation,Ts.DeleteConversation,Ts.ListConversations,Ts.UpdateConversation,Ts.OnMessage,Ts.SendMessage,Ts.Generation]},Dce={apis:[Ve.DeleteUser,Ve.UpdatePassword],category:lo.Auth},Lce={apis:[Ve.SignUp,Ve.ConfirmSignUp,Ve.ResendSignUpCode,Ve.SignIn,Ve.ConfirmSignIn,Ve.FetchUserAttributes,Ve.SignOut,Ve.ResetPassword,Ve.ConfirmResetPassword,Ve.SignInWithRedirect],category:lo.Auth},Uce={apis:[Co.UploadData],category:lo.Storage},Fce={apis:[y_.NotifyMessageInteraction],category:lo.InAppMessaging},$ce={category:lo.Geo,apis:[xf.SearchByText,xf.SearchForSuggestions,xf.SearchByPlaceId]},zce={category:lo.Geo,apis:[]},jce={apis:[Co.UploadData],category:lo.Storage},Bce={apis:[Co.UploadData,Co.Copy,Co.GetUrl,Co.List,Co.Remove,Co.GetDataAccess,Co.ListCallerAccessGrants],category:lo.Storage};function zr(e){return e!=null&&!Array.isArray(e)&&typeof e=="object"}function zs(e){return typeof e=="string"||typeof e=="object"&&Object.prototype.toString.call(e)==="[object String]"}function Hce(e){return zr(e)&&Object.prototype.toString.call(e)==="[object Map]"}function qce(e){return zr(e)&&Object.prototype.toString.call(e)==="[object Set]"}function TR(e){if(e==null)return!0;if(zr(e)&&(Hce(e)||qce(e)))return!e.size;if(zr(e)&&(zs(e)||Array.isArray(e)))return!e.length;for(const t in e)if(js(e,t))return!1;return!0}function Vce(e){return Array.isArray(e)&&TR(e)}function Wce(...e){return e.every(Vce)}function U9(e){return zr(e)&&TR(e)}function Gce(...e){return e.every(U9)}function js(e,t){return e!=null&&Object.prototype.hasOwnProperty.call(e,t)}function Bs(e){return typeof e=="function"}const Lt=(e,t)=>t?`${e}--${t}`:"",br=(e,t,n)=>n?`${e}--${t}`:"";function Kce(...e){}function Zce(e,t){const n={},r={};return Object.entries(e).forEach(([o,s])=>{t(o)?n[o]=s:r[o]=s}),[n,r]}const F9=({payload:e},t,n)=>{const{data:r,event:o}=e,{send:s}=t,{onSignIn:a,onSignOut:c}=n??{};switch(o){case"signedIn":{Bs(a)&&a(e);break}case"signInWithRedirect":{s("SIGN_IN_WITH_REDIRECT");break}case"signedOut":{Bs(c)&&c(),s("SIGN_OUT");break}case"tokenRefresh_failure":{if(r?.error?.name===Gi.NetworkError)return;s("SIGN_OUT");break}}},Yce=(e,t=F9)=>{const n=r=>t(r,e);return Ko.listen("auth",n,"authenticator-hub-handler")},$9=["+1","+7","+20","+27","+30","+31","+32","+33","+34","+36","+39","+40","+41","+43","+44","+45","+46","+47","+48","+49","+51","+52","+53","+54","+55","+56","+57","+58","+60","+61","+62","+63","+64","+65","+66","+81","+82","+84","+86","+90","+91","+92","+93","+94","+95","+98","+212","+213","+216","+218","+220","+221","+222","+223","+224","+225","+226","+227","+228","+229","+230","+231","+232","+233","+234","+235","+236","+237","+238","+239","+240","+241","+242","+243","+244","+245","+246","+248","+249","+250","+251","+252","+253","+254","+255","+256","+257","+258","+260","+261","+262","+263","+264","+265","+266","+267","+268","+269","+290","+291","+297","+298","+299","+345","+350","+351","+352","+353","+354","+355","+356","+357","+358","+359","+370","+371","+372","+373","+374","+375","+376","+377","+378","+379","+380","+381","+382","+385","+386","+387","+389","+420","+421","+423","+500","+501","+502","+503","+504","+505","+506","+507","+508","+509","+537","+590","+591","+593","+594","+595","+596","+597","+598","+599","+670","+672","+673","+674","+675","+676","+677","+678","+679","+680","+681","+682","+683","+685","+686","+687","+688","+689","+690","+691","+692","+850","+852","+853","+855","+856","+872","+880","+886","+960","+961","+962","+963","+964","+965","+966","+967","+968","+970","+971","+972","+973","+974","+975","+976","+977","+992","+993","+994","+995","+996","+998"],Vy={birthdate:{label:"Birthdate",placeholder:"Enter your Birthdate",type:"date",autocomplete:"bday",isRequired:!0},confirmation_code:{label:"Confirmation Code",placeholder:"Enter your Confirmation Code",type:"text",autocomplete:"one-time-code",isRequired:!0},confirm_password:{label:"Confirm Password",placeholder:"Please confirm your Password",type:"password",autocomplete:"new-password",isRequired:!0},email:{label:"Email",placeholder:"Enter your Email",type:"email",autocomplete:"username",isRequired:!0},family_name:{label:"Family Name",placeholder:"Enter your Family Name",type:"text",autocomplete:"family-name",isRequired:!0},given_name:{label:"Given Name",placeholder:"Enter your Given Name",type:"text",autocomplete:"given-name",isRequired:!0},middle_name:{label:"Middle Name",placeholder:"Enter your Middle Name",type:"text",autocomplete:"additional-name",isRequired:!0},name:{label:"Name",placeholder:"Enter your Name",type:"text",autocomplete:"name",isRequired:!0},nickname:{label:"Nickname",placeholder:"Enter your Nickname",type:"text",autocomplete:"tel",isRequired:!0},password:{label:"Password",placeholder:"Enter your Password",type:"password",autocomplete:"new-password",isRequired:!0},phone_number:{label:"Phone Number",placeholder:"Enter your Phone Number",type:"tel",autocomplete:"tel",dialCode:"+1",dialCodeList:$9,isRequired:!0},preferred_username:{label:"Preferred Username",placeholder:"Enter your Preferred Username",type:"text",isRequired:!0},profile:{label:"Profile",placeholder:"Add your Profile",type:"url",autocomplete:"url",isRequired:!0},website:{label:"Website",placeholder:"Add your Website",type:"url",autocomplete:"url",isRequired:!0},username:{label:"Username",placeholder:"Enter your Username",type:"text",autocomplete:"username",isRequired:!0}},Qce=["^","$","*",".","[","]","{","}","(",")","?",'"',"!","@","#","%","&","/","\\",",",">","<","'",":",";","|","_","~","`","=","+","-"," "],Jce=(e,t)=>{if(t?.matches("federatedSignIn")){if(e.matches("signUpActor"))return"signUp";if(e.matches("signInActor"))return"signIn"}switch(!0){case e.matches("idle"):return"idle";case e.matches("setup"):return"setup";case e.matches("signOut"):return"signOut";case e.matches("authenticated"):return"authenticated";case t?.matches("confirmSignUp"):case t?.matches("resendSignUpCode"):return"confirmSignUp";case t?.matches("confirmSignIn"):return"confirmSignIn";case t?.matches("setupTotp.edit"):case t?.matches("setupTotp.submit"):return"setupTotp";case t?.matches("signIn.submit"):return t?.context.selectedAuthMethod!=null?"signInSelectAuthFactor":"signIn";case t?.matches("signIn.selectMethod"):return"signInSelectAuthFactor";case t?.matches("passkeyPrompt"):return"passkeyPrompt";case t?.matches("signIn"):return"signIn";case t?.matches("signUp"):case t?.matches("autoSignIn"):return"signUp";case t?.matches("forceChangePassword"):return"forceNewPassword";case t?.matches("forgotPassword"):return"forgotPassword";case t?.matches("confirmResetPassword"):return"confirmResetPassword";case t?.matches("selectUserAttributes"):return"verifyUser";case t?.matches("confirmVerifyUserAttribute"):return"confirmVerifyUser";case t?.matches("setupEmail"):return"setupEmail";case t?.matches("selectMfaType"):return"selectMfaType";case e.matches("getCurrentUser"):case t?.matches("fetchUserAttributes"):return"transition";default:return null}},Xce=e=>{const t=n=>r=>e({type:n,data:r});return{initializeMachine:t("INIT"),resendCode:t("RESEND"),selectAuthMethod:t("SELECT_METHOD"),signOut:t("SIGN_OUT"),submitForm:t("SUBMIT"),toShowAuthMethods:t("SHOW_AUTH_METHODS"),updateForm:t("CHANGE"),updateBlur:t("BLUR"),toFederatedSignIn:t("FEDERATED_SIGN_IN"),toForgotPassword:t("FORGOT_PASSWORD"),toSignIn:t("SIGN_IN"),toSignUp:t("SIGN_UP"),skipVerification:t("SKIP")}},eue=e=>{const t=Gf(e)??{},{allowedMfaTypes:n,availableAuthMethods:r,challengeName:o,codeDeliveryDetails:s,preferredChallenge:a,remoteError:c,selectedAuthMethod:u,validationError:f,totpSecretCode:h=null,unverifiedUserAttributes:m,username:g}=t,{socialProviders:v=[],loginMechanisms:C}=e.context?.config??{},b=C?.[0],E=t?.user??e.context?.user,x=!!(f&&Object.keys(f).length>0),I=RR(e),R=e.hasTag("pending")||I?.hasTag("pending"),O=Jce(e,I),D=(M=>{switch(M){case"idle":case"setup":return"configuring";case"authenticated":return"authenticated";default:return"unauthenticated"}})(O);return{allowedMfaTypes:n,authStatus:D,availableAuthMethods:r,challengeName:o,codeDeliveryDetails:s,error:c,hasValidationErrors:x,isPending:R,loginMechanism:b,preferredChallenge:a,route:O,selectedAuthMethod:u,socialProviders:v,totpSecretCode:h,unverifiedUserAttributes:m,user:E,username:g,validationErrors:f}},tue=({send:e,state:t})=>{const n=Xce(e),r=eue(t);return{...n,...r}};var $c;(function(e){e.Apple="Apple",e.Amazon="Amazon",e.Facebook="Facebook",e.Google="Google"})($c||($c={}));var y5;(function(e){e.Email="email",e.PhoneNumber="phone_number"})(y5||(y5={}));const nue=["birthdate","email","family_name","given_name","middle_name","name","nickname","phone_number","preferred_username","profile","website"],rue=["username","email","phone_number"],z9=[...rue,...nue,"confirmation_code","password","confirm_password"],oue=e=>z9.includes(e),j9=e=>z9.includes(e),sue=e=>Array.isArray(e),iue=e=>e?sue(e)?e:[e]:null,aue=e=>{const t=e.trim().split("");for(let n=0;n<t.length;n++)n>0&&n<t.length-1&&(t[n]="*");return t.join("")},lue=e=>{if(e.length<4)return e;const t=e.split("");for(let n=0;n<t.length-4;n++)t[n]="*";return t.join("")},cue=e=>{const t=e.split("@");return`${aue(t[0])}@${t[1]}`},uue=(e,t)=>e==="Phone Number"?lue(t):cue(t),due=e=>Qce.some(t=>e.includes(t)),fue=(e,t,n)=>encodeURI(`otpauth://totp/${e}:${t}?secret=${n}&issuer=${e}`);function hue(e,...t){return Object.entries(e).reduce((n,[r,o])=>({...n,[r]:t.includes(r)?o:o?.trim()}),{})}const pue={ADD_PROFILE:"Add your Profile",ADD_WEBSITE:"Add your Website",BACK_SIGN_IN:"Back to Sign In",BIRTHDATE:"Birthdate",CHANGE_PASSWORD:"Change Password",CHANGING_PASSWORD:"Changing",CODE:"Code",CODE_ARRIVAL:"It may take a minute to arrive",CODE_EMAILED:"Your code is on the way. To log in, enter the code we emailed to",CODE_SENT:"Your code is on the way. To log in, enter the code we sent you",CODE_TEXTED:"Your code is on the way. To log in, enter the code we texted to",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Please confirm your Password",CONFIRM_RESET_PASSWORD_HEADING:"Reset your Password",CONFIRM_SIGNUP_HEADING:"Confirm Sign Up",CONFIRM_SMS:"Confirm SMS Code",CONFIRM_EMAIL:"Confirm Email Code",CONFIRM_MFA_DEFAULT:"Confirm MFA Code",CONFIRM_TOTP:"Confirm TOTP Code",CONFIRM:"Confirm",CONFIRMATION_CODE:"Confirmation Code",CONFIRMING:"Confirming",CONTINUE:"Continue",CONTINUE_WITHOUT_PASSKEY:"Continue without a Passkey",CREATE_ACCOUNT:"Create Account",CREATE_ACCOUNT_WITH_EMAIL_OTP:"Create account with Email OTP",CREATE_ACCOUNT_WITH_PASSWORD:"Create account with Password",CREATE_ACCOUNT_WITH_SMS_OTP:"Create account with SMS OTP",CREATE_PASSKEY:"Create a Passkey",CREATING_ACCOUNT:"Creating Account",EMAIL_ADDRESS:"Email",EMAIL_OTP:"Email Message",ENTER_BIRTHDATE:"Enter your Birthdate",ENTER_CODE:"Enter your code",ENTER_CONFIRMATION_CODE:"Enter your Confirmation Code",ENTER_EMAIL:"Enter your Email",ENTER_FAMILY_NAME:"Enter your Family Name",ENTER_GIVEN_NAME:"Enter your Given Name",ENTER_MIDDLE_NAME:"Enter your Middle Name",ENTER_NAME:"Enter your Name",ENTER_NICK_NAME:"Enter your Nickname",ENTER_PASSWORD:"Enter your Password",ENTER_PHONE_NUMBER:"Enter your Phone Number",ENTER_PREFERRED_USERNAME:"Enter your Preferred Username",ENTER_USERNAME:"Enter your username",ENTER_USERNAME_FIRST:"Please enter your username first",EXISTING_PASSKEYS:"Existing Passkeys",FAMILY_NAME:"Family Name",GIVEN_NAME:"Given Name",FORGOT_PASSWORD:"Forgot Password?",FORGOT_YOUR_PASSWORD:"Forgot your password?",HIDE_PASSWORD:"Hide password",LOADING:"Loading",LOGIN_NAME:"Username",MIDDLE_NAME:"Middle Name",MFA_SETUP_SELECTION:"Multi-Factor Authentication Setup",MFA_SELECTION:"Multi-Factor Authentication",NAME:"Name",NICKNAME:"Nickname",NEW_PASSWORD:"New password",OR:"or",OTHER_SIGN_IN_OPTIONS:"Other sign-in options",PASSKEY_AUTHENTICATION_CANCELED:"Passkey authentication was canceled. Please try again or use a different sign-in method.",PASSKEY_CREATED_SUCCESS:"Passkey created successfully!",PASSKEY_LABEL:"Passkey",PASSKEY_PROMPT_DESCRIPTION:"Passkeys are WebAuthn credentials that validate your identity using biometric data like touch or facial recognition or device authentication like passwords or PINs, serving as a secure password replacement.",PASSKEY_PROMPT_HEADING:"Sign in faster with Passkey",PASSKEY_REGISTERED:"Your passkey has been successfully registered.",PASSKEY_REGISTRATION_FAILED:"Failed to create passkey. Please try again.",PASSWORD:"Password",PASSWORDLESS_NOT_ENABLED:"Passwordless authentication is not enabled for this account. Please contact your administrator or use password sign-in.",PHONE_NUMBER:"Phone Number",PREFERRED_USERNAME:"Preferred Username",PROFILE:"Profile",REGISTERING:"Registering",RESEND_CODE:"Resend Code",RESET_PASSWORD_HEADING:"Reset your password",RESET_PASSWORD:"Reset Password",SEND_CODE:"Send code",CODE_DELIVERY_FAILED:"Unable to send verification code. Please try again.",VERIFICATION_CODE_EXPIRED:"Your verification code has expired. Please request a new code.",VERIFICATION_CODE_INVALID:"The verification code you entered is incorrect. Please try again.",SENDING:"Sending",SELECT_MFA_TYPE:"Select MFA Type",SETUP_ANOTHER_PASSKEY:"Setup another Passkey",SETUP_EMAIL:"Setup Email",SETUP_TOTP:"Setup TOTP",SHOW_PASSWORD:"Show password",SIGN_IN_BUTTON:"Sign in",SIGN_IN_TAB:"Sign In",SIGN_IN_WITH_AMAZON:"Sign In with Amazon",SIGN_IN_WITH_APPLE:"Sign In with Apple",SIGN_IN_WITH_EMAIL:"Sign In with Email",SIGN_IN_WITH_FACEBOOK:"Sign In with Facebook",SIGN_IN_WITH_GOOGLE:"Sign In with Google",SIGN_IN_WITH_PASSKEY:"Sign In with Passkey",SIGN_IN_WITH_PASSWORD:"Sign In with Password",SIGN_IN_WITH_SMS:"Sign In with SMS",SIGN_IN:"Sign in to your account",SIGN_UP_BUTTON:"Create a new account",SIGNING_IN_BUTTON:"Signing in",SKIP:"Skip",SMS_MFA:"Text Message (SMS)",SUBMIT:"Submit",SUBMITTING:"Submitting",SOFTWARE_TOKEN_MFA:"Authenticator App (TOTP)",UPPERCASE_COPY:"COPY",USERNAME:"Username",VERIFY_CONTACT:"Verify Contact",VERIFY_HEADING:"Account recovery requires verified contact information",VERIFY:"Verify",WE_EMAILED:"We Emailed You",WE_SENT_CODE:"We Sent A Code",WE_TEXTED:"We Texted You",WEBSITE:"Website"},$g={...pue},Ee={...$g};function ye(e){return jF.get(e)}const OR=e=>{const t=e?.context.config?.loginMechanisms,[n]=t??["username"];return n},mue=e=>{const t={...e};for(const[n,r]of Object.entries(e)){const{label:o,placeholder:s}=r;t[n]={...r,label:o?ye(o):void 0,placeholder:s?ye(s):void 0}}return t},gue=e=>Object.entries(e).sort((t,n)=>{const r=t[1].order||Number.MAX_VALUE,o=n[1].order||Number.MAX_VALUE;return r-o}).filter(t=>t[1]!==void 0),vue="+1",Hs=e=>{let t=Vy[e];const{type:n}=t;return n==="tel"&&(t={...t,dialCode:vue}),t},Wy=e=>{const t=OR(e);return{...Hs(t),autocomplete:"username"}},zg=e=>({confirmation_code:{...Hs("confirmation_code"),label:"Code *",placeholder:"Code"}}),yue=e=>{const t=e.context.actorRef?.getSnapshot()?.context,n=t?.availableAuthMethods,r=t?.preferredChallenge,o=!n?.length||n.length===1&&n[0]==="PASSWORD"||n.length>1&&(!r||r==="PASSWORD"),s={username:{...Wy(e)}};return o&&(s.password={...Hs("password"),autocomplete:"current-password"}),s},bue=e=>{const{loginMechanisms:t,signUpAttributes:n}=e.context.config,r=OR(e),s=e.context.actorRef?.getSnapshot()?.context?.availableAuthMethods,a=s&&s.length>1,c=Array.from(new Set([...t,"password","confirm_password",...n])),u={};for(const f of c)if(j9(f)){const h=f===r?Wy(e):Hs(f),m=a&&(f==="email"||f==="phone_number"||f==="password"||f==="confirm_password");u[f]={...h,...m&&{isRequired:!1}}}else console.debug(`Authenticator does not have a default implementation for ${f}. Customize SignUp FormFields to add your own.`);return u},Sue=e=>({confirmation_code:{...Hs("confirmation_code"),placeholder:"Enter your code"}}),Cue=e=>{const t=OR(e),{label:n}=Vy[t];return{username:{...Wy(e),label:`Enter your ${n.toLowerCase()}`,placeholder:`Enter your ${n.toLowerCase()}`}}},wue=e=>({...zg(),password:{...Hs("password"),label:"New Password",placeholder:"New Password"},confirm_password:{...Hs("confirm_password"),label:"Confirm Password",placeholder:"Confirm Password"}}),Eue=e=>{const t=RR(e),{missingAttributes:n}=t.context,r=Array.from(new Set(["password","confirm_password",...n??[]])),o={};for(const s of r)j9(s)?o[s]={...Hs(s)}:console.debug(`Authenticator does not have a default implementation for ${s}. Customize ForceNewPassword FormFields to add your own.`);return o},xue=e=>({email:Hs("email")}),_ue={signIn:yue,signUp:bue,confirmSignUp:Sue,confirmSignIn:zg,forceNewPassword:Eue,forgotPassword:Cue,confirmResetPassword:wue,confirmVerifyUser:zg,setupEmail:xue,setupTotp:zg},Iue=(e,t)=>{const n=_ue[e];return n(t)},Aue=(e,t)=>{const n=Gf(t)?.formFields?.[e];return!n||Object.keys(n).length===0?{}:Object.entries(n).reduce((r,[o,s])=>{if((e==="signIn"||e==="forgotPassword")&&o==="username"){const c={...Wy(t),...s};return{...r,[o]:c}}else if(oue(o)){const c={...Vy[o],...s};return{...r,[o]:c}}else return{...r,[o]:s}},{})},Rue=(e,t)=>{const n=Iue(e,t),r=Aue(e,t),o={...n,...r};return delete o.QR,mue(o)},Tue=e=>e.map(t=>{const n=t[0],r={...t[1],order:void 0};return[n,r]}),Oue=(e,t)=>{const n=Rue(e,t);return Tue(gue(n))},Mue=e=>{switch(e){case"EMAIL_OTP":return ye(Ee.CONFIRM_EMAIL);case"SMS_MFA":return ye(Ee.CONFIRM_SMS);case"SOFTWARE_TOKEN_MFA":return ye(Ee.CONFIRM_TOTP);default:return ye(Ee.CONFIRM_MFA_DEFAULT)}},Pue=e=>{const{DeliveryMedium:t,Destination:n}=e??{},r=t==="EMAIL",o=t==="SMS",s=ye(Ee.CODE_ARRIVAL);return r||o?`${ye(r?Ee.CODE_EMAILED:Ee.CODE_TEXTED)} ${n}. ${s}.`:`${ye(Ee.CODE_SENT)}. ${s}.`},Nue=e=>{const{DeliveryMedium:t}=e??{},n=t==="EMAIL";return ye(!n&&t==="SMS"?Ee.WE_SENT_CODE:n?Ee.WE_EMAILED:Ee.WE_TEXTED)},kue={amazon:"Amazon",apple:"Apple",facebook:"Facebook",google:"Google"},Due=(e,t)=>ye(`Sign ${e==="signIn"?"In":"Up"} with ${kue[t]}`),Lue=e=>ye(e==="MFA_SETUP"?Ee.MFA_SETUP_SELECTION:Ee.MFA_SELECTION),Uue=e=>{switch(e){case"email":return ye(Ee.EMAIL_ADDRESS);case"phone_number":return ye(Ee.PHONE_NUMBER);default:return ye(Ee.USERNAME)}},Fue=e=>{switch(e){case"EMAIL":return ye($g.EMAIL_OTP);case"SMS":return ye($g.SMS_MFA);case"TOTP":return ye($g.SOFTWARE_TOKEN_MFA);default:return ye(e)}},Rn={getBackToSignInText:()=>ye(Ee.BACK_SIGN_IN),getChangePasswordText:()=>ye(Ee.CHANGE_PASSWORD),getChangingText:()=>ye(Ee.CHANGING_PASSWORD),getConfirmText:()=>ye(Ee.CONFIRM),getConfirmingText:()=>ye(Ee.CONFIRMING),getContinueText:()=>ye(Ee.CONTINUE),getCopyText:()=>ye(Ee.UPPERCASE_COPY),getHidePasswordText:()=>ye(Ee.HIDE_PASSWORD),getLoadingText:()=>ye(Ee.LOADING),getOrText:()=>ye(Ee.OR),getResendCodeText:()=>ye(Ee.RESEND_CODE),getSendCodeText:()=>ye(Ee.SEND_CODE),getSendingText:()=>ye(Ee.SENDING),getShowPasswordText:()=>ye(Ee.SHOW_PASSWORD),getSubmitText:()=>ye(Ee.SUBMIT),getSubmittingText:()=>ye(Ee.SUBMITTING),getSignInTabText:()=>ye(Ee.SIGN_IN_TAB),getSignUpTabText:()=>ye(Ee.CREATE_ACCOUNT),getForgotPasswordText:e=>ye(e?Ee.FORGOT_PASSWORD:Ee.FORGOT_YOUR_PASSWORD),getSigningInText:()=>ye(Ee.SIGNING_IN_BUTTON),getSignInText:()=>ye(Ee.SIGN_IN_BUTTON),getCreatingAccountText:()=>ye(Ee.CREATING_ACCOUNT),getCreateAccountText:()=>ye(Ee.CREATE_ACCOUNT),getCreateAccountWithEmailText:()=>ye(Ee.CREATE_ACCOUNT_WITH_EMAIL_OTP),getCreateAccountWithPasswordText:()=>ye(Ee.CREATE_ACCOUNT_WITH_PASSWORD),getCreateAccountWithSmsText:()=>ye(Ee.CREATE_ACCOUNT_WITH_SMS_OTP),getDeliveryMessageText:Pue,getDeliveryMethodText:Nue,getChallengeText:Mue,getResetYourPasswordText:()=>ye(Ee.RESET_PASSWORD),getSetupEmailText:()=>ye(Ee.SETUP_EMAIL),getSetupTotpText:()=>ye(Ee.SETUP_TOTP),getSetupTotpInstructionsText:()=>ye("Copy and paste the secret key below into an authenticator app and then enter the code in the text field below."),getCopiedText:()=>ye("COPIED"),getSignInWithFederationText:Due,getMfaTypeLabelByValue:Fue,getSelectMfaTypeByChallengeName:Lue,getSelectMfaTypeText:()=>ye(Ee.SELECT_MFA_TYPE),getSkipText:()=>ye(Ee.SKIP),getVerifyText:()=>ye(Ee.VERIFY),getVerifyContactText:()=>ye(Ee.VERIFY_CONTACT),getAccountRecoveryInfoText:()=>ye(Ee.VERIFY_HEADING),getPasskeyPromptHeadingText:()=>ye(Ee.PASSKEY_PROMPT_HEADING),getPasskeyPromptDescriptionText:()=>ye(Ee.PASSKEY_PROMPT_DESCRIPTION),getCreatePasskeyText:()=>ye(Ee.CREATE_PASSKEY),getRegisteringText:()=>ye(Ee.REGISTERING),getContinueWithoutPasskeyText:()=>ye(Ee.CONTINUE_WITHOUT_PASSKEY),getPasskeyCreatedSuccessText:()=>ye(Ee.PASSKEY_CREATED_SUCCESS),getPasskeyRegisteredText:()=>ye(Ee.PASSKEY_REGISTERED),getPasskeyRegistrationFailedText:()=>ye(Ee.PASSKEY_REGISTRATION_FAILED),getPasskeyLabelText:()=>ye(Ee.PASSKEY_LABEL),getExistingPasskeysText:()=>ye(Ee.EXISTING_PASSKEYS),getSetupAnotherPasskeyText:()=>ye(Ee.SETUP_ANOTHER_PASSKEY),getSignInWithPasswordText:()=>ye(Ee.SIGN_IN_WITH_PASSWORD),getSignInWithEmailText:()=>ye(Ee.SIGN_IN_WITH_EMAIL),getSignInWithSmsText:()=>ye(Ee.SIGN_IN_WITH_SMS),getSignInWithPasskeyText:()=>ye(Ee.SIGN_IN_WITH_PASSKEY),getOtherSignInOptionsText:()=>ye(Ee.OTHER_SIGN_IN_OPTIONS),getEnterUsernameFirstText:()=>ye(Ee.ENTER_USERNAME_FIRST),getUsernameLabelByLoginMechanism:Uue,getInvalidEmailText:()=>ye("Please enter a valid email"),getRequiredFieldText:()=>ye("This field is required")};var Ow,b5;function B9(){if(b5)return Ow;b5=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,s=Array(o);++r<o;)s[r]=n(t[r],r,t);return s}return Ow=e,Ow}var Mw,S5;function $ue(){if(S5)return Mw;S5=1;var e=pR(),t=i9(),n=1,r=2;function o(s,a,c,u){var f=c.length,h=f,m=!u;if(s==null)return!h;for(s=Object(s);f--;){var g=c[f];if(m&&g[2]?g[1]!==s[g[0]]:!(g[0]in s))return!1}for(;++f<h;){g=c[f];var v=g[0],C=s[v],b=g[1];if(m&&g[2]){if(C===void 0&&!(v in s))return!1}else{var E=new e;if(u)var x=u(C,b,v,s,a,E);if(!(x===void 0?t(b,C,n|r,u,E):x))return!1}}return!0}return Mw=o,Mw}var Pw,C5;function H9(){if(C5)return Pw;C5=1;var e=Ys();function t(n){return n===n&&!e(n)}return Pw=t,Pw}var Nw,w5;function zue(){if(w5)return Nw;w5=1;var e=H9(),t=s9();function n(r){for(var o=t(r),s=o.length;s--;){var a=o[s],c=r[a];o[s]=[a,c,e(c)]}return o}return Nw=n,Nw}var kw,E5;function q9(){if(E5)return kw;E5=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return kw=e,kw}var Dw,x5;function jue(){if(x5)return Dw;x5=1;var e=$ue(),t=zue(),n=q9();function r(o){var s=t(o);return s.length==1&&s[0][2]?n(s[0][0],s[0][1]):function(a){return a===o||e(a,o,s)}}return Dw=r,Dw}var Lw,_5;function MR(){if(_5)return Lw;_5=1;var e=Du(),t=wl(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return Lw=r,Lw}var Uw,I5;function PR(){if(I5)return Uw;I5=1;var e=Qs(),t=MR(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(s,a){if(e(s))return!1;var c=typeof s;return c=="number"||c=="symbol"||c=="boolean"||s==null||t(s)?!0:r.test(s)||!n.test(s)||a!=null&&s in Object(a)}return Uw=o,Uw}var Fw,A5;function Bue(){if(A5)return Fw;A5=1;var e=hR(),t="Expected a function";function n(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var s=function(){var a=arguments,c=o?o.apply(this,a):a[0],u=s.cache;if(u.has(c))return u.get(c);var f=r.apply(this,a);return s.cache=u.set(c,f)||u,f};return s.cache=new(n.Cache||e),s}return n.Cache=e,Fw=n,Fw}var $w,R5;function Hue(){if(R5)return $w;R5=1;var e=Bue(),t=500;function n(r){var o=e(r,function(a){return s.size===t&&s.clear(),a}),s=o.cache;return o}return $w=n,$w}var zw,T5;function que(){if(T5)return zw;T5=1;var e=Hue(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(o){var s=[];return o.charCodeAt(0)===46&&s.push(""),o.replace(t,function(a,c,u,f){s.push(u?f.replace(n,"$1"):c||a)}),s});return zw=r,zw}var jw,O5;function Vue(){if(O5)return jw;O5=1;var e=Dy(),t=B9(),n=Qs(),r=MR(),o=e?e.prototype:void 0,s=o?o.toString:void 0;function a(c){if(typeof c=="string")return c;if(n(c))return t(c,a)+"";if(r(c))return s?s.call(c):"";var u=c+"";return u=="0"&&1/c==-1/0?"-0":u}return jw=a,jw}var Bw,M5;function NR(){if(M5)return Bw;M5=1;var e=Vue();function t(n){return n==null?"":e(n)}return Bw=t,Bw}var Hw,P5;function Gy(){if(P5)return Hw;P5=1;var e=Qs(),t=PR(),n=que(),r=NR();function o(s,a){return e(s)?s:t(s,a)?[s]:n(r(s))}return Hw=o,Hw}var qw,N5;function Oh(){if(N5)return qw;N5=1;var e=MR();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return qw=t,qw}var Vw,k5;function kR(){if(k5)return Vw;k5=1;var e=Gy(),t=Oh();function n(r,o){o=e(o,r);for(var s=0,a=o.length;r!=null&&s<a;)r=r[t(o[s++])];return s&&s==a?r:void 0}return Vw=n,Vw}var Ww,D5;function Wue(){if(D5)return Ww;D5=1;var e=kR();function t(n,r,o){var s=n==null?void 0:e(n,r);return s===void 0?o:s}return Ww=t,Ww}var Gw,L5;function Gue(){if(L5)return Gw;L5=1;function e(t,n){return t!=null&&n in Object(t)}return Gw=e,Gw}var Kw,U5;function Kue(){if(U5)return Kw;U5=1;var e=Gy(),t=mR(),n=Qs(),r=Fy(),o=vR(),s=Oh();function a(c,u,f){u=e(u,c);for(var h=-1,m=u.length,g=!1;++h<m;){var v=s(u[h]);if(!(g=c!=null&&f(c,v)))break;c=c[v]}return g||++h!=m?g:(m=c==null?0:c.length,!!m&&o(m)&&r(v,m)&&(n(c)||t(c)))}return Kw=a,Kw}var Zw,F5;function Zue(){if(F5)return Zw;F5=1;var e=Gue(),t=Kue();function n(r,o){return r!=null&&t(r,o,e)}return Zw=n,Zw}var Yw,$5;function Yue(){if($5)return Yw;$5=1;var e=i9(),t=Wue(),n=Zue(),r=PR(),o=H9(),s=q9(),a=Oh(),c=1,u=2;function f(h,m){return r(h)&&o(m)?s(a(h),m):function(g){var v=t(g,h);return v===void 0&&v===m?n(g,h):e(m,v,c|u)}}return Yw=f,Yw}var Qw,z5;function DR(){if(z5)return Qw;z5=1;function e(t){return t}return Qw=e,Qw}var Jw,j5;function Que(){if(j5)return Jw;j5=1;function e(t){return function(n){return n?.[t]}}return Jw=e,Jw}var Xw,B5;function Jue(){if(B5)return Xw;B5=1;var e=kR();function t(n){return function(r){return e(r,n)}}return Xw=t,Xw}var eE,H5;function Xue(){if(H5)return eE;H5=1;var e=Que(),t=Jue(),n=PR(),r=Oh();function o(s){return n(s)?e(r(s)):t(s)}return eE=o,eE}var tE,q5;function ede(){if(q5)return tE;q5=1;var e=jue(),t=Yue(),n=DR(),r=Qs(),o=Xue();function s(a){return typeof a=="function"?a:a==null?n:typeof a=="object"?r(a)?t(a[0],a[1]):e(a):o(a)}return tE=s,tE}var nE,V5;function V9(){if(V5)return nE;V5=1;var e=Cl(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return nE=t,nE}var rE,W5;function LR(){if(W5)return rE;W5=1;var e=V9();function t(n,r,o){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[r]=o}return rE=t,rE}var oE,G5;function W9(){if(G5)return oE;G5=1;var e=LR(),t=Rh(),n=Object.prototype,r=n.hasOwnProperty;function o(s,a,c){var u=s[a];(!(r.call(s,a)&&t(u,c))||c===void 0&&!(a in s))&&e(s,a,c)}return oE=o,oE}var sE,K5;function tde(){if(K5)return sE;K5=1;var e=W9(),t=Gy(),n=Fy(),r=Ys(),o=Oh();function s(a,c,u,f){if(!r(a))return a;c=t(c,a);for(var h=-1,m=c.length,g=m-1,v=a;v!=null&&++h<m;){var C=o(c[h]),b=u;if(C==="__proto__"||C==="constructor"||C==="prototype")return a;if(h!=g){var E=v[C];b=f?f(E,C,v):void 0,b===void 0&&(b=r(E)?E:n(c[h+1])?[]:{})}e(v,C,b),v=v[C]}return a}return sE=s,sE}var iE,Z5;function nde(){if(Z5)return iE;Z5=1;var e=kR(),t=tde(),n=Gy();function r(o,s,a){for(var c=-1,u=s.length,f={};++c<u;){var h=s[c],m=e(o,h);a(m,h)&&t(f,n(h,o),m)}return f}return iE=r,iE}var aE,Y5;function UR(){if(Y5)return aE;Y5=1;var e=o9(),t=e(Object.getPrototypeOf,Object);return aE=t,aE}var lE,Q5;function rde(){if(Q5)return lE;Q5=1;var e=Xz(),t=UR(),n=n9(),r=t9(),o=Object.getOwnPropertySymbols,s=o?function(a){for(var c=[];a;)e(c,n(a)),a=t(a);return c}:r;return lE=s,lE}var cE,J5;function ode(){if(J5)return cE;J5=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return cE=e,cE}var uE,X5;function sde(){if(X5)return uE;X5=1;var e=Ys(),t=bR(),n=ode(),r=Object.prototype,o=r.hasOwnProperty;function s(a){if(!e(a))return n(a);var c=t(a),u=[];for(var f in a)f=="constructor"&&(c||!o.call(a,f))||u.push(f);return u}return uE=s,uE}var dE,eL;function FR(){if(eL)return dE;eL=1;var e=r9(),t=sde(),n=$y();function r(o){return n(o)?e(o,!0):t(o)}return dE=r,dE}var fE,tL;function ide(){if(tL)return fE;tL=1;var e=e9(),t=rde(),n=FR();function r(o){return e(o,n,t)}return fE=r,fE}var hE,nL;function ade(){if(nL)return hE;nL=1;var e=B9(),t=ede(),n=nde(),r=ide();function o(s,a){if(s==null)return{};var c=e(r(s),function(u){return[u]});return a=t(a),n(s,c,function(u,f){return a(u,f[0])})}return hE=o,hE}var lde=ade();const cde=Eu(lde),ude=!0,dde="",Kf=(e,t)=>`${e}${t}`.replace(/[^A-Z0-9+]/gi,""),fde=(e,t)=>{switch(t){case"address":case"birthdate":case"email":case"family_name":case"gender":case"given_name":case"locale":case"middle_name":case"name":case"nickname":case"phone_number":case"picture":case"preferred_username":case"profile":case"updated_at":case"website":case"zoneinfo":return!0;default:return t.startsWith("custom:")}},hde=e=>{const{phone_number:t,...n}=cde(e,fde);if(zs(t)&&t!==dde){const{country_code:r}=e;return{...n,phone_number:Kf(r,t)}}return n},pde=(e,t,n,r)=>{const{password:o,...s}=t,a=hde(s),c=r&&r!=="PASSWORD";let u=a;r==="SMS_OTP"&&a.email&&(u={...a,email:""});const f={autoSignIn:c?{enabled:!0,authFlowType:"USER_AUTH",preferredChallenge:r}:ude,userAttributes:{...n==="phone_number"?{...u,phone_number:e}:u}};return{username:e,password:c?void 0:o,options:f}},mde=({formValues:e,loginMechanisms:t})=>{const n=e.__authMethod;if(n==="SMS_OTP"){const{country_code:o,phone_number:s}=e;return Kf(o,s)}if(n==="EMAIL_OTP")return e.email;if(t.includes("username"))return e.username;const r=t[0];if(r==="phone_number"){const{country_code:o,phone_number:s}=e;return Kf(o,s)}return e[r]},gde=(e,t)=>{const n=[],r=t!==void 0;n.push("PASSWORD"),(r||e?.emailOtpEnabled)&&n.push("EMAIL_OTP"),(r||e?.smsOtpEnabled)&&n.push("SMS_OTP"),(r||e?.webAuthnEnabled)&&n.push("WEB_AUTHN");const o=t??[],s=n.filter(a=>!o.includes(a));if(s.length===0)throw new Error("InvalidPasswordlessSettings: All authentication methods are hidden");return s},{assign:Qe}=O9,vde=Qe({actorDoneData:void 0}),yde=Qe({challengeName:void 0}),bde=Qe({missingAttributes:void 0}),Sde=Qe({remoteError:void 0}),Cde=Qe({formValues:e=>({username:e.formValues?.username})}),wde=Qe({touched:{}}),Ede=Qe({user:void 0}),xde=Qe({validationError:{}}),_de=Qe({totpSecretCode:(e,{data:t})=>{const{sharedSecret:n}=t.nextStep?.totpSetupDetails??{};return n}}),Ide=Qe({allowedMfaTypes:(e,{data:t})=>t.nextStep?.allowedMFATypes}),Ade=Qe({step:"SIGN_IN"}),Rde=Qe({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),Tde=Qe({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),Ode=Qe({challengeName:(e,{data:t})=>{const{signInStep:n}=t.nextStep;switch(n){case"CONFIRM_SIGN_IN_WITH_SMS_CODE":return"SMS_MFA";case"CONFIRM_SIGN_IN_WITH_TOTP_CODE":return"SOFTWARE_TOKEN_MFA";case"CONFIRM_SIGN_IN_WITH_EMAIL_CODE":return"EMAIL_OTP";case"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION":case"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP":case"CONTINUE_SIGN_IN_WITH_TOTP_SETUP":return"MFA_SETUP";case"CONTINUE_SIGN_IN_WITH_MFA_SELECTION":return"SELECT_MFA_TYPE";default:return}}}),Mde=Qe({username:({formValues:e,loginMechanisms:t})=>{const n=t[0],{username:r,country_code:o}=e;return n==="phone_number"?Kf(o,r):r}}),Pde=Qe({username:mde}),Nde=Qe({username:({formValues:e,loginMechanisms:t})=>{const n=t[0],{username:r,country_code:o}=e;return n==="phone_number"?Kf(o,r):r}}),kde=Qe({step:(e,{data:t})=>t.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":t.nextStep.signInStep}),Dde=Qe({step:(e,{data:t})=>t.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":t.nextStep.signUpStep}),Lde=Qe({step:(e,{data:t})=>t.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":t.nextStep.resetPasswordStep}),Ude=Qe({missingAttributes:(e,{data:t})=>t.nextStep?.missingAttributes}),Fde=Qe({validationError:(e,{data:t})=>t}),$de=Qe({remoteError:(e,{data:t})=>{if(t.name==="NoUserPoolError")return"Configuration error (see console) – please contact the administrator";const n=t?.message||"";return n.includes("USER_AUTH flow not enabled")?ye(Ee.PASSWORDLESS_NOT_ENABLED):n.includes("Cannot send code to either")?ye(Ee.CODE_DELIVERY_FAILED):n.includes("Invalid code or auth state")?ye(Ee.VERIFICATION_CODE_INVALID):n.includes("session is expired")?ye(Ee.VERIFICATION_CODE_EXPIRED):n.includes("ceremony has been canceled")?ye(Ee.PASSKEY_AUTHENTICATION_CANCELED):n||t}}),zde=Qe({user:(e,{data:t})=>t}),rL=e=>({Destination:e.destination,DeliveryMedium:e.deliveryMedium,AttributeName:e.attributName}),jde=Qe({codeDeliveryDetails:(e,{data:t})=>t?.nextStep?.codeDeliveryDetails?rL(t.nextStep.codeDeliveryDetails):rL(t)}),Bde=Qe({formValues:(e,{data:t})=>{const{name:n,value:r}=t;return{...e.formValues,[n]:r}}}),Hde=Qe({formValues:(e,{data:t})=>hue({...e.formValues,...t},"password")}),qde=Qe({touched:(e,{data:t})=>({...e.touched,[t.name]:!0})}),Vde=Qe({unverifiedUserAttributes:(e,{data:t})=>{const n=t||e.fetchedUserAttributes;if(!n)return{};const{email:r,phone_number:o}=n;return{...r&&{email:r},...o&&{phone_number:o}}}}),Wde=Qe({selectedUserAttribute:void 0}),Gde=Qe({selectedUserAttribute:e=>e.formValues?.unverifiedAttr}),Kde=Qe({step:"CONFIRM_SIGN_UP"}),Zde=Qe({selectedAuthMethod:(e,{data:t})=>t.method}),Yde=Qe({selectedAuthMethod:(e,{data:t})=>t?.__authMethod||"PASSWORD"}),Qde=Qe({step:"SELECT_AUTH_METHOD"}),Jde=Qe({fetchedUserAttributes:(e,t)=>t.data}),Xde=Qe({hasExistingPasskeys:(e,t)=>t.data}),efe=Qe({hasExistingPasskeys:!1}),Mh={clearActorDoneData:vde,clearChallengeName:yde,clearError:Sde,clearFormValues:Cde,clearHasExistingPasskeys:efe,clearMissingAttributes:bde,clearSelectedUserAttribute:Wde,clearTouched:wde,clearUser:Ede,clearValidationError:xde,handleBlur:qde,handleInput:Bde,handleSubmit:Hde,setAllowedMfaTypes:Ide,setChallengeName:Ode,setCodeDeliveryDetails:jde,setFetchedUserAttributes:Jde,setFieldErrors:Fde,setHasExistingPasskeys:Xde,setMissingAttributes:Ude,setNextResetPasswordStep:Lde,setNextSignInStep:kde,setNextSignUpStep:Dde,setRemoteError:$de,setConfirmAttributeCompleteStep:Tde,setConfirmSignUpSignUpStep:Kde,setSelectAuthMethodStep:Qde,setSelectedAuthMethod:Zde,setSelectedAuthMethodFromForm:Yde,setShouldVerifyUserAttributeStep:Rde,setSelectedUserAttribute:Gde,setSignInStep:Ade,setTotpSecretCode:_de,setUser:zde,setUnverifiedUserAttributes:Vde,setUsernameForgotPassword:Mde,setUsernameSignIn:Nde,setUsernameSignUp:Pde},tfe=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],nfe=(e,{data:t})=>t?.nextStep.signInStep==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",rfe=(e,{data:t})=>t?.nextStep?.signInStep==="RESET_PASSWORD",ofe=(e,{data:t})=>t?.nextStep.signInStep==="CONFIRM_SIGN_UP",sfe=(e,{data:t})=>t?.nextStep.signUpStep==="COMPLETE_AUTO_SIGN_IN",ife=(e,{data:t})=>t?.nextStep.signUpStep==="DONE"&&e.step==="CONFIRM_SIGN_UP",afe=(e,{data:t})=>t?.nextStep.signInStep==="DONE",lfe=(e,{data:t})=>t?.nextStep.signUpStep==="DONE",cfe=(e,{data:t})=>t?.nextStep.resetPasswordStep==="DONE",ufe=(e,{data:t})=>t?.step==="CONFIRM_ATTRIBUTE_COMPLETE",dfe=(e,{data:t})=>t?.step==="CONFIRM_ATTRIBUTE_WITH_CODE",ffe=(e,{data:t})=>t?.step==="SHOULD_CONFIRM_USER_ATTRIBUTE",hfe=(e,{data:t})=>t?.step==="RESET_PASSWORD",pfe=(e,{data:t})=>t?.step==="CONFIRM_SIGN_UP",mfe=({step:e})=>tfe.includes(e),gfe=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",vfe=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",yfe=({step:e})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(e),bfe=({step:e})=>e==="RESET_PASSWORD",Sfe=({step:e})=>e==="CONFIRM_RESET_PASSWORD_WITH_CODE",Cfe=({step:e})=>e==="CONFIRM_SIGN_UP",wfe=(e,t)=>{const n=t.data||e.fetchedUserAttributes;if(!n)return!1;const{email:r,phone_number:o,phone_number_verified:s,email_verified:a}=n;return!r&&!o?!1:(a===void 0||a==="false")&&(s===void 0||s==="false")},Efe=(e,{data:t})=>t.message==="User is already confirmed.",xfe=({availableAuthMethods:e,preferredChallenge:t,selectedAuthMethod:n})=>e&&e.length>1&&(!t||n===null),_fe=({passwordless:e,hasExistingPasskeys:t})=>{const{passkeyRegistrationPrompts:n}=e||{};return!n||t?!1:typeof n=="boolean"?n:n.afterSignin==="ALWAYS"},Ife=({passwordless:e,hasExistingPasskeys:t})=>{const{passkeyRegistrationPrompts:n}=e||{};return!n||t?!1:typeof n=="boolean"?n:n.afterSignup==="ALWAYS"},Afe=({passwordless:e})=>e?.passkeyRegistrationPrompts!=null,Rfe=({selectedAuthMethod:e,step:t})=>e!=null&&t==="SELECT_AUTH_METHOD",Ky={hasCompletedAttributeConfirmation:ufe,hasCompletedResetPassword:cfe,hasCompletedSignIn:afe,hasCompletedSignUp:lfe,hasPasskeyRegistrationPrompts:Afe,isConfirmSignUpStep:pfe,isConfirmUserAttributeStep:dfe,isResetPasswordStep:hfe,isShouldConfirmUserAttributeStep:ffe,isUserAlreadyConfirmed:Efe,shouldAutoSignIn:sfe,shouldManualSignIn:ife,shouldConfirmResetPassword:Sfe,shouldConfirmSignIn:mfe,shouldConfirmSignInWithNewPassword:nfe,shouldConfirmSignUp:Cfe,shouldConfirmSignUpFromSignIn:ofe,shouldResetPassword:bfe,shouldResetPasswordFromSignIn:rfe,shouldReturnToSelectMethod:Rfe,shouldSelectAuthMethod:xfe,shouldSetupTotp:gfe,shouldSetupEmail:vfe,shouldSelectMfaType:yfe,shouldVerifyAttribute:wfe,shouldPromptPasskeyRegistration:_fe,shouldPromptPasskeyRegistrationAfterSignup:Ife};var pE,oL;function G9(){if(oL)return pE;oL=1;var e=LR(),t=Rh();function n(r,o,s){(s!==void 0&&!t(r[o],s)||s===void 0&&!(o in r))&&e(r,o,s)}return pE=n,pE}var mE,sL;function Tfe(){if(sL)return mE;sL=1;function e(t){return function(n,r,o){for(var s=-1,a=Object(n),c=o(n),u=c.length;u--;){var f=c[t?u:++s];if(r(a[f],f,a)===!1)break}return n}}return mE=e,mE}var gE,iL;function Ofe(){if(iL)return gE;iL=1;var e=Tfe(),t=e();return gE=t,gE}var bf={exports:{}};bf.exports;var aL;function Mfe(){return aL||(aL=1,(function(e,t){var n=ts(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===r,a=s?n.Buffer:void 0,c=a?a.allocUnsafe:void 0;function u(f,h){if(h)return f.slice();var m=f.length,g=c?c(m):new f.constructor(m);return f.copy(g),g}e.exports=u})(bf,bf.exports)),bf.exports}var vE,lL;function Pfe(){if(lL)return vE;lL=1;var e=Jz();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return vE=t,vE}var yE,cL;function Nfe(){if(cL)return yE;cL=1;var e=Pfe();function t(n,r){var o=r?e(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}return yE=t,yE}var bE,uL;function kfe(){if(uL)return bE;uL=1;function e(t,n){var r=-1,o=t.length;for(n||(n=Array(o));++r<o;)n[r]=t[r];return n}return bE=e,bE}var SE,dL;function Dfe(){if(dL)return SE;dL=1;var e=Ys(),t=Object.create,n=(function(){function r(){}return function(o){if(!e(o))return{};if(t)return t(o);r.prototype=o;var s=new r;return r.prototype=void 0,s}})();return SE=n,SE}var CE,fL;function Lfe(){if(fL)return CE;fL=1;var e=Dfe(),t=UR(),n=bR();function r(o){return typeof o.constructor=="function"&&!n(o)?e(t(o)):{}}return CE=r,CE}var wE,hL;function Ufe(){if(hL)return wE;hL=1;var e=$y(),t=wl();function n(r){return t(r)&&e(r)}return wE=n,wE}var EE,pL;function Ffe(){if(pL)return EE;pL=1;var e=Du(),t=UR(),n=wl(),r="[object Object]",o=Function.prototype,s=Object.prototype,a=o.toString,c=s.hasOwnProperty,u=a.call(Object);function f(h){if(!n(h)||e(h)!=r)return!1;var m=t(h);if(m===null)return!0;var g=c.call(m,"constructor")&&m.constructor;return typeof g=="function"&&g instanceof g&&a.call(g)==u}return EE=f,EE}var xE,mL;function K9(){if(mL)return xE;mL=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return xE=e,xE}var _E,gL;function $fe(){if(gL)return _E;gL=1;var e=W9(),t=LR();function n(r,o,s,a){var c=!s;s||(s={});for(var u=-1,f=o.length;++u<f;){var h=o[u],m=a?a(s[h],r[h],h,s,r):void 0;m===void 0&&(m=r[h]),c?t(s,h,m):e(s,h,m)}return s}return _E=n,_E}var IE,vL;function zfe(){if(vL)return IE;vL=1;var e=$fe(),t=FR();function n(r){return e(r,t(r))}return IE=n,IE}var AE,yL;function jfe(){if(yL)return AE;yL=1;var e=G9(),t=Mfe(),n=Nfe(),r=kfe(),o=Lfe(),s=mR(),a=Qs(),c=Ufe(),u=gR(),f=dR(),h=Ys(),m=Ffe(),g=yR(),v=K9(),C=zfe();function b(E,x,I,R,O,D,N){var M=v(E,I),L=v(x,I),$=N.get(L);if($){e(E,I,$);return}var G=D?D(M,L,I+"",E,x,N):void 0,j=G===void 0;if(j){var F=a(L),q=!F&&u(L),J=!F&&!q&&g(L);G=L,F||q||J?a(M)?G=M:c(M)?G=r(M):q?(j=!1,G=t(L,!0)):J?(j=!1,G=n(L,!0)):G=[]:m(L)||s(L)?(G=M,s(M)?G=C(M):(!h(M)||f(M))&&(G=o(L))):j=!1}j&&(N.set(L,G),O(G,L,R,D,N),N.delete(L)),e(E,I,G)}return AE=b,AE}var RE,bL;function Bfe(){if(bL)return RE;bL=1;var e=pR(),t=G9(),n=Ofe(),r=jfe(),o=Ys(),s=FR(),a=K9();function c(u,f,h,m,g){u!==f&&n(f,function(v,C){if(g||(g=new e),o(v))r(u,f,C,h,c,m,g);else{var b=m?m(a(u,C),v,C+"",u,f,g):void 0;b===void 0&&(b=v),t(u,C,b)}},s)}return RE=c,RE}var TE,SL;function Hfe(){if(SL)return TE;SL=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return TE=e,TE}var OE,CL;function qfe(){if(CL)return OE;CL=1;var e=Hfe(),t=Math.max;function n(r,o,s){return o=t(o===void 0?r.length-1:o,0),function(){for(var a=arguments,c=-1,u=t(a.length-o,0),f=Array(u);++c<u;)f[c]=a[o+c];c=-1;for(var h=Array(o+1);++c<o;)h[c]=a[c];return h[o]=s(f),e(r,this,h)}}return OE=n,OE}var ME,wL;function Vfe(){if(wL)return ME;wL=1;function e(t){return function(){return t}}return ME=e,ME}var PE,EL;function Wfe(){if(EL)return PE;EL=1;var e=Vfe(),t=V9(),n=DR(),r=t?function(o,s){return t(o,"toString",{configurable:!0,enumerable:!1,value:e(s),writable:!0})}:n;return PE=r,PE}var NE,xL;function Gfe(){if(xL)return NE;xL=1;var e=800,t=16,n=Date.now;function r(o){var s=0,a=0;return function(){var c=n(),u=t-(c-a);if(a=c,u>0){if(++s>=e)return arguments[0]}else s=0;return o.apply(void 0,arguments)}}return NE=r,NE}var kE,_L;function Kfe(){if(_L)return kE;_L=1;var e=Wfe(),t=Gfe(),n=t(e);return kE=n,kE}var DE,IL;function Zfe(){if(IL)return DE;IL=1;var e=DR(),t=qfe(),n=Kfe();function r(o,s){return n(t(o,s,e),o+"")}return DE=r,DE}var LE,AL;function Yfe(){if(AL)return LE;AL=1;var e=Rh(),t=$y(),n=Fy(),r=Ys();function o(s,a,c){if(!r(c))return!1;var u=typeof a;return(u=="number"?t(c)&&n(a,c.length):u=="string"&&a in c)?e(c[a],s):!1}return LE=o,LE}var UE,RL;function Qfe(){if(RL)return UE;RL=1;var e=Zfe(),t=Yfe();function n(r){return e(function(o,s){var a=-1,c=s.length,u=c>1?s[c-1]:void 0,f=c>2?s[2]:void 0;for(u=r.length>3&&typeof u=="function"?(c--,u):void 0,f&&t(s[0],s[1],f)&&(u=c<3?void 0:u,c=1),o=Object(o);++a<c;){var h=s[a];h&&r(o,h,a,u)}return o})}return UE=n,UE}var FE,TL;function Jfe(){if(TL)return FE;TL=1;var e=Bfe(),t=Qfe(),n=t(function(r,o,s){e(r,o,s)});return FE=n,FE}var Xfe=Jfe();const ehe=Eu(Xfe),Zy=async(e,t,n,r)=>{const o=await Promise.all(r.map(a=>a(e,t,n))),s=ehe({},...o);return TR(s)?Promise.resolve():Promise.reject(s)},the=8,nhe=e=>Array.isArray(e),rhe=e=>{if(e)return nhe(e)?Object.entries(e).map(([t,n])=>Object.keys(n)[0]):Object.keys(e)},Zi={async getAmplifyConfig(){const e=C$.getConfig(),t=e.Auth?.Cognito,{loginWith:n,userAttributes:r}=e.Auth?.Cognito??{},o=n?Object.entries(n).filter(([f,h])=>f!=="oauth").filter(([f,h])=>!!h).map(f=>f[0]==="phone"?"phone_number":f[0]):void 0,s=rhe(r),a=n?.oauth?.providers?n.oauth.providers?.map(f=>f.toString().toLowerCase()):void 0,c=e.Auth?.Cognito?.passwordless,u={emailOtpEnabled:c?.emailOtpEnabled??c?.email_otp_enabled===!0,smsOtpEnabled:c?.smsOtpEnabled??c?.sms_otp_enabled===!0,webAuthnEnabled:!!(c?.webAuthn??c?.web_authn),preferredChallenge:c?.preferredChallenge??c?.preferred_challenge};return{...t,loginMechanisms:o,signUpAttributes:s,socialProviders:a,passwordlessCapabilities:u}},getCurrentUser:yy,handleSignIn:WA,handleSignUp:fee,handleConfirmSignIn:d$,handleConfirmSignUp:bee,handleForgotPasswordSubmit:mee,handleForgotPassword:u$,handleResendSignUpCode:vee,async validateCustomSignUp(e,t){},async validateFormPassword(e,t,n){const{password:r}=e,{password:o}=t;if(!o||!n)return null;const s=[],a=n.minLength??the;return r.length<a&&s.push(`Password must have at least ${a} characters`),n.requireLowercase&&!/[a-z]/.test(r)&&s.push("Password must have lower case letters"),n.requireUppercase&&!/[A-Z]/.test(r)&&s.push("Password must have upper case letters"),n.requireNumbers&&!/[0-9]/.test(r)&&s.push("Password must have numbers"),n.requireSpecialCharacters&&!due(r)&&s.push("Password must have special characters"),s.length!==0?{password:s}:null},async validateConfirmPassword(e,t){const{password:n,confirm_password:r}=e,{confirm_password:o,password:s}=t;if(!n&&!r)return null;if((n||r)&&n!==r&&(o&&s||n?.length>=6&&r?.length>=6))return{confirm_password:"Your passwords must match"}},async validatePreferredUsername(e,t){},async validateRequiredFieldsForAuthMethod(e){const t=e.__authMethod;if(!t)return null;if(t==="EMAIL_OTP"&&!e.email)return{email:"Email is required for Email OTP sign up"};if(t==="SMS_OTP"&&!e.phone_number)return{phone_number:"Phone number is required for SMS OTP sign up"};if(t==="PASSWORD"){const n={};return e.password||(n.password="Password is required"),e.confirm_password||(n.confirm_password="Confirm Password is required"),Object.keys(n).length>0?n:null}return null}};function ohe({services:e}){return Uu({id:"forgotPasswordActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldResetPassword",target:"confirmResetPassword"},{cond:"shouldConfirmResetPassword",target:"confirmResetPassword"},{target:"forgotPassword"}]},forgotPassword:{initial:"edit",entry:"sendUpdate",exit:["clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},submit:{tags:"pending",entry:["sendUpdate","clearError","setUsernameForgotPassword"],invoke:{src:"handleResetPassword",onDone:{actions:["setCodeDeliveryDetails","setNextResetPasswordStep"],target:"#forgotPasswordActor.confirmResetPassword"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmResetPassword:{type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"},RESEND:"resendCode",CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},resendCode:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleResetPassword",onDone:{target:"idle"},onError:{actions:"setRemoteError",target:"idle"}}},pending:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleConfirmResetPassword",onDone:[{cond:"hasCompletedResetPassword",actions:"setNextResetPasswordStep",target:"#forgotPasswordActor.resolved"},{actions:"setSignInStep",target:"#forgotPasswordActor.resolved"}],onError:{actions:"setRemoteError",target:"idle"}}}}}}},resolved:{type:"final",data:({step:t})=>({step:t})}}},{actions:{...Mh,sendUpdate:qy()},guards:Ky,services:{handleResetPassword({username:t}){return e.handleForgotPassword({username:t})},handleConfirmResetPassword({formValues:t,username:n}){const{confirmation_code:r,password:o}=t;return e.handleForgotPasswordSubmit({confirmationCode:r,newPassword:o,username:n})},validateFields(t){return Zy(t.formValues,t.touched,t.passwordSettings,[Zi.validateFormPassword,Zi.validateConfirmPassword])}}})}const Z9=e=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:e},onError:{actions:"setRemoteError",target:e}}}),she=e=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(e)?"mfa_type":e==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"?"email":"confirmation_code",jg={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signInActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:["setMissingAttributes","setNextSignInStep"],target:"#signInActor.forceChangePassword"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resendSignUpCode"},{actions:["setChallengeName","setMissingAttributes","setNextSignInStep","setTotpSecretCode","setAllowedMfaTypes","setCodeDeliveryDetails"],target:"#signInActor.init"}],onError:{actions:"setRemoteError",target:"edit"}},Om=e=>({initial:"edit",exit:e,states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"},RESEND:{target:"resend"}}},submit:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"confirmSignIn",...jg}},resend:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"resendSignInCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"edit"},onError:{actions:"setRemoteError",target:"edit"}}}}});function ihe({services:e}){return Uu({id:"signInActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignIn",target:"confirmSignIn"},{cond:"shouldSetupTotp",target:"setupTotp"},{cond:"shouldSetupEmail",target:"setupEmail"},{cond:"shouldSelectMfaType",target:"selectMfaType"},{cond:({step:t})=>t==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",actions:"setActorDoneData",target:"forceChangePassword"},{target:"signIn"}]},federatedSignIn:{...Z9("signIn")},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const t=await AR();return t.credentials&&t.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistration",target:"#signInActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signInActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}]},resendSignUpCode:{invoke:{src:"handleResendSignUpCode",onDone:{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"#signInActor.signIn"}}},resetPassword:{invoke:{src:"resetPassword",onDone:[{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}}},signIn:{initial:"edit",exit:"clearTouched",states:{edit:{entry:"sendUpdate",on:{CHANGE:{actions:"handleInput"},FEDERATED_SIGN_IN:{target:"#signInActor.federatedSignIn"},SHOW_AUTH_METHODS:{actions:"setUsernameSignIn",target:"selectMethod"},SUBMIT:[{cond:"shouldSelectAuthMethod",actions:"handleSubmit",target:"selectMethod"},{actions:"handleSubmit",target:"submit"}]}},selectMethod:{entry:["sendUpdate","setSelectAuthMethodStep","setUsernameSignIn"],on:{SELECT_METHOD:{actions:"setSelectedAuthMethod",target:"submit"},SUBMIT:{actions:["handleSubmit","setSelectedAuthMethodFromForm"],target:"submit"},SIGN_IN:{target:"edit"}}},submit:{tags:"pending",entry:["clearError","sendUpdate","setUsernameSignIn"],exit:"clearFormValues",invoke:{src:"handleSignIn",onDone:jg.onDone,onError:[{cond:"shouldReturnToSelectMethod",actions:"setRemoteError",target:"selectMethod"},jg.onError]}}}},confirmSignIn:{...Om(["clearChallengeName","clearFormValues","clearError","clearTouched"])},forceChangePassword:{entry:"sendUpdate",type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{SIGN_IN:{actions:"setSignInStep",target:"#signInActor.resolved"},CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submit:{initial:"edit",entry:"clearError",states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{actions:"clearValidationError",target:"pending"},onError:{actions:"setFieldErrors",target:"edit"}}},pending:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"handleForceChangePassword",...jg}}}}}},setupTotp:{...Om(["clearFormValues","clearError","clearTouched"])},setupEmail:{...Om(["clearFormValues","clearError","clearTouched"])},selectMfaType:{...Om(["clearFormValues","clearError","clearTouched"])},passkeyPrompt:{entry:"sendUpdate",on:{SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:t=>({codeDeliveryDetails:t.codeDeliveryDetails,remoteError:t.remoteError,step:t.step,unverifiedUserAttributes:t.unverifiedUserAttributes,username:t.username})}}},{actions:{...Mh,sendUpdate:qy()},guards:Ky,services:{async fetchUserAttributes(){return v$()},resetPassword({username:t}){return u$({username:t})},handleResendSignUpCode({username:t}){return e.handleResendSignUpCode({username:t})},resendSignInCode({username:t,selectedAuthMethod:n,availableAuthMethods:r,preferredChallenge:o}){const s=n??o??r?.[0]??"PASSWORD";return e.handleSignIn({username:t,options:{authFlowType:"USER_AUTH",preferredChallenge:s}})},handleSignIn({formValues:t,username:n,selectedAuthMethod:r,availableAuthMethods:o,preferredChallenge:s}){const a=r??s??o?.[0]??"PASSWORD";if(a==="PASSWORD"){const{password:c}=t;return e.handleSignIn({username:n,password:c})}else return e.handleSignIn({username:n,options:{authFlowType:"USER_AUTH",preferredChallenge:a}})},confirmSignIn({formValues:t,step:n}){const r=she(n),{[r]:o}=t;return e.handleConfirmSignIn({challengeResponse:o})},async handleForceChangePassword({formValues:t}){let{password:n,phone_number:r,country_code:o,confirm_password:s,username:a,...c}=t,u;return r&&(u=`${o}${r}`.replace(/[^A-Z0-9+]/gi,""),c={...c,phone_number:u}),d$({challengeResponse:n,options:{userAttributes:c}})},signInWithRedirect(t,{data:n}){return g$(n)},async validateFields(t){return Zy(t.formValues,t.touched,t.passwordSettings,[Zi.validateFormPassword,Zi.validateConfirmPassword])}}})}const ahe={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},lhe={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signUpActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:"setNextSignInStep",target:"#signUpActor.resolved"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resendSignUpCode"},{actions:["setNextSignInStep","setChallengeName","setMissingAttributes","setTotpSecretCode","setAllowedMfaTypes"],target:"#signUpActor.resolved"}],onError:{actions:"setRemoteError",target:"#signUpActor.resolved"}};function che({services:e}){return Uu({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...lhe}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const t=await AR();return t.credentials&&t.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistrationAfterSignup",target:"#signUpActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signUpActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}]},federatedSignIn:{...Z9("signUp")},resetPassword:{invoke:{src:"resetPassword",...ahe}},resendSignUpCode:{tags:"pending",entry:"sendUpdate",exit:"sendUpdate",invoke:{src:"resendSignUpCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"#signUpActor.confirmSignUp"},onError:[{cond:"isUserAlreadyConfirmed",target:"#signUpActor.resolved"},{actions:["setRemoteError","sendUpdate"],target:"#signUpActor.confirmSignUp"}]}},signUp:{type:"parallel",exit:"clearTouched",on:{FEDERATED_SIGN_IN:{target:"federatedSignIn"}},states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateSignUp",onDone:{actions:"clearValidationError",target:"valid"},onError:{actions:"setFieldErrors",target:"invalid"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{BLUR:{actions:"handleBlur",target:".pending"},CHANGE:{actions:"handleInput",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:["sendUpdate"],on:{SUBMIT:{actions:["setSelectedAuthMethodFromForm","handleSubmit"],target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateSignUp",onDone:{target:"handleSignUp",actions:"clearValidationError"},onError:{actions:"setFieldErrors",target:"idle"}}},handleSignUp:{tags:"pending",entry:["setUsernameSignUp","clearError"],exit:"sendUpdate",invoke:{src:"handleSignUp",onDone:[{cond:"hasCompletedSignUp",actions:"setNextSignUpStep",target:"#signUpActor.resolved"},{cond:"shouldAutoSignIn",actions:"setNextSignUpStep",target:"#signUpActor.autoSignIn"},{actions:["setCodeDeliveryDetails","setNextSignUpStep"],target:"#signUpActor.init"}],onError:{actions:["sendUpdate","setRemoteError"],target:"idle"}}}}}}},confirmSignUp:{initial:"edit",entry:"sendUpdate",states:{edit:{on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"},RESEND:"#signUpActor.resendSignUpCode"}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmSignUp",onDone:[{cond:"shouldAutoSignIn",actions:["setNextSignUpStep","clearFormValues"],target:"#signUpActor.autoSignIn"},{cond:"shouldManualSignIn",actions:["clearFormValues","setSignInStep"],target:"#signUpActor.resolved"},{actions:"setNextSignUpStep",target:"#signUpActor.init"}],onError:{actions:["setRemoteError","sendUpdate"],target:"edit"}}}}},passkeyPrompt:{entry:"sendUpdate",on:{SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:t=>({challengeName:t.challengeName,missingAttributes:t.missingAttributes,remoteError:t.remoteError,step:t.step,totpSecretCode:t.totpSecretCode,username:t.username,unverifiedUserAttributes:t.unverifiedUserAttributes,allowedMfaTypes:t.allowedMfaTypes})}}},{actions:{...Mh,sendUpdate:qy()},guards:Ky,services:{autoSignIn(){return VA()},async fetchUserAttributes(){return v$()},confirmSignUp({formValues:t,username:n}){const{confirmation_code:r}=t,o={username:n,confirmationCode:r};return e.handleConfirmSignUp(o)},resendSignUpCode({username:t}){return e.handleResendSignUpCode({username:t})},signInWithRedirect(t,{data:n}){return g$(n)},handleSignUp(t){const{formValues:n,loginMechanisms:r,username:o,selectedAuthMethod:s,preferredChallenge:a}=t,c=r[0],f=pde(o,n,c,s??a);return e.handleSignUp(f)},async validateSignUp(t){return Zy(t.formValues,t.touched,t.passwordSettings,[e.validateFormPassword,e.validateConfirmPassword,e.validatePreferredUsername,e.validateRequiredFieldsForAuthMethod,e.validateCustomSignUp])}}})}const uhe=()=>Uu({initial:"pending",id:"signOutActor",predictableActionArguments:!0,states:{pending:{tags:"pending",invoke:{src:"signOut",onDone:"resolved",onError:"rejected"}},resolved:{type:"final"},rejected:{type:"final"}}},{services:{signOut:()=>Yee()}});function dhe(){return Uu({id:"verifyUserAttributesActor",initial:"selectUserAttributes",predictableActionArguments:!0,states:{selectUserAttributes:{initial:"edit",exit:["clearError","clearTouched","sendUpdate"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:{target:"#verifyUserAttributesActor.resolved"},CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"sendUserAttributeVerificationCode",onDone:{actions:["setSelectedUserAttribute","setCodeDeliveryDetails"],target:"#verifyUserAttributesActor.confirmVerifyUserAttribute"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmVerifyUserAttribute:{initial:"edit",exit:["clearError","clearFormValues","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#verifyUserAttributesActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmVerifyUserAttribute",onDone:{actions:["setConfirmAttributeCompleteStep","clearSelectedUserAttribute"],target:"#verifyUserAttributesActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},resolved:{type:"final",data:({step:e})=>({step:e})}}},{actions:{...Mh,sendUpdate:qy()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:e}}){return ete({userAttributeKey:e})},async confirmVerifyUserAttribute({formValues:{confirmation_code:e},selectedUserAttribute:t}){return wee({confirmationCode:e,userAttributeKey:t})},async validateFields(e){return Zy(e.formValues,e.touched,e.passwordSettings,[Zi.validateFormPassword,Zi.validateConfirmPassword])}}})}const Mm=(e,t)=>{const n=gde(e.passwordlessCapabilities,e.config?.passwordless?.hiddenAuthMethods),r=e.config?.passwordless?.preferredAuthMethod??e.passwordlessCapabilities?.preferredChallenge;return{...e.actorDoneData,step:e?.actorDoneData?.step??t,formValues:{},touched:{},validationError:{},formFields:e.config?.formFields,loginMechanisms:e.config?.loginMechanisms,passwordSettings:e.config?.passwordSettings,signUpAttributes:e.config?.signUpAttributes,socialProviders:e.config?.socialProviders,availableAuthMethods:n,preferredChallenge:r,passwordless:e.config?.passwordless}},{choose:fhe,stop:hhe}=O9,Kd=e=>hhe(e),phe={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},mhe={always:{actions:"configure",target:"getConfig"}};function ghe(e){const{useNextWaitConfig:t,...n}=e??{};return Uu({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:Zi,actorRef:void 0,hasSetup:!1},predictableActionArguments:!0,states:{idle:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"setup"},onError:{target:"setup"}}},setup:{initial:"initConfig",states:{initConfig:t?mhe:phe,getConfig:{invoke:{src:"getAmplifyConfig",onDone:[{actions:["applyAmplifyConfig","setHasSetup"],cond:"hasUser",target:"#authenticator.authenticated"},{actions:["applyAmplifyConfig","setHasSetup"],target:"goToInitialState"}]}},goToInitialState:{always:[{cond:"isInitialStateSignUp",target:"#authenticator.signUpActor"},{cond:"isInitialStateResetPassword",target:"#authenticator.forgotPasswordActor"},{target:"#authenticator.signInActor"}]}}},getCurrentUser:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"#authenticator.authenticated"},onError:{target:"#authenticator.setup"}}},signInActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignInActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:Kd("signInActor")}},on:{FORGOT_PASSWORD:"forgotPasswordActor",SELECT_METHOD:{actions:"forwardToActor"},SHOW_AUTH_METHODS:{actions:"forwardToActor"},SIGN_IN:"signInActor",SIGN_UP:"signUpActor","done.invoke.signInActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isResetPasswordStep",actions:"setActorDoneData",target:"#authenticator.forgotPasswordActor"},{cond:"isConfirmSignUpStep",actions:"setActorDoneData",target:"#authenticator.signUpActor"}]}},signUpActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignUpActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:Kd("signUpActor")}},on:{SIGN_IN:"signInActor","done.invoke.signUpActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isConfirmUserAttributeStep",target:"#authenticator.verifyUserAttributesActor"},{actions:"setActorDoneData",target:"#authenticator.signInActor"}]}},forgotPasswordActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnForgotPasswordActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:Kd("forgotPasswordActor")}},on:{SIGN_IN:"signInActor","done.invoke.forgotPasswordActor":[{target:"#authenticator.signInActor"}]}},verifyUserAttributesActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnVerifyUserAttributesActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:Kd("verifyUserAttributesActor")}},on:{"done.invoke.verifyUserAttributesActor":[{actions:"setActorDoneData",target:"#authenticator.getCurrentUser"}]}},authenticated:{initial:"idle",states:{idle:{on:{TOKEN_REFRESH:"refreshUser"}},refreshUser:{invoke:{src:"#authenticator.getCurrentUser",onDone:{actions:"setUser",target:"idle"},onError:{target:"#authenticator.signOut"}}}},on:{SIGN_OUT:"signOut"}},signOut:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignOutActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:Kd("signOutActor")}},on:{"done.invoke.signOutActor":{actions:"clearUser",target:"setup.getConfig"}}}},on:{SIGN_IN_WITH_REDIRECT:{target:"#authenticator.getCurrentUser"},CHANGE:{actions:"forwardToActor"},BLUR:{actions:"forwardToActor"},SUBMIT:{actions:"forwardToActor"},FEDERATED_SIGN_IN:{actions:"forwardToActor"},RESEND:{actions:"forwardToActor"},SIGN_IN:{actions:"forwardToActor"},SKIP:{actions:"forwardToActor"}}},{actions:{...Mh,forwardToActor:fhe([{cond:"hasActor",actions:mce(({actorRef:o})=>o)}]),setActorDoneData:_s({actorDoneData:(o,s)=>({challengeName:s.data.challengeName,codeDeliveryDetails:s.data.codeDeliveryDetails,missingAttributes:s.data.missingAttributes,remoteError:s.data.remoteError,username:s.data.username,step:s.data.step,totpSecretCode:s.data.totpSecretCode,unverifiedUserAttributes:s.data.unverifiedUserAttributes,allowedMfaTypes:s.data.allowedMfaTypes})}),applyAmplifyConfig:_s({passwordlessCapabilities:(o,{data:s})=>s.passwordlessCapabilities,config(o,{data:s}){const{loginMechanisms:a=s.loginMechanisms??[],signUpAttributes:c=s.signUpAttributes??[],socialProviders:u=s.socialProviders??[],initialState:f,formFields:h,passwordSettings:m=s.passwordFormat??{},passwordless:g}=o.config;return a.length===0&&a.push("username"),{formFields:vhe(h)??{},initialState:f,loginMechanisms:a,passwordSettings:m,passwordless:g,signUpAttributes:c,socialProviders:u}}}),spawnSignInActor:_s({actorRef:(o,s)=>{const{services:a}=o,c=ihe({services:a}).withContext(Mm(o,"SIGN_IN"));return Gd(c,{name:"signInActor"})}}),spawnSignUpActor:_s({actorRef:(o,s)=>{const{services:a}=o,c=che({services:a}).withContext(Mm(o,"SIGN_UP"));return Gd(c,{name:"signUpActor"})}}),spawnForgotPasswordActor:_s({actorRef:(o,s)=>{const{services:a}=o,c=ohe({services:a}).withContext(Mm(o,"FORGOT_PASSWORD"));return Gd(c,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:_s({actorRef:o=>{const s=dhe().withContext(Mm(o));return Gd(s,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:_s({actorRef:o=>{const s=uhe().withContext({user:o?.user});return Gd(s,{name:"signOutActor"})}}),configure:_s((o,s)=>{const{services:a,...c}=U9(n)?s.data??{}:n;return{services:{...Zi,...a},config:c}}),setHasSetup:_s({hasSetup:!0})},guards:{...Ky,hasActor:({actorRef:o})=>!!o,isInitialStateSignUp:({config:o})=>o.initialState==="signUp",isInitialStateResetPassword:({config:o})=>o.initialState==="forgotPassword",shouldSetup:({hasSetup:o})=>!o,hasUser:({user:o})=>!!o},services:{getAmplifyConfig:({services:o})=>o.getAmplifyConfig(),handleGetCurrentUser:({services:o})=>o.getCurrentUser()}})}function vhe(e){return e&&Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{let r=e[t][n];r.required=r.isRequired})}),e}const yhe={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},bhe={red:{10:{value:"hsl(0, 75%, 95%)"},20:{value:"hsl(0, 75%, 85%)"},40:{value:"hsl(0, 75%, 75%)"},60:{value:"hsl(0, 50%, 50%)"},80:{value:"hsl(0, 95%, 30%)"},90:{value:"hsl(0, 100%, 20%)"},100:{value:"hsl(0, 100%, 15%)"}},orange:{10:{value:"hsl(30, 75%, 95%)"},20:{value:"hsl(30, 75%, 85%)"},40:{value:"hsl(30, 75%, 75%)"},60:{value:"hsl(30, 50%, 50%)"},80:{value:"hsl(30, 95%, 30%)"},90:{value:"hsl(30, 100%, 20%)"},100:{value:"hsl(30, 100%, 15%)"}},yellow:{10:{value:"hsl(60, 75%, 95%)"},20:{value:"hsl(60, 75%, 85%)"},40:{value:"hsl(60, 75%, 75%)"},60:{value:"hsl(60, 50%, 50%)"},80:{value:"hsl(60, 95%, 30%)"},90:{value:"hsl(60, 100%, 20%)"},100:{value:"hsl(60, 100%, 15%)"}},green:{10:{value:"hsl(130, 60%, 95%)"},20:{value:"hsl(130, 60%, 90%)"},40:{value:"hsl(130, 44%, 63%)"},60:{value:"hsl(130, 43%, 46%)"},80:{value:"hsl(130, 33%, 37%)"},90:{value:"hsl(130, 27%, 29%)"},100:{value:"hsl(130, 22%, 23%)"}},teal:{10:{value:"hsl(190, 75%, 95%)"},20:{value:"hsl(190, 75%, 85%)"},40:{value:"hsl(190, 70%, 70%)"},60:{value:"hsl(190, 50%, 50%)"},80:{value:"hsl(190, 95%, 30%)"},90:{value:"hsl(190, 100%, 20%)"},100:{value:"hsl(190, 100%, 15%)"}},blue:{10:{value:"hsl(220, 95%, 95%)"},20:{value:"hsl(220, 85%, 85%)"},40:{value:"hsl(220, 70%, 70%)"},60:{value:"hsl(220, 50%, 50%)"},80:{value:"hsl(220, 95%, 30%)"},90:{value:"hsl(220, 100%, 20%)"},100:{value:"hsl(220, 100%, 15%)"}},purple:{10:{value:"hsl(300, 95%, 95%)"},20:{value:"hsl(300, 85%, 85%)"},40:{value:"hsl(300, 70%, 70%)"},60:{value:"hsl(300, 50%, 50%)"},80:{value:"hsl(300, 95%, 30%)"},90:{value:"hsl(300, 100%, 20%)"},100:{value:"hsl(300, 100%, 15%)"}},pink:{10:{value:"hsl(340, 95%, 95%)"},20:{value:"hsl(340, 90%, 85%)"},40:{value:"hsl(340, 70%, 70%)"},60:{value:"hsl(340, 50%, 50%)"},80:{value:"hsl(340, 95%, 30%)"},90:{value:"hsl(340, 100%, 20%)"},100:{value:"hsl(340, 100%, 15%)"}},neutral:{10:{value:"hsl(210, 5%, 98%)"},20:{value:"hsl(210, 5%, 94%)"},40:{value:"hsl(210, 5%, 87%)"},60:{value:"hsl(210, 10%, 58%)"},80:{value:"hsl(210, 10%, 40%)"},90:{value:"hsl(210, 25%, 25%)"},100:{value:"hsl(210, 50%, 10%)"}},primary:{10:{value:"{colors.teal.10.value}"},20:{value:"{colors.teal.20.value}"},40:{value:"{colors.teal.40.value}"},60:{value:"{colors.teal.60.value}"},80:{value:"{colors.teal.80.value}"},90:{value:"{colors.teal.90.value}"},100:{value:"{colors.teal.100.value}"}},secondary:{10:{value:"{colors.purple.10.value}"},20:{value:"{colors.purple.20.value}"},40:{value:"{colors.purple.40.value}"},60:{value:"{colors.purple.60.value}"},80:{value:"{colors.purple.80.value}"},90:{value:"{colors.purple.90.value}"},100:{value:"{colors.purple.100.value}"}},font:{primary:{value:"{colors.neutral.100.value}"},secondary:{value:"{colors.neutral.90.value}"},tertiary:{value:"{colors.neutral.80.value}"},disabled:{value:"{colors.neutral.60.value}"},inverse:{value:"{colors.white.value}"},interactive:{value:"{colors.primary.80.value}"},hover:{value:"{colors.primary.90.value}"},focus:{value:"{colors.primary.100.value}"},active:{value:"{colors.primary.100.value}"},info:{value:"{colors.blue.90.value}"},warning:{value:"{colors.orange.90.value}"},error:{value:"{colors.red.90.value}"},success:{value:"{colors.green.90.value}"}},background:{primary:{value:"{colors.white.value}"},secondary:{value:"{colors.neutral.10.value}"},tertiary:{value:"{colors.neutral.20.value}"},quaternary:{value:"{colors.neutral.60.value}"},disabled:{value:"{colors.background.tertiary.value}"},info:{value:"{colors.blue.10.value}"},warning:{value:"{colors.orange.10.value}"},error:{value:"{colors.red.10.value}"},success:{value:"{colors.green.10.value}"}},border:{primary:{value:"{colors.neutral.60.value}"},secondary:{value:"{colors.neutral.40.value}"},tertiary:{value:"{colors.neutral.20.value}"},disabled:{value:"{colors.border.tertiary.value}"},pressed:{value:"{colors.primary.100.value}"},focus:{value:"{colors.primary.100.value}"},error:{value:"{colors.red.80.value}"},info:{value:"{colors.blue.80.value}"},success:{value:"{colors.green.80.value}"},warning:{value:"{colors.orange.80.value}"}},shadow:{primary:{value:"hsla(210, 50%, 10%, 0.25)"},secondary:{value:"hsla(210, 50%, 10%, 0.15)"},tertiary:{value:"hsla(210, 50%, 10%, 0.05)"}},overlay:{5:{value:"hsla(0, 0%, 0%, 0.05)"},10:{value:"hsla(0, 0%, 0%, 0.1)"},20:{value:"hsla(0, 0%, 0%, 0.2)"},30:{value:"hsla(0, 0%, 0%, 0.3)"},40:{value:"hsla(0, 0%, 0%, 0.4)"},50:{value:"hsla(0, 0%, 0%, 0.5)"},60:{value:"hsla(0, 0%, 0%, 0.6)"},70:{value:"hsla(0, 0%, 0%, 0.7)"},80:{value:"hsla(0, 0%, 0%, 0.8)"},90:{value:"hsla(0, 0%, 0%, 0.9)"}},black:{value:"hsl(0, 0%, 0%)"},white:{value:"hsl(0, 0%, 100%)"},transparent:{value:"transparent"}},She={alignItems:{value:"center"},justifyContent:{value:"space-between"},color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.tertiary.value}"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.medium.value}"},icon:{size:{value:"{fontSizes.xl.value}"}},heading:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"}}},Che={message:{backgroundColor:{value:"{colors.background.secondary.value}"},borderRadius:{value:"{radii.large.value}"},gap:{value:"{space.small.value}"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.small.value}"},user:{backgroundColor:{value:"{colors.background.secondary.value}"}},assistant:{backgroundColor:{value:"{colors.primary.10.value}"}},sender:{gap:{value:"{space.small.value}"},username:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"inherit"},fontWeight:{value:"{fontWeights.bold.value}"}},timestamp:{color:{value:"{colors.font.tertiary.value}"},fontSize:{value:"inherit"},fontWeight:{value:"inherit"}}},body:{gap:{value:"{space.xs.value}"}},actions:{gap:{value:"{space.xs.value}"}}},form:{gap:{value:"{space.small.value}"},padding:{value:"{space.small.value}"}},attachment:{borderColor:{value:"{colors.border.secondary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.small.value}"},fontSize:{value:"{fontSizes.small.value}"},paddingBlock:{value:"{space.xxxs.value}"},paddingInline:{value:"{space.xs.value}"},gap:{value:"{space.xs.value}"},list:{padding:{value:"{space.xs.value}"},paddingBlockStart:{value:"0"},gap:{value:"{space.xxs.value}"}},name:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"{fontSizes.small.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},size:{color:{value:"{colors.font.tertiary.value}"},fontSize:{value:"{fontSizes.small.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},remove:{padding:{value:"{space.xxs.value}"}},image:{width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"}}}},whe={menu:{width:{value:"100%"},marginBlockStart:{value:"{space.xxxs}"},backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderWidth:{value:"{borderWidths.small}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.small}"},options:{display:{value:"flex"},flexDirection:{value:"column"},maxHeight:{value:"300px"}},option:{backgroundColor:{value:"{colors.background.primary}"},color:{value:"currentcolor"},cursor:{value:"pointer"},transitionDuration:{value:"{time.short}"},transitionProperty:{value:"background-color, color"},transitionTimingFunction:{value:"ease"},_active:{backgroundColor:{value:"{colors.primary.80}"},color:{value:"{colors.white}"}}},_empty:{display:{value:"flex"}},_loading:{alignItems:{value:"center"},display:{value:"flex"},gap:{value:"{space.xxxs}"}},spaceShared:{paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"}}}},Ehe={maxWidth:{value:"60rem"},modal:{width:{value:"{space.relative.full}"},height:{value:"{space.relative.full}"},backgroundColor:{value:"{colors.overlay.50.value}"},top:{value:"{space.zero}"},left:{value:"{space.zero}"}},container:{widthMax:{value:"30rem"}},router:{borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},boxShadow:{value:"{shadows.medium.value}"}},footer:{paddingBottom:{value:"{space.medium.value}"}},form:{padding:{value:"{space.xl.value}"}},state:{inactive:{backgroundColor:{value:"{colors.background.secondary.value}"}}},orContainer:{color:{value:"{colors.neutral.80.value}"},orLine:{backgroundColor:{value:"{colors.background.primary.value}"}}}},xhe={color:{value:"{colors.font.tertiary.value}"},lineHeight:{value:1},fontWeight:{value:"{fontWeights.semibold.value}"},fontSize:{value:"{fontSizes.small.value}"},textAlign:{value:"center"},width:{value:"{fontSizes.xxl.value}"},height:{value:"{fontSizes.xxl.value}"},backgroundColor:{value:"{colors.background.tertiary}"},borderRadius:{value:"100%"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.medium.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"},borderColor:{value:"{colors.border.info.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"},borderColor:{value:"{colors.border.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"},borderColor:{value:"{colors.border.success.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"},borderColor:{value:"{colors.border.error.value}"}},small:{fontSize:{value:"{fontSizes.xs.value}"},width:{value:"{fontSizes.xl.value}"},height:{value:"{fontSizes.xl.value}"}},large:{fontSize:{value:"{fontSizes.medium.value}"},width:{value:"{fontSizes.xxxl.value}"},height:{value:"{fontSizes.xxxl.value}"}}},_he={color:{value:"{colors.font.primary.value}"},lineHeight:{value:1},fontWeight:{value:"{fontWeights.semibold.value}"},fontSize:{value:"{fontSizes.small.value}"},textAlign:{value:"center"},paddingVertical:{value:"{space.xs.value}"},paddingHorizontal:{value:"{space.small.value}"},backgroundColor:{value:"{colors.background.tertiary.value}"},borderRadius:{value:"{radii.xl.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"}},small:{fontSize:{value:"{fontSizes.xs.value}"},paddingVertical:{value:"{space.xxs.value}"},paddingHorizontal:{value:"{space.xs.value}"}},large:{fontSize:{value:"{fontSizes.medium.value}"},paddingVertical:{value:"{space.small.value}"},paddingHorizontal:{value:"{space.medium.value}"}}},Ihe={flexDirection:{value:"row"},flexWrap:{value:"wrap"},gap:{value:"0"},color:{value:"{colors.font.tertiary}"},item:{flexDirection:{value:"row"},color:{value:"inherit"},fontSize:{value:"inherit"},alignItems:{value:"center"},lineHeight:{value:"1"}},separator:{color:{value:"inherit"},fontSize:{value:"inherit"},paddingInline:{value:"{space.xxs}"}},link:{color:{value:"{components.link.color}"},fontSize:{value:"inherit"},fontWeight:{value:"normal"},textDecoration:{value:"none"},paddingInline:{value:"{space.xs}"},paddingBlock:{value:"{space.xxs}"},current:{color:{value:"inherit"},fontSize:{value:"inherit"},fontWeight:{value:"normal"},textDecoration:{value:"none"}}}},Ahe={fontWeight:{value:"{fontWeights.bold.value}"},transitionDuration:{value:"{components.fieldcontrol.transitionDuration.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},lineHeight:{value:"{components.fieldcontrol.lineHeight.value}"},paddingBlockStart:{value:"{components.fieldcontrol.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.paddingInlineEnd.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},borderWidth:{value:"{components.fieldcontrol.borderWidth.value}"},borderStyle:{value:"{components.fieldcontrol.borderStyle.value}"},borderRadius:{value:"{components.fieldcontrol.borderRadius.value}"},color:{value:"{colors.font.primary.value}"},_hover:{color:{value:"{colors.font.focus.value}"},backgroundColor:{value:"{colors.primary.10.value}"},borderColor:{value:"{colors.primary.60.value}"}},_focus:{color:{value:"{colors.font.focus.value}"},backgroundColor:{value:"{colors.primary.10.value}"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{color:{value:"{colors.font.active.value}"},backgroundColor:{value:"{colors.primary.20.value}"},borderColor:{value:"{colors.primary.100.value}"}},_loading:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"}},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"}},outlined:{info:{borderColor:{value:"{colors.blue.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.blue.100}"},_hover:{borderColor:{value:"{colors.blue.60.value}"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"}},_focus:{borderColor:{value:"{colors.blue.100.value}"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.blue.100.value}"},backgroundColor:{value:"{colors.blue.20.value}"},color:{value:"{colors.blue.100.value}"}}},warning:{borderColor:{value:"{colors.orange.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.orange.100}"},_hover:{borderColor:{value:"{colors.orange.60.value}"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"}},_focus:{borderColor:{value:"{colors.orange.100.value}"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"},boxShadow:{value:"{components.fieldcontrol.warning._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.orange.100.value}"},backgroundColor:{value:"{colors.orange.20.value}"},color:{value:"{colors.orange.100.value}"}}},success:{borderColor:{value:"{colors.green.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.green.100}"},_hover:{borderColor:{value:"{colors.green.60.value}"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"}},_focus:{borderColor:{value:"{colors.green.100.value}"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.green.100.value}"},backgroundColor:{value:"{colors.green.20.value}"},color:{value:"{colors.green.100.value}"}}},error:{borderColor:{value:"{colors.red.80.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.red.100}"},_hover:{borderColor:{value:"{colors.red.80.value}"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"}},_focus:{borderColor:{value:"{colors.red.100.value}"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.red.100.value}"},backgroundColor:{value:"{colors.red.20.value}"},color:{value:"{colors.red.100.value}"}}},overlay:{borderColor:{value:"{colors.overlay.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.primary.value}"},_hover:{borderColor:{value:"{colors.overlay.60.value}"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.neutral.90.value}"}},_focus:{borderColor:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.neutral.90.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.neutral.100.value}"}}}},primary:{borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},backgroundColor:{value:"{colors.primary.80.value}"},color:{value:"{colors.font.inverse.value}"},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.100.value}"},color:{value:"{colors.font.inverse.value}"}},info:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.100.value}"},color:{value:"{colors.font.inverse.value}"}}},warning:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.100.value}"},color:{value:"{colors.font.inverse.value}"}}},error:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.100.value}"},color:{value:"{colors.font.inverse.value}"}}},success:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.100.value}"},color:{value:"{colors.font.inverse.value}"}}},overlay:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.70}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"}}}},menu:{borderWidth:{value:"{space.zero.value}"},backgroundColor:{value:"transparent"},justifyContent:{value:"start"},_hover:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.80.value}"}},_focus:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.80.value}"}},_active:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.90.value}"}},_disabled:{color:{value:"{colors.font.disabled.value}"}}},link:{backgroundColor:{value:"transparent"},borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.interactive.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.10.value}"},color:{value:"{colors.font.hover.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.10.value}"},color:{value:"{colors.font.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.20.value}"},color:{value:"{colors.font.active.value}"}},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled.value}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled.value}"}},info:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.blue.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.20.value}"},color:{value:"{colors.blue.100.value}"}}},warning:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.orange.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"},boxShadow:{value:"{components.fieldcontrol.warning._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.20.value}"},color:{value:"{colors.orange.100.value}"}}},success:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.green.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.20.value}"},color:{value:"{colors.green.100.value}"}}},error:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.red.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.20.value}"},color:{value:"{colors.red.100.value}"}}},overlay:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.neutral.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.overlay.80.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.overlay.90.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.overlay.90.value}"}}}},warning:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.red.60}"},borderWidth:{value:"{borderWidths.small}"},color:{value:"{colors.red.60}"},_hover:{borderColor:{value:"{colors.red.80}"},backgroundColor:{value:"{colors.red.10}"},color:{value:"{colors.font.error}"}},_focus:{borderColor:{value:"{colors.red.80}"},backgroundColor:{value:"{colors.red.10}"},color:{value:"{colors.red.80}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow}"}},_active:{borderColor:{value:"{colors.red.100}"},backgroundColor:{value:"{colors.red.20}"},color:{value:"{colors.red.100}"}},_disabled:{borderColor:{value:"{colors.border.tertiary}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled}"}},_loading:{borderColor:{value:"{colors.border.tertiary}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled}"}}},destructive:{borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small}"},borderStyle:{value:"solid"},backgroundColor:{value:"{colors.red.60}"},color:{value:"{colors.font.inverse}"},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled}"},color:{value:"{colors.font.disabled}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled}"},color:{value:"{colors.font.disabled}"}},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.100}"},color:{value:"{colors.font.inverse}"}}},small:{fontSize:{value:"{components.fieldcontrol.small.fontSize.value}"},paddingBlockStart:{value:"{components.fieldcontrol.small.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.small.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.small.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.small.paddingInlineEnd.value}"}},large:{fontSize:{value:"{components.fieldcontrol.large.fontSize.value}"},paddingBlockStart:{value:"{components.fieldcontrol.large.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.large.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.large.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.large.paddingInlineEnd.value}"}},loaderWrapper:{alignItems:{value:"center"},gap:{value:"{space.xs.value}"}}},Rhe={backgroundColor:{value:"{colors.background.primary.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"0"},borderStyle:{value:"solid"},borderColor:{value:"transparent"},boxShadow:{value:"none"},padding:{value:"{space.medium.value}"},outlined:{backgroundColor:{value:"{components.card.backgroundColor.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},boxShadow:{value:"{components.card.boxShadow.value}"}},elevated:{backgroundColor:{value:"{components.card.backgroundColor.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"0"},borderStyle:{value:"solid"},borderColor:{value:"transparent"},boxShadow:{value:"{shadows.medium.value}"}}},The={cursor:{value:"pointer"},alignItems:{value:"center"},_disabled:{cursor:{value:"not-allowed"}},button:{position:{value:"relative"},alignItems:{value:"center"},justifyContent:{value:"center"},color:{value:"{colors.font.inverse.value}"},before:{width:{value:"100%"},height:{value:"100%"},borderWidth:{value:"{borderWidths.medium.value}"},borderRadius:{value:"20%"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"}},_focus:{outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},_focus:{borderColor:{value:"{colors.border.error.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}}},icon:{backgroundColor:{value:"{colors.primary.80.value}"},borderRadius:{value:"20%"},opacity:{value:"{opacities.0.value}"},transform:{value:"scale(0)"},transitionProperty:{value:"all"},transitionDuration:{value:"{time.short.value}"},transitionTimingFunction:{value:"ease-in-out"},_checked:{opacity:{value:"{opacities.100.value}"},transform:{value:"scale(1)"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}},_indeterminate:{opacity:{value:"{opacities.100.value}"},transform:{value:"scale(1)"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}}},label:{color:{value:"{components.text.color.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"}}}},Ohe={alignItems:{value:"flex-start"},alignContent:{value:"center"},flexDirection:{value:"column"},justifyContent:{value:"center"}},Mhe={pagination:{current:{color:{value:"{components.pagination.current.color}"},backgroundColor:{value:"{components.pagination.current.backgroundColor}"}},button:{color:{value:"{components.pagination.button.color}"},_hover:{backgroundColor:{value:"{components.pagination.button.hover.backgroundColor}"},color:{value:"{components.pagination.button.hover.color}"}},_disabled:{color:{value:"{components.pagination.button.disabled.color}"}}}},search:{input:{color:{value:"{components.searchfield.color}"}},button:{color:{value:"{components.searchfield.button.color}"},_active:{backgroundColor:{value:"{components.searchfield.button._active.backgroundColor}"},borderColor:{value:"{components.searchfield.button._active.borderColor}"},color:{value:"{components.searchfield.button._active.color}"}},_disabled:{backgroundColor:{value:"{components.searchfield.button._disabled.backgroundColor}"},borderColor:{value:"{components.searchfield.button._disabled.borderColor}"},color:{value:"{components.searchfield.button._disabled.color}"}},_focus:{backgroundColor:{value:"{components.searchfield.button._focus.backgroundColor}"},borderColor:{value:"{components.searchfield.button._focus.borderColor}"},color:{value:"{components.searchfield.button._focus.color}"}},_hover:{backgroundColor:{value:"{components.searchfield.button._hover.backgroundColor}"},borderColor:{value:"{components.searchfield.button._hover.borderColor}"},color:{value:"{components.searchfield.button._hover.color}"}}}}},Phe={fontSize:{value:"{fontSizes.xs}"},gap:{value:"{space.relative.medium}"},svg:{path:{fill:{value:"{colors.font.primary}"}}},toolTip:{bottom:{value:"{space.large}"},color:{value:"{colors.teal.100}"},fontSize:{value:"{fontSizes.xxs}"}}},Nhe={height:{value:"{space.relative.full.value}"}},khe={borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.medium.value}"},label:{color:{value:"{colors.font.tertiary.value}"},paddingInline:{value:"{space.medium.value}"},fontSize:{value:"{fontSizes.small.value}"},backgroundColor:{value:"{colors.background.primary.value}"}},small:{borderWidth:{value:"{borderWidths.small.value}"}},large:{borderWidth:{value:"{borderWidths.large.value}"}},opacity:{value:"{opacities.60.value}"}},Dhe={backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},color:{value:"{colors.font.primary}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.primary}"}},_disabled:{backgroundColor:{value:"{colors.background.disabled}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.disabled}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.disabled}"}},accepted:{backgroundColor:{value:"{colors.background.success}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.success}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.success}"}},rejected:{backgroundColor:{value:"{colors.background.error}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.error}"}}},Lhe={backgroundColor:{value:"{colors.background.primary.value}"},item:{borderColor:{value:"{colors.border.secondary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.small.value}"},trigger:{alignItems:{value:"center"},backgroundColor:{value:"{colors.background.primary.value}"},color:{value:"inherit"},gap:{value:"{space.small.value}"},justifyContent:{value:"space-between"},paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"},_hover:{color:{value:"inherit"},backgroundColor:{value:"{colors.overlay.5.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0",offsetY:"0",blurRadius:"0",spreadRadius:"2px",color:"{colors.border.focus.value}"}}}},content:{color:{value:"inherit"},paddingInline:{value:"{space.small.value}"},paddingBlockEnd:{value:"{space.small.value}"},paddingBlockStart:{value:"{space.xxxs.value}"}},icon:{color:{value:"{colors.font.tertiary.value}"},transitionDuration:{value:"{time.medium.value}"},transitionTimingFunction:{value:"cubic-bezier(0.87, 0, 0.13, 1)"}}}},Uhe={gap:{value:"{space.xs.value}"},fontSize:{value:"{fontSizes.medium.value}"},flexDirection:{value:"column"},small:{gap:{value:"{space.xxxs.value}"},fontSize:{value:"{fontSizes.small.value}"}},large:{gap:{value:"{space.small.value}"},fontSize:{value:"{fontSizes.large.value}"}},label:{color:{value:"{colors.font.secondary.value}"}}},Fhe={borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.small.value}"},color:{value:"{colors.font.primary.value}"},paddingBlockStart:{value:"{space.xs.value}"},paddingBlockEnd:{value:"{space.xs.value}"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"},fontSize:{value:"{components.field.fontSize.value}"},lineHeight:{value:"{lineHeights.medium.value}"},transitionDuration:{value:"{time.medium.value}"},outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},small:{fontSize:{value:"{components.field.small.fontSize.value}"},paddingBlockStart:{value:"{space.xxs.value}"},paddingBlockEnd:{value:"{space.xxs.value}"},paddingInlineStart:{value:"{space.small.value}"},paddingInlineEnd:{value:"{space.small.value}"}},large:{fontSize:{value:"{components.field.large.fontSize.value}"},paddingBlockStart:{value:"{space.xs.value}"},paddingBlockEnd:{value:"{space.xs.value}"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"}},quiet:{borderStyle:{value:"none"},borderInlineStart:{value:"none"},borderInlineEnd:{value:"none"},borderBlockStart:{value:"none"},borderRadius:{value:"0"},_focus:{borderBlockEndColor:{value:"transparent"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_error:{borderBlockEndColor:{value:"{colors.border.error.value}"},_focus:{borderBlockEndColor:{value:"transparent"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.border.focus.value}"}}},_disabled:{color:{value:"{colors.font.disabled.value}"},cursor:{value:"not-allowed"},borderColor:{value:"{colors.transparent.value}"},backgroundColor:{value:"{colors.background.disabled.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},color:{value:"{colors.font.error.value}"},_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.border.error.value}"}}}},info:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.blue.100.value}"}}}},warning:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.orange.100.value}"}}}},success:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.green.100.value}"}}}},overlay:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.overlay.90.value}"}}}}},$he={gap:{value:"{space.zero.value}"},vertical:{alignItems:{value:"center"}},outer:{alignItems:{value:"center"}}},zhe={backgroundColor:{value:"transparent"},borderRadius:{value:"{radii.xs.value}"},flexDirection:{value:"column"},gap:{value:"{components.field.gap.value}"},legend:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"{components.field.fontSize.value}"},fontWeight:{value:"{fontWeights.bold.value}"},lineHeight:{value:"{lineHeights.medium.value}"},small:{fontSize:"{components.field.small.fontSize.value}"},large:{fontSize:"{components.field.large.fontSize.value}"}},outlined:{padding:"{space.medium.value}",borderColor:"{colors.neutral.40.value}",borderWidth:"{borderWidths.small.value}",borderStyle:"solid",small:{padding:"{space.small.value}"},large:{padding:"{space.large.value}"}},small:{gap:"{components.field.small.gap.value}"},large:{gap:"{components.field.large.gap.value}"}},jhe={error:{color:{value:"{colors.font.error.value}"},fontSize:{value:"{fontSizes.small.value}"}},description:{color:{value:"{colors.font.secondary.value}"},fontStyle:{value:"italic"},fontSize:{value:"{fontSizes.small.value}"}}},Bhe={dropzone:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.fileuploader.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.fileuploader.dropzone.borderStyle}"},borderWidth:{value:"{borderWidths.medium}"}},icon:{color:{value:"{colors.border.primary}"},fontSize:{value:"{fontSizes.xxl}"}},text:{color:{value:"{colors.font.tertiary}"},fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"}}},file:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"},gap:{value:"{space.small}"},alignItems:{value:"baseline"},name:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},size:{fontSize:{value:"{fontSizes.small}"},fontWeight:{value:"{fontWeights.normal}"},color:{value:"{colors.font.tertiary}"}},image:{width:{value:"{space.xxl}"},height:{value:"{space.xxl}"},backgroundColor:{value:"{colors.background.secondary}"},color:{value:"{colors.font.tertiary}"},borderRadius:{value:"{radii.small}"}}},filelist:{flexDirection:{value:"column"},gap:{value:"{space.small}"}},loader:{strokeLinecap:{value:"round"},strokeEmpty:{value:"{colors.border.secondary}"},strokeFilled:{value:"{components.loader.strokeFilled}"},strokeWidth:{value:"{borderWidths.large}"}},previewer:{backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},borderRadius:{value:"{radii.small}"},paddingBlock:{value:"{space.zero}"},paddingInline:{value:"{space.zero}"},maxHeight:{value:"40rem"},maxWidth:{value:"auto"},text:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},body:{paddingBlock:{value:"{space.medium}"},paddingInline:{value:"{space.medium}"},gap:{value:"{space.small}"}},footer:{justifyContent:{value:"flex-end"}}}},Hhe={gap:{value:"{space.medium.value}"},justifyContent:{value:"normal"},alignItems:{value:"stretch"},alignContent:{value:"normal"},flexWrap:{value:"nowrap"}},qhe={color:{value:"{colors.font.primary.value}"},lineHeight:{value:"{lineHeights.small.value}"},1:{fontSize:{value:"{fontSizes.xxxxl.value}"},fontWeight:{value:"{fontWeights.light.value}"}},2:{fontSize:{value:"{fontSizes.xxxl.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},3:{fontSize:{value:"{fontSizes.xxl.value}"},fontWeight:{value:"{fontWeights.medium.value}"}},4:{fontSize:{value:"{fontSizes.xl.value}"},fontWeight:{value:"{fontWeights.semibold.value}"}},5:{fontSize:{value:"{fontSizes.large.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},6:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.extrabold.value}"}}},Vhe={highlighted:{fontWeight:{value:"{fontWeights.bold}"}}},Whe={lineHeight:{value:1},height:{value:"1em"}},Ghe={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},Khe={maxWidth:{value:"100%"},height:{value:"auto"},objectFit:{value:"initial"},objectPosition:{value:"initial"}},Zhe={banner:{height:{value:"150px "},width:{value:"400px "}},button:{backgroundColor:{value:"#e8e8e8"},borderRadius:{value:"5px"},color:{value:"black"}},dialog:{height:{value:"50vh"},minHeight:{value:"400px"},minWidth:{value:"400px"},width:{value:"30vw"}},header:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.extrabold.value}"}}},Yhe={active:{color:{value:"{colors.font.active.value}"}},color:{value:"{colors.font.interactive.value}"},focus:{color:{value:"{colors.font.focus.value}"}},hover:{color:{value:"{colors.font.hover.value}"}},visited:{color:{value:"{colors.font.interactive.value}"}}},Qhe={cameraModule:{backgroundColor:{value:"{colors.background.primary.value}"}}},Jhe={width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"},fontSize:{value:"{fontSizes.xs.value}"},strokeEmpty:{value:"{colors.neutral.20.value}"},strokeFilled:{value:"{colors.primary.80.value}"},strokeLinecap:{value:"round"},animationDuration:{value:"1s"},small:{width:{value:"{fontSizes.small.value}"},height:{value:"{fontSizes.small.value}"},fontSize:{value:"{fontSizes.xxs.value}"}},large:{width:{value:"{fontSizes.large.value}"},height:{value:"{fontSizes.large.value}"},fontSize:{value:"{fontSizes.small.value}"}},linear:{width:{value:"100%"},minWidth:{value:"5rem"},fontSize:{value:"{fontSizes.xxs.value}"},strokeWidth:{value:"{fontSizes.xxs.value}"},strokeFilled:{value:"{colors.primary.80.value}"},strokeEmpty:{value:"{colors.neutral.20.value}"},strokeLinecap:{value:"round"},animationDuration:{value:"1s"},small:{strokeWidth:{value:"{fontSizes.xxxs.value}"},fontSize:{value:"{fontSizes.xxxs.value}"}},large:{strokeWidth:{value:"{fontSizes.xs.value}"},fontSize:{value:"{fontSizes.xs.value}"}}},text:{fill:{value:"{colors.font.primary.value}"}}},Xhe={backgroundColor:{value:"{colors.background.primary.value}"},borderRadius:{value:"{radii.medium.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},boxShadow:{value:"{shadows.large.value}"},flexDirection:{value:"column"},gap:{value:"{space.zero.value}"},maxWidth:{value:"30rem"},minWidth:{value:"14rem"},small:{width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"}},large:{width:{value:"{fontSizes.xxxl.value}"},height:{value:"{fontSizes.xxxl.value}"}},item:{minHeight:{value:"2.5rem"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"}}},epe={alignItems:{value:"center"},backgroundColor:{value:"{colors.background.tertiary.value}"},borderColor:{value:"transparent"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.xs.value}"},color:{value:"{colors.font.primary.value}"},justifyContent:{value:"flex-start"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.medium.value}"},lineHeight:{value:"{lineHeights.small.value}"},icon:{size:{value:"{fontSizes.xl.value}"}},heading:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},dismiss:{gap:{value:"{space.xxs.value}"}},plain:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}}},outlined:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.primary.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.info.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.error.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.success.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.warning.value}"}}},filled:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.secondary.value}"},borderColor:{value:"transparent"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"},borderColor:{value:"transparent"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"},borderColor:{value:"transparent"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"},borderColor:{value:"transparent"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"},borderColor:{value:"transparent"}}}},tpe={current:{alignItems:{value:"center"},justifyContent:{value:"center"},color:{value:"{colors.font.inverse.value}"},fontSize:{value:"{fontSizes.small.value}"},backgroundColor:{value:"{colors.overlay.40.value}"}},button:{color:{value:"{colors.font.primary.value}"},paddingInlineStart:{value:"{space.xxs.value}"},paddingInlineEnd:{value:"{space.xxs.value}"},transitionProperty:{value:"background-color"},transitionDuration:{value:"{time.medium.value}"},hover:{backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.font.primary.value}"}},disabled:{color:{value:"{colors.font.disabled.value}"}}},ellipsis:{alignItems:{value:"baseline"},justifyContent:{value:"center"},paddingInlineStart:{value:"{space.xs.value}"},paddingInlineEnd:{value:"{space.xs.value}"}},itemContainer:{marginLeft:{value:"{space.xxxs.value}"},marginRight:{value:"{space.xxxs.value}"}},itemShared:{height:{value:"{fontSizes.xxl.value}"},minWidth:{value:"{fontSizes.xxl.value}"},borderRadius:{value:"{fontSizes.medium.value}"}}},npe={color:{value:"{components.fieldcontrol.color.value}"},button:{color:{value:"{components.button.color.value}"},_active:{backgroundColor:{value:"{components.button._active.backgroundColor.value}"},borderColor:{value:"{components.button._active.borderColor.value}"},color:{value:"{components.button._active.color.value}"}},_disabled:{backgroundColor:{value:"{components.button._disabled.backgroundColor.value}"},borderColor:{value:"{components.button._disabled.borderColor.value}"},color:{value:"{components.button._disabled.color.value}"}},_error:{color:{value:"{components.button.outlined.error.color.value}"},backgroundColor:{value:"{components.button.outlined.error.backgroundColor.value}"},borderColor:{value:"{components.button.outlined.error.borderColor.value}"},_active:{borderColor:{value:"{components.button.outlined.error._active.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._active.backgroundColor.value}"},color:{value:"{components.button.outlined.error._active.color.value}"}},_focus:{borderColor:{value:"{components.button.outlined.error._focus.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._focus.backgroundColor.value}"},color:{value:"{components.button.outlined.error._focus.color.value}"},boxShadow:{value:"{components.button.outlined.error._focus.boxShadow.value}"}},_hover:{borderColor:{value:"{components.button.outlined.error._hover.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._hover.backgroundColor.value}"},color:{value:"{components.button.outlined.error._hover.color.value}"}}},_focus:{backgroundColor:{value:"{components.button._focus.backgroundColor.value}"},borderColor:{value:"{components.button._focus.borderColor.value}"},color:{value:"{components.button._focus.color.value}"}},_hover:{backgroundColor:{value:"{components.button._hover.backgroundColor.value}"},borderColor:{value:"{components.button._hover.borderColor.value}"},color:{value:"{components.button._hover.color.value}"}}}},rpe={color:{value:"{components.fieldcontrol.color}"},borderColor:{value:"{components.fieldcontrol.borderColor}"},fontSize:{value:"{components.fieldcontrol.fontSize}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor}"}}},ope={borderRadius:{value:"{radii.small.value}"},transitionDuration:{value:"{time.long.value}"},startColor:{value:"{colors.background.secondary.value}"},endColor:{value:"{colors.background.tertiary.value}"},small:{height:{value:"{space.small.value}"}},default:{height:{value:"{space.medium.value}"}},large:{height:{value:"{space.large.value}"}}},spe={alignItems:{value:"center"},justifyContent:{value:"flex-start"},gap:{value:"inherit"},_disabled:{cursor:{value:"not-allowed"}},button:{alignItems:{value:"center"},justifyContent:{value:"center"},width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"},boxSizing:{value:"border-box"},borderWidth:{value:"{borderWidths.medium.value}"},borderStyle:{value:"solid"},borderRadius:{value:"50%"},borderColor:{value:"{colors.border.primary.value}"},color:{value:"{colors.background.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},transitionProperty:{value:"all"},transitionDuration:{value:"{time.medium.value}"},outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},padding:{value:"{borderWidths.medium.value}"},small:{width:{value:"{fontSizes.small.value}"},height:{value:"{fontSizes.small.value}"}},large:{width:{value:"{fontSizes.large.value}"},height:{value:"{fontSizes.large.value}"}},_checked:{color:{value:"{colors.primary.80.value}"},_disabled:{color:{value:"{colors.background.disabled.value}"}}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},_focus:{boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"},backgroundColor:{value:"{colors.background.primary.value}"}}},label:{color:{value:"{components.text.color.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"}}}},ipe={radio:{borderWidth:{value:"{components.radio.button.borderWidth}"},borderColor:{value:"{components.radio.button.borderColor}"},backgroundColor:{value:"{components.radio.button.backgroundColor}"},_checked:{color:{value:"{components.radio.button._checked.color}"}},label:{color:{value:"{components.radio.label.color}"}}},legend:{color:{value:"{components.fieldset.legend.color}"},fontWeight:{value:"{fontWeights.normal}"}}},ape={large:{size:{value:"{fontSizes.xxxl.value}"}},default:{size:{value:"{fontSizes.xl.value}"}},small:{size:{value:"{fontSizes.small.value}"}},filled:{color:{value:"{colors.secondary.80.value}"}},empty:{color:{value:"{colors.background.tertiary.value}"}}},lpe={color:{value:"{components.fieldcontrol.color.value}"},button:{color:{value:"{components.button.color.value}"},backgroundColor:{value:"{colors.background.primary.value}"},_active:{backgroundColor:{value:"{components.button._active.backgroundColor.value}"},borderColor:{value:"{components.button._active.borderColor.value}"},color:{value:"{components.button._active.color.value}"}},_disabled:{backgroundColor:{value:"{components.button._disabled.backgroundColor.value}"},borderColor:{value:"{components.button._disabled.borderColor.value}"},color:{value:"{components.button._disabled.color.value}"}},_focus:{backgroundColor:{value:"{components.button._focus.backgroundColor.value}"},borderColor:{value:"{components.button._focus.borderColor.value}"},color:{value:"{components.button._focus.color.value}"}},_hover:{backgroundColor:{value:"{components.button._hover.backgroundColor.value}"},borderColor:{value:"{components.button._hover.borderColor.value}"},color:{value:"{components.button._hover.color.value}"}}}},cpe={color:{value:"{components.fieldcontrol.color}"},backgroundColor:{value:"{colors.background.primary.value}"},paddingInlineEnd:{value:"{space.xxl.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"{colors.background.disabled.value}"}},wrapper:{flex:{value:"1"},display:{value:"block"},position:{value:"relative"},cursor:{value:"pointer"}},iconWrapper:{alignItems:{value:"center"},position:{value:"absolute"},top:{value:"50%"},right:{value:"{space.medium.value}"},transform:{value:"translateY(-50%)"},pointerEvents:{value:"none"},small:{right:{value:"{space.xs.value}"}},large:{right:{value:"{space.medium.value}"}}},option:{backgroundColor:{value:"transparent"},color:{value:"{colors.font.primary.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"}}},whiteSpace:{value:"nowrap"},minWidth:{value:"6.5rem"},small:{minWidth:{value:"5.5rem"},paddingInlineEnd:{value:"{space.xl.value}"}},large:{minWidth:{value:"7.5rem"},paddingInlineEnd:{value:"{space.xxl.value}"}},expanded:{paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"},option:{paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"}}}},upe={borderColor:{value:"{components.fieldcontrol.borderColor}"},color:{value:"{components.fieldcontrol.color}"},flexDirection:{value:"column"},fontSize:{value:"{components.fieldcontrol.fontSize}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor}"}},label:{color:{value:"{components.field.label.color}"}}},dpe={paddingBlock:{value:"{space.xs.value}"},track:{backgroundColor:{value:"{colors.background.quaternary.value}"},borderRadius:{value:"9999px"},height:{value:"0.375rem"},minWidth:{value:"10rem"}},range:{backgroundColor:{value:"{colors.primary.80.value}"},borderRadius:{value:"9999px"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}},thumb:{width:{value:"1.25rem"},height:{value:"1.25rem"},backgroundColor:{value:"{colors.background.primary.value}"},boxShadow:{value:"{shadows.small.value}"},borderRadius:{value:"50%"},borderWidth:{value:"{borderWidths.medium.value}"},borderColor:{value:"{colors.border.primary.value}"},borderStyle:{value:"solid"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"},borderColor:{value:"transparent"},boxShadow:{value:"none"}},_hover:{backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.focus.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}}},small:{track:{height:{value:"0.25rem"}},thumb:{width:{value:"1rem"},height:{value:"1rem"}}},large:{track:{height:{value:"0.625rem"}},thumb:{width:{value:"1.5rem"},height:{value:"1.5rem"}}}},fpe={borderColor:{value:"{components.fieldcontrol.borderColor}"},flexDirection:{value:"column"},input:{color:{value:"{components.fieldcontrol.color}"},fontSize:{value:"{components.fieldcontrol.fontSize}"},textAlign:{value:"center"}},button:{color:{value:"{components.button.color}"},backgroundColor:{value:"{colors.transparent}"},_active:{color:{value:"{components.button._active.color}"},backgroundColor:{value:"{components.button._active.backgroundColor}"}},_focus:{color:{value:"{components.button._focus.color}"},backgroundColor:{value:"{components.button._focus.backgroundColor}"}},_disabled:{color:{value:"{components.button._disabled.color}"},backgroundColor:{value:"{components.fieldcontrol._disabled.backgroundColor}"}},_hover:{color:{value:"{components.button._hover.color}"},backgroundColor:{value:"{components.button._hover.backgroundColor}"}}}},hpe={dropzone:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.storagemanager.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.storagemanager.dropzone.borderStyle}"},borderWidth:{value:"{borderWidths.medium}"}},icon:{color:{value:"{colors.border.primary}"},fontSize:{value:"{fontSizes.xxl}"}},text:{color:{value:"{colors.font.tertiary}"},fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"}}},file:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"},gap:{value:"{space.small}"},alignItems:{value:"baseline"},name:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},size:{fontSize:{value:"{fontSizes.small}"},fontWeight:{value:"{fontWeights.normal}"},color:{value:"{colors.font.tertiary}"}},image:{width:{value:"{space.xxl}"},height:{value:"{space.xxl}"},backgroundColor:{value:"{colors.background.secondary}"},color:{value:"{colors.font.tertiary}"},borderRadius:{value:"{radii.small}"}}},filelist:{flexDirection:{value:"column"},gap:{value:"{space.small}"}},loader:{strokeLinecap:{value:"round"},strokeEmpty:{value:"{colors.border.secondary}"},strokeFilled:{value:"{components.loader.strokeFilled}"},strokeWidth:{value:"{borderWidths.large}"}},previewer:{backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},borderRadius:{value:"{radii.small}"},paddingBlock:{value:"{space.zero}"},paddingInline:{value:"{space.zero}"},maxHeight:{value:"40rem"},maxWidth:{value:"auto"},text:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},body:{paddingBlock:{value:"{space.medium}"},paddingInline:{value:"{space.medium}"},gap:{value:"{space.small}"}},footer:{justifyContent:{value:"flex-end"}}}},ppe={_disabled:{opacity:{value:"{opacities.60.value}"}},_focused:{shadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},fontSize:{value:"{fontSizes.medium.value}"},large:{fontSize:{value:"{fontSizes.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"}},label:{padding:{value:"{space.xs.value}"}},thumb:{backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.xxxl.value}"},checked:{transform:{value:"{transforms.slideX.medium.value}"}},transition:{duration:{value:"{time.medium.value}"}},width:{value:"{space.relative.medium.value}"}},track:{backgroundColor:{value:"{colors.background.quaternary.value}"},borderRadius:{value:"{radii.xxxl.value}"},checked:{backgroundColor:{value:"{colors.primary.80.value}"}},height:{value:"{space.relative.medium.value}"},padding:{value:"{outlineWidths.medium.value}"},transition:{duration:{value:"{time.short.value}"}},width:{value:"{space.relative.xl.value}"},_error:{backgroundColor:{value:"{colors.background.error.value}"}}}},mpe={borderCollapse:{value:"collapse"},display:{value:"table"},width:{value:"100%"},head:{display:{value:"table-header-group"},verticalAlign:{value:"middle"}},body:{display:{value:"table-row-group"},verticalAlign:{value:"middle"}},foot:{display:{value:"table-footer-group"},verticalAlign:{value:"middle"}},row:{display:{value:"table-row"},verticalAlign:{value:"middle"},hover:{backgroundColor:{value:"{colors.background.tertiary.value}"}},striped:{backgroundColor:{value:"{colors.background.secondary.value}"}}},header:{borderColor:{value:"{colors.border.tertiary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.primary.value}"},display:{value:"table-cell"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"},padding:{value:"{space.medium.value}"},verticalAlign:{value:"middle"},large:{fontSize:{value:"{fontSizes.large.value}"},padding:{value:"{space.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"},padding:{value:"{space.xs.value}"}}},data:{borderColor:{value:"{colors.border.tertiary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.primary.value}"},display:{value:"table-cell"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.normal.value}"},padding:{value:"{space.medium.value}"},verticalAlign:{value:"middle"},large:{fontSize:{value:"{fontSizes.large.value}"},padding:{value:"{space.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"},padding:{value:"{space.xs.value}"}}},caption:{captionSide:{value:"bottom"},color:{value:"{colors.font.primary.value}"},display:{value:"table-caption"},fontSize:{value:"{fontSizes.medium.value}"},textAlign:{value:"center"},wordBreak:{value:"break-all"},large:{fontSize:{value:"{fontSizes.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"}}}},gpe={backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.secondary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.medium.value}"},gap:{value:"0"},item:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.secondary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.medium.value}"},color:{value:"{colors.font.secondary.value}"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"},paddingVertical:{value:"{space.small.value}"},paddingHorizontal:{value:"{space.medium.value}"},textAlign:{value:"center"},transitionDuration:{value:"{time.medium.value}"},_hover:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.hover.value}"}},_focus:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"{borderWidths.medium}",color:"{colors.border.focus.value}"}},color:{value:"{colors.font.focus.value}"}},_active:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.font.interactive.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.interactive.value}"}},_disabled:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.disabled.value}"}}},panel:{backgroundColor:{value:"transparent"},paddingInline:{value:"0"},paddingBlock:{value:"{space.small.value}"}}},vpe={color:{value:"{colors.font.primary.value}"},primary:{color:{value:"{colors.font.primary.value}"}},secondary:{color:{value:"{colors.font.secondary.value}"}},tertiary:{color:{value:"{colors.font.tertiary.value}"}},error:{color:{value:"{colors.font.error.value}"}},warning:{color:{value:"{colors.font.warning.value}"}},success:{color:{value:"{colors.font.success.value}"}},info:{color:{value:"{colors.font.info.value}"}}},ype={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},bpe={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},Spe={borderColor:{value:"{colors.border.primary.value}"},color:{value:"{colors.font.primary.value}"},_hover:{backgroundColor:{value:"{colors.overlay.10.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},color:{value:"{colors.font.primary.value}"}},_active:{backgroundColor:{value:"{colors.transparent.value}"}},_disabled:{backgroundColor:{value:"{colors.transparent.value}"},borderColor:{value:"{colors.border.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{borderColor:{value:"{colors.border.pressed.value}"},color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.overlay.20.value}"},_hover:{backgroundColor:{value:"{colors.overlay.30.value}"}}},primary:{backgroundColor:{value:"{colors.transparent.value}"},borderWidth:{value:"{borderWidths.small.value}"},_focus:{borderColor:{value:"{colors.border.focus.value}"},backgroundColor:{value:"{colors.transparent.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"},color:{value:"{colors.font.primary.value}"}},_hover:{backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.font.primary.value}"}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{backgroundColor:{value:"{colors.primary.80.value}"},borderColor:{value:"{colors.primary.80.value}"},color:{value:"{colors.background.primary.value}"},_focus:{backgroundColor:{value:"{colors.border.focus.value}"},borderColor:{value:"{colors.border.focus.value}"},color:{value:"{colors.background.primary.value}"}},_hover:{borderColor:{value:"{colors.primary.60.value}"},backgroundColor:{value:"{colors.primary.60.value}"},boxShadow:{value:"{colors.primary.60.value}"},color:{value:"{colors.background.primary.value}"}}}},link:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"},_hover:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"}},_focus:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"}},_disabled:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.90.value}"},_focus:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.90.value}"}},_hover:{color:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.transparent.value}"}}}}},Cpe={alignItems:{value:"center"},alignContent:{value:"center"},justifyContent:{value:"flex-start"}},wpe={accordion:Lhe,aiConversation:Che,alert:She,authenticator:Ehe,autocomplete:whe,avatar:xhe,badge:_he,breadcrumbs:Ihe,button:Ahe,card:Rhe,checkbox:The,checkboxfield:Ohe,collection:Mhe,copy:Phe,countrycodeselect:Nhe,divider:khe,dropzone:Dhe,field:Uhe,fieldcontrol:Fhe,fieldgroup:$he,fieldmessages:jhe,fieldset:zhe,fileuploader:Bhe,flex:Hhe,heading:qhe,icon:Whe,highlightmatch:Vhe,image:Khe,inappmessaging:Zhe,input:Ghe,link:Yhe,liveness:Qhe,loader:Jhe,menu:Xhe,message:epe,pagination:tpe,passwordfield:npe,phonenumberfield:rpe,placeholder:ope,radio:spe,radiogroup:ipe,rating:ape,searchfield:lpe,select:cpe,selectfield:upe,sliderfield:dpe,stepperfield:fpe,storagemanager:hpe,switchfield:ppe,table:mpe,tabs:gpe,text:vpe,textareafield:ype,textfield:bpe,togglebutton:Spe,togglebuttongroup:Cpe},Epe={default:{variable:{value:`'InterVariable', 'Inter var', 'Inter', -apple-system, BlinkMacSystemFont,
21
- 'Helvetica Neue', 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans',
22
- sans-serif`},static:{value:`'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue',
23
- 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif`}}},Is={xxxs:{value:"0.375rem"},xxs:{value:"0.5rem"},xs:{value:"0.75rem"},small:{value:"0.875rem"},medium:{value:"1rem"},large:{value:"1.25rem"},xl:{value:"1.5rem"},xxl:{value:"2rem"},xxxl:{value:"2.5rem"},xxxxl:{value:"3rem"}},xpe={hairline:{value:100},thin:{value:200},light:{value:300},normal:{value:400},medium:{value:500},semibold:{value:600},bold:{value:700},extrabold:{value:800},black:{value:900}},_pe={small:{value:"1.25"},medium:{value:"1.5"},large:{value:"2"}},Ipe={0:{value:"0"},10:{value:"0.1"},20:{value:"0.2"},30:{value:"0.3"},40:{value:"0.4"},50:{value:"0.5"},60:{value:"0.6"},70:{value:"0.7"},80:{value:"0.8"},90:{value:"0.9"},100:{value:"1"}},Ape={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},Rpe={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},Tpe={xs:{value:"0.125rem"},small:{value:"0.25rem"},medium:{value:"0.5rem"},large:{value:"1rem"},xl:{value:"2rem"},xxl:{value:"4rem"},xxxl:{value:"8rem"}},Ope={small:{value:{offsetX:"0px",offsetY:"2px",blurRadius:"4px",color:"{colors.shadow.tertiary.value}"}},medium:{value:{offsetX:"0px",offsetY:"2px",blurRadius:"6px",color:"{colors.shadow.secondary.value}"}},large:{value:{offsetX:"0px",offsetY:"4px",blurRadius:"12px",color:"{colors.shadow.primary.value}"}}},As={zero:{value:"0"},xxxs:{value:"0.25rem"},xxs:{value:"0.375rem"},xs:{value:"0.5rem"},small:{value:"0.75rem"},medium:{value:"1rem"},large:{value:"1.5rem"},xl:{value:"2.0rem"},xxl:{value:"3.0rem"},xxxl:{value:"4.5rem"},relative:{xxxs:{value:"0.25em"},xxs:{value:"0.375em"},xs:{value:"0.5em"},small:{value:"0.75em"},medium:{value:"1em"},large:{value:"1.5em"},xl:{value:"2.0em"},xxl:{value:"3.0em"},xxxl:{value:"4.5em"},full:{value:"100%"}}},Mpe={short:{value:"100ms"},medium:{value:"250ms"},long:{value:"500ms"}},Ppe={slideX:{small:{value:"translateX(0.5em)"},medium:{value:"translateX(1em)"},large:{value:"translateX(2em)"}}},Npe={components:wpe,borderWidths:yhe,colors:bhe,fonts:Epe,fontSizes:Is,fontWeights:xpe,lineHeights:_pe,opacities:Ipe,outlineOffsets:Ape,outlineWidths:Rpe,radii:Tpe,shadows:Ope,space:As,time:Mpe,transforms:Ppe};Is.xxs,Is.xs,Is.small,Is.medium,Is.large,Is.xl,Is.xxl,Is.xxxl,As.xxxs,As.xs,As.small,As.medium,As.large,As.xl,As.xxl,As.xxxl;const kpe={values:{base:0,small:480,medium:768,large:992,xl:1280,xxl:1536},defaultBreakpoint:"base"},Y9={tokens:Npe,breakpoints:kpe,name:"default-theme"};var $E,OL;function Dpe(){if(OL)return $E;OL=1;function e(t,n,r,o){var s=-1,a=t==null?0:t.length;for(o&&a&&(r=t[++s]);++s<a;)r=n(r,t[s],s,t);return r}return $E=e,$E}var zE,ML;function Lpe(){if(ML)return zE;ML=1;function e(t){return function(n){return t?.[n]}}return zE=e,zE}var jE,PL;function Upe(){if(PL)return jE;PL=1;var e=Lpe(),t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},n=e(t);return jE=n,jE}var BE,NL;function Fpe(){if(NL)return BE;NL=1;var e=Upe(),t=NR(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",o="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",a=r+o+s,c="["+a+"]",u=RegExp(c,"g");function f(h){return h=t(h),h&&h.replace(n,e).replace(u,"")}return BE=f,BE}var HE,kL;function $pe(){if(kL)return HE;kL=1;var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(n){return n.match(e)||[]}return HE=t,HE}var qE,DL;function zpe(){if(DL)return qE;DL=1;var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function t(n){return e.test(n)}return qE=t,qE}var VE,LL;function jpe(){if(LL)return VE;LL=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,s="\\u2700-\\u27bf",a="a-z\\xdf-\\xf6\\xf8-\\xff",c="\\xac\\xb1\\xd7\\xf7",u="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",f="\\u2000-\\u206f",h=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",m="A-Z\\xc0-\\xd6\\xd8-\\xde",g="\\ufe0e\\ufe0f",v=c+u+f+h,C="['’]",b="["+v+"]",E="["+o+"]",x="\\d+",I="["+s+"]",R="["+a+"]",O="[^"+e+v+x+s+a+m+"]",D="\\ud83c[\\udffb-\\udfff]",N="(?:"+E+"|"+D+")",M="[^"+e+"]",L="(?:\\ud83c[\\udde6-\\uddff]){2}",$="[\\ud800-\\udbff][\\udc00-\\udfff]",G="["+m+"]",j="\\u200d",F="(?:"+R+"|"+O+")",q="(?:"+G+"|"+O+")",J="(?:"+C+"(?:d|ll|m|re|s|t|ve))?",Se="(?:"+C+"(?:D|LL|M|RE|S|T|VE))?",V=N+"?",ee="["+g+"]?",me="(?:"+j+"(?:"+[M,L,$].join("|")+")"+ee+V+")*",ge="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",z=ee+V+me,te="(?:"+[I,L,$].join("|")+")"+z,fe=RegExp([G+"?"+R+"+"+J+"(?="+[b,G,"$"].join("|")+")",q+"+"+Se+"(?="+[b,G+F,"$"].join("|")+")",G+"?"+F+"+"+J,G+"+"+Se,Te,ge,x,te].join("|"),"g");function ae(be){return be.match(fe)||[]}return VE=ae,VE}var WE,UL;function Bpe(){if(UL)return WE;UL=1;var e=$pe(),t=zpe(),n=NR(),r=jpe();function o(s,a,c){return s=n(s),a=c?void 0:a,a===void 0?t(s)?r(s):e(s):s.match(a)||[]}return WE=o,WE}var GE,FL;function Hpe(){if(FL)return GE;FL=1;var e=Dpe(),t=Fpe(),n=Bpe(),r="['’]",o=RegExp(r,"g");function s(a){return function(c){return e(n(t(c).replace(o,"")),a,"")}}return GE=s,GE}var KE,$L;function qpe(){if($L)return KE;$L=1;var e=Hpe(),t=e(function(n,r,o){return n+(o?"-":"")+r.toLowerCase()});return KE=t,KE}var Vpe=qpe();const Q9=Eu(Vpe),Wpe=/\{([^}]+)\}/g;function J9(e){const t=new RegExp(Wpe);if(typeof e=="string")return t.test(e);if(typeof e=="object"){let n=!1;for(const r in e)if(js(e,r)){const o=e[r];if(J9(o)){n=!0;break}}return n}return!1}const Gpe="amplify";function Q_(e){return Object.entries(e).map(([t,n])=>{const r=Yy(n)?n.toString():X9({value:n});return`${Q9(t)}:${r}; `}).join(" ")}function $R({path:e=[]}){return`${Q9([Gpe,...e].join(" "))}`}const Kpe=["offsetX","offsetY","blurRadius","spreadRadius","color"];function X9(e){const{value:t}=e;return zs(t)?jL(t):zL(t)?Kpe.map(n=>jL(zL(e)?e[n]:t[n])).join(" "):t}function Yy(e){return zr(e)&&js(e,"value")}function zL(e){return zr(e)&&js(e,"offsetX")}function jL(e){if(!e)return"";if(J9(e)){const t=e.replace(/\{|\}/g,"").replace(".value","").split(".");return`var(--${$R({path:t})})`}return e}const BL=({token:e,path:t})=>{const n=`--${$R({path:t})}`,{value:r}=e,o=X9(e);return{name:n,original:r,path:t,value:o,toString:()=>`var(${n})`}};function J_({tokens:e,path:t=[],setupToken:n}){if(js(e,"value"))return n({token:e,path:t});const r={};for(const o in e)if(js(e,o)){const s=e[o],a=zr(s)?s:{value:s};r[o]=J_({tokens:a,path:t.concat(o),setupToken:n})}return r}function X_(e,t){t=t||[];for(var n in e)js(e,n)&&(zr(e[n])&&"value"in e[n]?t.push(e[n]):zr(e[n])&&X_(e[n],t));return t}function e7(e,t,n){if(e==null)return{};var r,o,s,a,c,u,f=e[0]||{},h=1,m=e.length;for(n=n||[],typeof f!="object"&&(f={});h<m;h++)if((c=e[h])!=null){for(a in c)if(js(c,a)&&a!=="__proto__"&&(r=f[a],s=c[a],f!==s))if(s&&(zr(s)||(o=Array.isArray(s)))){o?(o=!1,u=r&&Array.isArray(r)?r:[]):u=r&&zr(r)?r:{};var g=n.slice(0);g.push(a),f[a]=e7([u,s],t,g)}else s!==void 0&&(f[a]=s)}return f}function HL(e,t){return t?`${e} { ${Object.entries(t).map(([n,r])=>`--${n}:${r}; `).join(" ")}}
24
- `:""}function ki(e,t){let n="";const{_modifiers:r={},_element:o={},_vars:s,...a}=t;if(Object.keys(a).length){const[c,u]=Zce(a,f=>f.startsWith(":")||f.startsWith("["));Object.entries(c).forEach(([f,h])=>{const{_modifiers:m={},_element:g={},_vars:v,...C}=h;n+=`${e}${f} { ${Q_(C)} }
25
- `,n+=HL(`${e}${f}`,v)}),n+=`${e} { ${Q_(u)} }
26
- `}return n+=HL(e,s),Object.entries(r).forEach(([c,u])=>{u&&Object.keys(u).length&&(n+=ki(`${e}--${c}`,u))}),Object.entries(o).forEach(([c,u])=>{u&&Object.keys(u).length&&(n+=ki(`${e}__${c}`,u))}),n}function Zpe({theme:e,components:t}){let n="";const{tokens:r,name:o,breakpoints:s}=e;return t.forEach(({name:a,theme:c,overrides:u})=>{const f=`amplify-${a}`,h=`[data-amplify-theme="${o}"] .${f}`,m=Bs(c)?c(r):c;n+=ki(h,m),u&&u.forEach(g=>{const v=Bs(g.theme)?g.theme(r):g.theme;if("mediaQuery"in g&&(n+=`@media (${g.mediaQuery}) {
27
- ${ki(h,v)}
28
- }`),"breakpoint"in g){const C=s.values[g.breakpoint];n+=`
29
- @media (min-width: ${C}px) {
30
- ${ki(h,v)}
31
- }`}"selector"in g&&(n+=ki(`${g.selector} .${f}`,v)),"colorMode"in g&&(n+=`
32
- @media (prefers-color-scheme: ${g.colorMode}) {
33
- ${ki(`[data-amplify-theme="${o}"][data-amplify-color-mode="system"] .${f}`,v)}
34
- }
35
- `,n+=ki(`[data-amplify-theme="${o}"][data-amplify-color-mode="${g.colorMode}"] .${f}`,v))})}),n}function qL({keys:e,value:t}){return e.reduce((n,r)=>({...n,[r]:{value:`{colors.${t}.${r}.value}`}}),{})}function Ype({animations:e,tokens:t}){let n="";return Object.entries(e).forEach(([r,o])=>{n+=`
36
- @keyframes ${r} {`,Object.entries(o).forEach(([s,a])=>{n+=`
37
- ${s} {
38
- `;const c=Bs(a)?a(t):a;n+=Q_(c),n+=`
39
- }`}),n+=`
40
- }`}),n}function Qy(e,t=Y9){const n=e7([{},t,{...e,components:{}}]),{primaryColor:r,secondaryColor:o}=n;zs(r)&&(n.tokens.colors.primary=qL({keys:Object.keys(n.tokens.colors[r]),value:r})),zs(o)&&(n.tokens.colors.secondary=qL({keys:Object.keys(n.tokens.colors[o]),value:o}));const s=J_({tokens:n.tokens,setupToken:BL}),{breakpoints:a,name:c}=n;let u=`[data-amplify-theme="${c}"] {
41
- `+X_(s).map(h=>`${h.name}: ${h.value};`).join(`
42
- `)+`
43
- }
44
- `;e?.components&&(u+=Zpe({theme:{...n,tokens:s},components:e.components}));let f=[];return n.animations&&(u+=Ype({animations:n.animations,tokens:s})),n.overrides&&(f=n.overrides.map(h=>{const m=J_({tokens:h.tokens,setupToken:BL}),g=X_(m).map(v=>`${v.name}: ${v.value};`).join(`
45
- `);if("selector"in h&&(u+=`
46
- ${h.selector} {
47
- ${g}
48
- }
49
- `),"mediaQuery"in h&&(u+=`
50
- @media (${h.mediaQuery}) {
51
- [data-amplify-theme="${c}"] {
52
- ${g}
53
- }
54
- }
55
- `),"breakpoint"in h){const v=n.breakpoints.values[h.breakpoint];u+=`
56
- @media (min-width: ${v}px) {
57
- [data-amplify-theme="${c}"] {
58
- ${g}
59
- }
60
- }
61
- `}return"colorMode"in h&&(u+=`
62
- @media (prefers-color-scheme: ${h.colorMode}) {
63
- [data-amplify-theme="${c}"][data-amplify-color-mode="system"] {
64
- ${g}
65
- color-scheme: ${h.colorMode};
66
- }
67
- }
68
- `,u+=`
69
- [data-amplify-theme="${c}"][data-amplify-color-mode="${h.colorMode}"] {
70
- ${g}
71
- color-scheme: ${h.colorMode};
72
- }
73
- `),{...h,tokens:m}})),{tokens:s,breakpoints:a,name:c,cssText:u,containerProps:({colorMode:h}={})=>({"data-amplify-theme":c,"data-amplify-color-mode":h}),overrides:f}}const ze=(...e)=>{const t=[];for(const n of e)if(n){if(zs(n)){t.push(n);continue}if(typeof n=="number"){t.push(n.toString());continue}if(Array.isArray(n)){t.push(ze(...n));continue}if(zr(n)){if(n.toString!==Object.prototype.toString&&n.toString()!=="[object Object]"){t.push(n.toString());continue}for(const r in n)js(n,r)&&n[r]&&t.push(r)}}return t.join(" ")},ie={Alert:"amplify-alert",AlertIcon:"amplify-alert__icon",AlertHeading:"amplify-alert__heading",AlertBody:"amplify-alert__body",AlertDismiss:"amplify-alert__dismiss",Button:"amplify-button",ButtonLoaderWrapper:"amplify-button__loader-wrapper",CountryCodeSelect:"amplify-countrycodeselect",DialCodeSelect:"amplify-dialcodeselect",Divider:"amplify-divider",Field:"amplify-field",FieldDescription:"amplify-field__description",FieldErrorMessage:"amplify-field__error-message",FieldGroup:"amplify-field-group",FieldGroupControl:"amplify-field-group__control",FieldGroupOuterEnd:"amplify-field-group__outer-end",FieldGroupOuterStart:"amplify-field-group__outer-start",FieldGroupInnerEnd:"amplify-field-group__inner-end",FieldGroupInnerStart:"amplify-field-group__inner-start",FieldGroupHasInnerEnd:"amplify-field-group--has-inner-end",FieldGroupHasInnerStart:"amplify-field-group--has-inner-start",FieldShowPassword:"amplify-field__show-password",FieldGroupFieldWrapper:"amplify-field-group__field-wrapper",Fieldset:"amplify-fieldset",FieldsetLegend:"amplify-fieldset__legend",Flex:"amplify-flex",Heading:"amplify-heading",Icon:"amplify-icon",Input:"amplify-input",Label:"amplify-label",Loader:"amplify-loader",LoaderLabel:"amplify-loader__label",PasswordField:"amplify-passwordfield",PhoneNumberField:"amplify-phonenumberfield",Radio:"amplify-radio",RadioButton:"amplify-radio__button",RadioInput:"amplify-radio__input",RadioLabel:"amplify-radio__label",RadioGroupField:"amplify-radiogroupfield",RadioGroup:"amplify-radiogroup",Select:"amplify-select",SelectField:"amplify-selectfield",SelectWrapper:"amplify-select__wrapper",SelectIcon:"amplify-select__icon",Tabs:"amplify-tabs",TabsList:"amplify-tabs__list",TabsItem:"amplify-tabs__item",TabsPanel:"amplify-tabs__panel",Text:"amplify-text",TextField:"amplify-textfield",VisuallyHidden:"amplify-visually-hidden"},Qpe=({componentName:e,packageName:t,version:n})=>{const r=[`ui-${t}`,n];switch(e){case"AIConversation":{Es({...kce,additionalDetails:[[e],r]});break}case"Authenticator":{Es({...Lce,additionalDetails:[[e],r]});break}case"ChangePassword":case"DeleteUser":{Es({...Dce,additionalDetails:[["AccountSettings"],r]});break}case"FileUploader":{Es({...Uce,additionalDetails:[[e],r]});break}case"InAppMessaging":{Es({...Fce,additionalDetails:[[e],r]});break}case"LocationSearch":{Es({...$ce,additionalDetails:[[e],r]});break}case"MapView":{Es({...zce,additionalDetails:[[e],r]});break}case"StorageManager":{Es({...jce,additionalDetails:[[e],r]});break}case"StorageBrowser":{Es({...Bce,additionalDetails:[[e],r]});break}}return Kce},eI=B.createContext(null),Jpe=e=>(t,n)=>{F9(t,n,e)};function t7({children:e}){const[t,n]=B.useState("configuring");B.useEffect(()=>{yy().then(()=>{n("authenticated")}).catch(()=>{n("unauthenticated")})},[]);const r=_.useContext(eI),o=Sce(ghe),s=_.useMemo(()=>r??{authStatus:t,service:o},[t,r,o]),{service:a}=s;return _.useEffect(()=>Yce(a,Jpe({onSignIn:()=>{n("authenticated")},onSignOut:()=>{n("unauthenticated")}})),[a]),B.createElement(eI.Provider,{value:s},e)}const Xpe="`useAuthenticator` must be used inside an `Authenticator.Provider`.",eme=["confirmResetPassword","confirmSignIn","confirmSignUp","confirmVerifyUser","forceNewPassword","forgotPassword","selectMfaType","setupEmail","setupTotp","signIn","signUp","verifyUser"],tme=e=>eme.some(t=>t===e),nme=()=>!1;function rme(e,t){return e.length!==t.length?!1:e.every((n,r)=>{const o=t[r];return Wce(n,o)||Gce(n,o)?!0:n===o})}const ome=e=>(t,n)=>{const r=e(t),o=e(n);return rme(r,o)},sme=e=>({...Gf(e)?.formFields?.setupTotp?.QR}),ime=e=>e.flatMap(([t,n])=>({name:t,...n})),ame=(e={})=>e&&Object.entries(e).map(([t,n])=>!zs(n)||!t?{}:{name:t,label:n,type:"radio",value:n}),lme=(e=[])=>e.map(t=>({name:"mfa_type",label:Rn.getMfaTypeLabelByValue(t),type:"radio",value:t})),cme=(e,t)=>tme(e)?e==="verifyUser"?ame(Gf(t).unverifiedUserAttributes):e==="selectMfaType"?lme(Gf(t).allowedMfaTypes):ime(Oue(e,t)):[];function ht(e){const t=B.useContext(eI);if(!t)throw new Error(Xpe);const{service:n}=t,{send:r}=n,o=_.useCallback(b=>({...tue({send:r,state:b})}),[r]),s=e?ome(e):nme,{authStatus:a}=t,c=Ice(n,o,s),{route:u,totpSecretCode:f,user:h,...m}=c,g=n.getSnapshot(),v=u==="setupTotp"?sme(g):null,C=cme(u,g);return{...m,authStatus:a,route:u,totpSecretCode:f,user:h,fields:C,QRFields:v}}const ume=({route:e})=>[e];function dme(e){const{route:t,initializeMachine:n}=ht(ume),r=B.useRef(!1);B.useEffect(()=>{!r.current&&t==="setup"&&(n(e),r.current=!0)},[n,t,e])}const fme=({shouldWarn:e,message:t})=>{_.useEffect(()=>{},[e,t])};function hme({componentName:e,packageName:t,version:n}){_.useEffect(()=>Qpe({componentName:e,packageName:t,version:n}),[e,t,n])}const n7=_.createContext({theme:Qy(),colorMode:void 0}),zR={alignContent:"alignContent",alignItems:"alignItems",alignSelf:"alignSelf",area:"gridArea",aspectRatio:"aspectRatio",autoColumns:"gridAutoColumns",autoFlow:"gridAutoFlow",autoRows:"gridAutoRows",backgroundColor:"backgroundColor",backgroundImage:"backgroundImage",basis:"flexBasis",border:"border",borderRadius:"borderRadius",borderColor:"borderColor",borderWidth:"borderWidth",borderStyle:"borderStyle",bottom:"bottom",boxShadow:"boxShadow",color:"color",column:"gridColumn",columnEnd:"gridColumnEnd",columnGap:"columnGap",columnSpan:"gridColumn",columnStart:"gridColumnStart",direction:"flexDirection",display:"display",flex:"flex",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:"fontStyle",fontWeight:"fontWeight",gap:"gap",grow:"flexGrow",height:"height",justifyContent:"justifyContent",left:"left",letterSpacing:"letterSpacing",lineHeight:"lineHeight",margin:"margin",marginBlock:"marginBlock",marginBlockEnd:"marginBlockEnd",marginBlockStart:"marginBlockStart",marginBottom:"marginBlockEnd",marginInline:"marginInline",marginInlineEnd:"marginInlineEnd",marginInlineStart:"marginInlineStart",marginLeft:"marginInlineStart",marginRight:"marginInlineEnd",marginTop:"marginBlockStart",maxHeight:"maxHeight",maxWidth:"maxWidth",minHeight:"minHeight",minWidth:"minWidth",objectFit:"objectFit",objectPosition:"objectPosition",opacity:"opacity",order:"order",overflow:"overflow",padding:"padding",paddingBlock:"paddingBlock",paddingBlockEnd:"paddingBlockEnd",paddingBlockStart:"paddingBlockStart",paddingBottom:"paddingBlockEnd",paddingInline:"paddingInline",paddingInlineEnd:"paddingInlineEnd",paddingInlineStart:"paddingInlineStart",paddingLeft:"paddingInlineStart",paddingRight:"paddingInlineEnd",paddingTop:"paddingBlockStart",position:"position",resize:"resize",right:"right",row:"gridRow",rowEnd:"gridRowEnd",rowGap:"rowGap",rowSpan:"gridRow",rowStart:"gridRowStart",shrink:"flexShrink",templateAreas:"gridTemplateAreas",templateColumns:"gridTemplateColumns",templateRows:"gridTemplateRows",textAlign:"textAlign",textDecoration:"textDecoration",textTransform:"textTransform",top:"top",transform:"transform",transformOrigin:"transformOrigin",width:"width",whiteSpace:"whiteSpace",wrap:"flexWrap"},jR={Alert:{dismissButtonLabel:"Dismiss alert"},PhoneNumberField:{countryCodeLabel:"Country code"},PasswordField:{passwordIsHidden:"Password is hidden",passwordIsShown:"Password is shown",showPassword:"Show password"}},tI={backgroundColor:"colors",borderColor:"colors",borderWidth:"borderWidths",color:"colors",borderRadius:"radii",fontSize:"fontSizes",fontWeight:"fontWeights",fontFamily:"fonts",lineHeight:"lineHeights",opacity:"opacities",boxShadow:"shadows",transform:"transforms",left:"space",right:"space",top:"space",bottom:"space",height:"space",width:"space",letterSpacing:"space",margin:"space",marginBlock:"space",marginBlockEnd:"space",marginBlockStart:"space",marginInline:"space",marginInlineEnd:"space",marginInlineStart:"space",marginLeft:"space",marginRight:"space",marginTop:"space",marginBottom:"space",maxHeight:"space",maxWidth:"space",minHeight:"space",minWidth:"space",padding:"space",paddingBlock:"space",paddingBlockEnd:"space",paddingBlockStart:"space",paddingInline:"space",paddingInlineEnd:"space",paddingInlineStart:"space",paddingLeft:"space",paddingRight:"space",paddingTop:"space",paddingBottom:"space",gap:"space",columnGap:"space",rowGap:"space"},pme=e=>e in tI,r7=e=>typeof e=="string"&&e.length===0,VL=e=>e==null||r7(e),Jy=e=>Object.keys(e),BR=(e,t,n)=>{if(typeof t!="string")return t;if(t.includes(" "))return t.split(" ").map(r=>BR(e,r,n)).join(" ");if(pme(e)){const r=t.split("."),o=tI[e];let s=n[o];for(let a=0;a<r.length;a++){if(s){s=s[r[a]];continue}break}return Yy(s)?`var(--${$R({path:[tI[e],...r]})})`:t}return t},mme=({breakpoint:e,breakpoints:t,values:n})=>{const r=n[e];if(r!==void 0)return r;const o=Jy(t).sort((a,c)=>t[c]-t[a]),s=o.slice(o.indexOf(e));for(const a of s){const c=n[a];if(c!==void 0)return c}return null},gme=e=>Jy(e).reduce((t,n)=>n in Y9.breakpoints.values?{...t,[n]:e[n]}:t,{}),vme=({breakpoint:e,breakpoints:t,values:n})=>{let r={};const o=Jy(t).sort((s,a)=>t[s]-t[a]);return Array.isArray(n)?n.forEach((s,a)=>{r[o[a]]=s}):typeof n=="object"&&(r=gme(n)),mme({breakpoint:e,breakpoints:t,values:r})},yme=({breakpoints:e})=>{const t=Jy(e).sort((n,r)=>e[r]-e[n]);return t.map((n,r)=>{let o="";const s=e[n],a=t[r-1],c=a?e[a]-1:null;return s>=0&&(o=`(min-width: ${s}px)`),c!==null&&(o&&(o+=" and "),o+=`(max-width: ${c}px)`),{breakpoint:n,query:o,maxWidth:c,minWidth:s}})},bme=typeof window>"u"?_.useEffect:_.useLayoutEffect,Sme=({breakpoints:e,defaultBreakpoint:t})=>{const r=typeof window<"u"&&typeof window.matchMedia<"u"?window.matchMedia:null,o=_.useMemo(()=>yme({breakpoints:e}),[e]),[s,a]=_.useState(t),c=_.useCallback((u,f)=>{u&&a(f)},[a]);return bme(()=>{if(!r)return;const u=o.map(({query:f,breakpoint:h})=>{const m=r(f);c(m.matches,h);const g=v=>{v.matches&&a(h)};return m.addEventListener("change",g),()=>m.removeEventListener("change",g)});return()=>{u.forEach(f=>f())}},[e,a,r,o]),_.useDebugValue(s,u=>u),s},Cme=e=>typeof e>"u"||typeof e.theme>"u"?Qy():e.theme,wme=()=>{const e=_.useContext(n7);return Cme(e)},Eme=({value:e,propKey:t,tokens:n})=>Yy(e)?e.toString():zs(e)?zs(t)?BR(t,e,n):e:null,xme=e=>e==="auto"||typeof e=="number"&&!isNaN(e)||typeof e=="string"&&!isNaN(parseFloat(e)),ZE=e=>e==="auto"?"auto":`span ${e}`,WL=e=>xme(e)?ZE(e):Array.isArray(e)?e.map(t=>ZE(t)):typeof e=="object"&&e!=null?Object.entries(e).reduce((t,[n,r])=>({...t,[n]:ZE(r)}),{}):null,_me=e=>{const{rowSpan:t,columnSpan:n,row:r,column:o,...s}=e,{rowFromSpanValue:a,columnFromSpanValue:c}=_.useMemo(()=>({rowFromSpanValue:WL(t),columnFromSpanValue:WL(n)}),[t,n]);return{row:VL(r)?a:r,column:VL(o)?c:o,...s}},Ime=e=>e in zR,Ame=({props:e={},style:t={},breakpoint:n,breakpoints:r,tokens:o})=>{const s={};return Object.keys(e).filter(a=>e[a]!==null).forEach(a=>{if(Ime(a)){const c=e[a];if(c==null||r7(c))return;const u=zR[a];let f="";Yy(c)?f=c.toString():typeof c=="string"?f=BR(a,c,o):typeof c=="number"?f=c:typeof c=="object"&&(f=Eme({propKey:a,tokens:o,value:vme({values:c,breakpoint:n,breakpoints:r})})),t={...t,[u]:f}}else typeof e[a]<"u"&&(s[a]=e[a])}),{propStyles:t,nonStyleProps:s}},Rme=(e,t)=>{const{breakpoints:{values:n,defaultBreakpoint:r},tokens:o}=wme(),s=Sme({breakpoints:n,defaultBreakpoint:r}),a=_me(e);return _.useMemo(()=>Ame({props:a,style:t,breakpoint:s,breakpoints:n,tokens:o}),[a,t,n,s,o])},Ft=e=>_.forwardRef(e),Tme=({as:e="div",children:t,testId:n,ariaLabel:r,isDisabled:o,style:s,inert:a,...c},u)=>{const{propStyles:f,nonStyleProps:h}=Rme(c,s);return _.createElement(e,{"aria-label":r,"data-testid":n,disabled:o,ref:u,inert:a?"":null,style:f,...h},t)},je=Ft(Tme);je.displayName="View";const Zd={minX:0,minY:0,width:24,height:24},Ome=({className:e,as:t="svg",fill:n="currentColor",pathData:r,viewBox:o=Zd,children:s,paths:a,...c},u)=>{const f=o.minX??Zd.minX,h=o.minY??Zd.minY,m=o.width??Zd.width,g=o.height??Zd.height;let v;return s&&(v=s),a&&(v=a.map((C,b)=>_.createElement("path",{...C,key:b}))),r&&(v=_.createElement("path",{d:r,fill:n})),_.createElement(je,{as:t,className:ze(ie.Icon,e),ref:u,viewBox:`${f} ${h} ${m} ${g}`,...c},v)},o7=Ft(Ome);o7.displayName="Icon";const Mme=_.createContext({});function Xy(e){const t=_.useContext(Mme);if(e&&t)return t[e]}const Pme=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM16.59 7.58L10 14.17L7.41 11.59L6 13L10 17L18 9L16.59 7.58Z",fill:"currentColor"})))},Nme=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 17H11V15H13V17ZM13 13H11V7H13V13Z",fill:"currentColor"})))},kme=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M11 7H13V9H11V7ZM11 11H13V17H11V11ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z",fill:"currentColor"})))},Dme=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z",fill:"currentColor"})))},s7=({variation:e,ariaHidden:t,ariaLabel:n,role:r})=>{const o=Xy("alert");let s;switch(e){case"info":s=o?.info??_.createElement(kme,{"aria-hidden":t,"aria-label":n,role:r});break;case"error":s=o?.error??_.createElement(Nme,{"aria-hidden":t,"aria-label":n,role:r});break;case"warning":s=o?.warning??_.createElement(Dme,{"aria-hidden":t,"aria-label":n,role:r});break;case"success":s=o?.success??_.createElement(Pme,{"aria-hidden":t,"aria-label":n,role:r});break}return s?_.createElement("span",{className:ie.AlertIcon},s):null};s7.displayName="AlertIcon";const Lme=globalThis?.document?_.useLayoutEffect:()=>{},Ume="amplify-id",Fme=Nne.useId||(()=>{});let $me=0;const Yi=e=>{const[t,n]=_.useState(Fme());return Lme(()=>{e||n(r=>r??String($me++))},[e]),e??(t?`${Ume}-${t}`:"")},i7=_.createContext({isFieldsetDisabled:!1}),Ph=e=>{let n=_.useContext(i7).isFieldsetDisabled;return(n===void 0||n===!1)&&(n=e),{isFieldsetDisabled:n}},zme=({className:e,children:t,...n},r)=>_.createElement(je,{className:ze(ie.Flex,e),ref:r,...n},t),$e=Ft(zme);$e.displayName="Flex";const jme="linear-empty",Bme="linear-filled",Hme="circular-empty",qme="circular-filled",GL=8,nI=42,Pm=2*nI*Math.PI,Vme=({className:e,filledColor:t,emptyColor:n,size:r,variation:o,isDeterminate:s=!1,isPercentageTextHidden:a=!1,percentage:c=0,...u},f)=>{c=Math.min(c,100),c=Math.max(c,0);const h=`${c}%`,m=ze(ie.Loader,Lt(ie.Loader,r),Lt(ie.Loader,o),br(ie.Loader,"determinate",s),e),g=_.createElement("g",null,_.createElement("line",{x1:"0",x2:"100%",y1:"50%",y2:"50%",style:{stroke:String(n)},"data-testid":jme}),_.createElement("line",{x1:"0",x2:s?h:"100%",y1:"50%",y2:"50%",style:{stroke:s&&c===0?"none":t?String(t):void 0},"data-testid":Bme}),s?_.createElement("text",{"aria-live":"polite",className:ze(ie.LoaderLabel,a?ie.VisuallyHidden:null),x:`${-1+c}%`,y:"200%"},h):null),v=_.createElement("g",null,_.createElement("circle",{cx:"50%",cy:"50%",r:`${nI}%`,strokeWidth:`${GL}%`,style:{stroke:String(n)},"data-testid":Hme}),_.createElement("circle",{cx:"50%",cy:"50%",r:`${nI}%`,strokeWidth:`${GL}%`,style:{stroke:String(t),strokeDasharray:s?`${Pm}% ${Pm}%`:void 0,strokeDashoffset:s?`${Pm-Pm*c/100}%`:void 0},"data-testid":qme}),s?_.createElement("text",{"aria-live":"polite",className:ze(ie.LoaderLabel,a?ie.VisuallyHidden:null),x:"130%",y:"80%"},h):null);return _.createElement(je,{as:"svg","aria-valuenow":s?c:void 0,className:m,ref:f,role:"progressbar",...u},o==="linear"?g:v)},a7=Ft(Vme);a7.displayName="Loader";const Wme=["link","primary",void 0],Gme=({className:e,children:t,colorTheme:n,isFullWidth:r=!1,isDisabled:o,isLoading:s,loadingText:a="",size:c,type:u="button",variation:f,...h},m)=>{const g=Wme.includes(f)&&n?`${f??"outlined"}--${n}`:void 0,{isFieldsetDisabled:v}=Ph(o??s??h.disabled),C=ze(ie.Button,ie.FieldGroupControl,Lt(ie.Button,f),Lt(ie.Button,g),Lt(ie.Button,c),br(ie.Button,"disabled",v),br(ie.Button,"loading",s),br(ie.Button,"fullwidth",r),e);return _.createElement(je,{ref:m,as:"button",className:C,isDisabled:v,type:u,...h},s?_.createElement($e,{as:"span",className:ie.ButtonLoaderWrapper},_.createElement(a7,{size:c}),a||null):t)},Kt=Ft(Gme);Kt.displayName="Button";const Kme=e=>{const{className:t,size:n,...r}=e;return _.createElement(je,{as:"span",width:n??"1em",height:n??"1em",className:ze(ie.Icon,t),...r},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n?{width:n,height:n}:void 0},_.createElement("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"currentColor"})))},Zme=({as:e="p",className:t,children:n,isTruncated:r,variation:o,...s},a)=>{const c=ze(ie.Text,Lt(ie.Text,o),br(ie.Text,"truncated",r),t);return _.createElement(je,{as:e,className:c,ref:a,...s},n)},io=Ft(Zme);io.displayName="Text";const Yme="qa-field-description",eb=({descriptiveText:e,labelHidden:t,...n})=>e?_.createElement(io,{"data-testid":Yme,className:ze(ie.FieldDescription,{[ie.VisuallyHidden]:t}),...n},e):null;eb.displayName="FieldDescription";const tb=({errorMessage:e,hasError:t,...n})=>t&&e?_.createElement(io,{className:ie.FieldErrorMessage,...n},e):null;tb.displayName="FieldErrorMessage";const Qme=({children:e,className:t,visuallyHidden:n,...r},o)=>_.createElement(je,{as:"label",className:ze(ie.Label,t,{[ie.VisuallyHidden]:n}),ref:o,...r},e),HR=Ft(Qme);HR.displayName="Label";const Jme=({buttonRef:e,children:t,className:n,dismissButtonLabel:r=jR.Alert.dismissButtonLabel,hasIcon:o=!0,heading:s,isDismissible:a=!1,onDismiss:c,variation:u,...f},h)=>{const[m,g]=_.useState(!1),v=Xy("alert"),C=_.useCallback(()=>{g(!m),Bs(c)&&c()},[g,c,m]);return m?null:_.createElement($e,{className:ze(ie.Alert,n,Lt(ie.Alert,u)),ref:h,role:"alert",...f},o&&_.createElement(s7,{variation:u,ariaHidden:!0}),_.createElement(je,{flex:"1"},s&&_.createElement(je,{className:ie.AlertHeading},s),_.createElement(je,{className:ie.AlertBody},t)),a&&_.createElement(Kt,{ariaLabel:r,variation:"link",className:ie.AlertDismiss,onClick:C,ref:e},v?.close??_.createElement(Kme,{"aria-hidden":"true"})))},l7=Ft(Jme);l7.displayName="Alert";const Ga=(e,t)=>e&&t?`${e}-${t}`:void 0,Xme=({children:e,className:t,innerEndComponent:n,innerStartComponent:r,orientation:o="horizontal",outerEndComponent:s,outerStartComponent:a,variation:c,...u},f)=>{const h=r!=null,m=n!=null,g=h?ie.FieldGroupHasInnerStart:null,v=m?ie.FieldGroupHasInnerEnd:null,C=ze(ie.FieldGroup,g,v,Lt(ie.FieldGroup,o),t);return _.createElement($e,{className:C,ref:f,...u},a&&_.createElement(je,{className:ze(ie.FieldGroupOuterStart,Lt(ie.FieldGroupOuterStart,c))},a),_.createElement(je,{className:ze(ie.FieldGroupFieldWrapper,Lt(ie.FieldGroupFieldWrapper,o))},r&&_.createElement(je,{className:ie.FieldGroupInnerStart},r),e,n&&_.createElement(je,{className:ie.FieldGroupInnerEnd},n)),s&&_.createElement(je,{className:ze(ie.FieldGroupOuterEnd,Lt(ie.FieldGroupOuterEnd,c))},s))},c7=Ft(Xme);c7.displayName="FieldGroup";const ege=({autoComplete:e,checked:t,className:n,defaultChecked:r,defaultValue:o,id:s,isDisabled:a,isReadOnly:c,isRequired:u,size:f,type:h="text",hasError:m=!1,value:g,variation:v,...C},b)=>{const E=ze(ie.Input,ie.FieldGroupControl,Lt(ie.Input,v),br(ie.Input,"error",m),Lt(ie.Input,f),n),{isFieldsetDisabled:x}=Ph(a);return _.createElement(je,{"aria-invalid":m,as:"input",autoComplete:e,checked:t,className:E,defaultChecked:r,defaultValue:o,isDisabled:x,id:s,readOnly:c,ref:b,required:u,type:h,value:g,...C})},qR=Ft(ege);qR.displayName="Input";const tge=e=>e in zR,u7=e=>{const t={styleProps:{},rest:{}};return Object.keys(e).forEach(n=>{tge(n)?t.styleProps={...t.styleProps,[n]:e[n]}:t.rest={...t.rest,[n]:e[n]}}),t},VR=e=>{const t=e.filter(n=>n!==void 0).join(" ");return t.length>0?t:void 0},WR="error",GR="description",nge=(e,t)=>{const{className:n,descriptiveText:r,errorMessage:o,hasError:s=!1,id:a,innerEndComponent:c,innerStartComponent:u,label:f,labelHidden:h=!1,outerEndComponent:m,outerStartComponent:g,size:v,testId:C,variation:b,inputStyles:E,...x}=e,I=Yi(a),R=Yi(),O=r?Ga(R,GR):void 0,D=s?Ga(R,WR):void 0,N=VR([D,O]),{styleProps:M,rest:L}=u7(x);return _.createElement($e,{className:ze(ie.Field,Lt(ie.Field,v),ie.TextField,n),testId:C,...M},_.createElement(HR,{htmlFor:I,visuallyHidden:h},f),_.createElement(eb,{id:O,labelHidden:h,descriptiveText:r}),_.createElement(c7,{outerStartComponent:g,outerEndComponent:m,innerStartComponent:u,innerEndComponent:c,variation:b},_.createElement(qR,{"aria-describedby":N,hasError:s,id:I,ref:t,size:v,variation:b,...E,...L})),_.createElement(tb,{id:D,hasError:s,errorMessage:o}))},Nh=Ft(nge);Nh.displayName="TextField";const rge=({as:e="span",children:t,className:n,...r},o)=>_.createElement(je,{as:e,className:ze(ie.VisuallyHidden,n),ref:o,...r},t),nb=Ft(rge);nb.displayName="VisuallyHidden";const oge=({className:e,orientation:t="horizontal",size:n,label:r,...o},s)=>{const a=ze(ie.Divider,Lt(ie.Divider,t),Lt(ie.Divider,n),e);return _.createElement(je,{"aria-orientation":t,as:"hr",className:a,"data-label":r,ref:s,...o})},KR=Ft(oge);KR.displayName="Divider";const sge=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M16.59 8.58984L12 13.1698L7.41 8.58984L6 9.99984L12 15.9998L18 9.99984L16.59 8.58984Z",fill:"currentColor"})))},ige=({children:e,className:t,isDisabled:n,legend:r,legendHidden:o,size:s,testId:a,variation:c="plain",...u},f)=>{const{isFieldsetDisabled:h}=Ph(n),m=_.useMemo(()=>({isFieldsetDisabled:h}),[h]),g=ze(ie.Fieldset,Lt(ie.Fieldset,c),Lt(ie.Fieldset,s),t),v=ze(ie.FieldsetLegend,Lt(ie.FieldsetLegend,s),{[ie.VisuallyHidden]:o});return _.createElement(i7.Provider,{value:m},_.createElement($e,{as:"fieldset",className:g,ref:f,disabled:h,testId:a,...u},_.createElement(nb,{as:"legend"},r),_.createElement(je,{as:"div","aria-hidden":"true",className:v},r),e))},d7=Ft(ige);d7.displayName="Fieldset";const age={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},lge=({className:e,children:t,isTruncated:n,level:r=6,...o},s)=>_.createElement(je,{as:age[r],className:ze(ie.Heading,Lt(ie.Heading,r),br(ie.Heading,"truncated",n),e),ref:s,...o},t),ar=Ft(lge);ar.displayName="Heading";var cge=_.createContext(void 0),uge=e=>{const{dir:t,children:n}=e;return T.jsx(cge.Provider,{value:t,children:n})};const dge=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M12 6.0002C15.79 6.0002 19.17 8.1302 20.82 11.5002C20.23 12.7202 19.4 13.7702 18.41 14.6202L19.82 16.0302C21.21 14.8002 22.31 13.2602 23 11.5002C21.27 7.1102 17 4.0002 12 4.0002C10.73 4.0002 9.51 4.2002 8.36 4.5702L10.01 6.2202C10.66 6.0902 11.32 6.0002 12 6.0002ZM10.93 7.14019L13 9.2102C13.57 9.4602 14.03 9.9202 14.28 10.4902L16.35 12.5602C16.43 12.2202 16.49 11.8602 16.49 11.4902C16.5 9.0102 14.48 7.0002 12 7.0002C11.63 7.0002 11.28 7.05019 10.93 7.14019ZM2.01 3.8702L4.69 6.5502C3.06 7.8302 1.77 9.5302 1 11.5002C2.73 15.8902 7 19.0002 12 19.0002C13.52 19.0002 14.98 18.7102 16.32 18.1802L19.74 21.6002L21.15 20.1902L3.42 2.4502L2.01 3.8702ZM9.51 11.3702L12.12 13.9802C12.08 13.9902 12.04 14.0002 12 14.0002C10.62 14.0002 9.5 12.8802 9.5 11.5002C9.5 11.4502 9.51 11.4202 9.51 11.3702V11.3702ZM6.11 7.97019L7.86 9.7202C7.63 10.2702 7.5 10.8702 7.5 11.5002C7.5 13.9802 9.52 16.0002 12 16.0002C12.63 16.0002 13.23 15.8702 13.77 15.6402L14.75 16.6202C13.87 16.8602 12.95 17.0002 12 17.0002C8.21 17.0002 4.83 14.8702 3.18 11.5002C3.88 10.0702 4.9 8.89019 6.11 7.97019Z",fill:"currentColor"})))},fge=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M12 6C15.79 6 19.17 8.13 20.82 11.5C19.17 14.87 15.79 17 12 17C8.21 17 4.83 14.87 3.18 11.5C4.83 8.13 8.21 6 12 6ZM12 4C7 4 2.73 7.11 1 11.5C2.73 15.89 7 19 12 19C17 19 21.27 15.89 23 11.5C21.27 7.11 17 4 12 4ZM12 9C13.38 9 14.5 10.12 14.5 11.5C14.5 12.88 13.38 14 12 14C10.62 14 9.5 12.88 9.5 11.5C9.5 10.12 10.62 9 12 9ZM12 7C9.52 7 7.5 9.02 7.5 11.5C7.5 13.98 9.52 16 12 16C14.48 16 16.5 13.98 16.5 11.5C16.5 9.02 14.48 7 12 7Z",fill:"currentColor"})))},{passwordIsHidden:hge,passwordIsShown:pge,showPassword:mge}=jR.PasswordField,gge=({fieldType:e,passwordIsHiddenLabel:t=hge,passwordIsShownLabel:n=pge,showPasswordButtonLabel:r=mge,size:o,hasError:s,...a},c)=>{const u=Xy("passwordField"),f=ze(ie.FieldShowPassword,br(ie.FieldShowPassword,"error",s)),h=e==="password"?u?.visibility??_.createElement(fge,{"aria-hidden":"true"}):u?.visibilityOff??_.createElement(dge,{"aria-hidden":"true"});return _.createElement(Kt,{"aria-checked":e!=="password",ariaLabel:r,className:f,colorTheme:s?"error":void 0,ref:c,role:"switch",size:o,...a},_.createElement(nb,{"aria-live":"polite"},e==="password"?t:n),h)},f7=Ft(gge);f7.displayName="ShowPasswordButton";const vge=({autoComplete:e="current-password",label:t,className:n,hideShowPassword:r=!1,passwordIsHiddenLabel:o,passwordIsShownLabel:s,showPasswordButtonLabel:a,showPasswordButtonRef:c,size:u,hasError:f,...h},m)=>{const[g,v]=_.useState("password"),C=_.useCallback(()=>{v(g==="password"?"text":"password")},[v,g]);return _.createElement(Nh,{autoComplete:e,outerEndComponent:r?null:_.createElement(f7,{fieldType:g,onClick:C,passwordIsHiddenLabel:o,passwordIsShownLabel:s,ref:c,size:u,showPasswordButtonLabel:a,hasError:f}),size:u,type:g,label:t,className:ze(ie.PasswordField,n),ref:m,hasError:f,...h})},ZR=Ft(vge);ZR.displayName="PasswordField";const yge=({autoComplete:e,className:t,size:n,variation:r,value:o,defaultValue:s,hasError:a,icon:c,iconColor:u,children:f,placeholder:h,isDisabled:m,isRequired:g,isMultiple:v=!1,selectSize:C=1,...b},E)=>{const I=o===void 0&&s===void 0&&h,R=v||C>1,O=ze(ie.Select,ie.FieldGroupControl,Lt(ie.Select,n),Lt(ie.Select,r),br(ie.Select,"error",a),br(ie.Select,"expanded",R),t),D=Xy("select"),{isFieldsetDisabled:N}=Ph(m);return _.createElement(je,{className:ie.SelectWrapper},_.createElement(je,{"aria-invalid":a,as:"select",autoComplete:e,value:o,defaultValue:I?"":s,isDisabled:N,multiple:v,size:C,required:g,className:O,ref:E,...b},h&&_.createElement("option",{value:""},h),f),R?null:_.createElement($e,{className:ze(ie.SelectIcon,Lt(ie.SelectIcon,n)),color:u,"aria-hidden":"true"},c??D?.expand??_.createElement(sge,null)))},h7=Ft(yge);h7.displayName="Select";const bge=({children:e,options:t})=>e?(t?.length&&console.warn("Amplify UI: <SelectField> component defaults to rendering children over `options`. When using the `options` prop, omit children."),e):t?.map((n,r)=>_.createElement("option",{label:n,value:n,key:`${n}-${r}`},n)),Sge=(e,t)=>{const{children:n,className:r,descriptiveText:o,errorMessage:s,hasError:a=!1,id:c,label:u,labelHidden:f=!1,options:h,size:m,testId:g,inputStyles:v,...C}=e,b=Yi(c),E=Yi(),x=o?Ga(E,GR):void 0,I=a?Ga(E,WR):void 0,R=VR([I,x]),{styleProps:O,rest:D}=u7(C);return _.createElement($e,{className:ze(ie.Field,Lt(ie.Field,m),ie.SelectField,r),testId:g,...O},_.createElement(HR,{htmlFor:b,visuallyHidden:f},u),_.createElement(eb,{id:x,labelHidden:f,descriptiveText:o}),_.createElement(h7,{"aria-describedby":R,hasError:a,id:b,ref:t,size:m,...D,...v},bge({children:n,options:h})),_.createElement(tb,{id:I,hasError:a,errorMessage:s}))},p7=Ft(Sge);p7.displayName="SelectField";const Cge=({className:e,dialCodeList:t,isReadOnly:n,...r},o)=>{const s=t??$9,a=_.useMemo(()=>s.map(c=>_.createElement("option",{key:c,value:c,disabled:n},c)),[s,n]);return _.createElement(p7,{"aria-disabled":n,autoComplete:"tel-country-code",className:ze(ie.CountryCodeSelect,ie.DialCodeSelect,e),labelHidden:!0,ref:o,...r},a)},m7=Ft(Cge);m7.displayName="DialCodeSelect";const wge=({autoComplete:e="tel-national",className:t,defaultDialCode:n,dialCodeLabel:r=jR.PhoneNumberField.countryCodeLabel,dialCodeList:o,dialCodeName:s,dialCodeRef:a,hasError:c,isDisabled:u,isReadOnly:f,onDialCodeChange:h,onInput:m,size:g,variation:v,...C},b)=>_.createElement(Nh,{outerStartComponent:_.createElement(m7,{defaultValue:n,dialCodeList:o,className:t,hasError:c,isDisabled:u,isReadOnly:f,label:r,name:s,onChange:h,ref:a,size:g,variation:v}),autoComplete:e,className:ze(ie.PhoneNumberField,t),hasError:c,isDisabled:u,isReadOnly:f,onInput:m,ref:b,size:g,type:"tel",variation:v,...C}),g7=Ft(wge);g7.displayName="PhoneNumberField";const Ege={name:"default"},v7=B.createContext(Ege),xge=()=>_.useContext(v7),_ge=({children:e,className:t,id:n,isDisabled:r=!1,testId:o,value:s,labelPosition:a,...c},u)=>{const{currentValue:f,defaultValue:h,name:m,hasError:g,isGroupDisabled:v=!1,isRequired:C,isReadOnly:b,onChange:E,size:x,labelPosition:I}=xge(),{isFieldsetDisabled:R}=Ph(v||r||b&&h!==s),O=f!==void 0?s===f:void 0,D=h!==void 0?s===h:void 0,N=a??I;return _.createElement($e,{as:"label",className:ze(ie.Radio,br(ie.Radio,"disabled",R),N?`amplify-label-${N}`:null,t)},e&&_.createElement(io,{as:"span",className:ze(ie.RadioLabel,br(ie.RadioLabel,"disabled",R))},e),_.createElement(qR,{checked:O,className:ze(ie.VisuallyHidden,ie.RadioInput),defaultChecked:D,hasError:g,id:n,isDisabled:R,isReadOnly:b,isRequired:C,onChange:E,ref:u,type:"radio",name:m,value:s,...c}),_.createElement($e,{"aria-hidden":"true",as:"span",className:ze(ie.RadioButton,Lt(ie.RadioButton,x)),testId:o}))},YR=Ft(_ge);YR.displayName="Radio";const Ige=({children:e,className:t,defaultValue:n,descriptiveText:r,errorMessage:o,hasError:s=!1,id:a,isDisabled:c,isRequired:u,isReadOnly:f,legend:h,legendHidden:m=!1,labelPosition:g,onChange:v,name:C,size:b,testId:E,value:x,variation:I,...R},O)=>{const D=Yi(a),N=Yi(),M=r?Ga(N,GR):void 0,L=s?Ga(N,WR):void 0,$=VR([L,M]),G=Ga(E,ie.RadioGroup),j=_.useMemo(()=>({currentValue:x,defaultValue:n,hasError:s,isRequired:u,isReadOnly:f,isGroupDisabled:c,onChange:v,size:b,name:C,labelPosition:g}),[n,s,c,u,f,v,b,C,x,g]);return _.createElement(d7,{className:ze(ie.Field,Lt(ie.Field,b),ie.RadioGroupField,t),isDisabled:c,legend:h,legendHidden:m,ref:O,role:"radiogroup",size:b,testId:E,variation:I,...R},_.createElement(eb,{id:M,labelHidden:m,descriptiveText:r}),_.createElement($e,{"aria-describedby":$,className:ie.RadioGroup,id:D,testId:G},_.createElement(v7.Provider,{value:j},e)),_.createElement(tb,{id:L,hasError:s,errorMessage:o}))},QR=Ft(Ige);QR.displayName="RadioGroupField";const rb=_.createContext({groupId:"",activeTab:"",setActiveTab:()=>{}}),y7="-",Age=({className:e,value:t,children:n,onClick:r,as:o="button",role:s="tab",...a},c)=>{const{activeTab:u,setActiveTab:f,groupId:h}=_.useContext(rb);let m=t;typeof m=="string"&&(m=m.replace(" ",y7));const g=u===t,v=C=>{Bs(r)&&r?.(C),f(t)};return _.createElement(je,{...a,role:s,as:o,id:`${h}-tab-${m}`,"aria-selected":g,"aria-controls":`${h}-panel-${m}`,tabIndex:g?void 0:-1,className:ze(ie.TabsItem,br(ie.TabsItem,"active",u===t),e),ref:c,onClick:v},n)},JR=Ft(Age);JR.displayName="Tabs.Item";const Rge=e=>_.isValidElement(e),Tge=({className:e,children:t,indicatorPosition:n,spacing:r,role:o="tablist",...s},a)=>{const c=_.useRef(null),{activeTab:u,setActiveTab:f}=_.useContext(rb);_.useImperativeHandle(a,()=>c.current);const h=_.useMemo(()=>_.Children.toArray(t).map(b=>{if(b&&Rge(b))return b.props.value}).filter(b=>!!b),[t]),m=h.indexOf(u),g=_.useCallback(()=>{let b=m===h.length-1?0:m+1;const E=c.current?.querySelectorAll("button")??[];for(;E[b].disabled;)b===h.length-1?b=0:b++;const x=h[b];if(x){f(x);const I=E[b];I?.focus(),I?.click()}},[m,f,h]),v=_.useCallback(()=>{let b=m===0?h.length-1:m-1;const E=c.current?.querySelectorAll("button")??[];for(;E[b].disabled;)b===0?b=h.length-1:b--;const x=h[b];if(x){f(x);const I=E[b];I?.focus(),I?.click()}},[m,f,h]),C=_.useCallback(b=>{switch(b.key){case"ArrowLeft":b.preventDefault(),b.stopPropagation(),v();break;case"ArrowUp":case"ArrowRight":b.preventDefault(),b.stopPropagation(),g();break}},[v,g]);return _.createElement(je,{...s,role:o,onKeyDown:C,className:ze(ie.TabsList,n?Lt(ie.TabsList,n):null,r?Lt(ie.TabsList,r):null,e),ref:c},t)},XR=Ft(Tge);XR.displayName="Tabs.List";const Oge=({className:e,value:t,children:n,role:r="tabpanel",...o},s)=>{const{activeTab:a,isLazy:c,groupId:u}=_.useContext(rb);if(c&&a!==t)return null;let f=t;return typeof f=="string"&&(f=f.replace(" ",y7)),_.createElement(je,{...o,role:r,id:`${u}-panel-${f}`,"aria-labelledby":`${u}-tab-${f}`,className:ze(ie.TabsPanel,br(ie.TabsPanel,"active",a===t),e),ref:s},n)},eT=Ft(Oge);eT.displayName="Tabs.Panel";const Mge=({children:e,defaultValue:t,className:n,value:r,onValueChange:o,isLazy:s,...a},c)=>{const u=Yi(),f=r!==void 0,[h,m]=_.useState(()=>f?r:t),g=f?r:h??"",v=_.useCallback(b=>{Bs(o)&&o(b),f||m(b)},[o,f]),C=_.useMemo(()=>({activeTab:g,isLazy:s,setActiveTab:v,groupId:u}),[g,v,s,u]);return _.createElement(rb.Provider,{value:C},_.createElement(je,{...a,ref:c,className:ze(n,ie.Tabs)},e))},tT=Ft(Mge);tT.displayName="Tabs.Container";const Pge=({items:e,indicatorPosition:t,justifyContent:n,spacing:r,...o},s)=>_.createElement(tT,{...o,ref:s},_.createElement(XR,{indicatorPosition:t,justifyContent:n,spacing:r},e?.map(({value:a,label:c,content:u,...f})=>_.createElement(JR,{...f,key:a,value:a},c))),e?.map(({value:a,content:c,isDisabled:u})=>_.createElement(eT,{key:a,value:a,isDisabled:u},c))),La=Object.assign(Ft(Pge),{Item:JR,List:XR,Panel:eT,Container:tT});La.displayName="Tabs";const YE=({errors:e,id:t,dataAttr:n})=>{if(!(e?.length>0))return null;const r=n?{[n]:!0}:{};return B.createElement(je,{...r,id:t},e.map(o=>B.createElement(io,{key:o,role:"alert",variation:"error"},ye(o))))},Nge="6.15.4",kge=({message:e,shouldWarn:t})=>{fme({message:e,shouldWarn:t})},b7=_.createContext(null),jr=()=>{const e=_.useContext(b7);if(!e)throw new Error("`useCustomComponents` cannot be used outside of a `CustomComponentsContext.Provider`");return e},Dge=e=>{const t=new FormData(e.target);return Object.fromEntries(t)};function Br(){const{submitForm:e,updateBlur:t,updateForm:n}=ht(a=>[a.submitForm,a.updateBlur,a.updateForm]),r=_.useCallback(({target:{name:a}})=>{t({name:a})},[t]),o=_.useCallback(({target:{checked:a,name:c,type:u,value:f}})=>{n({name:c,value:u==="checkbox"&&!a?void 0:f})},[n]),s=_.useCallback(a=>{a.preventDefault(),e(Dge(a))},[e]);return{handleBlur:r,handleChange:o,handleSubmit:s}}const xr=()=>{const{error:e}=ht(t=>[t.error]);return B.createElement(B.Fragment,null,e?B.createElement(l7,{variation:"error",isDismissible:!0},ye(e)):null)};function KL({autocomplete:e,dialCode:t,name:n,type:r,...o}){const{validationErrors:s}=ht(({validationErrors:h})=>[h]),a=_.useMemo(()=>iue(s[n]),[n,s]),c=a?.length>0,u=Yi(),f=c?u:void 0;return r==="tel"?_.createElement(_.Fragment,null,_.createElement(g7,{...o,name:n,defaultDialCode:t,dialCodeName:"country_code",autoComplete:e,hasError:c,"aria-describedby":f}),_.createElement(YE,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:u})):r==="password"?_.createElement(_.Fragment,null,_.createElement(ZR,{...o,name:n,autoCapitalize:"off",autoComplete:e,hasError:c,"aria-describedby":f}),_.createElement(YE,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:u})):_.createElement(_.Fragment,null,_.createElement(Nh,{...o,name:n,autoCapitalize:"off",autoComplete:e,hasError:c,type:r,"aria-describedby":f}),_.createElement(YE,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:u}))}function ns({includePassword:e}={}){const{fields:t}=ht(({route:c})=>[c]),{selectedAuthMethod:n,preferredChallenge:r}=ht(c=>[c.selectedAuthMethod,c.preferredChallenge]),o=n??r,s=e??(!o||o==="PASSWORD"),a=_.useRef(t.map((c,u)=>(c.name==="password"||c.name==="confirm_password")&&!s?_.createElement(KL,{key:u,...c,isRequired:!1}):_.createElement(KL,{key:u,...c})).filter(Boolean)).current;return _.createElement(_.Fragment,null,a)}function wr({children:e,className:t,variation:n="default"}){ht(({route:s})=>[s]);const{components:{Header:r,Footer:o}}=jr();return B.createElement(je,{className:t,"data-amplify-authenticator":"","data-variation":n},B.createElement(je,{"data-amplify-container":""},B.createElement(r,null),B.createElement(je,{"data-amplify-router":"","data-amplify-router-content":void 0},e),B.createElement(o,null)))}const{getDeliveryMessageText:Lge,getDeliveryMethodText:Uge,getConfirmingText:Fge,getConfirmText:$ge,getResendCodeText:zge}=Rn;function il({className:e,variation:t}){const{isPending:n,resendCode:r,codeDeliveryDetails:o}=ht(f=>[f.isPending,f.resendCode,f.codeDeliveryDetails]),{handleChange:s,handleSubmit:a}=Br(),{components:{ConfirmSignUp:{Header:c=il.Header,Footer:u=il.Footer}}}=jr();return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignup":"",method:"post",onChange:s,onSubmit:a},B.createElement($e,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(c,null),B.createElement($e,{direction:"column"},B.createElement(io,{className:"amplify-authenticator__subtitle"},Lge(o)),B.createElement(ns,null),B.createElement(xr,null),B.createElement(Kt,{variation:"primary",isDisabled:n,type:"submit",loadingText:Fge(),isLoading:n},$ge()),B.createElement(Kt,{onClick:r,type:"button"},zge())),B.createElement(u,null))))}const jge=()=>{const{codeDeliveryDetails:e}=ht(t=>[t.codeDeliveryDetails]);return B.createElement(ar,{level:4},Uge(e))};il.Header=jge;il.Footer=function(){return null};const{getChangePasswordText:S7,getChangingText:Bge,getBackToSignInText:Hge}=Rn,Io=({className:e,variation:t})=>{const{isPending:n,toSignIn:r}=ht(h=>[h.isPending,h.toSignIn]),{handleBlur:o,handleChange:s,handleSubmit:a}=Br(),{components:{ForceNewPassword:{FormFields:c=Io.FormFields,Header:u=Io.Header,Footer:f=Io.Footer}}}=jr();return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forcenewpassword":"",method:"post",onChange:s,onSubmit:a,onBlur:o},B.createElement($e,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(u,null),B.createElement(c,null),B.createElement(xr,null),B.createElement(Kt,{isDisabled:n,type:"submit",variation:"primary",isLoading:n,loadingText:Bge()},S7()),B.createElement(Kt,{onClick:r,type:"button",variation:"link",size:"small"},Hge()),B.createElement(f,null))))};Io.FormFields=function(){return B.createElement(ns,null)};Io.Header=function(){return B.createElement(ar,{level:4},S7())};Io.Footer=function(){return null};var wc={},QE,ZL;function qge(){return ZL||(ZL=1,QE=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),QE}var JE={},Ti={},YL;function El(){if(YL)return Ti;YL=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Ti.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},Ti.getSymbolTotalCodewords=function(r){return t[r]},Ti.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},Ti.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},Ti.isKanjiModeEnabled=function(){return typeof e<"u"},Ti.toSJIS=function(r){return e(r)},Ti}var XE={},QL;function nT(){return QL||(QL=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,o){if(e.isValid(r))return r;try{return t(r)}catch{return o}}})(XE)),XE}var ex,JL;function Vge(){if(JL)return ex;JL=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r<n;r++)this.putBit((t>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},ex=e,ex}var tx,XL;function Wge(){if(XL)return tx;XL=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,o){const s=t*this.size+n;this.data[s]=r,o&&(this.reservedBit[s]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},tx=e,tx}var nx={},e4;function Gge(){return e4||(e4=1,(function(e){const t=El().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const o=Math.floor(r/7)+2,s=t(r),a=s===145?26:Math.ceil((s-13)/(2*o-2))*2,c=[s-7];for(let u=1;u<o-1;u++)c[u]=c[u-1]-a;return c.push(6),c.reverse()},e.getPositions=function(r){const o=[],s=e.getRowColCoords(r),a=s.length;for(let c=0;c<a;c++)for(let u=0;u<a;u++)c===0&&u===0||c===0&&u===a-1||c===a-1&&u===0||o.push([s[c],s[u]]);return o}})(nx)),nx}var rx={},t4;function Kge(){if(t4)return rx;t4=1;const e=El().getSymbolSize,t=7;return rx.getPositions=function(r){const o=e(r);return[[0,0],[o-t,0],[0,o-t]]},rx}var ox={},n4;function Zge(){return n4||(n4=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const s=o.size;let a=0,c=0,u=0,f=null,h=null;for(let m=0;m<s;m++){c=u=0,f=h=null;for(let g=0;g<s;g++){let v=o.get(m,g);v===f?c++:(c>=5&&(a+=t.N1+(c-5)),f=v,c=1),v=o.get(g,m),v===h?u++:(u>=5&&(a+=t.N1+(u-5)),h=v,u=1)}c>=5&&(a+=t.N1+(c-5)),u>=5&&(a+=t.N1+(u-5))}return a},e.getPenaltyN2=function(o){const s=o.size;let a=0;for(let c=0;c<s-1;c++)for(let u=0;u<s-1;u++){const f=o.get(c,u)+o.get(c,u+1)+o.get(c+1,u)+o.get(c+1,u+1);(f===4||f===0)&&a++}return a*t.N2},e.getPenaltyN3=function(o){const s=o.size;let a=0,c=0,u=0;for(let f=0;f<s;f++){c=u=0;for(let h=0;h<s;h++)c=c<<1&2047|o.get(f,h),h>=10&&(c===1488||c===93)&&a++,u=u<<1&2047|o.get(h,f),h>=10&&(u===1488||u===93)&&a++}return a*t.N3},e.getPenaltyN4=function(o){let s=0;const a=o.data.length;for(let u=0;u<a;u++)s+=o.data[u];return Math.abs(Math.ceil(s*100/a/5)-10)*t.N4};function n(r,o,s){switch(r){case e.Patterns.PATTERN000:return(o+s)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return s%3===0;case e.Patterns.PATTERN011:return(o+s)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(s/3))%2===0;case e.Patterns.PATTERN101:return o*s%2+o*s%3===0;case e.Patterns.PATTERN110:return(o*s%2+o*s%3)%2===0;case e.Patterns.PATTERN111:return(o*s%3+(o+s)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(o,s){const a=s.size;for(let c=0;c<a;c++)for(let u=0;u<a;u++)s.isReserved(u,c)||s.xor(u,c,n(o,u,c))},e.getBestMask=function(o,s){const a=Object.keys(e.Patterns).length;let c=0,u=1/0;for(let f=0;f<a;f++){s(f),e.applyMask(f,o);const h=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(f,o),h<u&&(u=h,c=f)}return c}})(ox)),ox}var Nm={},r4;function C7(){if(r4)return Nm;r4=1;const e=nT(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Nm.getBlocksCount=function(o,s){switch(s){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},Nm.getTotalCodewordsCount=function(o,s){switch(s){case e.L:return n[(o-1)*4+0];case e.M:return n[(o-1)*4+1];case e.Q:return n[(o-1)*4+2];case e.H:return n[(o-1)*4+3];default:return}},Nm}var sx={},Yd={},o4;function Yge(){if(o4)return Yd;o4=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let r=1;for(let o=0;o<255;o++)e[o]=r,t[r]=o,r<<=1,r&256&&(r^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),Yd.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},Yd.exp=function(r){return e[r]},Yd.mul=function(r,o){return r===0||o===0?0:e[t[r]+t[o]]},Yd}var s4;function Qge(){return s4||(s4=1,(function(e){const t=Yge();e.mul=function(r,o){const s=new Uint8Array(r.length+o.length-1);for(let a=0;a<r.length;a++)for(let c=0;c<o.length;c++)s[a+c]^=t.mul(r[a],o[c]);return s},e.mod=function(r,o){let s=new Uint8Array(r);for(;s.length-o.length>=0;){const a=s[0];for(let u=0;u<o.length;u++)s[u]^=t.mul(o[u],a);let c=0;for(;c<s.length&&s[c]===0;)c++;s=s.slice(c)}return s},e.generateECPolynomial=function(r){let o=new Uint8Array([1]);for(let s=0;s<r;s++)o=e.mul(o,new Uint8Array([1,t.exp(s)]));return o}})(sx)),sx}var ix,i4;function Jge(){if(i4)return ix;i4=1;const e=Qge();function t(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(r){this.degree=r,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(r.length+this.degree);o.set(r);const s=e.mod(o,this.genPoly),a=this.degree-s.length;if(a>0){const c=new Uint8Array(this.degree);return c.set(s,a),c}return s},ix=t,ix}var ax={},lx={},cx={},a4;function w7(){return a4||(a4=1,cx.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),cx}var $o={},l4;function E7(){if(l4)return $o;l4=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
74
- ]))+`;$o.KANJI=new RegExp(n,"g"),$o.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),$o.BYTE=new RegExp(r,"g"),$o.NUMERIC=new RegExp(e,"g"),$o.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+n+"$"),s=new RegExp("^"+e+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return $o.testKanji=function(u){return o.test(u)},$o.testNumeric=function(u){return s.test(u)},$o.testAlphanumeric=function(u){return a.test(u)},$o}var c4;function xl(){return c4||(c4=1,(function(e){const t=w7(),n=E7();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(s,a){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!t.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?s.ccBits[0]:a<27?s.ccBits[1]:s.ccBits[2]},e.getBestModeForData=function(s){return n.testNumeric(s)?e.NUMERIC:n.testAlphanumeric(s)?e.ALPHANUMERIC:n.testKanji(s)?e.KANJI:e.BYTE},e.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},e.isValid=function(s){return s&&s.bit&&s.ccBits};function r(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(s,a){if(e.isValid(s))return s;try{return r(s)}catch{return a}}})(lx)),lx}var u4;function Xge(){return u4||(u4=1,(function(e){const t=El(),n=C7(),r=nT(),o=xl(),s=w7(),a=7973,c=t.getBCHDigit(a);function u(g,v,C){for(let b=1;b<=40;b++)if(v<=e.getCapacity(b,C,g))return b}function f(g,v){return o.getCharCountIndicator(g,v)+4}function h(g,v){let C=0;return g.forEach(function(b){const E=f(b.mode,v);C+=E+b.getBitsLength()}),C}function m(g,v){for(let C=1;C<=40;C++)if(h(g,C)<=e.getCapacity(C,v,o.MIXED))return C}e.from=function(v,C){return s.isValid(v)?parseInt(v,10):C},e.getCapacity=function(v,C,b){if(!s.isValid(v))throw new Error("Invalid QR Code version");typeof b>"u"&&(b=o.BYTE);const E=t.getSymbolTotalCodewords(v),x=n.getTotalCodewordsCount(v,C),I=(E-x)*8;if(b===o.MIXED)return I;const R=I-f(b,v);switch(b){case o.NUMERIC:return Math.floor(R/10*3);case o.ALPHANUMERIC:return Math.floor(R/11*2);case o.KANJI:return Math.floor(R/13);case o.BYTE:default:return Math.floor(R/8)}},e.getBestVersionForData=function(v,C){let b;const E=r.from(C,r.M);if(Array.isArray(v)){if(v.length>1)return m(v,E);if(v.length===0)return 1;b=v[0]}else b=v;return u(b.mode,b.getLength(),E)},e.getEncodedBits=function(v){if(!s.isValid(v)||v<7)throw new Error("Invalid QR Code version");let C=v<<12;for(;t.getBCHDigit(C)-c>=0;)C^=a<<t.getBCHDigit(C)-c;return v<<12|C}})(ax)),ax}var ux={},d4;function eve(){if(d4)return ux;d4=1;const e=El(),t=1335,n=21522,r=e.getBCHDigit(t);return ux.getEncodedBits=function(s,a){const c=s.bit<<3|a;let u=c<<10;for(;e.getBCHDigit(u)-r>=0;)u^=t<<e.getBCHDigit(u)-r;return(c<<10|u)^n},ux}var dx={},fx,f4;function tve(){if(f4)return fx;f4=1;const e=xl();function t(n){this.mode=e.NUMERIC,this.data=n.toString()}return t.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){let o,s,a;for(o=0;o+3<=this.data.length;o+=3)s=this.data.substr(o,3),a=parseInt(s,10),r.put(a,10);const c=this.data.length-o;c>0&&(s=this.data.substr(o),a=parseInt(s,10),r.put(a,c*3+1))},fx=t,fx}var hx,h4;function nve(){if(h4)return hx;h4=1;const e=xl(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(o){let s;for(s=0;s+2<=this.data.length;s+=2){let a=t.indexOf(this.data[s])*45;a+=t.indexOf(this.data[s+1]),o.put(a,11)}this.data.length%2&&o.put(t.indexOf(this.data[s]),6)},hx=n,hx}var px,p4;function rve(){return p4||(p4=1,px=function(t){for(var n=[],r=t.length,o=0;o<r;o++){var s=t.charCodeAt(o);if(s>=55296&&s<=56319&&r>o+1){var a=t.charCodeAt(o+1);a>=56320&&a<=57343&&(s=(s-55296)*1024+a-56320+65536,o+=1)}if(s<128){n.push(s);continue}if(s<2048){n.push(s>>6|192),n.push(s&63|128);continue}if(s<55296||s>=57344&&s<65536){n.push(s>>12|224),n.push(s>>6&63|128),n.push(s&63|128);continue}if(s>=65536&&s<=1114111){n.push(s>>18|240),n.push(s>>12&63|128),n.push(s>>6&63|128),n.push(s&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer}),px}var mx,m4;function ove(){if(m4)return mx;m4=1;const e=rve(),t=xl();function n(r){this.mode=t.BYTE,this.data=new Uint8Array(e(r))}return n.getBitsLength=function(o){return o*8},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){for(let o=0,s=this.data.length;o<s;o++)r.put(this.data[o],8)},mx=n,mx}var gx,g4;function sve(){if(g4)return gx;g4=1;const e=xl(),t=El();function n(r){this.mode=e.KANJI,this.data=r}return n.getBitsLength=function(o){return o*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let o;for(o=0;o<this.data.length;o++){let s=t.toSJIS(this.data[o]);if(s>=33088&&s<=40956)s-=33088;else if(s>=57408&&s<=60351)s-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
75
- Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),r.put(s,13)}},gx=n,gx}var vx={exports:{}},v4;function ive(){return v4||(v4=1,(function(e){var t={single_source_shortest_paths:function(n,r,o){var s={},a={};a[r]=0;var c=t.PriorityQueue.make();c.push(r,0);for(var u,f,h,m,g,v,C,b,E;!c.empty();){u=c.pop(),f=u.value,m=u.cost,g=n[f]||{};for(h in g)g.hasOwnProperty(h)&&(v=g[h],C=m+v,b=a[h],E=typeof a[h]>"u",(E||b>C)&&(a[h]=C,c.push(h,C),s[h]=f))}if(typeof o<"u"&&typeof a[o]>"u"){var x=["Could not find a path from ",r," to ",o,"."].join("");throw new Error(x)}return s},extract_shortest_path_from_predecessor_list:function(n,r){for(var o=[],s=r;s;)o.push(s),n[s],s=n[s];return o.reverse(),o},find_path:function(n,r,o){var s=t.single_source_shortest_paths(n,r,o);return t.extract_shortest_path_from_predecessor_list(s,o)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,o={},s;n=n||{};for(s in r)r.hasOwnProperty(s)&&(o[s]=r[s]);return o.queue=[],o.sorter=n.sorter||r.default_sorter,o},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var o={value:n,cost:r};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(vx)),vx.exports}var y4;function ave(){return y4||(y4=1,(function(e){const t=xl(),n=tve(),r=nve(),o=ove(),s=sve(),a=E7(),c=El(),u=ive();function f(x){return unescape(encodeURIComponent(x)).length}function h(x,I,R){const O=[];let D;for(;(D=x.exec(R))!==null;)O.push({data:D[0],index:D.index,mode:I,length:D[0].length});return O}function m(x){const I=h(a.NUMERIC,t.NUMERIC,x),R=h(a.ALPHANUMERIC,t.ALPHANUMERIC,x);let O,D;return c.isKanjiModeEnabled()?(O=h(a.BYTE,t.BYTE,x),D=h(a.KANJI,t.KANJI,x)):(O=h(a.BYTE_KANJI,t.BYTE,x),D=[]),I.concat(R,O,D).sort(function(M,L){return M.index-L.index}).map(function(M){return{data:M.data,mode:M.mode,length:M.length}})}function g(x,I){switch(I){case t.NUMERIC:return n.getBitsLength(x);case t.ALPHANUMERIC:return r.getBitsLength(x);case t.KANJI:return s.getBitsLength(x);case t.BYTE:return o.getBitsLength(x)}}function v(x){return x.reduce(function(I,R){const O=I.length-1>=0?I[I.length-1]:null;return O&&O.mode===R.mode?(I[I.length-1].data+=R.data,I):(I.push(R),I)},[])}function C(x){const I=[];for(let R=0;R<x.length;R++){const O=x[R];switch(O.mode){case t.NUMERIC:I.push([O,{data:O.data,mode:t.ALPHANUMERIC,length:O.length},{data:O.data,mode:t.BYTE,length:O.length}]);break;case t.ALPHANUMERIC:I.push([O,{data:O.data,mode:t.BYTE,length:O.length}]);break;case t.KANJI:I.push([O,{data:O.data,mode:t.BYTE,length:f(O.data)}]);break;case t.BYTE:I.push([{data:O.data,mode:t.BYTE,length:f(O.data)}])}}return I}function b(x,I){const R={},O={start:{}};let D=["start"];for(let N=0;N<x.length;N++){const M=x[N],L=[];for(let $=0;$<M.length;$++){const G=M[$],j=""+N+$;L.push(j),R[j]={node:G,lastCount:0},O[j]={};for(let F=0;F<D.length;F++){const q=D[F];R[q]&&R[q].node.mode===G.mode?(O[q][j]=g(R[q].lastCount+G.length,G.mode)-g(R[q].lastCount,G.mode),R[q].lastCount+=G.length):(R[q]&&(R[q].lastCount=G.length),O[q][j]=g(G.length,G.mode)+4+t.getCharCountIndicator(G.mode,I))}}D=L}for(let N=0;N<D.length;N++)O[D[N]].end=0;return{map:O,table:R}}function E(x,I){let R;const O=t.getBestModeForData(x);if(R=t.from(I,O),R!==t.BYTE&&R.bit<O.bit)throw new Error('"'+x+'" cannot be encoded with mode '+t.toString(R)+`.
76
- Suggested mode is: `+t.toString(O));switch(R===t.KANJI&&!c.isKanjiModeEnabled()&&(R=t.BYTE),R){case t.NUMERIC:return new n(x);case t.ALPHANUMERIC:return new r(x);case t.KANJI:return new s(x);case t.BYTE:return new o(x)}}e.fromArray=function(I){return I.reduce(function(R,O){return typeof O=="string"?R.push(E(O,null)):O.data&&R.push(E(O.data,O.mode)),R},[])},e.fromString=function(I,R){const O=m(I,c.isKanjiModeEnabled()),D=C(O),N=b(D,R),M=u.find_path(N.map,"start","end"),L=[];for(let $=1;$<M.length-1;$++)L.push(N.table[M[$]].node);return e.fromArray(v(L))},e.rawSplit=function(I){return e.fromArray(m(I,c.isKanjiModeEnabled()))}})(dx)),dx}var b4;function lve(){if(b4)return JE;b4=1;const e=El(),t=nT(),n=Vge(),r=Wge(),o=Gge(),s=Kge(),a=Zge(),c=C7(),u=Jge(),f=Xge(),h=eve(),m=xl(),g=ave();function v(N,M){const L=N.size,$=s.getPositions(M);for(let G=0;G<$.length;G++){const j=$[G][0],F=$[G][1];for(let q=-1;q<=7;q++)if(!(j+q<=-1||L<=j+q))for(let J=-1;J<=7;J++)F+J<=-1||L<=F+J||(q>=0&&q<=6&&(J===0||J===6)||J>=0&&J<=6&&(q===0||q===6)||q>=2&&q<=4&&J>=2&&J<=4?N.set(j+q,F+J,!0,!0):N.set(j+q,F+J,!1,!0))}}function C(N){const M=N.size;for(let L=8;L<M-8;L++){const $=L%2===0;N.set(L,6,$,!0),N.set(6,L,$,!0)}}function b(N,M){const L=o.getPositions(M);for(let $=0;$<L.length;$++){const G=L[$][0],j=L[$][1];for(let F=-2;F<=2;F++)for(let q=-2;q<=2;q++)F===-2||F===2||q===-2||q===2||F===0&&q===0?N.set(G+F,j+q,!0,!0):N.set(G+F,j+q,!1,!0)}}function E(N,M){const L=N.size,$=f.getEncodedBits(M);let G,j,F;for(let q=0;q<18;q++)G=Math.floor(q/3),j=q%3+L-8-3,F=($>>q&1)===1,N.set(G,j,F,!0),N.set(j,G,F,!0)}function x(N,M,L){const $=N.size,G=h.getEncodedBits(M,L);let j,F;for(j=0;j<15;j++)F=(G>>j&1)===1,j<6?N.set(j,8,F,!0):j<8?N.set(j+1,8,F,!0):N.set($-15+j,8,F,!0),j<8?N.set(8,$-j-1,F,!0):j<9?N.set(8,15-j-1+1,F,!0):N.set(8,15-j-1,F,!0);N.set($-8,8,1,!0)}function I(N,M){const L=N.size;let $=-1,G=L-1,j=7,F=0;for(let q=L-1;q>0;q-=2)for(q===6&&q--;;){for(let J=0;J<2;J++)if(!N.isReserved(G,q-J)){let Se=!1;F<M.length&&(Se=(M[F]>>>j&1)===1),N.set(G,q-J,Se),j--,j===-1&&(F++,j=7)}if(G+=$,G<0||L<=G){G-=$,$=-$;break}}}function R(N,M,L){const $=new n;L.forEach(function(J){$.put(J.mode.bit,4),$.put(J.getLength(),m.getCharCountIndicator(J.mode,N)),J.write($)});const G=e.getSymbolTotalCodewords(N),j=c.getTotalCodewordsCount(N,M),F=(G-j)*8;for($.getLengthInBits()+4<=F&&$.put(0,4);$.getLengthInBits()%8!==0;)$.putBit(0);const q=(F-$.getLengthInBits())/8;for(let J=0;J<q;J++)$.put(J%2?17:236,8);return O($,N,M)}function O(N,M,L){const $=e.getSymbolTotalCodewords(M),G=c.getTotalCodewordsCount(M,L),j=$-G,F=c.getBlocksCount(M,L),q=$%F,J=F-q,Se=Math.floor($/F),V=Math.floor(j/F),ee=V+1,me=Se-V,ge=new u(me);let Te=0;const z=new Array(F),te=new Array(F);let fe=0;const ae=new Uint8Array(N.buffer);for(let Re=0;Re<F;Re++){const rt=Re<J?V:ee;z[Re]=ae.slice(Te,Te+rt),te[Re]=ge.encode(z[Re]),Te+=rt,fe=Math.max(fe,rt)}const be=new Uint8Array($);let Fe=0,ke,le;for(ke=0;ke<fe;ke++)for(le=0;le<F;le++)ke<z[le].length&&(be[Fe++]=z[le][ke]);for(ke=0;ke<me;ke++)for(le=0;le<F;le++)be[Fe++]=te[le][ke];return be}function D(N,M,L,$){let G;if(Array.isArray(N))G=g.fromArray(N);else if(typeof N=="string"){let Se=M;if(!Se){const V=g.rawSplit(N);Se=f.getBestVersionForData(V,L)}G=g.fromString(N,Se||40)}else throw new Error("Invalid data");const j=f.getBestVersionForData(G,L);if(!j)throw new Error("The amount of data is too big to be stored in a QR Code");if(!M)M=j;else if(M<j)throw new Error(`
77
- The chosen QR Code version cannot contain this amount of data.
78
- Minimum version required to store current data is: `+j+`.
79
- `);const F=R(M,L,G),q=e.getSymbolSize(M),J=new r(q);return v(J,M),C(J),b(J,M),x(J,L,0),M>=7&&E(J,M),I(J,F),isNaN($)&&($=a.getBestMask(J,x.bind(null,J,L))),a.applyMask($,J),x(J,L,$),{modules:J,version:M,errorCorrectionLevel:L,maskPattern:$,segments:G}}return JE.create=function(M,L){if(typeof M>"u"||M==="")throw new Error("No input text");let $=t.M,G,j;return typeof L<"u"&&($=t.from(L.errorCorrectionLevel,t.M),G=f.from(L.version),j=a.from(L.maskPattern),L.toSJISFunc&&e.setToSJISFunction(L.toSJISFunc)),D(M,G,$,j)},JE}var yx={},bx={},S4;function x7(){return S4||(S4=1,(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(s){return[s,s]}))),r.length===6&&r.push("F","F");const o=parseInt(r.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const o=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,s=r.width&&r.width>=21?r.width:void 0,a=r.scale||4;return{width:s,scale:s?4:a,margin:o,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,o){return o.width&&o.width>=r+o.margin*2?o.width/(r+o.margin*2):o.scale},e.getImageWidth=function(r,o){const s=e.getScale(r,o);return Math.floor((r+o.margin*2)*s)},e.qrToImageData=function(r,o,s){const a=o.modules.size,c=o.modules.data,u=e.getScale(a,s),f=Math.floor((a+s.margin*2)*u),h=s.margin*u,m=[s.color.light,s.color.dark];for(let g=0;g<f;g++)for(let v=0;v<f;v++){let C=(g*f+v)*4,b=s.color.light;if(g>=h&&v>=h&&g<f-h&&v<f-h){const E=Math.floor((g-h)/u),x=Math.floor((v-h)/u);b=m[c[E*a+x]?1:0]}r[C++]=b.r,r[C++]=b.g,r[C++]=b.b,r[C]=b.a}}})(bx)),bx}var C4;function cve(){return C4||(C4=1,(function(e){const t=x7();function n(o,s,a){o.clearRect(0,0,s.width,s.height),s.style||(s.style={}),s.height=a,s.width=a,s.style.height=a+"px",s.style.width=a+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(s,a,c){let u=c,f=a;typeof u>"u"&&(!a||!a.getContext)&&(u=a,a=void 0),a||(f=r()),u=t.getOptions(u);const h=t.getImageWidth(s.modules.size,u),m=f.getContext("2d"),g=m.createImageData(h,h);return t.qrToImageData(g.data,s,u),n(m,f,h),m.putImageData(g,0,0),f},e.renderToDataURL=function(s,a,c){let u=c;typeof u>"u"&&(!a||!a.getContext)&&(u=a,a=void 0),u||(u={});const f=e.render(s,a,u),h=u.type||"image/png",m=u.rendererOpts||{};return f.toDataURL(h,m.quality)}})(yx)),yx}var Sx={},w4;function uve(){if(w4)return Sx;w4=1;const e=x7();function t(o,s){const a=o.a/255,c=s+'="'+o.hex+'"';return a<1?c+" "+s+'-opacity="'+a.toFixed(2).slice(1)+'"':c}function n(o,s,a){let c=o+s;return typeof a<"u"&&(c+=" "+a),c}function r(o,s,a){let c="",u=0,f=!1,h=0;for(let m=0;m<o.length;m++){const g=Math.floor(m%s),v=Math.floor(m/s);!g&&!f&&(f=!0),o[m]?(h++,m>0&&g>0&&o[m-1]||(c+=f?n("M",g+a,.5+v+a):n("m",u,0),u=0,f=!1),g+1<s&&o[m+1]||(c+=n("h",h),h=0)):u++}return c}return Sx.render=function(s,a,c){const u=e.getOptions(a),f=s.modules.size,h=s.modules.data,m=f+u.margin*2,g=u.color.light.a?"<path "+t(u.color.light,"fill")+' d="M0 0h'+m+"v"+m+'H0z"/>':"",v="<path "+t(u.color.dark,"stroke")+' d="'+r(h,f,u.margin)+'"/>',C='viewBox="0 0 '+m+" "+m+'"',E='<svg xmlns="http://www.w3.org/2000/svg" '+(u.width?'width="'+u.width+'" height="'+u.width+'" ':"")+C+' shape-rendering="crispEdges">'+g+v+`</svg>
80
- `;return typeof c=="function"&&c(null,E),E},Sx}var E4;function dve(){if(E4)return wc;E4=1;const e=qge(),t=lve(),n=cve(),r=uve();function o(s,a,c,u,f){const h=[].slice.call(arguments,1),m=h.length,g=typeof h[m-1]=="function";if(!g&&!e())throw new Error("Callback required as last argument");if(g){if(m<2)throw new Error("Too few arguments provided");m===2?(f=c,c=a,a=u=void 0):m===3&&(a.getContext&&typeof f>"u"?(f=u,u=void 0):(f=u,u=c,c=a,a=void 0))}else{if(m<1)throw new Error("Too few arguments provided");return m===1?(c=a,a=u=void 0):m===2&&!a.getContext&&(u=c,c=a,a=void 0),new Promise(function(v,C){try{const b=t.create(c,u);v(s(b,a,u))}catch(b){C(b)}})}try{const v=t.create(c,u);f(null,s(v,a,u))}catch(v){f(v)}}return wc.create=t.create,wc.toCanvas=o.bind(null,n.render),wc.toDataURL=o.bind(null,n.renderToDataURL),wc.toString=o.bind(null,function(s,a,c){return r.render(s,c)}),wc}var fve=dve();const hve=Eu(fve),pve=e=>e==="signIn"||e==="signUp",rT=e=>!!e&&(e==="EMAIL_OTP"||e==="SMS_MFA"),{getConfirmText:mve,getConfirmingText:gve,getBackToSignInText:vve,getResendCodeText:yve}=Rn,ob=()=>{const{isPending:e,toSignIn:t,challengeName:n,resendCode:r,selectedAuthMethod:o,availableAuthMethods:s}=ht(u=>[u.isPending,u.toSignIn,u.challengeName,u.resendCode,u.selectedAuthMethod,u.availableAuthMethods]),a=!!o&&o!=="PASSWORD"||!!s?.some(u=>u!=="PASSWORD"),c=rT(n)&&a&&r;return B.createElement($e,{direction:"column"},B.createElement(Kt,{isDisabled:e,type:"submit",variation:"primary",isLoading:e,loadingText:gve()},mve()),c&&B.createElement(Kt,{onClick:r,type:"button"},yve()),B.createElement(Kt,{onClick:t,type:"button",variation:"link",size:"small"},vve()))},bve=new Wn("SetupTotp-logger"),{getSetupTotpText:Sve,getCopiedText:Cve,getLoadingText:wve}=Rn,Qi=({className:e,variation:t})=>{const{totpSecretCode:n,isPending:r,username:o,QRFields:s}=ht(O=>[O.isPending,O.totpSecretCode,O.username]),{handleChange:a,handleSubmit:c}=Br(),{components:{SetupTotp:{Header:u=Qi.Header,Footer:f=Qi.Footer}}}=jr(),[h,m]=_.useState(!0),[g,v]=_.useState(),[C,b]=_.useState("COPY"),{totpIssuer:E="AWSCognito",totpUsername:x=o}=s??{},I=_.useCallback(async()=>{try{const O=fue(E,x,n),D=await hve.toDataURL(O);v(D)}catch(O){bve.error(O)}finally{m(!1)}},[E,x,n]);_.useEffect(()=>{g||I()},[I,g]);const R=()=>{navigator.clipboard.writeText(n),b(Cve())};return _.createElement(wr,{className:e,variation:t},_.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-totp":"",method:"post",onChange:a,onSubmit:c},_.createElement($e,{as:"fieldset",direction:"column",isDisabled:r},_.createElement(u,null),_.createElement($e,{direction:"column"},h?_.createElement("p",null,wve(),"…"):_.createElement("img",{"data-amplify-qrcode":!0,src:g,alt:"qr code",width:"228",height:"228"}),_.createElement($e,{"data-amplify-copy":!0},_.createElement("div",null,n),_.createElement($e,{"data-amplify-copy-svg":!0,onClick:R},_.createElement("div",{"data-amplify-copy-tooltip":!0},C),_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5H8C6.9 5 6.01 5.9 6.01 7L6 21C6 22.1 6.89 23 7.99 23H19C20.1 23 21 22.1 21 21V11L15 5ZM8 21V7H14V12H19V21H8Z"})))),_.createElement(ns,null),_.createElement(xr,null)),_.createElement(ob,null),_.createElement(f,null))))};Qi.Header=function(){return _.createElement(ar,{level:3},Sve())};Qi.Footer=function(){return null};const{getSubmitText:Eve,getSubmittingText:xve}=Rn,sb=e=>{const{cancelButtonSendType:t,cancelButtonText:n,submitButtonText:r}=e,{isPending:o,resendCode:s,skipVerification:a,toSignIn:c}=ht(m=>[m.isPending]),u=()=>{switch(t){case"SKIP":a();break;case"RESEND":s();break;case"SIGN_IN":c();break;default:return}},f=o?B.createElement(B.Fragment,null,xve(),"…"):B.createElement(B.Fragment,null,Eve()),h=r??f;return B.createElement($e,{direction:"column"},B.createElement(Kt,{variation:"primary",isDisabled:o,type:"submit"},h),B.createElement($e,{direction:"column",alignItems:"center"},B.createElement(Kt,{onClick:u,type:"button",variation:"link",size:"small"},n)))},_ve=()=>B.createElement("svg",{"aria-label":"Apple icon",className:"amplify-icon federated-sign-in-icon",fill:"#000",preserveAspectRatio:"xMidYMid",stroke:"#000",strokeWidth:"0",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},B.createElement("path",{d:"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"})),Ive=()=>B.createElement("svg",{"aria-label":"Google icon",className:"amplify-icon federated-sign-in-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},B.createElement("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285F4"}),B.createElement("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34A853"}),B.createElement("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",fill:"#FBBC05"}),B.createElement("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#EB4335"})),Ave=()=>B.createElement(o7,{className:"federated-sign-in-icon",ariaLabel:"Facebook icon",viewBox:{minX:0,minY:0,width:279,height:538},pathData:"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z",fill:"#1877F2"}),Rve=()=>B.createElement("svg",{"aria-label":"Amazon icon",className:"amplify-icon federated-sign-in-icon",viewBox:"0 0 243 264",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},B.createElement("path",{d:"M230.826 208.039C227.468 203.683 208.551 205.982 200.056 206.998C197.471 207.321 197.076 205.042 199.407 203.405C214.475 192.665 239.201 195.766 242.082 199.364C244.966 202.982 241.337 228.071 227.173 240.049C225.001 241.888 222.93 240.904 223.898 238.468C227.077 230.431 234.205 212.419 230.826 208.039ZM123.769 264C71.0234 264 39.0764 241.955 14.7853 217.542C9.97339 212.706 3.71799 206.296 0.311513 200.691C-1.09773 198.372 2.59096 195.022 5.04421 196.844C35.239 219.268 79.1012 239.538 122.53 239.538C151.82 239.538 188.046 227.47 217.669 214.868C222.147 212.966 222.147 219.18 221.512 221.061C221.183 222.032 206.515 236.221 186.247 247.047C167.304 257.166 143.397 264 123.769 264Z",fill:"#F2541B"}),B.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M142.943 111.185C142.943 124.756 143.268 136.054 136.406 148.123C130.856 157.913 122.027 163.95 112.222 163.95C98.8288 163.95 90.9806 153.772 90.9806 138.693C90.9806 109.036 117.677 103.647 142.943 103.647V111.185ZM178.166 196.081C175.858 198.15 171.635 198.22 169.914 196.894C157.974 187.684 149.89 173.688 149.89 173.688C130.706 193.156 117.127 199 92.2879 199C62.8772 199 40 180.905 40 144.729C40 116.461 55.3552 97.2408 77.2563 87.823C96.2094 79.5256 122.684 78.0173 142.943 75.7517C142.943 75.7517 144.633 53.933 138.699 45.9806C134.098 39.8163 126.272 36.9329 119.089 36.9329C106.127 36.8829 93.61 43.9051 91.1262 57.4188C90.4136 61.2829 87.5533 64.5261 84.54 64.206L51.0823 60.5922C48.5156 60.2951 45.0381 57.6639 45.8636 53.3081C53.644 12.3684 90.7373 0 123.989 0C140.983 0 163.21 4.51651 176.608 17.3349C193.597 33.1648 191.969 54.2755 191.969 77.2722V131.51C191.969 147.835 198.768 154.987 205.151 163.775C207.376 166.953 207.886 170.714 205.04 173.032C197.902 178.999 178.166 196.081 178.166 196.081Z",fill:"#F2541B"})),km=e=>{const{icon:t,provider:n,text:r}=e,{toFederatedSignIn:o}=ht(),s=c=>{c.preventDefault(),o({provider:n})};let a;return t==="facebook"?a=B.createElement(Ave,null):t==="google"?a=B.createElement(Ive,null):t==="amazon"?a=B.createElement(Rve,null):t==="apple"&&(a=B.createElement(_ve,null)),B.createElement(Kt,{onClick:s,className:"federated-sign-in-button",gap:"1rem"},a,B.createElement(io,{as:"span"},r))},{getSignInWithFederationText:Dm,getOrText:Tve}=Rn;function _7(){const{route:e,socialProviders:t}=ht(({route:n,socialProviders:r})=>[n,r]);return t.length===0?null:B.createElement($e,{direction:"column",padding:"0 0 1rem 0",className:"federated-sign-in-container"},t.map(n=>{switch(n){case"amazon":return B.createElement(km,{icon:"amazon",key:n,provider:$c.Amazon,text:Dm(e,n)});case"apple":return B.createElement(km,{icon:"apple",key:n,provider:$c.Apple,text:Dm(e,n)});case"facebook":return B.createElement(km,{icon:"facebook",key:n,provider:$c.Facebook,text:Dm(e,n)});case"google":return B.createElement(km,{icon:"google",key:n,provider:$c.Google,text:Dm(e,n)});default:console.error(`Authenticator does not support ${n}. Please open an issue: https://github.com/aws-amplify/amplify-ui/issues/choose`)}}),B.createElement(KR,{size:"small",label:Tve()}))}const{getSignInText:Lm,getSigningInText:Ove,getForgotPasswordText:Mve,getSignInWithEmailText:Pve,getSignInWithSmsText:Nve,getSignInWithPasskeyText:kve,getOtherSignInOptionsText:Dve,getEnterUsernameFirstText:Lve}=Rn;function qs(){const{isPending:e,availableAuthMethods:t,preferredChallenge:n,toShowAuthMethods:r}=ht(x=>[x.isPending,x.availableAuthMethods,x.preferredChallenge,x.toShowAuthMethods]),{handleChange:o,handleSubmit:s}=Br(),[a,c]=B.useState(""),{components:{SignIn:{Header:u=qs.Header,Footer:f=qs.Footer}}}=jr(),m=t&&t.length>1&&n,g=a.trim().length>0,v=B.useCallback(x=>{const{name:I,value:R}=x.target;I==="username"&&typeof R=="string"&&c(R),o(x)},[o]),C=()=>{if(!n)return Lm();switch(n){case"EMAIL_OTP":return Pve();case"SMS_OTP":return Nve();case"WEB_AUTHN":return kve();default:return Lm()}},b=x=>{x.preventDefault(),s(x)},E=x=>{x.preventDefault(),r()};return B.createElement(je,null,B.createElement(u,null),B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signin":"",method:"post",onSubmit:m?b:s,onChange:v},B.createElement(_7,null),B.createElement($e,{direction:"column"},B.createElement($e,{as:"fieldset",direction:"column",isDisabled:e},B.createElement(nb,null,B.createElement("legend",null,Lm())),B.createElement(ns,null)),B.createElement(xr,null),B.createElement(Kt,{isDisabled:e,type:"submit",variation:"primary",isLoading:e,loadingText:Ove()},m?C():Lm()),m&&B.createElement(Kt,{onClick:E,size:"small",variation:"link",isDisabled:e||!g,title:g?void 0:Lve()},Dve()),B.createElement(f,null))))}const Uve=()=>{const{toForgotPassword:e}=ht(t=>[t.toForgotPassword]);return B.createElement(je,{"data-amplify-footer":""},B.createElement(Kt,{onClick:e,size:"small",variation:"link"},Mve()))};qs.Footer=Uve;qs.Header=function(){return null};const{getCreateAccountText:x4,getCreatingAccountText:Fve,getCreateAccountWithEmailText:$ve,getCreateAccountWithPasswordText:zve,getCreateAccountWithSmsText:jve,getOrText:Bve}=Rn;function Ao(){const{hasValidationErrors:e,isPending:t,availableAuthMethods:n,preferredChallenge:r,selectedAuthMethod:o}=ht(R=>[R.hasValidationErrors,R.isPending,R.availableAuthMethods,R.preferredChallenge,R.selectedAuthMethod]),{handleChange:s,handleBlur:a,handleSubmit:c}=Br(),{components:{SignUp:{Header:u=Ao.Header,FormFields:f=Ao.FormFields,Footer:h=Ao.Footer}}}=jr(),m=n?.filter(R=>R!=="WEB_AUTHN"),g=m&&m.length>1,v=r&&r!=="WEB_AUTHN"?r:"PASSWORD",C=m?.filter(R=>R!==v)??[],E=(o??v)!=="PASSWORD",x=R=>{switch(R){case"EMAIL_OTP":return $ve();case"SMS_OTP":return jve();case"PASSWORD":return g?zve():x4();default:return x4()}},I=R=>O=>{O.preventDefault();const D=O.target.closest("form");if(D){if(!D.__authMethod){const N=document.createElement("input");N.name="__authMethod",D.appendChild(N)}D.__authMethod.type="hidden",D.__authMethod.value=R,D.requestSubmit()}};return B.createElement(je,null,B.createElement(u,null),B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signup":"",method:"post",onChange:s,onSubmit:c,onBlur:a},B.createElement(_7,null),B.createElement($e,{as:"fieldset",direction:"column",isDisabled:t},B.createElement($e,{direction:"column"},B.createElement(f,{includePassword:!E}),B.createElement(xr,null)),B.createElement(Kt,{isDisabled:(!g||C.length==0)&&e||t,isFullWidth:!0,type:"submit",variation:"primary",isLoading:t,loadingText:Fve(),onClick:I(v)},x(v)),g&&C.length>0&&B.createElement(B.Fragment,null,B.createElement($e,{justifyContent:"center",padding:"medium 0"},Bve()),C.map(R=>B.createElement(Kt,{key:R,isDisabled:t,isFullWidth:!0,type:"button",variation:"primary",onClick:I(R)},x(R)))),B.createElement(h,null))))}Ao.Header=function(){return null};Ao.FormFields=function(){return B.createElement(ns,null)};Ao.Footer=function(){return null};const{getSignInTabText:Hve,getSignUpTabText:qve}=Rn,Vve=({className:e,hideSignUp:t,variation:n})=>{const{route:r,toSignIn:o,toSignUp:s}=ht(a=>[a.route,a.toSignIn,a.toSignUp]);return B.createElement(wr,{className:e,variation:n},t?B.createElement(je,{"data-amplify-router-content":""},r==="signIn"&&B.createElement(qs,null)):B.createElement(La.Container,{value:r,isLazy:!0,onValueChange:a=>{a!==r&&(a==="signIn"?o():s())}},B.createElement(La.List,{spacing:"equal",indicatorPosition:"top"},B.createElement(La.Item,{value:"signIn"},Hve()),B.createElement(La.Item,{value:"signUp"},qve())),B.createElement(La.Panel,{value:"signIn","data-amplify-router-content":""},B.createElement(qs,null)),B.createElement(La.Panel,{value:"signUp","data-amplify-router-content":""},B.createElement(Ao,null))))},{getAccountRecoveryInfoText:Wve,getSkipText:Gve}=Rn,al=({className:e,variation:t})=>{const{isPending:n}=ht(c=>[c.isPending]),{handleChange:r,handleSubmit:o}=Br(),{components:{ConfirmVerifyUser:{Header:s=al.Header,Footer:a=al.Footer}}}=jr();return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmverifyuser":"",method:"post",onChange:r,onSubmit:o},B.createElement($e,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(s,null),B.createElement($e,{direction:"column"},B.createElement(ns,null)),B.createElement(xr,null),B.createElement(sb,{cancelButtonText:Gve(),cancelButtonSendType:"SKIP"}),B.createElement(a,null))))};al.Header=function(){return B.createElement(ar,{level:3},Wve())};al.Footer=function(){return null};const{getSkipText:Kve,getVerifyText:Zve,getVerifyContactText:Yve,getAccountRecoveryInfoText:Qve}=Rn,Jve=e=>Object.entries(e).map(([t,n],r)=>{const o=Vy[t].label;return B.createElement(YR,{name:"unverifiedAttr",value:t,key:t,defaultChecked:r===0},ye(o),":"," ",uue(o,n))}),ll=({className:e,variation:t})=>{const{components:{VerifyUser:{Header:n=ll.Header,Footer:r=ll.Footer}}}=jr(),{isPending:o,unverifiedUserAttributes:s}=ht(({isPending:h,unverifiedUserAttributes:m})=>[h,m]),{handleChange:a,handleSubmit:c}=Br(),u=o?B.createElement(B.Fragment,null,"Verifying…"):B.createElement(B.Fragment,null,Zve()),f=B.createElement(QR,{legend:Yve(),name:"verify_context",isDisabled:o,legendHidden:!0},Jve(s));return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-verifyuser":"",method:"post",onChange:a,onSubmit:c},B.createElement($e,{as:"fieldset",direction:"column",isDisabled:o},B.createElement(n,null),f,B.createElement(xr,null),B.createElement(sb,{cancelButtonText:Kve(),cancelButtonSendType:"SKIP",submitButtonText:u}),B.createElement(r,null))))};ll.Header=function(){return B.createElement(ar,{level:3},Qve())};ll.Footer=function(){return null};const{getChallengeText:Xve,getDeliveryMessageText:eye,getDeliveryMethodText:tye}=Rn,cl=({className:e,variation:t})=>{const{isPending:n,challengeName:r,codeDeliveryDetails:o}=ht(h=>[h.isPending,h.challengeName,h.codeDeliveryDetails]),{handleChange:s,handleSubmit:a}=Br(),{components:{ConfirmSignIn:{Header:c=cl.Header,Footer:u=cl.Footer}}}=jr(),f=rT(r)&&o;return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignin":"",method:"post",onChange:s,onSubmit:a},B.createElement($e,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(c,null),B.createElement($e,{direction:"column"},f&&B.createElement(io,{className:"amplify-authenticator__subtitle"},eye(o)),B.createElement(ns,null),B.createElement(xr,null)),B.createElement(ob,null),B.createElement(u,null))))};function nye(){const{challengeName:e,codeDeliveryDetails:t}=ht(({challengeName:r,codeDeliveryDetails:o})=>[r,o]),n=rT(e)&&t;return B.createElement(B.Fragment,null,B.createElement(ar,{level:3},Xve(e)),n&&B.createElement(ar,{level:5},tye(t)))}cl.Header=nye;cl.Footer=function(){return null};const{getResendCodeText:rye,getResetYourPasswordText:oye}=Rn,ul=({className:e,variation:t})=>{const{isPending:n}=ht(u=>[u.isPending]),{handleBlur:r,handleChange:o,handleSubmit:s}=Br(),{components:{ConfirmResetPassword:{Header:a=ul.Header,Footer:c=ul.Footer}}}=jr();return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmresetpassword":"",method:"post",onSubmit:s,onChange:o,onBlur:r},B.createElement($e,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(a,null),B.createElement($e,{direction:"column"},B.createElement(ns,null)),B.createElement(xr,null),B.createElement(sb,{cancelButtonSendType:"RESEND",cancelButtonText:rye()}),B.createElement(c,null))))};ul.Header=function(){const t=oye();return B.createElement(ar,{level:3},t)};ul.Footer=function(){return null};const{getBackToSignInText:sye,getSendingText:iye,getSendCodeText:aye,getResetYourPasswordText:lye}=Rn,Ji=({className:e,variation:t})=>{const{isPending:n}=ht(c=>[c.isPending]),{handleChange:r,handleSubmit:o}=Br(),{components:{ForgotPassword:{Header:s=Ji.Header,Footer:a=Ji.Footer}}}=jr();return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forgotpassword":"",method:"post",onChange:r,onSubmit:o},B.createElement($e,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(s,null),B.createElement($e,{direction:"column"},B.createElement(ns,null)),B.createElement(xr,null),B.createElement(sb,{cancelButtonText:sye(),cancelButtonSendType:"SIGN_IN",submitButtonText:n?B.createElement(B.Fragment,null,iye(),"…"):B.createElement(B.Fragment,null,aye())}),B.createElement(a,null))))};Ji.Header=function(){return B.createElement(ar,{level:3},lye())};Ji.Footer=function(){return null};const{getMfaTypeLabelByValue:cye,getSelectMfaTypeByChallengeName:uye,getSelectMfaTypeText:dye}=Rn,Xi=({className:e,variation:t})=>{const{isPending:n,allowedMfaTypes:r=[]}=ht(u=>[u.isPending,u.allowedMfaTypes]),{handleChange:o,handleSubmit:s}=Br(),{components:{SelectMfaType:{Header:a=Xi.Header,Footer:c=Xi.Footer}}}=jr();return _.createElement(wr,{className:e,variation:t},_.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-select-mfa-type":"",method:"post",onChange:o,onSubmit:s},_.createElement($e,{as:"fieldset",direction:"column",isDisabled:n},_.createElement(a,null),_.createElement($e,{direction:"column"},_.createElement(QR,{name:"mfa_type",legend:dye(),legendHidden:!0,isDisabled:n,isRequired:!0},r.map((u,f)=>_.createElement(YR,{name:"mfa_type",key:u,value:u,defaultChecked:f===0},cye(u)))),_.createElement(xr,null)),_.createElement(ob,null),_.createElement(c,null))))};Xi.Header=function(){const{challengeName:t}=ht(n=>[n.challengeName]);return _.createElement(ar,{level:3},uye(t))};Xi.Footer=function(){return null};const{getSetupEmailText:fye}=Rn,ea=({className:e,variation:t})=>{const{isPending:n}=ht(c=>[c.isPending]),{handleChange:r,handleSubmit:o}=Br(),{components:{SetupEmail:{Header:s=ea.Header,Footer:a=ea.Footer}}}=jr();return _.createElement(wr,{className:e,variation:t},_.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-email":"",method:"post",onChange:r,onSubmit:o},_.createElement($e,{as:"fieldset",direction:"column",isDisabled:n},_.createElement(s,null),_.createElement($e,{direction:"column"},_.createElement(ns,null),_.createElement(xr,null)),_.createElement(ob,null),_.createElement(a,null))))};ea.Header=function(){return _.createElement(ar,{level:3},fye())};ea.Footer=function(){return null};const{getSignInWithPasswordText:rI,getSignInWithEmailText:hye,getSignInWithSmsText:pye,getSignInWithPasskeyText:mye,getSigningInText:gye,getBackToSignInText:vye,getOrText:yye,getUsernameLabelByLoginMechanism:bye}=Rn,Sye=e=>{switch(e){case"EMAIL_OTP":return hye();case"SMS_OTP":return pye();case"WEB_AUTHN":return mye();case"PASSWORD":return rI();default:return rI()}},Cye=({className:e,variation:t})=>{const{isPending:n,username:r,availableAuthMethods:o,toSignIn:s,selectAuthMethod:a,loginMechanism:c}=ht(b=>[b.isPending,b.username,b.availableAuthMethods,b.toSignIn,b.selectAuthMethod,b.loginMechanism]),{handleChange:u,handleSubmit:f}=Br(),h=o??[],m=h.includes("PASSWORD"),g=h.filter(b=>b!=="PASSWORD"),v=b=>{a({method:b})},C=bye(c);return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":!0,"data-amplify-authenticator-signinselect":!0,method:"post",onSubmit:f,onChange:u},B.createElement($e,{direction:"column"},B.createElement(Nh,{label:C,name:"username",value:r,isReadOnly:!0,isDisabled:!0}),m&&B.createElement(B.Fragment,null,B.createElement(ZR,{label:"Password",name:"password",autoComplete:"current-password",isDisabled:n}),B.createElement(Kt,{isDisabled:n,type:"submit",variation:"primary",isFullWidth:!0,isLoading:n,loadingText:gye()},rI())),m&&g.length>0&&B.createElement(KR,{label:yye()}),g.length>0&&B.createElement($e,{direction:"column",gap:"0.5rem"},g.map(b=>B.createElement(Kt,{key:b,variation:"primary",isFullWidth:!0,isDisabled:n,onClick:()=>v(b)},Sye(b)))),B.createElement(xr,null),B.createElement(Kt,{onClick:s,size:"small",variation:"link",isDisabled:n},vye()))))},wye=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"54",height:"54",viewBox:"0 0 54 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M22.9333 38.9333L41.7333 20.1333L38 16.4L22.9333 31.4667L15.3333 23.8667L11.6 27.6L22.9333 38.9333ZM26.6667 53.3333C22.9778 53.3333 19.5111 52.6333 16.2667 51.2333C13.0222 49.8333 10.2 47.9333 7.8 45.5333C5.4 43.1333 3.5 40.3111 2.1 37.0667C0.7 33.8222 0 30.3556 0 26.6667C0 22.9778 0.7 19.5111 2.1 16.2667C3.5 13.0222 5.4 10.2 7.8 7.8C10.2 5.4 13.0222 3.5 16.2667 2.1C19.5111 0.7 22.9778 0 26.6667 0C30.3556 0 33.8222 0.7 37.0667 2.1C40.3111 3.5 43.1333 5.4 45.5333 7.8C47.9333 10.2 49.8333 13.0222 51.2333 16.2667C52.6333 19.5111 53.3333 22.9778 53.3333 26.6667C53.3333 30.3556 52.6333 33.8222 51.2333 37.0667C49.8333 40.3111 47.9333 43.1333 45.5333 45.5333C43.1333 47.9333 40.3111 49.8333 37.0667 51.2333C33.8222 52.6333 30.3556 53.3333 26.6667 53.3333Z",fill:"currentColor"})))},Eye=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"195",height:"128",viewBox:"0 0 195 128",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("circle",{cx:"60",cy:"36",r:"31",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M60 69C84.4313 69 105.396 83.8504 114.357 105.021C116.774 110.729 115.382 116.168 111.798 120.23C108.191 124.319 102.358 127 96 127H24C17.6416 127 11.8094 124.319 8.20215 120.23C4.61836 116.168 3.22626 110.729 5.64258 105.021C14.6036 83.8504 35.5687 69 60 69Z",stroke:"#00404D",strokeWidth:"2"}),_.createElement("circle",{cx:"122",cy:"26",r:"25",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),_.createElement("mask",{id:"path-4-inside-1_4178_10171",fill:"white"},_.createElement("path",{d:"M121.951 13.927C124.887 13.927 127.658 14.5348 130.262 15.7503C132.866 16.9658 135.04 18.7222 136.786 21.0197C136.98 21.2601 137.042 21.4738 136.973 21.6608C136.903 21.8478 136.786 22.0081 136.619 22.1417C136.453 22.2753 136.259 22.3354 136.038 22.322C135.816 22.3086 135.622 22.1951 135.456 21.9814C133.932 19.8977 131.972 18.3015 129.576 17.1928C127.18 16.0842 124.638 15.5299 121.951 15.5299C119.264 15.5299 116.743 16.0842 114.388 17.1928C112.034 18.3015 110.081 19.8977 108.529 21.9814C108.363 22.2218 108.169 22.3554 107.947 22.3821C107.726 22.4088 107.532 22.3554 107.366 22.2218C107.172 22.0883 107.054 21.9213 107.012 21.7209C106.971 21.5206 107.033 21.3135 107.199 21.0998C108.917 18.8291 111.071 17.066 113.661 15.8104C116.251 14.5548 119.015 13.927 121.951 13.927ZM121.951 17.6937C125.691 17.6937 128.904 18.8959 131.591 21.3002C134.279 23.7045 135.622 26.6831 135.622 30.2361C135.622 31.5719 135.13 32.6872 134.147 33.5821C133.164 34.477 131.965 34.9245 130.553 34.9245C129.14 34.9245 127.928 34.477 126.917 33.5821C125.906 32.6872 125.4 31.5719 125.4 30.2361C125.4 29.3546 125.061 28.6132 124.382 28.0122C123.703 27.4111 122.893 27.1106 121.951 27.1106C121.009 27.1106 120.199 27.4111 119.52 28.0122C118.841 28.6132 118.502 29.3546 118.502 30.2361C118.502 32.8274 119.299 34.9913 120.891 36.7277C122.484 38.4642 124.541 39.6797 127.062 40.3742C127.311 40.4544 127.478 40.588 127.561 40.775C127.644 40.962 127.658 41.1623 127.602 41.376C127.547 41.563 127.436 41.7233 127.27 41.8569C127.104 41.9905 126.896 42.0305 126.647 41.9771C123.766 41.2825 121.411 39.9001 119.582 37.8297C117.754 35.7593 116.84 33.2281 116.84 30.2361C116.84 28.9004 117.339 27.7784 118.336 26.8701C119.333 25.9618 120.538 25.5077 121.951 25.5077C123.364 25.5077 124.569 25.9618 125.566 26.8701C126.563 27.7784 127.062 28.9004 127.062 30.2361C127.062 31.1177 127.408 31.859 128.101 32.4601C128.794 33.0612 129.611 33.3617 130.553 33.3617C131.495 33.3617 132.298 33.0612 132.963 32.4601C133.628 31.859 133.96 31.1177 133.96 30.2361C133.96 27.1373 132.783 24.5326 130.428 22.4222C128.073 20.3117 125.261 19.2565 121.993 19.2565C118.724 19.2565 115.912 20.3117 113.557 22.4222C111.202 24.5326 110.025 27.1239 110.025 30.1961C110.025 30.8372 110.087 31.6386 110.212 32.6004C110.337 33.5621 110.635 34.6841 111.106 35.9664C111.189 36.2068 111.182 36.4205 111.085 36.6075C110.988 36.7945 110.828 36.9281 110.607 37.0082C110.385 37.0884 110.171 37.0817 109.963 36.9882C109.755 36.8947 109.61 36.7411 109.526 36.5274C109.111 35.4855 108.813 34.4503 108.633 33.4218C108.453 32.3933 108.363 31.3314 108.363 30.2361C108.363 26.6831 109.7 23.7045 112.373 21.3002C115.046 18.8959 118.239 17.6937 121.951 17.6937ZM121.951 10C123.724 10 125.455 10.207 127.145 10.6211C128.835 11.0352 130.47 11.6296 132.049 12.4043C132.298 12.5379 132.443 12.6982 132.485 12.8852C132.526 13.0722 132.506 13.2592 132.423 13.4462C132.339 13.6332 132.201 13.7801 132.007 13.8869C131.813 13.9938 131.578 13.9804 131.301 13.8469C129.832 13.1256 128.316 12.5713 126.75 12.1839C125.185 11.7965 123.585 11.6029 121.951 11.6029C120.344 11.6029 118.765 11.7832 117.214 12.1438C115.663 12.5045 114.18 13.0722 112.768 13.8469C112.546 13.9804 112.324 14.0138 112.103 13.947C111.881 13.8803 111.715 13.74 111.604 13.5263C111.493 13.3126 111.466 13.1189 111.521 12.9453C111.576 12.7716 111.715 12.618 111.937 12.4844C113.488 11.683 115.109 11.0686 116.798 10.6411C118.488 10.2137 120.206 10 121.951 10ZM121.951 21.5807C124.527 21.5807 126.744 22.4155 128.6 24.0852C130.456 25.7548 131.384 27.8051 131.384 30.2361C131.384 30.4766 131.308 30.6702 131.155 30.8172C131.003 30.9641 130.802 31.0376 130.553 31.0376C130.331 31.0376 130.137 30.9641 129.971 30.8172C129.805 30.6702 129.722 30.4766 129.722 30.2361C129.722 28.2326 128.953 26.5562 127.415 25.2072C125.878 23.8581 124.056 23.1835 121.951 23.1835C119.846 23.1835 118.038 23.8581 116.528 25.2072C115.018 26.5562 114.264 28.2326 114.264 30.2361C114.264 32.4 114.651 34.2366 115.427 35.746C116.203 37.2553 117.339 38.7714 118.834 40.2941C119.001 40.4544 119.084 40.6414 119.084 40.8551C119.084 41.0688 119.001 41.2558 118.834 41.4161C118.668 41.5764 118.474 41.6565 118.253 41.6565C118.031 41.6565 117.837 41.5764 117.671 41.4161C116.037 39.7598 114.783 38.0701 113.91 36.347C113.038 34.624 112.601 32.587 112.601 30.2361C112.601 27.8051 113.516 25.7548 115.344 24.0852C117.172 22.4155 119.375 21.5807 121.951 21.5807ZM121.909 29.4347C122.159 29.4347 122.36 29.5148 122.512 29.6751C122.664 29.8354 122.741 30.0224 122.741 30.2361C122.741 32.2397 123.488 33.8826 124.984 35.1649C126.48 36.4472 128.226 37.0884 130.22 37.0884C130.386 37.0884 130.622 37.075 130.927 37.0483C131.231 37.0216 131.55 36.9815 131.882 36.9281C132.132 36.8747 132.346 36.9081 132.526 37.0283C132.706 37.1485 132.824 37.3288 132.88 37.5692C132.935 37.7829 132.893 37.9699 132.755 38.1302C132.616 38.2905 132.436 38.3974 132.215 38.4508C131.716 38.5844 131.28 38.6578 130.906 38.6712C130.532 38.6846 130.303 38.6912 130.22 38.6912C127.755 38.6912 125.615 37.8898 123.8 36.2869C121.986 34.6841 121.078 32.6671 121.078 30.2361C121.078 30.0224 121.155 29.8354 121.307 29.6751C121.459 29.5148 121.66 29.4347 121.909 29.4347Z"})),_.createElement("path",{d:"M121.951 13.927C124.887 13.927 127.658 14.5348 130.262 15.7503C132.866 16.9658 135.04 18.7222 136.786 21.0197C136.98 21.2601 137.042 21.4738 136.973 21.6608C136.903 21.8478 136.786 22.0081 136.619 22.1417C136.453 22.2753 136.259 22.3354 136.038 22.322C135.816 22.3086 135.622 22.1951 135.456 21.9814C133.932 19.8977 131.972 18.3015 129.576 17.1928C127.18 16.0842 124.638 15.5299 121.951 15.5299C119.264 15.5299 116.743 16.0842 114.388 17.1928C112.034 18.3015 110.081 19.8977 108.529 21.9814C108.363 22.2218 108.169 22.3554 107.947 22.3821C107.726 22.4088 107.532 22.3554 107.366 22.2218C107.172 22.0883 107.054 21.9213 107.012 21.7209C106.971 21.5206 107.033 21.3135 107.199 21.0998C108.917 18.8291 111.071 17.066 113.661 15.8104C116.251 14.5548 119.015 13.927 121.951 13.927ZM121.951 17.6937C125.691 17.6937 128.904 18.8959 131.591 21.3002C134.279 23.7045 135.622 26.6831 135.622 30.2361C135.622 31.5719 135.13 32.6872 134.147 33.5821C133.164 34.477 131.965 34.9245 130.553 34.9245C129.14 34.9245 127.928 34.477 126.917 33.5821C125.906 32.6872 125.4 31.5719 125.4 30.2361C125.4 29.3546 125.061 28.6132 124.382 28.0122C123.703 27.4111 122.893 27.1106 121.951 27.1106C121.009 27.1106 120.199 27.4111 119.52 28.0122C118.841 28.6132 118.502 29.3546 118.502 30.2361C118.502 32.8274 119.299 34.9913 120.891 36.7277C122.484 38.4642 124.541 39.6797 127.062 40.3742C127.311 40.4544 127.478 40.588 127.561 40.775C127.644 40.962 127.658 41.1623 127.602 41.376C127.547 41.563 127.436 41.7233 127.27 41.8569C127.104 41.9905 126.896 42.0305 126.647 41.9771C123.766 41.2825 121.411 39.9001 119.582 37.8297C117.754 35.7593 116.84 33.2281 116.84 30.2361C116.84 28.9004 117.339 27.7784 118.336 26.8701C119.333 25.9618 120.538 25.5077 121.951 25.5077C123.364 25.5077 124.569 25.9618 125.566 26.8701C126.563 27.7784 127.062 28.9004 127.062 30.2361C127.062 31.1177 127.408 31.859 128.101 32.4601C128.794 33.0612 129.611 33.3617 130.553 33.3617C131.495 33.3617 132.298 33.0612 132.963 32.4601C133.628 31.859 133.96 31.1177 133.96 30.2361C133.96 27.1373 132.783 24.5326 130.428 22.4222C128.073 20.3117 125.261 19.2565 121.993 19.2565C118.724 19.2565 115.912 20.3117 113.557 22.4222C111.202 24.5326 110.025 27.1239 110.025 30.1961C110.025 30.8372 110.087 31.6386 110.212 32.6004C110.337 33.5621 110.635 34.6841 111.106 35.9664C111.189 36.2068 111.182 36.4205 111.085 36.6075C110.988 36.7945 110.828 36.9281 110.607 37.0082C110.385 37.0884 110.171 37.0817 109.963 36.9882C109.755 36.8947 109.61 36.7411 109.526 36.5274C109.111 35.4855 108.813 34.4503 108.633 33.4218C108.453 32.3933 108.363 31.3314 108.363 30.2361C108.363 26.6831 109.7 23.7045 112.373 21.3002C115.046 18.8959 118.239 17.6937 121.951 17.6937ZM121.951 10C123.724 10 125.455 10.207 127.145 10.6211C128.835 11.0352 130.47 11.6296 132.049 12.4043C132.298 12.5379 132.443 12.6982 132.485 12.8852C132.526 13.0722 132.506 13.2592 132.423 13.4462C132.339 13.6332 132.201 13.7801 132.007 13.8869C131.813 13.9938 131.578 13.9804 131.301 13.8469C129.832 13.1256 128.316 12.5713 126.75 12.1839C125.185 11.7965 123.585 11.6029 121.951 11.6029C120.344 11.6029 118.765 11.7832 117.214 12.1438C115.663 12.5045 114.18 13.0722 112.768 13.8469C112.546 13.9804 112.324 14.0138 112.103 13.947C111.881 13.8803 111.715 13.74 111.604 13.5263C111.493 13.3126 111.466 13.1189 111.521 12.9453C111.576 12.7716 111.715 12.618 111.937 12.4844C113.488 11.683 115.109 11.0686 116.798 10.6411C118.488 10.2137 120.206 10 121.951 10ZM121.951 21.5807C124.527 21.5807 126.744 22.4155 128.6 24.0852C130.456 25.7548 131.384 27.8051 131.384 30.2361C131.384 30.4766 131.308 30.6702 131.155 30.8172C131.003 30.9641 130.802 31.0376 130.553 31.0376C130.331 31.0376 130.137 30.9641 129.971 30.8172C129.805 30.6702 129.722 30.4766 129.722 30.2361C129.722 28.2326 128.953 26.5562 127.415 25.2072C125.878 23.8581 124.056 23.1835 121.951 23.1835C119.846 23.1835 118.038 23.8581 116.528 25.2072C115.018 26.5562 114.264 28.2326 114.264 30.2361C114.264 32.4 114.651 34.2366 115.427 35.746C116.203 37.2553 117.339 38.7714 118.834 40.2941C119.001 40.4544 119.084 40.6414 119.084 40.8551C119.084 41.0688 119.001 41.2558 118.834 41.4161C118.668 41.5764 118.474 41.6565 118.253 41.6565C118.031 41.6565 117.837 41.5764 117.671 41.4161C116.037 39.7598 114.783 38.0701 113.91 36.347C113.038 34.624 112.601 32.587 112.601 30.2361C112.601 27.8051 113.516 25.7548 115.344 24.0852C117.172 22.4155 119.375 21.5807 121.951 21.5807ZM121.909 29.4347C122.159 29.4347 122.36 29.5148 122.512 29.6751C122.664 29.8354 122.741 30.0224 122.741 30.2361C122.741 32.2397 123.488 33.8826 124.984 35.1649C126.48 36.4472 128.226 37.0884 130.22 37.0884C130.386 37.0884 130.622 37.075 130.927 37.0483C131.231 37.0216 131.55 36.9815 131.882 36.9281C132.132 36.8747 132.346 36.9081 132.526 37.0283C132.706 37.1485 132.824 37.3288 132.88 37.5692C132.935 37.7829 132.893 37.9699 132.755 38.1302C132.616 38.2905 132.436 38.3974 132.215 38.4508C131.716 38.5844 131.28 38.6578 130.906 38.6712C130.532 38.6846 130.303 38.6912 130.22 38.6912C127.755 38.6912 125.615 37.8898 123.8 36.2869C121.986 34.6841 121.078 32.6671 121.078 30.2361C121.078 30.0224 121.155 29.8354 121.307 29.6751C121.459 29.5148 121.66 29.4347 121.909 29.4347Z",fill:"#00404D",stroke:"#00404D",strokeWidth:"4",mask:"url(#path-4-inside-1_4178_10171)"}),_.createElement("circle",{cx:"167.5",cy:"49.5",r:"19.5",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M167.89 43.65L161.26 54.18H167.89",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M167.5 60.42C173.316 60.42 178.03 55.7056 178.03 49.89V48.72",stroke:"#00404D",strokeWidth:"2"}),_.createElement("circle",{cx:"173.74",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),_.createElement("circle",{cx:"160.48",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M104 112C116.129 112 126.457 104.288 130.347 93.5H147.5L155.5 101.5L168 89L180.5 101.5L193 89L180.5 76.5H130.984C127.705 64.6779 116.866 56 104 56C88.536 56 76 68.536 76 84C76 99.464 88.536 112 104 112ZM104 98C111.732 98 118 91.732 118 84C118 76.268 111.732 70 104 70C96.268 70 90 76.268 90 84C90 91.732 96.268 98 104 98Z",fill:"#BCECF5"}),_.createElement("path",{d:"M130.347 93.5V92.5H129.645L129.407 93.1608L130.347 93.5ZM147.5 93.5L148.207 92.7929L147.914 92.5H147.5V93.5ZM155.5 101.5L154.793 102.207L155.5 102.914L156.207 102.207L155.5 101.5ZM168 89L168.707 88.2929L168 87.5858L167.293 88.2929L168 89ZM180.5 101.5L179.793 102.207L180.5 102.914L181.207 102.207L180.5 101.5ZM193 89L193.707 89.7071L194.414 89L193.707 88.2929L193 89ZM180.5 76.5L181.207 75.7929L180.914 75.5H180.5V76.5ZM130.984 76.5L130.021 76.7673L130.224 77.5H130.984V76.5ZM129.407 93.1608C125.655 103.565 115.694 111 104 111V113C116.564 113 127.259 105.011 131.288 93.8392L129.407 93.1608ZM147.5 92.5H130.347V94.5H147.5V92.5ZM156.207 100.793L148.207 92.7929L146.793 94.2071L154.793 102.207L156.207 100.793ZM167.293 88.2929L154.793 100.793L156.207 102.207L168.707 89.7071L167.293 88.2929ZM181.207 100.793L168.707 88.2929L167.293 89.7071L179.793 102.207L181.207 100.793ZM192.293 88.2929L179.793 100.793L181.207 102.207L193.707 89.7071L192.293 88.2929ZM179.793 77.2071L192.293 89.7071L193.707 88.2929L181.207 75.7929L179.793 77.2071ZM130.984 77.5H180.5V75.5H130.984V77.5ZM104 57C116.405 57 126.859 65.3669 130.021 76.7673L131.948 76.2327C128.552 63.9889 117.327 55 104 55V57ZM77 84C77 69.0883 89.0883 57 104 57V55C87.9837 55 75 67.9837 75 84H77ZM104 111C89.0883 111 77 98.9117 77 84H75C75 100.016 87.9837 113 104 113V111ZM117 84C117 91.1797 111.18 97 104 97V99C112.284 99 119 92.2843 119 84H117ZM104 71C111.18 71 117 76.8203 117 84H119C119 75.7157 112.284 69 104 69V71ZM91 84C91 76.8203 96.8203 71 104 71V69C95.7157 69 89 75.7157 89 84H91ZM104 97C96.8203 97 91 91.1797 91 84H89C89 92.2843 95.7157 99 104 99V97Z",fill:"#00404D"}),_.createElement("path",{d:"M138.5 57V66",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M139 104V124",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M134 61.5L143 61.5",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M129 114L149 114",stroke:"#00404D",strokeWidth:"2"})))},{getPasskeyPromptHeadingText:xye,getPasskeyPromptDescriptionText:_ye,getCreatePasskeyText:Iye,getRegisteringText:Aye,getContinueWithoutPasskeyText:Rye,getPasskeyCreatedSuccessText:Tye,getPasskeyRegisteredText:Oye,getPasskeyRegistrationFailedText:Mye,getPasskeyLabelText:Pye,getExistingPasskeysText:Nye,getSetupAnotherPasskeyText:kye,getContinueText:Dye}=Rn;function Lye({className:e,variation:t}){const[n,r]=B.useState(!1),[o,s]=B.useState(null),[a,c]=B.useState(!1),[u,f]=B.useState([]),{submitForm:h,isPending:m}=ht(x=>[x.submitForm,x.isPending]),g=B.useCallback(async()=>{try{const x=await AR();f(x.credentials||[])}catch{}},[]);B.useEffect(()=>{n&&g()},[n,g]);const v=B.useCallback(()=>{h({type:"SKIP"})},[h]),C=B.useCallback(()=>{h({type:"SUBMIT"})},[h]),b=B.useCallback(async()=>{try{s(null),c(!0),await Mce(),r(!0)}catch(x){const I=x,R=I.name??"",O=I.message??"";if(R==="PasskeyRegistrationCanceled"||R==="NotAllowedError"||O.includes("canceled")||O.includes("cancelled")||O.includes("ceremony has been canceled")||O.includes("not allowed")){v();return}s(Mye())}finally{c(!1)}},[v]);if(n)return B.createElement(wr,{className:e,variation:t},B.createElement($e,{direction:"column",padding:"large","data-amplify-authenticator-passkeyprompt":""},B.createElement($e,{direction:"column",gap:"xs"},B.createElement(wye,{className:"amplify-authenticator__passkey-success-icon"}),B.createElement(ar,{level:4},Tye()),B.createElement(io,null,Oye())),u.length>0&&B.createElement(je,{marginTop:"large"},B.createElement(ar,{level:5},Nye()),B.createElement($e,{direction:"column",gap:"xs",marginTop:"xs"},u.map((x,I)=>B.createElement(je,{key:x.credentialId,className:"amplify-authenticator__passkey-credential-item"},B.createElement(io,{fontSize:"small"},x.friendlyCredentialName??`${Pye()} ${I+1}`))))),B.createElement($e,{direction:"column",gap:"medium",marginTop:"large"},B.createElement(Kt,{onClick:()=>{r(!1),b()},variation:"link"},kye()),B.createElement(Kt,{onClick:()=>C(),variation:"primary",isFullWidth:!0},Dye()))));const E=m||a;return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-passkeyprompt":""},B.createElement($e,{direction:"column",gap:"medium"},B.createElement(ar,{level:4},xye()),B.createElement(io,null,_ye()),B.createElement($e,{justifyContent:"center"},B.createElement(Eye,{className:"amplify-authenticator__passkey-icon"})),B.createElement($e,{direction:"column",gap:"medium"},B.createElement(Kt,{onClick:()=>{b()},variation:"primary",isDisabled:E,isLoading:a,loadingText:Aye()},Iye()),B.createElement(Kt,{onClick:v,variation:"link",isDisabled:E},Rye()),o&&B.createElement(io,{className:"amplify-authenticator__passkey-error"},o),B.createElement(xr,null)))))}function _4(){return null}const Uye=e=>{switch(e){case"authenticated":case"idle":case"setup":case"transition":return _4;case"confirmSignUp":return il;case"confirmSignIn":return cl;case"selectMfaType":return Xi;case"setupEmail":return ea;case"setupTotp":return Qi;case"signIn":case"signUp":return Vve;case"signInSelectAuthFactor":return Cye;case"passkeyPrompt":return Lye;case"forceNewPassword":return Io;case"forgotPassword":return Ji;case"confirmResetPassword":return ul;case"verifyUser":return ll;case"confirmVerifyUser":return al;default:return console.warn(`Unhandled Authenticator route - please open an issue: ${e}`),_4}};function Fye({className:e,hideSignUp:t,variation:n}){const{route:r}=ht(({route:s})=>[s]),o=_.useMemo(()=>Uye(r),[r]);return B.createElement(o,{className:e,hideSignUp:pve(r)?t:void 0,variation:n})}const $ye={Header:()=>null,SignIn:{Header:qs.Header,Footer:qs.Footer},SignUp:{Header:Ao.Header,FormFields:Ao.FormFields,Footer:Ao.Footer},ConfirmSignUp:{Header:il.Header,Footer:il.Footer},SelectMfaType:{Header:Xi.Header,Footer:Xi.Footer},SetupEmail:{Header:ea.Header,Footer:ea.Footer},SetupTotp:{Header:Qi.Header,Footer:Qi.Footer},ConfirmResetPassword:{Header:ul.Header,Footer:ul.Footer},ConfirmSignIn:{Header:cl.Header,Footer:cl.Footer},VerifyUser:{Header:ll.Header,Footer:ll.Footer},ConfirmVerifyUser:{Header:al.Header,Footer:al.Footer},ForceNewPassword:{Header:Io.Header,Footer:Io.Footer,FormFields:Io.FormFields},ForgotPassword:{Header:Ji.Header,Footer:Ji.Footer},Footer:()=>null};function zye({children:e,className:t,components:n,formFields:r,hideSignUp:o,initialState:s,loginMechanisms:a,passwordSettings:c,passwordless:u,signUpAttributes:f,services:h,socialProviders:m,variation:g}){kge({message:"The `passwordSettings` prop has been deprecated and will be removed in a future major version of Amplify UI.",shouldWarn:!1});const{route:v,signOut:C,user:b}=ht(({route:I,signOut:R,user:O})=>[I,R,O]);dme({initialState:s,loginMechanisms:a,passwordSettings:c,passwordless:u,services:h,signUpAttributes:f,socialProviders:m,formFields:r});const E=_.useMemo(()=>({components:{...$ye,...n}}),[n]);return v==="authenticated"||v==="signOut"?e?_.createElement(_.Fragment,null,Bs(e)?e({signOut:C,user:b}):e):null:_.createElement(b7.Provider,{value:E},_.createElement(Fye,{className:t,hideSignUp:o,variation:g}))}function rs(e){return hme({componentName:"Authenticator",packageName:"react",version:Nge}),_.createElement(t7,null,_.createElement(zye,{...e}))}rs.Provider=t7;rs.ForgotPassword=Ji;rs.SetupTotp=Qi;rs.SignIn=qs;rs.SignUp=Ao;rs.ForceNewPassword=Io;rs.SelectMfaType=Xi;rs.SetupEmail=ea;const I7=({cssText:e,...t})=>e===void 0||/<\/style/i.test(e)?null:_.createElement("style",{...t,dangerouslySetInnerHTML:{__html:e}});I7.displayName="Style";const A7=({theme:e,...t})=>{if(!e)return null;const{name:n,cssText:r}=e;return _.createElement(I7,{...t,cssText:r,id:`amplify-theme-${n}`})};A7.displayName="ThemeStyle";function jye({children:e,colorMode:t,direction:n="ltr",nonce:r,theme:o}){const s=_.useMemo(()=>({theme:Qy(o),colorMode:t}),[o,t]);return _.createElement(n7.Provider,{value:s},_.createElement(uge,{dir:n},_.createElement("div",{"data-amplify-theme":s.theme.name,"data-amplify-color-mode":t,dir:n},e),o?_.createElement(A7,{theme:s.theme,nonce:r}):null))}const Bye=({configured:e,authStatus:t})=>t==="authenticated",Hye=e=>e?e.signInDetails?.loginId??e.username??null:null,qye=({children:e,fallback:t=null})=>{const{authStatus:n,signOut:r,user:o}=ht(s=>[s.authStatus,s.signOut,s.user]);return Bye({configured:!0,authStatus:n})?T.jsx(T.Fragment,{children:e({email:Hye(o),signOut:()=>r()})}):T.jsx(T.Fragment,{children:t})},Vye=({children:e,fallback:t=null})=>Sy()?T.jsx(qye,{fallback:t,children:e}):T.jsx(T.Fragment,{children:t}),I4='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Js=e=>`var(${e})`,on=Js("--accent"),Wye=Js("--accent-hover"),A4=Js("--accent-soft"),Qd=Js("--accent-fg"),R4=Js("--surface"),Ec=Js("--fg"),Gye=Js("--surface-sunken"),Um=Js("--fg-muted"),Jd=Js("--line"),Kye=Qy({name:"remit",tokens:{colors:{brand:{primary:{10:{value:A4},20:{value:A4},40:{value:on},60:{value:on},80:{value:on},90:{value:on},100:{value:on}}},background:{primary:{value:R4},secondary:{value:Gye}},font:{primary:{value:Ec},secondary:{value:Um},tertiary:{value:Um},interactive:{value:on},inverse:{value:Qd},hover:{value:on},focus:{value:on},active:{value:on}},border:{primary:{value:Jd},secondary:{value:Jd},focus:{value:on}}},fonts:{default:{variable:{value:I4},static:{value:I4}}},radii:{small:{value:"3px"},medium:{value:"5px"},large:{value:"7px"}},components:{authenticator:{router:{borderColor:{value:Jd},borderWidth:{value:"1px"},boxShadow:{value:"0 10px 30px -10px rgb(15 23 42 / 0.18), 0 4px 12px -6px rgb(15 23 42 / 0.1)"},backgroundColor:{value:R4}},form:{padding:{value:"1.75rem"}},orContainer:{color:{value:Um}}},button:{color:{value:Ec},primary:{backgroundColor:{value:on},color:{value:Qd},_hover:{backgroundColor:{value:Wye},color:{value:Qd}},_focus:{backgroundColor:{value:on},color:{value:Qd}},_active:{backgroundColor:{value:on},color:{value:Qd}}},link:{color:{value:on},_hover:{color:{value:on},backgroundColor:{value:"transparent"}},_focus:{color:{value:on},backgroundColor:{value:"transparent"}},_active:{color:{value:on},backgroundColor:{value:"transparent"}}}},fieldcontrol:{color:{value:Ec},borderColor:{value:Jd},_focus:{borderColor:{value:on},boxShadow:{value:`0 0 0 2px ${on}`}}},field:{label:{color:{value:Ec}}},tabs:{borderColor:{value:Jd},item:{color:{value:Um},backgroundColor:{value:"transparent"},_active:{color:{value:on},borderColor:{value:on},backgroundColor:{value:"transparent"}},_hover:{color:{value:on}},_focus:{color:{value:on}}}},heading:{color:{value:Ec}},text:{color:{value:Ec}}}}}),Zye={signIn:{username:{placeholder:"Enter your username"},password:{placeholder:"Enter your password"}},signUp:{username:{placeholder:"Enter your username"},password:{placeholder:"Enter your password"},confirm_password:{placeholder:"Confirm your password"}}},Yye=()=>T.jsx(so,{tone:"warning",className:"fixed top-0 left-0 right-0 z-50 h-7 sm:h-10 overflow-hidden border-x-0 border-t-0",children:T.jsxs("span",{className:"flex items-center gap-2",children:[T.jsx("strong",{className:"font-semibold shrink-0",children:"Local dev"}),T.jsx("span",{className:"truncate hidden sm:inline",children:"— Cognito not configured. Set VITE_COGNITO_USER_POOL_ID and VITE_COGNITO_CLIENT_ID in .env.local to enable sign-in."}),T.jsx("span",{className:"truncate sm:hidden",children:"— no Cognito; signed out"})]})}),Qye=()=>T.jsx(sR,{note:lR({betterAuthEnabled:!1,cognitoConfigured:Sy()})}),Jye=({children:e})=>{const{authStatus:t}=ht(n=>[n.authStatus]);return t==="authenticated"?T.jsx(T.Fragment,{children:e}):t==="configuring"?T.jsx(Iy,{}):T.jsx(jye,{theme:Kye,children:T.jsxs(xy,{children:[T.jsx(_y,{}),T.jsx(rs,{hideSignUp:!1,formFields:Zye,components:{Footer:Qye}})]})})},Xye=({children:e})=>Sy()?T.jsx(rs.Provider,{children:T.jsx(Jye,{children:e})}):T.jsxs("div",{className:"pt-7 sm:pt-10 [&_#main-content]:h-[calc(100dvh-1.75rem)] sm:[&_#main-content]:h-[calc(100dvh-2.5rem)]",children:[T.jsx(Yye,{}),e]}),R7=60;let Yc=null;const T7=()=>Math.floor(Date.now()/1e3),ebe=e=>e!==null&&e.expiresAt-R7>T7(),tbe=async()=>{const t=(await my()).tokens?.idToken;return t?(Yc={value:t.toString(),expiresAt:t.payload.exp??T7()+R7},Yc.value):(Yc=null,null)},nbe=async()=>Sy()?ebe(Yc)?Yc.value:tbe():null,rbe=()=>{Yc=null},gv={configure:E$,getToken:nbe,resetToken:rbe,Shell:Xye,Account:Vye},obe=({children:e})=>Cy()?T.jsx(cv.Shell,{children:e}):T.jsx(gv.Shell,{children:e}),sbe=e=>Cy()?T.jsx(cv.Account,{...e}):T.jsx(gv.Account,{...e}),ibe={configure:E$,getToken:()=>Cy()?cv.getToken():gv.getToken(),resetToken:()=>{cv.resetToken(),gv.resetToken()},Shell:obe,Account:sbe};var Fu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},abe=class extends Fu{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},oT=new abe,lbe={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},cbe=class{#e=lbe;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},$a=new cbe;function ube(e){setTimeout(e,0)}var dbe=typeof window>"u"||"Deno"in globalThis;function rr(){}function fbe(e,t){return typeof e=="function"?e(t):e}function oI(e){return typeof e=="number"&&e>=0&&e!==1/0}function O7(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Vi(e,t){return typeof e=="function"?e(t):e}function Ur(e,t){return typeof e=="function"?e(t):e}function T4(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:c}=e;if(a){if(r){if(t.queryHash!==sT(a,t.options))return!1}else if(!Zf(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||s&&!s(t))}function O4(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(dl(t.options.mutationKey)!==dl(s))return!1}else if(!Zf(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function sT(e,t){return(t?.queryKeyHashFn||dl)(e)}function dl(e){return JSON.stringify(e,(t,n)=>sI(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Zf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Zf(e[n],t[n])):!1}var hbe=Object.prototype.hasOwnProperty;function M7(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=M4(e)&&M4(t);if(!r&&!(sI(e)&&sI(t)))return t;const s=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),c=a.length,u=r?new Array(c):{};let f=0;for(let h=0;h<c;h++){const m=r?h:a[h],g=e[m],v=t[m];if(g===v){u[m]=g,(r?h<s:hbe.call(e,m))&&f++;continue}if(g===null||v===null||typeof g!="object"||typeof v!="object"){u[m]=v;continue}const C=M7(g,v,n+1);u[m]=C,C===g&&f++}return s===c&&f===s?e:u}function vv(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function M4(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function sI(e){if(!P4(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!P4(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function P4(e){return Object.prototype.toString.call(e)==="[object Object]"}function pbe(e){return new Promise(t=>{$a.setTimeout(t,e)})}function iI(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?M7(e,t):t}function mbe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function gbe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var iT=Symbol();function P7(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===iT?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function aT(e,t){return typeof e=="function"?e(...t):!!e}function vbe(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var Yf=(()=>{let e=()=>dbe;return{isServer(){return e()},setIsServer(t){e=t}}})();function aI(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var ybe=ube;function bbe(){let e=[],t=0,n=c=>{c()},r=c=>{c()},o=ybe;const s=c=>{t?e.push(c):o(()=>{n(c)})},a=()=>{const c=e;e=[],c.length&&o(()=>{r(()=>{c.forEach(u=>{n(u)})})})};return{batch:c=>{let u;t++;try{u=c()}finally{t--,t||a()}return u},batchCalls:c=>(...u)=>{s(()=>{c(...u)})},schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{o=c}}}var An=bbe(),Sbe=class extends Fu{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},yv=new Sbe;function Cbe(e){return Math.min(1e3*2**e,3e4)}function N7(e){return(e??"online")==="online"?yv.isOnline():!0}var lI=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function k7(e){let t=!1,n=0,r;const o=aI(),s=()=>o.status!=="pending",a=b=>{if(!s()){const E=new lI(b);g(E),e.onCancel?.(E)}},c=()=>{t=!0},u=()=>{t=!1},f=()=>oT.isFocused()&&(e.networkMode==="always"||yv.isOnline())&&e.canRun(),h=()=>N7(e.networkMode)&&e.canRun(),m=b=>{s()||(r?.(),o.resolve(b))},g=b=>{s()||(r?.(),o.reject(b))},v=()=>new Promise(b=>{r=E=>{(s()||f())&&b(E)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),C=()=>{if(s())return;let b;const E=n===0?e.initialPromise:void 0;try{b=E??e.fn()}catch(x){b=Promise.reject(x)}Promise.resolve(b).then(m).catch(x=>{if(s())return;const I=e.retry??(Yf.isServer()?0:3),R=e.retryDelay??Cbe,O=typeof R=="function"?R(n,x):R,D=I===!0||typeof I=="number"&&n<I||typeof I=="function"&&I(n,x);if(t||!D){g(x);return}n++,e.onFail?.(n,x),pbe(O).then(()=>f()?void 0:v()).then(()=>{t?g(x):C()})})};return{promise:o,status:()=>o.status,cancel:a,continue:()=>(r?.(),o),cancelRetry:c,continueRetry:u,canStart:h,start:()=>(h()?C():v().then(C),o)}}var D7=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),oI(this.gcTime)&&(this.#e=$a.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Yf.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&($a.clearTimeout(this.#e),this.#e=void 0)}};function wbe(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},u=0;const f=async()=>{let h=!1;const m=C=>{vbe(C,()=>t.signal,()=>h=!0)},g=P7(t.options,t.fetchOptions),v=async(C,b,E)=>{if(h)return Promise.reject(t.signal.reason);if(b==null&&C.pages.length)return Promise.resolve(C);const I=(()=>{const N={client:t.client,queryKey:t.queryKey,pageParam:b,direction:E?"backward":"forward",meta:t.options.meta};return m(N),N})(),R=await g(I),{maxPages:O}=t.options,D=E?gbe:mbe;return{pages:D(C.pages,R,O),pageParams:D(C.pageParams,b,O)}};if(o&&s.length){const C=o==="backward",b=C?L7:cI,E={pages:s,pageParams:a},x=b(r,E);c=await v(E,x,C)}else{const C=e??s.length;do{const b=u===0?a[0]??r.initialPageParam:cI(r,c);if(u>0&&b==null)break;c=await v(c,b),u++}while(u<C)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function cI(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function L7(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function p9e(e,t){return t?cI(e,t)!=null:!1}function m9e(e,t){return!t||!e.getPreviousPageParam?!1:L7(e,t)!=null}var Ebe=class extends D7{#e;#t;#n;#r;#s;#o;#a;#i;constructor(e){super(),this.#i=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#r=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=k4(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#o?.promise}setOptions(e){if(this.options={...this.#a,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=k4(this.options);t.data!==void 0&&(this.setState(N4(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=iI(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#o?.promise;return this.#o?.cancel(e),t?t.then(rr).catch(rr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Ur(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===iT||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Vi(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!O7(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#o?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#o?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#o&&(this.#i||this.#u()?this.#o.cancel({revert:!0}):this.#o.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#o?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#o)return this.#o.continueRetry(),this.#o.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(f=>f.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,r=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},o=()=>{const u=P7(this.options,t),h=(()=>{const m={client:this.#s,queryKey:this.queryKey,meta:this.meta};return r(m),m})();return this.#i=!1,this.options.persister?this.options.persister(u,h,this):u(h)},a=(()=>{const u={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return r(u),u})();(this.#e==="infinite"?wbe(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:"fetch",meta:a.fetchOptions?.meta}),this.#o=k7({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:u=>{u instanceof lI&&u.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(u,f)=>{this.#l({type:"failed",failureCount:u,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const u=await this.#o.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#r.config.onSuccess?.(u,this),this.#r.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof lI){if(u.silent)return this.#o.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#l({type:"error",error:u}),this.#r.config.onError?.(u,this),this.#r.config.onSettled?.(this.state.data,u,this),u}finally{this.scheduleGc()}}#l(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...U7(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...N4(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),An.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function U7(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:N7(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function N4(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function k4(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var xbe=class extends Fu{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#a=aI(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#s;#o;#a;#i;#u;#l;#p;#d;#f;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),D4(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return uI(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return uI(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#C(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ur(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),t._defaulted&&!vv(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&L4(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Ur(this.options.enabled,this.#t)!==Ur(t.enabled,this.#t)||Vi(this.options.staleTime,this.#t)!==Vi(t.staleTime,this.#t))&&this.#g();const o=this.#v();r&&(this.#t!==n||Ur(this.options.enabled,this.#t)!==Ur(t.enabled,this.#t)||o!==this.#c)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ibe(this,n)&&(this.#r=n,this.#o=this.options,this.#s=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(rr)),t}#g(){this.#S();const e=Vi(this.options.staleTime,this.#t);if(Yf.isServer()||this.#r.isStale||!oI(e))return;const n=O7(this.#r.dataUpdatedAt,e)+1;this.#d=$a.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#C(),this.#c=e,!(Yf.isServer()||Ur(this.options.enabled,this.#t)===!1||!oI(this.#c)||this.#c===0)&&(this.#f=$a.setInterval(()=>{(this.options.refetchIntervalInBackground||oT.isFocused())&&this.#h()},this.#c))}#b(){this.#g(),this.#y(this.#v())}#S(){this.#d!==void 0&&($a.clearTimeout(this.#d),this.#d=void 0)}#C(){this.#f!==void 0&&($a.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){const n=this.#t,r=this.options,o=this.#r,s=this.#s,a=this.#o,u=e!==n?e.state:this.#n,{state:f}=e;let h={...f},m=!1,g;if(t._optimisticResults){const L=this.hasListeners(),$=!L&&D4(e,t),G=L&&L4(e,n,t,r);($||G)&&(h={...h,...U7(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:v,errorUpdatedAt:C,status:b}=h;g=h.data;let E=!1;if(t.placeholderData!==void 0&&g===void 0&&b==="pending"){let L;o?.isPlaceholderData&&t.placeholderData===a?.placeholderData?(L=o.data,E=!0):L=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,L!==void 0&&(b="success",g=iI(o?.data,L,t),m=!0)}if(t.select&&g!==void 0&&!E)if(o&&g===s?.data&&t.select===this.#u)g=this.#l;else try{this.#u=t.select,g=t.select(g),g=iI(o?.data,g,t),this.#l=g,this.#i=null}catch(L){this.#i=L}this.#i&&(v=this.#i,g=this.#l,C=Date.now(),b="error");const x=h.fetchStatus==="fetching",I=b==="pending",R=b==="error",O=I&&x,D=g!==void 0,M={status:b,fetchStatus:h.fetchStatus,isPending:I,isSuccess:b==="success",isError:R,isInitialLoading:O,isLoading:O,data:g,dataUpdatedAt:h.dataUpdatedAt,error:v,errorUpdatedAt:C,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!I,isLoadingError:R&&!D,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:R&&D,isStale:lT(e,t),refetch:this.refetch,promise:this.#a,isEnabled:Ur(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const L=M.data!==void 0,$=M.status==="error"&&!L,G=q=>{$?q.reject(M.error):L&&q.resolve(M.data)},j=()=>{const q=this.#a=M.promise=aI();G(q)},F=this.#a;switch(F.status){case"pending":e.queryHash===n.queryHash&&G(F);break;case"fulfilled":($||M.data!==F.value)&&j();break;case"rejected":(!$||M.error!==F.reason)&&j();break}}return M}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#s=this.#t.state,this.#o=this.options,this.#s.data!==void 0&&(this.#p=this.#t),vv(t,e))return;this.#r=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#m.size)return!0;const s=new Set(o??this.#m);return this.options.throwOnError&&s.add("error"),Object.keys(this.#r).some(a=>{const c=a;return this.#r[c]!==e[c]&&s.has(c)})};this.#E({listeners:n()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(e){An.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function _be(e,t){return Ur(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Ur(t.retryOnMount,e)===!1)}function D4(e,t){return _be(e,t)||e.state.data!==void 0&&uI(e,t,t.refetchOnMount)}function uI(e,t,n){if(Ur(t.enabled,e)!==!1&&Vi(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&lT(e,t)}return!1}function L4(e,t,n,r){return(e!==t||Ur(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&lT(e,n)}function lT(e,t){return Ur(t.enabled,e)!==!1&&e.isStaleByTime(Vi(t.staleTime,e))}function Ibe(e,t){return!vv(e.getCurrentResult(),t)}var Abe=class extends D7{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||F7(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#s({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=k7({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,a)=>{this.#s({type:"failed",failureCount:s,error:a})},onPause:()=>{this.#s({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",o=!this.#r.canStart();try{if(r)t();else{this.#s({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const a=await this.options.onMutate?.(e,n);a!==this.state.context&&this.#s({type:"pending",context:a,variables:e,isPaused:o})}const s=await this.#r.start();return await this.#n.config.onSuccess?.(s,e,this.state.context,this,n),await this.options.onSuccess?.(s,e,this.state.context,n),await this.#n.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,e,this.state.context,n),this.#s({type:"success",data:s}),s}catch(s){try{await this.#n.config.onError?.(s,e,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(s,e,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,s,e,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#s({type:"error",error:s}),s}finally{this.#n.runNext(this)}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),An.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function F7(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $7=class extends Fu{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new Abe({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=Fm(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Fm(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Fm(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Fm(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){An.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>O4(t,n))}findAll(e={}){return this.getAll().filter(t=>O4(e,t))}notify(e){An.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return An.batch(()=>Promise.all(e.map(t=>t.continue().catch(rr))))}};function Fm(e){return e.options.scope?.id}var Rbe=class extends Fu{#e;#t=void 0;#n;#r;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),vv(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&dl(n.mutationKey)!==dl(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#s(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#s(),this.#o()}mutate(t,n){return this.#r=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#s(){const t=this.#n?.state??F7();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){An.batch(()=>{if(this.#r&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,n,r,o)}catch(s){Promise.reject(s)}try{this.#r.onSettled?.(t.data,null,n,r,o)}catch(s){Promise.reject(s)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,n,r,o)}catch(s){Promise.reject(s)}try{this.#r.onSettled?.(void 0,t.error,n,r,o)}catch(s){Promise.reject(s)}}}this.listeners.forEach(n=>{n(this.#t)})})}},z7=class extends Fu{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??sT(r,t);let s=this.get(o);return s||(s=new Ebe({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){An.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>T4(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>T4(e,n)):t}notify(e){An.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){An.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){An.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Tbe=class{#e;#t;#n;#r;#s;#o;#a;#i;constructor(e={}){this.#e=e.queryCache||new z7,this.#t=e.mutationCache||new $7,this.#n=e.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=oT.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=yv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Vi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(r.queryHash)?.state.data,a=fbe(t,s);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return An.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;An.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return An.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=An.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(rr).catch(rr)}invalidateQueries(e,t={}){return An.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=An.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(rr)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(rr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Vi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(rr).catch(rr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(rr).catch(rr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return yv.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(dl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Zf(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#s.set(dl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{Zf(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=sT(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===iT&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},j7=_.createContext(void 0),ia=e=>{const t=_.useContext(j7);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Obe=({client:e,children:t})=>(_.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(j7.Provider,{value:e,children:t})),B7=_.createContext(!1),Mbe=()=>_.useContext(B7);B7.Provider;function Pbe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Nbe=_.createContext(Pbe()),kbe=()=>_.useContext(Nbe),Dbe=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?aT(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Lbe=e=>{_.useEffect(()=>{e.clearReset()},[e])},Ube=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||aT(n,[e.error,r])),Fbe=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},$be=(e,t)=>e.isLoading&&e.isFetching&&!t,zbe=(e,t)=>e?.suspense&&t.isPending,U4=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function jbe(e,t,n){const r=Mbe(),o=kbe(),s=ia(),a=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const c=s.getQueryCache().get(a.queryHash),u=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":u?"optimistic":void 0,Fbe(a),Dbe(a,o,c),Lbe(o);const f=!s.getQueryCache().get(a.queryHash),[h]=_.useState(()=>new t(s,a)),m=h.getOptimisticResult(a),g=!r&&u;if(_.useSyncExternalStore(_.useCallback(v=>{const C=g?h.subscribe(An.batchCalls(v)):rr;return h.updateResult(),C},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),_.useEffect(()=>{h.setOptions(a)},[a,h]),zbe(a,m))throw U4(a,h,o);if(Ube({result:m,errorResetBoundary:o,throwOnError:a.throwOnError,query:c,suspense:a.suspense}))throw m.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(a,m),a.experimental_prefetchInRender&&!Yf.isServer()&&$be(m,r)&&(f?U4(a,h,o):c?.promise)?.catch(rr).finally(()=>{h.updateResult()}),a.notifyOnChangeProps?m:h.trackResult(m)}function fl(e,t){return jbe(e,xbe)}function cT(e,t){const n=ia(),[r]=_.useState(()=>new Rbe(n,e));_.useEffect(()=>{r.setOptions(e)},[r,e]);const o=_.useSyncExternalStore(_.useCallback(a=>r.subscribe(An.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=_.useCallback((a,c)=>{r.mutate(a,c).catch(rr)},[r]);if(o.error&&aT(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const Bbe="modulepreload",Hbe=function(e){return"/"+e},F4={},Pe=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let u=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=a?.nonce||a?.getAttribute("nonce");o=u(n.map(f=>{if(f=Hbe(f),f in F4)return;F4[f]=!0;const h=f.endsWith(".css"),m=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${m}`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":Bbe,h||(g.as="script"),g.crossOrigin="",g.href=f,c&&g.setAttribute("nonce",c),document.head.appendChild(g),h)return new Promise((v,C)=>{g.addEventListener("load",v),g.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${f}`)))})}))}function s(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return o.then(a=>{for(const c of a||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};var $4=_.use,zc=typeof window<"u"?_.useLayoutEffect:_.useEffect;function Cx(e){const t=_.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function qbe(e,t,n={},r={}){_.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([s])=>{t(s)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,r.disabled,e])}function Vbe(e){const t=_.useRef(null);return _.useImperativeHandle(e,()=>t.current,[]),t}const H7=!1;function Qf(e){return e[e.length-1]}function Wbe(e){return typeof e=="function"}function za(e,t){return Wbe(e)?e(t):e}const q7=Object.prototype.hasOwnProperty,z4=Object.prototype.propertyIsEnumerable;function V7(e){for(const t in e)if(q7.call(e,t))return!0;return!1}const Gbe=()=>Object.create(null),ka=(e,t)=>ja(e,t,Gbe);function ja(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const o=t,s=H4(e)&&H4(o);if(!s&&!(bv(e)&&bv(o)))return o;const a=s?e:j4(e);if(!a)return o;const c=s?o:j4(o);if(!c)return o;const u=a.length,f=c.length,h=s?new Array(f):n();let m=0;for(let g=0;g<f;g++){const v=s?g:c[g],C=e[v],b=o[v];if(C===b){h[v]=C,(s?g<u:q7.call(e,v))&&m++;continue}if(C===null||b===null||typeof C!="object"||typeof b!="object"){h[v]=b;continue}const E=ja(C,b,n,r+1);h[v]=E,E===C&&m++}return u===f&&m===u?e:h}function j4(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!z4.call(e,o))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const o of n){if(!z4.call(e,o))return!1;r.push(o)}return r}function bv(e){if(!B4(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!B4(n)||!n.hasOwnProperty("isPrototypeOf"))}function B4(e){return Object.prototype.toString.call(e)==="[object Object]"}function H4(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ka(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,o=e.length;r<o;r++)if(!Ka(e[r],t[r],n))return!1;return!0}if(bv(e)&&bv(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in t)if((!r||t[a]!==void 0)&&!Ka(e[a],t[a],n))return!1;return!0}let o=0;if(!r)o=Object.keys(e).length;else for(const a in e)e[a]!==void 0&&o++;let s=0;for(const a in t)if((!r||t[a]!==void 0)&&(s++,s>o||!Ka(e[a],t[a],n)))return!1;return o===s}return!1}function cu(e){let t,n;const r=new Promise((o,s)=>{t=o,n=s});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,t(o),e?.(o)},r.reject=o=>{r.status="rejected",n(o)},r}function Kbe(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Jf(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}const Zbe=/[\x00-\x1f\x7f"<>`{}]/g;function Ybe(e){return e.replace(Zbe,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function q4(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return Ybe(t)}const Qbe=["http:","https:","mailto:","tel:"];function Sv(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Xd(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",o;for(;(o=t.exec(e))!==null;)r+=q4(e.slice(n,o.index))+o[0],n=t.lastIndex;r=r+q4(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function Jbe(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Xbe(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Us(){throw new Error("Invariant failed")}function Xf(e){const t=new Map;let n,r;const o=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,n=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)};return{get(s){const a=t.get(s);if(a)return o(a),a.value},set(s,a){if(t.size>=e&&n){const u=n;t.delete(u.key),u.next&&(n=u.next,u.next.prev=void 0),u===r&&(r=void 0)}const c=t.get(s);if(c)c.value=a,o(c);else{const u={key:s,value:a,prev:r};r&&(r.next=u),r=u,n||(n=u),t.set(s,u)}},clear(){t.clear(),n=void 0,r=void 0}}}const ji=4,W7=5;function e0e(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function G7(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),o=r===-1?e.length:r,s=e.substring(t,o);if(!s||!s.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(s==="$"){const c=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=c,n[4]=c,n[5]=c,n}if(s.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const a=e0e(s);if(a){const[c,u]=a,f=s.charCodeAt(c+1);if(f===45){if(c+2<s.length&&s.charCodeAt(c+2)===36){const h=c+3,m=u;if(h<m)return n[0]=3,n[1]=t+c,n[2]=t+h,n[3]=t+m,n[4]=t+u+1,n[5]=o,n}}else if(f===36){const h=c+1,m=c+2;return m===u?(n[0]=2,n[1]=t+c,n[2]=t+h,n[3]=t+m,n[4]=t+u+1,n[5]=e.length,n):(n[0]=1,n[1]=t+c,n[2]=t+m,n[3]=t+u,n[4]=t+u+1,n[5]=o,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function ib(e,t,n,r,o,s,a){a?.(n);let c=r;{const u=n.fullPath??n.from,f=u.length,h=n.options?.caseSensitive??e,m=n.options?.params?.parse??n.options?.parseParams;for(;c<f;){const v=G7(u,c,t);let C;const b=c,E=v[5];switch(c=E+1,s++,v[0]){case 0:{const x=u.substring(v[2],v[3]);if(h){const I=o.static?.get(x);if(I)C=I;else{o.static??=new Map;const R=Ba(n.fullPath??n.from);R.parent=o,R.depth=s,C=R,o.static.set(x,R)}}else{const I=x.toLowerCase(),R=o.staticInsensitive?.get(I);if(R)C=R;else{o.staticInsensitive??=new Map;const O=Ba(n.fullPath??n.from);O.parent=o,O.depth=s,C=O,o.staticInsensitive.set(I,O)}}break}case 1:{const x=u.substring(b,v[1]),I=u.substring(v[4],E),R=h&&!!(x||I),O=x?R?x:x.toLowerCase():void 0,D=I?R?I:I.toLowerCase():void 0,N=!m&&o.dynamic?.find(M=>!M.parse&&M.caseSensitive===R&&M.prefix===O&&M.suffix===D);if(N)C=N;else{const M=Ex(1,n.fullPath??n.from,R,O,D);C=M,M.depth=s,M.parent=o,o.dynamic??=[],o.dynamic.push(M)}break}case 3:{const x=u.substring(b,v[1]),I=u.substring(v[4],E),R=h&&!!(x||I),O=x?R?x:x.toLowerCase():void 0,D=I?R?I:I.toLowerCase():void 0,N=!m&&o.optional?.find(M=>!M.parse&&M.caseSensitive===R&&M.prefix===O&&M.suffix===D);if(N)C=N;else{const M=Ex(3,n.fullPath??n.from,R,O,D);C=M,M.parent=o,M.depth=s,o.optional??=[],o.optional.push(M)}break}case 2:{const x=u.substring(b,v[1]),I=u.substring(v[4],E),R=h&&!!(x||I),O=x?R?x:x.toLowerCase():void 0,D=I?R?I:I.toLowerCase():void 0,N=Ex(2,n.fullPath??n.from,R,O,D);C=N,N.parent=o,N.depth=s,o.wildcard??=[],o.wildcard.push(N)}}o=C}if(m&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const v=Ba(n.fullPath??n.from);v.kind=W7,v.parent=o,s++,v.depth=s,o.pathless??=[],o.pathless.push(v),o=v}const g=(n.path||!n.children)&&!n.isRoot;if(g&&u.endsWith("/")){const v=Ba(n.fullPath??n.from);v.kind=ji,v.parent=o,s++,v.depth=s,o.index=v,o=v}o.parse=m??null,o.priority=n.options?.params?.priority??0,g&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const u of n.children)ib(e,t,u,c,o,s,a)}function wx(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Di(e){if(e.pathless)for(const t of e.pathless)Di(t);if(e.static)for(const t of e.static.values())Di(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Di(t);if(e.dynamic?.length){e.dynamic.sort(wx);for(const t of e.dynamic)Di(t)}if(e.optional?.length){e.optional.sort(wx);for(const t of e.optional)Di(t)}if(e.wildcard?.length){e.wildcard.sort(wx);for(const t of e.wildcard)Di(t)}}function Ba(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function Ex(e,t,n,r,o){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:o}}function t0e(e,t){const n=Ba("/"),r=new Uint16Array(6);for(const o of e)ib(!1,r,o,1,n,0);Di(n),t.masksTree=n,t.flatCache=Xf(1e3)}function n0e(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=uT(e,t.masksTree);return t.flatCache.set(e,r),r}function r0e(e,t,n,r,o){e||="/",r||="/";const s=t?`case\0${e}`:e;let a=o.singleCache.get(s);return a||(a=Ba("/"),ib(t,new Uint16Array(6),{from:e},1,a,0),o.singleCache.set(s,a)),uT(r,a,n)}function o0e(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,o=t.matchCache.get(r);if(o!==void 0)return o;e||="/";let s;try{s=uT(e,t.segmentTree,n)}catch(a){if(a instanceof URIError)s=null;else throw a}return s&&(s.branch=Z7(s.route)),t.matchCache.set(r,s),s}function s0e(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function i0e(e,t=!1,n){const r=Ba(e.fullPath),o=new Uint16Array(6),s={},a={};let c=0;return ib(t,o,e,1,r,0,u=>{if(n?.(u,c),u.id in s&&Us(),s[u.id]=u,c!==0&&u.path){const f=s0e(u.fullPath);(!a[f]||u.fullPath.endsWith("/"))&&(a[f]=u)}c++}),Di(r),{processedTree:{segmentTree:r,singleCache:Xf(1e3),matchCache:Xf(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:a}}function uT(e,t,n=!1){const r=e.split("/"),o=l0e(e,r,t,n);if(!o)return null;const[s]=K7(e,r,o);return{route:o.node.route,rawParams:s}}function K7(e,t,n){const r=a0e(n.node);let o=null;const s=Object.create(null);let a=n.extract?.part??0,c=n.extract?.node??0,u=n.extract?.path??0,f=n.extract?.segment??0;for(;c<r.length;a++,c++,u++,f++){const h=r[c];if(h.kind===ji)break;if(h.kind===W7){f--,a--,u--;continue}const m=t[a],g=u;if(m&&(u+=m.length),h.kind===1){o??=n.node.fullPath.split("/");const v=o[f],C=h.prefix?.length??0;if(v.charCodeAt(C)===123){const b=h.suffix?.length??0,E=v.substring(C+2,v.length-b-1),x=m.substring(C,m.length-b);s[E]=decodeURIComponent(x)}else{const b=v.substring(1);s[b]=decodeURIComponent(m)}}else if(h.kind===3){if(n.skipped&1<<c){a--,u=g-1;continue}o??=n.node.fullPath.split("/");const v=o[f],C=h.prefix?.length??0,b=h.suffix?.length??0,E=v.substring(C+3,v.length-b-1),x=h.suffix||h.prefix?m.substring(C,m.length-b):m;x&&(s[E]=decodeURIComponent(x))}else if(h.kind===2){const v=h,C=e.substring(g+(v.prefix?.length??0),e.length-(v.suffix?.length??0)),b=decodeURIComponent(C);s["*"]=b,s._splat=b;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:a,node:c,path:u,segment:f}]}function Z7(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function a0e(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function l0e(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!Qf(t),s=o&&e!=="/",a=t.length-(o?1:0),c=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let u=null,f=null;for(;c.length;){const h=c.pop(),{node:m,index:g,skipped:v,depth:C,statics:b,dynamics:E,optionals:x}=h;let{extract:I,rawParams:R}=h;if(m.kind===2&&m.route&&!zm(f,h))continue;if(m.parse){if(!V4(e,t,h))continue;R=h.rawParams,I=h.extract}r&&m.route&&m.kind!==ji&&zm(u,h)&&(u=h);const O=g===a;if(O&&(m.route&&(!s||m.kind===ji||m.kind===2)&&zm(f,h)&&(f=h),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const D=O?void 0:t[g];let N;if(O&&m.index){const M={node:m.index,index:g,skipped:v,depth:C+1,statics:b,dynamics:E,optionals:x,extract:I,rawParams:R};let L=!0;if(m.index.parse&&(V4(e,t,M)||(L=!1)),L){if(!E&&!x&&!v&&c0e(b,a))return M;zm(f,M)&&(f=M)}}if(m.wildcard)for(let M=m.wildcard.length-1;M>=0;M--){const L=m.wildcard[M],{prefix:$,suffix:G}=L;if(!($&&(O||!(L.caseSensitive?D:N??=D.toLowerCase()).startsWith($)))){if(G){if(O)continue;const j=t.slice(g).join("/").slice(-G.length);if((L.caseSensitive?j:j.toLowerCase())!==G)continue}c.push({node:L,index:a,skipped:v,depth:C+1,statics:b,dynamics:E,optionals:x,extract:I,rawParams:R})}}if(m.optional){const M=v|1<<C,L=C+1;for(let $=m.optional.length-1;$>=0;$--){const G=m.optional[$];c.push({node:G,index:g,skipped:M,depth:L,statics:b,dynamics:E,optionals:x,extract:I,rawParams:R})}if(!O)for(let $=m.optional.length-1;$>=0;$--){const G=m.optional[$],{prefix:j,suffix:F}=G;if(j||F){const q=G.caseSensitive?D:N??=D.toLowerCase();if(j&&!q.startsWith(j)||F&&!q.endsWith(F))continue}c.push({node:G,index:g+1,skipped:v,depth:L,statics:b,dynamics:E,optionals:x+$m(a,g),extract:I,rawParams:R})}}if(!O&&m.dynamic&&D)for(let M=m.dynamic.length-1;M>=0;M--){const L=m.dynamic[M],{prefix:$,suffix:G}=L;if($||G){const j=L.caseSensitive?D:N??=D.toLowerCase();if($&&!j.startsWith($)||G&&!j.endsWith(G))continue}c.push({node:L,index:g+1,skipped:v,depth:C+1,statics:b,dynamics:E+$m(a,g),optionals:x,extract:I,rawParams:R})}if(!O&&m.staticInsensitive){const M=m.staticInsensitive.get(N??=D.toLowerCase());M&&c.push({node:M,index:g+1,skipped:v,depth:C+1,statics:b+$m(a,g),dynamics:E,optionals:x,extract:I,rawParams:R})}if(!O&&m.static){const M=m.static.get(D);M&&c.push({node:M,index:g+1,skipped:v,depth:C+1,statics:b+$m(a,g),dynamics:E,optionals:x,extract:I,rawParams:R})}if(m.pathless){const M=C+1;for(let L=m.pathless.length-1;L>=0;L--){const $=m.pathless[L];c.push({node:$,index:g,skipped:v,depth:M,statics:b,dynamics:E,optionals:x,extract:I,rawParams:R})}}}if(f)return f;if(r&&u){let h=u.index;for(let g=0;g<u.index;g++)h+=t[g].length;const m=h===e.length?"/":e.slice(h);return u.rawParams??=Object.create(null),u.rawParams["**"]=decodeURIComponent(m),u}return null}function $m(e,t){return 2**(e-t-1)}function c0e(e,t){return e===2**(t-1)-1}function V4(e,t,n){let r,o;try{[r,o]=K7(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=o,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function zm(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===ji)>(e.node.kind===ji)||t.node.kind===ji==(e.node.kind===ji)&&t.depth>e.depth))):!0}function Bg(e){return dT(e.filter(t=>t!==void 0).join("/"))}function dT(e){return e.replace(/\/{2,}/g,"/")}function Y7(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ds(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Q7(e){return Ds(Y7(e))}function Cv(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function u0e(e,t,n){return Cv(e,n)===Cv(t,n)}function d0e({base:e,to:t,trailingSlash:n="never",cache:r}){const o=t.startsWith("/"),s=!o&&t===".";let a;if(r){a=o?t:s?e:e+"\0"+t;const f=r.get(a);if(f)return f}let c;if(s)c=e.split("/");else if(o)c=t.split("/");else{for(c=e.split("/");c.length>1&&Qf(c)==="";)c.pop();const f=t.split("/");for(let h=0,m=f.length;h<m;h++){const g=f[h];g===""?h?h===m-1&&c.push(g):c=[g]:g===".."?c.pop():g==="."||c.push(g)}}c.length>1&&(Qf(c)===""?n==="never"&&c.pop():n==="always"&&c.push(""));const u=dT(c.join("/"))||"/";return a&&r&&r.set(a,u),u}function f0e(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),n=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return o=>o.replace(r,s=>t.get(s)??s)}function xx(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(o=>G4(o,n)).join("/"):G4(r,n)}function W4({path:e,params:t,decoder:n,...r}){let o=!1;const s=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:o};const a=e.length;let c=0,u,f="";for(;c<a;){const h=c;u=G7(e,h,u);const m=u[5];if(c=m+1,h===m)continue;const g=u[0];if(g===0){f+="/"+e.substring(h,m);continue}if(g===2){const v=t._splat;s._splat=v,s["*"]=v;const C=e.substring(h,u[1]),b=e.substring(u[4],m);if(!v){o=!0,(C||b)&&(f+="/"+C+b);continue}const E=xx("_splat",t,n);f+="/"+C+E+b;continue}if(g===1){const v=e.substring(u[2],u[3]);!o&&!(v in t)&&(o=!0),s[v]=t[v];const C=e.substring(h,u[1]),b=e.substring(u[4],m),E=xx(v,t,n)??"undefined";f+="/"+C+E+b;continue}if(g===3){const v=e.substring(u[2],u[3]),C=t[v];if(C==null)continue;s[v]=C;const b=e.substring(h,u[1]),E=e.substring(u[4],m),x=xx(v,t,n)??"";f+="/"+b+x+E;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:s,interpolatedPath:f||"/",isMissingParams:o}}function G4(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function Jn(e){return e?.isNotFound===!0}function h0e(){try{return sessionStorage}catch{return}}const p0e="tsr-scroll-restoration-v1_3",J7=h0e();function m0e(){try{return JSON.parse(J7?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function g0e(){try{J7?.setItem(p0e,JSON.stringify(kc))}catch{}}const kc=m0e(),K4="data-scroll-restoration-id",v0e=e=>e.state.__TSR_key||e.href;function y0e(e){const t=e.getAttribute(K4);if(t)return`[${K4}="${t}"]`;let n="",r=e,o;for(;o=r.parentNode;){let s=1,a=r;for(;a=a.previousElementSibling;)s++;const c=`${r.localName}:nth-child(${s})`;n=n?`${c} > ${n}`:c,r=o}return n}let jm=!1;const Hg="window";function dI(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function Z4(e){const t=new Set;for(const n of e){if(n===Hg)continue;const r=dI(n);r&&t.add(r)}return t}function b0e(e,t){const n=e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);const o=e.options.getScrollRestorationKey||v0e,s=new Set,a=c=>{const u=kc[c]||={};for(const f of s)f===document?u[Hg]={scrollX,scrollY}:f.isConnected&&(u[y0e(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,jm=!1,history.scrollRestoration="manual",document.addEventListener("scroll",c=>{jm||s.add(c.target)},!0),e.subscribe("onBeforeLoad",c=>{c.fromLocation&&a(o(c.fromLocation)),s.clear()}),addEventListener("pagehide",()=>{a(o(e.stores.resolvedLocation.get()??e.stores.location.get())),g0e()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",c=>{const u=e.options.scrollRestorationBehavior,f=e.options.scrollToTopSelectors,h=r.next,m=r.hash;let g;if(s.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const v=o(c.toLocation),C=c.fromLocation&&o(c.fromLocation);if(r.restoring&&C&&C!==v){const b=kc[C];if(b){let E=kc[v];for(const x in b){if(x===Hg){if(h)continue}else{const I=dI(x);if(!I||h&&f&&(g??=Z4(f),g.has(I)))continue}E||(E=kc[v]={}),E[x]??=b[x]}}}jm=!0;try{const b=c.toLocation.hash,E=c.toLocation.state.__hashScrollIntoViewOptions??!0;let x=!1;if(h){!b&&f&&(g??=Z4(f));const I=b&&E&&m,R=r.restoring?kc[v]:void 0;if(R)for(const O in R){const{scrollX:D,scrollY:N}=R[O];if(O===Hg){if(I)continue;scrollTo({top:N,left:D,behavior:u}),x=!0}else{const M=dI(O);M&&(M.scrollLeft=D,M.scrollTop=N,g?.delete(M))}}if(!b){const O={top:0,left:0,behavior:u};if(x||scrollTo(O),g)for(const D of g)D.scrollTo(O)}}!x&&b&&E&&document.getElementById(b)?.scrollIntoView(E)}finally{jm=!1}}))}function S0e(e,t=String){const n=new URLSearchParams;for(const r in e){const o=e[r];o!==void 0&&n.set(r,t(o))}return n.toString()}function _x(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function C0e(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[r,o]of t.entries()){const s=n[r];s==null?n[r]=_x(o):Array.isArray(s)?s.push(_x(o)):n[r]=[s,_x(o)]}return n}const w0e=x0e(JSON.parse),E0e=_0e(JSON.stringify,JSON.parse);function x0e(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=C0e(t);for(const r in n){const o=n[r];if(typeof o=="string")try{n[r]=e(o)}catch{}}return n}}function _0e(e,t){const n=typeof t=="function";function r(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const s=S0e(o,r);return s?`?${s}`:""}}const Za="__root__";function _l(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function vr(e){return e instanceof Response&&!!e.options}function I0e(e){return{input:({url:t})=>{for(const n of e)t=fI(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=X7(e[n],t);return t}}}function A0e(e){const t=Q7(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),o=`${r}/`;return{input:({url:s})=>{const a=e.caseSensitive?s.pathname:s.pathname.toLowerCase();return a===r?s.pathname="/":a.startsWith(o)&&(s.pathname=s.pathname.slice(n.length)),s},output:({url:s})=>(s.pathname=Bg(["/",t,s.pathname]),s)}}function fI(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function X7(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function R0e(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:o,init:s}=t,a=new Map,c=new Map,u=new Map,f=n(e.status),h=n(e.loadedAt),m=n(e.isLoading),g=n(e.isTransitioning),v=n(e.location),C=n(e.resolvedLocation),b=n(e.statusCode),E=n(e.redirect),x=n([]),I=n([]),R=n([]),O=r(()=>Ix(a,x.get())),D=r(()=>Ix(c,I.get())),N=r(()=>Ix(u,R.get())),M=r(()=>x.get()[0]),L=r(()=>x.get().some(ee=>a.get(ee)?.get().status==="pending")),$=r(()=>({locationHref:v.get().href,resolvedLocationHref:C.get()?.href,status:f.get()})),G=r(()=>({status:f.get(),loadedAt:h.get(),isLoading:m.get(),isTransitioning:g.get(),matches:O.get(),location:v.get(),resolvedLocation:C.get(),statusCode:b.get(),redirect:E.get()})),j=Xf(64);function F(ee){let me=j.get(ee);return me||(me=r(()=>{const ge=x.get();for(const Te of ge){const z=a.get(Te);if(z&&z.routeId===ee)return z.get()}}),j.set(ee,me)),me}const q={status:f,loadedAt:h,isLoading:m,isTransitioning:g,location:v,resolvedLocation:C,statusCode:b,redirect:E,matchesId:x,pendingIds:I,cachedIds:R,matches:O,pendingMatches:D,cachedMatches:N,firstId:M,hasPending:L,matchRouteDeps:$,matchStores:a,pendingMatchStores:c,cachedMatchStores:u,__store:G,getRouteMatchStore:F,setMatches:J,setPending:Se,setCached:V};J(e.matches),s?.(q);function J(ee){Ax(ee,a,x,n,o)}function Se(ee){Ax(ee,c,I,n,o)}function V(ee){Ax(ee,u,R,n,o)}return q}function Ix(e,t){const n=[];for(const r of t){const o=e.get(r);o&&n.push(o.get())}return n}function Ax(e,t,n,r,o){const s=e.map(c=>c.id),a=new Set(s);o(()=>{for(const c of t.keys())a.has(c)||t.delete(c);for(const c of e){const u=t.get(c.id);if(!u){const f=r(c);f.routeId=c.routeId,t.set(c.id,f);continue}u.routeId=c.routeId,u.get()!==c&&u.set(c)}Xbe(n.get(),s)||n.set(s)})}const hI=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},T0e=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),ab=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Ya=(e,t,n=!0)=>{const r={...e.router.options.context??{}},o=n?t:t-1;for(let s=0;s<=o;s++){const a=e.matches[s];if(!a)continue;const c=e.router.getMatch(a.id);c&&Object.assign(r,c.__routeContext,c.__beforeLoadContext)}return r},Y4=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(a=>a.routeId===e.router.routeTree.id),o=r>=0?r:0;let s=n?e.matches.findIndex(a=>a.routeId===n):e.firstBadMatchIndex??e.matches.length-1;s<0&&(s=o);for(let a=s;a>=0;a--){const c=e.matches[a];if(e.router.looseRoutesById[c.routeId].options.notFoundComponent)return a}return n?s:o},Bi=(e,t,n)=>{if(!(!vr(n)&&!Jn(n)))throw vr(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:vr(n)?"redirected":Jn(n)?"notFound":r.status==="pending"?"success":r.status,context:Ya(e,t.index),isFetching:!1,error:n})),Jn(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),vr(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},ej=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Q4=(e,t,n)=>{const r=Ya(e,n);e.updateMatch(t,o=>({...o,context:r}))},ef=(e,t,n)=>{const{id:r,routeId:o}=e.matches[t],s=e.router.looseRoutesById[o];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,Bi(e,e.router.getMatch(r),n);try{s.options.onError?.(n)}catch(a){n=a,Bi(e,e.router.getMatch(r),n)}e.updateMatch(r,a=>(a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,a._nonReactive.loadPromise?.resolve(),{...a,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!vr(n)&&!Jn(n)&&(e.serialError??=n)},tj=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!ab(e,t)&&(n.options.loader||n.options.beforeLoad||rj(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){const s=setTimeout(()=>{hI(e)},o);r._nonReactive.pendingTimeout=s}},O0e=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;tj(e,t,n,r);const o=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&Bi(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},M0e=(e,t,n,r)=>{const o=e.router.getMatch(t);let s=o._nonReactive.loadPromise;o._nonReactive.loadPromise=cu(()=>{s?.resolve(),s=void 0});const{paramsError:a,searchError:c}=o;a&&ef(e,n,a),c&&ef(e,n,c),tj(e,t,r,o);const u=new AbortController;let f=!1;const h=()=>{f||(f=!0,e.updateMatch(t,O=>({...O,isFetching:"beforeLoad",fetchCount:O.fetchCount+1,abortController:u})))},m=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,O=>({...O,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{h(),m()});return}o._nonReactive.beforeLoadPromise=cu();const g={...Ya(e,n,!1),...o.__routeContext},{search:v,params:C,cause:b}=o,E=ab(e,t),x={search:v,abortController:u,params:C,preload:E,context:g,location:e.location,navigate:O=>e.router.navigate({...O,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:E?"preload":b,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},I=O=>{if(O===void 0){e.router.batch(()=>{h(),m()});return}(vr(O)||Jn(O))&&(h(),ef(e,n,O)),e.router.batch(()=>{h(),e.updateMatch(t,D=>({...D,__beforeLoadContext:O})),m()})};let R;try{if(R=r.options.beforeLoad(x),Jf(R))return h(),R.catch(O=>{ef(e,n,O)}).then(I)}catch(O){h(),ef(e,n,O)}I(R)},P0e=(e,t)=>{const{id:n,routeId:r}=e.matches[t],o=e.router.looseRoutesById[r],s=()=>c(),a=()=>M0e(e,n,t,o),c=()=>{if(ej(e,n))return;const u=O0e(e,n,o);return Jf(u)?u.then(a):a()};return s()},N0e=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(o),n.options.scripts?.(o),n.options.headers?.(o)]).then(([s,a,c])=>({meta:s?.meta,links:s?.links,headScripts:s?.scripts,headers:c,scripts:a,styles:s?.styles}))},nj=(e,t,n,r,o)=>{const s=t[r-1],{params:a,loaderDeps:c,abortController:u,cause:f}=e.router.getMatch(n),h=Ya(e,r),m=ab(e,n);return{params:a,deps:c,preload:!!m,parentMatchPromise:s,abortController:u,context:h,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:m?"preload":f,route:o,...e.router.options.additionalContext}},J4=async(e,t,n,r,o)=>{try{const s=e.router.getMatch(n);try{(!(H7??e.router.isServer)||s.ssr===!0)&&eh(o);const a=o.options.loader,c=typeof a=="function"?a:a?.handler,u=c?.(nj(e,t,n,r,o)),f=!!c&&Jf(u);if((f||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(n,m=>({...m,isFetching:"loader"})),c){const m=f?await u:u;Bi(e,e.router.getMatch(n),m),m!==void 0&&e.updateMatch(n,g=>({...g,loaderData:m}))}o._lazyPromise&&await o._lazyPromise;const h=s._nonReactive.minPendingPromise;h&&await h,o._componentsPromise&&await o._componentsPromise,e.updateMatch(n,m=>({...m,error:void 0,context:Ya(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let c=a;if(c?.name==="AbortError"){if(s.abortController.signal.aborted){s._nonReactive.loaderPromise?.resolve(),s._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,f=>({...f,status:f.status==="pending"?"success":f.status,isFetching:!1,context:Ya(e,r)}));return}const u=s._nonReactive.minPendingPromise;u&&await u,Jn(a)&&await o.options.notFoundComponent?.preload?.(),Bi(e,e.router.getMatch(n),a);try{o.options.onError?.(a)}catch(f){c=f,Bi(e,e.router.getMatch(n),f)}!vr(c)&&!Jn(c)&&await eh(o,["errorComponent"]),e.updateMatch(n,f=>({...f,error:c,context:Ya(e,r),status:"error",isFetching:!1}))}}catch(s){const a=e.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),Bi(e,a,s)}},k0e=async(e,t,n)=>{async function r(v,C,b,E,x){const I=Date.now()-C.updatedAt,R=v?x.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:x.options.staleTime??e.router.options.defaultStaleTime??0,O=x.options.shouldReload,D=typeof O=="function"?O(nj(e,t,o,n,x)):O,{status:N,invalid:M}=E,L=I>=R&&(!!e.forceStaleReload||E.cause==="enter"||b!==void 0&&b!==E.id);a=N==="success"&&(M||(D??L)),v&&x.options.preload===!1||(a&&!e.sync&&h?(c=!0,(async()=>{try{await J4(e,t,o,n,x);const $=e.router.getMatch(o);$._nonReactive.loaderPromise?.resolve(),$._nonReactive.loadPromise?.resolve(),$._nonReactive.loaderPromise=void 0,$._nonReactive.loadPromise=void 0}catch($){vr($)&&await e.router.navigate($.options)}})()):N!=="success"||a?await J4(e,t,o,n,x):Q4(e,o,n))}const{id:o,routeId:s}=e.matches[n];let a=!1,c=!1;const u=e.router.looseRoutesById[s],f=u.options.loader,h=((typeof f=="function"?void 0:f?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(ej(e,o)){if(!e.router.getMatch(o))return e.matches[n];Q4(e,o,n)}else{const v=e.router.getMatch(o),C=e.router.stores.matchesId.get()[n],b=(C&&e.router.stores.matchStores.get(C)||null)?.routeId===s?C:e.router.stores.matches.get().find(x=>x.routeId===s)?.id,E=ab(e,o);if(v._nonReactive.loaderPromise){if(v.status==="success"&&!e.sync&&!v.preload&&h)return v;await v._nonReactive.loaderPromise;const x=e.router.getMatch(o),I=x._nonReactive.error||x.error;I&&Bi(e,x,I),x.status==="pending"&&await r(E,v,b,x,u)}else{const x=E&&!e.router.stores.matchStores.has(o),I=e.router.getMatch(o);I._nonReactive.loaderPromise=cu(),x!==I.preload&&e.updateMatch(o,R=>({...R,preload:x})),await r(E,v,b,I,u)}}const m=e.router.getMatch(o);c||(m._nonReactive.loaderPromise?.resolve(),m._nonReactive.loadPromise?.resolve(),m._nonReactive.loadPromise=void 0),clearTimeout(m._nonReactive.pendingTimeout),m._nonReactive.pendingTimeout=void 0,c||(m._nonReactive.loaderPromise=void 0),m._nonReactive.dehydrated=void 0;const g=c?m.isFetching:!1;return g!==m.isFetching||m.invalid!==!1?(e.updateMatch(o,v=>({...v,isFetching:g,invalid:!1})),e.router.getMatch(o)):m};async function X4(e){const t=e,n=[];T0e(t.router)&&hI(t);let r;for(let g=0;g<t.matches.length;g++){try{const v=P0e(t,g);Jf(v)&&await v}catch(v){if(vr(v))throw v;if(Jn(v))r=v;else if(!t.preload)throw v;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const o=t.firstBadMatchIndex??t.matches.length,s=r&&!t.preload?Y4(t,r):void 0,a=r&&t.preload?0:s!==void 0?Math.min(s+1,o):o;let c,u;for(let g=0;g<a;g++)n.push(k0e(t,n,g));try{await Promise.all(n)}catch{const g=await Promise.allSettled(n);for(const v of g){if(v.status!=="rejected")continue;const C=v.reason;if(vr(C))throw C;Jn(C)?c??=C:u??=C}if(u!==void 0)throw u}const f=c??(r&&!t.preload?r:void 0);let h=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!f&&r&&t.preload)return t.matches;if(f){const g=Y4(t,f);g===void 0&&Us();const v=t.matches[g],C=t.router.looseRoutesById[v.routeId],b=t.router.options?.defaultNotFoundComponent;!C.options.notFoundComponent&&b&&(C.options.notFoundComponent=b),f.routeId=v.routeId;const E=v.routeId===t.router.routeTree.id;t.updateMatch(v.id,x=>({...x,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),h=g,await eh(C,["notFoundComponent"])}else if(!t.preload){const g=t.matches[0];g.globalNotFound||t.router.getMatch(g.id)?.globalNotFound&&t.updateMatch(g.id,v=>({...v,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const g=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await eh(g,["errorComponent"])}for(let g=0;g<=h;g++){const{id:v,routeId:C}=t.matches[g],b=t.router.looseRoutesById[C];try{const E=N0e(t,v,b);if(E){const x=await E;t.updateMatch(v,I=>({...I,...x}))}}catch(E){console.error(`Error executing head for route ${C}:`,E)}}const m=hI(t);if(Jf(m)&&await m,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function eU(e,t){const n=t.map(r=>e.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function eh(e,t=qg){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:o,...s}=r.options;Object.assign(e.options,s),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===qg?(()=>{if(e._componentsPromise===void 0){const r=eU(e,qg);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():eU(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function rj(e){for(const t of qg)if(e.options[t]?.preload)return!0;return!1}const qg=["component","errorComponent","pendingComponent","notFoundComponent"];var Wi="__TSR_index",tU="popstate",nU="beforeunload";function D0e(e){let t=e.getLocation();const n=new Set,r=a=>{t=e.getLocation(),n.forEach(c=>c({location:t,action:a}))},o=a=>{e.notifyOnIndexChange??!0?r(a):t=e.getLocation()},s=async({task:a,navigateOpts:c,...u})=>{if(c?.ignoreBlocker??!1){a();return}const f=e.getBlockers?.()??[],h=u.type==="PUSH"||u.type==="REPLACE";if(typeof document<"u"&&f.length&&h)for(const m of f){const g=wv(u.path,u.state);if(await m.blockerFn({currentLocation:t,nextLocation:g,action:u.type})){e.onBlocked?.();return}}a()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,c,u)=>{const f=t.state[Wi];c=rU(f+1,c),s({task:()=>{e.pushState(a,c),r({type:"PUSH"})},navigateOpts:u,type:"PUSH",path:a,state:c})},replace:(a,c,u)=>{const f=t.state[Wi];c=rU(f,c),s({task:()=>{e.replaceState(a,c),r({type:"REPLACE"})},navigateOpts:u,type:"REPLACE",path:a,state:c})},go:(a,c)=>{s({task:()=>{e.go(a),o({type:"GO",index:a})},navigateOpts:c,type:"GO"})},back:a=>{s({task:()=>{e.back(a?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{s({task:()=>{e.forward(a?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>t.state[Wi]!==0,createHref:a=>e.createHref(a),block:a=>{if(!e.setBlockers)return()=>{};const c=e.getBlockers?.()??[];return e.setBlockers([...c,a]),()=>{const u=e.getBlockers?.()??[];e.setBlockers?.(u.filter(f=>f!==a))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function rU(e,t){t||(t={});const n=fT();return{...t,key:n,__TSR_key:n,[Wi]:e}}function L0e(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let o=[];const s=()=>o,a=L=>o=L,c=(L=>L),u=(()=>wv(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const L=fT();t.history.replaceState({[Wi]:0,key:L,__TSR_key:L},"")}let f=u(),h,m=!1,g=!1,v=!1,C=!1;const b=()=>f;let E,x;const I=()=>{E&&(M._ignoreSubscribers=!0,(E.isPush?t.history.pushState:t.history.replaceState)(E.state,"",E.href),M._ignoreSubscribers=!1,E=void 0,x=void 0,h=void 0)},R=(L,$,G)=>{const j=c($);x||(h=f),f=wv($,G),E={href:j,state:G,isPush:E?.isPush||L==="push"},x||(x=Promise.resolve().then(()=>I()))},O=L=>{f=u(),M.notify({type:L})},D=async()=>{if(g){g=!1;return}const L=u(),$=L.state[Wi]-f.state[Wi],G=$===1,j=$===-1,F=!G&&!j||m;m=!1;const q=F?"GO":j?"BACK":"FORWARD",J=F?{type:"GO",index:$}:{type:j?"BACK":"FORWARD"};if(v)v=!1;else{const Se=s();if(typeof document<"u"&&Se.length){for(const V of Se)if(await V.blockerFn({currentLocation:f,nextLocation:L,action:q})){g=!0,t.history.go(1),M.notify(J);return}}}f=u(),M.notify(J)},N=L=>{if(C){C=!1;return}let $=!1;const G=s();if(typeof document<"u"&&G.length)for(const j of G){const F=j.enableBeforeUnload??!0;if(F===!0){$=!0;break}if(typeof F=="function"&&F()===!0){$=!0;break}}if($)return L.preventDefault(),L.returnValue=""},M=D0e({getLocation:b,getLength:()=>t.history.length,pushState:(L,$)=>R("push",L,$),replaceState:(L,$)=>R("replace",L,$),back:L=>(L&&(v=!0),C=!0,t.history.back()),forward:L=>{L&&(v=!0),C=!0,t.history.forward()},go:L=>{m=!0,t.history.go(L)},createHref:L=>c(L),flush:I,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(nU,N,{capture:!0}),t.removeEventListener(tU,D)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:s,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(nU,N,{capture:!0}),t.addEventListener(tU,D),t.history.pushState=function(...L){const $=n.apply(t.history,L);return M._ignoreSubscribers||O("PUSH"),$},t.history.replaceState=function(...L){const $=r.apply(t.history,L);return M._ignoreSubscribers||O("REPLACE"),$},M}function U0e(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function wv(e,t){const n=U0e(e),r=n.indexOf("#"),o=n.indexOf("?"),s=fT();return{href:n,pathname:n.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:n.length),hash:r>-1?n.substring(r):"",search:o>-1?n.slice(o,r===-1?void 0:r):"",state:t||{[Wi]:0,key:s,__TSR_key:s}}}function fT(){return(Math.random()+1).toString(36).substring(7)}function Qc(e,t){const n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var F0e=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=n=>n(),this.update=n=>{const r=this.options,o=this.basepath??r?.basepath??"/",s=this.basepath===void 0,a=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=f0e(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=L0e()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let h;this.resolvePathCache=Xf(1e3),h=this.buildRouteTree(),this.setRoutes(h)}if(!this.stores&&this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=R0e(z0e(this.latestLocation),h),b0e(this)}let c=!1;const u=this.options.basepath??"/",f=this.options.rewrite;if(s||o!==u||a!==f){this.basepath=u;const h=[],m=Q7(u);m&&m!=="/"&&h.push(A0e({basepath:u})),f&&h.push(f),this.rewrite=h.length===0?void 0:h.length===1?h[0]:I0e(h),this.history&&this.updateLatestLocation(),c=!0}c&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=i0e(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&t0e(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const o={eventType:n,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const o=({pathname:u,search:f,hash:h,href:m,state:g})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(u)){const x=this.options.parseSearch(f),I=this.options.stringifySearch(x);return{href:u+I+h,publicHref:u+I+h,pathname:Xd(u).path,external:!1,searchStr:I,search:ka(r?.search,x),hash:Xd(h.slice(1)).path,state:ja(r?.state,g)}}const v=new URL(m,this.origin),C=fI(this.rewrite,v),b=this.options.parseSearch(C.search),E=this.options.stringifySearch(b);return C.search=E,{href:C.href.replace(C.origin,""),publicHref:m,pathname:Xd(C.pathname).path,external:!!this.rewrite&&C.origin!==this.origin,searchStr:E,search:ka(r?.search,b),hash:Xd(C.hash.slice(1)).path,state:ja(r?.state,g)}},s=o(n),{__tempLocation:a,__tempKey:c}=s.state;if(a&&(!c||c===this.tempLocationKey)){const u=o(a);return u.state.key=s.state.key,u.state.__TSR_key=s.state.__TSR_key,delete u.state.__tempLocation,{...u,maskedLocation:s}}return s},this.resolvePathWithBase=(n,r)=>d0e({base:n,to:r.includes("//")?dT(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},o):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>j0e({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{if(this.stores.pendingMatchStores.has(n))return;const r=this.stores.matchStores.get(n)?.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(s={})=>{const a=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(a);s.from;const u=s.unsafeRelative==="path"?a.pathname:s.from??c.fullPath,f=s.to?`${s.to}`:void 0,h=c.search,m=Object.assign(Object.create(null),c.params),g=f?.charCodeAt(0)===47?"/":this.resolvePathWithBase(u,"."),v=f?this.resolvePathWithBase(g,f):g,C=s.params===!1||s.params===null?Object.create(null):(s.params??!0)===!0?m:Object.assign(m,za(s.params,m)),b=this.routesByPath[Ds(v)];let E;if(b)E=this.getRouteBranch(b);else if(v.includes("$"))E=[];else{const j=this.getMatchedRoutes(v);E=j.matchedRoutes,this.options.notFoundRoute&&(!j.foundRoute||j.foundRoute.path!=="/"&&j.routeParams["**"])&&(E=[...E,this.options.notFoundRoute])}if(E.length&&V7(C))for(const j of E){const F=j.options.params?.stringify??j.options.stringifyParams;if(F)try{Object.assign(C,F(C))}catch{}}const x=n.leaveParams?v:Xd(W4({path:v,params:C,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let I=h;if(n._includeValidateSearch&&this.options.search?.strict){const j={};E.forEach(F=>{if(F.options.validateSearch)try{Object.assign(j,Vg(F.options.validateSearch,{...j,...I}))}catch{}}),I=j}I=B0e({search:I,dest:s,destRoutes:E,_includeValidateSearch:n._includeValidateSearch}),I=ka(h,I);const R=this.options.stringifySearch(I),O=s.hash===!0?a.hash:s.hash?za(s.hash,a.hash):void 0,D=O?`#${O}`:"";let N=s.state===!0?a.state:s.state?za(s.state,a.state):{};N=ja(a.state,N);const M=`${x}${R}${D}`;let L,$,G=!1;if(this.rewrite){const j=new URL(M,this.origin),F=X7(this.rewrite,j);L=j.href.replace(j.origin,""),F.origin!==this.origin?($=F.href,G=!0):$=F.pathname+F.search+F.hash}else L=Jbe(M),$=L;return{publicHref:$,href:L,pathname:x,search:I,searchStr:R,state:N,hash:O??"",external:G,unmaskOnReload:s.unmaskOnReload}},o=(s={},a)=>{const c=r(s);let u=a?r(a):void 0;if(!u){const f=Object.create(null);if(this.options.routeMasks){const h=n0e(c.pathname,this.processedTree);if(h){Object.assign(f,h.rawParams);const{from:m,params:g,...v}=h.route,C=g===!1||g===null?Object.create(null):(g??!0)===!0?f:Object.assign(f,za(g,f));a={from:n.from,...v,params:C},u=r(a)}}}return u&&(c.maskedLocation=u),c};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...o})=>{let s;const a=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(m=>{o.state[m]=this.latestLocation.state[m]});const h=Ka(o.state,this.latestLocation.state);return f.forEach(m=>{delete o.state[m]}),h},c=Ds(this.latestLocation.href)===Ds(o.href);let u=this.commitLocationPromise;if(this.commitLocationPromise=cu(()=>{u?.resolve(),u=void 0}),c&&a())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,...m}=o;f&&(m={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,s=o.replace?"REPLACE":"PUSH",this.history[s==="REPLACE"?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:r})}return this._scroll.next=o.resetScroll??!0,this.history.subscribers.size||this.load(s?{action:{type:s}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:o,viewTransition:s,ignoreBlocker:a,href:c,...u}={})=>{if(c){const m=this.history.location.state.__TSR_index,g=wv(c,{__TSR_index:n?m:m+1}),v=new URL(g.pathname,this.origin);u.to=fI(this.rewrite,v).pathname,u.search=this.options.parseSearch(g.search),u.hash=g.hash.slice(1)}const f=this.buildLocation({...u,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const h=this.commitLocation({...f,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:a});return queueMicrotask(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),h},this.navigate=async({to:n,reloadDocument:r,href:o,publicHref:s,...a})=>{let c=!1;if(o)try{new URL(`${o}`),c=!0}catch{}if(c&&!r&&(r=!0),r){if(n!==void 0||!o){const f=this.buildLocation({to:n,...a});o=o??f.publicHref,s=s??f.publicHref}const u=!c&&s?s:o;if(Sv(u,this.protocolAllowlist))return;if(!a.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const h of f)if(h?.blockerFn&&await h.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(u):window.location.href=u;return}return this.buildAndCommitLocation({...a,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(o=>!n.some(s=>s.id===o.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{const r=n?.action?.type;let o,s,a;const c=this.stores.resolvedLocation.get()??this.stores.location.get();for(a=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad(),r&&(this._scroll.hash=r==="PUSH"||r==="REPLACE");const h=this.latestLocation,m=Qc(h,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...m}),this.emit({type:"onBeforeLoad",...m}),await X4({router:this,sync:n?.sync,forceStaleReload:c.href===h.href,matches:this.stores.pendingMatches.get(),location:h,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let g=null,v=null,C=null,b=null;this.batch(()=>{const E=this.stores.pendingMatches.get(),x=E.length,I=this.stores.matches.get();g=x?I.filter(D=>!this.stores.pendingMatchStores.has(D.id)):null;const R=new Set;for(const D of this.stores.pendingMatchStores.values())D.routeId&&R.add(D.routeId);const O=new Set;for(const D of this.stores.matchStores.values())D.routeId&&O.add(D.routeId);v=x?I.filter(D=>!R.has(D.routeId)):null,C=x?E.filter(D=>!O.has(D.routeId)):null,b=x?E.filter(D=>O.has(D.routeId)):I,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),x&&(this.stores.setMatches(E),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...g.filter(D=>D.status!=="error"&&D.status!=="notFound"&&D.status!=="redirected")]),this.clearExpiredCache())});for(const[E,x]of[[v,"onLeave"],[C,"onEnter"],[b,"onStay"]])if(E)for(const I of E)this.looseRoutesById[I.routeId].options[x]?.(I)})})}})}catch(h){vr(h)?(o=h,this.navigate({...o.options,replace:!0,ignoreBlocker:!0})):Jn(h)&&(s=h);const m=o?o.status:s?404:this.stores.matches.get().some(g=>g.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(m),this.stores.redirect.set(o)})}this.latestLoadPromise===a&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.stores.matches.get().some(f=>f.status==="error")&&(u=500),u!==void 0&&this.stores.statusCode.set(u)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const s=this.latestLocation,a=this.stores.resolvedLocation.get(),c=typeof r.types=="function"?r.types(Qc(s,a)):r.types;if(c===!1){n();return}o={update:n,types:c}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStores.get(n);if(o){o.set(r);return}const s=this.stores.matchStores.get(n);if(s){s.set(r);return}const a=this.stores.cachedMatchStores.get(n);if(a){const c=r(a.get());c.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(u=>u.filter(f=>f!==n)):a.set(c)}})},this.getMatch=n=>this.stores.cachedMatchStores.get(n)?.get()??this.stores.pendingMatchStores.get(n)?.get()??this.stores.matchStores.get(n)?.get(),this.invalidate=n=>{const r=o=>n?.filter?.(o)??!0?{...o,invalid:!0,...n?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const o=n.options._builtLocation??this.buildLocation(n.options),s=this.getParsedLocationHref(o);n.options.href=s,n.headers.set("Location",s)}else if(r)try{const o=new URL(r);if(this.origin&&o.origin===this.origin){const s=o.pathname+o.search+o.hash;n.options.href=s,n.headers.set("Location",s)}}catch{}if(n.options.href&&!n.options._builtLocation&&Sv(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!r(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=o=>{const s=this.looseRoutesById[o.routeId];if(!s.options.loader)return!0;const a=(o.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:n-o.updatedAt>=a};this.clearCache({filter:r})},this.loadRouteChunk=eh,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let o=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const s=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...s,...this.stores.cachedIds.get()]),c=o.filter(u=>!a.has(u.id));if(c.length){const u=this.stores.cachedMatches.get();this.stores.setCached([...u,...c])}try{return o=await X4({router:this,matches:o,location:r,preload:!0,updateMatch:(u,f)=>{s.has(u)?o=o.map(h=>h.id===u?f(h):h):this.updateMatch(u,f)}}),o}catch(u){if(vr(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:r});Jn(u)||console.error(u);return}},this.matchRoute=(n,r)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},s=this.buildLocation(o);if(r?.pending&&this.stores.status.get()!=="pending")return!1;const a=(r?.pending===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=r0e(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!c||n.params&&!Ka(c.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Ka(a.search,s.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??E0e,parseSearch:e.parseSearch??w0e,protocolAllowlist:e.protocolAllowlist??Qbe}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=Z7(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:o}=n;let{matchedRoutes:s}=n,a=!1;(r?r.path!=="/"&&o["**"]:Ds(e.pathname))&&(this.options.notFoundRoute?s=[...s,this.options.notFoundRoute]:a=!0);const c=a?q0e(this.options.notFoundMode,s):void 0,u=new Array(s.length),f=new Map;for(const h of this.stores.matchStores.values())h.routeId&&f.set(h.routeId,h.get());for(let h=0;h<s.length;h++){const m=s[h],g=u[h-1];let v,C,b;{const F=g?.search??e.search,q=g?._strictSearch??void 0;try{const J=Vg(m.options.validateSearch,{...F})??void 0;v={...F,...J},C={...q,...J},b=void 0}catch(J){let Se=J;if(J instanceof Ev||(Se=new Ev(J.message,{cause:J})),t?.throwOnError)throw Se;v=F,C={},b=Se}}const E=m.options.loaderDeps?.({search:v})??"",x=E?JSON.stringify(E):"",{interpolatedPath:I,usedParams:R}=W4({path:m.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),O=m.id+I+x,D=this.getMatch(O),N=f.get(m.id),M=D?._strictParams??R;let L;if(!D)try{oU(m,M)}catch(F){if(Jn(F)||vr(F)?L=F:L=new $0e(F.message,{cause:F}),t?.throwOnError)throw L}Object.assign(o,M);const $=N?"stay":"enter";let G;if(D)G={...D,cause:$,params:N?.params??o,_strictParams:M,search:ka(N?N.search:D.search,v),_strictSearch:C};else{const F=m.options.loader||m.options.beforeLoad||m.lazyFn||rj(m)?"pending":"success";G={id:O,ssr:m.options.ssr,index:h,routeId:m.id,params:N?.params??o,_strictParams:M,pathname:I,updatedAt:Date.now(),search:N?ka(N.search,v):v,_strictSearch:C,searchError:void 0,status:F,isFetching:!1,error:void 0,paramsError:L,__routeContext:void 0,_nonReactive:{loadPromise:cu()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:$,loaderDeps:N?ja(N.loaderDeps,E):E,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}t?.preload||(G.globalNotFound=c===m.id),G.searchError=b;const j=this.getParentContext(g);G.context={...j,...G.__routeContext,...G.__beforeLoadContext},u[h]=G}for(let h=0;h<u.length;h++){const m=u[h],g=this.looseRoutesById[m.routeId],v=this.getMatch(m.id),C=f.get(m.routeId);if(m.params=C?ka(C.params,o):o,!v){const b=u[h-1],E=this.getParentContext(b);if(g.options.context){const x={deps:m.loaderDeps,params:m.params,context:E??{},location:e,navigate:I=>this.navigate({...I,_fromLocation:e}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:u,routeId:g.id};m.__routeContext=g.options.context(x)??void 0}m.context={...E,...m.__routeContext,...m.__beforeLoadContext}}}return u}matchRoutesLightweight(e){const t=Qf(this.stores.matchesId.get()),n=this.lightweightCache.get(e);if(n&&n[0]===t)return n[1];const{matchedRoutes:r,routeParams:o}=this.getMatchedRoutes(e.pathname),s=Qf(r),a={...e.search};for(const m of r)try{Object.assign(a,Vg(m.options.validateSearch,a))}catch{}const c=t&&this.stores.matchStores.get(t)?.get(),u=c&&c.routeId===s.id&&c.pathname===e.pathname;let f;if(u)f=c.params;else{const m=Object.assign(Object.create(null),o);for(const g of r)try{oU(g,m)}catch{}f=m}const h={matchedRoutes:r,fullPath:s.fullPath,search:a,params:f};return this.lightweightCache.set(e,[t,h]),h}},Ev=class extends Error{},$0e=class extends Error{};function z0e(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Vg(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Ev("Async validation not supported");if(n.issues)throw new Ev(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function j0e({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),o=Ds(e);let s;const a=o0e(o,n,!0);return a&&(s=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[t.__root__],routeParams:r,foundRoute:s}}function B0e({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return H0e(n)(e,t,r??!1)}function H0e(e){let t,n;const r=[];for(const s of e){const a=s.options;if("search"in a)a.search?.middlewares&&r.push(...a.search.middlewares);else if(a.preSearchFilters||a.postSearchFilters){const u=({search:f,next:h})=>{const m=h(a.preSearchFilters?a.preSearchFilters.reduce((g,v)=>v(g),f):f);return a.postSearchFilters?a.postSearchFilters.reduce((g,v)=>v(g),m):m};r.push(u)}const c=a.validateSearch;if(c){const u=({search:f,next:h,meta:m})=>{const g=h(f);if(n)try{const v=Vg(c,g);if(m&&v)for(const C in v)C in g||(m.defaulted||=new Map).set(C,v[C]);return{...g,...v}}catch{}return g};r.push(u)}}const o=(s,a,c)=>{if(s>=r.length){if(!t.search)return{};if(t.search===!0)return a;const f=za(t.search,a);return c&&(c.explicit=f),f}const u=(f,h)=>{if(h){const m=c||{};return{search:o(s+1,f,m),meta:m}}return o(s+1,f,c)};return r[s]({search:a,next:u,meta:c})};return function(a,c,u){return t=c,n=u,o(0,a)}}function q0e(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return Za}function oU(e,t){const n=e.options.params?.parse??e.options.parseParams;if(n){const r=n(t);if(r===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(t,r)}}const V0e="Error preloading route! ☝️";var oj=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Za:this.parentRoute||Us();let o=r?Za:n?.path;o&&o!=="/"&&(o=Y7(o));const s=n?.id||o;let a=r?Za:Bg([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);o==="__root__"&&(o="/"),a!=="__root__"&&(a=Bg(["/",a]));const c=a==="__root__"?"/":Bg([this.parentRoute.fullPath,o]);this._path=o,this._id=a,this._fullPath=c,this._to=Ds(c)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>_l({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},W0e=class extends oj{constructor(e){super(e)}};function hT(e){const t=e.errorComponent??pT;return T.jsx(G0e,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?_.createElement(t,{error:n,reset:r}):e.children})}var G0e=class extends _.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function pT({error:e}){const[t,n]=_.useState(!1);return T.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[T.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[T.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),T.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),T.jsx("div",{style:{height:".25rem"}}),t?T.jsx("div",{children:T.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?T.jsx("code",{children:e.message}):null})}):null]})}function K0e({children:e,fallback:t=null}){return sj()?T.jsx(B.Fragment,{children:e}):T.jsx(B.Fragment,{children:t})}function sj(){return B.useSyncExternalStore(Z0e,()=>!0,()=>!1)}function Z0e(){return()=>{}}var ij=_.createContext(null);function _r(e){return _.useContext(ij)}var lb=_.createContext(void 0),Y0e=_.createContext(void 0),Jt=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Jt||{});function Q0e({update:e,notify:t,unwatched:n}){return{link:r,unlink:o,propagate:s,checkDirty:a,shallowPropagate:c};function r(f,h,m){const g=h.depsTail;if(g!==void 0&&g.dep===f)return;const v=g!==void 0?g.nextDep:h.deps;if(v!==void 0&&v.dep===f){v.version=m,h.depsTail=v;return}const C=f.subsTail;if(C!==void 0&&C.version===m&&C.sub===h)return;const b=h.depsTail=f.subsTail={version:m,dep:f,sub:h,prevDep:g,nextDep:v,prevSub:C,nextSub:void 0};v!==void 0&&(v.prevDep=b),g!==void 0?g.nextDep=b:h.deps=b,C!==void 0?C.nextSub=b:f.subs=b}function o(f,h=f.sub){const m=f.dep,g=f.prevDep,v=f.nextDep,C=f.nextSub,b=f.prevSub;return v!==void 0?v.prevDep=g:h.depsTail=g,g!==void 0?g.nextDep=v:h.deps=v,C!==void 0?C.prevSub=b:m.subsTail=b,b!==void 0?b.nextSub=C:(m.subs=C)===void 0&&n(m),v}function s(f){let h=f.nextSub,m;e:do{const g=f.sub;let v=g.flags;if(v&60?v&12?v&4?!(v&48)&&u(f,g)?(g.flags=v|40,v&=1):v=0:g.flags=v&-9|32:v=0:g.flags=v|32,v&2&&t(g),v&1){const C=g.subs;if(C!==void 0){const b=(f=C).nextSub;b!==void 0&&(m={value:h,prev:m},h=b);continue}}if((f=h)!==void 0){h=f.nextSub;continue}for(;m!==void 0;)if(f=m.value,m=m.prev,f!==void 0){h=f.nextSub;continue e}break}while(!0)}function a(f,h){let m,g=0,v=!1;e:do{const C=f.dep,b=C.flags;if(h.flags&16)v=!0;else if((b&17)===17){if(e(C)){const E=C.subs;E.nextSub!==void 0&&c(E),v=!0}}else if((b&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(m={value:f,prev:m}),f=C.deps,h=C,++g;continue}if(!v){const E=f.nextDep;if(E!==void 0){f=E;continue}}for(;g--;){const E=h.subs,x=E.nextSub!==void 0;if(x?(f=m.value,m=m.prev):f=E,v){if(e(h)){x&&c(E),h=f.sub;continue}v=!1}else h.flags&=-33;h=f.sub;const I=f.nextDep;if(I!==void 0){f=I;continue e}}return v}while(!0)}function c(f){do{const h=f.sub,m=h.flags;(m&48)===32&&(h.flags=m|16,(m&6)===2&&t(h))}while((f=f.nextSub)!==void 0)}function u(f,h){let m=h.depsTail;for(;m!==void 0;){if(m===f)return!0;m=m.prevDep}return!1}}function J0e(e,t,n){const r=typeof e=="object",o=r?e:void 0;return{next:(r?e.next:e)?.bind(o),error:(r?e.error:t)?.bind(o),complete:(r?e.complete:n)?.bind(o)}}const pI=[];let Wg=0;const{link:sU,unlink:X0e,propagate:eSe,checkDirty:aj,shallowPropagate:iU}=Q0e({update(e){return e._update()},notify(e){pI[mI++]=e,e.flags&=~Jt.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Jt.Mutable|Jt.Dirty,xv(e))}});let Bm=0,mI=0,Bo,gI=0;function lj(e){try{++gI,e()}finally{--gI||cj()}}function xv(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=X0e(n,e)}function cj(){if(!(gI>0)){for(;Bm<mI;){const e=pI[Bm];pI[Bm++]=void 0,e.notify()}Bm=0,mI=0}}function aU(e,t){const n=typeof e=="function",r=e,o={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Jt.None:Jt.Mutable,get(){return Bo!==void 0&&sU(o,Bo,Wg),o._snapshot},subscribe(s){const a=J0e(s),c={current:!1},u=tSe(()=>{o.get(),c.current?a.next?.(o._snapshot):c.current=!0});return{unsubscribe:()=>{u.stop()}}},_update(s){const a=Bo,c=t?.compare??Object.is;if(n)Bo=o,++Wg,o.depsTail=void 0;else if(s===void 0)return!1;n&&(o.flags=Jt.Mutable|Jt.RecursedCheck);try{const u=o._snapshot,f=typeof s=="function"?s(u):s===void 0&&n?r(u):s;return u===void 0||!c(u,f)?(o._snapshot=f,!0):!1}finally{Bo=a,n&&(o.flags&=~Jt.RecursedCheck),xv(o)}}};return n?(o.flags=Jt.Mutable|Jt.Dirty,o.get=function(){const s=o.flags;if(s&Jt.Dirty||s&Jt.Pending&&aj(o.deps,o)){if(o._update()){const a=o.subs;a!==void 0&&iU(a)}}else s&Jt.Pending&&(o.flags=s&~Jt.Pending);return Bo!==void 0&&sU(o,Bo,Wg),o._snapshot}):o.set=function(s){if(o._update(s)){const a=o.subs;a!==void 0&&(eSe(a),iU(a),cj())}},o}function tSe(e){const t=()=>{const r=Bo;Bo=n,++Wg,n.depsTail=void 0,n.flags=Jt.Watching|Jt.RecursedCheck;try{return e()}finally{Bo=r,n.flags&=~Jt.RecursedCheck,xv(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Jt.Watching|Jt.RecursedCheck,notify(){const r=this.flags;r&Jt.Dirty||r&Jt.Pending&&aj(this.deps,this)?t():this.flags=Jt.Watching},stop(){this.flags=Jt.None,this.depsTail=void 0,xv(this)}};return t(),n}function nSe(e,t){return e===t}function Er(e,t,n=nSe){const r=_.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(a);return c},[e]),o=_.useCallback(()=>e?.get(),[e]);return a9.useSyncExternalStoreWithSelector(r,o,o,t,n)}var Rx={get(){},subscribe(){return{unsubscribe(){}}}};function rSe(e,t){const n=_.useRef();return r=>{const o=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=ja(n.current,o):o}}function Il(e){const t=_r(),n=_.useContext(e.from?Y0e:lb),r=e.from?t.stores.getRouteMatchStore(e.from):t.stores.matchStores.get(n),o=rSe(e,t),s=Er(r??Rx,a=>a?o(a):Rx);if(s!==Rx)return s;(e.shouldThrow??!0)&&Us()}function uj(e){return Il({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function dj(e){const{select:t,...n}=e;return Il({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function fj(e){return Il({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function cb(e){return Il({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function kh(e){const t=_r();return _.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function v9e(e){const t=_r(),n=kh(),r=_.useRef(null);return zc(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function hj(e){return Il({...e,select:t=>e.select?e.select(t.context):t.context})}function oSe(e,t){const n=_r(),r=Vbe(t),{activeProps:o,inactiveProps:s,activeOptions:a,to:c,preload:u,preloadDelay:f,preloadIntentProximity:h,hashScrollIntoView:m,replace:g,startTransition:v,resetScroll:C,viewTransition:b,children:E,target:x,disabled:I,style:R,className:O,onClick:D,onBlur:N,onFocus:M,onMouseEnter:L,onMouseLeave:$,onTouchStart:G,ignoreBlocker:j,params:F,search:q,hash:J,state:Se,mask:V,reloadDocument:ee,unsafeRelative:me,from:ge,_fromLocation:Te,...z}=e,te=sj(),fe=_.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ae=Er(n.stores.location,zt=>zt,(zt,Un)=>zt.href===Un.href),be=_.useMemo(()=>{const zt={_fromLocation:ae,...fe};return n.buildLocation(zt)},[n,ae,fe]),Fe=be.maskedLocation?be.maskedLocation.publicHref:be.publicHref,ke=be.maskedLocation?be.maskedLocation.external:be.external,le=_.useMemo(()=>uSe(Fe,ke,n.history,I),[I,ke,Fe,n.history]),Re=_.useMemo(()=>{if(le?.external)return Sv(le.href,n.protocolAllowlist)?void 0:le.href;if(!dSe(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),Sv(c,n.protocolAllowlist)?void 0:c}catch{}},[c,le,n.protocolAllowlist]),rt=_.useMemo(()=>{if(Re)return!1;if(a?.exact){if(!u0e(ae.pathname,be.pathname,n.basepath))return!1}else{const zt=Cv(ae.pathname,n.basepath),Un=Cv(be.pathname,n.basepath);if(!(zt.startsWith(Un)&&(zt.length===Un.length||zt[Un.length]==="/")))return!1}return(a?.includeSearch??!0)&&!Ka(ae.search,be.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?te&&ae.hash===be.hash:!0},[a?.exact,a?.explicitUndefined,a?.includeHash,a?.includeSearch,ae,Re,te,be.hash,be.pathname,be.search,n.basepath]),xe=rt?za(o,{})??sSe:Tx,xt=rt?Tx:za(s,{})??Tx,_t=[O,xe.className,xt.className].filter(Boolean).join(" "),ot=(R||xe.style||xt.style)&&{...R,...xe.style,...xt.style},[En,st]=_.useState(!1),ti=_.useRef(!1),os=e.reloadDocument||Re?!1:u??n.options.defaultPreload,ha=f??n.options.defaultPreloadDelay??0,ho=_.useCallback(()=>{n.preloadRoute({...fe,_builtLocation:be}).catch(zt=>{console.warn(zt),console.warn(V0e)})},[n,fe,be]);qbe(r,_.useCallback(zt=>{zt?.isIntersecting&&ho()},[ho]),cSe,{disabled:!!I||os!=="viewport"}),_.useEffect(()=>{ti.current||!I&&os==="render"&&(ho(),ti.current=!0)},[I,ho,os]);const Wu=zt=>{const Un=zt.currentTarget.getAttribute("target"),Po=x!==void 0?x:Un;if(!I&&!fSe(zt)&&!zt.defaultPrevented&&(!Po||Po==="_self")&&zt.button===0){zt.preventDefault(),yoe.flushSync(()=>{st(!0)});const Nl=n.subscribe("onResolved",()=>{Nl(),st(!1)});n.navigate({...fe,replace:g,resetScroll:C,hashScrollIntoView:m,startTransition:v,viewTransition:b,ignoreBlocker:j})}};if(Re)return{...z,ref:r,href:Re,...E&&{children:E},...x&&{target:x},...I&&{disabled:I},...R&&{style:R},...O&&{className:O},...D&&{onClick:D},...N&&{onBlur:N},...M&&{onFocus:M},...L&&{onMouseEnter:L},...$&&{onMouseLeave:$},...G&&{onTouchStart:G}};const Qh=zt=>{if(I||os!=="intent")return;if(!ha){ho();return}const Un=zt.currentTarget;if(tf.has(Un))return;const Po=setTimeout(()=>{tf.delete(Un),ho()},ha);tf.set(Un,Po)},c0=zt=>{I||os!=="intent"||ho()},Kn=zt=>{if(I||!os||!ha)return;const Un=zt.currentTarget,Po=tf.get(Un);Po&&(clearTimeout(Po),tf.delete(Un))};return{...z,...xe,...xt,href:le?.href,ref:r,onClick:xc([D,Wu]),onBlur:xc([N,Kn]),onFocus:xc([M,Qh]),onMouseEnter:xc([L,Qh]),onMouseLeave:xc([$,Kn]),onTouchStart:xc([G,c0]),disabled:!!I,target:x,...ot&&{style:ot},..._t&&{className:_t},...I&&iSe,...rt&&aSe,...te&&En&&lSe}}var Tx={},sSe={className:"active"},iSe={role:"link","aria-disabled":!0},aSe={"data-status":"active","aria-current":"page"},lSe={"data-transitioning":"transitioning"},tf=new WeakMap,cSe={rootMargin:"100px"},xc=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function uSe(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function dSe(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}function y9e(e){return _.forwardRef(function(n,r){return T.jsx(mT,{...n,_asChild:e,ref:r})})}var mT=_.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,...s}=oSe(r,t),a=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:c,...u}=s;return _.createElement("a",u,a)}return _.createElement(n,s,a)});function fSe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var hSe=class extends oj{constructor(t){super(t),this.useMatch=n=>Il({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>hj({...n,from:this.id}),this.useSearch=n=>cb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>fj({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>dj({...n,from:this.id}),this.useLoaderData=n=>uj({...n,from:this.id}),this.useNavigate=()=>kh({from:this.fullPath}),this.Link=B.forwardRef((n,r)=>T.jsx(mT,{ref:r,from:this.fullPath,...n}))}};function pSe(e){return new hSe(e)}function mSe(){return e=>vSe(e)}var gSe=class extends W0e{constructor(e){super(e),this.useMatch=t=>Il({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>hj({...t,from:this.id}),this.useSearch=t=>cb({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>fj({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>dj({...t,from:this.id}),this.useLoaderData=t=>uj({...t,from:this.id}),this.useNavigate=()=>kh({from:this.fullPath}),this.Link=B.forwardRef((t,n)=>T.jsx(mT,{ref:n,from:this.fullPath,...t}))}};function vSe(e){return new gSe(e)}function _e(e){return new ySe(e,{silent:!0}).createRoute}var ySe=class{constructor(e,t){this.path=e,this.createRoute=n=>{const r=pSe(n);return r.isRoot=!1,r},this.silent=t?.silent}};function Me(e,t){let n,r,o,s;const a=()=>(n||(n=e().then(u=>{n=void 0,r=u[t??"default"]}).catch(u=>{if(o=u,Kbe(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),s=!0)}})),n),c=function(f){if(s)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!r)if($4)$4(a());else throw a();return _.createElement(r,f)};return c.preload=a,c}function bSe(e){const t=_r(),n=`not-found-${Er(t.stores.location,r=>r.pathname)}-${Er(t.stores.status,r=>r)}`;return T.jsx(hT,{getResetKey:()=>n,onCatch:(r,o)=>{if(Jn(r))e.onCatch?.(r,o);else throw r},errorComponent:({error:r})=>{if(Jn(r))return e.fallback?.(r);throw r},children:e.children})}function SSe(){return T.jsx("p",{children:"Not Found"})}function Dc(e){return T.jsx(T.Fragment,{children:e.children})}function pj(e,t,n){return t.options.notFoundComponent?T.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?T.jsx(e.options.defaultNotFoundComponent,{...n}):T.jsx(SSe,{})}function CSe(e){return null}function wSe(){return CSe(_r()),null}var ESe=(e,t)=>e.routeId===t.routeId&&e._displayPending===t._displayPending,xSe=(e,t)=>e[0]===t[0]&&e[1]===t[1],mj=_.memo(function({matchId:t}){const n=_r(),r=n.stores.matchStores.get(t);r||Us();const o=Er(n.stores.loadedAt,a=>a),s=Er(r,a=>a,ESe);return T.jsx(_Se,{router:n,matchId:t,resetKey:o,matchState:_.useMemo(()=>{const a=s.routeId,c=n.routesById[a].parentRoute?.id;return{routeId:a,ssr:s.ssr,_displayPending:s._displayPending,parentRouteId:c}},[s._displayPending,s.routeId,s.ssr,n.routesById])})});function _Se({router:e,matchId:t,resetKey:n,matchState:r}){const o=e.routesById[r.routeId],s=o.options.pendingComponent??e.options.defaultPendingComponent,a=s?T.jsx(s,{}):null,c=o.options.errorComponent??e.options.defaultErrorComponent,u=o.options.onCatch??e.options.defaultOnCatch,f=o.isRoot?o.options.notFoundComponent??e.options.notFoundRoute?.options.component:o.options.notFoundComponent,h=r.ssr===!1||r.ssr==="data-only",m=(!o.isRoot||o.options.wrapInSuspense||h)&&(o.options.wrapInSuspense??s??(o.options.errorComponent?.preload||h))?_.Suspense:Dc,g=c?hT:Dc,v=f?bSe:Dc;return T.jsxs(o.isRoot?o.options.shellComponent??Dc:Dc,{children:[T.jsx(lb.Provider,{value:t,children:T.jsx(m,{fallback:a,children:T.jsx(g,{getResetKey:()=>n,errorComponent:c||pT,onCatch:(C,b)=>{if(Jn(C))throw C.routeId??=r.routeId,C;u?.(C,b)},children:T.jsx(v,{fallback:C=>{if(C.routeId??=r.routeId,!f||C.routeId&&C.routeId!==r.routeId||!C.routeId&&!o.isRoot)throw C;return _.createElement(f,C)},children:h||r._displayPending?T.jsx(K0e,{fallback:a,children:T.jsx(lU,{matchId:t})}):T.jsx(lU,{matchId:t})})})})}),r.parentRouteId===Za?T.jsxs(T.Fragment,{children:[T.jsx(ISe,{}),e.options.scrollRestoration&&H7?T.jsx(wSe,{}):null]}):null]})}function ISe(){const e=_r(),t=_.useRef();return zc(()=>{const n=e.stores.resolvedLocation.get(),r=t.current;n&&(!r||r.href!==n.href)&&e.emit({type:"onRendered",...Qc(e.stores.location.get(),r??n)}),t.current=n},[Er(e.stores.resolvedLocation,n=>n?.state.__TSR_key),e]),null}var lU=_.memo(function({matchId:t}){const n=_r(),r=(h,m)=>n.getMatch(h.id)?._nonReactive[m]??h._nonReactive[m],o=n.stores.matchStores.get(t);o||Us();const s=Er(o,h=>h),a=s.routeId,c=n.routesById[a],u=_.useMemo(()=>{const h=(n.routesById[a].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:a,loaderDeps:s.loaderDeps,params:s._strictParams,search:s._strictSearch});return h?JSON.stringify(h):void 0},[a,s.loaderDeps,s._strictParams,s._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=_.useMemo(()=>{const h=c.options.component??n.options.defaultComponent;return h?T.jsx(h,{},u):T.jsx(gj,{})},[u,c.options.component,n.options.defaultComponent]);if(s._displayPending)throw r(s,"displayPendingPromise");if(s._forcePending)throw r(s,"minPendingPromise");if(s.status==="pending"){const h=c.options.pendingMinMs??n.options.defaultPendingMinMs;if(h){const m=n.getMatch(s.id);if(m&&!m._nonReactive.minPendingPromise){const g=cu();m._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),m._nonReactive.minPendingPromise=void 0},h)}}throw r(s,"loadPromise")}if(s.status==="notFound")return Jn(s.error)||Us(),pj(n,c,s.error);if(s.status==="redirected")throw vr(s.error)||Us(),r(s,"loadPromise");if(s.status==="error")throw s.error;return f}),gj=_.memo(function(){const t=_r(),n=_.useContext(lb);let r,o=!1,s;{const f=n?t.stores.matchStores.get(n):void 0;[r,o]=Er(f,h=>[h?.routeId,h?.globalNotFound??!1],xSe),s=Er(t.stores.matchesId,h=>h[h.findIndex(m=>m===n)+1])}const a=r?t.routesById[r]:void 0,c=t.options.defaultPendingComponent?T.jsx(t.options.defaultPendingComponent,{}):null;if(o)return a||Us(),pj(t,a,void 0);if(!s)return null;const u=T.jsx(mj,{matchId:s});return r===Za?T.jsx(_.Suspense,{fallback:c,children:u}):u});function ASe(){const e=_r(),t=_.useRef({router:e,mounted:!1}),[n,r]=_.useState(!1),o=Er(e.stores.isLoading,m=>m),s=Er(e.stores.hasPending,m=>m),a=Cx(o),c=o||n||s,u=Cx(c),f=o||s,h=Cx(f);return e.startTransition=m=>{r(!0),_.startTransition(()=>{m(),r(!1)})},_.useEffect(()=>{const m=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ds(e.latestLocation.publicHref)!==Ds(g.publicHref)&&e.commitLocation({...g,replace:!0}),()=>{m()}},[e,e.history]),zc(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(g){console.error(g)}})()},[e]),zc(()=>{a&&!o&&e.emit({type:"onLoad",...Qc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[a,e,o]),zc(()=>{h&&!f&&e.emit({type:"onBeforeRouteMount",...Qc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,h,e]),zc(()=>{if(u&&!c){const m=Qc(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...m}),lj(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())})}},[c,u,e]),null}function RSe(){const e=_r(),t=e.routesById[Za].options.pendingComponent??e.options.defaultPendingComponent,n=t?T.jsx(t,{}):null,r=T.jsxs(typeof document<"u"&&e.ssr?Dc:_.Suspense,{fallback:n,children:[T.jsx(ASe,{}),T.jsx(TSe,{})]});return e.options.InnerWrap?T.jsx(e.options.InnerWrap,{children:r}):r}function TSe(){const e=_r(),t=Er(e.stores.firstId,o=>o),n=Er(e.stores.loadedAt,o=>o),r=t?T.jsx(mj,{matchId:t}):null;return T.jsx(lb.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:T.jsx(hT,{getResetKey:()=>n,errorComponent:pT,onCatch:void 0,children:r})})}var OSe=e=>({createMutableStore:aU,createReadonlyStore:aU,batch:lj}),MSe=e=>new PSe(e),PSe=class extends F0e{constructor(e){super(e,OSe)}};function NSe({router:e,children:t,...n}){V7(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=T.jsx(ij.Provider,{value:e,children:t});return e.options.Wrap?T.jsx(e.options.Wrap,{children:r}):r}function kSe({router:e,...t}){return T.jsx(NSe,{router:e,...t,children:T.jsx(RSe,{})})}var Ox={exports:{}},nf={},Mx={exports:{}},Px={};var cU;function DSe(){return cU||(cU=1,(function(e){function t(V,ee){var me=V.length;V.push(ee);e:for(;0<me;){var ge=me-1>>>1,Te=V[ge];if(0<o(Te,ee))V[ge]=ee,V[me]=Te,me=ge;else break e}}function n(V){return V.length===0?null:V[0]}function r(V){if(V.length===0)return null;var ee=V[0],me=V.pop();if(me!==ee){V[0]=me;e:for(var ge=0,Te=V.length,z=Te>>>1;ge<z;){var te=2*(ge+1)-1,fe=V[te],ae=te+1,be=V[ae];if(0>o(fe,me))ae<Te&&0>o(be,fe)?(V[ge]=be,V[ae]=me,ge=ae):(V[ge]=fe,V[te]=me,ge=te);else if(ae<Te&&0>o(be,me))V[ge]=be,V[ae]=me,ge=ae;else break e}}return ee}function o(V,ee){var me=V.sortIndex-ee.sortIndex;return me!==0?me:V.id-ee.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var u=[],f=[],h=1,m=null,g=3,v=!1,C=!1,b=!1,E=!1,x=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function O(V){for(var ee=n(f);ee!==null;){if(ee.callback===null)r(f);else if(ee.startTime<=V)r(f),ee.sortIndex=ee.expirationTime,t(u,ee);else break;ee=n(f)}}function D(V){if(b=!1,O(V),!C)if(n(u)!==null)C=!0,N||(N=!0,F());else{var ee=n(f);ee!==null&&Se(D,ee.startTime-V)}}var N=!1,M=-1,L=5,$=-1;function G(){return E?!0:!(e.unstable_now()-$<L)}function j(){if(E=!1,N){var V=e.unstable_now();$=V;var ee=!0;try{e:{C=!1,b&&(b=!1,I(M),M=-1),v=!0;var me=g;try{t:{for(O(V),m=n(u);m!==null&&!(m.expirationTime>V&&G());){var ge=m.callback;if(typeof ge=="function"){m.callback=null,g=m.priorityLevel;var Te=ge(m.expirationTime<=V);if(V=e.unstable_now(),typeof Te=="function"){m.callback=Te,O(V),ee=!0;break t}m===n(u)&&r(u),O(V)}else r(u);m=n(u)}if(m!==null)ee=!0;else{var z=n(f);z!==null&&Se(D,z.startTime-V),ee=!1}}break e}finally{m=null,g=me,v=!1}ee=void 0}}finally{ee?F():N=!1}}}var F;if(typeof R=="function")F=function(){R(j)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,J=q.port2;q.port1.onmessage=j,F=function(){J.postMessage(null)}}else F=function(){x(j,0)};function Se(V,ee){M=x(function(){V(e.unstable_now())},ee)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(V){switch(g){case 1:case 2:case 3:var ee=3;break;default:ee=g}var me=g;g=ee;try{return V()}finally{g=me}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(V,ee){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var me=g;g=V;try{return ee()}finally{g=me}},e.unstable_scheduleCallback=function(V,ee,me){var ge=e.unstable_now();switch(typeof me=="object"&&me!==null?(me=me.delay,me=typeof me=="number"&&0<me?ge+me:ge):me=ge,V){case 1:var Te=-1;break;case 2:Te=250;break;case 5:Te=1073741823;break;case 4:Te=1e4;break;default:Te=5e3}return Te=me+Te,V={id:h++,callback:ee,priorityLevel:V,startTime:me,expirationTime:Te,sortIndex:-1},me>ge?(V.sortIndex=me,t(f,V),n(u)===null&&V===n(f)&&(b?(I(M),M=-1):b=!0,Se(D,me-ge))):(V.sortIndex=Te,t(u,V),C||v||(C=!0,N||(N=!0,F()))),V},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(V){var ee=g;return function(){var me=g;g=ee;try{return V.apply(this,arguments)}finally{g=me}}}})(Px)),Px}var uU;function LSe(){return uU||(uU=1,Mx.exports=DSe()),Mx.exports}var dU;function USe(){if(dU)return nf;dU=1;var e=LSe(),t=Ih(),n=Sz();function r(i){var l="https://react.dev/errors/"+i;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+i+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function s(i){var l=i,d=i;if(i.alternate)for(;l.return;)l=l.return;else{i=l;do l=i,(l.flags&4098)!==0&&(d=l.return),i=l.return;while(i)}return l.tag===3?d:null}function a(i){if(i.tag===13){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function c(i){if(i.tag===31){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function u(i){if(s(i)!==i)throw Error(r(188))}function f(i){var l=i.alternate;if(!l){if(l=s(i),l===null)throw Error(r(188));return l!==i?null:i}for(var d=i,p=l;;){var y=d.return;if(y===null)break;var S=y.alternate;if(S===null){if(p=y.return,p!==null){d=p;continue}break}if(y.child===S.child){for(S=y.child;S;){if(S===d)return u(y),i;if(S===p)return u(y),l;S=S.sibling}throw Error(r(188))}if(d.return!==p.return)d=y,p=S;else{for(var A=!1,k=y.child;k;){if(k===d){A=!0,d=y,p=S;break}if(k===p){A=!0,p=y,d=S;break}k=k.sibling}if(!A){for(k=S.child;k;){if(k===d){A=!0,d=S,p=y;break}if(k===p){A=!0,p=S,d=y;break}k=k.sibling}if(!A)throw Error(r(189))}}if(d.alternate!==p)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?i:l}function h(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i;for(i=i.child;i!==null;){if(l=h(i),l!==null)return l;i=i.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),R=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function F(i){return i===null||typeof i!="object"?null:(i=j&&i[j]||i["@@iterator"],typeof i=="function"?i:null)}var q=Symbol.for("react.client.reference");function J(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===q?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case b:return"Fragment";case x:return"Profiler";case E:return"StrictMode";case D:return"Suspense";case N:return"SuspenseList";case $:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case C:return"Portal";case R:return i.displayName||"Context";case I:return(i._context.displayName||"Context")+".Consumer";case O:var l=i.render;return i=i.displayName,i||(i=l.displayName||l.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case M:return l=i.displayName||null,l!==null?l:J(i.type)||"Memo";case L:l=i._payload,i=i._init;try{return J(i(l))}catch{}}return null}var Se=Array.isArray,V=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},ge=[],Te=-1;function z(i){return{current:i}}function te(i){0>Te||(i.current=ge[Te],ge[Te]=null,Te--)}function fe(i,l){Te++,ge[Te]=i.current,i.current=l}var ae=z(null),be=z(null),Fe=z(null),ke=z(null);function le(i,l){switch(fe(Fe,l),fe(be,i),fe(ae,null),l.nodeType){case 9:case 11:i=(i=l.documentElement)&&(i=i.namespaceURI)?uN(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=uN(l),i=dN(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}te(ae),fe(ae,i)}function Re(){te(ae),te(be),te(Fe)}function rt(i){i.memoizedState!==null&&fe(ke,i);var l=ae.current,d=dN(l,i.type);l!==d&&(fe(be,i),fe(ae,d))}function xe(i){be.current===i&&(te(ae),te(be)),ke.current===i&&(te(ke),Dd._currentValue=me)}var xt,_t;function ot(i){if(xt===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);xt=l&&l[1]||"",_t=-1<d.stack.indexOf(`
81
- at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
82
- `+xt+i+_t}var En=!1;function st(i,l){if(!i||En)return"";En=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(l){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(X){var Q=X}Reflect.construct(i,[],se)}else{try{se.call()}catch(X){Q=X}i.call(se.prototype)}}else{try{throw Error()}catch(X){Q=X}(se=i())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(X){if(X&&Q&&typeof X.stack=="string")return[X.stack,Q.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=p.DetermineComponentFrameRoot(),A=S[0],k=S[1];if(A&&k){var H=A.split(`
83
- `),Y=k.split(`
84
- `);for(y=p=0;p<H.length&&!H[p].includes("DetermineComponentFrameRoot");)p++;for(;y<Y.length&&!Y[y].includes("DetermineComponentFrameRoot");)y++;if(p===H.length||y===Y.length)for(p=H.length-1,y=Y.length-1;1<=p&&0<=y&&H[p]!==Y[y];)y--;for(;1<=p&&0<=y;p--,y--)if(H[p]!==Y[y]){if(p!==1||y!==1)do if(p--,y--,0>y||H[p]!==Y[y]){var ne=`
85
- `+H[p].replace(" at new "," at ");return i.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",i.displayName)),ne}while(1<=p&&0<=y);break}}}finally{En=!1,Error.prepareStackTrace=d}return(d=i?i.displayName||i.name:"")?ot(d):""}function ti(i,l){switch(i.tag){case 26:case 27:case 5:return ot(i.type);case 16:return ot("Lazy");case 13:return i.child!==l&&l!==null?ot("Suspense Fallback"):ot("Suspense");case 19:return ot("SuspenseList");case 0:case 15:return st(i.type,!1);case 11:return st(i.type.render,!1);case 1:return st(i.type,!0);case 31:return ot("Activity");default:return""}}function os(i){try{var l="",d=null;do l+=ti(i,d),d=i,i=i.return;while(i);return l}catch(p){return`
86
- Error generating stack: `+p.message+`
87
- `+p.stack}}var ha=Object.prototype.hasOwnProperty,ho=e.unstable_scheduleCallback,Wu=e.unstable_cancelCallback,Qh=e.unstable_shouldYield,c0=e.unstable_requestPaint,Kn=e.unstable_now,zt=e.unstable_getCurrentPriorityLevel,Un=e.unstable_ImmediatePriority,Po=e.unstable_UserBlockingPriority,Nl=e.unstable_NormalPriority,cG=e.unstable_LowPriority,q2=e.unstable_IdlePriority,uG=e.log,dG=e.unstable_setDisableYieldValue,Gu=null,Ar=null;function ni(i){if(typeof uG=="function"&&dG(i),Ar&&typeof Ar.setStrictMode=="function")try{Ar.setStrictMode(Gu,i)}catch{}}var Rr=Math.clz32?Math.clz32:pG,fG=Math.log,hG=Math.LN2;function pG(i){return i>>>=0,i===0?32:31-(fG(i)/hG|0)|0}var Jh=256,Xh=262144,ep=4194304;function pa(i){var l=i&42;if(l!==0)return l;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function tp(i,l,d){var p=i.pendingLanes;if(p===0)return 0;var y=0,S=i.suspendedLanes,A=i.pingedLanes;i=i.warmLanes;var k=p&134217727;return k!==0?(p=k&~S,p!==0?y=pa(p):(A&=k,A!==0?y=pa(A):d||(d=k&~i,d!==0&&(y=pa(d))))):(k=p&~S,k!==0?y=pa(k):A!==0?y=pa(A):d||(d=p&~i,d!==0&&(y=pa(d)))),y===0?0:l!==0&&l!==y&&(l&S)===0&&(S=y&-y,d=l&-l,S>=d||S===32&&(d&4194048)!==0)?l:y}function Ku(i,l){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&l)===0}function mG(i,l){switch(i){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 V2(){var i=ep;return ep<<=1,(ep&62914560)===0&&(ep=4194304),i}function u0(i){for(var l=[],d=0;31>d;d++)l.push(i);return l}function Zu(i,l){i.pendingLanes|=l,l!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function gG(i,l,d,p,y,S){var A=i.pendingLanes;i.pendingLanes=d,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=d,i.entangledLanes&=d,i.errorRecoveryDisabledLanes&=d,i.shellSuspendCounter=0;var k=i.entanglements,H=i.expirationTimes,Y=i.hiddenUpdates;for(d=A&~d;0<d;){var ne=31-Rr(d),se=1<<ne;k[ne]=0,H[ne]=-1;var Q=Y[ne];if(Q!==null)for(Y[ne]=null,ne=0;ne<Q.length;ne++){var X=Q[ne];X!==null&&(X.lane&=-536870913)}d&=~se}p!==0&&W2(i,p,0),S!==0&&y===0&&i.tag!==0&&(i.suspendedLanes|=S&~(A&~l))}function W2(i,l,d){i.pendingLanes|=l,i.suspendedLanes&=~l;var p=31-Rr(l);i.entangledLanes|=l,i.entanglements[p]=i.entanglements[p]|1073741824|d&261930}function G2(i,l){var d=i.entangledLanes|=l;for(i=i.entanglements;d;){var p=31-Rr(d),y=1<<p;y&l|i[p]&l&&(i[p]|=l),d&=~y}}function K2(i,l){var d=l&-l;return d=(d&42)!==0?1:d0(d),(d&(i.suspendedLanes|l))!==0?0:d}function d0(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function f0(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Z2(){var i=ee.p;return i!==0?i:(i=window.event,i===void 0?32:kN(i.type))}function Y2(i,l){var d=ee.p;try{return ee.p=i,l()}finally{ee.p=d}}var ri=Math.random().toString(36).slice(2),Fn="__reactFiber$"+ri,lr="__reactProps$"+ri,kl="__reactContainer$"+ri,h0="__reactEvents$"+ri,vG="__reactListeners$"+ri,yG="__reactHandles$"+ri,Q2="__reactResources$"+ri,Yu="__reactMarker$"+ri;function p0(i){delete i[Fn],delete i[lr],delete i[h0],delete i[vG],delete i[yG]}function Dl(i){var l=i[Fn];if(l)return l;for(var d=i.parentNode;d;){if(l=d[kl]||d[Fn]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(i=yN(i);i!==null;){if(d=i[Fn])return d;i=yN(i)}return l}i=d,d=i.parentNode}return null}function Ll(i){if(i=i[Fn]||i[kl]){var l=i.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return i}return null}function Qu(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i.stateNode;throw Error(r(33))}function Ul(i){var l=i[Q2];return l||(l=i[Q2]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Tn(i){i[Yu]=!0}var J2=new Set,X2={};function ma(i,l){Fl(i,l),Fl(i+"Capture",l)}function Fl(i,l){for(X2[i]=l,i=0;i<l.length;i++)J2.add(l[i])}var bG=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]*$"),eO={},tO={};function SG(i){return ha.call(tO,i)?!0:ha.call(eO,i)?!1:bG.test(i)?tO[i]=!0:(eO[i]=!0,!1)}function np(i,l,d){if(SG(l))if(d===null)i.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":i.removeAttribute(l);return;case"boolean":var p=l.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){i.removeAttribute(l);return}}i.setAttribute(l,""+d)}}function rp(i,l,d){if(d===null)i.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttribute(l,""+d)}}function ss(i,l,d,p){if(p===null)i.removeAttribute(d);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(d);return}i.setAttributeNS(l,d,""+p)}}function qr(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function nO(i){var l=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function CG(i,l,d){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,l);if(!i.hasOwnProperty(l)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var y=p.get,S=p.set;return Object.defineProperty(i,l,{configurable:!0,get:function(){return y.call(this)},set:function(A){d=""+A,S.call(this,A)}}),Object.defineProperty(i,l,{enumerable:p.enumerable}),{getValue:function(){return d},setValue:function(A){d=""+A},stopTracking:function(){i._valueTracker=null,delete i[l]}}}}function m0(i){if(!i._valueTracker){var l=nO(i)?"checked":"value";i._valueTracker=CG(i,l,""+i[l])}}function rO(i){if(!i)return!1;var l=i._valueTracker;if(!l)return!0;var d=l.getValue(),p="";return i&&(p=nO(i)?i.checked?"true":"false":i.value),i=p,i!==d?(l.setValue(i),!0):!1}function op(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var wG=/[\n"\\]/g;function Vr(i){return i.replace(wG,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function g0(i,l,d,p,y,S,A,k){i.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?i.type=A:i.removeAttribute("type"),l!=null?A==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+qr(l)):i.value!==""+qr(l)&&(i.value=""+qr(l)):A!=="submit"&&A!=="reset"||i.removeAttribute("value"),l!=null?v0(i,A,qr(l)):d!=null?v0(i,A,qr(d)):p!=null&&i.removeAttribute("value"),y==null&&S!=null&&(i.defaultChecked=!!S),y!=null&&(i.checked=y&&typeof y!="function"&&typeof y!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?i.name=""+qr(k):i.removeAttribute("name")}function oO(i,l,d,p,y,S,A,k){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(i.type=S),l!=null||d!=null){if(!(S!=="submit"&&S!=="reset"||l!=null)){m0(i);return}d=d!=null?""+qr(d):"",l=l!=null?""+qr(l):d,k||l===i.value||(i.value=l),i.defaultValue=l}p=p??y,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=k?i.checked:!!p,i.defaultChecked=!!p,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(i.name=A),m0(i)}function v0(i,l,d){l==="number"&&op(i.ownerDocument)===i||i.defaultValue===""+d||(i.defaultValue=""+d)}function $l(i,l,d,p){if(i=i.options,l){l={};for(var y=0;y<d.length;y++)l["$"+d[y]]=!0;for(d=0;d<i.length;d++)y=l.hasOwnProperty("$"+i[d].value),i[d].selected!==y&&(i[d].selected=y),y&&p&&(i[d].defaultSelected=!0)}else{for(d=""+qr(d),l=null,y=0;y<i.length;y++){if(i[y].value===d){i[y].selected=!0,p&&(i[y].defaultSelected=!0);return}l!==null||i[y].disabled||(l=i[y])}l!==null&&(l.selected=!0)}}function sO(i,l,d){if(l!=null&&(l=""+qr(l),l!==i.value&&(i.value=l),d==null)){i.defaultValue!==l&&(i.defaultValue=l);return}i.defaultValue=d!=null?""+qr(d):""}function iO(i,l,d,p){if(l==null){if(p!=null){if(d!=null)throw Error(r(92));if(Se(p)){if(1<p.length)throw Error(r(93));p=p[0]}d=p}d==null&&(d=""),l=d}d=qr(l),i.defaultValue=d,p=i.textContent,p===d&&p!==""&&p!==null&&(i.value=p),m0(i)}function zl(i,l){if(l){var d=i.firstChild;if(d&&d===i.lastChild&&d.nodeType===3){d.nodeValue=l;return}}i.textContent=l}var EG=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 aO(i,l,d){var p=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?p?i.setProperty(l,""):l==="float"?i.cssFloat="":i[l]="":p?i.setProperty(l,d):typeof d!="number"||d===0||EG.has(l)?l==="float"?i.cssFloat=d:i[l]=(""+d).trim():i[l]=d+"px"}function lO(i,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(i=i.style,d!=null){for(var p in d)!d.hasOwnProperty(p)||l!=null&&l.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var y in l)p=l[y],l.hasOwnProperty(y)&&d[y]!==p&&aO(i,y,p)}else for(var S in l)l.hasOwnProperty(S)&&aO(i,S,l[S])}function y0(i){if(i.indexOf("-")===-1)return!1;switch(i){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 xG=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),_G=/^[\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 sp(i){return _G.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function is(){}var b0=null;function S0(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var jl=null,Bl=null;function cO(i){var l=Ll(i);if(l&&(i=l.stateNode)){var d=i[lr]||null;e:switch(i=l.stateNode,l.type){case"input":if(g0(i,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=i;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+Vr(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var p=d[l];if(p!==i&&p.form===i.form){var y=p[lr]||null;if(!y)throw Error(r(90));g0(p,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(l=0;l<d.length;l++)p=d[l],p.form===i.form&&rO(p)}break e;case"textarea":sO(i,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&$l(i,!!d.multiple,l,!1)}}}var C0=!1;function uO(i,l,d){if(C0)return i(l,d);C0=!0;try{var p=i(l);return p}finally{if(C0=!1,(jl!==null||Bl!==null)&&(Wp(),jl&&(l=jl,i=Bl,Bl=jl=null,cO(l),i)))for(l=0;l<i.length;l++)cO(i[l])}}function Ju(i,l){var d=i.stateNode;if(d===null)return null;var p=d[lr]||null;if(p===null)return null;d=p[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var as=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),w0=!1;if(as)try{var Xu={};Object.defineProperty(Xu,"passive",{get:function(){w0=!0}}),window.addEventListener("test",Xu,Xu),window.removeEventListener("test",Xu,Xu)}catch{w0=!1}var oi=null,E0=null,ip=null;function dO(){if(ip)return ip;var i,l=E0,d=l.length,p,y="value"in oi?oi.value:oi.textContent,S=y.length;for(i=0;i<d&&l[i]===y[i];i++);var A=d-i;for(p=1;p<=A&&l[d-p]===y[S-p];p++);return ip=y.slice(i,1<p?1-p:void 0)}function ap(i){var l=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&l===13&&(i=13)):i=l,i===10&&(i=13),32<=i||i===13?i:0}function lp(){return!0}function fO(){return!1}function cr(i){function l(d,p,y,S,A){this._reactName=d,this._targetInst=y,this.type=p,this.nativeEvent=S,this.target=A,this.currentTarget=null;for(var k in i)i.hasOwnProperty(k)&&(d=i[k],this[k]=d?d(S):S[k]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?lp:fO,this.isPropagationStopped=fO,this}return m(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=lp)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=lp)},persist:function(){},isPersistent:lp}),l}var ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cp=cr(ga),ed=m({},ga,{view:0,detail:0}),IG=cr(ed),x0,_0,td,up=m({},ed,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:A0,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==td&&(td&&i.type==="mousemove"?(x0=i.screenX-td.screenX,_0=i.screenY-td.screenY):_0=x0=0,td=i),x0)},movementY:function(i){return"movementY"in i?i.movementY:_0}}),hO=cr(up),AG=m({},up,{dataTransfer:0}),RG=cr(AG),TG=m({},ed,{relatedTarget:0}),I0=cr(TG),OG=m({},ga,{animationName:0,elapsedTime:0,pseudoElement:0}),MG=cr(OG),PG=m({},ga,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),NG=cr(PG),kG=m({},ga,{data:0}),pO=cr(kG),DG={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},LG={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"},UG={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function FG(i){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(i):(i=UG[i])?!!l[i]:!1}function A0(){return FG}var $G=m({},ed,{key:function(i){if(i.key){var l=DG[i.key]||i.key;if(l!=="Unidentified")return l}return i.type==="keypress"?(i=ap(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?LG[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:A0,charCode:function(i){return i.type==="keypress"?ap(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?ap(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),zG=cr($G),jG=m({},up,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mO=cr(jG),BG=m({},ed,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:A0}),HG=cr(BG),qG=m({},ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),VG=cr(qG),WG=m({},up,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),GG=cr(WG),KG=m({},ga,{newState:0,oldState:0}),ZG=cr(KG),YG=[9,13,27,32],R0=as&&"CompositionEvent"in window,nd=null;as&&"documentMode"in document&&(nd=document.documentMode);var QG=as&&"TextEvent"in window&&!nd,gO=as&&(!R0||nd&&8<nd&&11>=nd),vO=" ",yO=!1;function bO(i,l){switch(i){case"keyup":return YG.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function SO(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Hl=!1;function JG(i,l){switch(i){case"compositionend":return SO(l);case"keypress":return l.which!==32?null:(yO=!0,vO);case"textInput":return i=l.data,i===vO&&yO?null:i;default:return null}}function XG(i,l){if(Hl)return i==="compositionend"||!R0&&bO(i,l)?(i=dO(),ip=E0=oi=null,Hl=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return gO&&l.locale!=="ko"?null:l.data;default:return null}}var eK={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 CO(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l==="input"?!!eK[i.type]:l==="textarea"}function wO(i,l,d,p){jl?Bl?Bl.push(p):Bl=[p]:jl=p,l=Xp(l,"onChange"),0<l.length&&(d=new cp("onChange","change",null,d,p),i.push({event:d,listeners:l}))}var rd=null,od=null;function tK(i){oN(i,0)}function dp(i){var l=Qu(i);if(rO(l))return i}function EO(i,l){if(i==="change")return l}var xO=!1;if(as){var T0;if(as){var O0="oninput"in document;if(!O0){var _O=document.createElement("div");_O.setAttribute("oninput","return;"),O0=typeof _O.oninput=="function"}T0=O0}else T0=!1;xO=T0&&(!document.documentMode||9<document.documentMode)}function IO(){rd&&(rd.detachEvent("onpropertychange",AO),od=rd=null)}function AO(i){if(i.propertyName==="value"&&dp(od)){var l=[];wO(l,od,i,S0(i)),uO(tK,l)}}function nK(i,l,d){i==="focusin"?(IO(),rd=l,od=d,rd.attachEvent("onpropertychange",AO)):i==="focusout"&&IO()}function rK(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return dp(od)}function oK(i,l){if(i==="click")return dp(l)}function sK(i,l){if(i==="input"||i==="change")return dp(l)}function iK(i,l){return i===l&&(i!==0||1/i===1/l)||i!==i&&l!==l}var Tr=typeof Object.is=="function"?Object.is:iK;function sd(i,l){if(Tr(i,l))return!0;if(typeof i!="object"||i===null||typeof l!="object"||l===null)return!1;var d=Object.keys(i),p=Object.keys(l);if(d.length!==p.length)return!1;for(p=0;p<d.length;p++){var y=d[p];if(!ha.call(l,y)||!Tr(i[y],l[y]))return!1}return!0}function RO(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function TO(i,l){var d=RO(i);i=0;for(var p;d;){if(d.nodeType===3){if(p=i+d.textContent.length,i<=l&&p>=l)return{node:d,offset:l-i};i=p}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=RO(d)}}function OO(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?OO(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function MO(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var l=op(i.document);l instanceof i.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)i=l.contentWindow;else break;l=op(i.document)}return l}function M0(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l&&(l==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||l==="textarea"||i.contentEditable==="true")}var aK=as&&"documentMode"in document&&11>=document.documentMode,ql=null,P0=null,id=null,N0=!1;function PO(i,l,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;N0||ql==null||ql!==op(p)||(p=ql,"selectionStart"in p&&M0(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),id&&sd(id,p)||(id=p,p=Xp(P0,"onSelect"),0<p.length&&(l=new cp("onSelect","select",null,l,d),i.push({event:l,listeners:p}),l.target=ql)))}function va(i,l){var d={};return d[i.toLowerCase()]=l.toLowerCase(),d["Webkit"+i]="webkit"+l,d["Moz"+i]="moz"+l,d}var Vl={animationend:va("Animation","AnimationEnd"),animationiteration:va("Animation","AnimationIteration"),animationstart:va("Animation","AnimationStart"),transitionrun:va("Transition","TransitionRun"),transitionstart:va("Transition","TransitionStart"),transitioncancel:va("Transition","TransitionCancel"),transitionend:va("Transition","TransitionEnd")},k0={},NO={};as&&(NO=document.createElement("div").style,"AnimationEvent"in window||(delete Vl.animationend.animation,delete Vl.animationiteration.animation,delete Vl.animationstart.animation),"TransitionEvent"in window||delete Vl.transitionend.transition);function ya(i){if(k0[i])return k0[i];if(!Vl[i])return i;var l=Vl[i],d;for(d in l)if(l.hasOwnProperty(d)&&d in NO)return k0[i]=l[d];return i}var kO=ya("animationend"),DO=ya("animationiteration"),LO=ya("animationstart"),lK=ya("transitionrun"),cK=ya("transitionstart"),uK=ya("transitioncancel"),UO=ya("transitionend"),FO=new Map,D0="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");D0.push("scrollEnd");function po(i,l){FO.set(i,l),ma(l,[i])}var fp=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Wr=[],Wl=0,L0=0;function hp(){for(var i=Wl,l=L0=Wl=0;l<i;){var d=Wr[l];Wr[l++]=null;var p=Wr[l];Wr[l++]=null;var y=Wr[l];Wr[l++]=null;var S=Wr[l];if(Wr[l++]=null,p!==null&&y!==null){var A=p.pending;A===null?y.next=y:(y.next=A.next,A.next=y),p.pending=y}S!==0&&$O(d,y,S)}}function pp(i,l,d,p){Wr[Wl++]=i,Wr[Wl++]=l,Wr[Wl++]=d,Wr[Wl++]=p,L0|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function U0(i,l,d,p){return pp(i,l,d,p),mp(i)}function ba(i,l){return pp(i,null,null,l),mp(i)}function $O(i,l,d){i.lanes|=d;var p=i.alternate;p!==null&&(p.lanes|=d);for(var y=!1,S=i.return;S!==null;)S.childLanes|=d,p=S.alternate,p!==null&&(p.childLanes|=d),S.tag===22&&(i=S.stateNode,i===null||i._visibility&1||(y=!0)),i=S,S=S.return;return i.tag===3?(S=i.stateNode,y&&l!==null&&(y=31-Rr(d),i=S.hiddenUpdates,p=i[y],p===null?i[y]=[l]:p.push(l),l.lane=d|536870912),S):null}function mp(i){if(50<Rd)throw Rd=0,WS=null,Error(r(185));for(var l=i.return;l!==null;)i=l,l=i.return;return i.tag===3?i.stateNode:null}var Gl={};function dK(i,l,d,p){this.tag=i,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Or(i,l,d,p){return new dK(i,l,d,p)}function F0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ls(i,l){var d=i.alternate;return d===null?(d=Or(i.tag,l,i.key,i.mode),d.elementType=i.elementType,d.type=i.type,d.stateNode=i.stateNode,d.alternate=i,i.alternate=d):(d.pendingProps=l,d.type=i.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=i.flags&65011712,d.childLanes=i.childLanes,d.lanes=i.lanes,d.child=i.child,d.memoizedProps=i.memoizedProps,d.memoizedState=i.memoizedState,d.updateQueue=i.updateQueue,l=i.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=i.sibling,d.index=i.index,d.ref=i.ref,d.refCleanup=i.refCleanup,d}function zO(i,l){i.flags&=65011714;var d=i.alternate;return d===null?(i.childLanes=0,i.lanes=l,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=d.childLanes,i.lanes=d.lanes,i.child=d.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=d.memoizedProps,i.memoizedState=d.memoizedState,i.updateQueue=d.updateQueue,i.type=d.type,l=d.dependencies,i.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),i}function gp(i,l,d,p,y,S){var A=0;if(p=i,typeof i=="function")F0(i)&&(A=1);else if(typeof i=="string")A=gZ(i,d,ae.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case $:return i=Or(31,d,l,y),i.elementType=$,i.lanes=S,i;case b:return Sa(d.children,y,S,l);case E:A=8,y|=24;break;case x:return i=Or(12,d,l,y|2),i.elementType=x,i.lanes=S,i;case D:return i=Or(13,d,l,y),i.elementType=D,i.lanes=S,i;case N:return i=Or(19,d,l,y),i.elementType=N,i.lanes=S,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case R:A=10;break e;case I:A=9;break e;case O:A=11;break e;case M:A=14;break e;case L:A=16,p=null;break e}A=29,d=Error(r(130,i===null?"null":typeof i,"")),p=null}return l=Or(A,d,l,y),l.elementType=i,l.type=p,l.lanes=S,l}function Sa(i,l,d,p){return i=Or(7,i,p,l),i.lanes=d,i}function $0(i,l,d){return i=Or(6,i,null,l),i.lanes=d,i}function jO(i){var l=Or(18,null,null,0);return l.stateNode=i,l}function z0(i,l,d){return l=Or(4,i.children!==null?i.children:[],i.key,l),l.lanes=d,l.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},l}var BO=new WeakMap;function Gr(i,l){if(typeof i=="object"&&i!==null){var d=BO.get(i);return d!==void 0?d:(l={value:i,source:l,stack:os(l)},BO.set(i,l),l)}return{value:i,source:l,stack:os(l)}}var Kl=[],Zl=0,vp=null,ad=0,Kr=[],Zr=0,si=null,No=1,ko="";function cs(i,l){Kl[Zl++]=ad,Kl[Zl++]=vp,vp=i,ad=l}function HO(i,l,d){Kr[Zr++]=No,Kr[Zr++]=ko,Kr[Zr++]=si,si=i;var p=No;i=ko;var y=32-Rr(p)-1;p&=~(1<<y),d+=1;var S=32-Rr(l)+y;if(30<S){var A=y-y%5;S=(p&(1<<A)-1).toString(32),p>>=A,y-=A,No=1<<32-Rr(l)+y|d<<y|p,ko=S+i}else No=1<<S|d<<y|p,ko=i}function j0(i){i.return!==null&&(cs(i,1),HO(i,1,0))}function B0(i){for(;i===vp;)vp=Kl[--Zl],Kl[Zl]=null,ad=Kl[--Zl],Kl[Zl]=null;for(;i===si;)si=Kr[--Zr],Kr[Zr]=null,ko=Kr[--Zr],Kr[Zr]=null,No=Kr[--Zr],Kr[Zr]=null}function qO(i,l){Kr[Zr++]=No,Kr[Zr++]=ko,Kr[Zr++]=si,No=l.id,ko=l.overflow,si=i}var $n=null,Bt=null,it=!1,ii=null,Yr=!1,H0=Error(r(519));function ai(i){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ld(Gr(l,i)),H0}function VO(i){var l=i.stateNode,d=i.type,p=i.memoizedProps;switch(l[Fn]=i,l[lr]=p,d){case"dialog":Xe("cancel",l),Xe("close",l);break;case"iframe":case"object":case"embed":Xe("load",l);break;case"video":case"audio":for(d=0;d<Od.length;d++)Xe(Od[d],l);break;case"source":Xe("error",l);break;case"img":case"image":case"link":Xe("error",l),Xe("load",l);break;case"details":Xe("toggle",l);break;case"input":Xe("invalid",l),oO(l,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Xe("invalid",l);break;case"textarea":Xe("invalid",l),iO(l,p.value,p.defaultValue,p.children)}d=p.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||p.suppressHydrationWarning===!0||lN(l.textContent,d)?(p.popover!=null&&(Xe("beforetoggle",l),Xe("toggle",l)),p.onScroll!=null&&Xe("scroll",l),p.onScrollEnd!=null&&Xe("scrollend",l),p.onClick!=null&&(l.onclick=is),l=!0):l=!1,l||ai(i,!0)}function WO(i){for($n=i.return;$n;)switch($n.tag){case 5:case 31:case 13:Yr=!1;return;case 27:case 3:Yr=!0;return;default:$n=$n.return}}function Yl(i){if(i!==$n)return!1;if(!it)return WO(i),it=!0,!1;var l=i.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=i.type,d=!(d!=="form"&&d!=="button")||a1(i.type,i.memoizedProps)),d=!d),d&&Bt&&ai(i),WO(i),l===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Bt=vN(i)}else if(l===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Bt=vN(i)}else l===27?(l=Bt,Ci(i.type)?(i=f1,f1=null,Bt=i):Bt=l):Bt=$n?Jr(i.stateNode.nextSibling):null;return!0}function Ca(){Bt=$n=null,it=!1}function q0(){var i=ii;return i!==null&&(hr===null?hr=i:hr.push.apply(hr,i),ii=null),i}function ld(i){ii===null?ii=[i]:ii.push(i)}var V0=z(null),wa=null,us=null;function li(i,l,d){fe(V0,l._currentValue),l._currentValue=d}function ds(i){i._currentValue=V0.current,te(V0)}function W0(i,l,d){for(;i!==null;){var p=i.alternate;if((i.childLanes&l)!==l?(i.childLanes|=l,p!==null&&(p.childLanes|=l)):p!==null&&(p.childLanes&l)!==l&&(p.childLanes|=l),i===d)break;i=i.return}}function G0(i,l,d,p){var y=i.child;for(y!==null&&(y.return=i);y!==null;){var S=y.dependencies;if(S!==null){var A=y.child;S=S.firstContext;e:for(;S!==null;){var k=S;S=y;for(var H=0;H<l.length;H++)if(k.context===l[H]){S.lanes|=d,k=S.alternate,k!==null&&(k.lanes|=d),W0(S.return,d,i),p||(A=null);break e}S=k.next}}else if(y.tag===18){if(A=y.return,A===null)throw Error(r(341));A.lanes|=d,S=A.alternate,S!==null&&(S.lanes|=d),W0(A,d,i),A=null}else A=y.child;if(A!==null)A.return=y;else for(A=y;A!==null;){if(A===i){A=null;break}if(y=A.sibling,y!==null){y.return=A.return,A=y;break}A=A.return}y=A}}function Ql(i,l,d,p){i=null;for(var y=l,S=!1;y!==null;){if(!S){if((y.flags&524288)!==0)S=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var A=y.alternate;if(A===null)throw Error(r(387));if(A=A.memoizedProps,A!==null){var k=y.type;Tr(y.pendingProps.value,A.value)||(i!==null?i.push(k):i=[k])}}else if(y===ke.current){if(A=y.alternate,A===null)throw Error(r(387));A.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(i!==null?i.push(Dd):i=[Dd])}y=y.return}i!==null&&G0(l,i,d,p),l.flags|=262144}function yp(i){for(i=i.firstContext;i!==null;){if(!Tr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Ea(i){wa=i,us=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function zn(i){return GO(wa,i)}function bp(i,l){return wa===null&&Ea(i),GO(i,l)}function GO(i,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},us===null){if(i===null)throw Error(r(308));us=l,i.dependencies={lanes:0,firstContext:l},i.flags|=524288}else us=us.next=l;return d}var fK=typeof AbortController<"u"?AbortController:function(){var i=[],l=this.signal={aborted:!1,addEventListener:function(d,p){i.push(p)}};this.abort=function(){l.aborted=!0,i.forEach(function(d){return d()})}},hK=e.unstable_scheduleCallback,pK=e.unstable_NormalPriority,mn={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function K0(){return{controller:new fK,data:new Map,refCount:0}}function cd(i){i.refCount--,i.refCount===0&&hK(pK,function(){i.controller.abort()})}var ud=null,Z0=0,Jl=0,Xl=null;function mK(i,l){if(ud===null){var d=ud=[];Z0=0,Jl=JS(),Xl={status:"pending",value:void 0,then:function(p){d.push(p)}}}return Z0++,l.then(KO,KO),l}function KO(){if(--Z0===0&&ud!==null){Xl!==null&&(Xl.status="fulfilled");var i=ud;ud=null,Jl=0,Xl=null;for(var l=0;l<i.length;l++)(0,i[l])()}}function gK(i,l){var d=[],p={status:"pending",value:null,reason:null,then:function(y){d.push(y)}};return i.then(function(){p.status="fulfilled",p.value=l;for(var y=0;y<d.length;y++)(0,d[y])(l)},function(y){for(p.status="rejected",p.reason=y,y=0;y<d.length;y++)(0,d[y])(void 0)}),p}var ZO=V.S;V.S=function(i,l){PP=Kn(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&mK(i,l),ZO!==null&&ZO(i,l)};var xa=z(null);function Y0(){var i=xa.current;return i!==null?i:$t.pooledCache}function Sp(i,l){l===null?fe(xa,xa.current):fe(xa,l.pool)}function YO(){var i=Y0();return i===null?null:{parent:mn._currentValue,pool:i}}var ec=Error(r(460)),Q0=Error(r(474)),Cp=Error(r(542)),wp={then:function(){}};function QO(i){return i=i.status,i==="fulfilled"||i==="rejected"}function JO(i,l,d){switch(d=i[d],d===void 0?i.push(l):d!==l&&(l.then(is,is),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,eM(i),i;default:if(typeof l.status=="string")l.then(is,is);else{if(i=$t,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=l,i.status="pending",i.then(function(p){if(l.status==="pending"){var y=l;y.status="fulfilled",y.value=p}},function(p){if(l.status==="pending"){var y=l;y.status="rejected",y.reason=p}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,eM(i),i}throw Ia=l,ec}}function _a(i){try{var l=i._init;return l(i._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(Ia=d,ec):d}}var Ia=null;function XO(){if(Ia===null)throw Error(r(459));var i=Ia;return Ia=null,i}function eM(i){if(i===ec||i===Cp)throw Error(r(483))}var tc=null,dd=0;function Ep(i){var l=dd;return dd+=1,tc===null&&(tc=[]),JO(tc,i,l)}function fd(i,l){l=l.props.ref,i.ref=l!==void 0?l:null}function xp(i,l){throw l.$$typeof===g?Error(r(525)):(i=Object.prototype.toString.call(l),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":i)))}function tM(i){function l(K,W){if(i){var Z=K.deletions;Z===null?(K.deletions=[W],K.flags|=16):Z.push(W)}}function d(K,W){if(!i)return null;for(;W!==null;)l(K,W),W=W.sibling;return null}function p(K){for(var W=new Map;K!==null;)K.key!==null?W.set(K.key,K):W.set(K.index,K),K=K.sibling;return W}function y(K,W){return K=ls(K,W),K.index=0,K.sibling=null,K}function S(K,W,Z){return K.index=Z,i?(Z=K.alternate,Z!==null?(Z=Z.index,Z<W?(K.flags|=67108866,W):Z):(K.flags|=67108866,W)):(K.flags|=1048576,W)}function A(K){return i&&K.alternate===null&&(K.flags|=67108866),K}function k(K,W,Z,oe){return W===null||W.tag!==6?(W=$0(Z,K.mode,oe),W.return=K,W):(W=y(W,Z),W.return=K,W)}function H(K,W,Z,oe){var De=Z.type;return De===b?ne(K,W,Z.props.children,oe,Z.key):W!==null&&(W.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===L&&_a(De)===W.type)?(W=y(W,Z.props),fd(W,Z),W.return=K,W):(W=gp(Z.type,Z.key,Z.props,null,K.mode,oe),fd(W,Z),W.return=K,W)}function Y(K,W,Z,oe){return W===null||W.tag!==4||W.stateNode.containerInfo!==Z.containerInfo||W.stateNode.implementation!==Z.implementation?(W=z0(Z,K.mode,oe),W.return=K,W):(W=y(W,Z.children||[]),W.return=K,W)}function ne(K,W,Z,oe,De){return W===null||W.tag!==7?(W=Sa(Z,K.mode,oe,De),W.return=K,W):(W=y(W,Z),W.return=K,W)}function se(K,W,Z){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=$0(""+W,K.mode,Z),W.return=K,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case v:return Z=gp(W.type,W.key,W.props,null,K.mode,Z),fd(Z,W),Z.return=K,Z;case C:return W=z0(W,K.mode,Z),W.return=K,W;case L:return W=_a(W),se(K,W,Z)}if(Se(W)||F(W))return W=Sa(W,K.mode,Z,null),W.return=K,W;if(typeof W.then=="function")return se(K,Ep(W),Z);if(W.$$typeof===R)return se(K,bp(K,W),Z);xp(K,W)}return null}function Q(K,W,Z,oe){var De=W!==null?W.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return De!==null?null:k(K,W,""+Z,oe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case v:return Z.key===De?H(K,W,Z,oe):null;case C:return Z.key===De?Y(K,W,Z,oe):null;case L:return Z=_a(Z),Q(K,W,Z,oe)}if(Se(Z)||F(Z))return De!==null?null:ne(K,W,Z,oe,null);if(typeof Z.then=="function")return Q(K,W,Ep(Z),oe);if(Z.$$typeof===R)return Q(K,W,bp(K,Z),oe);xp(K,Z)}return null}function X(K,W,Z,oe,De){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return K=K.get(Z)||null,k(W,K,""+oe,De);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case v:return K=K.get(oe.key===null?Z:oe.key)||null,H(W,K,oe,De);case C:return K=K.get(oe.key===null?Z:oe.key)||null,Y(W,K,oe,De);case L:return oe=_a(oe),X(K,W,Z,oe,De)}if(Se(oe)||F(oe))return K=K.get(Z)||null,ne(W,K,oe,De,null);if(typeof oe.then=="function")return X(K,W,Z,Ep(oe),De);if(oe.$$typeof===R)return X(K,W,Z,bp(W,oe),De);xp(W,oe)}return null}function Ie(K,W,Z,oe){for(var De=null,mt=null,Oe=W,Ke=W=0,nt=null;Oe!==null&&Ke<Z.length;Ke++){Oe.index>Ke?(nt=Oe,Oe=null):nt=Oe.sibling;var gt=Q(K,Oe,Z[Ke],oe);if(gt===null){Oe===null&&(Oe=nt);break}i&&Oe&&gt.alternate===null&&l(K,Oe),W=S(gt,W,Ke),mt===null?De=gt:mt.sibling=gt,mt=gt,Oe=nt}if(Ke===Z.length)return d(K,Oe),it&&cs(K,Ke),De;if(Oe===null){for(;Ke<Z.length;Ke++)Oe=se(K,Z[Ke],oe),Oe!==null&&(W=S(Oe,W,Ke),mt===null?De=Oe:mt.sibling=Oe,mt=Oe);return it&&cs(K,Ke),De}for(Oe=p(Oe);Ke<Z.length;Ke++)nt=X(Oe,K,Ke,Z[Ke],oe),nt!==null&&(i&&nt.alternate!==null&&Oe.delete(nt.key===null?Ke:nt.key),W=S(nt,W,Ke),mt===null?De=nt:mt.sibling=nt,mt=nt);return i&&Oe.forEach(function(Ii){return l(K,Ii)}),it&&cs(K,Ke),De}function Le(K,W,Z,oe){if(Z==null)throw Error(r(151));for(var De=null,mt=null,Oe=W,Ke=W=0,nt=null,gt=Z.next();Oe!==null&&!gt.done;Ke++,gt=Z.next()){Oe.index>Ke?(nt=Oe,Oe=null):nt=Oe.sibling;var Ii=Q(K,Oe,gt.value,oe);if(Ii===null){Oe===null&&(Oe=nt);break}i&&Oe&&Ii.alternate===null&&l(K,Oe),W=S(Ii,W,Ke),mt===null?De=Ii:mt.sibling=Ii,mt=Ii,Oe=nt}if(gt.done)return d(K,Oe),it&&cs(K,Ke),De;if(Oe===null){for(;!gt.done;Ke++,gt=Z.next())gt=se(K,gt.value,oe),gt!==null&&(W=S(gt,W,Ke),mt===null?De=gt:mt.sibling=gt,mt=gt);return it&&cs(K,Ke),De}for(Oe=p(Oe);!gt.done;Ke++,gt=Z.next())gt=X(Oe,K,Ke,gt.value,oe),gt!==null&&(i&&gt.alternate!==null&&Oe.delete(gt.key===null?Ke:gt.key),W=S(gt,W,Ke),mt===null?De=gt:mt.sibling=gt,mt=gt);return i&&Oe.forEach(function(AZ){return l(K,AZ)}),it&&cs(K,Ke),De}function kt(K,W,Z,oe){if(typeof Z=="object"&&Z!==null&&Z.type===b&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case v:e:{for(var De=Z.key;W!==null;){if(W.key===De){if(De=Z.type,De===b){if(W.tag===7){d(K,W.sibling),oe=y(W,Z.props.children),oe.return=K,K=oe;break e}}else if(W.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===L&&_a(De)===W.type){d(K,W.sibling),oe=y(W,Z.props),fd(oe,Z),oe.return=K,K=oe;break e}d(K,W);break}else l(K,W);W=W.sibling}Z.type===b?(oe=Sa(Z.props.children,K.mode,oe,Z.key),oe.return=K,K=oe):(oe=gp(Z.type,Z.key,Z.props,null,K.mode,oe),fd(oe,Z),oe.return=K,K=oe)}return A(K);case C:e:{for(De=Z.key;W!==null;){if(W.key===De)if(W.tag===4&&W.stateNode.containerInfo===Z.containerInfo&&W.stateNode.implementation===Z.implementation){d(K,W.sibling),oe=y(W,Z.children||[]),oe.return=K,K=oe;break e}else{d(K,W);break}else l(K,W);W=W.sibling}oe=z0(Z,K.mode,oe),oe.return=K,K=oe}return A(K);case L:return Z=_a(Z),kt(K,W,Z,oe)}if(Se(Z))return Ie(K,W,Z,oe);if(F(Z)){if(De=F(Z),typeof De!="function")throw Error(r(150));return Z=De.call(Z),Le(K,W,Z,oe)}if(typeof Z.then=="function")return kt(K,W,Ep(Z),oe);if(Z.$$typeof===R)return kt(K,W,bp(K,Z),oe);xp(K,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,W!==null&&W.tag===6?(d(K,W.sibling),oe=y(W,Z),oe.return=K,K=oe):(d(K,W),oe=$0(Z,K.mode,oe),oe.return=K,K=oe),A(K)):d(K,W)}return function(K,W,Z,oe){try{dd=0;var De=kt(K,W,Z,oe);return tc=null,De}catch(Oe){if(Oe===ec||Oe===Cp)throw Oe;var mt=Or(29,Oe,null,K.mode);return mt.lanes=oe,mt.return=K,mt}}}var Aa=tM(!0),nM=tM(!1),ci=!1;function J0(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function X0(i,l){i=i.updateQueue,l.updateQueue===i&&(l.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function ui(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function di(i,l,d){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(bt&2)!==0){var y=p.pending;return y===null?l.next=l:(l.next=y.next,y.next=l),p.pending=l,l=mp(i),$O(i,null,d),l}return pp(i,p,l,d),mp(i)}function hd(i,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var p=l.lanes;p&=i.pendingLanes,d|=p,l.lanes=d,G2(i,d)}}function eS(i,l){var d=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,d===p)){var y=null,S=null;if(d=d.firstBaseUpdate,d!==null){do{var A={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};S===null?y=S=A:S=S.next=A,d=d.next}while(d!==null);S===null?y=S=l:S=S.next=l}else y=S=l;d={baseState:p.baseState,firstBaseUpdate:y,lastBaseUpdate:S,shared:p.shared,callbacks:p.callbacks},i.updateQueue=d;return}i=d.lastBaseUpdate,i===null?d.firstBaseUpdate=l:i.next=l,d.lastBaseUpdate=l}var tS=!1;function pd(){if(tS){var i=Xl;if(i!==null)throw i}}function md(i,l,d,p){tS=!1;var y=i.updateQueue;ci=!1;var S=y.firstBaseUpdate,A=y.lastBaseUpdate,k=y.shared.pending;if(k!==null){y.shared.pending=null;var H=k,Y=H.next;H.next=null,A===null?S=Y:A.next=Y,A=H;var ne=i.alternate;ne!==null&&(ne=ne.updateQueue,k=ne.lastBaseUpdate,k!==A&&(k===null?ne.firstBaseUpdate=Y:k.next=Y,ne.lastBaseUpdate=H))}if(S!==null){var se=y.baseState;A=0,ne=Y=H=null,k=S;do{var Q=k.lane&-536870913,X=Q!==k.lane;if(X?(tt&Q)===Q:(p&Q)===Q){Q!==0&&Q===Jl&&(tS=!0),ne!==null&&(ne=ne.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Ie=i,Le=k;Q=l;var kt=d;switch(Le.tag){case 1:if(Ie=Le.payload,typeof Ie=="function"){se=Ie.call(kt,se,Q);break e}se=Ie;break e;case 3:Ie.flags=Ie.flags&-65537|128;case 0:if(Ie=Le.payload,Q=typeof Ie=="function"?Ie.call(kt,se,Q):Ie,Q==null)break e;se=m({},se,Q);break e;case 2:ci=!0}}Q=k.callback,Q!==null&&(i.flags|=64,X&&(i.flags|=8192),X=y.callbacks,X===null?y.callbacks=[Q]:X.push(Q))}else X={lane:Q,tag:k.tag,payload:k.payload,callback:k.callback,next:null},ne===null?(Y=ne=X,H=se):ne=ne.next=X,A|=Q;if(k=k.next,k===null){if(k=y.shared.pending,k===null)break;X=k,k=X.next,X.next=null,y.lastBaseUpdate=X,y.shared.pending=null}}while(!0);ne===null&&(H=se),y.baseState=H,y.firstBaseUpdate=Y,y.lastBaseUpdate=ne,S===null&&(y.shared.lanes=0),gi|=A,i.lanes=A,i.memoizedState=se}}function rM(i,l){if(typeof i!="function")throw Error(r(191,i));i.call(l)}function oM(i,l){var d=i.callbacks;if(d!==null)for(i.callbacks=null,i=0;i<d.length;i++)rM(d[i],l)}var nc=z(null),_p=z(0);function sM(i,l){i=Ss,fe(_p,i),fe(nc,l),Ss=i|l.baseLanes}function nS(){fe(_p,Ss),fe(nc,nc.current)}function rS(){Ss=_p.current,te(nc),te(_p)}var Mr=z(null),Qr=null;function fi(i){var l=i.alternate;fe(fn,fn.current&1),fe(Mr,i),Qr===null&&(l===null||nc.current!==null||l.memoizedState!==null)&&(Qr=i)}function oS(i){fe(fn,fn.current),fe(Mr,i),Qr===null&&(Qr=i)}function iM(i){i.tag===22?(fe(fn,fn.current),fe(Mr,i),Qr===null&&(Qr=i)):hi()}function hi(){fe(fn,fn.current),fe(Mr,Mr.current)}function Pr(i){te(Mr),Qr===i&&(Qr=null),te(fn)}var fn=z(0);function Ip(i){for(var l=i;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||u1(d)||d1(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var fs=0,Ge=null,Pt=null,gn=null,Ap=!1,rc=!1,Ra=!1,Rp=0,gd=0,oc=null,vK=0;function cn(){throw Error(r(321))}function sS(i,l){if(l===null)return!1;for(var d=0;d<l.length&&d<i.length;d++)if(!Tr(i[d],l[d]))return!1;return!0}function iS(i,l,d,p,y,S){return fs=S,Ge=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,V.H=i===null||i.memoizedState===null?HM:CS,Ra=!1,S=d(p,y),Ra=!1,rc&&(S=lM(l,d,p,y)),aM(i),S}function aM(i){V.H=bd;var l=Pt!==null&&Pt.next!==null;if(fs=0,gn=Pt=Ge=null,Ap=!1,gd=0,oc=null,l)throw Error(r(300));i===null||vn||(i=i.dependencies,i!==null&&yp(i)&&(vn=!0))}function lM(i,l,d,p){Ge=i;var y=0;do{if(rc&&(oc=null),gd=0,rc=!1,25<=y)throw Error(r(301));if(y+=1,gn=Pt=null,i.updateQueue!=null){var S=i.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}V.H=qM,S=l(d,p)}while(rc);return S}function yK(){var i=V.H,l=i.useState()[0];return l=typeof l.then=="function"?vd(l):l,i=i.useState()[0],(Pt!==null?Pt.memoizedState:null)!==i&&(Ge.flags|=1024),l}function aS(){var i=Rp!==0;return Rp=0,i}function lS(i,l,d){l.updateQueue=i.updateQueue,l.flags&=-2053,i.lanes&=~d}function cS(i){if(Ap){for(i=i.memoizedState;i!==null;){var l=i.queue;l!==null&&(l.pending=null),i=i.next}Ap=!1}fs=0,gn=Pt=Ge=null,rc=!1,gd=Rp=0,oc=null}function tr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gn===null?Ge.memoizedState=gn=i:gn=gn.next=i,gn}function hn(){if(Pt===null){var i=Ge.alternate;i=i!==null?i.memoizedState:null}else i=Pt.next;var l=gn===null?Ge.memoizedState:gn.next;if(l!==null)gn=l,Pt=i;else{if(i===null)throw Ge.alternate===null?Error(r(467)):Error(r(310));Pt=i,i={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},gn===null?Ge.memoizedState=gn=i:gn=gn.next=i}return gn}function Tp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vd(i){var l=gd;return gd+=1,oc===null&&(oc=[]),i=JO(oc,i,l),l=Ge,(gn===null?l.memoizedState:gn.next)===null&&(l=l.alternate,V.H=l===null||l.memoizedState===null?HM:CS),i}function Op(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return vd(i);if(i.$$typeof===R)return zn(i)}throw Error(r(438,String(i)))}function uS(i){var l=null,d=Ge.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var p=Ge.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(l={data:p.data.map(function(y){return y.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=Tp(),Ge.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(i),p=0;p<i;p++)d[p]=G;return l.index++,d}function hs(i,l){return typeof l=="function"?l(i):l}function Mp(i){var l=hn();return dS(l,Pt,i)}function dS(i,l,d){var p=i.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=d;var y=i.baseQueue,S=p.pending;if(S!==null){if(y!==null){var A=y.next;y.next=S.next,S.next=A}l.baseQueue=y=S,p.pending=null}if(S=i.baseState,y===null)i.memoizedState=S;else{l=y.next;var k=A=null,H=null,Y=l,ne=!1;do{var se=Y.lane&-536870913;if(se!==Y.lane?(tt&se)===se:(fs&se)===se){var Q=Y.revertLane;if(Q===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),se===Jl&&(ne=!0);else if((fs&Q)===Q){Y=Y.next,Q===Jl&&(ne=!0);continue}else se={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},H===null?(k=H=se,A=S):H=H.next=se,Ge.lanes|=Q,gi|=Q;se=Y.action,Ra&&d(S,se),S=Y.hasEagerState?Y.eagerState:d(S,se)}else Q={lane:se,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},H===null?(k=H=Q,A=S):H=H.next=Q,Ge.lanes|=se,gi|=se;Y=Y.next}while(Y!==null&&Y!==l);if(H===null?A=S:H.next=k,!Tr(S,i.memoizedState)&&(vn=!0,ne&&(d=Xl,d!==null)))throw d;i.memoizedState=S,i.baseState=A,i.baseQueue=H,p.lastRenderedState=S}return y===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function fS(i){var l=hn(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var p=d.dispatch,y=d.pending,S=l.memoizedState;if(y!==null){d.pending=null;var A=y=y.next;do S=i(S,A.action),A=A.next;while(A!==y);Tr(S,l.memoizedState)||(vn=!0),l.memoizedState=S,l.baseQueue===null&&(l.baseState=S),d.lastRenderedState=S}return[S,p]}function cM(i,l,d){var p=Ge,y=hn(),S=it;if(S){if(d===void 0)throw Error(r(407));d=d()}else d=l();var A=!Tr((Pt||y).memoizedState,d);if(A&&(y.memoizedState=d,vn=!0),y=y.queue,mS(fM.bind(null,p,y,i),[i]),y.getSnapshot!==l||A||gn!==null&&gn.memoizedState.tag&1){if(p.flags|=2048,sc(9,{destroy:void 0},dM.bind(null,p,y,d,l),null),$t===null)throw Error(r(349));S||(fs&127)!==0||uM(p,l,d)}return d}function uM(i,l,d){i.flags|=16384,i={getSnapshot:l,value:d},l=Ge.updateQueue,l===null?(l=Tp(),Ge.updateQueue=l,l.stores=[i]):(d=l.stores,d===null?l.stores=[i]:d.push(i))}function dM(i,l,d,p){l.value=d,l.getSnapshot=p,hM(l)&&pM(i)}function fM(i,l,d){return d(function(){hM(l)&&pM(i)})}function hM(i){var l=i.getSnapshot;i=i.value;try{var d=l();return!Tr(i,d)}catch{return!0}}function pM(i){var l=ba(i,2);l!==null&&pr(l,i,2)}function hS(i){var l=tr();if(typeof i=="function"){var d=i;if(i=d(),Ra){ni(!0);try{d()}finally{ni(!1)}}}return l.memoizedState=l.baseState=i,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:i},l}function mM(i,l,d,p){return i.baseState=d,dS(i,Pt,typeof p=="function"?p:hs)}function bK(i,l,d,p,y){if(kp(i))throw Error(r(485));if(i=l.action,i!==null){var S={payload:y,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){S.listeners.push(A)}};V.T!==null?d(!0):S.isTransition=!1,p(S),d=l.pending,d===null?(S.next=l.pending=S,gM(l,S)):(S.next=d.next,l.pending=d.next=S)}}function gM(i,l){var d=l.action,p=l.payload,y=i.state;if(l.isTransition){var S=V.T,A={};V.T=A;try{var k=d(y,p),H=V.S;H!==null&&H(A,k),vM(i,l,k)}catch(Y){pS(i,l,Y)}finally{S!==null&&A.types!==null&&(S.types=A.types),V.T=S}}else try{S=d(y,p),vM(i,l,S)}catch(Y){pS(i,l,Y)}}function vM(i,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(p){yM(i,l,p)},function(p){return pS(i,l,p)}):yM(i,l,d)}function yM(i,l,d){l.status="fulfilled",l.value=d,bM(l),i.state=d,l=i.pending,l!==null&&(d=l.next,d===l?i.pending=null:(d=d.next,l.next=d,gM(i,d)))}function pS(i,l,d){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do l.status="rejected",l.reason=d,bM(l),l=l.next;while(l!==p)}i.action=null}function bM(i){i=i.listeners;for(var l=0;l<i.length;l++)(0,i[l])()}function SM(i,l){return l}function CM(i,l){if(it){var d=$t.formState;if(d!==null){e:{var p=Ge;if(it){if(Bt){t:{for(var y=Bt,S=Yr;y.nodeType!==8;){if(!S){y=null;break t}if(y=Jr(y.nextSibling),y===null){y=null;break t}}S=y.data,y=S==="F!"||S==="F"?y:null}if(y){Bt=Jr(y.nextSibling),p=y.data==="F!";break e}}ai(p)}p=!1}p&&(l=d[0])}}return d=tr(),d.memoizedState=d.baseState=l,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:SM,lastRenderedState:l},d.queue=p,d=zM.bind(null,Ge,p),p.dispatch=d,p=hS(!1),S=SS.bind(null,Ge,!1,p.queue),p=tr(),y={state:l,dispatch:null,action:i,pending:null},p.queue=y,d=bK.bind(null,Ge,y,S,d),y.dispatch=d,p.memoizedState=i,[l,d,!1]}function wM(i){var l=hn();return EM(l,Pt,i)}function EM(i,l,d){if(l=dS(i,l,SM)[0],i=Mp(hs)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var p=vd(l)}catch(A){throw A===ec?Cp:A}else p=l;l=hn();var y=l.queue,S=y.dispatch;return d!==l.memoizedState&&(Ge.flags|=2048,sc(9,{destroy:void 0},SK.bind(null,y,d),null)),[p,S,i]}function SK(i,l){i.action=l}function xM(i){var l=hn(),d=Pt;if(d!==null)return EM(l,d,i);hn(),l=l.memoizedState,d=hn();var p=d.queue.dispatch;return d.memoizedState=i,[l,p,!1]}function sc(i,l,d,p){return i={tag:i,create:d,deps:p,inst:l,next:null},l=Ge.updateQueue,l===null&&(l=Tp(),Ge.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=i.next=i:(p=d.next,d.next=i,i.next=p,l.lastEffect=i),i}function _M(){return hn().memoizedState}function Pp(i,l,d,p){var y=tr();Ge.flags|=i,y.memoizedState=sc(1|l,{destroy:void 0},d,p===void 0?null:p)}function Np(i,l,d,p){var y=hn();p=p===void 0?null:p;var S=y.memoizedState.inst;Pt!==null&&p!==null&&sS(p,Pt.memoizedState.deps)?y.memoizedState=sc(l,S,d,p):(Ge.flags|=i,y.memoizedState=sc(1|l,S,d,p))}function IM(i,l){Pp(8390656,8,i,l)}function mS(i,l){Np(2048,8,i,l)}function CK(i){Ge.flags|=4;var l=Ge.updateQueue;if(l===null)l=Tp(),Ge.updateQueue=l,l.events=[i];else{var d=l.events;d===null?l.events=[i]:d.push(i)}}function AM(i){var l=hn().memoizedState;return CK({ref:l,nextImpl:i}),function(){if((bt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function RM(i,l){return Np(4,2,i,l)}function TM(i,l){return Np(4,4,i,l)}function OM(i,l){if(typeof l=="function"){i=i();var d=l(i);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return i=i(),l.current=i,function(){l.current=null}}function MM(i,l,d){d=d!=null?d.concat([i]):null,Np(4,4,OM.bind(null,l,i),d)}function gS(){}function PM(i,l){var d=hn();l=l===void 0?null:l;var p=d.memoizedState;return l!==null&&sS(l,p[1])?p[0]:(d.memoizedState=[i,l],i)}function NM(i,l){var d=hn();l=l===void 0?null:l;var p=d.memoizedState;if(l!==null&&sS(l,p[1]))return p[0];if(p=i(),Ra){ni(!0);try{i()}finally{ni(!1)}}return d.memoizedState=[p,l],p}function vS(i,l,d){return d===void 0||(fs&1073741824)!==0&&(tt&261930)===0?i.memoizedState=l:(i.memoizedState=d,i=kP(),Ge.lanes|=i,gi|=i,d)}function kM(i,l,d,p){return Tr(d,l)?d:nc.current!==null?(i=vS(i,d,p),Tr(i,l)||(vn=!0),i):(fs&42)===0||(fs&1073741824)!==0&&(tt&261930)===0?(vn=!0,i.memoizedState=d):(i=kP(),Ge.lanes|=i,gi|=i,l)}function DM(i,l,d,p,y){var S=ee.p;ee.p=S!==0&&8>S?S:8;var A=V.T,k={};V.T=k,SS(i,!1,l,d);try{var H=y(),Y=V.S;if(Y!==null&&Y(k,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var ne=gK(H,p);yd(i,l,ne,Dr(i))}else yd(i,l,p,Dr(i))}catch(se){yd(i,l,{then:function(){},status:"rejected",reason:se},Dr())}finally{ee.p=S,A!==null&&k.types!==null&&(A.types=k.types),V.T=A}}function wK(){}function yS(i,l,d,p){if(i.tag!==5)throw Error(r(476));var y=LM(i).queue;DM(i,y,l,me,d===null?wK:function(){return UM(i),d(p)})}function LM(i){var l=i.memoizedState;if(l!==null)return l;l={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:me},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:d},next:null},i.memoizedState=l,i=i.alternate,i!==null&&(i.memoizedState=l),l}function UM(i){var l=LM(i);l.next===null&&(l=i.alternate.memoizedState),yd(i,l.next.queue,{},Dr())}function bS(){return zn(Dd)}function FM(){return hn().memoizedState}function $M(){return hn().memoizedState}function EK(i){for(var l=i.return;l!==null;){switch(l.tag){case 24:case 3:var d=Dr();i=ui(d);var p=di(l,i,d);p!==null&&(pr(p,l,d),hd(p,l,d)),l={cache:K0()},i.payload=l;return}l=l.return}}function xK(i,l,d){var p=Dr();d={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},kp(i)?jM(l,d):(d=U0(i,l,d,p),d!==null&&(pr(d,i,p),BM(d,l,p)))}function zM(i,l,d){var p=Dr();yd(i,l,d,p)}function yd(i,l,d,p){var y={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(kp(i))jM(l,y);else{var S=i.alternate;if(i.lanes===0&&(S===null||S.lanes===0)&&(S=l.lastRenderedReducer,S!==null))try{var A=l.lastRenderedState,k=S(A,d);if(y.hasEagerState=!0,y.eagerState=k,Tr(k,A))return pp(i,l,y,0),$t===null&&hp(),!1}catch{}if(d=U0(i,l,y,p),d!==null)return pr(d,i,p),BM(d,l,p),!0}return!1}function SS(i,l,d,p){if(p={lane:2,revertLane:JS(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},kp(i)){if(l)throw Error(r(479))}else l=U0(i,d,p,2),l!==null&&pr(l,i,2)}function kp(i){var l=i.alternate;return i===Ge||l!==null&&l===Ge}function jM(i,l){rc=Ap=!0;var d=i.pending;d===null?l.next=l:(l.next=d.next,d.next=l),i.pending=l}function BM(i,l,d){if((d&4194048)!==0){var p=l.lanes;p&=i.pendingLanes,d|=p,l.lanes=d,G2(i,d)}}var bd={readContext:zn,use:Op,useCallback:cn,useContext:cn,useEffect:cn,useImperativeHandle:cn,useLayoutEffect:cn,useInsertionEffect:cn,useMemo:cn,useReducer:cn,useRef:cn,useState:cn,useDebugValue:cn,useDeferredValue:cn,useTransition:cn,useSyncExternalStore:cn,useId:cn,useHostTransitionStatus:cn,useFormState:cn,useActionState:cn,useOptimistic:cn,useMemoCache:cn,useCacheRefresh:cn};bd.useEffectEvent=cn;var HM={readContext:zn,use:Op,useCallback:function(i,l){return tr().memoizedState=[i,l===void 0?null:l],i},useContext:zn,useEffect:IM,useImperativeHandle:function(i,l,d){d=d!=null?d.concat([i]):null,Pp(4194308,4,OM.bind(null,l,i),d)},useLayoutEffect:function(i,l){return Pp(4194308,4,i,l)},useInsertionEffect:function(i,l){Pp(4,2,i,l)},useMemo:function(i,l){var d=tr();l=l===void 0?null:l;var p=i();if(Ra){ni(!0);try{i()}finally{ni(!1)}}return d.memoizedState=[p,l],p},useReducer:function(i,l,d){var p=tr();if(d!==void 0){var y=d(l);if(Ra){ni(!0);try{d(l)}finally{ni(!1)}}}else y=l;return p.memoizedState=p.baseState=y,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:y},p.queue=i,i=i.dispatch=xK.bind(null,Ge,i),[p.memoizedState,i]},useRef:function(i){var l=tr();return i={current:i},l.memoizedState=i},useState:function(i){i=hS(i);var l=i.queue,d=zM.bind(null,Ge,l);return l.dispatch=d,[i.memoizedState,d]},useDebugValue:gS,useDeferredValue:function(i,l){var d=tr();return vS(d,i,l)},useTransition:function(){var i=hS(!1);return i=DM.bind(null,Ge,i.queue,!0,!1),tr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,l,d){var p=Ge,y=tr();if(it){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),$t===null)throw Error(r(349));(tt&127)!==0||uM(p,l,d)}y.memoizedState=d;var S={value:d,getSnapshot:l};return y.queue=S,IM(fM.bind(null,p,S,i),[i]),p.flags|=2048,sc(9,{destroy:void 0},dM.bind(null,p,S,d,l),null),d},useId:function(){var i=tr(),l=$t.identifierPrefix;if(it){var d=ko,p=No;d=(p&~(1<<32-Rr(p)-1)).toString(32)+d,l="_"+l+"R_"+d,d=Rp++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=vK++,l="_"+l+"r_"+d.toString(32)+"_";return i.memoizedState=l},useHostTransitionStatus:bS,useFormState:CM,useActionState:CM,useOptimistic:function(i){var l=tr();l.memoizedState=l.baseState=i;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=SS.bind(null,Ge,!0,d),d.dispatch=l,[i,l]},useMemoCache:uS,useCacheRefresh:function(){return tr().memoizedState=EK.bind(null,Ge)},useEffectEvent:function(i){var l=tr(),d={impl:i};return l.memoizedState=d,function(){if((bt&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},CS={readContext:zn,use:Op,useCallback:PM,useContext:zn,useEffect:mS,useImperativeHandle:MM,useInsertionEffect:RM,useLayoutEffect:TM,useMemo:NM,useReducer:Mp,useRef:_M,useState:function(){return Mp(hs)},useDebugValue:gS,useDeferredValue:function(i,l){var d=hn();return kM(d,Pt.memoizedState,i,l)},useTransition:function(){var i=Mp(hs)[0],l=hn().memoizedState;return[typeof i=="boolean"?i:vd(i),l]},useSyncExternalStore:cM,useId:FM,useHostTransitionStatus:bS,useFormState:wM,useActionState:wM,useOptimistic:function(i,l){var d=hn();return mM(d,Pt,i,l)},useMemoCache:uS,useCacheRefresh:$M};CS.useEffectEvent=AM;var qM={readContext:zn,use:Op,useCallback:PM,useContext:zn,useEffect:mS,useImperativeHandle:MM,useInsertionEffect:RM,useLayoutEffect:TM,useMemo:NM,useReducer:fS,useRef:_M,useState:function(){return fS(hs)},useDebugValue:gS,useDeferredValue:function(i,l){var d=hn();return Pt===null?vS(d,i,l):kM(d,Pt.memoizedState,i,l)},useTransition:function(){var i=fS(hs)[0],l=hn().memoizedState;return[typeof i=="boolean"?i:vd(i),l]},useSyncExternalStore:cM,useId:FM,useHostTransitionStatus:bS,useFormState:xM,useActionState:xM,useOptimistic:function(i,l){var d=hn();return Pt!==null?mM(d,Pt,i,l):(d.baseState=i,[i,d.queue.dispatch])},useMemoCache:uS,useCacheRefresh:$M};qM.useEffectEvent=AM;function wS(i,l,d,p){l=i.memoizedState,d=d(p,l),d=d==null?l:m({},l,d),i.memoizedState=d,i.lanes===0&&(i.updateQueue.baseState=d)}var ES={enqueueSetState:function(i,l,d){i=i._reactInternals;var p=Dr(),y=ui(p);y.payload=l,d!=null&&(y.callback=d),l=di(i,y,p),l!==null&&(pr(l,i,p),hd(l,i,p))},enqueueReplaceState:function(i,l,d){i=i._reactInternals;var p=Dr(),y=ui(p);y.tag=1,y.payload=l,d!=null&&(y.callback=d),l=di(i,y,p),l!==null&&(pr(l,i,p),hd(l,i,p))},enqueueForceUpdate:function(i,l){i=i._reactInternals;var d=Dr(),p=ui(d);p.tag=2,l!=null&&(p.callback=l),l=di(i,p,d),l!==null&&(pr(l,i,d),hd(l,i,d))}};function VM(i,l,d,p,y,S,A){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,S,A):l.prototype&&l.prototype.isPureReactComponent?!sd(d,p)||!sd(y,S):!0}function WM(i,l,d,p){i=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,p),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,p),l.state!==i&&ES.enqueueReplaceState(l,l.state,null)}function Ta(i,l){var d=l;if("ref"in l){d={};for(var p in l)p!=="ref"&&(d[p]=l[p])}if(i=i.defaultProps){d===l&&(d=m({},d));for(var y in i)d[y]===void 0&&(d[y]=i[y])}return d}function GM(i){fp(i)}function KM(i){console.error(i)}function ZM(i){fp(i)}function Dp(i,l){try{var d=i.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(p){setTimeout(function(){throw p})}}function YM(i,l,d){try{var p=i.onCaughtError;p(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function xS(i,l,d){return d=ui(d),d.tag=3,d.payload={element:null},d.callback=function(){Dp(i,l)},d}function QM(i){return i=ui(i),i.tag=3,i}function JM(i,l,d,p){var y=d.type.getDerivedStateFromError;if(typeof y=="function"){var S=p.value;i.payload=function(){return y(S)},i.callback=function(){YM(l,d,p)}}var A=d.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(i.callback=function(){YM(l,d,p),typeof y!="function"&&(vi===null?vi=new Set([this]):vi.add(this));var k=p.stack;this.componentDidCatch(p.value,{componentStack:k!==null?k:""})})}function _K(i,l,d,p,y){if(d.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(l=d.alternate,l!==null&&Ql(l,d,y,!0),d=Mr.current,d!==null){switch(d.tag){case 31:case 13:return Qr===null?Gp():d.alternate===null&&un===0&&(un=3),d.flags&=-257,d.flags|=65536,d.lanes=y,p===wp?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([p]):l.add(p),ZS(i,p,y)),!1;case 22:return d.flags|=65536,p===wp?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([p])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([p]):d.add(p)),ZS(i,p,y)),!1}throw Error(r(435,d.tag))}return ZS(i,p,y),Gp(),!1}if(it)return l=Mr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=y,p!==H0&&(i=Error(r(422),{cause:p}),ld(Gr(i,d)))):(p!==H0&&(l=Error(r(423),{cause:p}),ld(Gr(l,d))),i=i.current.alternate,i.flags|=65536,y&=-y,i.lanes|=y,p=Gr(p,d),y=xS(i.stateNode,p,y),eS(i,y),un!==4&&(un=2)),!1;var S=Error(r(520),{cause:p});if(S=Gr(S,d),Ad===null?Ad=[S]:Ad.push(S),un!==4&&(un=2),l===null)return!0;p=Gr(p,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,i=y&-y,d.lanes|=i,i=xS(d.stateNode,p,i),eS(d,i),!1;case 1:if(l=d.type,S=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(vi===null||!vi.has(S))))return d.flags|=65536,y&=-y,d.lanes|=y,y=QM(y),JM(y,i,d,p),eS(d,y),!1}d=d.return}while(d!==null);return!1}var _S=Error(r(461)),vn=!1;function jn(i,l,d,p){l.child=i===null?nM(l,null,d,p):Aa(l,i.child,d,p)}function XM(i,l,d,p,y){d=d.render;var S=l.ref;if("ref"in p){var A={};for(var k in p)k!=="ref"&&(A[k]=p[k])}else A=p;return Ea(l),p=iS(i,l,d,A,S,y),k=aS(),i!==null&&!vn?(lS(i,l,y),ps(i,l,y)):(it&&k&&j0(l),l.flags|=1,jn(i,l,p,y),l.child)}function eP(i,l,d,p,y){if(i===null){var S=d.type;return typeof S=="function"&&!F0(S)&&S.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=S,tP(i,l,S,p,y)):(i=gp(d.type,null,p,l,l.mode,y),i.ref=l.ref,i.return=l,l.child=i)}if(S=i.child,!NS(i,y)){var A=S.memoizedProps;if(d=d.compare,d=d!==null?d:sd,d(A,p)&&i.ref===l.ref)return ps(i,l,y)}return l.flags|=1,i=ls(S,p),i.ref=l.ref,i.return=l,l.child=i}function tP(i,l,d,p,y){if(i!==null){var S=i.memoizedProps;if(sd(S,p)&&i.ref===l.ref)if(vn=!1,l.pendingProps=p=S,NS(i,y))(i.flags&131072)!==0&&(vn=!0);else return l.lanes=i.lanes,ps(i,l,y)}return IS(i,l,d,p,y)}function nP(i,l,d,p){var y=p.children,S=i!==null?i.memoizedState:null;if(i===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((l.flags&128)!==0){if(S=S!==null?S.baseLanes|d:d,i!==null){for(p=l.child=i.child,y=0;p!==null;)y=y|p.lanes|p.childLanes,p=p.sibling;p=y&~S}else p=0,l.child=null;return rP(i,l,S,d,p)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},i!==null&&Sp(l,S!==null?S.cachePool:null),S!==null?sM(l,S):nS(),iM(l);else return p=l.lanes=536870912,rP(i,l,S!==null?S.baseLanes|d:d,d,p)}else S!==null?(Sp(l,S.cachePool),sM(l,S),hi(),l.memoizedState=null):(i!==null&&Sp(l,null),nS(),hi());return jn(i,l,y,d),l.child}function Sd(i,l){return i!==null&&i.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function rP(i,l,d,p,y){var S=Y0();return S=S===null?null:{parent:mn._currentValue,pool:S},l.memoizedState={baseLanes:d,cachePool:S},i!==null&&Sp(l,null),nS(),iM(l),i!==null&&Ql(i,l,p,!0),l.childLanes=y,null}function Lp(i,l){return l=Fp({mode:l.mode,children:l.children},i.mode),l.ref=i.ref,i.child=l,l.return=i,l}function oP(i,l,d){return Aa(l,i.child,null,d),i=Lp(l,l.pendingProps),i.flags|=2,Pr(l),l.memoizedState=null,i}function IK(i,l,d){var p=l.pendingProps,y=(l.flags&128)!==0;if(l.flags&=-129,i===null){if(it){if(p.mode==="hidden")return i=Lp(l,p),l.lanes=536870912,Sd(null,i);if(oS(l),(i=Bt)?(i=gN(i,Yr),i=i!==null&&i.data==="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:si!==null?{id:No,overflow:ko}:null,retryLane:536870912,hydrationErrors:null},d=jO(i),d.return=l,l.child=d,$n=l,Bt=null)):i=null,i===null)throw ai(l);return l.lanes=536870912,null}return Lp(l,p)}var S=i.memoizedState;if(S!==null){var A=S.dehydrated;if(oS(l),y)if(l.flags&256)l.flags&=-257,l=oP(i,l,d);else if(l.memoizedState!==null)l.child=i.child,l.flags|=128,l=null;else throw Error(r(558));else if(vn||Ql(i,l,d,!1),y=(d&i.childLanes)!==0,vn||y){if(p=$t,p!==null&&(A=K2(p,d),A!==0&&A!==S.retryLane))throw S.retryLane=A,ba(i,A),pr(p,i,A),_S;Gp(),l=oP(i,l,d)}else i=S.treeContext,Bt=Jr(A.nextSibling),$n=l,it=!0,ii=null,Yr=!1,i!==null&&qO(l,i),l=Lp(l,p),l.flags|=4096;return l}return i=ls(i.child,{mode:p.mode,children:p.children}),i.ref=l.ref,l.child=i,i.return=l,i}function Up(i,l){var d=l.ref;if(d===null)i!==null&&i.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(i===null||i.ref!==d)&&(l.flags|=4194816)}}function IS(i,l,d,p,y){return Ea(l),d=iS(i,l,d,p,void 0,y),p=aS(),i!==null&&!vn?(lS(i,l,y),ps(i,l,y)):(it&&p&&j0(l),l.flags|=1,jn(i,l,d,y),l.child)}function sP(i,l,d,p,y,S){return Ea(l),l.updateQueue=null,d=lM(l,p,d,y),aM(i),p=aS(),i!==null&&!vn?(lS(i,l,S),ps(i,l,S)):(it&&p&&j0(l),l.flags|=1,jn(i,l,d,S),l.child)}function iP(i,l,d,p,y){if(Ea(l),l.stateNode===null){var S=Gl,A=d.contextType;typeof A=="object"&&A!==null&&(S=zn(A)),S=new d(p,S),l.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=ES,l.stateNode=S,S._reactInternals=l,S=l.stateNode,S.props=p,S.state=l.memoizedState,S.refs={},J0(l),A=d.contextType,S.context=typeof A=="object"&&A!==null?zn(A):Gl,S.state=l.memoizedState,A=d.getDerivedStateFromProps,typeof A=="function"&&(wS(l,d,A,p),S.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(A=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),A!==S.state&&ES.enqueueReplaceState(S,S.state,null),md(l,p,S,y),pd(),S.state=l.memoizedState),typeof S.componentDidMount=="function"&&(l.flags|=4194308),p=!0}else if(i===null){S=l.stateNode;var k=l.memoizedProps,H=Ta(d,k);S.props=H;var Y=S.context,ne=d.contextType;A=Gl,typeof ne=="object"&&ne!==null&&(A=zn(ne));var se=d.getDerivedStateFromProps;ne=typeof se=="function"||typeof S.getSnapshotBeforeUpdate=="function",k=l.pendingProps!==k,ne||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(k||Y!==A)&&WM(l,S,p,A),ci=!1;var Q=l.memoizedState;S.state=Q,md(l,p,S,y),pd(),Y=l.memoizedState,k||Q!==Y||ci?(typeof se=="function"&&(wS(l,d,se,p),Y=l.memoizedState),(H=ci||VM(l,d,H,p,Q,Y,A))?(ne||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(l.flags|=4194308)):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=p,l.memoizedState=Y),S.props=p,S.state=Y,S.context=A,p=H):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),p=!1)}else{S=l.stateNode,X0(i,l),A=l.memoizedProps,ne=Ta(d,A),S.props=ne,se=l.pendingProps,Q=S.context,Y=d.contextType,H=Gl,typeof Y=="object"&&Y!==null&&(H=zn(Y)),k=d.getDerivedStateFromProps,(Y=typeof k=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(A!==se||Q!==H)&&WM(l,S,p,H),ci=!1,Q=l.memoizedState,S.state=Q,md(l,p,S,y),pd();var X=l.memoizedState;A!==se||Q!==X||ci||i!==null&&i.dependencies!==null&&yp(i.dependencies)?(typeof k=="function"&&(wS(l,d,k,p),X=l.memoizedState),(ne=ci||VM(l,d,ne,p,Q,X,H)||i!==null&&i.dependencies!==null&&yp(i.dependencies))?(Y||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(p,X,H),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(p,X,H)),typeof S.componentDidUpdate=="function"&&(l.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof S.componentDidUpdate!="function"||A===i.memoizedProps&&Q===i.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||A===i.memoizedProps&&Q===i.memoizedState||(l.flags|=1024),l.memoizedProps=p,l.memoizedState=X),S.props=p,S.state=X,S.context=H,p=ne):(typeof S.componentDidUpdate!="function"||A===i.memoizedProps&&Q===i.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||A===i.memoizedProps&&Q===i.memoizedState||(l.flags|=1024),p=!1)}return S=p,Up(i,l),p=(l.flags&128)!==0,S||p?(S=l.stateNode,d=p&&typeof d.getDerivedStateFromError!="function"?null:S.render(),l.flags|=1,i!==null&&p?(l.child=Aa(l,i.child,null,y),l.child=Aa(l,null,d,y)):jn(i,l,d,y),l.memoizedState=S.state,i=l.child):i=ps(i,l,y),i}function aP(i,l,d,p){return Ca(),l.flags|=256,jn(i,l,d,p),l.child}var AS={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function RS(i){return{baseLanes:i,cachePool:YO()}}function TS(i,l,d){return i=i!==null?i.childLanes&~d:0,l&&(i|=kr),i}function lP(i,l,d){var p=l.pendingProps,y=!1,S=(l.flags&128)!==0,A;if((A=S)||(A=i!==null&&i.memoizedState===null?!1:(fn.current&2)!==0),A&&(y=!0,l.flags&=-129),A=(l.flags&32)!==0,l.flags&=-33,i===null){if(it){if(y?fi(l):hi(),(i=Bt)?(i=gN(i,Yr),i=i!==null&&i.data!=="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:si!==null?{id:No,overflow:ko}:null,retryLane:536870912,hydrationErrors:null},d=jO(i),d.return=l,l.child=d,$n=l,Bt=null)):i=null,i===null)throw ai(l);return d1(i)?l.lanes=32:l.lanes=536870912,null}var k=p.children;return p=p.fallback,y?(hi(),y=l.mode,k=Fp({mode:"hidden",children:k},y),p=Sa(p,y,d,null),k.return=l,p.return=l,k.sibling=p,l.child=k,p=l.child,p.memoizedState=RS(d),p.childLanes=TS(i,A,d),l.memoizedState=AS,Sd(null,p)):(fi(l),OS(l,k))}var H=i.memoizedState;if(H!==null&&(k=H.dehydrated,k!==null)){if(S)l.flags&256?(fi(l),l.flags&=-257,l=MS(i,l,d)):l.memoizedState!==null?(hi(),l.child=i.child,l.flags|=128,l=null):(hi(),k=p.fallback,y=l.mode,p=Fp({mode:"visible",children:p.children},y),k=Sa(k,y,d,null),k.flags|=2,p.return=l,k.return=l,p.sibling=k,l.child=p,Aa(l,i.child,null,d),p=l.child,p.memoizedState=RS(d),p.childLanes=TS(i,A,d),l.memoizedState=AS,l=Sd(null,p));else if(fi(l),d1(k)){if(A=k.nextSibling&&k.nextSibling.dataset,A)var Y=A.dgst;A=Y,p=Error(r(419)),p.stack="",p.digest=A,ld({value:p,source:null,stack:null}),l=MS(i,l,d)}else if(vn||Ql(i,l,d,!1),A=(d&i.childLanes)!==0,vn||A){if(A=$t,A!==null&&(p=K2(A,d),p!==0&&p!==H.retryLane))throw H.retryLane=p,ba(i,p),pr(A,i,p),_S;u1(k)||Gp(),l=MS(i,l,d)}else u1(k)?(l.flags|=192,l.child=i.child,l=null):(i=H.treeContext,Bt=Jr(k.nextSibling),$n=l,it=!0,ii=null,Yr=!1,i!==null&&qO(l,i),l=OS(l,p.children),l.flags|=4096);return l}return y?(hi(),k=p.fallback,y=l.mode,H=i.child,Y=H.sibling,p=ls(H,{mode:"hidden",children:p.children}),p.subtreeFlags=H.subtreeFlags&65011712,Y!==null?k=ls(Y,k):(k=Sa(k,y,d,null),k.flags|=2),k.return=l,p.return=l,p.sibling=k,l.child=p,Sd(null,p),p=l.child,k=i.child.memoizedState,k===null?k=RS(d):(y=k.cachePool,y!==null?(H=mn._currentValue,y=y.parent!==H?{parent:H,pool:H}:y):y=YO(),k={baseLanes:k.baseLanes|d,cachePool:y}),p.memoizedState=k,p.childLanes=TS(i,A,d),l.memoizedState=AS,Sd(i.child,p)):(fi(l),d=i.child,i=d.sibling,d=ls(d,{mode:"visible",children:p.children}),d.return=l,d.sibling=null,i!==null&&(A=l.deletions,A===null?(l.deletions=[i],l.flags|=16):A.push(i)),l.child=d,l.memoizedState=null,d)}function OS(i,l){return l=Fp({mode:"visible",children:l},i.mode),l.return=i,i.child=l}function Fp(i,l){return i=Or(22,i,null,l),i.lanes=0,i}function MS(i,l,d){return Aa(l,i.child,null,d),i=OS(l,l.pendingProps.children),i.flags|=2,l.memoizedState=null,i}function cP(i,l,d){i.lanes|=l;var p=i.alternate;p!==null&&(p.lanes|=l),W0(i.return,l,d)}function PS(i,l,d,p,y,S){var A=i.memoizedState;A===null?i.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:p,tail:d,tailMode:y,treeForkCount:S}:(A.isBackwards=l,A.rendering=null,A.renderingStartTime=0,A.last=p,A.tail=d,A.tailMode=y,A.treeForkCount=S)}function uP(i,l,d){var p=l.pendingProps,y=p.revealOrder,S=p.tail;p=p.children;var A=fn.current,k=(A&2)!==0;if(k?(A=A&1|2,l.flags|=128):A&=1,fe(fn,A),jn(i,l,p,d),p=it?ad:0,!k&&i!==null&&(i.flags&128)!==0)e:for(i=l.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&cP(i,d,l);else if(i.tag===19)cP(i,d,l);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break e;for(;i.sibling===null;){if(i.return===null||i.return===l)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(y){case"forwards":for(d=l.child,y=null;d!==null;)i=d.alternate,i!==null&&Ip(i)===null&&(y=d),d=d.sibling;d=y,d===null?(y=l.child,l.child=null):(y=d.sibling,d.sibling=null),PS(l,!1,y,d,S,p);break;case"backwards":case"unstable_legacy-backwards":for(d=null,y=l.child,l.child=null;y!==null;){if(i=y.alternate,i!==null&&Ip(i)===null){l.child=y;break}i=y.sibling,y.sibling=d,d=y,y=i}PS(l,!0,d,null,S,p);break;case"together":PS(l,!1,null,null,void 0,p);break;default:l.memoizedState=null}return l.child}function ps(i,l,d){if(i!==null&&(l.dependencies=i.dependencies),gi|=l.lanes,(d&l.childLanes)===0)if(i!==null){if(Ql(i,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(i!==null&&l.child!==i.child)throw Error(r(153));if(l.child!==null){for(i=l.child,d=ls(i,i.pendingProps),l.child=d,d.return=l;i.sibling!==null;)i=i.sibling,d=d.sibling=ls(i,i.pendingProps),d.return=l;d.sibling=null}return l.child}function NS(i,l){return(i.lanes&l)!==0?!0:(i=i.dependencies,!!(i!==null&&yp(i)))}function AK(i,l,d){switch(l.tag){case 3:le(l,l.stateNode.containerInfo),li(l,mn,i.memoizedState.cache),Ca();break;case 27:case 5:rt(l);break;case 4:le(l,l.stateNode.containerInfo);break;case 10:li(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,oS(l),null;break;case 13:var p=l.memoizedState;if(p!==null)return p.dehydrated!==null?(fi(l),l.flags|=128,null):(d&l.child.childLanes)!==0?lP(i,l,d):(fi(l),i=ps(i,l,d),i!==null?i.sibling:null);fi(l);break;case 19:var y=(i.flags&128)!==0;if(p=(d&l.childLanes)!==0,p||(Ql(i,l,d,!1),p=(d&l.childLanes)!==0),y){if(p)return uP(i,l,d);l.flags|=128}if(y=l.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),fe(fn,fn.current),p)break;return null;case 22:return l.lanes=0,nP(i,l,d,l.pendingProps);case 24:li(l,mn,i.memoizedState.cache)}return ps(i,l,d)}function dP(i,l,d){if(i!==null)if(i.memoizedProps!==l.pendingProps)vn=!0;else{if(!NS(i,d)&&(l.flags&128)===0)return vn=!1,AK(i,l,d);vn=(i.flags&131072)!==0}else vn=!1,it&&(l.flags&1048576)!==0&&HO(l,ad,l.index);switch(l.lanes=0,l.tag){case 16:e:{var p=l.pendingProps;if(i=_a(l.elementType),l.type=i,typeof i=="function")F0(i)?(p=Ta(i,p),l.tag=1,l=iP(null,l,i,p,d)):(l.tag=0,l=IS(null,l,i,p,d));else{if(i!=null){var y=i.$$typeof;if(y===O){l.tag=11,l=XM(null,l,i,p,d);break e}else if(y===M){l.tag=14,l=eP(null,l,i,p,d);break e}}throw l=J(i)||i,Error(r(306,l,""))}}return l;case 0:return IS(i,l,l.type,l.pendingProps,d);case 1:return p=l.type,y=Ta(p,l.pendingProps),iP(i,l,p,y,d);case 3:e:{if(le(l,l.stateNode.containerInfo),i===null)throw Error(r(387));p=l.pendingProps;var S=l.memoizedState;y=S.element,X0(i,l),md(l,p,null,d);var A=l.memoizedState;if(p=A.cache,li(l,mn,p),p!==S.cache&&G0(l,[mn],d,!0),pd(),p=A.element,S.isDehydrated)if(S={element:p,isDehydrated:!1,cache:A.cache},l.updateQueue.baseState=S,l.memoizedState=S,l.flags&256){l=aP(i,l,p,d);break e}else if(p!==y){y=Gr(Error(r(424)),l),ld(y),l=aP(i,l,p,d);break e}else for(i=l.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,Bt=Jr(i.firstChild),$n=l,it=!0,ii=null,Yr=!0,d=nM(l,null,p,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Ca(),p===y){l=ps(i,l,d);break e}jn(i,l,p,d)}l=l.child}return l;case 26:return Up(i,l),i===null?(d=wN(l.type,null,l.pendingProps,null))?l.memoizedState=d:it||(d=l.type,i=l.pendingProps,p=em(Fe.current).createElement(d),p[Fn]=l,p[lr]=i,Bn(p,d,i),Tn(p),l.stateNode=p):l.memoizedState=wN(l.type,i.memoizedProps,l.pendingProps,i.memoizedState),null;case 27:return rt(l),i===null&&it&&(p=l.stateNode=bN(l.type,l.pendingProps,Fe.current),$n=l,Yr=!0,y=Bt,Ci(l.type)?(f1=y,Bt=Jr(p.firstChild)):Bt=y),jn(i,l,l.pendingProps.children,d),Up(i,l),i===null&&(l.flags|=4194304),l.child;case 5:return i===null&&it&&((y=p=Bt)&&(p=rZ(p,l.type,l.pendingProps,Yr),p!==null?(l.stateNode=p,$n=l,Bt=Jr(p.firstChild),Yr=!1,y=!0):y=!1),y||ai(l)),rt(l),y=l.type,S=l.pendingProps,A=i!==null?i.memoizedProps:null,p=S.children,a1(y,S)?p=null:A!==null&&a1(y,A)&&(l.flags|=32),l.memoizedState!==null&&(y=iS(i,l,yK,null,null,d),Dd._currentValue=y),Up(i,l),jn(i,l,p,d),l.child;case 6:return i===null&&it&&((i=d=Bt)&&(d=oZ(d,l.pendingProps,Yr),d!==null?(l.stateNode=d,$n=l,Bt=null,i=!0):i=!1),i||ai(l)),null;case 13:return lP(i,l,d);case 4:return le(l,l.stateNode.containerInfo),p=l.pendingProps,i===null?l.child=Aa(l,null,p,d):jn(i,l,p,d),l.child;case 11:return XM(i,l,l.type,l.pendingProps,d);case 7:return jn(i,l,l.pendingProps,d),l.child;case 8:return jn(i,l,l.pendingProps.children,d),l.child;case 12:return jn(i,l,l.pendingProps.children,d),l.child;case 10:return p=l.pendingProps,li(l,l.type,p.value),jn(i,l,p.children,d),l.child;case 9:return y=l.type._context,p=l.pendingProps.children,Ea(l),y=zn(y),p=p(y),l.flags|=1,jn(i,l,p,d),l.child;case 14:return eP(i,l,l.type,l.pendingProps,d);case 15:return tP(i,l,l.type,l.pendingProps,d);case 19:return uP(i,l,d);case 31:return IK(i,l,d);case 22:return nP(i,l,d,l.pendingProps);case 24:return Ea(l),p=zn(mn),i===null?(y=Y0(),y===null&&(y=$t,S=K0(),y.pooledCache=S,S.refCount++,S!==null&&(y.pooledCacheLanes|=d),y=S),l.memoizedState={parent:p,cache:y},J0(l),li(l,mn,y)):((i.lanes&d)!==0&&(X0(i,l),md(l,null,null,d),pd()),y=i.memoizedState,S=l.memoizedState,y.parent!==p?(y={parent:p,cache:p},l.memoizedState=y,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=y),li(l,mn,p)):(p=S.cache,li(l,mn,p),p!==y.cache&&G0(l,[mn],d,!0))),jn(i,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function ms(i){i.flags|=4}function kS(i,l,d,p,y){if((l=(i.mode&32)!==0)&&(l=!1),l){if(i.flags|=16777216,(y&335544128)===y)if(i.stateNode.complete)i.flags|=8192;else if(FP())i.flags|=8192;else throw Ia=wp,Q0}else i.flags&=-16777217}function fP(i,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!AN(l))if(FP())i.flags|=8192;else throw Ia=wp,Q0}function $p(i,l){l!==null&&(i.flags|=4),i.flags&16384&&(l=i.tag!==22?V2():536870912,i.lanes|=l,cc|=l)}function Cd(i,l){if(!it)switch(i.tailMode){case"hidden":l=i.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?i.tail=null:d.sibling=null;break;case"collapsed":d=i.tail;for(var p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?l||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function Ht(i){var l=i.alternate!==null&&i.alternate.child===i.child,d=0,p=0;if(l)for(var y=i.child;y!==null;)d|=y.lanes|y.childLanes,p|=y.subtreeFlags&65011712,p|=y.flags&65011712,y.return=i,y=y.sibling;else for(y=i.child;y!==null;)d|=y.lanes|y.childLanes,p|=y.subtreeFlags,p|=y.flags,y.return=i,y=y.sibling;return i.subtreeFlags|=p,i.childLanes=d,l}function RK(i,l,d){var p=l.pendingProps;switch(B0(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ht(l),null;case 1:return Ht(l),null;case 3:return d=l.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),ds(mn),Re(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(i===null||i.child===null)&&(Yl(l)?ms(l):i===null||i.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,q0())),Ht(l),null;case 26:var y=l.type,S=l.memoizedState;return i===null?(ms(l),S!==null?(Ht(l),fP(l,S)):(Ht(l),kS(l,y,null,p,d))):S?S!==i.memoizedState?(ms(l),Ht(l),fP(l,S)):(Ht(l),l.flags&=-16777217):(i=i.memoizedProps,i!==p&&ms(l),Ht(l),kS(l,y,i,p,d)),null;case 27:if(xe(l),d=Fe.current,y=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==p&&ms(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return Ht(l),null}i=ae.current,Yl(l)?VO(l):(i=bN(y,p,d),l.stateNode=i,ms(l))}return Ht(l),null;case 5:if(xe(l),y=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==p&&ms(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return Ht(l),null}if(S=ae.current,Yl(l))VO(l);else{var A=em(Fe.current);switch(S){case 1:S=A.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:S=A.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":S=A.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":S=A.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":S=A.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof p.is=="string"?A.createElement("select",{is:p.is}):A.createElement("select"),p.multiple?S.multiple=!0:p.size&&(S.size=p.size);break;default:S=typeof p.is=="string"?A.createElement(y,{is:p.is}):A.createElement(y)}}S[Fn]=l,S[lr]=p;e:for(A=l.child;A!==null;){if(A.tag===5||A.tag===6)S.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===l)break e;for(;A.sibling===null;){if(A.return===null||A.return===l)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}l.stateNode=S;e:switch(Bn(S,y,p),y){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&ms(l)}}return Ht(l),kS(l,l.type,i===null?null:i.memoizedProps,l.pendingProps,d),null;case 6:if(i&&l.stateNode!=null)i.memoizedProps!==p&&ms(l);else{if(typeof p!="string"&&l.stateNode===null)throw Error(r(166));if(i=Fe.current,Yl(l)){if(i=l.stateNode,d=l.memoizedProps,p=null,y=$n,y!==null)switch(y.tag){case 27:case 5:p=y.memoizedProps}i[Fn]=l,i=!!(i.nodeValue===d||p!==null&&p.suppressHydrationWarning===!0||lN(i.nodeValue,d)),i||ai(l,!0)}else i=em(i).createTextNode(p),i[Fn]=l,l.stateNode=i}return Ht(l),null;case 31:if(d=l.memoizedState,i===null||i.memoizedState!==null){if(p=Yl(l),d!==null){if(i===null){if(!p)throw Error(r(318));if(i=l.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Fn]=l}else Ca(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ht(l),i=!1}else d=q0(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=d),i=!0;if(!i)return l.flags&256?(Pr(l),l):(Pr(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Ht(l),null;case 13:if(p=l.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(y=Yl(l),p!==null&&p.dehydrated!==null){if(i===null){if(!y)throw Error(r(318));if(y=l.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[Fn]=l}else Ca(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ht(l),y=!1}else y=q0(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=y),y=!0;if(!y)return l.flags&256?(Pr(l),l):(Pr(l),null)}return Pr(l),(l.flags&128)!==0?(l.lanes=d,l):(d=p!==null,i=i!==null&&i.memoizedState!==null,d&&(p=l.child,y=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(y=p.alternate.memoizedState.cachePool.pool),S=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(S=p.memoizedState.cachePool.pool),S!==y&&(p.flags|=2048)),d!==i&&d&&(l.child.flags|=8192),$p(l,l.updateQueue),Ht(l),null);case 4:return Re(),i===null&&n1(l.stateNode.containerInfo),Ht(l),null;case 10:return ds(l.type),Ht(l),null;case 19:if(te(fn),p=l.memoizedState,p===null)return Ht(l),null;if(y=(l.flags&128)!==0,S=p.rendering,S===null)if(y)Cd(p,!1);else{if(un!==0||i!==null&&(i.flags&128)!==0)for(i=l.child;i!==null;){if(S=Ip(i),S!==null){for(l.flags|=128,Cd(p,!1),i=S.updateQueue,l.updateQueue=i,$p(l,i),l.subtreeFlags=0,i=d,d=l.child;d!==null;)zO(d,i),d=d.sibling;return fe(fn,fn.current&1|2),it&&cs(l,p.treeForkCount),l.child}i=i.sibling}p.tail!==null&&Kn()>qp&&(l.flags|=128,y=!0,Cd(p,!1),l.lanes=4194304)}else{if(!y)if(i=Ip(S),i!==null){if(l.flags|=128,y=!0,i=i.updateQueue,l.updateQueue=i,$p(l,i),Cd(p,!0),p.tail===null&&p.tailMode==="hidden"&&!S.alternate&&!it)return Ht(l),null}else 2*Kn()-p.renderingStartTime>qp&&d!==536870912&&(l.flags|=128,y=!0,Cd(p,!1),l.lanes=4194304);p.isBackwards?(S.sibling=l.child,l.child=S):(i=p.last,i!==null?i.sibling=S:l.child=S,p.last=S)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=Kn(),i.sibling=null,d=fn.current,fe(fn,y?d&1|2:d&1),it&&cs(l,p.treeForkCount),i):(Ht(l),null);case 22:case 23:return Pr(l),rS(),p=l.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(l.flags|=8192):p&&(l.flags|=8192),p?(d&536870912)!==0&&(l.flags&128)===0&&(Ht(l),l.subtreeFlags&6&&(l.flags|=8192)):Ht(l),d=l.updateQueue,d!==null&&$p(l,d.retryQueue),d=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),p=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==d&&(l.flags|=2048),i!==null&&te(xa),null;case 24:return d=null,i!==null&&(d=i.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),ds(mn),Ht(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function TK(i,l){switch(B0(l),l.tag){case 1:return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 3:return ds(mn),Re(),i=l.flags,(i&65536)!==0&&(i&128)===0?(l.flags=i&-65537|128,l):null;case 26:case 27:case 5:return xe(l),null;case 31:if(l.memoizedState!==null){if(Pr(l),l.alternate===null)throw Error(r(340));Ca()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 13:if(Pr(l),i=l.memoizedState,i!==null&&i.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Ca()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return te(fn),null;case 4:return Re(),null;case 10:return ds(l.type),null;case 22:case 23:return Pr(l),rS(),i!==null&&te(xa),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 24:return ds(mn),null;case 25:return null;default:return null}}function hP(i,l){switch(B0(l),l.tag){case 3:ds(mn),Re();break;case 26:case 27:case 5:xe(l);break;case 4:Re();break;case 31:l.memoizedState!==null&&Pr(l);break;case 13:Pr(l);break;case 19:te(fn);break;case 10:ds(l.type);break;case 22:case 23:Pr(l),rS(),i!==null&&te(xa);break;case 24:ds(mn)}}function wd(i,l){try{var d=l.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var y=p.next;d=y;do{if((d.tag&i)===i){p=void 0;var S=d.create,A=d.inst;p=S(),A.destroy=p}d=d.next}while(d!==y)}}catch(k){Rt(l,l.return,k)}}function pi(i,l,d){try{var p=l.updateQueue,y=p!==null?p.lastEffect:null;if(y!==null){var S=y.next;p=S;do{if((p.tag&i)===i){var A=p.inst,k=A.destroy;if(k!==void 0){A.destroy=void 0,y=l;var H=d,Y=k;try{Y()}catch(ne){Rt(y,H,ne)}}}p=p.next}while(p!==S)}}catch(ne){Rt(l,l.return,ne)}}function pP(i){var l=i.updateQueue;if(l!==null){var d=i.stateNode;try{oM(l,d)}catch(p){Rt(i,i.return,p)}}}function mP(i,l,d){d.props=Ta(i.type,i.memoizedProps),d.state=i.memoizedState;try{d.componentWillUnmount()}catch(p){Rt(i,l,p)}}function Ed(i,l){try{var d=i.ref;if(d!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof d=="function"?i.refCleanup=d(p):d.current=p}}catch(y){Rt(i,l,y)}}function Do(i,l){var d=i.ref,p=i.refCleanup;if(d!==null)if(typeof p=="function")try{p()}catch(y){Rt(i,l,y)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(y){Rt(i,l,y)}else d.current=null}function gP(i){var l=i.type,d=i.memoizedProps,p=i.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&p.focus();break e;case"img":d.src?p.src=d.src:d.srcSet&&(p.srcset=d.srcSet)}}catch(y){Rt(i,i.return,y)}}function DS(i,l,d){try{var p=i.stateNode;QK(p,i.type,d,l),p[lr]=l}catch(y){Rt(i,i.return,y)}}function vP(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Ci(i.type)||i.tag===4}function LS(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||vP(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Ci(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function US(i,l,d){var p=i.tag;if(p===5||p===6)i=i.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(i,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(i),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=is));else if(p!==4&&(p===27&&Ci(i.type)&&(d=i.stateNode,l=null),i=i.child,i!==null))for(US(i,l,d),i=i.sibling;i!==null;)US(i,l,d),i=i.sibling}function zp(i,l,d){var p=i.tag;if(p===5||p===6)i=i.stateNode,l?d.insertBefore(i,l):d.appendChild(i);else if(p!==4&&(p===27&&Ci(i.type)&&(d=i.stateNode),i=i.child,i!==null))for(zp(i,l,d),i=i.sibling;i!==null;)zp(i,l,d),i=i.sibling}function yP(i){var l=i.stateNode,d=i.memoizedProps;try{for(var p=i.type,y=l.attributes;y.length;)l.removeAttributeNode(y[0]);Bn(l,p,d),l[Fn]=i,l[lr]=d}catch(S){Rt(i,i.return,S)}}var gs=!1,yn=!1,FS=!1,bP=typeof WeakSet=="function"?WeakSet:Set,On=null;function OK(i,l){if(i=i.containerInfo,s1=am,i=MO(i),M0(i)){if("selectionStart"in i)var d={start:i.selectionStart,end:i.selectionEnd};else e:{d=(d=i.ownerDocument)&&d.defaultView||window;var p=d.getSelection&&d.getSelection();if(p&&p.rangeCount!==0){d=p.anchorNode;var y=p.anchorOffset,S=p.focusNode;p=p.focusOffset;try{d.nodeType,S.nodeType}catch{d=null;break e}var A=0,k=-1,H=-1,Y=0,ne=0,se=i,Q=null;t:for(;;){for(var X;se!==d||y!==0&&se.nodeType!==3||(k=A+y),se!==S||p!==0&&se.nodeType!==3||(H=A+p),se.nodeType===3&&(A+=se.nodeValue.length),(X=se.firstChild)!==null;)Q=se,se=X;for(;;){if(se===i)break t;if(Q===d&&++Y===y&&(k=A),Q===S&&++ne===p&&(H=A),(X=se.nextSibling)!==null)break;se=Q,Q=se.parentNode}se=X}d=k===-1||H===-1?null:{start:k,end:H}}else d=null}d=d||{start:0,end:0}}else d=null;for(i1={focusedElem:i,selectionRange:d},am=!1,On=l;On!==null;)if(l=On,i=l.child,(l.subtreeFlags&1028)!==0&&i!==null)i.return=l,On=i;else for(;On!==null;){switch(l=On,S=l.alternate,i=l.flags,l.tag){case 0:if((i&4)!==0&&(i=l.updateQueue,i=i!==null?i.events:null,i!==null))for(d=0;d<i.length;d++)y=i[d],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&S!==null){i=void 0,d=l,y=S.memoizedProps,S=S.memoizedState,p=d.stateNode;try{var Ie=Ta(d.type,y);i=p.getSnapshotBeforeUpdate(Ie,S),p.__reactInternalSnapshotBeforeUpdate=i}catch(Le){Rt(d,d.return,Le)}}break;case 3:if((i&1024)!==0){if(i=l.stateNode.containerInfo,d=i.nodeType,d===9)c1(i);else if(d===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":c1(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=l.sibling,i!==null){i.return=l.return,On=i;break}On=l.return}}function SP(i,l,d){var p=d.flags;switch(d.tag){case 0:case 11:case 15:ys(i,d),p&4&&wd(5,d);break;case 1:if(ys(i,d),p&4)if(i=d.stateNode,l===null)try{i.componentDidMount()}catch(A){Rt(d,d.return,A)}else{var y=Ta(d.type,l.memoizedProps);l=l.memoizedState;try{i.componentDidUpdate(y,l,i.__reactInternalSnapshotBeforeUpdate)}catch(A){Rt(d,d.return,A)}}p&64&&pP(d),p&512&&Ed(d,d.return);break;case 3:if(ys(i,d),p&64&&(i=d.updateQueue,i!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{oM(i,l)}catch(A){Rt(d,d.return,A)}}break;case 27:l===null&&p&4&&yP(d);case 26:case 5:ys(i,d),l===null&&p&4&&gP(d),p&512&&Ed(d,d.return);break;case 12:ys(i,d);break;case 31:ys(i,d),p&4&&EP(i,d);break;case 13:ys(i,d),p&4&&xP(i,d),p&64&&(i=d.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(d=$K.bind(null,d),sZ(i,d))));break;case 22:if(p=d.memoizedState!==null||gs,!p){l=l!==null&&l.memoizedState!==null||yn,y=gs;var S=yn;gs=p,(yn=l)&&!S?bs(i,d,(d.subtreeFlags&8772)!==0):ys(i,d),gs=y,yn=S}break;case 30:break;default:ys(i,d)}}function CP(i){var l=i.alternate;l!==null&&(i.alternate=null,CP(l)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(l=i.stateNode,l!==null&&p0(l)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var Qt=null,ur=!1;function vs(i,l,d){for(d=d.child;d!==null;)wP(i,l,d),d=d.sibling}function wP(i,l,d){if(Ar&&typeof Ar.onCommitFiberUnmount=="function")try{Ar.onCommitFiberUnmount(Gu,d)}catch{}switch(d.tag){case 26:yn||Do(d,l),vs(i,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:yn||Do(d,l);var p=Qt,y=ur;Ci(d.type)&&(Qt=d.stateNode,ur=!1),vs(i,l,d),Pd(d.stateNode),Qt=p,ur=y;break;case 5:yn||Do(d,l);case 6:if(p=Qt,y=ur,Qt=null,vs(i,l,d),Qt=p,ur=y,Qt!==null)if(ur)try{(Qt.nodeType===9?Qt.body:Qt.nodeName==="HTML"?Qt.ownerDocument.body:Qt).removeChild(d.stateNode)}catch(S){Rt(d,l,S)}else try{Qt.removeChild(d.stateNode)}catch(S){Rt(d,l,S)}break;case 18:Qt!==null&&(ur?(i=Qt,pN(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,d.stateNode),vc(i)):pN(Qt,d.stateNode));break;case 4:p=Qt,y=ur,Qt=d.stateNode.containerInfo,ur=!0,vs(i,l,d),Qt=p,ur=y;break;case 0:case 11:case 14:case 15:pi(2,d,l),yn||pi(4,d,l),vs(i,l,d);break;case 1:yn||(Do(d,l),p=d.stateNode,typeof p.componentWillUnmount=="function"&&mP(d,l,p)),vs(i,l,d);break;case 21:vs(i,l,d);break;case 22:yn=(p=yn)||d.memoizedState!==null,vs(i,l,d),yn=p;break;default:vs(i,l,d)}}function EP(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{vc(i)}catch(d){Rt(l,l.return,d)}}}function xP(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{vc(i)}catch(d){Rt(l,l.return,d)}}function MK(i){switch(i.tag){case 31:case 13:case 19:var l=i.stateNode;return l===null&&(l=i.stateNode=new bP),l;case 22:return i=i.stateNode,l=i._retryCache,l===null&&(l=i._retryCache=new bP),l;default:throw Error(r(435,i.tag))}}function jp(i,l){var d=MK(i);l.forEach(function(p){if(!d.has(p)){d.add(p);var y=zK.bind(null,i,p);p.then(y,y)}})}function dr(i,l){var d=l.deletions;if(d!==null)for(var p=0;p<d.length;p++){var y=d[p],S=i,A=l,k=A;e:for(;k!==null;){switch(k.tag){case 27:if(Ci(k.type)){Qt=k.stateNode,ur=!1;break e}break;case 5:Qt=k.stateNode,ur=!1;break e;case 3:case 4:Qt=k.stateNode.containerInfo,ur=!0;break e}k=k.return}if(Qt===null)throw Error(r(160));wP(S,A,y),Qt=null,ur=!1,S=y.alternate,S!==null&&(S.return=null),y.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)_P(l,i),l=l.sibling}var mo=null;function _P(i,l){var d=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:dr(l,i),fr(i),p&4&&(pi(3,i,i.return),wd(3,i),pi(5,i,i.return));break;case 1:dr(l,i),fr(i),p&512&&(yn||d===null||Do(d,d.return)),p&64&&gs&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(d=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=d===null?p:d.concat(p))));break;case 26:var y=mo;if(dr(l,i),fr(i),p&512&&(yn||d===null||Do(d,d.return)),p&4){var S=d!==null?d.memoizedState:null;if(p=i.memoizedState,d===null)if(p===null)if(i.stateNode===null){e:{p=i.type,d=i.memoizedProps,y=y.ownerDocument||y;t:switch(p){case"title":S=y.getElementsByTagName("title")[0],(!S||S[Yu]||S[Fn]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=y.createElement(p),y.head.insertBefore(S,y.querySelector("head > title"))),Bn(S,p,d),S[Fn]=i,Tn(S),p=S;break e;case"link":var A=_N("link","href",y).get(p+(d.href||""));if(A){for(var k=0;k<A.length;k++)if(S=A[k],S.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&S.getAttribute("rel")===(d.rel==null?null:d.rel)&&S.getAttribute("title")===(d.title==null?null:d.title)&&S.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){A.splice(k,1);break t}}S=y.createElement(p),Bn(S,p,d),y.head.appendChild(S);break;case"meta":if(A=_N("meta","content",y).get(p+(d.content||""))){for(k=0;k<A.length;k++)if(S=A[k],S.getAttribute("content")===(d.content==null?null:""+d.content)&&S.getAttribute("name")===(d.name==null?null:d.name)&&S.getAttribute("property")===(d.property==null?null:d.property)&&S.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&S.getAttribute("charset")===(d.charSet==null?null:d.charSet)){A.splice(k,1);break t}}S=y.createElement(p),Bn(S,p,d),y.head.appendChild(S);break;default:throw Error(r(468,p))}S[Fn]=i,Tn(S),p=S}i.stateNode=p}else IN(y,i.type,i.stateNode);else i.stateNode=xN(y,p,i.memoizedProps);else S!==p?(S===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):S.count--,p===null?IN(y,i.type,i.stateNode):xN(y,p,i.memoizedProps)):p===null&&i.stateNode!==null&&DS(i,i.memoizedProps,d.memoizedProps)}break;case 27:dr(l,i),fr(i),p&512&&(yn||d===null||Do(d,d.return)),d!==null&&p&4&&DS(i,i.memoizedProps,d.memoizedProps);break;case 5:if(dr(l,i),fr(i),p&512&&(yn||d===null||Do(d,d.return)),i.flags&32){y=i.stateNode;try{zl(y,"")}catch(Ie){Rt(i,i.return,Ie)}}p&4&&i.stateNode!=null&&(y=i.memoizedProps,DS(i,y,d!==null?d.memoizedProps:y)),p&1024&&(FS=!0);break;case 6:if(dr(l,i),fr(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,d=i.stateNode;try{d.nodeValue=p}catch(Ie){Rt(i,i.return,Ie)}}break;case 3:if(rm=null,y=mo,mo=tm(l.containerInfo),dr(l,i),mo=y,fr(i),p&4&&d!==null&&d.memoizedState.isDehydrated)try{vc(l.containerInfo)}catch(Ie){Rt(i,i.return,Ie)}FS&&(FS=!1,IP(i));break;case 4:p=mo,mo=tm(i.stateNode.containerInfo),dr(l,i),fr(i),mo=p;break;case 12:dr(l,i),fr(i);break;case 31:dr(l,i),fr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,jp(i,p)));break;case 13:dr(l,i),fr(i),i.child.flags&8192&&i.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Hp=Kn()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,jp(i,p)));break;case 22:y=i.memoizedState!==null;var H=d!==null&&d.memoizedState!==null,Y=gs,ne=yn;if(gs=Y||y,yn=ne||H,dr(l,i),yn=ne,gs=Y,fr(i),p&8192)e:for(l=i.stateNode,l._visibility=y?l._visibility&-2:l._visibility|1,y&&(d===null||H||gs||yn||Oa(i)),d=null,l=i;;){if(l.tag===5||l.tag===26){if(d===null){H=d=l;try{if(S=H.stateNode,y)A=S.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{k=H.stateNode;var se=H.memoizedProps.style,Q=se!=null&&se.hasOwnProperty("display")?se.display:null;k.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(Ie){Rt(H,H.return,Ie)}}}else if(l.tag===6){if(d===null){H=l;try{H.stateNode.nodeValue=y?"":H.memoizedProps}catch(Ie){Rt(H,H.return,Ie)}}}else if(l.tag===18){if(d===null){H=l;try{var X=H.stateNode;y?mN(X,!0):mN(H.stateNode,!1)}catch(Ie){Rt(H,H.return,Ie)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===i)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break e;for(;l.sibling===null;){if(l.return===null||l.return===i)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}p&4&&(p=i.updateQueue,p!==null&&(d=p.retryQueue,d!==null&&(p.retryQueue=null,jp(i,d))));break;case 19:dr(l,i),fr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,jp(i,p)));break;case 30:break;case 21:break;default:dr(l,i),fr(i)}}function fr(i){var l=i.flags;if(l&2){try{for(var d,p=i.return;p!==null;){if(vP(p)){d=p;break}p=p.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var y=d.stateNode,S=LS(i);zp(i,S,y);break;case 5:var A=d.stateNode;d.flags&32&&(zl(A,""),d.flags&=-33);var k=LS(i);zp(i,k,A);break;case 3:case 4:var H=d.stateNode.containerInfo,Y=LS(i);US(i,Y,H);break;default:throw Error(r(161))}}catch(ne){Rt(i,i.return,ne)}i.flags&=-3}l&4096&&(i.flags&=-4097)}function IP(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var l=i;IP(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),i=i.sibling}}function ys(i,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)SP(i,l.alternate,l),l=l.sibling}function Oa(i){for(i=i.child;i!==null;){var l=i;switch(l.tag){case 0:case 11:case 14:case 15:pi(4,l,l.return),Oa(l);break;case 1:Do(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&mP(l,l.return,d),Oa(l);break;case 27:Pd(l.stateNode);case 26:case 5:Do(l,l.return),Oa(l);break;case 22:l.memoizedState===null&&Oa(l);break;case 30:Oa(l);break;default:Oa(l)}i=i.sibling}}function bs(i,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var p=l.alternate,y=i,S=l,A=S.flags;switch(S.tag){case 0:case 11:case 15:bs(y,S,d),wd(4,S);break;case 1:if(bs(y,S,d),p=S,y=p.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(Y){Rt(p,p.return,Y)}if(p=S,y=p.updateQueue,y!==null){var k=p.stateNode;try{var H=y.shared.hiddenCallbacks;if(H!==null)for(y.shared.hiddenCallbacks=null,y=0;y<H.length;y++)rM(H[y],k)}catch(Y){Rt(p,p.return,Y)}}d&&A&64&&pP(S),Ed(S,S.return);break;case 27:yP(S);case 26:case 5:bs(y,S,d),d&&p===null&&A&4&&gP(S),Ed(S,S.return);break;case 12:bs(y,S,d);break;case 31:bs(y,S,d),d&&A&4&&EP(y,S);break;case 13:bs(y,S,d),d&&A&4&&xP(y,S);break;case 22:S.memoizedState===null&&bs(y,S,d),Ed(S,S.return);break;case 30:break;default:bs(y,S,d)}l=l.sibling}}function $S(i,l){var d=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==d&&(i!=null&&i.refCount++,d!=null&&cd(d))}function zS(i,l){i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&cd(i))}function go(i,l,d,p){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)AP(i,l,d,p),l=l.sibling}function AP(i,l,d,p){var y=l.flags;switch(l.tag){case 0:case 11:case 15:go(i,l,d,p),y&2048&&wd(9,l);break;case 1:go(i,l,d,p);break;case 3:go(i,l,d,p),y&2048&&(i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&cd(i)));break;case 12:if(y&2048){go(i,l,d,p),i=l.stateNode;try{var S=l.memoizedProps,A=S.id,k=S.onPostCommit;typeof k=="function"&&k(A,l.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(H){Rt(l,l.return,H)}}else go(i,l,d,p);break;case 31:go(i,l,d,p);break;case 13:go(i,l,d,p);break;case 23:break;case 22:S=l.stateNode,A=l.alternate,l.memoizedState!==null?S._visibility&2?go(i,l,d,p):xd(i,l):S._visibility&2?go(i,l,d,p):(S._visibility|=2,ic(i,l,d,p,(l.subtreeFlags&10256)!==0||!1)),y&2048&&$S(A,l);break;case 24:go(i,l,d,p),y&2048&&zS(l.alternate,l);break;default:go(i,l,d,p)}}function ic(i,l,d,p,y){for(y=y&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var S=i,A=l,k=d,H=p,Y=A.flags;switch(A.tag){case 0:case 11:case 15:ic(S,A,k,H,y),wd(8,A);break;case 23:break;case 22:var ne=A.stateNode;A.memoizedState!==null?ne._visibility&2?ic(S,A,k,H,y):xd(S,A):(ne._visibility|=2,ic(S,A,k,H,y)),y&&Y&2048&&$S(A.alternate,A);break;case 24:ic(S,A,k,H,y),y&&Y&2048&&zS(A.alternate,A);break;default:ic(S,A,k,H,y)}l=l.sibling}}function xd(i,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=i,p=l,y=p.flags;switch(p.tag){case 22:xd(d,p),y&2048&&$S(p.alternate,p);break;case 24:xd(d,p),y&2048&&zS(p.alternate,p);break;default:xd(d,p)}l=l.sibling}}var _d=8192;function ac(i,l,d){if(i.subtreeFlags&_d)for(i=i.child;i!==null;)RP(i,l,d),i=i.sibling}function RP(i,l,d){switch(i.tag){case 26:ac(i,l,d),i.flags&_d&&i.memoizedState!==null&&vZ(d,mo,i.memoizedState,i.memoizedProps);break;case 5:ac(i,l,d);break;case 3:case 4:var p=mo;mo=tm(i.stateNode.containerInfo),ac(i,l,d),mo=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=_d,_d=16777216,ac(i,l,d),_d=p):ac(i,l,d));break;default:ac(i,l,d)}}function TP(i){var l=i.alternate;if(l!==null&&(i=l.child,i!==null)){l.child=null;do l=i.sibling,i.sibling=null,i=l;while(i!==null)}}function Id(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];On=p,MP(p,i)}TP(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)OP(i),i=i.sibling}function OP(i){switch(i.tag){case 0:case 11:case 15:Id(i),i.flags&2048&&pi(9,i,i.return);break;case 3:Id(i);break;case 12:Id(i);break;case 22:var l=i.stateNode;i.memoizedState!==null&&l._visibility&2&&(i.return===null||i.return.tag!==13)?(l._visibility&=-3,Bp(i)):Id(i);break;default:Id(i)}}function Bp(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];On=p,MP(p,i)}TP(i)}for(i=i.child;i!==null;){switch(l=i,l.tag){case 0:case 11:case 15:pi(8,l,l.return),Bp(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,Bp(l));break;default:Bp(l)}i=i.sibling}}function MP(i,l){for(;On!==null;){var d=On;switch(d.tag){case 0:case 11:case 15:pi(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var p=d.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:cd(d.memoizedState.cache)}if(p=d.child,p!==null)p.return=d,On=p;else e:for(d=i;On!==null;){p=On;var y=p.sibling,S=p.return;if(CP(p),p===d){On=null;break e}if(y!==null){y.return=S,On=y;break e}On=S}}}var PK={getCacheForType:function(i){var l=zn(mn),d=l.data.get(i);return d===void 0&&(d=i(),l.data.set(i,d)),d},cacheSignal:function(){return zn(mn).controller.signal}},NK=typeof WeakMap=="function"?WeakMap:Map,bt=0,$t=null,Je=null,tt=0,At=0,Nr=null,mi=!1,lc=!1,jS=!1,Ss=0,un=0,gi=0,Ma=0,BS=0,kr=0,cc=0,Ad=null,hr=null,HS=!1,Hp=0,PP=0,qp=1/0,Vp=null,vi=null,xn=0,yi=null,uc=null,Cs=0,qS=0,VS=null,NP=null,Rd=0,WS=null;function Dr(){return(bt&2)!==0&&tt!==0?tt&-tt:V.T!==null?JS():Z2()}function kP(){if(kr===0)if((tt&536870912)===0||it){var i=Xh;Xh<<=1,(Xh&3932160)===0&&(Xh=262144),kr=i}else kr=536870912;return i=Mr.current,i!==null&&(i.flags|=32),kr}function pr(i,l,d){(i===$t&&(At===2||At===9)||i.cancelPendingCommit!==null)&&(dc(i,0),bi(i,tt,kr,!1)),Zu(i,d),((bt&2)===0||i!==$t)&&(i===$t&&((bt&2)===0&&(Ma|=d),un===4&&bi(i,tt,kr,!1)),Lo(i))}function DP(i,l,d){if((bt&6)!==0)throw Error(r(327));var p=!d&&(l&127)===0&&(l&i.expiredLanes)===0||Ku(i,l),y=p?LK(i,l):KS(i,l,!0),S=p;do{if(y===0){lc&&!p&&bi(i,l,0,!1);break}else{if(d=i.current.alternate,S&&!kK(d)){y=KS(i,l,!1),S=!1;continue}if(y===2){if(S=l,i.errorRecoveryDisabledLanes&S)var A=0;else A=i.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){l=A;e:{var k=i;y=Ad;var H=k.current.memoizedState.isDehydrated;if(H&&(dc(k,A).flags|=256),A=KS(k,A,!1),A!==2){if(jS&&!H){k.errorRecoveryDisabledLanes|=S,Ma|=S,y=4;break e}S=hr,hr=y,S!==null&&(hr===null?hr=S:hr.push.apply(hr,S))}y=A}if(S=!1,y!==2)continue}}if(y===1){dc(i,0),bi(i,l,0,!0);break}e:{switch(p=i,S=y,S){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:bi(p,l,kr,!mi);break e;case 2:hr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(y=Hp+300-Kn(),10<y)){if(bi(p,l,kr,!mi),tp(p,0,!0)!==0)break e;Cs=l,p.timeoutHandle=fN(LP.bind(null,p,d,hr,Vp,HS,l,kr,Ma,cc,mi,S,"Throttled",-0,0),y);break e}LP(p,d,hr,Vp,HS,l,kr,Ma,cc,mi,S,null,-0,0)}}break}while(!0);Lo(i)}function LP(i,l,d,p,y,S,A,k,H,Y,ne,se,Q,X){if(i.timeoutHandle=-1,se=l.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:is},RP(l,S,se);var Ie=(S&62914560)===S?Hp-Kn():(S&4194048)===S?PP-Kn():0;if(Ie=yZ(se,Ie),Ie!==null){Cs=S,i.cancelPendingCommit=Ie(qP.bind(null,i,l,S,d,p,y,A,k,H,ne,se,null,Q,X)),bi(i,S,A,!Y);return}}qP(i,l,S,d,p,y,A,k,H)}function kK(i){for(var l=i;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var p=0;p<d.length;p++){var y=d[p],S=y.getSnapshot;y=y.value;try{if(!Tr(S(),y))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function bi(i,l,d,p){l&=~BS,l&=~Ma,i.suspendedLanes|=l,i.pingedLanes&=~l,p&&(i.warmLanes|=l),p=i.expirationTimes;for(var y=l;0<y;){var S=31-Rr(y),A=1<<S;p[S]=-1,y&=~A}d!==0&&W2(i,d,l)}function Wp(){return(bt&6)===0?(Td(0),!1):!0}function GS(){if(Je!==null){if(At===0)var i=Je.return;else i=Je,us=wa=null,cS(i),tc=null,dd=0,i=Je;for(;i!==null;)hP(i.alternate,i),i=i.return;Je=null}}function dc(i,l){var d=i.timeoutHandle;d!==-1&&(i.timeoutHandle=-1,eZ(d)),d=i.cancelPendingCommit,d!==null&&(i.cancelPendingCommit=null,d()),Cs=0,GS(),$t=i,Je=d=ls(i.current,null),tt=l,At=0,Nr=null,mi=!1,lc=Ku(i,l),jS=!1,cc=kr=BS=Ma=gi=un=0,hr=Ad=null,HS=!1,(l&8)!==0&&(l|=l&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=l;0<p;){var y=31-Rr(p),S=1<<y;l|=i[y],p&=~S}return Ss=l,hp(),d}function UP(i,l){Ge=null,V.H=bd,l===ec||l===Cp?(l=XO(),At=3):l===Q0?(l=XO(),At=4):At=l===_S?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Nr=l,Je===null&&(un=1,Dp(i,Gr(l,i.current)))}function FP(){var i=Mr.current;return i===null?!0:(tt&4194048)===tt?Qr===null:(tt&62914560)===tt||(tt&536870912)!==0?i===Qr:!1}function $P(){var i=V.H;return V.H=bd,i===null?bd:i}function zP(){var i=V.A;return V.A=PK,i}function Gp(){un=4,mi||(tt&4194048)!==tt&&Mr.current!==null||(lc=!0),(gi&134217727)===0&&(Ma&134217727)===0||$t===null||bi($t,tt,kr,!1)}function KS(i,l,d){var p=bt;bt|=2;var y=$P(),S=zP();($t!==i||tt!==l)&&(Vp=null,dc(i,l)),l=!1;var A=un;e:do try{if(At!==0&&Je!==null){var k=Je,H=Nr;switch(At){case 8:GS(),A=6;break e;case 3:case 2:case 9:case 6:Mr.current===null&&(l=!0);var Y=At;if(At=0,Nr=null,fc(i,k,H,Y),d&&lc){A=0;break e}break;default:Y=At,At=0,Nr=null,fc(i,k,H,Y)}}DK(),A=un;break}catch(ne){UP(i,ne)}while(!0);return l&&i.shellSuspendCounter++,us=wa=null,bt=p,V.H=y,V.A=S,Je===null&&($t=null,tt=0,hp()),A}function DK(){for(;Je!==null;)jP(Je)}function LK(i,l){var d=bt;bt|=2;var p=$P(),y=zP();$t!==i||tt!==l?(Vp=null,qp=Kn()+500,dc(i,l)):lc=Ku(i,l);e:do try{if(At!==0&&Je!==null){l=Je;var S=Nr;t:switch(At){case 1:At=0,Nr=null,fc(i,l,S,1);break;case 2:case 9:if(QO(S)){At=0,Nr=null,BP(l);break}l=function(){At!==2&&At!==9||$t!==i||(At=7),Lo(i)},S.then(l,l);break e;case 3:At=7;break e;case 4:At=5;break e;case 7:QO(S)?(At=0,Nr=null,BP(l)):(At=0,Nr=null,fc(i,l,S,7));break;case 5:var A=null;switch(Je.tag){case 26:A=Je.memoizedState;case 5:case 27:var k=Je;if(A?AN(A):k.stateNode.complete){At=0,Nr=null;var H=k.sibling;if(H!==null)Je=H;else{var Y=k.return;Y!==null?(Je=Y,Kp(Y)):Je=null}break t}}At=0,Nr=null,fc(i,l,S,5);break;case 6:At=0,Nr=null,fc(i,l,S,6);break;case 8:GS(),un=6;break e;default:throw Error(r(462))}}UK();break}catch(ne){UP(i,ne)}while(!0);return us=wa=null,V.H=p,V.A=y,bt=d,Je!==null?0:($t=null,tt=0,hp(),un)}function UK(){for(;Je!==null&&!Qh();)jP(Je)}function jP(i){var l=dP(i.alternate,i,Ss);i.memoizedProps=i.pendingProps,l===null?Kp(i):Je=l}function BP(i){var l=i,d=l.alternate;switch(l.tag){case 15:case 0:l=sP(d,l,l.pendingProps,l.type,void 0,tt);break;case 11:l=sP(d,l,l.pendingProps,l.type.render,l.ref,tt);break;case 5:cS(l);default:hP(d,l),l=Je=zO(l,Ss),l=dP(d,l,Ss)}i.memoizedProps=i.pendingProps,l===null?Kp(i):Je=l}function fc(i,l,d,p){us=wa=null,cS(l),tc=null,dd=0;var y=l.return;try{if(_K(i,y,l,d,tt)){un=1,Dp(i,Gr(d,i.current)),Je=null;return}}catch(S){if(y!==null)throw Je=y,S;un=1,Dp(i,Gr(d,i.current)),Je=null;return}l.flags&32768?(it||p===1?i=!0:lc||(tt&536870912)!==0?i=!1:(mi=i=!0,(p===2||p===9||p===3||p===6)&&(p=Mr.current,p!==null&&p.tag===13&&(p.flags|=16384))),HP(l,i)):Kp(l)}function Kp(i){var l=i;do{if((l.flags&32768)!==0){HP(l,mi);return}i=l.return;var d=RK(l.alternate,l,Ss);if(d!==null){Je=d;return}if(l=l.sibling,l!==null){Je=l;return}Je=l=i}while(l!==null);un===0&&(un=5)}function HP(i,l){do{var d=TK(i.alternate,i);if(d!==null){d.flags&=32767,Je=d;return}if(d=i.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(i=i.sibling,i!==null)){Je=i;return}Je=i=d}while(i!==null);un=6,Je=null}function qP(i,l,d,p,y,S,A,k,H){i.cancelPendingCommit=null;do Zp();while(xn!==0);if((bt&6)!==0)throw Error(r(327));if(l!==null){if(l===i.current)throw Error(r(177));if(S=l.lanes|l.childLanes,S|=L0,gG(i,d,S,A,k,H),i===$t&&(Je=$t=null,tt=0),uc=l,yi=i,Cs=d,qS=S,VS=y,NP=p,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,jK(Nl,function(){return ZP(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||p){p=V.T,V.T=null,y=ee.p,ee.p=2,A=bt,bt|=4;try{OK(i,l,d)}finally{bt=A,ee.p=y,V.T=p}}xn=1,VP(),WP(),GP()}}function VP(){if(xn===1){xn=0;var i=yi,l=uc,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=V.T,V.T=null;var p=ee.p;ee.p=2;var y=bt;bt|=4;try{_P(l,i);var S=i1,A=MO(i.containerInfo),k=S.focusedElem,H=S.selectionRange;if(A!==k&&k&&k.ownerDocument&&OO(k.ownerDocument.documentElement,k)){if(H!==null&&M0(k)){var Y=H.start,ne=H.end;if(ne===void 0&&(ne=Y),"selectionStart"in k)k.selectionStart=Y,k.selectionEnd=Math.min(ne,k.value.length);else{var se=k.ownerDocument||document,Q=se&&se.defaultView||window;if(Q.getSelection){var X=Q.getSelection(),Ie=k.textContent.length,Le=Math.min(H.start,Ie),kt=H.end===void 0?Le:Math.min(H.end,Ie);!X.extend&&Le>kt&&(A=kt,kt=Le,Le=A);var K=TO(k,Le),W=TO(k,kt);if(K&&W&&(X.rangeCount!==1||X.anchorNode!==K.node||X.anchorOffset!==K.offset||X.focusNode!==W.node||X.focusOffset!==W.offset)){var Z=se.createRange();Z.setStart(K.node,K.offset),X.removeAllRanges(),Le>kt?(X.addRange(Z),X.extend(W.node,W.offset)):(Z.setEnd(W.node,W.offset),X.addRange(Z))}}}}for(se=[],X=k;X=X.parentNode;)X.nodeType===1&&se.push({element:X,left:X.scrollLeft,top:X.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<se.length;k++){var oe=se[k];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}am=!!s1,i1=s1=null}finally{bt=y,ee.p=p,V.T=d}}i.current=l,xn=2}}function WP(){if(xn===2){xn=0;var i=yi,l=uc,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=V.T,V.T=null;var p=ee.p;ee.p=2;var y=bt;bt|=4;try{SP(i,l.alternate,l)}finally{bt=y,ee.p=p,V.T=d}}xn=3}}function GP(){if(xn===4||xn===3){xn=0,c0();var i=yi,l=uc,d=Cs,p=NP;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?xn=5:(xn=0,uc=yi=null,KP(i,i.pendingLanes));var y=i.pendingLanes;if(y===0&&(vi=null),f0(d),l=l.stateNode,Ar&&typeof Ar.onCommitFiberRoot=="function")try{Ar.onCommitFiberRoot(Gu,l,void 0,(l.current.flags&128)===128)}catch{}if(p!==null){l=V.T,y=ee.p,ee.p=2,V.T=null;try{for(var S=i.onRecoverableError,A=0;A<p.length;A++){var k=p[A];S(k.value,{componentStack:k.stack})}}finally{V.T=l,ee.p=y}}(Cs&3)!==0&&Zp(),Lo(i),y=i.pendingLanes,(d&261930)!==0&&(y&42)!==0?i===WS?Rd++:(Rd=0,WS=i):Rd=0,Td(0)}}function KP(i,l){(i.pooledCacheLanes&=l)===0&&(l=i.pooledCache,l!=null&&(i.pooledCache=null,cd(l)))}function Zp(){return VP(),WP(),GP(),ZP()}function ZP(){if(xn!==5)return!1;var i=yi,l=qS;qS=0;var d=f0(Cs),p=V.T,y=ee.p;try{ee.p=32>d?32:d,V.T=null,d=VS,VS=null;var S=yi,A=Cs;if(xn=0,uc=yi=null,Cs=0,(bt&6)!==0)throw Error(r(331));var k=bt;if(bt|=4,OP(S.current),AP(S,S.current,A,d),bt=k,Td(0,!1),Ar&&typeof Ar.onPostCommitFiberRoot=="function")try{Ar.onPostCommitFiberRoot(Gu,S)}catch{}return!0}finally{ee.p=y,V.T=p,KP(i,l)}}function YP(i,l,d){l=Gr(d,l),l=xS(i.stateNode,l,2),i=di(i,l,2),i!==null&&(Zu(i,2),Lo(i))}function Rt(i,l,d){if(i.tag===3)YP(i,i,d);else for(;l!==null;){if(l.tag===3){YP(l,i,d);break}else if(l.tag===1){var p=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(vi===null||!vi.has(p))){i=Gr(d,i),d=QM(2),p=di(l,d,2),p!==null&&(JM(d,p,l,i),Zu(p,2),Lo(p));break}}l=l.return}}function ZS(i,l,d){var p=i.pingCache;if(p===null){p=i.pingCache=new NK;var y=new Set;p.set(l,y)}else y=p.get(l),y===void 0&&(y=new Set,p.set(l,y));y.has(d)||(jS=!0,y.add(d),i=FK.bind(null,i,l,d),l.then(i,i))}function FK(i,l,d){var p=i.pingCache;p!==null&&p.delete(l),i.pingedLanes|=i.suspendedLanes&d,i.warmLanes&=~d,$t===i&&(tt&d)===d&&(un===4||un===3&&(tt&62914560)===tt&&300>Kn()-Hp?(bt&2)===0&&dc(i,0):BS|=d,cc===tt&&(cc=0)),Lo(i)}function QP(i,l){l===0&&(l=V2()),i=ba(i,l),i!==null&&(Zu(i,l),Lo(i))}function $K(i){var l=i.memoizedState,d=0;l!==null&&(d=l.retryLane),QP(i,d)}function zK(i,l){var d=0;switch(i.tag){case 31:case 13:var p=i.stateNode,y=i.memoizedState;y!==null&&(d=y.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(l),QP(i,d)}function jK(i,l){return ho(i,l)}var Yp=null,hc=null,YS=!1,Qp=!1,QS=!1,Si=0;function Lo(i){i!==hc&&i.next===null&&(hc===null?Yp=hc=i:hc=hc.next=i),Qp=!0,YS||(YS=!0,HK())}function Td(i,l){if(!QS&&Qp){QS=!0;do for(var d=!1,p=Yp;p!==null;){if(i!==0){var y=p.pendingLanes;if(y===0)var S=0;else{var A=p.suspendedLanes,k=p.pingedLanes;S=(1<<31-Rr(42|i)+1)-1,S&=y&~(A&~k),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(d=!0,tN(p,S))}else S=tt,S=tp(p,p===$t?S:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(S&3)===0||Ku(p,S)||(d=!0,tN(p,S));p=p.next}while(d);QS=!1}}function BK(){JP()}function JP(){Qp=YS=!1;var i=0;Si!==0&&XK()&&(i=Si);for(var l=Kn(),d=null,p=Yp;p!==null;){var y=p.next,S=XP(p,l);S===0?(p.next=null,d===null?Yp=y:d.next=y,y===null&&(hc=d)):(d=p,(i!==0||(S&3)!==0)&&(Qp=!0)),p=y}xn!==0&&xn!==5||Td(i),Si!==0&&(Si=0)}function XP(i,l){for(var d=i.suspendedLanes,p=i.pingedLanes,y=i.expirationTimes,S=i.pendingLanes&-62914561;0<S;){var A=31-Rr(S),k=1<<A,H=y[A];H===-1?((k&d)===0||(k&p)!==0)&&(y[A]=mG(k,l)):H<=l&&(i.expiredLanes|=k),S&=~k}if(l=$t,d=tt,d=tp(i,i===l?d:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,d===0||i===l&&(At===2||At===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&Wu(p),i.callbackNode=null,i.callbackPriority=0;if((d&3)===0||Ku(i,d)){if(l=d&-d,l===i.callbackPriority)return l;switch(p!==null&&Wu(p),f0(d)){case 2:case 8:d=Po;break;case 32:d=Nl;break;case 268435456:d=q2;break;default:d=Nl}return p=eN.bind(null,i),d=ho(d,p),i.callbackPriority=l,i.callbackNode=d,l}return p!==null&&p!==null&&Wu(p),i.callbackPriority=2,i.callbackNode=null,2}function eN(i,l){if(xn!==0&&xn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var d=i.callbackNode;if(Zp()&&i.callbackNode!==d)return null;var p=tt;return p=tp(i,i===$t?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(DP(i,p,l),XP(i,Kn()),i.callbackNode!=null&&i.callbackNode===d?eN.bind(null,i):null)}function tN(i,l){if(Zp())return null;DP(i,l,!0)}function HK(){tZ(function(){(bt&6)!==0?ho(Un,BK):JP()})}function JS(){if(Si===0){var i=Jl;i===0&&(i=Jh,Jh<<=1,(Jh&261888)===0&&(Jh=256)),Si=i}return Si}function nN(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:sp(""+i)}function rN(i,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,i.id&&d.setAttribute("form",i.id),l.parentNode.insertBefore(d,l),i=new FormData(i),d.parentNode.removeChild(d),i}function qK(i,l,d,p,y){if(l==="submit"&&d&&d.stateNode===y){var S=nN((y[lr]||null).action),A=p.submitter;A&&(l=(l=A[lr]||null)?nN(l.formAction):A.getAttribute("formAction"),l!==null&&(S=l,A=null));var k=new cp("action","action",null,p,y);i.push({event:k,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(Si!==0){var H=A?rN(y,A):new FormData(y);yS(d,{pending:!0,data:H,method:y.method,action:S},null,H)}}else typeof S=="function"&&(k.preventDefault(),H=A?rN(y,A):new FormData(y),yS(d,{pending:!0,data:H,method:y.method,action:S},S,H))},currentTarget:y}]})}}for(var XS=0;XS<D0.length;XS++){var e1=D0[XS],VK=e1.toLowerCase(),WK=e1[0].toUpperCase()+e1.slice(1);po(VK,"on"+WK)}po(kO,"onAnimationEnd"),po(DO,"onAnimationIteration"),po(LO,"onAnimationStart"),po("dblclick","onDoubleClick"),po("focusin","onFocus"),po("focusout","onBlur"),po(lK,"onTransitionRun"),po(cK,"onTransitionStart"),po(uK,"onTransitionCancel"),po(UO,"onTransitionEnd"),Fl("onMouseEnter",["mouseout","mouseover"]),Fl("onMouseLeave",["mouseout","mouseover"]),Fl("onPointerEnter",["pointerout","pointerover"]),Fl("onPointerLeave",["pointerout","pointerover"]),ma("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ma("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ma("onBeforeInput",["compositionend","keypress","textInput","paste"]),ma("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ma("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ma("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Od="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(" "),GK=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Od));function oN(i,l){l=(l&4)!==0;for(var d=0;d<i.length;d++){var p=i[d],y=p.event;p=p.listeners;e:{var S=void 0;if(l)for(var A=p.length-1;0<=A;A--){var k=p[A],H=k.instance,Y=k.currentTarget;if(k=k.listener,H!==S&&y.isPropagationStopped())break e;S=k,y.currentTarget=Y;try{S(y)}catch(ne){fp(ne)}y.currentTarget=null,S=H}else for(A=0;A<p.length;A++){if(k=p[A],H=k.instance,Y=k.currentTarget,k=k.listener,H!==S&&y.isPropagationStopped())break e;S=k,y.currentTarget=Y;try{S(y)}catch(ne){fp(ne)}y.currentTarget=null,S=H}}}}function Xe(i,l){var d=l[h0];d===void 0&&(d=l[h0]=new Set);var p=i+"__bubble";d.has(p)||(sN(l,i,2,!1),d.add(p))}function t1(i,l,d){var p=0;l&&(p|=4),sN(d,i,p,l)}var Jp="_reactListening"+Math.random().toString(36).slice(2);function n1(i){if(!i[Jp]){i[Jp]=!0,J2.forEach(function(d){d!=="selectionchange"&&(GK.has(d)||t1(d,!1,i),t1(d,!0,i))});var l=i.nodeType===9?i:i.ownerDocument;l===null||l[Jp]||(l[Jp]=!0,t1("selectionchange",!1,l))}}function sN(i,l,d,p){switch(kN(l)){case 2:var y=CZ;break;case 8:y=wZ;break;default:y=v1}d=y.bind(null,l,d,i),y=void 0,!w0||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(y=!0),p?y!==void 0?i.addEventListener(l,d,{capture:!0,passive:y}):i.addEventListener(l,d,!0):y!==void 0?i.addEventListener(l,d,{passive:y}):i.addEventListener(l,d,!1)}function r1(i,l,d,p,y){var S=p;if((l&1)===0&&(l&2)===0&&p!==null)e:for(;;){if(p===null)return;var A=p.tag;if(A===3||A===4){var k=p.stateNode.containerInfo;if(k===y)break;if(A===4)for(A=p.return;A!==null;){var H=A.tag;if((H===3||H===4)&&A.stateNode.containerInfo===y)return;A=A.return}for(;k!==null;){if(A=Dl(k),A===null)return;if(H=A.tag,H===5||H===6||H===26||H===27){p=S=A;continue e}k=k.parentNode}}p=p.return}uO(function(){var Y=S,ne=S0(d),se=[];e:{var Q=FO.get(i);if(Q!==void 0){var X=cp,Ie=i;switch(i){case"keypress":if(ap(d)===0)break e;case"keydown":case"keyup":X=zG;break;case"focusin":Ie="focus",X=I0;break;case"focusout":Ie="blur",X=I0;break;case"beforeblur":case"afterblur":X=I0;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":X=hO;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=RG;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=HG;break;case kO:case DO:case LO:X=MG;break;case UO:X=VG;break;case"scroll":case"scrollend":X=IG;break;case"wheel":X=GG;break;case"copy":case"cut":case"paste":X=NG;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=mO;break;case"toggle":case"beforetoggle":X=ZG}var Le=(l&4)!==0,kt=!Le&&(i==="scroll"||i==="scrollend"),K=Le?Q!==null?Q+"Capture":null:Q;Le=[];for(var W=Y,Z;W!==null;){var oe=W;if(Z=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||Z===null||K===null||(oe=Ju(W,K),oe!=null&&Le.push(Md(W,oe,Z))),kt)break;W=W.return}0<Le.length&&(Q=new X(Q,Ie,null,d,ne),se.push({event:Q,listeners:Le}))}}if((l&7)===0){e:{if(Q=i==="mouseover"||i==="pointerover",X=i==="mouseout"||i==="pointerout",Q&&d!==b0&&(Ie=d.relatedTarget||d.fromElement)&&(Dl(Ie)||Ie[kl]))break e;if((X||Q)&&(Q=ne.window===ne?ne:(Q=ne.ownerDocument)?Q.defaultView||Q.parentWindow:window,X?(Ie=d.relatedTarget||d.toElement,X=Y,Ie=Ie?Dl(Ie):null,Ie!==null&&(kt=s(Ie),Le=Ie.tag,Ie!==kt||Le!==5&&Le!==27&&Le!==6)&&(Ie=null)):(X=null,Ie=Y),X!==Ie)){if(Le=hO,oe="onMouseLeave",K="onMouseEnter",W="mouse",(i==="pointerout"||i==="pointerover")&&(Le=mO,oe="onPointerLeave",K="onPointerEnter",W="pointer"),kt=X==null?Q:Qu(X),Z=Ie==null?Q:Qu(Ie),Q=new Le(oe,W+"leave",X,d,ne),Q.target=kt,Q.relatedTarget=Z,oe=null,Dl(ne)===Y&&(Le=new Le(K,W+"enter",Ie,d,ne),Le.target=Z,Le.relatedTarget=kt,oe=Le),kt=oe,X&&Ie)t:{for(Le=KK,K=X,W=Ie,Z=0,oe=K;oe;oe=Le(oe))Z++;oe=0;for(var De=W;De;De=Le(De))oe++;for(;0<Z-oe;)K=Le(K),Z--;for(;0<oe-Z;)W=Le(W),oe--;for(;Z--;){if(K===W||W!==null&&K===W.alternate){Le=K;break t}K=Le(K),W=Le(W)}Le=null}else Le=null;X!==null&&iN(se,Q,X,Le,!1),Ie!==null&&kt!==null&&iN(se,kt,Ie,Le,!0)}}e:{if(Q=Y?Qu(Y):window,X=Q.nodeName&&Q.nodeName.toLowerCase(),X==="select"||X==="input"&&Q.type==="file")var mt=EO;else if(CO(Q))if(xO)mt=sK;else{mt=rK;var Oe=nK}else X=Q.nodeName,!X||X.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?Y&&y0(Y.elementType)&&(mt=EO):mt=oK;if(mt&&(mt=mt(i,Y))){wO(se,mt,d,ne);break e}Oe&&Oe(i,Q,Y),i==="focusout"&&Y&&Q.type==="number"&&Y.memoizedProps.value!=null&&v0(Q,"number",Q.value)}switch(Oe=Y?Qu(Y):window,i){case"focusin":(CO(Oe)||Oe.contentEditable==="true")&&(ql=Oe,P0=Y,id=null);break;case"focusout":id=P0=ql=null;break;case"mousedown":N0=!0;break;case"contextmenu":case"mouseup":case"dragend":N0=!1,PO(se,d,ne);break;case"selectionchange":if(aK)break;case"keydown":case"keyup":PO(se,d,ne)}var Ke;if(R0)e:{switch(i){case"compositionstart":var nt="onCompositionStart";break e;case"compositionend":nt="onCompositionEnd";break e;case"compositionupdate":nt="onCompositionUpdate";break e}nt=void 0}else Hl?bO(i,d)&&(nt="onCompositionEnd"):i==="keydown"&&d.keyCode===229&&(nt="onCompositionStart");nt&&(gO&&d.locale!=="ko"&&(Hl||nt!=="onCompositionStart"?nt==="onCompositionEnd"&&Hl&&(Ke=dO()):(oi=ne,E0="value"in oi?oi.value:oi.textContent,Hl=!0)),Oe=Xp(Y,nt),0<Oe.length&&(nt=new pO(nt,i,null,d,ne),se.push({event:nt,listeners:Oe}),Ke?nt.data=Ke:(Ke=SO(d),Ke!==null&&(nt.data=Ke)))),(Ke=QG?JG(i,d):XG(i,d))&&(nt=Xp(Y,"onBeforeInput"),0<nt.length&&(Oe=new pO("onBeforeInput","beforeinput",null,d,ne),se.push({event:Oe,listeners:nt}),Oe.data=Ke)),qK(se,i,Y,d,ne)}oN(se,l)})}function Md(i,l,d){return{instance:i,listener:l,currentTarget:d}}function Xp(i,l){for(var d=l+"Capture",p=[];i!==null;){var y=i,S=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||S===null||(y=Ju(i,d),y!=null&&p.unshift(Md(i,y,S)),y=Ju(i,l),y!=null&&p.push(Md(i,y,S))),i.tag===3)return p;i=i.return}return[]}function KK(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function iN(i,l,d,p,y){for(var S=l._reactName,A=[];d!==null&&d!==p;){var k=d,H=k.alternate,Y=k.stateNode;if(k=k.tag,H!==null&&H===p)break;k!==5&&k!==26&&k!==27||Y===null||(H=Y,y?(Y=Ju(d,S),Y!=null&&A.unshift(Md(d,Y,H))):y||(Y=Ju(d,S),Y!=null&&A.push(Md(d,Y,H)))),d=d.return}A.length!==0&&i.push({event:l,listeners:A})}var ZK=/\r\n?/g,YK=/\u0000|\uFFFD/g;function aN(i){return(typeof i=="string"?i:""+i).replace(ZK,`
88
- `).replace(YK,"")}function lN(i,l){return l=aN(l),aN(i)===l}function Nt(i,l,d,p,y,S){switch(d){case"children":typeof p=="string"?l==="body"||l==="textarea"&&p===""||zl(i,p):(typeof p=="number"||typeof p=="bigint")&&l!=="body"&&zl(i,""+p);break;case"className":rp(i,"class",p);break;case"tabIndex":rp(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":rp(i,d,p);break;case"style":lO(i,p,S);break;case"data":if(l!=="object"){rp(i,"data",p);break}case"src":case"href":if(p===""&&(l!=="a"||d!=="href")){i.removeAttribute(d);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(d);break}p=sp(""+p),i.setAttribute(d,p);break;case"action":case"formAction":if(typeof p=="function"){i.setAttribute(d,"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 S=="function"&&(d==="formAction"?(l!=="input"&&Nt(i,l,"name",y.name,y,null),Nt(i,l,"formEncType",y.formEncType,y,null),Nt(i,l,"formMethod",y.formMethod,y,null),Nt(i,l,"formTarget",y.formTarget,y,null)):(Nt(i,l,"encType",y.encType,y,null),Nt(i,l,"method",y.method,y,null),Nt(i,l,"target",y.target,y,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(d);break}p=sp(""+p),i.setAttribute(d,p);break;case"onClick":p!=null&&(i.onclick=is);break;case"onScroll":p!=null&&Xe("scroll",i);break;case"onScrollEnd":p!=null&&Xe("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(d=p.__html,d!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}d=sp(""+p),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(d,""+p):i.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(d,""):i.removeAttribute(d);break;case"capture":case"download":p===!0?i.setAttribute(d,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(d,p):i.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(d,p):i.removeAttribute(d);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(d):i.setAttribute(d,p);break;case"popover":Xe("beforetoggle",i),Xe("toggle",i),np(i,"popover",p);break;case"xlinkActuate":ss(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":ss(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":ss(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":ss(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":ss(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":ss(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":ss(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":ss(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":ss(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":np(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=xG.get(d)||d,np(i,d,p))}}function o1(i,l,d,p,y,S){switch(d){case"style":lO(i,p,S);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(d=p.__html,d!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"children":typeof p=="string"?zl(i,p):(typeof p=="number"||typeof p=="bigint")&&zl(i,""+p);break;case"onScroll":p!=null&&Xe("scroll",i);break;case"onScrollEnd":p!=null&&Xe("scrollend",i);break;case"onClick":p!=null&&(i.onclick=is);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!X2.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(y=d.endsWith("Capture"),l=d.slice(2,y?d.length-7:void 0),S=i[lr]||null,S=S!=null?S[d]:null,typeof S=="function"&&i.removeEventListener(l,S,y),typeof p=="function")){typeof S!="function"&&S!==null&&(d in i?i[d]=null:i.hasAttribute(d)&&i.removeAttribute(d)),i.addEventListener(l,p,y);break e}d in i?i[d]=p:p===!0?i.setAttribute(d,""):np(i,d,p)}}}function Bn(i,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xe("error",i),Xe("load",i);var p=!1,y=!1,S;for(S in d)if(d.hasOwnProperty(S)){var A=d[S];if(A!=null)switch(S){case"src":p=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Nt(i,l,S,A,d,null)}}y&&Nt(i,l,"srcSet",d.srcSet,d,null),p&&Nt(i,l,"src",d.src,d,null);return;case"input":Xe("invalid",i);var k=S=A=y=null,H=null,Y=null;for(p in d)if(d.hasOwnProperty(p)){var ne=d[p];if(ne!=null)switch(p){case"name":y=ne;break;case"type":A=ne;break;case"checked":H=ne;break;case"defaultChecked":Y=ne;break;case"value":S=ne;break;case"defaultValue":k=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,l));break;default:Nt(i,l,p,ne,d,null)}}oO(i,S,k,H,Y,A,y,!1);return;case"select":Xe("invalid",i),p=A=S=null;for(y in d)if(d.hasOwnProperty(y)&&(k=d[y],k!=null))switch(y){case"value":S=k;break;case"defaultValue":A=k;break;case"multiple":p=k;default:Nt(i,l,y,k,d,null)}l=S,d=A,i.multiple=!!p,l!=null?$l(i,!!p,l,!1):d!=null&&$l(i,!!p,d,!0);return;case"textarea":Xe("invalid",i),S=y=p=null;for(A in d)if(d.hasOwnProperty(A)&&(k=d[A],k!=null))switch(A){case"value":p=k;break;case"defaultValue":y=k;break;case"children":S=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:Nt(i,l,A,k,d,null)}iO(i,p,y,S);return;case"option":for(H in d)d.hasOwnProperty(H)&&(p=d[H],p!=null)&&(H==="selected"?i.selected=p&&typeof p!="function"&&typeof p!="symbol":Nt(i,l,H,p,d,null));return;case"dialog":Xe("beforetoggle",i),Xe("toggle",i),Xe("cancel",i),Xe("close",i);break;case"iframe":case"object":Xe("load",i);break;case"video":case"audio":for(p=0;p<Od.length;p++)Xe(Od[p],i);break;case"image":Xe("error",i),Xe("load",i);break;case"details":Xe("toggle",i);break;case"embed":case"source":case"link":Xe("error",i),Xe("load",i);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 d)if(d.hasOwnProperty(Y)&&(p=d[Y],p!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Nt(i,l,Y,p,d,null)}return;default:if(y0(l)){for(ne in d)d.hasOwnProperty(ne)&&(p=d[ne],p!==void 0&&o1(i,l,ne,p,d,void 0));return}}for(k in d)d.hasOwnProperty(k)&&(p=d[k],p!=null&&Nt(i,l,k,p,d,null))}function QK(i,l,d,p){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,S=null,A=null,k=null,H=null,Y=null,ne=null;for(X in d){var se=d[X];if(d.hasOwnProperty(X)&&se!=null)switch(X){case"checked":break;case"value":break;case"defaultValue":H=se;default:p.hasOwnProperty(X)||Nt(i,l,X,null,p,se)}}for(var Q in p){var X=p[Q];if(se=d[Q],p.hasOwnProperty(Q)&&(X!=null||se!=null))switch(Q){case"type":S=X;break;case"name":y=X;break;case"checked":Y=X;break;case"defaultChecked":ne=X;break;case"value":A=X;break;case"defaultValue":k=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(r(137,l));break;default:X!==se&&Nt(i,l,Q,X,p,se)}}g0(i,A,k,H,Y,ne,S,y);return;case"select":X=A=k=Q=null;for(S in d)if(H=d[S],d.hasOwnProperty(S)&&H!=null)switch(S){case"value":break;case"multiple":X=H;default:p.hasOwnProperty(S)||Nt(i,l,S,null,p,H)}for(y in p)if(S=p[y],H=d[y],p.hasOwnProperty(y)&&(S!=null||H!=null))switch(y){case"value":Q=S;break;case"defaultValue":k=S;break;case"multiple":A=S;default:S!==H&&Nt(i,l,y,S,p,H)}l=k,d=A,p=X,Q!=null?$l(i,!!d,Q,!1):!!p!=!!d&&(l!=null?$l(i,!!d,l,!0):$l(i,!!d,d?[]:"",!1));return;case"textarea":X=Q=null;for(k in d)if(y=d[k],d.hasOwnProperty(k)&&y!=null&&!p.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:Nt(i,l,k,null,p,y)}for(A in p)if(y=p[A],S=d[A],p.hasOwnProperty(A)&&(y!=null||S!=null))switch(A){case"value":Q=y;break;case"defaultValue":X=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==S&&Nt(i,l,A,y,p,S)}sO(i,Q,X);return;case"option":for(var Ie in d)Q=d[Ie],d.hasOwnProperty(Ie)&&Q!=null&&!p.hasOwnProperty(Ie)&&(Ie==="selected"?i.selected=!1:Nt(i,l,Ie,null,p,Q));for(H in p)Q=p[H],X=d[H],p.hasOwnProperty(H)&&Q!==X&&(Q!=null||X!=null)&&(H==="selected"?i.selected=Q&&typeof Q!="function"&&typeof Q!="symbol":Nt(i,l,H,Q,p,X));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 Le in d)Q=d[Le],d.hasOwnProperty(Le)&&Q!=null&&!p.hasOwnProperty(Le)&&Nt(i,l,Le,null,p,Q);for(Y in p)if(Q=p[Y],X=d[Y],p.hasOwnProperty(Y)&&Q!==X&&(Q!=null||X!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,l));break;default:Nt(i,l,Y,Q,p,X)}return;default:if(y0(l)){for(var kt in d)Q=d[kt],d.hasOwnProperty(kt)&&Q!==void 0&&!p.hasOwnProperty(kt)&&o1(i,l,kt,void 0,p,Q);for(ne in p)Q=p[ne],X=d[ne],!p.hasOwnProperty(ne)||Q===X||Q===void 0&&X===void 0||o1(i,l,ne,Q,p,X);return}}for(var K in d)Q=d[K],d.hasOwnProperty(K)&&Q!=null&&!p.hasOwnProperty(K)&&Nt(i,l,K,null,p,Q);for(se in p)Q=p[se],X=d[se],!p.hasOwnProperty(se)||Q===X||Q==null&&X==null||Nt(i,l,se,Q,p,X)}function cN(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function JK(){if(typeof performance.getEntriesByType=="function"){for(var i=0,l=0,d=performance.getEntriesByType("resource"),p=0;p<d.length;p++){var y=d[p],S=y.transferSize,A=y.initiatorType,k=y.duration;if(S&&k&&cN(A)){for(A=0,k=y.responseEnd,p+=1;p<d.length;p++){var H=d[p],Y=H.startTime;if(Y>k)break;var ne=H.transferSize,se=H.initiatorType;ne&&cN(se)&&(H=H.responseEnd,A+=ne*(H<k?1:(k-Y)/(H-Y)))}if(--p,l+=8*(S+A)/(y.duration/1e3),i++,10<i)break}}if(0<i)return l/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var s1=null,i1=null;function em(i){return i.nodeType===9?i:i.ownerDocument}function uN(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function dN(i,l){if(i===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&l==="foreignObject"?0:i}function a1(i,l){return i==="textarea"||i==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var l1=null;function XK(){var i=window.event;return i&&i.type==="popstate"?i===l1?!1:(l1=i,!0):(l1=null,!1)}var fN=typeof setTimeout=="function"?setTimeout:void 0,eZ=typeof clearTimeout=="function"?clearTimeout:void 0,hN=typeof Promise=="function"?Promise:void 0,tZ=typeof queueMicrotask=="function"?queueMicrotask:typeof hN<"u"?function(i){return hN.resolve(null).then(i).catch(nZ)}:fN;function nZ(i){setTimeout(function(){throw i})}function Ci(i){return i==="head"}function pN(i,l){var d=l,p=0;do{var y=d.nextSibling;if(i.removeChild(d),y&&y.nodeType===8)if(d=y.data,d==="/$"||d==="/&"){if(p===0){i.removeChild(y),vc(l);return}p--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")p++;else if(d==="html")Pd(i.ownerDocument.documentElement);else if(d==="head"){d=i.ownerDocument.head,Pd(d);for(var S=d.firstChild;S;){var A=S.nextSibling,k=S.nodeName;S[Yu]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&S.rel.toLowerCase()==="stylesheet"||d.removeChild(S),S=A}}else d==="body"&&Pd(i.ownerDocument.body);d=y}while(d);vc(l)}function mN(i,l){var d=i;i=0;do{var p=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),p&&p.nodeType===8)if(d=p.data,d==="/$"){if(i===0)break;i--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||i++;d=p}while(d)}function c1(i){var l=i.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":c1(d),p0(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}i.removeChild(d)}}function rZ(i,l,d,p){for(;i.nodeType===1;){var y=d;if(i.nodeName.toLowerCase()!==l.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[Yu])switch(l){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(S=i.getAttribute("rel"),S==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(S!==y.rel||i.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||i.getAttribute("title")!==(y.title==null?null:y.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(S=i.getAttribute("src"),(S!==(y.src==null?null:y.src)||i.getAttribute("type")!==(y.type==null?null:y.type)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&S&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(l==="input"&&i.type==="hidden"){var S=y.name==null?null:""+y.name;if(y.type==="hidden"&&i.getAttribute("name")===S)return i}else return i;if(i=Jr(i.nextSibling),i===null)break}return null}function oZ(i,l,d){if(l==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!d||(i=Jr(i.nextSibling),i===null))return null;return i}function gN(i,l){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=Jr(i.nextSibling),i===null))return null;return i}function u1(i){return i.data==="$?"||i.data==="$~"}function d1(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function sZ(i,l){var d=i.ownerDocument;if(i.data==="$~")i._reactRetry=l;else if(i.data!=="$?"||d.readyState!=="loading")l();else{var p=function(){l(),d.removeEventListener("DOMContentLoaded",p)};d.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}function Jr(i){for(;i!=null;i=i.nextSibling){var l=i.nodeType;if(l===1||l===3)break;if(l===8){if(l=i.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return i}var f1=null;function vN(i){i=i.nextSibling;for(var l=0;i;){if(i.nodeType===8){var d=i.data;if(d==="/$"||d==="/&"){if(l===0)return Jr(i.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}i=i.nextSibling}return null}function yN(i){i=i.previousSibling;for(var l=0;i;){if(i.nodeType===8){var d=i.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return i;l--}else d!=="/$"&&d!=="/&"||l++}i=i.previousSibling}return null}function bN(i,l,d){switch(l=em(d),i){case"html":if(i=l.documentElement,!i)throw Error(r(452));return i;case"head":if(i=l.head,!i)throw Error(r(453));return i;case"body":if(i=l.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Pd(i){for(var l=i.attributes;l.length;)i.removeAttributeNode(l[0]);p0(i)}var Xr=new Map,SN=new Set;function tm(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ws=ee.d;ee.d={f:iZ,r:aZ,D:lZ,C:cZ,L:uZ,m:dZ,X:hZ,S:fZ,M:pZ};function iZ(){var i=ws.f(),l=Wp();return i||l}function aZ(i){var l=Ll(i);l!==null&&l.tag===5&&l.type==="form"?UM(l):ws.r(i)}var pc=typeof document>"u"?null:document;function CN(i,l,d){var p=pc;if(p&&typeof l=="string"&&l){var y=Vr(l);y='link[rel="'+i+'"][href="'+y+'"]',typeof d=="string"&&(y+='[crossorigin="'+d+'"]'),SN.has(y)||(SN.add(y),i={rel:i,crossOrigin:d,href:l},p.querySelector(y)===null&&(l=p.createElement("link"),Bn(l,"link",i),Tn(l),p.head.appendChild(l)))}}function lZ(i){ws.D(i),CN("dns-prefetch",i,null)}function cZ(i,l){ws.C(i,l),CN("preconnect",i,l)}function uZ(i,l,d){ws.L(i,l,d);var p=pc;if(p&&i&&l){var y='link[rel="preload"][as="'+Vr(l)+'"]';l==="image"&&d&&d.imageSrcSet?(y+='[imagesrcset="'+Vr(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(y+='[imagesizes="'+Vr(d.imageSizes)+'"]')):y+='[href="'+Vr(i)+'"]';var S=y;switch(l){case"style":S=mc(i);break;case"script":S=gc(i)}Xr.has(S)||(i=m({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:i,as:l},d),Xr.set(S,i),p.querySelector(y)!==null||l==="style"&&p.querySelector(Nd(S))||l==="script"&&p.querySelector(kd(S))||(l=p.createElement("link"),Bn(l,"link",i),Tn(l),p.head.appendChild(l)))}}function dZ(i,l){ws.m(i,l);var d=pc;if(d&&i){var p=l&&typeof l.as=="string"?l.as:"script",y='link[rel="modulepreload"][as="'+Vr(p)+'"][href="'+Vr(i)+'"]',S=y;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=gc(i)}if(!Xr.has(S)&&(i=m({rel:"modulepreload",href:i},l),Xr.set(S,i),d.querySelector(y)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(kd(S)))return}p=d.createElement("link"),Bn(p,"link",i),Tn(p),d.head.appendChild(p)}}}function fZ(i,l,d){ws.S(i,l,d);var p=pc;if(p&&i){var y=Ul(p).hoistableStyles,S=mc(i);l=l||"default";var A=y.get(S);if(!A){var k={loading:0,preload:null};if(A=p.querySelector(Nd(S)))k.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":l},d),(d=Xr.get(S))&&h1(i,d);var H=A=p.createElement("link");Tn(H),Bn(H,"link",i),H._p=new Promise(function(Y,ne){H.onload=Y,H.onerror=ne}),H.addEventListener("load",function(){k.loading|=1}),H.addEventListener("error",function(){k.loading|=2}),k.loading|=4,nm(A,l,p)}A={type:"stylesheet",instance:A,count:1,state:k},y.set(S,A)}}}function hZ(i,l){ws.X(i,l);var d=pc;if(d&&i){var p=Ul(d).hoistableScripts,y=gc(i),S=p.get(y);S||(S=d.querySelector(kd(y)),S||(i=m({src:i,async:!0},l),(l=Xr.get(y))&&p1(i,l),S=d.createElement("script"),Tn(S),Bn(S,"link",i),d.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},p.set(y,S))}}function pZ(i,l){ws.M(i,l);var d=pc;if(d&&i){var p=Ul(d).hoistableScripts,y=gc(i),S=p.get(y);S||(S=d.querySelector(kd(y)),S||(i=m({src:i,async:!0,type:"module"},l),(l=Xr.get(y))&&p1(i,l),S=d.createElement("script"),Tn(S),Bn(S,"link",i),d.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},p.set(y,S))}}function wN(i,l,d,p){var y=(y=Fe.current)?tm(y):null;if(!y)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=mc(d.href),d=Ul(y).hoistableStyles,p=d.get(l),p||(p={type:"style",instance:null,count:0,state:null},d.set(l,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){i=mc(d.href);var S=Ul(y).hoistableStyles,A=S.get(i);if(A||(y=y.ownerDocument||y,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(i,A),(S=y.querySelector(Nd(i)))&&!S._p&&(A.instance=S,A.state.loading=5),Xr.has(i)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},Xr.set(i,d),S||mZ(y,i,d,A.state))),l&&p===null)throw Error(r(528,""));return A}if(l&&p!==null)throw Error(r(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=gc(d),d=Ul(y).hoistableScripts,p=d.get(l),p||(p={type:"script",instance:null,count:0,state:null},d.set(l,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function mc(i){return'href="'+Vr(i)+'"'}function Nd(i){return'link[rel="stylesheet"]['+i+"]"}function EN(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function mZ(i,l,d,p){i.querySelector('link[rel="preload"][as="style"]['+l+"]")?p.loading=1:(l=i.createElement("link"),p.preload=l,l.addEventListener("load",function(){return p.loading|=1}),l.addEventListener("error",function(){return p.loading|=2}),Bn(l,"link",d),Tn(l),i.head.appendChild(l))}function gc(i){return'[src="'+Vr(i)+'"]'}function kd(i){return"script[async]"+i}function xN(i,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var p=i.querySelector('style[data-href~="'+Vr(d.href)+'"]');if(p)return l.instance=p,Tn(p),p;var y=m({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),Tn(p),Bn(p,"style",y),nm(p,d.precedence,i),l.instance=p;case"stylesheet":y=mc(d.href);var S=i.querySelector(Nd(y));if(S)return l.state.loading|=4,l.instance=S,Tn(S),S;p=EN(d),(y=Xr.get(y))&&h1(p,y),S=(i.ownerDocument||i).createElement("link"),Tn(S);var A=S;return A._p=new Promise(function(k,H){A.onload=k,A.onerror=H}),Bn(S,"link",p),l.state.loading|=4,nm(S,d.precedence,i),l.instance=S;case"script":return S=gc(d.src),(y=i.querySelector(kd(S)))?(l.instance=y,Tn(y),y):(p=d,(y=Xr.get(S))&&(p=m({},d),p1(p,y)),i=i.ownerDocument||i,y=i.createElement("script"),Tn(y),Bn(y,"link",p),i.head.appendChild(y),l.instance=y);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(p=l.instance,l.state.loading|=4,nm(p,d.precedence,i));return l.instance}function nm(i,l,d){for(var p=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=p.length?p[p.length-1]:null,S=y,A=0;A<p.length;A++){var k=p[A];if(k.dataset.precedence===l)S=k;else if(S!==y)break}S?S.parentNode.insertBefore(i,S.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(i,l.firstChild))}function h1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.title==null&&(i.title=l.title)}function p1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.integrity==null&&(i.integrity=l.integrity)}var rm=null;function _N(i,l,d){if(rm===null){var p=new Map,y=rm=new Map;y.set(d,p)}else y=rm,p=y.get(d),p||(p=new Map,y.set(d,p));if(p.has(i))return p;for(p.set(i,null),d=d.getElementsByTagName(i),y=0;y<d.length;y++){var S=d[y];if(!(S[Yu]||S[Fn]||i==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var A=S.getAttribute(l)||"";A=i+A;var k=p.get(A);k?k.push(S):p.set(A,[S])}}return p}function IN(i,l,d){i=i.ownerDocument||i,i.head.insertBefore(d,l==="title"?i.querySelector("head > title"):null)}function gZ(i,l,d){if(d===1||l.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(i=l.disabled,typeof l.precedence=="string"&&i==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function AN(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function vZ(i,l,d,p){if(d.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var y=mc(p.href),S=l.querySelector(Nd(y));if(S){l=S._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(i.count++,i=om.bind(i),l.then(i,i)),d.state.loading|=4,d.instance=S,Tn(S);return}S=l.ownerDocument||l,p=EN(p),(y=Xr.get(y))&&h1(p,y),S=S.createElement("link"),Tn(S);var A=S;A._p=new Promise(function(k,H){A.onload=k,A.onerror=H}),Bn(S,"link",p),d.instance=S}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(i.count++,d=om.bind(i),l.addEventListener("load",d),l.addEventListener("error",d))}}var m1=0;function yZ(i,l){return i.stylesheets&&i.count===0&&im(i,i.stylesheets),0<i.count||0<i.imgCount?function(d){var p=setTimeout(function(){if(i.stylesheets&&im(i,i.stylesheets),i.unsuspend){var S=i.unsuspend;i.unsuspend=null,S()}},6e4+l);0<i.imgBytes&&m1===0&&(m1=62500*JK());var y=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&im(i,i.stylesheets),i.unsuspend)){var S=i.unsuspend;i.unsuspend=null,S()}},(i.imgBytes>m1?50:800)+l);return i.unsuspend=d,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(y)}}:null}function om(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)im(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var sm=null;function im(i,l){i.stylesheets=null,i.unsuspend!==null&&(i.count++,sm=new Map,l.forEach(bZ,i),sm=null,om.call(i))}function bZ(i,l){if(!(l.state.loading&4)){var d=sm.get(i);if(d)var p=d.get(null);else{d=new Map,sm.set(i,d);for(var y=i.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<y.length;S++){var A=y[S];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(d.set(A.dataset.precedence,A),p=A)}p&&d.set(null,p)}y=l.instance,A=y.getAttribute("data-precedence"),S=d.get(A)||p,S===p&&d.set(null,y),d.set(A,y),this.count++,p=om.bind(this),y.addEventListener("load",p),y.addEventListener("error",p),S?S.parentNode.insertBefore(y,S.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(y,i.firstChild)),l.state.loading|=4}}var Dd={$$typeof:R,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function SZ(i,l,d,p,y,S,A,k,H){this.tag=1,this.containerInfo=i,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=u0(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=u0(0),this.hiddenUpdates=u0(null),this.identifierPrefix=p,this.onUncaughtError=y,this.onCaughtError=S,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function RN(i,l,d,p,y,S,A,k,H,Y,ne,se){return i=new SZ(i,l,d,A,H,Y,ne,se,k),l=1,S===!0&&(l|=24),S=Or(3,null,null,l),i.current=S,S.stateNode=i,l=K0(),l.refCount++,i.pooledCache=l,l.refCount++,S.memoizedState={element:p,isDehydrated:d,cache:l},J0(S),i}function TN(i){return i?(i=Gl,i):Gl}function ON(i,l,d,p,y,S){y=TN(y),p.context===null?p.context=y:p.pendingContext=y,p=ui(l),p.payload={element:d},S=S===void 0?null:S,S!==null&&(p.callback=S),d=di(i,p,l),d!==null&&(pr(d,i,l),hd(d,i,l))}function MN(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<l?d:l}}function g1(i,l){MN(i,l),(i=i.alternate)&&MN(i,l)}function PN(i){if(i.tag===13||i.tag===31){var l=ba(i,67108864);l!==null&&pr(l,i,67108864),g1(i,67108864)}}function NN(i){if(i.tag===13||i.tag===31){var l=Dr();l=d0(l);var d=ba(i,l);d!==null&&pr(d,i,l),g1(i,l)}}var am=!0;function CZ(i,l,d,p){var y=V.T;V.T=null;var S=ee.p;try{ee.p=2,v1(i,l,d,p)}finally{ee.p=S,V.T=y}}function wZ(i,l,d,p){var y=V.T;V.T=null;var S=ee.p;try{ee.p=8,v1(i,l,d,p)}finally{ee.p=S,V.T=y}}function v1(i,l,d,p){if(am){var y=y1(p);if(y===null)r1(i,l,p,lm,d),DN(i,p);else if(xZ(y,i,l,d,p))p.stopPropagation();else if(DN(i,p),l&4&&-1<EZ.indexOf(i)){for(;y!==null;){var S=Ll(y);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var A=pa(S.pendingLanes);if(A!==0){var k=S;for(k.pendingLanes|=2,k.entangledLanes|=2;A;){var H=1<<31-Rr(A);k.entanglements[1]|=H,A&=~H}Lo(S),(bt&6)===0&&(qp=Kn()+500,Td(0))}}break;case 31:case 13:k=ba(S,2),k!==null&&pr(k,S,2),Wp(),g1(S,2)}if(S=y1(p),S===null&&r1(i,l,p,lm,d),S===y)break;y=S}y!==null&&p.stopPropagation()}else r1(i,l,p,null,d)}}function y1(i){return i=S0(i),b1(i)}var lm=null;function b1(i){if(lm=null,i=Dl(i),i!==null){var l=s(i);if(l===null)i=null;else{var d=l.tag;if(d===13){if(i=a(l),i!==null)return i;i=null}else if(d===31){if(i=c(l),i!==null)return i;i=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;i=null}else l!==i&&(i=null)}}return lm=i,null}function kN(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(zt()){case Un:return 2;case Po:return 8;case Nl:case cG:return 32;case q2:return 268435456;default:return 32}default:return 32}}var S1=!1,wi=null,Ei=null,xi=null,Ld=new Map,Ud=new Map,_i=[],EZ="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 DN(i,l){switch(i){case"focusin":case"focusout":wi=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":xi=null;break;case"pointerover":case"pointerout":Ld.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ud.delete(l.pointerId)}}function Fd(i,l,d,p,y,S){return i===null||i.nativeEvent!==S?(i={blockedOn:l,domEventName:d,eventSystemFlags:p,nativeEvent:S,targetContainers:[y]},l!==null&&(l=Ll(l),l!==null&&PN(l)),i):(i.eventSystemFlags|=p,l=i.targetContainers,y!==null&&l.indexOf(y)===-1&&l.push(y),i)}function xZ(i,l,d,p,y){switch(l){case"focusin":return wi=Fd(wi,i,l,d,p,y),!0;case"dragenter":return Ei=Fd(Ei,i,l,d,p,y),!0;case"mouseover":return xi=Fd(xi,i,l,d,p,y),!0;case"pointerover":var S=y.pointerId;return Ld.set(S,Fd(Ld.get(S)||null,i,l,d,p,y)),!0;case"gotpointercapture":return S=y.pointerId,Ud.set(S,Fd(Ud.get(S)||null,i,l,d,p,y)),!0}return!1}function LN(i){var l=Dl(i.target);if(l!==null){var d=s(l);if(d!==null){if(l=d.tag,l===13){if(l=a(d),l!==null){i.blockedOn=l,Y2(i.priority,function(){NN(d)});return}}else if(l===31){if(l=c(d),l!==null){i.blockedOn=l,Y2(i.priority,function(){NN(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){i.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}i.blockedOn=null}function cm(i){if(i.blockedOn!==null)return!1;for(var l=i.targetContainers;0<l.length;){var d=y1(i.nativeEvent);if(d===null){d=i.nativeEvent;var p=new d.constructor(d.type,d);b0=p,d.target.dispatchEvent(p),b0=null}else return l=Ll(d),l!==null&&PN(l),i.blockedOn=d,!1;l.shift()}return!0}function UN(i,l,d){cm(i)&&d.delete(l)}function _Z(){S1=!1,wi!==null&&cm(wi)&&(wi=null),Ei!==null&&cm(Ei)&&(Ei=null),xi!==null&&cm(xi)&&(xi=null),Ld.forEach(UN),Ud.forEach(UN)}function um(i,l){i.blockedOn===l&&(i.blockedOn=null,S1||(S1=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,_Z)))}var dm=null;function FN(i){dm!==i&&(dm=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){dm===i&&(dm=null);for(var l=0;l<i.length;l+=3){var d=i[l],p=i[l+1],y=i[l+2];if(typeof p!="function"){if(b1(p||d)===null)continue;break}var S=Ll(d);S!==null&&(i.splice(l,3),l-=3,yS(S,{pending:!0,data:y,method:d.method,action:p},p,y))}}))}function vc(i){function l(H){return um(H,i)}wi!==null&&um(wi,i),Ei!==null&&um(Ei,i),xi!==null&&um(xi,i),Ld.forEach(l),Ud.forEach(l);for(var d=0;d<_i.length;d++){var p=_i[d];p.blockedOn===i&&(p.blockedOn=null)}for(;0<_i.length&&(d=_i[0],d.blockedOn===null);)LN(d),d.blockedOn===null&&_i.shift();if(d=(i.ownerDocument||i).$$reactFormReplay,d!=null)for(p=0;p<d.length;p+=3){var y=d[p],S=d[p+1],A=y[lr]||null;if(typeof S=="function")A||FN(d);else if(A){var k=null;if(S&&S.hasAttribute("formAction")){if(y=S,A=S[lr]||null)k=A.formAction;else if(b1(y)!==null)continue}else k=A.action;typeof k=="function"?d[p+1]=k:(d.splice(p,3),p-=3),FN(d)}}}function $N(){function i(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(A){return y=A})},focusReset:"manual",scroll:"manual"})}function l(){y!==null&&(y(),y=null),p||setTimeout(d,20)}function d(){if(!p&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,y=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),y!==null&&(y(),y=null)}}}function C1(i){this._internalRoot=i}fm.prototype.render=C1.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,p=Dr();ON(d,p,i,l,null,null)},fm.prototype.unmount=C1.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;ON(i.current,2,null,i,null,null),Wp(),l[kl]=null}};function fm(i){this._internalRoot=i}fm.prototype.unstable_scheduleHydration=function(i){if(i){var l=Z2();i={blockedOn:null,target:i,priority:l};for(var d=0;d<_i.length&&l!==0&&l<_i[d].priority;d++);_i.splice(d,0,i),d===0&&LN(i)}};var zN=t.version;if(zN!=="19.2.7")throw Error(r(527,zN,"19.2.7"));ee.findDOMNode=function(i){var l=i._reactInternals;if(l===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(l),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var IZ={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hm.isDisabled&&hm.supportsFiber)try{Gu=hm.inject(IZ),Ar=hm}catch{}}return nf.createRoot=function(i,l){if(!o(i))throw Error(r(299));var d=!1,p="",y=GM,S=KM,A=ZM;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(y=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&(A=l.onRecoverableError)),l=RN(i,1,!1,null,null,d,p,null,y,S,A,$N),i[kl]=l.current,n1(i),new C1(l)},nf.hydrateRoot=function(i,l,d){if(!o(i))throw Error(r(299));var p=!1,y="",S=GM,A=KM,k=ZM,H=null;return d!=null&&(d.unstable_strictMode===!0&&(p=!0),d.identifierPrefix!==void 0&&(y=d.identifierPrefix),d.onUncaughtError!==void 0&&(S=d.onUncaughtError),d.onCaughtError!==void 0&&(A=d.onCaughtError),d.onRecoverableError!==void 0&&(k=d.onRecoverableError),d.formState!==void 0&&(H=d.formState)),l=RN(i,1,!0,l,d??null,p,y,H,S,A,k,$N),l.context=TN(null),d=l.current,p=Dr(),p=d0(p),y=ui(p),y.callback=null,di(d,y,p),d=p,l.current.lanes=d,Zu(l,d),Lo(l),i[kl]=l.current,n1(i),new fm(l)},nf.version="19.2.7",nf}var fU;function FSe(){if(fU)return Ox.exports;fU=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ox.exports=USe(),Ox.exports}var $Se=FSe();const zSe={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)};function jSe({onRequest:e,onSseError:t,onSseEvent:n,responseTransformer:r,responseValidator:o,sseDefaultRetryDelay:s,sseMaxRetryAttempts:a,sseMaxRetryDelay:c,sseSleepFn:u,url:f,...h}){let m;const g=u??(b=>new Promise(E=>setTimeout(E,b)));return{stream:async function*(){let b=s??3e3,E=0;const x=h.signal??new AbortController().signal;for(;!x.aborted;){E++;const I=h.headers instanceof Headers?h.headers:new Headers(h.headers);m!==void 0&&I.set("Last-Event-ID",m);try{const R={redirect:"follow",...h,body:h.serializedBody,headers:I,signal:x};let O=new Request(f,R);e&&(O=await e(f,R));const N=await(h.fetch??globalThis.fetch)(O);if(!N.ok)throw new Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw new Error("No body in SSE response");const M=N.body.pipeThrough(new TextDecoderStream).getReader();let L="";const $=()=>{try{M.cancel()}catch{}};x.addEventListener("abort",$);try{for(;;){const{done:G,value:j}=await M.read();if(G)break;L+=j,L=L.replace(/\r\n?/g,`
89
- `);const F=L.split(`
90
-
91
- `);L=F.pop()??"";for(const q of F){const J=q.split(`
92
- `),Se=[];let V;for(const ge of J)if(ge.startsWith("data:"))Se.push(ge.replace(/^data:\s*/,""));else if(ge.startsWith("event:"))V=ge.replace(/^event:\s*/,"");else if(ge.startsWith("id:"))m=ge.replace(/^id:\s*/,"");else if(ge.startsWith("retry:")){const Te=Number.parseInt(ge.replace(/^retry:\s*/,""),10);Number.isNaN(Te)||(b=Te)}let ee,me=!1;if(Se.length){const ge=Se.join(`
93
- `);try{ee=JSON.parse(ge),me=!0}catch{ee=ge}}me&&(o&&await o(ee),r&&(ee=await r(ee))),n?.({data:ee,event:V,id:m,retry:b}),Se.length&&(yield ee)}}}finally{x.removeEventListener("abort",$),M.releaseLock()}break}catch(R){if(t?.(R),a!==void 0&&E>=a)break;const O=Math.min(b*2**(E-1),c??3e4);await g(O)}}}()}}const BSe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},HSe=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},qSe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},vj=({allowReserved:e,explode:t,name:n,style:r,value:o})=>{if(!t){const c=(e?o:o.map(u=>encodeURIComponent(u))).join(HSe(r));switch(r){case"label":return`.${c}`;case"matrix":return`;${n}=${c}`;case"simple":return c;default:return`${n}=${c}`}}const s=BSe(r),a=o.map(c=>r==="label"||r==="simple"?e?c:encodeURIComponent(c):ub({allowReserved:e,name:n,value:c})).join(s);return r==="label"||r==="matrix"?s+a:a},ub=({allowReserved:e,name:t,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},yj=({allowReserved:e,explode:t,name:n,style:r,value:o,valueOnly:s})=>{if(o instanceof Date)return s?o.toISOString():`${n}=${o.toISOString()}`;if(r!=="deepObject"&&!t){let u=[];Object.entries(o).forEach(([h,m])=>{u=[...u,h,e?m:encodeURIComponent(m)]});const f=u.join(",");switch(r){case"form":return`${n}=${f}`;case"label":return`.${f}`;case"matrix":return`;${n}=${f}`;default:return f}}const a=qSe(r),c=Object.entries(o).map(([u,f])=>ub({allowReserved:e,name:r==="deepObject"?`${n}[${u}]`:u,value:f})).join(a);return r==="label"||r==="matrix"?a+c:c},VSe=/\{[^{}]+\}/g,WSe=({path:e,url:t})=>{let n=t;const r=t.match(VSe);if(r)for(const o of r){let s=!1,a=o.substring(1,o.length-1),c="simple";a.endsWith("*")&&(s=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),c="label"):a.startsWith(";")&&(a=a.substring(1),c="matrix");const u=e[a];if(u==null)continue;if(Array.isArray(u)){n=n.replace(o,vj({explode:s,name:a,style:c,value:u}));continue}if(typeof u=="object"){n=n.replace(o,yj({explode:s,name:a,style:c,value:u,valueOnly:!0}));continue}if(c==="matrix"){n=n.replace(o,`;${ub({name:a,value:u})}`);continue}const f=encodeURIComponent(c==="label"?`.${u}`:u);n=n.replace(o,f)}return n},GSe=({baseUrl:e,path:t,query:n,querySerializer:r,url:o})=>{const s=o.startsWith("/")?o:`/${o}`;let a=(e??"")+s;t&&(a=WSe({path:t,url:a}));let c=n?r(n):"";return c.startsWith("?")&&(c=c.substring(1)),c&&(a+=`?${c}`),a};function hU(e){const t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}const KSe=async(e,t)=>{const n=typeof t=="function"?await t(e):t;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n},bj=({parameters:e={},...t}={})=>r=>{const o=[];if(r&&typeof r=="object")for(const s in r){const a=r[s];if(a==null)continue;const c=e[s]||t;if(Array.isArray(a)){const u=vj({allowReserved:c.allowReserved,explode:!0,name:s,style:"form",value:a,...c.array});u&&o.push(u)}else if(typeof a=="object"){const u=yj({allowReserved:c.allowReserved,explode:!0,name:s,style:"deepObject",value:a,...c.object});u&&o.push(u)}else{const u=ub({allowReserved:c.allowReserved,name:s,value:a});u&&o.push(u)}}return o.join("&")},ZSe=e=>{if(!e)return"stream";const t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(n=>t.startsWith(n)))return"blob";if(t.startsWith("text/"))return"text"}},YSe=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)):!1;async function QSe(e){for(const t of e.security??[]){if(YSe(e,t.name))continue;const n=await KSe(t,e.auth);if(!n)continue;const r=t.name??"Authorization";switch(t.in){case"query":e.query||(e.query={}),e.query[r]=n;break;case"cookie":e.headers.append("Cookie",`${r}=${n}`);break;default:e.headers.set(r,n);break}}}const pU=e=>GSe({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:bj(e.querySerializer),url:e.url}),mU=(e,t)=>{const n={...e,...t};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=Sj(e.headers,t.headers),n},JSe=e=>{const t=[];return e.forEach((n,r)=>{t.push([r,n])}),t},Sj=(...e)=>{const t=new Headers;for(const n of e){if(!n)continue;const r=n instanceof Headers?JSe(n):Object.entries(n);for(const[o,s]of r)if(s===null)t.delete(o);else if(Array.isArray(s))for(const a of s)t.append(o,a);else s!==void 0&&t.set(o,typeof s=="object"?JSON.stringify(s):s)}return t};class Nx{fns=[];clear(){this.fns=[]}eject(t){const n=this.getInterceptorIndex(t);this.fns[n]&&(this.fns[n]=null)}exists(t){const n=this.getInterceptorIndex(t);return!!this.fns[n]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,n){const r=this.getInterceptorIndex(t);return this.fns[r]?(this.fns[r]=n,t):!1}use(t){return this.fns.push(t),this.fns.length-1}}const XSe=()=>({error:new Nx,request:new Nx,response:new Nx}),e1e=bj({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),t1e={"Content-Type":"application/json"},Cj=(e={})=>({...zSe,headers:t1e,parseAs:"auto",querySerializer:e1e,...e}),n1e=(e={})=>{let t=mU(Cj(),e);const n=()=>({...t}),r=h=>(t=mU(t,h),n()),o=XSe(),s=async h=>{const m={...t,...h,fetch:h.fetch??t.fetch??globalThis.fetch,headers:Sj(t.headers,h.headers),serializedBody:void 0};m.security&&await QSe(m),m.requestValidator&&await m.requestValidator(m),m.body!==void 0&&m.bodySerializer&&(m.serializedBody=m.bodySerializer(m.body)),(m.body===void 0||m.serializedBody==="")&&m.headers.delete("Content-Type");const g=m,v=pU(g);return{opts:g,url:v}},a=async h=>{const m=h.throwOnError??t.throwOnError,g=h.responseStyle??t.responseStyle;let v,C;try{const{opts:b,url:E}=await s(h),x={redirect:"follow",...b,body:hU(b)};v=new Request(E,x);for(const N of o.request.fns)N&&(v=await N(v,b));const I=b.fetch;C=await I(v);for(const N of o.response.fns)N&&(C=await N(C,v,b));const R={request:v,response:C};if(C.ok){const N=(b.parseAs==="auto"?ZSe(C.headers.get("Content-Type")):b.parseAs)??"json";if(C.status===204||C.headers.get("Content-Length")==="0"){let L;switch(N){case"arrayBuffer":case"blob":case"text":L=await C[N]();break;case"formData":L=new FormData;break;case"stream":L=C.body;break;default:L={};break}return b.responseStyle==="data"?L:{data:L,...R}}let M;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":M=await C[N]();break;case"json":{const L=await C.text();M=L?JSON.parse(L):{};break}case"stream":return b.responseStyle==="data"?C.body:{data:C.body,...R}}return N==="json"&&(b.responseValidator&&await b.responseValidator(M),b.responseTransformer&&(M=await b.responseTransformer(M))),b.responseStyle==="data"?M:{data:M,...R}}const O=await C.text();let D;try{D=JSON.parse(O)}catch{}throw D??O}catch(b){let E=b;for(const x of o.error.fns)x&&(E=await x(E,C,v,h));if(E=E||{},m)throw E;return g==="data"?void 0:{error:E,request:v,response:C}}},c=h=>m=>a({...m,method:h}),u=h=>async m=>{const{opts:g,url:v}=await s(m);return jSe({...g,body:g.body,method:h,onRequest:async(C,b)=>{let E=new Request(C,b);for(const x of o.request.fns)x&&(E=await x(E,g));return E},serializedBody:hU(g),url:v})};return{buildUrl:h=>pU({...t,...h}),connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),getConfig:n,head:c("HEAD"),interceptors:o,options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),request:a,setConfig:r,sse:{connect:u("CONNECT"),delete:u("DELETE"),get:u("GET"),head:u("HEAD"),options:u("OPTIONS"),patch:u("PATCH"),post:u("POST"),put:u("PUT"),trace:u("TRACE")},trace:c("TRACE")}},pe=n1e(Cj({baseUrl:"https://api.remit.example.com"}));let gU=!1;const r1e=e=>{gU||(pe.interceptors.request.use(async t=>{const n=await e.getToken();return n&&t.headers.set("Authorization",`Bearer ${n}`),t}),gU=!0)},o1e=({children:e})=>T.jsx(T.Fragment,{children:e}),s1e={configure:()=>{},getToken:async()=>null,resetToken:()=>{},Shell:o1e,Account:({fallback:e=null})=>T.jsx(T.Fragment,{children:e})},wj=_.createContext(s1e),i1e=wj.Provider,a1e=()=>_.useContext(wj),_v=new Set;let Iv=!1;const db=()=>{if(!Iv){Iv=!0;for(const e of _v)e(!0)}},l1e=()=>Iv,c1e=e=>(_v.add(e),()=>{_v.delete(e)}),vU=()=>{Iv=!1;for(const e of _v)e(!1)},fb=(e,t)=>{if(My(e)){db();return}Aie(e,t)&&iu(e)},u1e=(e,t)=>{fb(e,t.meta)},d1e=(e,t,n,r)=>{fb(e,r.meta)},vI=e=>new TextEncoder().encode(e),Ej={},yI={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),Ej[e]=t,yI[t]=e}function f1e(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(r in yI)t[n/2]=yI[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return t}function Qa(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Ej[e[n]];return t}const th=e=>e instanceof Uint8Array?e:typeof e=="string"?vI(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),h1e=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";class Vs{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const n=new Vs({...t,headers:{...t.headers}});return n.query&&(n.query=p1e(n.query)),n}static isInstance(t){if(!t)return!1;const n=t;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query=="object"&&typeof n.headers=="object"}clone(){return Vs.clone(this)}}function p1e(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{})}class nh{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const n=t;return typeof n.statusCode=="number"&&typeof n.headers=="object"}}const yU=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},Ja=e=>encodeURIComponent(e).replace(/[!'()*]/g,m1e),m1e=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function gT(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=Ja(n),Array.isArray(r))for(let o=0,s=r.length;o<s;o++)t.push(`${n}=${Ja(r[o])}`);else{let o=n;(r||typeof r=="string")&&(o+=`=${Ja(r)}`),t.push(o)}}return t.join("&")}const Hm="[aws-rum-web:unknown.unknown]";class Ce{static configure(t){Ce.debugEnabled=t}static getCallerInfo(){var t,n;try{const r=new Error().stack;if(!r)return Hm;const o=r.split(`
94
- `);if(o.length<4)return Hm;const s=o[3];if(!s)return Hm;const a=s.match(/at (?:(.+?)\s+\()?/);if(a&&a.length>=2){const c=a[1].trim(),u=c.split(".");if(u.length>=2){const f=(t=u[u.length-2])!==null&&t!==void 0?t:"unknown",h=(n=u[u.length-1])!==null&&n!==void 0?n:"unknown";return`[aws-rum-web:${f}.${h}]`}return`[aws-rum-web:${c}]`}}catch{}return Hm}static info(t,...n){if(!Ce.debugEnabled)return;const r=this.getCallerInfo();console.info(r,t,...n)}static debug(t,...n){if(!Ce.debugEnabled)return;const r=this.getCallerInfo();console.debug(r,t,...n)}static warn(t,...n){if(!Ce.debugEnabled)return;const r=this.getCallerInfo();console.warn(r,t,...n)}static error(t,...n){if(!Ce.debugEnabled)return;const r=this.getCallerInfo();console.error(r,t,...n)}}Ce.debugEnabled=!1;const bU=2048,SU=.2,g1e=()=>typeof CompressionStream<"u",v1e=async e=>{const t=new Blob([e]).stream().pipeThrough(new CompressionStream("gzip"));return new Uint8Array(await new Response(t).arrayBuffer())},y1e=async e=>{const t=e.length;if(Ce.debug(`compressIfBeneficial called, payload size: ${t}B`),!g1e())return Ce.debug("CompressionStream not supported, skipping compression"),{body:e,compressed:!1};if(t<bU)return Ce.debug(`Payload size ${t}B below threshold ${bU}B, skipping compression`),{body:e,compressed:!1};const n=await v1e(e),r=1-n.length/t;return r>=SU?(Ce.debug(`Compressed ${t}B -> ${n.length}B (${(r*100).toFixed(1)}% reduction)`),{body:n,compressed:!0}):(Ce.debug(`Compression ratio ${(r*100).toFixed(1)}% below threshold ${SU*100}%, skipping`),{body:e,compressed:!1})},b1e="POST",S1e="application/json",C1e="text/plain;charset=UTF-8",w1e=64e3;class E1e{constructor(t,n){this.sendFetch=async r=>{var o,s;const a=JSON.stringify(CU(r)),c=(s=(o=this.config.compressionStrategy)===null||o===void 0?void 0:o.enabled)!==null&&s!==void 0?s:!1,{body:u,compressed:f}=c?await y1e(a):{body:a,compressed:!1},h=await this.getHttpRequestOptions(r,u,S1e,f);let m=new Vs(h);return this.signing&&(m=await this.signing.sign(m)),this.config.fetchRequestHandler.handle(m)},this.sendBeacon=async r=>{const o=JSON.stringify(CU(r));if(o.length>w1e)throw new Error("Payload too large for sendBeacon");const s=await this.getHttpRequestOptions(r,o,C1e,!1);let a=new Vs(s);return this.signing&&(a=await this.signing.presign(a)),this.config.beaconRequestHandler.handle(a)},this.getHttpRequestOptions=async(r,o,s,a)=>{const c=this.config.endpoint.pathname.replace(/\/$/,""),u=Object.assign({"content-type":s,host:this.config.endpoint.host},this.config.headers);a&&(u["Content-Encoding"]="gzip");const f={method:b1e,protocol:this.config.endpoint.protocol,port:Number(this.config.endpoint.port)||void 0,headers:u,hostname:this.config.endpoint.hostname,path:`${c}/appmonitors/${r.AppMonitorDetails.id}`,body:o};return this.signing?Object.assign(Object.assign({},f),{headers:Object.assign(Object.assign({},f.headers),{"X-Amz-Content-Sha256":await this.signing.hashAndEncode(o)})}):f},this.config=t,this.signing=n}}const CU=e=>{const t=[];e.RumEvents.forEach(r=>t.push(x1e(r)));let n={BatchId:e.BatchId,AppMonitorDetails:e.AppMonitorDetails,UserDetails:e.UserDetails,RumEvents:t};return e.SessionMetadata&&(n=Object.assign(Object.assign({},n),{SessionMetadata:e.SessionMetadata})),e.Alias&&(n=Object.assign(Object.assign({},n),{Alias:e.Alias})),n},x1e=e=>({id:e.id,timestamp:Math.round(e.timestamp.getTime()/1e3),type:e.type,metadata:e.metadata,details:e.details});class _1e{handle(t){const n=this.sendBeacon(t);return new Promise((r,o)=>{n?r({response:new nh({statusCode:200})}):o()})}updateHttpClientConfig(t,n){}httpHandlerConfigs(){return{}}sendBeacon(t){let n=t.path;if(t.query){const s=gT(t.query);s&&(n+=`?${s}`)}const{port:r}=t,o=`${t.protocol}//${t.hostname}${r?`:${r}`:""}${n}`;return navigator.sendBeacon(o,t.body)}}const I1e=(e=0)=>new Promise((t,n)=>{e&&setTimeout(()=>{const r=new Error(`Request did not complete within ${e} ms`);r.name="TimeoutError",n(r)},e)});let A1e=class{constructor({fetchFunction:t,requestTimeout:n}={}){this.requestTimeout=n,this.fetchFunction=t}destroy(){}handle(t,{abortSignal:n}={}){const r=this.requestTimeout;if(n?.aborted){const g=new Error("Request aborted");return g.name="AbortError",Promise.reject(g)}let o=t.path;if(t.query){const g=gT(t.query);g&&(o+=`?${g}`)}const{port:s,method:a}=t,c=`${t.protocol}//${t.hostname}${s?`:${s}`:""}${o}`,f={body:a==="GET"||a==="HEAD"?void 0:t.body,headers:new Headers(t.headers),method:a};typeof AbortController<"u"&&(f.signal=n);const h=new Request(c,f),m=[this.fetchFunction.apply(window,[h]).then(g=>{const v=g.headers,C={};for(const E of v.entries())C[E[0]]=E[1];return g.body!==void 0?{response:new nh({headers:C,statusCode:g.status,body:g.body})}:g.blob().then(E=>({response:new nh({headers:C,statusCode:g.status,body:E})}))}),I1e(r)];return n&&m.push(new Promise((g,v)=>{n.onabort=()=>{const C=new Error("Request aborted");C.name="AbortError",v(C)}})),Promise.race(m)}updateHttpClientConfig(t,n){}httpHandlerConfigs(){return{}}};const vT=e=>{if(crypto)return crypto.getRandomValues(e);if(msCrypto)return msCrypto.getRandomValues(e);throw new Error("No crypto library found.")},xj=[];for(let e=0;e<256;e++)xj[e]=(e+256).toString(16).substr(1);const hb="X-Amzn-Trace-Id",pb="traceparent",R1e=2,T1e=32,O1e=16,M1e=4,_j=(e,t)=>Array.isArray(t)?t.some(n=>n.test(e)):t,Ij={logicalServiceName:"rum.aws.amazon.com",urlsToInclude:[/.*/],urlsToExclude:[/cognito\-identity\.([^\.]*\.)?amazonaws\.com/,/sts\.([^\.]*\.)?amazonaws\.com/],stackTraceLength:200,recordAllRequests:!1,addXRayTraceIdHeader:!1},P1e=e=>200<=e&&e<300,Aj=e=>Math.floor(e/100)===4,yT=e=>Math.floor(e/100)===5,bT=e=>e===429,Rj=(e,t)=>{const n=t.urlsToInclude.some(o=>o.test(e)),r=t.urlsToExclude.some(o=>o.test(e));return n&&!r},jc=()=>Date.now()/1e3,N1e=(e,t,n)=>{const r={request:{}};return r.request.method=t?.method?t.method:"GET",r.request.traced=n,r.request.url=Gg(e),r},Tj=(e,t,n,r)=>({version:"1.0.0",name:e,origin:"AWS::RUM::AppMonitor",id:Pj(),start_time:t,trace_id:n?$1e():F1e(),end_time:void 0,subsegments:[],in_progress:!1}),Oj=(e,t,n)=>{const r={id:Pj(),name:e,start_time:t,end_time:void 0,in_progress:!1,namespace:e.endsWith(".amazonaws.com")?"aws":"remote"};return n&&(r.http=n),r},Mj=e=>{try{return e.hostname?e.hostname:e.url?new URL(e.url).hostname:new URL(e.toString()).hostname}catch{return window.location.hostname}},k1e=(e,t,n,r)=>{e.headers||(e.headers={}),r?e.headers[pb]=CT(t,n):e.headers[hb]=ST(t,n)},D1e=(e,t,n,r)=>{r?e.set(pb,CT(t,n)):e.set(hb,ST(t,n))},ST=(e,t)=>"Root="+e+";Parent="+t+";Sampled=1",CT=(e,t)=>"00-"+e+"-"+t+"-01",L1e=e=>e?.length===M1e&&e[0].length===R1e&&e[1].length===T1e&&e[2].length===O1e&&(e[3]==="00"||e[3]==="01"),U1e=(e,t)=>{var n,r;const o={};if(e)if(t){const s=(n=e.get(pb))===null||n===void 0?void 0:n.split("-");s&&L1e(s)&&(o.traceId=s[1],o.segmentId=s[2])}else{const s=(r=e.get(hb))===null||r===void 0?void 0:r.split(";");s?.length===3&&(o.traceId=s[0].split("Root=")[1],o.segmentId=s[1].split("Parent=")[1])}return o},Gg=e=>e.url?e.url:e.toString(),F1e=()=>`1-${z1e()}-${j1e()}`,$1e=()=>{const e=new Uint8Array(16);return vT(e),`${wT(e)}`},Pj=()=>{const e=new Uint8Array(8);return vT(e),wT(e)},z1e=()=>Math.floor(Date.now()/1e3).toString(16),j1e=()=>{const e=new Uint8Array(12);return vT(e),wT(e)},wT=e=>{let t="";for(let n=0;n<e.length;n++)t+=xj[e[n]];return t};class B1e{constructor(t,n,r=o=>2e3*Math.pow(2,o-1)){this.handler=t,this.retries=n,this.backoff=r}async handle(t){let n=this.retries;for(;;)try{const r=await this.handler.handle(t);if(P1e(r.response.statusCode))return r;throw r.response.statusCode}catch(r){if(typeof r=="number"&&!bT(r)&&!yT(r))throw new Error(`${r}`);if(n<=0)throw r;n--,await this.sleep(this.backoff(this.retries-n))}}async sleep(t){return new Promise(n=>setTimeout(n,t))}updateHttpClientConfig(t,n){}httpHandlerConfigs(){return{}}}const uu="cwr_c",Av="cwr_i",Rv="cwr_s",Tv="cwr_u",H1e=3e4,q1e="arw-module",wU="CWR: Cannot dispatch; no AWS credentials.";class V1e{constructor(t,n,r,o,s){this.disableCodes=["403","404"],this.shouldPurgeCredentials=!0,this.dispatchFetch=async()=>{if(this.doRequest()){const a=this.createRequest();return Ce.info(`Dispatching ${a.RumEvents.length} events via fetch`),this.rum.sendFetch(a).catch(this.handleReject)}},this.dispatchBeacon=async()=>{if(this.doRequest()){const a=this.createRequest();return Ce.info(`Dispatching ${a.RumEvents.length} events via beacon`),this.rum.sendBeacon(a).catch(()=>this.rum.sendFetch(a))}},this.dispatchFetchFailSilent=async()=>this.dispatchFetch().catch(a=>{Ce.error("Dispatch fetch failed silently:",a)}),this.dispatchBeaconFailSilent=async()=>this.dispatchBeacon().catch(a=>{Ce.error("Dispatch beacon failed silently:",a)}),this.flushSync=()=>{if(document.visibilityState==="hidden"&&this.doRequest(!0)){let a=this.rum.sendBeacon,c=this.rum.sendFetch;this.config.useBeacon||([a,c]=[c,a]);const u=this.createRequest(!0);Ce.debug(`Flushing ${u.RumEvents.length} events on page hide`),a(u).catch(()=>c(u)).catch(f=>{Ce.error("Page hide flush failed:",f)})}},this.handleReject=a=>{throw a instanceof Error&&(a.message==="403"&&this.config.signing&&this.shouldPurgeCredentials?(this.shouldPurgeCredentials=!1,this.forceRebuildClient()):this.disableCodes.includes(a.message)&&(Ce.error("Dispatch failed with status code:",a.message),this.disable())),a},this.defaultClientBuilder=(a,c,u,f)=>{const h=u&&this.signingConfigFactory?this.signingConfigFactory(u,c):void 0;return new E1e({fetchRequestHandler:new B1e(new A1e({fetchFunction:this.config.fetchFunction}),this.config.retries),beaconRequestHandler:new _1e,endpoint:a,region:c,credentials:u,headers:this.headers,compressionStrategy:f},h)},this.applicationId=t,this.region=n,this.endpoint=r,this.eventCache=o,this.enabled=!0,this.buildClient=s.clientBuilder||this.defaultClientBuilder,this.config=s,this.headers=s.headers,this.startDispatchTimer(),s.signing?this.rum={sendFetch:()=>Promise.reject(new Error(wU)),sendBeacon:()=>Promise.reject(new Error(wU))}:this.rum=this.buildClient(this.endpoint,this.region,void 0,this.config.compressionStrategy),this.credentialStorageKey=this.config.cookieAttributes.unique?`${uu}_${t}`:uu,this.identityStorageKey=this.config.cookieAttributes.unique?`${Av}_${t}`:Av}enable(){this.enabled=!0,this.startDispatchTimer()}disable(){this.stopDispatchTimer(),this.enabled=!1,Ce.warn("Dispatch disabled")}setAwsCredentials(t){this.credentialProvider=t,this.rum=this.buildClient(this.endpoint,this.region,t,this.config.compressionStrategy),typeof t=="function"&&t()}setCognitoCredentialProviderFactory(t){this.cognitoCredentialProviderFactory=t}setSigningConfigFactory(t){this.signingConfigFactory=t}setCognitoCredentials(t,n){this.identityPoolId=t,this.guestRoleArn=n,this.cognitoCredentialProviderFactory&&this.setAwsCredentials(this.cognitoCredentialProviderFactory(this.config,this.applicationId,t,n))}startDispatchTimer(){document.addEventListener("visibilitychange",this.flushSync),document.addEventListener("pagehide",this.flushSync),!(this.config.dispatchInterval<=0||this.dispatchTimerId)&&(this.dispatchTimerId=window.setInterval(this.dispatchFetchFailSilent,this.config.dispatchInterval))}stopDispatchTimer(){document.removeEventListener("visibilitychange",this.flushSync),document.removeEventListener("pagehide",this.flushSync),this.dispatchTimerId&&(window.clearInterval(this.dispatchTimerId),this.dispatchTimerId=void 0)}doRequest(t=!1){return this.enabled?t&&this.eventCache.hasCandidates()?!0:this.eventCache.hasEvents():!1}createRequest(t=!1){return{BatchId:Gc(),AppMonitorDetails:this.eventCache.getAppMonitorDetails(),UserDetails:this.eventCache.getUserDetails(),SessionMetadata:JSON.stringify(this.eventCache.getCommonMetadata()),RumEvents:this.eventCache.getEventBatch(t),Alias:this.config.alias}}forceRebuildClient(){Ce.warn("Removing credentials from local storage"),localStorage.removeItem(this.credentialStorageKey),this.identityPoolId?(Ce.info("Rebuilding client with fresh cognito credentials"),localStorage.removeItem(this.identityStorageKey),this.setCognitoCredentials(this.identityPoolId,this.guestRoleArn)):this.credentialProvider&&(Ce.info("Rebuilding client with most recently passed provider"),this.setAwsCredentials(this.credentialProvider))}}const Nj={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),Nj[e]=t}function W1e(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Nj[e[n]];return t}class G1e{format(t){const n=[];for(const s of Object.keys(t)){const a=vI(s);n.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[s]))}const r=new Uint8Array(n.reduce((s,a)=>s+a.byteLength,0));let o=0;for(const s of n)r.set(s,o),o+=s.byteLength;return r}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?to.boolTrue:to.boolFalse]);case"byte":return Uint8Array.from([to.byte,t.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,to.short),n.setInt16(1,t.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,to.integer),r.setInt32(1,t.value,!1),new Uint8Array(r.buffer);case"long":const o=new Uint8Array(9);return o[0]=to.long,o.set(t.value.bytes,1),o;case"binary":const s=new DataView(new ArrayBuffer(3+t.value.byteLength));s.setUint8(0,to.byteArray),s.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(s.buffer);return a.set(t.value,3),a;case"string":const c=vI(t.value),u=new DataView(new ArrayBuffer(3+c.byteLength));u.setUint8(0,to.string),u.setUint16(1,c.byteLength,!1);const f=new Uint8Array(u.buffer);return f.set(c,3),f;case"timestamp":const h=new Uint8Array(9);return h[0]=to.timestamp,h.set(ET.fromNumber(t.value.valueOf()).bytes,1),h;case"uuid":if(!K1e.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const m=new Uint8Array(17);return m[0]=to.uuid,m.set(f1e(t.value.replace(/-/g,"")),1),m}}}var to;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(to||(to={}));const K1e=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class ET{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,o=Math.abs(Math.round(t));r>-1&&o>0;r--,o/=256)n[r]=o;return t<0&&EU(n),new ET(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&EU(t),parseInt(Qa(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function EU(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const Z1e="X-Amz-Algorithm",Y1e="X-Amz-Credential",kj="X-Amz-Date",Q1e="X-Amz-SignedHeaders",J1e="X-Amz-Expires",Dj="X-Amz-Signature",Lj="X-Amz-Security-Token",Uj="authorization",Fj=kj.toLowerCase(),X1e="date",eCe=[Uj,Fj,X1e],tCe=Dj.toLowerCase(),bI="x-amz-content-sha256",nCe=Lj.toLowerCase(),rCe={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},oCe=/^proxy-/,sCe=/^sec-/,kx="AWS4-HMAC-SHA256",iCe="AWS4-HMAC-SHA256-PAYLOAD",aCe="UNSIGNED-PAYLOAD",lCe=50,$j="aws4_request",cCe=3600*24*7,uCe=({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===tCe)continue;const o=Ja(r);t.push(o);const s=e[r];typeof s=="string"?n[o]=`${o}=${Ja(s)}`:Array.isArray(s)&&(n[o]=s.slice(0).reduce((a,c)=>a.concat([`${o}=${Ja(c)}`]),[]).sort().join("&"))}return t.sort().map(r=>n[r]).filter(r=>r).join("&")},dCe=e=>fCe(e).toISOString().replace(/\.\d{3}Z$/,"Z"),fCe=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class hCe{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:n,region:r,service:o,sha256:s,uriEscapePath:a=!0}){this.service=o,this.sha256=s,this.uriEscapePath=a,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=yU(r),this.credentialProvider=yU(n)}createCanonicalRequest(t,n,r){const o=Object.keys(n).sort();return`${t.method}
95
- ${this.getCanonicalPath(t)}
96
- ${uCe(t)}
97
- ${o.map(s=>`${s}:${n[s]}`).join(`
98
- `)}
99
-
100
- ${o.join(";")}
101
- ${r}`}async createStringToSign(t,n,r,o){const s=new this.sha256;s.update(th(r));const a=await s.digest();return`${o}
102
- ${t}
103
- ${n}
104
- ${Qa(a)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const n=[];for(const s of t.split("/"))s?.length!==0&&s!=="."&&(s===".."?n.pop():n.push(s));const r=`${t?.startsWith("/")?"/":""}${n.join("/")}${n.length>0&&t?.endsWith("/")?"/":""}`;return Ja(r).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){const n=dCe(t).replace(/[-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}const qm={},Dx=[],Lx=(e,t,n)=>`${e}/${t}/${n}/${$j}`,pCe=async(e,t,n,r,o)=>{const s=await xU(e,t.secretAccessKey,t.accessKeyId),a=`${n}:${r}:${o}:${Qa(s)}:${t.sessionToken}`;if(a in qm)return qm[a];for(Dx.push(a);Dx.length>lCe;)delete qm[Dx.shift()];let c=`AWS4${t.secretAccessKey}`;for(const u of[n,r,o,$j])c=await xU(e,c,u);return qm[a]=c},xU=(e,t,n)=>{const r=new e(t);return r.update(th(n)),r.digest()},_U=({headers:e},t,n)=>{const r={};for(const o of Object.keys(e).sort()){if(e[o]==null)continue;const s=o.toLowerCase();(s in rCe||t?.has(s)||oCe.test(s)||sCe.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[o].trim().replace(/\s+/g," "))}return r},Ux=async({headers:e,body:t},n)=>{for(const r of Object.keys(e))if(r.toLowerCase()===bI)return e[r];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||h1e(t)){const r=new n;return r.update(th(t)),Qa(await r.digest())}return aCe},mCe=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},gCe=(e,t={})=>{const{headers:n,query:r={}}=Vs.clone(e);for(const o of Object.keys(n)){const s=o.toLowerCase();(s.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(s)||t.hoistableHeaders?.has(s))&&(r[o]=n[o],delete n[o])}return{...e,headers:n,query:r}},IU=e=>{e=Vs.clone(e);for(const t of Object.keys(e.headers))eCe.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e};class vCe extends hCe{headerFormatter=new G1e;constructor({applyChecksum:t,credentials:n,region:r,service:o,sha256:s,uriEscapePath:a=!0}){super({applyChecksum:t,credentials:n,region:r,service:o,sha256:s,uriEscapePath:a})}async presign(t,n={}){const{signingDate:r=new Date,expiresIn:o=3600,unsignableHeaders:s,unhoistableHeaders:a,signableHeaders:c,hoistableHeaders:u,signingRegion:f,signingService:h}=n,m=await this.credentialProvider();this.validateResolvedCredentials(m);const g=f??await this.regionProvider(),{longDate:v,shortDate:C}=this.formatDate(r);if(o>cCe)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const b=Lx(C,g,h??this.service),E=gCe(IU(t),{unhoistableHeaders:a,hoistableHeaders:u});m.sessionToken&&(E.query[Lj]=m.sessionToken),E.query[Z1e]=kx,E.query[Y1e]=`${m.accessKeyId}/${b}`,E.query[kj]=v,E.query[J1e]=o.toString(10);const x=_U(E,s,c);return E.query[Q1e]=this.getCanonicalHeaderList(x),E.query[Dj]=await this.getSignature(v,b,this.getSigningKey(m,g,C,h),this.createCanonicalRequest(E,x,await Ux(t,this.sha256))),E}async sign(t,n){return typeof t=="string"?this.signString(t,n):t.headers&&t.payload?this.signEvent(t,n):t.message?this.signMessage(t,n):this.signRequest(t,n)}async signEvent({headers:t,payload:n},{signingDate:r=new Date,priorSignature:o,signingRegion:s,signingService:a,eventStreamCredentials:c}){const u=s??await this.regionProvider(),{shortDate:f,longDate:h}=this.formatDate(r),m=Lx(f,u,a??this.service),g=await Ux({headers:{},body:n},this.sha256),v=new this.sha256;v.update(t);const C=Qa(await v.digest()),b=[iCe,h,m,o,C,g].join(`
105
- `);return this.signString(b,{signingDate:r,signingRegion:u,signingService:a,eventStreamCredentials:c})}async signMessage(t,{signingDate:n=new Date,signingRegion:r,signingService:o,eventStreamCredentials:s}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:n,signingRegion:r,signingService:o,priorSignature:t.priorSignature,eventStreamCredentials:s}).then(c=>({message:t.message,signature:c}))}async signString(t,{signingDate:n=new Date,signingRegion:r,signingService:o,eventStreamCredentials:s}={}){const a=s??await this.credentialProvider();this.validateResolvedCredentials(a);const c=r??await this.regionProvider(),{shortDate:u}=this.formatDate(n),f=new this.sha256(await this.getSigningKey(a,c,u,o));return f.update(th(t)),Qa(await f.digest())}async signRequest(t,{signingDate:n=new Date,signableHeaders:r,unsignableHeaders:o,signingRegion:s,signingService:a}={}){const c=await this.credentialProvider();this.validateResolvedCredentials(c);const u=s??await this.regionProvider(),f=IU(t),{longDate:h,shortDate:m}=this.formatDate(n),g=Lx(m,u,a??this.service);f.headers[Fj]=h,c.sessionToken&&(f.headers[nCe]=c.sessionToken);const v=await Ux(f,this.sha256);!mCe(bI,f.headers)&&this.applyChecksum&&(f.headers[bI]=v);const C=_U(f,o,r),b=await this.getSignature(h,g,this.getSigningKey(c,u,m,a),this.createCanonicalRequest(f,C,v));return f.headers[Uj]=`${kx} Credential=${c.accessKeyId}/${g}, SignedHeaders=${this.getCanonicalHeaderList(C)}, Signature=${b}`,f}async getSignature(t,n,r,o){const s=await this.createStringToSign(t,n,o,kx),a=new this.sha256(await r);return a.update(th(s)),Qa(await a.digest())}getSigningKey(t,n,r,o){return pCe(this.sha256,t,r,n,o||this.service)}}const yCe="rum",bCe={expiresIn:60},SCe=(e,t)=>{const n=new vCe({applyChecksum:!0,credentials:e,region:t,service:yCe,uriEscapePath:!0,sha256:nl});return{sign:async r=>await n.sign(r),presign:async r=>await n.presign(r,bCe),hashAndEncode:async r=>{const o=new nl;return o.update(r),W1e(await o.digest()).toLowerCase()}}};function AU(e,t){return new Request(e,t)}function CCe(e=0){return new Promise((t,n)=>{e&&setTimeout(()=>{const r=new Error(`Request did not complete within ${e} ms`);r.name="TimeoutError",n(r)},e)})}const Fx={supported:void 0};class mb{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new mb(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(n=>n||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),Fx.supported===void 0&&(Fx.supported=typeof Request<"u"&&"keepalive"in AU("https://[::1]"))}destroy(){}async handle(t,{abortSignal:n,requestTimeout:r}={}){this.config||(this.config=await this.configProvider);const o=r??this.config.requestTimeout,s=this.config.keepAlive===!0,a=this.config.credentials;if(n?.aborted){const I=RU(n);return Promise.reject(I)}let c=t.path;const u=gT(t.query||{});u&&(c+=`?${u}`),t.fragment&&(c+=`#${t.fragment}`);let f="";if(t.username!=null||t.password!=null){const I=t.username??"",R=t.password??"";f=`${I}:${R}@`}const{port:h,method:m}=t,g=`${t.protocol}//${f}${t.hostname}${h?`:${h}`:""}${c}`,v=m==="GET"||m==="HEAD"?void 0:t.body,C={body:v,headers:new Headers(t.headers),method:m,credentials:a};this.config?.cache&&(C.cache=this.config.cache),v&&(C.duplex="half"),typeof AbortController<"u"&&(C.signal=n),Fx.supported&&(C.keepalive=s),typeof this.config.requestInit=="function"&&Object.assign(C,this.config.requestInit(t));let b=()=>{};const E=AU(g,C),x=[fetch(E).then(I=>{const R=I.headers,O={};for(const N of R.entries())O[N[0]]=N[1];return I.body!=null?{response:new nh({headers:O,reason:I.statusText,statusCode:I.status,body:I.body})}:I.blob().then(N=>({response:new nh({headers:O,reason:I.statusText,statusCode:I.status,body:N})}))}),CCe(o)];return n&&x.push(new Promise((I,R)=>{const O=()=>{const D=RU(n);R(D)};if(typeof n.addEventListener=="function"){const D=n;D.addEventListener("abort",O,{once:!0}),b=()=>D.removeEventListener("abort",O)}else n.onabort=O})),Promise.race(x).finally(b)}updateHttpClientConfig(t,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[t]=n,r))}httpHandlerConfigs(){return this.config??{}}}function RU(e){const t=e&&typeof e=="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){const o=new Error("Request aborted");return o.name="AbortError",o.cause=t,o}const r=new Error(String(t));return r.name="AbortError",r}const n=new Error("Request aborted");return n.name="AbortError",n}const $x=async e=>{const{value:t}=await e.body.getReader().read();return JSON.parse(String.fromCharCode.apply(null,t))},wCe=async e=>{const{value:t}=await e.body.getReader().read();return String.fromCharCode.apply(null,t)},ECe="POST",xCe="application/x-www-form-urlencoded",_Ce="https:",ICe="AssumeRoleWithWebIdentity",ACe="2011-06-15";class RCe{constructor(t){this.assumeRoleWithWebIdentity=async n=>{try{const r=Object.assign(Object.assign({},n),{Action:ICe,Version:ACe}),o=new URLSearchParams(Object.entries(r)).toString(),s=new Vs({method:ECe,headers:{"content-type":xCe,host:this.hostname},protocol:_Ce,hostname:this.hostname,body:o}),{response:a}=await this.fetchRequestHandler.handle(s),c=await wCe(a);return{accessKeyId:c.split("<AccessKeyId>")[1].split("</AccessKeyId>")[0],secretAccessKey:c.split("<SecretAccessKey>")[1].split("</SecretAccessKey>")[0],sessionToken:c.split("<SessionToken>")[1].split("</SessionToken>")[0],expiration:new Date(c.split("<Expiration>")[1].split("</Expiration>")[0])}}catch(r){throw new Error(`CWR: Failed to retrieve credentials from STS: ${r}`)}},this.hostname=`sts.${t.region}.amazonaws.com`,this.fetchRequestHandler=t.fetchRequestHandler}}const TCe="POST",OCe="application/x-amz-json-1.1",MCe="https:",PCe="AWSCognitoIdentityService.GetId",NCe="AWSCognitoIdentityService.GetOpenIdToken",kCe="AWSCognitoIdentityService.GetCredentialsForIdentity";class DCe{constructor(t){var n;this.getId=async r=>{var o;let s=null;try{s=JSON.parse(localStorage.getItem(this.identityStorageKey))}catch(a){!((o=this.config)===null||o===void 0)&&o.debug&&Ce.error("Failed to parse stored identity:",a)}if(s&&s.IdentityId)return Promise.resolve(s);try{const a=JSON.stringify(r),c=this.getHttpRequest(PCe,a),u=await $x((await this.fetchRequestHandler.handle(c)).response);try{localStorage.setItem(this.identityStorageKey,JSON.stringify({IdentityId:u.IdentityId}))}catch(f){Ce.error("Failed to store identity:",f)}return u}catch(a){throw new Error(`CWR: Failed to retrieve Cognito identity: ${a}`)}},this.getOpenIdToken=async r=>{try{const o=JSON.stringify(r),s=this.getHttpRequest(NCe,o),{response:a}=await this.fetchRequestHandler.handle(s);return this.validateOpenIdTokenResponse(await $x(a))}catch(o){throw localStorage.removeItem(this.identityStorageKey),new Error(`CWR: Failed to retrieve Cognito OpenId token: ${o}`)}},this.getCredentialsForIdentity=async r=>{try{const o=JSON.stringify({IdentityId:r}),s=this.getHttpRequest(kCe,o),{response:a}=await this.fetchRequestHandler.handle(s),{AccessKeyId:c,Expiration:u,SecretKey:f,SessionToken:h}=this.validateCredenentialsResponse(await $x(a));return{accessKeyId:c,secretAccessKey:f,sessionToken:h,expiration:new Date(u*1e3)}}catch(o){throw localStorage.removeItem(this.identityStorageKey),new Error(`CWR: Failed to retrieve credentials for Cognito identity: ${o}`)}},this.validateOpenIdTokenResponse=r=>{if("IdentityId"in r&&"Token"in r)return r;throw r&&"__type"in r&&"message"in r?new Error(`${r.__type}: ${r.message}`):new Error("Unknown OpenIdToken response")},this.validateCredenentialsResponse=r=>{if("IdentityId"in r&&"Credentials"in r)return r.Credentials;throw r&&"__type"in r&&"message"in r?new Error(`${r.__type}: ${r.message}`):new Error("Unknown Credentials response")},this.getHttpRequest=(r,o)=>new Vs({method:TCe,headers:{"content-type":OCe,"x-amz-target":r},protocol:MCe,hostname:this.hostname,body:o}),this.hostname=`cognito-identity.${t.region}.amazonaws.com`,this.fetchRequestHandler=t.fetchRequestHandler,this.config=t.clientConfig,this.identityStorageKey=!((n=t.clientConfig)===null||n===void 0)&&n.cookieAttributes.unique?`${Av}_${t.applicationId}`:Av}}class zj{constructor(t,n){this.ChainAnonymousCredentialsProvider=async()=>this.AnonymousCredentialsProvider().catch(this.AnonymousStorageCredentialsProvider).catch(this.AnonymousCognitoCredentialsProvider),this.AnonymousCredentialsProvider=async()=>new Promise((o,s)=>{if(this.renewCredentials())return s();o(this.credentials)}),this.AnonymousStorageCredentialsProvider=async()=>new Promise((o,s)=>{let a;try{a=JSON.parse(localStorage.getItem(this.credentialStorageKey))}catch{return s()}if(this.credentials=Object.assign(Object.assign({},a),{expiration:new Date(a.expiration)}),this.renewCredentials())return s();o(this.credentials)});const r=t.identityPoolId.split(":")[0];this.config=t,this.cognitoIdentityClient=new DCe({fetchRequestHandler:new mb,region:r,clientConfig:t,applicationId:n}),this.credentialStorageKey=this.config.cookieAttributes.unique?`${uu}_${n}`:uu}renewCredentials(){if(!this.credentials||!this.credentials.expiration)return!0;const t=new Date(this.credentials.expiration.getTime()-H1e);return new Date>t}}class LCe extends zj{constructor(t,n){super(t,n),this.AnonymousCognitoCredentialsProvider=async()=>{let o=1;for(;;)try{const s=await this.cognitoIdentityClient.getId({IdentityPoolId:this.config.identityPoolId}),a=await this.cognitoIdentityClient.getOpenIdToken(s),c=await this.stsClient.assumeRoleWithWebIdentity({RoleArn:this.config.guestRoleArn,RoleSessionName:"cwr",WebIdentityToken:a.Token});this.credentials=c;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(c))}catch{}return Ce.debug("AWS credentials fetched successfully"),c}catch(s){if(o)o--,Ce.warn("AWS credential fetch failed, retrying");else throw Ce.error("AWS credential fetch failed:",s),s}};const r=t.identityPoolId.split(":")[0];this.stsClient=new RCe({fetchRequestHandler:new mb,region:r})}}class UCe extends zj{constructor(t,n){super(t,n),this.AnonymousCognitoCredentialsProvider=async()=>{let r=1;for(;;)try{const o=await this.cognitoIdentityClient.getId({IdentityPoolId:this.config.identityPoolId}),s=await this.cognitoIdentityClient.getCredentialsForIdentity(o.IdentityId);this.credentials=s;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(s))}catch{}return Ce.debug("AWS credentials fetched successfully"),s}catch(o){if(r)r--,Ce.warn("AWS credential fetch failed, retrying");else throw Ce.error("AWS credential fetch failed:",o),o}}}}const Hr="com.amazon.rum",FCe="com.amazonaws.rum",Ov=`${Hr}.http_event`,jj=`${Hr}.xray_trace_event`,$Ce=`${Hr}.largest_contentful_paint_event`,zCe=`${Hr}.first_input_delay_event`,jCe=`${Hr}.cumulative_layout_shift_event`,BCe=`${Hr}.interaction_to_next_paint_event`,SI=`${Hr}.performance_navigation_event`,Bj=`${Hr}.performance_resource_event`,HCe=`${Hr}.dom_event`,qCe=`${Hr}.js_error_event`,VCe=`${Hr}.page_view_event`,CI=`${Hr}.session_start_event`,TU=`${Hr}.rrweb_event`;class uo{constructor(t){this.enabled=!0,this.pluginId=uo.generatePluginId(t)}static generatePluginId(t){return`${uo.idPrefix}.${t}`}load(t){var n;this.context=t,(n=this.onload)===null||n===void 0||n.call(this)}getPluginId(){return this.pluginId}}uo.idPrefix=FCe;class WCe{constructor(t){this.context=t,this.plugins=new Map}addPlugin(t){const n=t.getPluginId();if(this.hasPlugin(n))throw new Error(`Plugin "${n}" already defined in the PluginManager`);this.plugins.set(n,t),t.load(this.context),Ce.debug(`Plugin loaded: ${n}`)}updatePlugin(t,n){var r;const o=this.getPlugin(t);(r=o?.update)===null||r===void 0||r.call(o,n)}enable(){this.plugins.forEach(t=>t.enable())}disable(){this.plugins.forEach(t=>t.disable())}flush(){this.plugins.forEach(t=>{var n;return(n=t.flush)===null||n===void 0?void 0:n.call(t)})}hasPlugin(t){return!!this.getPlugin(t)}record(t,n){const r=this.getPlugin(t);if(r?.record instanceof Function)r.record(n);else throw new Error("AWS RUM Client record: Invalid plugin ID")}getPlugin(t){var n;return(n=this.plugins.get(t))!==null&&n!==void 0?n:this.plugins.get(uo.generatePluginId(t))}}const OU=(e,t,n,r,o)=>{let s=e+"=";s+=t||"",o!==void 0&&(s+=`; Expires=${o.toUTCString()}`),s+=`; Domain=${n.domain}`,s+=`; Path=${n.path}`,s+=`; SameSite=${n.sameSite}`,s+=n.secure?"; Secure":"",document.cookie=s},GCe=(e,t)=>{let n=e+"=";n+=`; Expires=${new Date(0)}`,n+=`; Domain=${t.domain}`,n+=`; Path=${t.path}`,n+=`; SameSite=${t.sameSite}`,n+=t.secure?"Secure":"",document.cookie=n},MU=e=>{const t=document.cookie.split("; ");for(const n of t){const r=n.split("=");if(r[0]===e)return r[1]}return""};var Of;(function(e){e.Path="PATH",e.Hash="HASH",e.PathAndHash="PATH_AND_HASH"})(Of||(Of={}));const KCe=()=>{var e,t;const n=navigator.userAgentData;if(!n)return;const r=(e=n.brands)!==null&&e!==void 0?e:[],o=(t=r.find(s=>s.brand!=="Chromium"&&!s.brand.startsWith("Not")))!==null&&t!==void 0?t:r[0];return{browserName:o?.brand,browserVersion:o?.version,osName:n.platform,deviceType:n.mobile?"mobile":"desktop"}},Vm="00000000-0000-0000-0000-000000000000",ZCe="desktop",YCe="web";class QCe{constructor(t,n,r,o){this.isSessionIdManual=!1,this.isUserIdManual=!1,this.appMonitorDetails=t,this.config=n,this.recordEvent=r,this.pageManager=o,this.sessionCookieName=this.config.cookieAttributes.unique?`${Rv}_${this.appMonitorDetails.id}`:Rv,this.session={sessionId:Vm,record:this.sample(),eventCount:0},this.config.userId||this.initializeUser(),this.collectAttributes(),this.addSessionAttributes(this.config.sessionAttributes),this.getSessionFromCookie(),this.config.userId&&(this.isUserIdManual=!0,this.adoptUser(this.config.userId)),this.config.sessionId&&(this.isSessionIdManual=!0,this.adoptSession(this.config.sessionId))}isSampled(){return this.session.record}getSession(){return this.isSessionIdManual?(new Date>=this.sessionExpiry&&(this.session.eventCount=0,this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie()),this.session):(this.session.sessionId===Vm?this.createSession():new Date>=this.sessionExpiry&&this.createSession(),this.session)}getAttributes(){return this.attributes}addSessionAttributes(t){this.attributes=Object.assign(Object.assign({},this.attributes),t)}pinSessionId(t){if(!t){Ce.warn("pinSessionId called with empty value; ignoring.");return}this.isSessionIdManual=!0,t!==this.session.sessionId&&this.adoptSession(t)}startSession(t){return t?.userId!==void 0&&(t.userId?(this.isUserIdManual=!0,t.userId!==this.userId&&this.adoptUser(t.userId)):Ce.warn("startSession called with empty userId; ignoring user rotation.")),t?.sessionId!==void 0?t.sessionId?(this.isSessionIdManual=!0,this.adoptSession(t.sessionId),this.config.suppressSessionStartEvent||this.recordEvent(CI,{version:"1.0.0"})):(Ce.warn("startSession called with empty sessionId; minting a fresh session."),this.isSessionIdManual=!1,this.createSession()):(this.isSessionIdManual=!1,this.createSession()),this.session.sessionId}getUserId(){return this.isUserIdManual?this.userId:this.useCookies()?this.userId:Vm}pinUserId(t){if(!t){Ce.warn("pinUserId called with empty value; ignoring.");return}this.isUserIdManual=!0,t!==this.userId&&this.adoptUser(t)}incrementSessionEventCount(){this.session.eventCount++,this.renewSession()}isLimitExceeded(){return this.session.eventCount>=this.config.sessionEventLimit&&this.config.sessionEventLimit>0}canRecord(){return this.session.record&&!this.isLimitExceeded()}initializeUser(){let t="";this.userExpiry=new Date,this.userExpiry.setDate(this.userExpiry.getDate()+this.config.userIdRetentionDays),this.config.userIdRetentionDays<=0?this.userId="00000000-0000-0000-0000-000000000000":this.useCookies()?(t=this.getUserIdCookie(),this.userId=t||Gc(),this.createOrRenewUserCookie(t,this.userExpiry)):this.userId=Gc()}createOrRenewSessionCookie(t,n){btoa&&OU(this.sessionCookieName,btoa(JSON.stringify(t)),this.config.cookieAttributes,void 0,n)}createOrRenewUserCookie(t,n){OU(Tv,t,this.config.cookieAttributes,void 0,n)}getUserIdCookie(){return MU(Tv)}getSessionFromCookie(){if(this.useCookies()){const t=MU(this.sessionCookieName);if(t&&atob)try{this.session=JSON.parse(atob(t)),this.pageManager.resumeSession(this.session.page),Ce.info(`Restored session: ${this.session.sessionId}`)}catch(n){Ce.error("Failed to restore session",n)}}}storeSessionAsCookie(){this.useCookies()&&this.config.userIdRetentionDays>0&&this.createOrRenewUserCookie(this.userId,this.userExpiry),this.useCookies()&&this.createOrRenewSessionCookie(this.session,this.sessionExpiry)}createSession(){this.session={sessionId:Gc(),record:this.session.sessionId===Vm?this.session.record:this.sample(),eventCount:0},this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie(),Ce.info(`Session start: ${this.session.sessionId}`),this.session.record||Ce.warn(`Session is NOT sampled. Consider increasing sessionSampleRate to avoid data loss (currently ${this.config.sessionSampleRate})`),this.config.suppressSessionStartEvent||this.recordEvent(CI,{version:"1.0.0"})}adoptSession(t){this.session={sessionId:t,record:this.session.record,eventCount:0},this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie(),Ce.info(`Adopted session: ${t}`)}adoptUser(t){this.userId=t,this.userExpiry=new Date,this.userExpiry.setDate(this.userExpiry.getDate()+this.config.userIdRetentionDays),this.useCookies()&&this.config.userIdRetentionDays>0&&this.createOrRenewUserCookie(this.userId,this.userExpiry),Ce.info(`Adopted user: ${t}`)}renewSession(){this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.session.page=this.pageManager.getPage(),this.storeSessionAsCookie()}collectAttributes(){var t;const n=KCe();this.attributes={browserLanguage:navigator.language,browserName:n?.browserName,browserVersion:n?.browserVersion,osName:n?.osName,osVersion:n?.osVersion,deviceType:(t=n?.deviceType)!==null&&t!==void 0?t:ZCe,platformType:YCe,domain:window.location.hostname,"aws:releaseId":this.config.releaseId},n||(this.attributes["aws:userAgent"]=navigator.userAgent)}useCookies(){return navigator.cookieEnabled&&this.config.allowCookies}sample(){return Math.random()<this.config.sessionSampleRate}}class JCe{constructor(t,n){this.config=t,this.record=n,this.page=void 0,this.resumed=!1,this.recordInteraction=!1}getPage(){return this.page}getAttributes(){return this.attributes}resumeSession(t){this.recordInteraction=!0,t&&(this.page=t,this.resumed=!0)}recordPageView(t){let n;if(typeof t=="string"?n=t:n=t.pageId,Ce.debug(`recordPageView called with pageId: ${n}`),this.useCookies()&&(this.recordInteraction=!0),!this.page)this.createLandingPage(n),Ce.info(`Landing page created: ${n}`);else if(this.page.pageId!==n)this.createNextPage(this.page,n),Ce.debug(`Navigation to new page: ${n}`);else if(this.resumed){Ce.info(`Resumed session for page: ${n}`),this.collectAttributes(this.page,typeof t=="object"?t:void 0);return}else{Ce.debug(`No page change detected for: ${n}`);return}this.collectAttributes(this.page,typeof t=="object"?t:void 0),this.recordPageViewEvent(this.page)}createNextPage(t,n){const r=Date.now();Ce.debug(`Creating next page ${n}, interaction: ${t.interaction+1}`),this.timeOnParentPage=r-t.start,this.resumed=!1,this.page={pageId:n,parentPageId:t.pageId,interaction:t.interaction+1,referrer:document.referrer,referrerDomain:this.getDomainFromReferrer(),start:r}}createLandingPage(t){this.page={pageId:t,interaction:0,referrer:document.referrer,referrerDomain:this.getDomainFromReferrer(),start:Date.now()}}collectAttributes(t,n){var r;this.attributes={title:!((r=n?.pageAttributes)===null||r===void 0)&&r.title?n.pageAttributes.title:document.title,pageId:t.pageId},this.recordInteraction&&(this.attributes.interaction=t.interaction,t.parentPageId!==void 0&&(this.attributes.parentPageId=t.parentPageId)),n?.pageTags&&(this.attributes.pageTags=n.pageTags),n?.pageAttributes&&(this.attributes=Object.assign(Object.assign({},n.pageAttributes),this.attributes))}createPageViewEvent(t){const n={version:"1.0.0",pageId:t.pageId};return this.recordInteraction&&(n.interaction=t.interaction,n.pageInteractionId=t.pageId+"-"+t.interaction,t.parentPageId!==void 0&&(n.parentPageInteractionId=t.parentPageId+"-"+(t.interaction-1),n.timeOnParentPage=this.timeOnParentPage),n.referrer=document.referrer,n.referrerDomain=this.getDomainFromReferrer()),n}recordPageViewEvent(t){this.record(VCe,this.createPageViewEvent(t))}useCookies(){return navigator.cookieEnabled&&this.config.allowCookies}getDomainFromReferrer(){try{return new URL(document.referrer).hostname}catch{return document.referrer==="localhost"?document.referrer:""}}}var rh;(function(e){e.EVENT="event"})(rh||(rh={}));class Hj{constructor(){this.subscribers=new Map}subscribe(t,n){var r;const o=(r=this.subscribers.get(t))!==null&&r!==void 0?r:[];o.length||this.subscribers.set(t,o),o.push(n)}unsubscribe(t,n){const r=this.subscribers.get(t);if(r){for(let o=0;o<r.length;o++)if(r[o]===n)return r.splice(o,1),!0}return!1}dispatch(t,n){const r=this.subscribers.get(t);if(r)for(const o of r)o(n)}}const XCe="3.1.0",ewe=new Set(["pageId","parentPageId","interaction","pageTags","title"]),zx=(e,t)=>{if(!e)return{};const n={};for(const[r,o]of Object.entries(e)){if(r.startsWith("aws:")){Ce.warn(`Dropping ${t} metadata key "${r}": "aws:" namespace is reserved.`);continue}if((t==="event"||t==="hook")&&ewe.has(r)){Ce.warn(`Dropping ${t} metadata key "${r}": owned by page state.`);continue}const s=typeof o;if(s!=="string"&&s!=="number"&&s!=="boolean"){Ce.warn(`Dropping ${t} metadata key "${r}": value must be string|number|boolean.`);continue}n[r]=o}return n};class twe{constructor(t,n,r=new Hj){this.eventBus=r,this.events=[],this.candidates=new Map,this.droppedEvent=0,this.sessionLimitExceeded=0,this.recordPageView=o=>{this.isCurrentUrlAllowed()&&this.pageManager.recordPageView(o)},this.recordEvent=(o,s,a)=>{this.enabled&&this.isCurrentUrlAllowed()&&(o!==CI&&this.sessionManager.getSession(),this.sessionManager.canRecord()?(this.sessionManager.incrementSessionEventCount(),this.addRecordToCache(o,s,a)):this.sessionLimitExceeded++)},this.recordCandidate=(o,s,a)=>{const c=this.sessionManager.getSession();if(!this.enabled||!this.isCurrentUrlAllowed()||!c.record)return;const[u]=this.createEvent(o,s,a);if(this.candidates.has(o)){this.candidates.set(o,u);return}this.candidates.size<this.config.candidatesCacheSize&&!this.sessionManager.isLimitExceeded()&&(this.candidates.set(o,u),this.sessionManager.incrementSessionEventCount())},this.getSession=()=>{if(this.isCurrentUrlAllowed())return this.sessionManager.getSession()},this.getSessionId=()=>this.sessionManager.getSession().sessionId,this.pinSessionId=o=>{this.sessionManager.pinSessionId(o)},this.startSession=o=>this.sessionManager.startSession(o),this.getUserId=()=>this.sessionManager.getUserId(),this.pinUserId=o=>{this.sessionManager.pinUserId(o)},this.addRecordToCache=(o,s,a)=>{if(!this.enabled)return;if(this.events.length>=this.config.eventCacheSize){this.droppedEvent+=1;return}const[c,u]=this.createEvent(o,s,a);this.eventBus.dispatch(rh.EVENT,u),this.events.push(c)},this.createEvent=(o,s,a)=>{var c;const u=(c=this.pageManager.getAttributes())!==null&&c!==void 0?c:{},f=zx(a,"event");let h={};if(this.eventMetadataHook)try{const v=Object.freeze(Object.assign({},u)),C=this.eventMetadataHook(o,s,v);C&&(h=zx(C,"hook"))}catch(v){Ce.warn(`eventMetadataHook threw for type "${o}"; dropping hook output for this event.`,v)}const m=Object.assign(Object.assign(Object.assign({},u),h),f),g={id:Gc(),timestamp:new Date,type:o};return[Object.assign(Object.assign({},g),{details:JSON.stringify(s),metadata:JSON.stringify(m)}),Object.assign(Object.assign({},g),{details:s,metadata:m})]},this.appMonitorDetails=t,this.config=n,this.enabled=!0,this.pageManager=new JCe(n,this.recordEvent),this.sessionManager=new QCe(t,n,this.recordEvent,this.pageManager),this.installationMethod=n.client,this.applicationAttributes=Object.freeze(zx(n.applicationAttributes,"application"))}enable(){this.enabled=!0}disable(){this.enabled=!1}setPluginFlushHook(t){this.pluginFlushHook=t}isSessionSampled(){return this.sessionManager.isSampled()}hasEvents(){if(this.sessionLimitExceeded>0){const t=this.events.length+this.sessionLimitExceeded;this.sessionManager.isSampled()?Ce.warn(`Dropped ${this.sessionLimitExceeded} of ${t} recently observed events (${(this.sessionLimitExceeded/t*100).toFixed(2)}%) because the session limit has exceeded. Consider increasing sessionEventLimit (currently ${this.config.sessionEventLimit}) to ${t} or more to avoid data loss.`):Ce.warn(`Dropped ${this.sessionLimitExceeded} of ${t} recently observed events (${(this.sessionLimitExceeded/t*100).toFixed(2)}%) because current session is not sampled. Consider increasing sessionSampleRate (currently ${this.config.sessionSampleRate}) to capture more user sessions.`),this.sessionLimitExceeded=0}return this.events.length!==0}hasCandidates(){return this.candidates.size!==0}getEventBatch(t=!1){var n;if(this.droppedEvent>0){const o=this.events.length+this.droppedEvent;Ce.warn(`Dropped ${this.droppedEvent} of ${o} recently observed events (${(this.droppedEvent/o*100).toFixed(2)}%) due to insufficient in-memory queue. Increase eventCacheSize to ${o} (currently ${this.config.eventCacheSize}) to avoid data loss.`),this.droppedEvent=0}let r=[];if(t&&((n=this.pluginFlushHook)===null||n===void 0||n.call(this)),t&&this.hasCandidates())if(this.candidates.size<=this.config.batchLimit)r=Array.from(this.candidates.values()),this.candidates.clear();else{let o=0;for(const s of Array.from(this.candidates.keys())){if(o++>=this.config.batchLimit)break;const a=this.candidates.get(s);a&&(r.push(a),this.candidates.delete(s))}}return this.events.length&&(this.events.length<=this.config.batchLimit-r.length?(r.push(...this.events),this.events=[]):r.push(...this.events.splice(0,this.config.batchLimit-r.length))),r}getAppMonitorDetails(){return this.appMonitorDetails}getUserDetails(){return{userId:this.sessionManager.getUserId(),sessionId:this.sessionManager.getSession().sessionId}}addSessionAttributes(t){this.sessionManager.addSessionAttributes(t)}getCommonMetadata(){return Object.assign(Object.assign(Object.assign({},this.sessionManager.getAttributes()),this.applicationAttributes),{version:"1.0.0","aws:client":this.installationMethod,"aws:clientVersion":XCe})}setEventMetadataHook(t){this.eventMetadataHook=t}clearEventMetadataHook(){this.eventMetadataHook=void 0}isCurrentUrlAllowed(){const t=document.location.toString(),n=this.config.pagesToExclude.some(o=>o.test(t));return this.config.pagesToInclude.some(o=>o.test(t))&&!n}}var Sn;(function(e){e.OTHER="other",e.STYLESHEET="stylesheet",e.DOCUMENT="document",e.SCRIPT="script",e.IMAGE="image",e.FONT="font"})(Sn||(Sn={}));var Ms;(function(e){e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.FRAME="frame",e.SCRIPT="script",e.CSS="css"})(Ms||(Ms={}));const PU=e=>[e.startTime,e.duration].join("#"),nwe=[{name:Sn.STYLESHEET,list:["css","less"]},{name:Sn.DOCUMENT,list:["htm","html","ts","doc","docx","pdf","xls","xlsx"]},{name:Sn.SCRIPT,list:["js"]},{name:Sn.IMAGE,list:["ai","bmp","gif","ico","jpeg","jpg","png","ps","psd","svg","tif","tiff"]},{name:Sn.FONT,list:["fnt","fon","otf","ttf","woff"]}],NU=(e,t)=>{let n=Sn.OTHER;if(e){const r=e.substring(e.lastIndexOf("/")+1),o=r.substring(r.lastIndexOf(".")+1).split(/[?#]/)[0];nwe.forEach(s=>{s.list.indexOf(o)>-1&&(n=s.name)})}if(t&&n===Sn.OTHER)switch(t){case Ms.IMAGE:case Ms.IMG:case Ms.INPUT:n=Sn.IMAGE;break;case Ms.IFRAME:case Ms.FRAME:n=Sn.DOCUMENT;break;case Ms.SCRIPT:n=Sn.SCRIPT;break;case Ms.CSS:n=Sn.STYLESHEET;break}return n},rwe=()=>PerformanceObserver.supportedEntryTypes.includes("largest-contentful-paint"),owe=/\/appmonitors\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,swe=(e,t)=>{try{return new URL(e).hostname===t&&owe.test(e)}catch{return!1}},qj="dom-event",iwe={interactionId:()=>"",enableMutationObserver:!1,events:[]};class xT extends uo{constructor(t){super(qj),this.enabled=!1,this.eventListenerMap=new Map,this.config=Object.assign(Object.assign({},iwe),t)}static getElementInfo(t){const n={name:"UNKNOWN"};return t.target instanceof Node&&(n.name=t.target.nodeName),t.target instanceof Element&&t.target.id&&(n.id=t.target.id),n}enable(){if(document.readyState!=="complete"){window.addEventListener("load",()=>this.enable());return}this.enabled||(this.addListeners(),this.config.enableMutationObserver&&this.observeDOMMutation(),this.enabled=!0)}disable(){this.enabled&&(this.removeListeners(),this.observer&&this.observer.disconnect(),this.enabled=!1)}update(t){t.forEach(n=>{this.addEventHandler(n),this.config.events.push(n)})}onload(){this.enable()}removeListeners(){this.config.events.forEach(t=>this.removeEventHandler(t))}addListeners(){this.config.events.forEach(t=>this.addEventHandler(t))}getEventListener(t){return n=>{var r;const o=xT.getElementInfo(n),s=this.config.interactionId(n),a=Object.assign(Object.assign(Object.assign({version:"1.1.0",event:n.type,element:o.name},o.id?{elementId:o.id}:{}),s?{interactionId:s}:{}),t?{cssLocator:t}:{});!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(HCe,a)}}addEventHandler(t){const n=t.event,r=this.getEventListener(t.cssLocator),o=[],s=this.eventListenerMap.has(t)?this.eventListenerMap.get(t):[];if(t.cssLocator)document.querySelectorAll(t.cssLocator).forEach(c=>{o.push(c)});else if(t.elementId){const a=document.getElementById(t.elementId);a&&o.push(a)}else t.element&&o.push(t.element);o.forEach(a=>{a.addEventListener(n,r),s.push({element:a,eventListener:r})}),this.eventListenerMap.set(t,s)}removeEventHandler(t){const n=this.eventListenerMap.get(t);n&&(n.forEach(r=>{const o=r.element,s=r.eventListener;o.removeEventListener(t.event,s)}),this.eventListenerMap.delete(t))}observeDOMMutation(){this.observer=new MutationObserver(()=>{this.removeListeners(),this.addListeners()}),this.observer.observe(document,{childList:!0,subtree:!0})}}const awe=e=>{const t=typeof e;return(t==="object"||t==="function")&&!!e},lwe=e=>{const t={version:"1.0.0",type:"undefined",message:"undefined"};return e.type!==void 0&&(t.type=e.type),e.message!==void 0&&(t.message=e.message),e.filename!==void 0&&(t.filename=e.filename),e.lineno!==void 0&&(t.lineno=e.lineno),e.colno!==void 0&&(t.colno=e.colno),t},cwe=(e,t)=>{e.type!=="unhandledrejection"&&(e.type=t.toString()),e.message=t.toString()},uwe=(e,t,n)=>{t.name&&(e.type=t.name),t.message&&(e.message=t.message),t.fileName&&(e.filename=t.fileName),t.lineNumber&&(e.lineno=t.lineNumber),t.columnNumber&&(e.colno=t.columnNumber),n&&t.stack&&(e.stack=t.stack.length>n?t.stack.substring(0,n)+"...":t.stack)},Vj=e=>e!==Object(e)&&e!==void 0&&e!==null,_T=(e,t)=>{const n=lwe(e),r=e.error;return awe(r)?uwe(n,r,t):Vj(r)&&cwe(n,r),n},Wj="js-error",dwe={stackTraceLength:1e3,ignore:()=>!1};class fwe extends uo{constructor(t){super(Wj),this.eventHandler=n=>{this.config.ignore(n)||this.recordJsErrorEvent(n)},this.promiseRejectEventHandler=n=>{this.config.ignore(n)||this.recordJsErrorEvent({type:n.type,error:n.reason})},this.config=Object.assign(Object.assign({},dwe),t)}enable(){this.enabled||(this.addEventHandler(),this.enabled=!0)}disable(){this.enabled&&(this.removeEventHandler(),this.enabled=!1)}record(t){t instanceof ErrorEvent?this.recordJsErrorEvent(t):this.recordJsErrorEvent({type:"error",error:t})}onload(){this.addEventHandler()}recordJsErrorEvent(t){var n;(n=this.context)===null||n===void 0||n.record(qCe,_T(t,this.config.stackTraceLength))}addEventHandler(){window.addEventListener("error",this.eventHandler),window.addEventListener("unhandledrejection",this.promiseRejectEventHandler)}removeEventHandler(){window.removeEventListener("error",this.eventHandler),window.removeEventListener("unhandledrejection",this.promiseRejectEventHandler)}}const hwe=e=>e.entryType==="resource"&&(!/^https?:/.test(e.name)||/^(fetch|xmlhttprequest)$/.test(e.initiatorType)),IT={eventLimit:10,ignore:hwe,recordAllTypes:[Sn.DOCUMENT,Sn.SCRIPT,Sn.STYLESHEET,Sn.FONT],sampleTypes:[Sn.IMAGE,Sn.OTHER],reportAllLCP:!1,reportAllCLS:!1,reportAllINP:!1},pwe="navigation",_c="navigation",jx="load";class mwe extends uo{constructor(t){super(pwe),this.eventListener=()=>{performance.getEntriesByType(_c).length===0?this.performanceNavigationEventHandlerTimingLevel1():new PerformanceObserver(r=>{r.getEntries().filter(o=>o.entryType===_c).filter(o=>!this.config.ignore(o)).forEach(o=>{this.performanceNavigationEventHandlerTimingLevel2(o)})}).observe({entryTypes:[_c]})},this.performanceNavigationEventHandlerTimingLevel1=()=>{setTimeout(()=>{var r;const o=performance.timing,s=o.navigationStart,a={version:"1.0.0",initiatorType:"navigation",startTime:0,unloadEventStart:o.unloadEventStart>0?o.unloadEventStart-s:0,promptForUnload:o.unloadEventEnd-o.unloadEventStart,redirectStart:o.redirectStart>0?o.redirectStart-s:0,redirectTime:o.redirectEnd-o.redirectStart,fetchStart:o.fetchStart>0?o.fetchStart-s:0,domainLookupStart:o.domainLookupStart>0?o.domainLookupStart-s:0,dns:o.domainLookupEnd-o.domainLookupStart,connectStart:o.connectStart>0?o.connectStart-s:0,connect:o.connectEnd-o.connectStart,secureConnectionStart:o.secureConnectionStart>0?o.secureConnectionStart-s:0,tlsTime:o.secureConnectionStart>0?o.connectEnd-o.secureConnectionStart:0,requestStart:o.requestStart>0?o.requestStart-s:0,timeToFirstByte:o.responseStart-o.requestStart,responseStart:o.responseStart>0?o.responseStart-s:0,responseTime:o.responseStart>0?o.responseEnd-o.responseStart:0,domInteractive:o.domInteractive>0?o.domInteractive-s:0,domContentLoadedEventStart:o.domContentLoadedEventStart>0?o.domContentLoadedEventStart-s:0,domContentLoaded:o.domContentLoadedEventEnd-o.domContentLoadedEventStart,domComplete:o.domComplete>0?o.domComplete-s:0,domProcessingTime:o.loadEventStart-o.responseEnd,loadEventStart:o.loadEventStart>0?o.loadEventStart-s:0,loadEventTime:o.loadEventEnd-o.loadEventStart,duration:o.loadEventEnd-o.navigationStart,navigationTimingLevel:1};!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(SI,a)},0)},this.performanceNavigationEventHandlerTimingLevel2=n=>{var r;const o={version:"1.0.0",initiatorType:n.initiatorType,navigationType:n.type,startTime:n.startTime,unloadEventStart:n.unloadEventStart,promptForUnload:n.unloadEventEnd-n.unloadEventStart,redirectCount:n.redirectCount,redirectStart:n.redirectStart,redirectTime:n.redirectEnd-n.redirectStart,workerStart:n.workerStart,workerTime:n.workerStart>0?n.fetchStart-n.workerStart:0,fetchStart:n.fetchStart,domainLookupStart:n.domainLookupStart,dns:n.domainLookupEnd-n.domainLookupStart,nextHopProtocol:n.nextHopProtocol,connectStart:n.connectStart,connect:n.connectEnd-n.connectStart,secureConnectionStart:n.secureConnectionStart,tlsTime:n.secureConnectionStart>0?n.connectEnd-n.secureConnectionStart:0,requestStart:n.requestStart,timeToFirstByte:n.responseStart-n.requestStart,responseStart:n.responseStart,responseTime:n.responseStart>0?n.responseEnd-n.responseStart:0,domInteractive:n.domInteractive,domContentLoadedEventStart:n.domContentLoadedEventStart,domContentLoaded:n.domContentLoadedEventEnd-n.domContentLoadedEventStart,domComplete:n.domComplete,domProcessingTime:n.loadEventStart-n.responseEnd,loadEventStart:n.loadEventStart,loadEventTime:n.loadEventEnd-n.loadEventStart,duration:n.duration,headerSize:n.transferSize>0?n.transferSize-n.encodedBodySize:0,transferSize:n.transferSize,compressionRatio:n.encodedBodySize>0?n.decodedBodySize/n.encodedBodySize:0,navigationTimingLevel:2};!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(SI,o)},this.config=Object.assign(Object.assign({},IT),t)}enable(){this.enabled||(this.enabled=!0,window.addEventListener(jx,this.eventListener))}disable(){this.enabled&&(this.enabled=!1,this.eventListener&&window.removeEventListener(jx,this.eventListener))}hasTheWindowLoadEventFired(){return window.performance&&window.performance.getEntriesByType(_c).length?!!window.performance.getEntriesByType(_c)[0].loadEventEnd:!1}onload(){this.enabled&&(this.hasTheWindowLoadEventFired()?window.performance.getEntriesByType(_c).filter(t=>!this.config.ignore(t)).forEach(t=>this.performanceNavigationEventHandlerTimingLevel2(t)):window.addEventListener(jx,this.eventListener))}}var Bx,kU;function gwe(){if(kU)return Bx;kU=1;function e(u){return typeof u=="function"}var t=console.error.bind(console);function n(u,f,h){var m=!!u[f]&&u.propertyIsEnumerable(f);Object.defineProperty(u,f,{configurable:!0,enumerable:m,writable:!0,value:h})}function r(u){u&&u.logger&&(e(u.logger)?t=u.logger:t("new logger isn't a function, not replacing"))}function o(u,f,h){if(!u||!u[f]){t("no original function "+f+" to wrap");return}if(!h){t("no wrapper function"),t(new Error().stack);return}if(!e(u[f])||!e(h)){t("original object and wrapper must be functions");return}var m=u[f],g=h(m,f);return n(g,"__original",m),n(g,"__unwrap",function(){u[f]===g&&n(u,f,m)}),n(g,"__wrapped",!0),n(u,f,g),g}function s(u,f,h){if(u)Array.isArray(u)||(u=[u]);else{t("must provide one or more modules to patch"),t(new Error().stack);return}if(!(f&&Array.isArray(f))){t("must provide one or more functions to wrap on modules");return}u.forEach(function(m){f.forEach(function(g){o(m,g,h)})})}function a(u,f){if(!u||!u[f]){t("no function to unwrap."),t(new Error().stack);return}if(!u[f].__unwrap)t("no original to unwrap to -- has "+f+" already been unwrapped?");else return u[f].__unwrap()}function c(u,f){if(u)Array.isArray(u)||(u=[u]);else{t("must provide one or more modules to patch"),t(new Error().stack);return}if(!(f&&Array.isArray(f))){t("must provide one or more functions to unwrap on modules");return}u.forEach(function(h){f.forEach(function(m){a(h,m)})})}return r.wrap=o,r.massWrap=s,r.unwrap=a,r.massUnwrap=c,Bx=r,Bx}var Mv=gwe();const vwe=Eu(Mv),DU=gF({__proto__:null,default:vwe},[Mv]);class AT extends uo{constructor(){super(...arguments),this.enable=this.patch.bind(this,!0),this.disable=this.patch.bind(this,!1),this.enabled=!1}patchAll(){const t=Mv.wrap.bind(DU);for(const n of this.patches)t(n.nodule,n.name,n.wrapper())}unpatchAll(){const t=Mv.unwrap.bind(DU);for(const n of this.patches)t(n.nodule,n.name)}patch(t=!0){this.enabled!==t&&(this.enabled=t,t?this.patchAll():this.unpatchAll())}}const ywe="page-view";class bwe extends AT{constructor(){super(ywe),this.pushState=()=>{const t=this;return n=>function(r,o,s){const a=n.apply(this,arguments);return t.recordPageView(),a}},this.replaceState=()=>{const t=this;return n=>function(r,o,s){const a=n.apply(this,arguments);return t.recordPageView(),a}},this.popstateListener=t=>{this.recordPageView()},this.recordPageView=()=>{this.context.recordPageView(this.createIdForCurrentPage())},this.enable()}onload(){this.addListener(),this.recordPageView()}get patches(){return[{nodule:History.prototype,name:"pushState",wrapper:this.pushState},{nodule:History.prototype,name:"replaceState",wrapper:this.replaceState}]}addListener(){window.addEventListener("popstate",this.popstateListener)}createIdForCurrentPage(){const t=window.location.pathname,n=window.location.hash;switch(this.context.config.pageIdFormat){case Of.PathAndHash:return t&&n?t+n:t||n||"";case Of.Hash:return n||"";case Of.Path:default:return t||""}}}const Swe="resource",Hx="resource";class Cwe extends uo{constructor(t){super(Swe),this.performanceEntryHandler=n=>{this.recordPerformanceEntries(n.getEntries())},this.recordPerformanceEntries=n=>{n.forEach(r=>{if(r.entryType!==Hx||this.config.ignore(r))return;const{name:o,initiatorType:s}=r,a=NU(o,s);this.config.recordAllTypes.includes(a)?this.recordResourceEvent(r):this.config.sampleTypes.includes(a)&&this.eventCount<this.config.eventLimit&&(this.recordResourceEvent(r),this.eventCount++)})},this.recordResourceEvent=({name:n,startTime:r,initiatorType:o,duration:s,transferSize:a})=>{var c;if(!swe(n,this.context.config.endpointUrl.hostname)&&!((c=this.context)===null||c===void 0)&&c.record){const u={version:"1.0.0",initiatorType:o,startTime:r,duration:s,fileType:NU(n,o),transferSize:a};this.context.config.recordResourceUrl&&(u.targetUrl=n),this.context.record(Bj,u)}},this.config=Object.assign(Object.assign({},IT),t),this.eventCount=0,this.resourceObserver=new PerformanceObserver(this.performanceEntryHandler)}enable(){this.enabled||(this.enabled=!0,this.resourceObserver.observe({type:Hx,buffered:!0}))}disable(){this.enabled&&(this.enabled=!1,this.resourceObserver.disconnect())}onload(){this.resourceObserver.observe({type:Hx,buffered:!0})}}var wI,LU,gb=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},RT=function(e){if(document.readyState==="loading")return"loading";var t=gb();if(t){if(e<t.domInteractive)return"loading";if(t.domContentLoadedEventStart===0||e<t.domContentLoadedEventStart)return"dom-interactive";if(t.domComplete===0||e<t.domComplete)return"dom-content-loaded"}return"complete"},wwe=function(e){var t=e.nodeName;return e.nodeType===1?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},vb=function(e,t){var n="";try{for(;e&&e.nodeType!==9;){var r=e,o=r.id?"#"+r.id:wwe(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+o.length>(t||100)-1)return n||o;if(n=n?o+">"+n:o,r.id)break;e=r.parentNode}}catch{}return n},Gj=-1,Ewe=function(){return Gj},$u=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Gj=t.timeStamp,e(t))}),!0)},TT=function(){var e=gb();return e&&e.activationStart||0},Qo=function(e,t){var n=gb(),r="navigate";return Ewe()>=0?r="back-forward-cache":n&&(document.prerendering||TT()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t===void 0?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Al=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(o){Promise.resolve().then((function(){t(o.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},Jo=function(e,t,n,r){var o,s;return function(a){t.value>=0&&(a||r)&&((s=t.value-(o||0))||o===void 0)&&(o=t.value,t.delta=s,t.rating=(function(c,u){return c>u[1]?"poor":c>u[0]?"needs-improvement":"good"})(t.value,n),e(t))}},OT=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},Dh=function(e){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&e()}))},yb=function(e){var t=!1;return function(){t||(e(),t=!0)}},Bc=-1,UU=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Pv=function(e){document.visibilityState==="hidden"&&Bc>-1&&(Bc=e.type==="visibilitychange"?e.timeStamp:0,xwe())},FU=function(){addEventListener("visibilitychange",Pv,!0),addEventListener("prerenderingchange",Pv,!0)},xwe=function(){removeEventListener("visibilitychange",Pv,!0),removeEventListener("prerenderingchange",Pv,!0)},MT=function(){return Bc<0&&(Bc=UU(),FU(),$u((function(){setTimeout((function(){Bc=UU(),FU()}),0)}))),{get firstHiddenTime(){return Bc}}},bb=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},$U=[1800,3e3],_we=function(e,t){t=t||{},bb((function(){var n,r=MT(),o=Qo("FCP"),s=Al("paint",(function(a){a.forEach((function(c){c.name==="first-contentful-paint"&&(s.disconnect(),c.startTime<r.firstHiddenTime&&(o.value=Math.max(c.startTime-TT(),0),o.entries.push(c),n(!0)))}))}));s&&(n=Jo(e,o,$U,t.reportAllChanges),$u((function(a){o=Qo("FCP"),n=Jo(e,o,$U,t.reportAllChanges),OT((function(){o.value=performance.now()-a.timeStamp,n(!0)}))})))}))},zU=[.1,.25],Iwe=function(e,t){(function(n,r){r=r||{},_we(yb((function(){var o,s=Qo("CLS",0),a=0,c=[],u=function(h){h.forEach((function(m){if(!m.hadRecentInput){var g=c[0],v=c[c.length-1];a&&m.startTime-v.startTime<1e3&&m.startTime-g.startTime<5e3?(a+=m.value,c.push(m)):(a=m.value,c=[m])}})),a>s.value&&(s.value=a,s.entries=c,o())},f=Al("layout-shift",u);f&&(o=Jo(n,s,zU,r.reportAllChanges),Dh((function(){u(f.takeRecords()),o(!0)})),$u((function(){a=0,s=Qo("CLS",0),o=Jo(n,s,zU,r.reportAllChanges),OT((function(){return o()}))})),setTimeout(o,0))})))})((function(n){var r=(function(o){var s,a={};if(o.entries.length){var c=o.entries.reduce((function(f,h){return f&&f.value>h.value?f:h}));if(c&&c.sources&&c.sources.length){var u=(s=c.sources).find((function(f){return f.node&&f.node.nodeType===1}))||s[0];u&&(a={largestShiftTarget:vb(u.node),largestShiftTime:c.startTime,largestShiftValue:c.value,largestShiftSource:u,largestShiftEntry:c,loadState:RT(c.startTime)})}}return Object.assign(o,{attribution:a})})(n);e(r)}),t)},Kj=0,qx=1/0,Wm=0,Awe=function(e){e.forEach((function(t){t.interactionId&&(qx=Math.min(qx,t.interactionId),Wm=Math.max(Wm,t.interactionId),Kj=Wm?(Wm-qx)/7+1:0)}))},Zj=function(){return wI?Kj:performance.interactionCount||0},Rwe=function(){"interactionCount"in performance||wI||(wI=Al("event",Awe,{type:"event",buffered:!0,durationThreshold:0}))},wo=[],Mf=new Map,Yj=0,Twe=function(){var e=Math.min(wo.length-1,Math.floor((Zj()-Yj)/50));return wo[e]},Qj=[],Owe=function(e){if(Qj.forEach((function(o){return o(e)})),e.interactionId||e.entryType==="first-input"){var t=wo[wo.length-1],n=Mf.get(e.interactionId);if(n||wo.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};Mf.set(r.id,r),wo.push(r)}wo.sort((function(o,s){return s.latency-o.latency})),wo.length>10&&wo.splice(10).forEach((function(o){return Mf.delete(o.id)}))}}},PT=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=yb(e),document.visibilityState==="hidden"?e():(n=t(e),Dh(e)),n},jU=[200,500],Mwe=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},bb((function(){var n;Rwe();var r,o=Qo("INP"),s=function(c){PT((function(){c.forEach(Owe);var u=Twe();u&&u.latency!==o.value&&(o.value=u.latency,o.entries=u.entries,r())}))},a=Al("event",s,{durationThreshold:(n=t.durationThreshold)!==null&&n!==void 0?n:40});r=Jo(e,o,jU,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),Dh((function(){s(a.takeRecords()),r(!0)})),$u((function(){Yj=Zj(),wo.length=0,Mf.clear(),o=Qo("INP"),r=Jo(e,o,jU,t.reportAllChanges)})))})))},Jc=[],Fi=[],EI=0,NT=new WeakMap,Xc=new Map,xI=-1,Pwe=function(e){Jc=Jc.concat(e),Jj()},Jj=function(){xI<0&&(xI=PT(Nwe))},Nwe=function(){Xc.size>10&&Xc.forEach((function(a,c){Mf.has(c)||Xc.delete(c)}));var e=wo.map((function(a){return NT.get(a.entries[0])})),t=Fi.length-50;Fi=Fi.filter((function(a,c){return c>=t||e.includes(a)}));for(var n=new Set,r=0;r<Fi.length;r++){var o=Fi[r];eB(o.startTime,o.processingEnd).forEach((function(a){n.add(a)}))}var s=Jc.length-1-50;Jc=Jc.filter((function(a,c){return a.startTime>EI&&c>s||n.has(a)})),xI=-1};Qj.push((function(e){e.interactionId&&e.target&&!Xc.has(e.interactionId)&&Xc.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;EI=Math.max(EI,e.processingEnd);for(var r=Fi.length-1;r>=0;r--){var o=Fi[r];if(Math.abs(n-o.renderTime)<=8){(t=o).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:n,entries:[e]},Fi.push(t)),(e.interactionId||e.entryType==="first-input")&&NT.set(e,t),Jj()}));var $i,Pf,Xj,Nv,eB=function(e,t){for(var n,r=[],o=0;n=Jc[o];o++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},kwe=function(e,t){LU||(LU=Al("long-animation-frame",Pwe)),Mwe((function(n){var r=(function(o){var s=o.entries[0],a=NT.get(s),c=s.processingStart,u=a.processingEnd,f=a.entries.sort((function(E,x){return E.processingStart-x.processingStart})),h=eB(s.startTime,u),m=o.entries.find((function(E){return E.target})),g=m&&m.target||Xc.get(s.interactionId),v=[s.startTime+s.duration,u].concat(h.map((function(E){return E.startTime+E.duration}))),C=Math.max.apply(Math,v),b={interactionTarget:vb(g),interactionTargetElement:g,interactionType:s.name.startsWith("key")?"keyboard":"pointer",interactionTime:s.startTime,nextPaintTime:C,processedEventEntries:f,longAnimationFrameEntries:h,inputDelay:c-s.startTime,processingDuration:u-c,presentationDelay:Math.max(C-u,0),loadState:RT(s.startTime)};return Object.assign(o,{attribution:b})})(n);e(r)}),t)},BU=[2500,4e3],Vx={},Dwe=function(e,t){(function(n,r){r=r||{},bb((function(){var o,s=MT(),a=Qo("LCP"),c=function(h){r.reportAllChanges||(h=h.slice(-1)),h.forEach((function(m){m.startTime<s.firstHiddenTime&&(a.value=Math.max(m.startTime-TT(),0),a.entries=[m],o())}))},u=Al("largest-contentful-paint",c);if(u){o=Jo(n,a,BU,r.reportAllChanges);var f=yb((function(){Vx[a.id]||(c(u.takeRecords()),u.disconnect(),Vx[a.id]=!0,o(!0))}));["keydown","click"].forEach((function(h){addEventListener(h,(function(){return PT(f)}),{once:!0,capture:!0})})),Dh(f),$u((function(h){a=Qo("LCP"),o=Jo(n,a,BU,r.reportAllChanges),OT((function(){a.value=performance.now()-h.timeStamp,Vx[a.id]=!0,o(!0)}))}))}}))})((function(n){var r=(function(o){var s={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:o.value};if(o.entries.length){var a=gb();if(a){var c=a.activationStart||0,u=o.entries[o.entries.length-1],f=u.url&&performance.getEntriesByType("resource").filter((function(C){return C.name===u.url}))[0],h=Math.max(0,a.responseStart-c),m=Math.max(h,f?(f.requestStart||f.startTime)-c:0),g=Math.max(m,f?f.responseEnd-c:0),v=Math.max(g,u.startTime-c);s={element:vb(u.element),timeToFirstByte:h,resourceLoadDelay:m-h,resourceLoadDuration:g-m,elementRenderDelay:v-g,navigationEntry:a,lcpEntry:u},u.url&&(s.url=u.url),f&&(s.lcpResourceEntry=f)}}return Object.assign(o,{attribution:s})})(n);e(r)}),t)},Sf={passive:!0,capture:!0},Lwe=new Date,HU=function(e,t){$i||($i=t,Pf=e,Xj=new Date,nB(removeEventListener),tB())},tB=function(){if(Pf>=0&&Pf<Xj-Lwe){var e={entryType:"first-input",name:$i.type,target:$i.target,cancelable:$i.cancelable,startTime:$i.timeStamp,processingStart:$i.timeStamp+Pf};Nv.forEach((function(t){t(e)})),Nv=[]}},Uwe=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;e.type=="pointerdown"?(function(n,r){var o=function(){HU(n,r),a()},s=function(){a()},a=function(){removeEventListener("pointerup",o,Sf),removeEventListener("pointercancel",s,Sf)};addEventListener("pointerup",o,Sf),addEventListener("pointercancel",s,Sf)})(t,e):HU(t,e)}},nB=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,Uwe,Sf)}))},qU=[100,300],Fwe=function(e,t){t=t||{},bb((function(){var n,r=MT(),o=Qo("FID"),s=function(u){u.startTime<r.firstHiddenTime&&(o.value=u.processingStart-u.startTime,o.entries.push(u),n(!0))},a=function(u){u.forEach(s)},c=Al("first-input",a);n=Jo(e,o,qU,t.reportAllChanges),c&&(Dh(yb((function(){a(c.takeRecords()),c.disconnect()}))),$u((function(){var u;o=Qo("FID"),n=Jo(e,o,qU,t.reportAllChanges),Nv=[],Pf=-1,$i=null,nB(addEventListener),u=s,Nv.push(u),tB()})))}))},$we=function(e,t){Fwe((function(n){var r=(function(o){var s=o.entries[0],a={eventTarget:vb(s.target),eventType:s.name,eventTime:s.startTime,eventEntry:s,loadState:RT(s.startTime)};return Object.assign(o,{attribution:a})})(n);e(r)}),t)};const zwe="web-vitals";class jwe extends uo{constructor(t){super(zwe),this.resourceEventIds=new Map,this.cacheLCPCandidates=rwe(),this.handleEvent=n=>{switch(n.type){case Bj:const r=n.details;this.cacheLCPCandidates&&r.fileType===Sn.IMAGE&&this.resourceEventIds.set(PU(n.details),n.id);break;case SI:this.navigationEventId=n.id;break}},this.config=Object.assign(Object.assign({},IT),t)}enable(){}disable(){}onload(){this.context.eventBus.subscribe(rh.EVENT,this.handleEvent),Dwe(t=>this.handleLCP(t),{reportAllChanges:this.config.reportAllLCP}),$we(t=>this.handleFID(t)),Iwe(t=>this.handleCLS(t),{reportAllChanges:!0}),kwe(t=>this.handleINP(t),{reportAllChanges:!0})}handleLCP(t){var n,r;const o=t.attribution,s={element:o?.element,url:o?.url,timeToFirstByte:o?.timeToFirstByte,resourceLoadDelay:o?.resourceLoadDelay,resourceLoadTime:o?.resourceLoadDuration,elementRenderDelay:o?.elementRenderDelay};if(o?.lcpResourceEntry){const a=PU(o?.lcpResourceEntry);s.lcpResourceEntry=this.resourceEventIds.get(a)}this.navigationEventId&&(s.navigationEntry=this.navigationEventId),(n=this.context)===null||n===void 0||n.record($Ce,{version:"1.0.0",value:t.value,attribution:s}),(r=this.context)===null||r===void 0||r.eventBus.unsubscribe(rh.EVENT,this.handleEvent),this.resourceEventIds.clear(),this.navigationEventId=void 0}handleCLS(t){const n=t.attribution,{record:r,recordCandidate:o}=this.context;(this.config.reportAllCLS?r:o)(jCe,{version:"1.0.0",value:t.value,attribution:{largestShiftTarget:n?.largestShiftTarget,largestShiftValue:n?.largestShiftValue,largestShiftTime:n?.largestShiftTime,loadState:n?.loadState}})}handleFID(t){var n;const r=t.attribution;(n=this.context)===null||n===void 0||n.record(zCe,{version:"1.0.0",value:t.value,attribution:{eventTarget:r?.eventTarget,eventType:r?.eventType,eventTime:r?.eventTime,loadState:r?.loadState}})}handleINP(t){const n=t.attribution,{record:r,recordCandidate:o}=this.context;(this.config.reportAllINP?r:o)(BCe,{version:"1.0.0",value:t.value,attribution:{interactionTarget:n?.interactionTarget,interactionTime:n?.interactionTime,nextPaintTime:n?.nextPaintTime,interactionType:n?.interactionType,inputDelay:n?.inputDelay,processingDuration:n?.processingDuration,presentationDelay:n?.presentationDelay,loadState:n?.loadState}})}}const Bwe="fetch";class Hwe extends AT{constructor(t){super(Bwe),this.isTracingEnabled=()=>this.context.config.enableXRay,this.isSessionRecorded=()=>{var n;return((n=this.context.getSession())===null||n===void 0?void 0:n.record)||!1},this.beginTrace=(n,r,o)=>{const s=jc(),a=N1e(n,r,!0),c=Tj(this.config.logicalServiceName,s,this.context.config.enableW3CTraceId),u=Oj(Mj(n),s,a);return c.subsegments.push(u),this.isTraceIdHeaderEnabled(n)&&this.addXRayTraceIdHeader(n,r,o,c),c},this.addXRayTraceIdHeader=(n,r,o,s)=>{if(n.headers)return D1e(n.headers,s.trace_id,s.subsegments[0].id,this.context.config.enableW3CTraceId);r||(r={},[].push.call(o,r)),k1e(r,s.trace_id,s.subsegments[0].id,this.context.config.enableW3CTraceId)},this.endTrace=(n,r,o)=>{if(n){const s=jc();if(n.subsegments[0].end_time=s,n.end_time=s,r){n.subsegments[0].http.response={status:r.status},bT(r.status)?(n.subsegments[0].throttle=!0,n.throttle=!0):Aj(r.status)?(n.subsegments[0].error=!0,n.error=!0):yT(r.status)&&(n.subsegments[0].fault=!0,n.fault=!0);const a=r.headers.get("Content-Length"),c=a?parseInt(a,10):NaN;isNaN(c)||(n.subsegments[0].http.response.content_length=c)}o&&(n.fault=!0,n.subsegments[0].fault=!0,o instanceof Object?this.appendErrorCauseFromObject(n.subsegments[0],o):Vj(o)&&this.appendErrorCauseFromPrimitive(n.subsegments[0],o.toString())),this.context.record(jj,n)}},this.createHttpEvent=(n,r)=>{const o=n;return{version:"1.0.0",request:{url:Gg(n),method:r?.method?r.method:o.method?o.method:"GET"}}},this.recordHttpEventWithResponse=(n,r)=>{(this.config.recordAllRequests||!r.ok)&&(n.response={status:r.status,statusText:r.statusText},this.context.record(Ov,n))},this.recordHttpEventWithError=(n,r)=>{n.error=_T({type:"error",error:r},this.config.stackTraceLength),this.context.record(Ov,n)},this.fetch=(n,r,o,s,a)=>{const c=this.createHttpEvent(s,a);let u;if(!Rj(Gg(s),this.config))return n.apply(r,o);const f=U1e(s.headers,this.context.config.enableW3CTraceId);return f.traceId&&f.segmentId?(c.trace_id=f.traceId,c.segment_id=f.segmentId):this.isTracingEnabled()&&this.isSessionRecorded()&&(u=this.beginTrace(s,a,o),c.trace_id=u.trace_id,c.segment_id=u.subsegments[0].id),n.apply(r,o).then(h=>(this.endTrace(u,h,void 0),this.recordHttpEventWithResponse(c,h),h)).catch(h=>{throw this.endTrace(u,void 0,h),this.recordHttpEventWithError(c,h),h})},this.fetchWrapper=()=>{const n=this;return r=>function(o,s){return n.fetch(r,this,arguments,o,s)}},this.config=Object.assign(Object.assign({},Ij),t)}get patches(){return[{nodule:window,name:"fetch",wrapper:this.fetchWrapper}]}onload(){this.enable()}isTraceIdHeaderEnabled(t){const n=Gg(t);return _j(n,this.config.addXRayTraceIdHeader)}appendErrorCauseFromPrimitive(t,n){t.cause={exceptions:[{type:n}]}}appendErrorCauseFromObject(t,n){t.cause={exceptions:[{type:n.name,message:n.message}]}}}class qwe extends Error{constructor(t){super(t),this.name="XMLHttpRequest error"}}const Vwe="xhr";class Wwe extends AT{constructor(t){super(Vwe),this.addXRayTraceIdHeader=n=>_j(n,this.config.addXRayTraceIdHeader),this.isTracingEnabled=()=>this.context.config.enableXRay,this.isSessionRecorded=()=>{var n;return((n=this.context.getSession())===null||n===void 0?void 0:n.record)||!1},this.handleXhrLoadEvent=n=>{const r=n.target,o=this.xhrMap.get(r);if(o){const s=jc();o.trace.end_time=s,o.trace.subsegments[0].end_time=s,o.trace.subsegments[0].http.response={status:r.status},bT(r.status)?(o.trace.subsegments[0].throttle=!0,o.trace.throttle=!0):Aj(r.status)?(o.trace.subsegments[0].error=!0,o.trace.error=!0):yT(r.status)&&(o.trace.subsegments[0].fault=!0,o.trace.fault=!0);const a=r.getResponseHeader("Content-Length"),c=a?parseInt(a,10):NaN;isNaN(c)||(o.trace.subsegments[0].http.response.content_length=c),this.recordTraceEvent(o.trace),this.recordHttpEventWithResponse(o,r)}},this.handleXhrErrorEvent=n=>{const r=n.target,o=this.xhrMap.get(r),s="XMLHttpRequest error",a=r.statusText?r.status.toString()+": "+r.statusText:r.status.toString();if(o){const c=jc();o.trace.fault=!0,o.trace.end_time=c,o.trace.subsegments[0].end_time=c,o.trace.subsegments[0].fault=!0,o.trace.subsegments[0].cause={exceptions:[{type:s,message:a}]},this.recordTraceEvent(o.trace),this.recordHttpEventWithError(o,r,new qwe(a))}},this.handleXhrAbortEvent=n=>{const r=n.target,o=this.xhrMap.get(r);o&&this.handleXhrDetailsOnError(o,r,"XMLHttpRequest abort")},this.handleXhrTimeoutEvent=n=>{const r=n.target,o=this.xhrMap.get(r);this.handleXhrDetailsOnError(o,r,"XMLHttpRequest timeout")},this.initializeTrace=n=>{const r=jc();n.trace=Tj(this.config.logicalServiceName,r,this.context.config.enableW3CTraceId),n.trace.subsegments.push(Oj(Mj(n.url),r,{request:{method:n.method,url:n.url,traced:!0}}))},this.sendWrapper=()=>{const n=this;return r=>function(){const o=n.xhrMap.get(this);return o&&(this.addEventListener("load",n.handleXhrLoadEvent),this.addEventListener("error",n.handleXhrErrorEvent),this.addEventListener("abort",n.handleXhrAbortEvent),this.addEventListener("timeout",n.handleXhrTimeoutEvent),n.initializeTrace(o),!n.isSyntheticsUA&&n.isTracingEnabled()&&n.addXRayTraceIdHeader(o.url)&&n.isSessionRecorded()&&(n.context.config.enableW3CTraceId?this.setRequestHeader(pb,CT(o.trace.trace_id,o.trace.subsegments[0].id)):this.setRequestHeader(hb,ST(o.trace.trace_id,o.trace.subsegments[0].id)))),r.apply(this,arguments)}},this.openWrapper=()=>{const n=this;return r=>function(o,s,a){return Rj(s,n.config)&&n.xhrMap.set(this,{url:s,method:o,async:a}),r.apply(this,arguments)}},this.config=Object.assign(Object.assign({},Ij),t),this.xhrMap=new Map,this.isSyntheticsUA=navigator.userAgent.includes("CloudWatchSynthetics")}onload(){this.enable()}get patches(){return[{nodule:XMLHttpRequest.prototype,name:"send",wrapper:this.sendWrapper},{nodule:XMLHttpRequest.prototype,name:"open",wrapper:this.openWrapper}]}handleXhrDetailsOnError(t,n,r){if(t){const o=jc();t.trace.end_time=o,t.trace.subsegments[0].end_time=o,t.trace.subsegments[0].error=!0,t.trace.subsegments[0].cause={exceptions:[{type:r}]},this.recordTraceEvent(t.trace),this.recordHttpEventWithError(t,n,r)}}statusOk(t){return t>=200&&t<300}recordHttpEventWithResponse(t,n){this.xhrMap.delete(n);const r={version:"1.0.0",request:{method:t.method,url:t.url},response:{status:n.status,statusText:n.statusText}};this.isTracingEnabled()&&(r.trace_id=t.trace.trace_id,r.segment_id=t.trace.subsegments[0].id),(this.config.recordAllRequests||!this.statusOk(n.status))&&this.context.record(Ov,r)}recordHttpEventWithError(t,n,r){this.xhrMap.delete(n);const o={version:"1.0.0",request:{method:t.method,url:t.url},error:_T({type:"error",error:r},this.config.stackTraceLength)};this.isTracingEnabled()&&(o.trace_id=t.trace.trace_id,o.segment_id=t.trace.subsegments[0].id),this.context.record(Ov,o)}recordTraceEvent(t){!this.isSyntheticsUA&&this.isTracingEnabled()&&this.isSessionRecorded()&&this.context.record(jj,t)}}var kv={},Gwe=Object.defineProperty,Kwe=(e,t,n)=>t in e?Gwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,we=(e,t,n)=>Kwe(e,typeof t!="symbol"?t+"":t,n),VU,Zwe=Object.defineProperty,Ywe=(e,t,n)=>t in e?Zwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,WU=(e,t,n)=>Ywe(e,typeof t!="symbol"?t+"":t,n),In=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(In||{});const GU={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},KU={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Gm={},Qwe=()=>!!globalThis.Zone;function kT(e){if(Gm[e])return Gm[e];const t=globalThis[e],n=t.prototype,r=e in GU?GU[e]:void 0,o=!!(r&&r.every(c=>{var u,f;return!!((f=(u=Object.getOwnPropertyDescriptor(n,c))==null?void 0:u.get)!=null&&f.toString().includes("[native code]"))})),s=e in KU?KU[e]:void 0,a=!!(s&&s.every(c=>{var u;return typeof n[c]=="function"&&((u=n[c])==null?void 0:u.toString().includes("[native code]"))}));if(o&&a&&!Qwe())return Gm[e]=t.prototype,t.prototype;try{const c=document.createElement("iframe");document.body.appendChild(c);const u=c.contentWindow;if(!u)return t.prototype;const f=u[e].prototype;return document.body.removeChild(c),f?Gm[e]=f:n}catch{return n}}const Wx={};function Xs(e,t,n){var r;const o=`${e}.${String(n)}`;if(Wx[o])return Wx[o].call(t);const s=kT(e),a=(r=Object.getOwnPropertyDescriptor(s,n))==null?void 0:r.get;return a?(Wx[o]=a,a.call(t)):t[n]}const Gx={};function rB(e,t,n){const r=`${e}.${String(n)}`;if(Gx[r])return Gx[r].bind(t);const s=kT(e)[n];return typeof s!="function"?t[n]:(Gx[r]=s,s.bind(t))}function Jwe(e){return Xs("Node",e,"ownerDocument")}function Xwe(e){return Xs("Node",e,"childNodes")}function eEe(e){return Xs("Node",e,"parentNode")}function tEe(e){return Xs("Node",e,"parentElement")}function nEe(e){return Xs("Node",e,"textContent")}function rEe(e,t){return rB("Node",e,"contains")(t)}function oEe(e){return rB("Node",e,"getRootNode")()}function sEe(e){return!e||!("host"in e)?null:Xs("ShadowRoot",e,"host")}function iEe(e){return e.styleSheets}function aEe(e){return!e||!("shadowRoot"in e)?null:Xs("Element",e,"shadowRoot")}function lEe(e,t){return Xs("Element",e,"querySelector")(t)}function cEe(e,t){return Xs("Element",e,"querySelectorAll")(t)}function uEe(){return kT("MutationObserver").constructor}function dEe(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}const Qn={ownerDocument:Jwe,childNodes:Xwe,parentNode:eEe,parentElement:tEe,textContent:nEe,contains:rEe,getRootNode:oEe,host:sEe,styleSheets:iEe,shadowRoot:aEe,querySelector:lEe,querySelectorAll:cEe,mutationObserver:uEe,patch:dEe};function oB(e){return e.nodeType===e.ELEMENT_NODE}function Nf(e){const t=e&&"host"in e&&"mode"in e&&Qn.host(e)||null;return!!(t&&"shadowRoot"in t&&Qn.shadowRoot(t)===e)}function kf(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function fEe(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function hEe(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function _I(e){try{const t=e.rules||e.cssRules;if(!t)return null;let n=e.href;!n&&e.ownerNode&&(n=e.ownerNode.baseURI);const r=Array.from(t,o=>sB(o,n)).join("");return fEe(r)}catch{return null}}function sB(e,t){if(mEe(e)){let n;try{n=_I(e.styleSheet)||hEe(e)}catch{n=e.cssText}return e.styleSheet.href?Uv(n,e.styleSheet.href):n}else{let n=e.cssText;return gEe(e)&&e.selectorText.includes(":")&&(n=pEe(n)),t?Uv(n,t):n}}function pEe(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function mEe(e){return"styleSheet"in e}function gEe(e){return"selectorText"in e}class iB{constructor(){WU(this,"idNodeMap",new Map),WU(this,"nodeMetaMap",new WeakMap)}getId(t){var n;return t?((n=this.getMeta(t))==null?void 0:n.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function vEe(){return new iB}function Dv({element:e,maskInputOptions:t,tagName:n,type:r,value:o,maskInputFn:s}){let a=o||"";const c=r&&hl(r);return(t[n.toLowerCase()]||c&&t[c])&&(s?a=s(a,e):a="*".repeat(a.length)),a}function hl(e){return e.toLowerCase()}const ZU="__rrweb_original__";function yEe(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){const s=t.getImageData,a=ZU in s?s[ZU]:s;if(new Uint32Array(a.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(u=>u!==0))return!1}return!0}function Lv(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?hl(t):null}function aB(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,o=n.pathname.match(r);return o?.[1]??null}function bEe(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const SEe=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,CEe=/^(?:[a-z+]+:)?\/\//i,wEe=/^www\..*/i,EEe=/^(data:)([^,]*),(.*)/i;function Uv(e,t){return(e||"").replace(SEe,(n,r,o,s,a,c)=>{const u=o||a||c,f=r||s||"";if(!u)return n;if(CEe.test(u)||wEe.test(u))return`url(${f}${u}${f})`;if(EEe.test(u))return`url(${f}${u}${f})`;if(u[0]==="/")return`url(${f}${bEe(t)+u}${f})`;const h=t.split("/"),m=u.split("/");h.pop();for(const g of m)g!=="."&&(g===".."?h.pop():h.push(g));return`url(${f}${h.join("/")}${f})`})}function Km(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function xEe(e,t,n=!1){const r=Array.from(t.childNodes),o=[];let s=0;if(r.length>1&&e&&typeof e=="string"){let a=Km(e,n);const c=a.length/e.length;for(let u=1;u<r.length;u++)if(r[u].textContent&&typeof r[u].textContent=="string"){const f=Km(r[u].textContent,n),h=100;let m=3;for(;m<f.length&&(f[m].match(/[a-zA-Z0-9]/)||f.indexOf(f.substring(0,m),1)!==-1);m++);for(;m<f.length;m++){let g=f.substring(0,m),v=a.split(g),C=-1;if(v.length===2)C=v[0].length;else if(v.length>2&&v[0]===""&&r[u-1].textContent!=="")C=a.indexOf(g,1);else if(v.length===1){if(g=g.substring(0,g.length-1),v=a.split(g),v.length<=1)return o.push(e),o;m=h+1}else m===f.length-1&&(C=a.indexOf(g));if(v.length>=2&&m>h){const b=r[u-1].textContent;if(b&&typeof b=="string"){const E=Km(b).length;C=a.indexOf(g,E)}C===-1&&(C=v[0].length)}if(C!==-1){let b=Math.floor(C/c);for(;b>0&&b<e.length;){if(s+=1,s>50*r.length)return o.push(e),o;const E=Km(e.substring(0,b),n);if(E.length===C){o.push(e.substring(0,b)),e=e.substring(b),a=a.substring(C);break}else E.length<C?b+=Math.max(1,Math.floor((C-E.length)/c)):b-=Math.max(1,Math.floor((E.length-C)*c))}break}}}}return o.push(e),o}function _Ee(e,t){return xEe(e,t).join("/* rr_split */")}let IEe=1;const AEe=new RegExp("[^a-z0-9-_:]"),oh=-2;function lB(){return IEe++}function REe(e){if(e instanceof HTMLFormElement)return"form";const t=hl(e.tagName);return AEe.test(t)?"div":t}let Ic,YU;const TEe=/^[^ \t\n\r\u000c]+/,OEe=/^[, \t\n\r\u000c]+/;function MEe(e,t){if(t.trim()==="")return t;let n=0;function r(s){let a;const c=s.exec(t.substring(n));return c?(a=c[0],n+=a.length,a):""}const o=[];for(;r(OEe),!(n>=t.length);){let s=r(TEe);if(s.slice(-1)===",")s=Hc(e,s.substring(0,s.length-1)),o.push(s);else{let a="";s=Hc(e,s);let c=!1;for(;;){const u=t.charAt(n);if(u===""){o.push((s+a).trim());break}else if(c)u===")"&&(c=!1);else if(u===","){n+=1,o.push((s+a).trim());break}else u==="("&&(c=!0);a+=u,n+=1}}}return o.join(", ")}const QU=new WeakMap;function Hc(e,t){return!t||t.trim()===""?t:DT(e,t)}function PEe(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function DT(e,t){let n=QU.get(e);if(n||(n=e.createElement("a"),QU.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function cB(e,t,n,r){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&["table","td","th"].includes(t)?Hc(e,r):n==="srcset"?MEe(e,r):n==="style"?Uv(r,DT(e)):t==="object"&&n==="data"?Hc(e,r):r)}function uB(e,t,n){return["video","audio"].includes(e)&&t==="autoplay"}function NEe(e,t,n){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const o=e.classList[r];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function Fv(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Fv(Qn.parentNode(e),t,n):!1;for(let r=e.classList.length;r--;){const o=e.classList[r];if(t.test(o))return!0}return n?Fv(Qn.parentNode(e),t,n):!1}function dB(e,t,n,r){let o;if(oB(e)){if(o=e,!Qn.childNodes(o).length)return!1}else{if(Qn.parentElement(e)===null)return!1;o=Qn.parentElement(e)}try{if(typeof t=="string"){if(r){if(o.closest(`.${t}`))return!0}else if(o.classList.contains(t))return!0}else if(Fv(o,t,r))return!0;if(n){if(r){if(o.closest(n))return!0}else if(o.matches(n))return!0}}catch{}return!1}function kEe(e,t,n){const r=e.contentWindow;if(!r)return;let o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const c=setTimeout(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{clearTimeout(c),o=!0,t()});return}const a="about:blank";if(r.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function DEe(e,t,n){let r=!1,o;try{o=e.sheet}catch{return}if(o)return;const s=setTimeout(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{clearTimeout(s),r=!0,t()})}function LEe(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,needsMask:a,inlineStylesheet:c,maskInputOptions:u={},maskTextFn:f,maskInputFn:h,dataURLOptions:m={},inlineImages:g,recordCanvas:v,keepIframeSrcFn:C,newlyAddedElement:b=!1,cssCaptured:E=!1}=t,x=UEe(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:In.Document,childNodes:[],compatMode:e.compatMode}:{type:In.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:In.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:x};case e.ELEMENT_NODE:return $Ee(e,{doc:n,blockClass:o,blockSelector:s,inlineStylesheet:c,maskInputOptions:u,maskInputFn:h,dataURLOptions:m,inlineImages:g,recordCanvas:v,keepIframeSrcFn:C,newlyAddedElement:b,rootId:x});case e.TEXT_NODE:return FEe(e,{doc:n,needsMask:a,maskTextFn:f,rootId:x,cssCaptured:E});case e.CDATA_SECTION_NODE:return{type:In.CDATA,textContent:"",rootId:x};case e.COMMENT_NODE:return{type:In.Comment,textContent:Qn.textContent(e)||"",rootId:x};default:return!1}}function UEe(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function FEe(e,t){const{needsMask:n,maskTextFn:r,rootId:o,cssCaptured:s}=t,a=Qn.parentNode(e),c=a&&a.tagName;let u="";const f=c==="STYLE"?!0:void 0,h=c==="SCRIPT"?!0:void 0;return h?u="SCRIPT_PLACEHOLDER":s||(u=Qn.textContent(e),f&&u&&(u=Uv(u,DT(t.doc)))),!f&&!h&&u&&n&&(u=r?r(u,Qn.parentElement(e)):u.replace(/[\S]/g,"*")),{type:In.Text,textContent:u||"",rootId:o}}function $Ee(e,t){const{doc:n,blockClass:r,blockSelector:o,inlineStylesheet:s,maskInputOptions:a={},maskInputFn:c,dataURLOptions:u={},inlineImages:f,recordCanvas:h,keepIframeSrcFn:m,newlyAddedElement:g=!1,rootId:v}=t,C=NEe(e,r,o),b=REe(e);let E={};const x=e.attributes.length;for(let R=0;R<x;R++){const O=e.attributes[R];uB(b,O.name,O.value)||(E[O.name]=cB(n,b,hl(O.name),O.value))}if(b==="link"&&s){const R=Array.from(n.styleSheets).find(D=>D.href===e.href);let O=null;R&&(O=_I(R)),O&&(delete E.rel,delete E.href,E._cssText=O)}if(b==="style"&&e.sheet){let R=_I(e.sheet);R&&(e.childNodes.length>1&&(R=_Ee(R,e)),E._cssText=R)}if(["input","textarea","select"].includes(b)){const R=e.value,O=e.checked;E.type!=="radio"&&E.type!=="checkbox"&&E.type!=="submit"&&E.type!=="button"&&R?E.value=Dv({element:e,type:Lv(e),tagName:b,value:R,maskInputOptions:a,maskInputFn:c}):O&&(E.checked=O)}if(b==="option"&&(e.selected&&!a.select?E.selected=!0:delete E.selected),b==="dialog"&&e.open&&(E.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),b==="canvas"&&h){if(e.__context==="2d")yEe(e)||(E.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const R=e.toDataURL(u.type,u.quality),O=n.createElement("canvas");O.width=e.width,O.height=e.height;const D=O.toDataURL(u.type,u.quality);R!==D&&(E.rr_dataURL=R)}}if(b==="img"&&f){Ic||(Ic=n.createElement("canvas"),YU=Ic.getContext("2d"));const R=e,O=R.currentSrc||R.getAttribute("src")||"<unknown-src>",D=R.crossOrigin,N=()=>{R.removeEventListener("load",N);try{Ic.width=R.naturalWidth,Ic.height=R.naturalHeight,YU.drawImage(R,0,0),E.rr_dataURL=Ic.toDataURL(u.type,u.quality)}catch(M){if(R.crossOrigin!=="anonymous"){R.crossOrigin="anonymous",R.complete&&R.naturalWidth!==0?N():R.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${O}! Error: ${M}`)}R.crossOrigin==="anonymous"&&(D?E.crossOrigin=D:R.removeAttribute("crossorigin"))};R.complete&&R.naturalWidth!==0?N():R.addEventListener("load",N)}if(["audio","video"].includes(b)){const R=E;R.rr_mediaState=e.paused?"paused":"played",R.rr_mediaCurrentTime=e.currentTime,R.rr_mediaPlaybackRate=e.playbackRate,R.rr_mediaMuted=e.muted,R.rr_mediaLoop=e.loop,R.rr_mediaVolume=e.volume}if(g||(e.scrollLeft&&(E.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(E.rr_scrollTop=e.scrollTop)),C){const{width:R,height:O}=e.getBoundingClientRect();E={class:E.class,rr_width:`${R}px`,rr_height:`${O}px`}}b==="iframe"&&!m(E.src)&&(e.contentDocument||(E.rr_src=E.src),delete E.src);let I;try{customElements.get(b)&&(I=!0)}catch{}return{type:In.Element,tagName:b,attributes:E,childNodes:[],isSVG:PEe(e)||void 0,needBlock:C,rootId:v,isCustom:I}}function jt(e){return e==null?"":e.toLowerCase()}function fB(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function zEe(e,t){if(t.comment&&e.type===In.Comment)return!0;if(e.type===In.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&aB(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(jt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||jt(e.attributes.name)==="application-name"||jt(e.attributes.rel)==="icon"||jt(e.attributes.rel)==="apple-touch-icon"||jt(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&jt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(jt(e.attributes.property).match(/^(og|twitter|fb):/)||jt(e.attributes.name).match(/^(og|twitter):/)||jt(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(jt(e.attributes.name)==="robots"||jt(e.attributes.name)==="googlebot"||jt(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(jt(e.attributes.name)==="author"||jt(e.attributes.name)==="generator"||jt(e.attributes.name)==="framework"||jt(e.attributes.name)==="publisher"||jt(e.attributes.name)==="progid"||jt(e.attributes.property).match(/^article:/)||jt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(jt(e.attributes.name)==="google-site-verification"||jt(e.attributes.name)==="yandex-verification"||jt(e.attributes.name)==="csrf-token"||jt(e.attributes.name)==="p:domain_verify"||jt(e.attributes.name)==="verify-v1"||jt(e.attributes.name)==="verification"||jt(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function qc(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:c,skipChild:u=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:C={},inlineImages:b=!1,recordCanvas:E=!1,onSerialize:x,onIframeLoad:I,iframeLoadTimeout:R=5e3,onStylesheetLoad:O,stylesheetLoadTimeout:D=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:M=!1,cssCaptured:L=!1}=t;let{needsMask:$}=t,{preserveWhiteSpace:G=!0}=t;$||($=dB(e,a,c,$===void 0));const j=LEe(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,needsMask:$,inlineStylesheet:f,maskInputOptions:h,maskTextFn:m,maskInputFn:g,dataURLOptions:C,inlineImages:b,recordCanvas:E,keepIframeSrcFn:N,newlyAddedElement:M,cssCaptured:L});if(!j)return console.warn(e,"not serialized"),null;let F;r.hasNode(e)?F=r.getId(e):zEe(j,v)||!G&&j.type===In.Text&&!j.textContent.replace(/^\s+|\s+$/gm,"").length?F=oh:F=lB();const q=Object.assign(j,{id:F});if(r.add(e,q),F===oh)return null;x&&x(e);let J=!u;if(q.type===In.Element){J=J&&!q.needBlock,delete q.needBlock;const V=Qn.shadowRoot(e);V&&kf(V)&&(q.isShadowHost=!0)}if((q.type===In.Document||q.type===In.Element)&&J){v.headWhitespace&&q.type===In.Element&&q.tagName==="head"&&(G=!1);const V={doc:n,mirror:r,blockClass:o,blockSelector:s,needsMask:$,maskTextClass:a,maskTextSelector:c,skipChild:u,inlineStylesheet:f,maskInputOptions:h,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:C,inlineImages:b,recordCanvas:E,preserveWhiteSpace:G,onSerialize:x,onIframeLoad:I,iframeLoadTimeout:R,onStylesheetLoad:O,stylesheetLoadTimeout:D,keepIframeSrcFn:N,cssCaptured:!1};if(!(q.type===In.Element&&q.tagName==="textarea"&&q.attributes.value!==void 0)){q.type===In.Element&&q.attributes._cssText!==void 0&&typeof q.attributes._cssText=="string"&&(V.cssCaptured=!0);for(const me of Array.from(Qn.childNodes(e))){const ge=qc(me,V);ge&&q.childNodes.push(ge)}}let ee=null;if(oB(e)&&(ee=Qn.shadowRoot(e)))for(const me of Array.from(Qn.childNodes(ee))){const ge=qc(me,V);ge&&(kf(ee)&&(ge.isShadow=!0),q.childNodes.push(ge))}}const Se=Qn.parentNode(e);return Se&&Nf(Se)&&kf(Se)&&(q.isShadow=!0),q.type===In.Element&&q.tagName==="iframe"&&kEe(e,()=>{const V=e.contentDocument;if(V&&I){const ee=qc(V,{doc:V,mirror:r,blockClass:o,blockSelector:s,needsMask:$,maskTextClass:a,maskTextSelector:c,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:C,inlineImages:b,recordCanvas:E,preserveWhiteSpace:G,onSerialize:x,onIframeLoad:I,iframeLoadTimeout:R,onStylesheetLoad:O,stylesheetLoadTimeout:D,keepIframeSrcFn:N});ee&&I(e,ee)}},R),q.type===In.Element&&q.tagName==="link"&&typeof q.attributes.rel=="string"&&(q.attributes.rel==="stylesheet"||q.attributes.rel==="preload"&&typeof q.attributes.href=="string"&&aB(q.attributes.href)==="css")&&DEe(e,()=>{if(O){const V=qc(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,needsMask:$,maskTextClass:a,maskTextSelector:c,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:C,inlineImages:b,recordCanvas:E,preserveWhiteSpace:G,onSerialize:x,onIframeLoad:I,iframeLoadTimeout:R,onStylesheetLoad:O,stylesheetLoadTimeout:D,keepIframeSrcFn:N});V&&O(e,V)}},D),q}function jEe(e,t){const{mirror:n=new iB,blockClass:r="rr-block",blockSelector:o=null,maskTextClass:s="rr-mask",maskTextSelector:a=null,inlineStylesheet:c=!0,inlineImages:u=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskTextFn:m,maskInputFn:g,slimDOM:v=!1,dataURLOptions:C,preserveWhiteSpace:b,onSerialize:E,onIframeLoad:x,iframeLoadTimeout:I,onStylesheetLoad:R,stylesheetLoadTimeout:O,keepIframeSrcFn:D=()=>!1}=t||{},N=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:h===!1?{password:!0}:h,M=fB(v);return qc(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:N,maskTextFn:m,maskInputFn:g,slimDOMOptions:M,dataURLOptions:C,inlineImages:u,recordCanvas:f,preserveWhiteSpace:b,onSerialize:E,onIframeLoad:x,iframeLoadTimeout:I,onStylesheetLoad:R,stylesheetLoadTimeout:O,keepIframeSrcFn:D,newlyAddedElement:!1})}function BEe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function HEe(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var LT={exports:{}},Vt=String,hB=function(){return{isColorSupported:!1,reset:Vt,bold:Vt,dim:Vt,italic:Vt,underline:Vt,inverse:Vt,hidden:Vt,strikethrough:Vt,black:Vt,red:Vt,green:Vt,yellow:Vt,blue:Vt,magenta:Vt,cyan:Vt,white:Vt,gray:Vt,bgBlack:Vt,bgRed:Vt,bgGreen:Vt,bgYellow:Vt,bgBlue:Vt,bgMagenta:Vt,bgCyan:Vt,bgWhite:Vt}};LT.exports=hB();LT.exports.createColors=hB;var qEe=LT.exports;const VEe={},WEe=Object.freeze(Object.defineProperty({__proto__:null,default:VEe},Symbol.toStringTag,{value:"Module"})),Oo=HEe(WEe);let JU=qEe,XU=Oo,II=class pB extends Error{constructor(t,n,r,o,s,a){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),o&&(this.source=o),a&&(this.plugin=a),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,pB)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let n=this.source;t==null&&(t=JU.isColorSupported),XU&&t&&(n=XU(n));let r=n.split(/\r?\n/),o=Math.max(this.line-3,0),s=Math.min(this.line+2,r.length),a=String(s).length,c,u;if(t){let{bold:f,gray:h,red:m}=JU.createColors(!0);c=g=>f(m(g)),u=g=>h(g)}else c=u=f=>f;return r.slice(o,s).map((f,h)=>{let m=o+1+h,g=" "+(" "+m).slice(-a)+" | ";if(m===this.line){let v=u(g.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return c(">")+u(g)+f+`
106
- `+v+c("^")}return" "+u(g)+f}).join(`
107
- `)}toString(){let t=this.showSourceCode();return t&&(t=`
108
-
109
- `+t+`
110
- `),this.name+": "+this.message+t}};var UT=II;II.default=II;var Lh={};Lh.isClean=Symbol("isClean");Lh.my=Symbol("my");const e6={after:`
111
- `,beforeClose:`
112
- `,beforeComment:`
113
- `,beforeDecl:`
114
- `,beforeOpen:" ",beforeRule:`
115
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function GEe(e){return e[0].toUpperCase()+e.slice(1)}let AI=class{constructor(t){this.builder=t}atrule(t,n){let r="@"+t.name,o=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?r+=t.raws.afterName:o&&(r+=" "),t.nodes)this.block(t,r+o);else{let s=(t.raws.between||"")+(n?";":"");this.builder(r+o+s,t)}}beforeAfter(t,n){let r;t.type==="decl"?r=this.raw(t,null,"beforeDecl"):t.type==="comment"?r=this.raw(t,null,"beforeComment"):n==="before"?r=this.raw(t,null,"beforeRule"):r=this.raw(t,null,"beforeClose");let o=t.parent,s=0;for(;o&&o.type!=="root";)s+=1,o=o.parent;if(r.includes(`
116
- `)){let a=this.raw(t,null,"indent");if(a.length)for(let c=0;c<s;c++)r+=a}return r}block(t,n){let r=this.raw(t,"between","beforeOpen");this.builder(n+r+"{",t,"start");let o;t.nodes&&t.nodes.length?(this.body(t),o=this.raw(t,"after")):o=this.raw(t,"after","emptyBody"),o&&this.builder(o),this.builder("}",t,"end")}body(t){let n=t.nodes.length-1;for(;n>0&&t.nodes[n].type==="comment";)n-=1;let r=this.raw(t,"semicolon");for(let o=0;o<t.nodes.length;o++){let s=t.nodes[o],a=this.raw(s,"before");a&&this.builder(a),this.stringify(s,n!==o||r)}}comment(t){let n=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+n+t.text+r+"*/",t)}decl(t,n){let r=this.raw(t,"between","colon"),o=t.prop+r+this.rawValue(t,"value");t.important&&(o+=t.raws.important||" !important"),n&&(o+=";"),this.builder(o,t)}document(t){this.body(t)}raw(t,n,r){let o;if(r||(r=n),n&&(o=t.raws[n],typeof o<"u"))return o;let s=t.parent;if(r==="before"&&(!s||s.type==="root"&&s.first===t||s&&s.type==="document"))return"";if(!s)return e6[r];let a=t.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]<"u")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(t,r);{let c="raw"+GEe(r);this[c]?o=this[c](a,t):a.walk(u=>{if(o=u.raws[n],typeof o<"u")return!1})}return typeof o>"u"&&(o=e6[r]),a.rawCache[r]=o,o}rawBeforeClose(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return n=r.raws.after,n.includes(`
117
- `)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(t,n){let r;return t.walkComments(o=>{if(typeof o.raws.before<"u")return r=o.raws.before,r.includes(`
118
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,n){let r;return t.walkDecls(o=>{if(typeof o.raws.before<"u")return r=o.raws.before,r.includes(`
119
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){let n;return t.walk(r=>{if(r.type!=="decl"&&(n=r.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(t){let n;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
120
- `)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(t){let n;return t.walkDecls(r=>{if(typeof r.raws.between<"u")return n=r.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length===0&&(n=r.raws.after,typeof n<"u"))return!1}),n}rawIndent(t){if(t.raws.indent)return t.raws.indent;let n;return t.walk(r=>{let o=r.parent;if(o&&o!==t&&o.parent&&o.parent===t&&typeof r.raws.before<"u"){let s=r.raws.before.split(`
121
- `);return n=s[s.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(t,n){let r=t[n],o=t.raws[n];return o&&o.value===r?o.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)}};var mB=AI;AI.default=AI;let KEe=mB;function RI(e,t){new KEe(t).stringify(e)}var Sb=RI;RI.default=RI;let{isClean:Zm,my:ZEe}=Lh,YEe=UT,QEe=mB,JEe=Sb;function TI(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r==="proxyCache")continue;let o=e[r],s=typeof o;r==="parent"&&s==="object"?t&&(n[r]=t):r==="source"?n[r]=o:Array.isArray(o)?n[r]=o.map(a=>TI(a,n)):(s==="object"&&o!==null&&(o=TI(o)),n[r]=o)}return n}let OI=class{constructor(t={}){this.raws={},this[Zm]=!1,this[ZEe]=!0;for(let n in t)if(n==="nodes"){this.nodes=[];for(let r of t[n])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[n]=t[n]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let n=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let n in t)this[n]=t[n];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let n=TI(this);for(let r in t)n[r]=t[r];return n}cloneAfter(t={}){let n=this.clone(t);return this.parent.insertAfter(this,n),n}cloneBefore(t={}){let n=this.clone(t);return this.parent.insertBefore(this,n),n}error(t,n={}){if(this.source){let{end:r,start:o}=this.rangeBy(n);return this.source.input.error(t,{column:o.column,line:o.line},{column:r.column,line:r.line},n)}return new YEe(t)}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:n==="root"?()=>t.root().toProxy():t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&t.markDirty()),!0}}}markDirty(){if(this[Zm]){this[Zm]=!1;let t=this;for(;t=t.parent;)t[Zm]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,n){let r=this.source.start;if(t.index)r=this.positionInside(t.index,n);else if(t.word){n=this.toString();let o=n.indexOf(t.word);o!==-1&&(r=this.positionInside(o,n))}return r}positionInside(t,n){let r=n||this.toString(),o=this.source.start.column,s=this.source.start.line;for(let a=0;a<t;a++)r[a]===`
122
- `?(o=1,s+=1):o+=1;return{column:o,line:s}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let n={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(t.word){let o=this.toString(),s=o.indexOf(t.word);s!==-1&&(n=this.positionInside(s,o),r=this.positionInside(s+t.word.length,o))}else t.start?n={column:t.start.column,line:t.start.line}:t.index&&(n=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<n.line||r.line===n.line&&r.column<=n.column)&&(r={column:n.column+1,line:n.line}),{end:r,start:n}}raw(t,n){return new QEe().raw(this,t,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let n=this,r=!1;for(let o of t)o===this?r=!0:r?(this.parent.insertAfter(n,o),n=o):this.parent.insertBefore(n,o);r||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,n){let r={},o=n==null;n=n||new Map;let s=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let c=this[a];if(Array.isArray(c))r[a]=c.map(u=>typeof u=="object"&&u.toJSON?u.toJSON(null,n):u);else if(typeof c=="object"&&c.toJSON)r[a]=c.toJSON(null,n);else if(a==="source"){let u=n.get(c.input);u==null&&(u=s,n.set(c.input,s),s++),r[a]={end:c.end,inputId:u,start:c.start}}else r[a]=c}return o&&(r.inputs=[...n.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=JEe){t.stringify&&(t=t.stringify);let n="";return t(this,r=>{n+=r}),n}warn(t,n,r){let o={node:this};for(let s in r)o[s]=r[s];return t.warn(n,o)}get proxyOf(){return this}};var Cb=OI;OI.default=OI;let XEe=Cb,MI=class extends XEe{constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var wb=MI;MI.default=MI;let exe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",txe=(e=21)=>{let t="",n=e;for(;n--;)t+=exe[Math.random()*64|0];return t};var nxe={nanoid:txe};let{SourceMapConsumer:t6,SourceMapGenerator:n6}=Oo,{existsSync:rxe,readFileSync:oxe}=Oo,{dirname:Kx,join:sxe}=Oo;function ixe(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let PI=class{constructor(t,n){if(n.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let r=n.map?n.map.prev:void 0,o=this.loadMap(n.from,r);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=Kx(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new t6(this.text)),this.consumerCache}decodeInline(t){let n=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,o=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(o.test(t)||s.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(n.test(t)||r.test(t))return ixe(t.substr(RegExp.lastMatch.length));let a=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let n=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let r=t.lastIndexOf(n.pop()),o=t.indexOf("*/",r);r>-1&&o>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,o)))}loadFile(t){if(this.root=Kx(t),rxe(t))return this.mapFile=t,oxe(t,"utf-8").toString().trim()}loadMap(t,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let r=n(t);if(r){let o=this.loadFile(r);if(!o)throw new Error("Unable to load previous source map: "+r.toString());return o}}else{if(n instanceof t6)return n6.fromSourceMap(n).toString();if(n instanceof n6)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return t&&(r=sxe(Kx(t),r)),this.loadFile(r)}}}startWith(t,n){return t?t.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var gB=PI;PI.default=PI;let{SourceMapConsumer:axe,SourceMapGenerator:lxe}=Oo,{fileURLToPath:r6,pathToFileURL:Ym}=Oo,{isAbsolute:NI,resolve:kI}=Oo,{nanoid:cxe}=nxe,Zx=Oo,o6=UT,uxe=gB,Yx=Symbol("fromOffsetCache"),dxe=!!(axe&&lxe),s6=!!(kI&&NI),$v=class{constructor(t,n={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!s6||/^\w+:\/\//.test(n.from)||NI(n.from)?this.file=n.from:this.file=kI(n.from)),s6&&dxe){let r=new uxe(this.css,n);if(r.text){this.map=r;let o=r.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+cxe(6)+">"),this.map&&(this.map.file=this.from)}error(t,n,r,o={}){let s,a,c;if(n&&typeof n=="object"){let f=n,h=r;if(typeof f.offset=="number"){let m=this.fromOffset(f.offset);n=m.line,r=m.col}else n=f.line,r=f.column;if(typeof h.offset=="number"){let m=this.fromOffset(h.offset);a=m.line,c=m.col}else a=h.line,c=h.column}else if(!r){let f=this.fromOffset(n);n=f.line,r=f.col}let u=this.origin(n,r,a,c);return u?s=new o6(t,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,o.plugin):s=new o6(t,a===void 0?n:{column:r,line:n},a===void 0?r:{column:c,line:a},this.css,this.file,o.plugin),s.input={column:r,endColumn:c,endLine:a,line:n,source:this.css},this.file&&(Ym&&(s.input.url=Ym(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let n,r;if(this[Yx])r=this[Yx];else{let s=this.css.split(`
123
- `);r=new Array(s.length);let a=0;for(let c=0,u=s.length;c<u;c++)r[c]=a,a+=s[c].length+1;this[Yx]=r}n=r[r.length-1];let o=0;if(t>=n)o=r.length-1;else{let s=r.length-2,a;for(;o<s;)if(a=o+(s-o>>1),t<r[a])s=a-1;else if(t>=r[a+1])o=a+1;else{o=a;break}}return{col:t-r[o]+1,line:o+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:kI(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,n,r,o){if(!this.map)return!1;let s=this.map.consumer(),a=s.originalPositionFor({column:n,line:t});if(!a.source)return!1;let c;typeof r=="number"&&(c=s.originalPositionFor({column:o,line:r}));let u;NI(a.source)?u=Ym(a.source):u=new URL(a.source,this.map.consumer().sourceRoot||Ym(this.map.mapFile));let f={column:a.column,endColumn:c&&c.column,endLine:c&&c.line,line:a.line,url:u.toString()};if(u.protocol==="file:")if(r6)f.file=r6(u);else throw new Error("file: protocol is not available in this PostCSS build");let h=s.sourceContentFor(a.source);return h&&(f.source=h),f}toJSON(){let t={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(t[n]=this[n]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};var Eb=$v;$v.default=$v;Zx&&Zx.registerInput&&Zx.registerInput($v);let{SourceMapConsumer:vB,SourceMapGenerator:Kg}=Oo,{dirname:Zg,relative:yB,resolve:bB,sep:SB}=Oo,{pathToFileURL:i6}=Oo,fxe=Eb,hxe=!!(vB&&Kg),pxe=!!(Zg&&bB&&yB&&SB),mxe=class{constructor(t,n,r,o){this.stringify=t,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let n=`
124
- `;this.css.includes(`\r
125
- `)&&(n=`\r
126
- `),this.css+=n+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let n=this.toUrl(this.path(t.file)),r=t.root||Zg(t.file),o;this.mapOpts.sourcesContent===!1?(o=new vB(t.text),o.sourcesContent&&(o.sourcesContent=null)):o=t.consumer(),this.map.applySourceMap(o,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let n=this.root.nodes.length-1;n>=0;n--)t=this.root.nodes[n],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),pxe&&hxe&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,n=>{t+=n}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Kg.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Kg({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Kg({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,n=1,r="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,a;this.stringify(this.root,(c,u,f)=>{if(this.css+=c,u&&f!=="end"&&(o.generated.line=t,o.generated.column=n-1,u.source&&u.source.start?(o.source=this.sourcePath(u),o.original.line=u.source.start.line,o.original.column=u.source.start.column-1,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,this.map.addMapping(o))),s=c.match(/\n/g),s?(t+=s.length,a=c.lastIndexOf(`
127
- `),n=c.length-a):n+=c.length,u&&f!=="start"){let h=u.parent||{raws:{}};(!(u.type==="decl"||u.type==="atrule"&&!u.nodes)||u!==h.last||h.raws.semicolon)&&(u.source&&u.source.end?(o.source=this.sourcePath(u),o.original.line=u.source.end.line,o.original.column=u.source.end.column-1,o.generated.line=t,o.generated.column=n-2,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,o.generated.line=t,o.generated.column=n-1,this.map.addMapping(o)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let n=this.memoizedPaths.get(t);if(n)return n;let r=this.opts.to?Zg(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Zg(bB(r,this.mapOpts.annotation)));let o=yB(r,t);return this.memoizedPaths.set(t,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let n=t.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let t=new fxe(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!t[r]){t[r]=!0;let o=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(o,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let n=this.memoizedFileURLs.get(t);if(n)return n;if(i6){let r=i6(t).toString();return this.memoizedFileURLs.set(t,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let n=this.memoizedURLs.get(t);if(n)return n;SB==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};var CB=mxe;let gxe=Cb,DI=class extends gxe{constructor(t){super(t),this.type="comment"}};var xb=DI;DI.default=DI;let{isClean:wB,my:EB}=Lh,xB=wb,_B=xb,vxe=Cb,IB,FT,$T,AB;function RB(e){return e.map(t=>(t.nodes&&(t.nodes=RB(t.nodes)),delete t.source,t))}function TB(e){if(e[wB]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)TB(t)}let Ws=class OB extends vxe{append(...t){for(let n of t){let r=this.normalize(n,this.last);for(let o of r)this.proxyOf.nodes.push(o)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let n of this.nodes)n.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,o;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],o=t(this.proxyOf.nodes[r],r),o!==!1);)this.indexes[n]+=1;return delete this.indexes[n],o}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:t[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>t[n](...r.map(o=>typeof o=="function"?(s,a)=>o(s.toProxy(),a):o)):n==="every"||n==="some"?r=>t[n]((o,...s)=>r(o.toProxy(),...s)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let r=this.index(t),o=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let a of o)this.proxyOf.nodes.splice(r+1,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<s&&(this.indexes[a]=s+o.length);return this.markDirty(),this}insertBefore(t,n){let r=this.index(t),o=r===0?"prepend":!1,s=this.normalize(n,this.proxyOf.nodes[r],o).reverse();r=this.index(t);for(let c of s)this.proxyOf.nodes.splice(r,0,c);let a;for(let c in this.indexes)a=this.indexes[c],r<=a&&(this.indexes[c]=a+s.length);return this.markDirty(),this}normalize(t,n){if(typeof t=="string")t=RB(IB(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let o of t)o.parent&&o.parent.removeChild(o,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let o of t)o.parent&&o.parent.removeChild(o,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new xB(t)]}else if(t.selector)t=[new FT(t)];else if(t.name)t=[new $T(t)];else if(t.text)t=[new _B(t)];else throw new Error("Unknown node type in node creation");return t.map(o=>(o[EB]||OB.rebuild(o),o=o.proxyOf,o.parent&&o.parent.removeChild(o),o[wB]&&TB(o),typeof o.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(o.raws.before=n.raws.before.replace(/\S/g,"")),o.parent=this.proxyOf,o))}prepend(...t){t=t.reverse();for(let n of t){let r=this.normalize(n,this.first,"prepend").reverse();for(let o of r)this.proxyOf.nodes.unshift(o);for(let o in this.indexes)this.indexes[o]=this.indexes[o]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=t&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(t,n,r){return r||(r=n,n={}),this.walkDecls(o=>{n.props&&!n.props.includes(o.prop)||n.fast&&!o.value.includes(n.fast)||(o.value=o.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((n,r)=>{let o;try{o=t(n,r)}catch(s){throw n.addToError(s)}return o!==!1&&n.walk&&(o=n.walk(t)),o})}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((r,o)=>{if(r.type==="atrule"&&t.test(r.name))return n(r,o)}):this.walk((r,o)=>{if(r.type==="atrule"&&r.name===t)return n(r,o)}):(n=t,this.walk((r,o)=>{if(r.type==="atrule")return n(r,o)}))}walkComments(t){return this.walk((n,r)=>{if(n.type==="comment")return t(n,r)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((r,o)=>{if(r.type==="decl"&&t.test(r.prop))return n(r,o)}):this.walk((r,o)=>{if(r.type==="decl"&&r.prop===t)return n(r,o)}):(n=t,this.walk((r,o)=>{if(r.type==="decl")return n(r,o)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((r,o)=>{if(r.type==="rule"&&t.test(r.selector))return n(r,o)}):this.walk((r,o)=>{if(r.type==="rule"&&r.selector===t)return n(r,o)}):(n=t,this.walk((r,o)=>{if(r.type==="rule")return n(r,o)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ws.registerParse=e=>{IB=e};Ws.registerRule=e=>{FT=e};Ws.registerAtRule=e=>{$T=e};Ws.registerRoot=e=>{AB=e};var Rl=Ws;Ws.default=Ws;Ws.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,$T.prototype):e.type==="rule"?Object.setPrototypeOf(e,FT.prototype):e.type==="decl"?Object.setPrototypeOf(e,xB.prototype):e.type==="comment"?Object.setPrototypeOf(e,_B.prototype):e.type==="root"&&Object.setPrototypeOf(e,AB.prototype),e[EB]=!0,e.nodes&&e.nodes.forEach(t=>{Ws.rebuild(t)})};let yxe=Rl,MB,PB,sh=class extends yxe{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new MB(new PB,this,t).stringify()}};sh.registerLazyResult=e=>{MB=e};sh.registerProcessor=e=>{PB=e};var zT=sh;sh.default=sh;let LI=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var NB=LI;LI.default=LI;let bxe=NB,UI=class{constructor(t,n,r){this.processor=t,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new bxe(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};var jT=UI;UI.default=UI;const Qx=39,a6=34,Qm=92,l6=47,Jm=10,rf=32,Xm=12,eg=9,tg=13,Sxe=91,Cxe=93,wxe=40,Exe=41,xxe=123,_xe=125,Ixe=59,Axe=42,Rxe=58,Txe=64,ng=/[\t\n\f\r "#'()/;[\\\]{}]/g,rg=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Oxe=/.[\r\n"'(/\\]/,c6=/[\da-f]/i;var Mxe=function(t,n={}){let r=t.css.valueOf(),o=n.ignoreErrors,s,a,c,u,f,h,m,g,v,C,b=r.length,E=0,x=[],I=[];function R(){return E}function O(L){throw t.error("Unclosed "+L,E)}function D(){return I.length===0&&E>=b}function N(L){if(I.length)return I.pop();if(E>=b)return;let $=L?L.ignoreUnclosed:!1;switch(s=r.charCodeAt(E),s){case Jm:case rf:case eg:case tg:case Xm:{a=E;do a+=1,s=r.charCodeAt(a);while(s===rf||s===Jm||s===eg||s===tg||s===Xm);C=["space",r.slice(E,a)],E=a-1;break}case Sxe:case Cxe:case xxe:case _xe:case Rxe:case Ixe:case Exe:{let G=String.fromCharCode(s);C=[G,G,E];break}case wxe:{if(g=x.length?x.pop()[1]:"",v=r.charCodeAt(E+1),g==="url"&&v!==Qx&&v!==a6&&v!==rf&&v!==Jm&&v!==eg&&v!==Xm&&v!==tg){a=E;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(o||$){a=E;break}else O("bracket");for(m=a;r.charCodeAt(m-1)===Qm;)m-=1,h=!h}while(h);C=["brackets",r.slice(E,a+1),E,a],E=a}else a=r.indexOf(")",E+1),u=r.slice(E,a+1),a===-1||Oxe.test(u)?C=["(","(",E]:(C=["brackets",u,E,a],E=a);break}case Qx:case a6:{c=s===Qx?"'":'"',a=E;do{if(h=!1,a=r.indexOf(c,a+1),a===-1)if(o||$){a=E+1;break}else O("string");for(m=a;r.charCodeAt(m-1)===Qm;)m-=1,h=!h}while(h);C=["string",r.slice(E,a+1),E,a],E=a;break}case Txe:{ng.lastIndex=E+1,ng.test(r),ng.lastIndex===0?a=r.length-1:a=ng.lastIndex-2,C=["at-word",r.slice(E,a+1),E,a],E=a;break}case Qm:{for(a=E,f=!0;r.charCodeAt(a+1)===Qm;)a+=1,f=!f;if(s=r.charCodeAt(a+1),f&&s!==l6&&s!==rf&&s!==Jm&&s!==eg&&s!==tg&&s!==Xm&&(a+=1,c6.test(r.charAt(a)))){for(;c6.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===rf&&(a+=1)}C=["word",r.slice(E,a+1),E,a],E=a;break}default:{s===l6&&r.charCodeAt(E+1)===Axe?(a=r.indexOf("*/",E+2)+1,a===0&&(o||$?a=r.length:O("comment")),C=["comment",r.slice(E,a+1),E,a],E=a):(rg.lastIndex=E+1,rg.test(r),rg.lastIndex===0?a=r.length-1:a=rg.lastIndex-2,C=["word",r.slice(E,a+1),E,a],x.push(C),E=a);break}}return E++,C}function M(L){I.push(L)}return{back:M,endOfFile:D,nextToken:N,position:R}};let kB=Rl,zv=class extends kB{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};var BT=zv;zv.default=zv;kB.registerAtRule(zv);let DB=Rl,LB,UB,du=class extends DB{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,r){let o=super.normalize(t);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let s of o)s.raws.before=n.raws.before}return o}removeChild(t,n){let r=this.index(t);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t={}){return new LB(new UB,this,t).stringify()}};du.registerLazyResult=e=>{LB=e};du.registerProcessor=e=>{UB=e};var Uh=du;du.default=du;DB.registerRoot(du);let ih={comma(e){return ih.split(e,[","],!0)},space(e){let t=[" ",`
128
- `," "];return ih.split(e,t)},split(e,t,n){let r=[],o="",s=!1,a=0,c=!1,u="",f=!1;for(let h of e)f?f=!1:h==="\\"?f=!0:c?h===u&&(c=!1):h==='"'||h==="'"?(c=!0,u=h):h==="("?a+=1:h===")"?a>0&&(a-=1):a===0&&t.includes(h)&&(s=!0),s?(o!==""&&r.push(o.trim()),o="",s=!1):o+=h;return(n||o!=="")&&r.push(o.trim()),r}};var FB=ih;ih.default=ih;let $B=Rl,Pxe=FB,jv=class extends $B{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Pxe.comma(this.selector)}set selectors(t){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}};var HT=jv;jv.default=jv;$B.registerRule(jv);let Nxe=wb,kxe=Mxe,Dxe=xb,Lxe=BT,Uxe=Uh,u6=HT;const d6={empty:!0,space:!0};function Fxe(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}let $xe=class{constructor(t){this.input=t,this.root=new Uxe,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let n=new Lxe;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let r,o,s,a=!1,c=!1,u=[],f=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?f.push(r==="("?")":"]"):r==="{"&&f.length>0?f.push("}"):r===f[f.length-1]&&f.pop(),f.length===0)if(r===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){c=!0;break}else if(r==="}"){if(u.length>0){for(s=u.length-1,o=u[s];o&&o[0]==="space";)o=u[--s];o&&(n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++)}this.end(t);break}else u.push(t);else u.push(t);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(n.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(n,"params",u),a&&(t=u[u.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),c&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let r=0,o;for(let s=n-1;s>=0&&(o=t[s],!(o[0]!=="space"&&(r+=1,r===2)));s--);throw this.input.error("Missed semicolon",o[0]==="word"?o[3]+1:o[2])}colon(t){let n=0,r,o,s;for(let[a,c]of t.entries()){if(r=c,o=r[0],o==="("&&(n+=1),o===")"&&(n-=1),n===0&&o===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return a}s=r}return!1}comment(t){let n=new Dxe;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let r=t[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let o=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=o[2],n.raws.left=o[1],n.raws.right=o[3]}}createTokenizer(){this.tokenizer=kxe(this.input)}decl(t,n){let r=new Nxe;this.init(r,t[0][2]);let o=t[t.length-1];for(o[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(o[3]||o[2]||Fxe(t)),r.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){let f=t[0][0];if(f===":"||f==="space"||f==="comment")break;r.prop+=t.shift()[1]}r.raws.between="";let s;for(;t.length;)if(s=t.shift(),s[0]===":"){r.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],c;for(;t.length&&(c=t[0][0],!(c!=="space"&&c!=="comment"));)a.push(t.shift());this.precheckMissedSemicolon(t);for(let f=t.length-1;f>=0;f--){if(s=t[f],s[1].toLowerCase()==="!important"){r.important=!0;let h=this.stringFrom(t,f);h=this.spacesFromEnd(t)+h,h!==" !important"&&(r.raws.important=h);break}else if(s[1].toLowerCase()==="important"){let h=t.slice(0),m="";for(let g=f;g>0;g--){let v=h[g][0];if(m.trim().indexOf("!")===0&&v!=="space")break;m=h.pop()[1]+m}m.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=m,t=h)}if(s[0]!=="space"&&s[0]!=="comment")break}t.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(r.raws.between+=a.map(f=>f[1]).join(""),a=[]),this.raw(r,"value",a.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let n=new u6;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}}init(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let n=!1,r=null,o=!1,s=null,a=[],c=t[1].startsWith("--"),u=[],f=t;for(;f;){if(r=f[0],u.push(f),r==="("||r==="[")s||(s=f),a.push(r==="("?")":"]");else if(c&&o&&r==="{")s||(s=f),a.push("}");else if(a.length===0)if(r===";")if(o){this.decl(u,c);return}else break;else if(r==="{"){this.rule(u);return}else if(r==="}"){this.tokenizer.back(u.pop()),n=!0;break}else r===":"&&(o=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(s=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(s),n&&o){if(!c)for(;u.length&&(f=u[u.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,c)}else this.unknownWord(u)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,n,r,o){let s,a,c=r.length,u="",f=!0,h,m;for(let g=0;g<c;g+=1)s=r[g],a=s[0],a==="space"&&g===c-1&&!o?f=!1:a==="comment"?(m=r[g-1]?r[g-1][0]:"empty",h=r[g+1]?r[g+1][0]:"empty",!d6[m]&&!d6[h]?u.slice(-1)===","?f=!1:u+=s[1]:f=!1):u+=s[1];if(!f){let g=r.reduce((v,C)=>v+C[1],"");t.raws[n]={raw:g,value:u}}t[n]=u}rule(t){t.pop();let n=new u6;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let n,r="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],n==="space");)r=t.pop()[1]+r;return r}stringFrom(t,n){let r="";for(let o=n;o<t.length;o++)r+=t[o][1];return t.splice(n,t.length-n),r}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};var zxe=$xe;let jxe=Rl,Bxe=zxe,Hxe=Eb;function Bv(e,t){let n=new Hxe(e,t),r=new Bxe(n);try{r.parse()}catch(o){throw o}return r.root}var qT=Bv;Bv.default=Bv;jxe.registerParse(Bv);let{isClean:zo,my:qxe}=Lh,Vxe=CB,Wxe=Sb,Gxe=Rl,Kxe=zT,f6=jT,Zxe=qT,Yxe=Uh;const Qxe={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Jxe={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Xxe={Once:!0,postcssPlugin:!0,prepare:!0},fu=0;function of(e){return typeof e=="object"&&typeof e.then=="function"}function zB(e){let t=!1,n=Qxe[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,fu,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,fu,n+"Exit"]:[n,n+"Exit"]}function h6(e){let t;return e.type==="document"?t=["Document",fu,"DocumentExit"]:e.type==="root"?t=["Root",fu,"RootExit"]:t=zB(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function FI(e){return e[zo]=!1,e.nodes&&e.nodes.forEach(t=>FI(t)),e}let $I={},hu=class jB{constructor(t,n,r){this.stringified=!1,this.processed=!1;let o;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))o=FI(n);else if(n instanceof jB||n instanceof f6)o=FI(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let s=Zxe;r.syntax&&(s=r.syntax.parse),r.parser&&(s=r.parser),s.parse&&(s=s.parse);try{o=s(n,r)}catch(a){this.processed=!0,this.error=a}o&&!o[qxe]&&Gxe.rebuild(o)}this.result=new f6(t,o,r),this.helpers={...$I,postcss:$I,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let r=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(o){console&&console.error&&console.error(o)}return t}prepareVisitors(){this.listeners={};let t=(n,r,o)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,o])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!Jxe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Xxe[r])if(typeof n[r]=="object")for(let o in n[r])o==="*"?t(n,r,n[r][o]):t(n,r+"-"+o.toLowerCase(),n[r][o]);else typeof n[r]=="function"&&t(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let n=this.plugins[t],r=this.runOnRoot(n);if(of(r))try{await r}catch(o){throw this.handleError(o)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[zo];){t[zo]=!0;let n=[h6(t)];for(;n.length>0;){let r=this.visitTick(n);if(of(r))try{await r}catch(o){let s=n[n.length-1].node;throw this.handleError(o,s)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let o=t.nodes.map(s=>r(s,this.helpers));await Promise.all(o)}else await r(t,this.helpers)}catch(o){throw this.handleError(o)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return of(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=Wxe;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let o=new Vxe(n,this.result.root,this.result.opts).generate();return this.result.css=o[0],this.result.map=o[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let n=this.runOnRoot(t);if(of(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[zo];)t[zo]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return this.async().then(t,n)}toString(){return this.css}visitSync(t,n){for(let[r,o]of t){this.result.lastPlugin=r;let s;try{s=o(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(of(s))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:o}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(o.length>0&&n.visitorIndex<o.length){let[a,c]=o[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===o.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return c(r.toProxy(),this.helpers)}catch(u){throw this.handleError(u,r)}}if(n.iterator!==0){let a=n.iterator,c;for(;c=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!c[zo]){c[zo]=!0,t.push(h6(c));return}n.iterator=0,delete r.indexes[a]}let s=n.events;for(;n.eventIndex<s.length;){let a=s[n.eventIndex];if(n.eventIndex+=1,a===fu){r.nodes&&r.nodes.length&&(r[zo]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[zo]=!0;let n=zB(t);for(let r of n)if(r===fu)t.nodes&&t.each(o=>{o[zo]||this.walkSync(o)});else{let o=this.listeners[r];if(o&&this.visitSync(o,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};hu.registerPostcss=e=>{$I=e};var BB=hu;hu.default=hu;Yxe.registerLazyResult(hu);Kxe.registerLazyResult(hu);let e_e=CB,t_e=Sb,n_e=qT;const r_e=jT;let zI=class{constructor(t,n,r){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=r,this._map=void 0;let o,s=t_e;this.result=new r_e(this._processor,o,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let c=new e_e(s,o,this._opts,n);if(c.isMap()){let[u,f]=c.generate();u&&(this.result.css=u),f&&(this.result.map=f)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,n){return this.async().then(t,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,n=n_e;try{t=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};var o_e=zI;zI.default=zI;let s_e=o_e,i_e=BB,a_e=zT,l_e=Uh,ah=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new s_e(this,t,n):new i_e(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var c_e=ah;ah.default=ah;l_e.registerProcessor(ah);a_e.registerProcessor(ah);let u_e=wb,d_e=gB,f_e=xb,h_e=BT,p_e=Eb,m_e=Uh,g_e=HT;function lh(e,t){if(Array.isArray(e))return e.map(o=>lh(o));let{inputs:n,...r}=e;if(n){t=[];for(let o of n){let s={...o,__proto__:p_e.prototype};s.map&&(s.map={...s.map,__proto__:d_e.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(o=>lh(o,t))),r.source){let{inputId:o,...s}=r.source;r.source=s,o!=null&&(r.source.input=t[o])}if(r.type==="root")return new m_e(r);if(r.type==="decl")return new u_e(r);if(r.type==="rule")return new g_e(r);if(r.type==="comment")return new f_e(r);if(r.type==="atrule")return new h_e(r);throw new Error("Unknown node type: "+e.type)}var v_e=lh;lh.default=lh;let y_e=UT,HB=wb,b_e=BB,S_e=Rl,VT=c_e,C_e=Sb,w_e=v_e,qB=zT,E_e=NB,VB=xb,WB=BT,x_e=jT,__e=Eb,I_e=qT,A_e=FB,GB=HT,KB=Uh,R_e=Cb;function Ot(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new VT(e)}Ot.plugin=function(t,n){let r=!1;function o(...a){console&&console.warn&&!r&&(r=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
129
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`),kv.LANG&&kv.LANG.startsWith("cn")&&console.warn(t+`: 里面 postcss.plugin 被弃用. 迁移指南:
130
- https://www.w3ctech.com/topic/2226`));let c=n(...a);return c.postcssPlugin=t,c.postcssVersion=new VT().version,c}let s;return Object.defineProperty(o,"postcss",{get(){return s||(s=o()),s}}),o.process=function(a,c,u){return Ot([o(u)]).process(a,c)},o};Ot.stringify=C_e;Ot.parse=I_e;Ot.fromJSON=w_e;Ot.list=A_e;Ot.comment=e=>new VB(e);Ot.atRule=e=>new WB(e);Ot.decl=e=>new HB(e);Ot.rule=e=>new GB(e);Ot.root=e=>new KB(e);Ot.document=e=>new qB(e);Ot.CssSyntaxError=y_e;Ot.Declaration=HB;Ot.Container=S_e;Ot.Processor=VT;Ot.Document=qB;Ot.Comment=VB;Ot.Warning=E_e;Ot.AtRule=WB;Ot.Result=x_e;Ot.Input=__e;Ot.Rule=GB;Ot.Root=KB;Ot.Node=R_e;b_e.registerPostcss(Ot);var T_e=Ot;Ot.default=Ot;const en=BEe(T_e);en.stringify;en.fromJSON;en.plugin;en.parse;en.list;en.document;en.comment;en.atRule;en.rule;en.decl;en.root;en.CssSyntaxError;en.Declaration;en.Container;en.Processor;en.Document;en.Comment;en.Warning;en.AtRule;en.Result;en.Input;en.Rule;en.Root;en.Node;var O_e=Object.defineProperty,M_e=(e,t,n)=>t in e?O_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eo=(e,t,n)=>M_e(e,typeof t!="symbol"?t+"":t,n);function P_e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function N_e(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var WT={exports:{}},Wt=String,ZB=function(){return{isColorSupported:!1,reset:Wt,bold:Wt,dim:Wt,italic:Wt,underline:Wt,inverse:Wt,hidden:Wt,strikethrough:Wt,black:Wt,red:Wt,green:Wt,yellow:Wt,blue:Wt,magenta:Wt,cyan:Wt,white:Wt,gray:Wt,bgBlack:Wt,bgRed:Wt,bgGreen:Wt,bgYellow:Wt,bgBlue:Wt,bgMagenta:Wt,bgCyan:Wt,bgWhite:Wt}};WT.exports=ZB();WT.exports.createColors=ZB;var k_e=WT.exports;const D_e={},L_e=Object.freeze(Object.defineProperty({__proto__:null,default:D_e},Symbol.toStringTag,{value:"Module"})),Mo=N_e(L_e);let p6=k_e,m6=Mo,jI=class YB extends Error{constructor(t,n,r,o,s,a){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),o&&(this.source=o),a&&(this.plugin=a),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,YB)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let n=this.source;t==null&&(t=p6.isColorSupported),m6&&t&&(n=m6(n));let r=n.split(/\r?\n/),o=Math.max(this.line-3,0),s=Math.min(this.line+2,r.length),a=String(s).length,c,u;if(t){let{bold:f,gray:h,red:m}=p6.createColors(!0);c=g=>f(m(g)),u=g=>h(g)}else c=u=f=>f;return r.slice(o,s).map((f,h)=>{let m=o+1+h,g=" "+(" "+m).slice(-a)+" | ";if(m===this.line){let v=u(g.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return c(">")+u(g)+f+`
131
- `+v+c("^")}return" "+u(g)+f}).join(`
132
- `)}toString(){let t=this.showSourceCode();return t&&(t=`
133
-
134
- `+t+`
135
- `),this.name+": "+this.message+t}};var GT=jI;jI.default=jI;var Fh={};Fh.isClean=Symbol("isClean");Fh.my=Symbol("my");const g6={after:`
136
- `,beforeClose:`
137
- `,beforeComment:`
138
- `,beforeDecl:`
139
- `,beforeOpen:" ",beforeRule:`
140
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function U_e(e){return e[0].toUpperCase()+e.slice(1)}let BI=class{constructor(t){this.builder=t}atrule(t,n){let r="@"+t.name,o=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?r+=t.raws.afterName:o&&(r+=" "),t.nodes)this.block(t,r+o);else{let s=(t.raws.between||"")+(n?";":"");this.builder(r+o+s,t)}}beforeAfter(t,n){let r;t.type==="decl"?r=this.raw(t,null,"beforeDecl"):t.type==="comment"?r=this.raw(t,null,"beforeComment"):n==="before"?r=this.raw(t,null,"beforeRule"):r=this.raw(t,null,"beforeClose");let o=t.parent,s=0;for(;o&&o.type!=="root";)s+=1,o=o.parent;if(r.includes(`
141
- `)){let a=this.raw(t,null,"indent");if(a.length)for(let c=0;c<s;c++)r+=a}return r}block(t,n){let r=this.raw(t,"between","beforeOpen");this.builder(n+r+"{",t,"start");let o;t.nodes&&t.nodes.length?(this.body(t),o=this.raw(t,"after")):o=this.raw(t,"after","emptyBody"),o&&this.builder(o),this.builder("}",t,"end")}body(t){let n=t.nodes.length-1;for(;n>0&&t.nodes[n].type==="comment";)n-=1;let r=this.raw(t,"semicolon");for(let o=0;o<t.nodes.length;o++){let s=t.nodes[o],a=this.raw(s,"before");a&&this.builder(a),this.stringify(s,n!==o||r)}}comment(t){let n=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+n+t.text+r+"*/",t)}decl(t,n){let r=this.raw(t,"between","colon"),o=t.prop+r+this.rawValue(t,"value");t.important&&(o+=t.raws.important||" !important"),n&&(o+=";"),this.builder(o,t)}document(t){this.body(t)}raw(t,n,r){let o;if(r||(r=n),n&&(o=t.raws[n],typeof o<"u"))return o;let s=t.parent;if(r==="before"&&(!s||s.type==="root"&&s.first===t||s&&s.type==="document"))return"";if(!s)return g6[r];let a=t.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]<"u")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(t,r);{let c="raw"+U_e(r);this[c]?o=this[c](a,t):a.walk(u=>{if(o=u.raws[n],typeof o<"u")return!1})}return typeof o>"u"&&(o=g6[r]),a.rawCache[r]=o,o}rawBeforeClose(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return n=r.raws.after,n.includes(`
142
- `)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(t,n){let r;return t.walkComments(o=>{if(typeof o.raws.before<"u")return r=o.raws.before,r.includes(`
143
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,n){let r;return t.walkDecls(o=>{if(typeof o.raws.before<"u")return r=o.raws.before,r.includes(`
144
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){let n;return t.walk(r=>{if(r.type!=="decl"&&(n=r.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(t){let n;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
145
- `)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(t){let n;return t.walkDecls(r=>{if(typeof r.raws.between<"u")return n=r.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length===0&&(n=r.raws.after,typeof n<"u"))return!1}),n}rawIndent(t){if(t.raws.indent)return t.raws.indent;let n;return t.walk(r=>{let o=r.parent;if(o&&o!==t&&o.parent&&o.parent===t&&typeof r.raws.before<"u"){let s=r.raws.before.split(`
146
- `);return n=s[s.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(t,n){let r=t[n],o=t.raws[n];return o&&o.value===r?o.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)}};var QB=BI;BI.default=BI;let F_e=QB;function HI(e,t){new F_e(t).stringify(e)}var _b=HI;HI.default=HI;let{isClean:og,my:$_e}=Fh,z_e=GT,j_e=QB,B_e=_b;function qI(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r==="proxyCache")continue;let o=e[r],s=typeof o;r==="parent"&&s==="object"?t&&(n[r]=t):r==="source"?n[r]=o:Array.isArray(o)?n[r]=o.map(a=>qI(a,n)):(s==="object"&&o!==null&&(o=qI(o)),n[r]=o)}return n}let VI=class{constructor(t={}){this.raws={},this[og]=!1,this[$_e]=!0;for(let n in t)if(n==="nodes"){this.nodes=[];for(let r of t[n])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[n]=t[n]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let n=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let n in t)this[n]=t[n];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let n=qI(this);for(let r in t)n[r]=t[r];return n}cloneAfter(t={}){let n=this.clone(t);return this.parent.insertAfter(this,n),n}cloneBefore(t={}){let n=this.clone(t);return this.parent.insertBefore(this,n),n}error(t,n={}){if(this.source){let{end:r,start:o}=this.rangeBy(n);return this.source.input.error(t,{column:o.column,line:o.line},{column:r.column,line:r.line},n)}return new z_e(t)}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:n==="root"?()=>t.root().toProxy():t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&t.markDirty()),!0}}}markDirty(){if(this[og]){this[og]=!1;let t=this;for(;t=t.parent;)t[og]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,n){let r=this.source.start;if(t.index)r=this.positionInside(t.index,n);else if(t.word){n=this.toString();let o=n.indexOf(t.word);o!==-1&&(r=this.positionInside(o,n))}return r}positionInside(t,n){let r=n||this.toString(),o=this.source.start.column,s=this.source.start.line;for(let a=0;a<t;a++)r[a]===`
147
- `?(o=1,s+=1):o+=1;return{column:o,line:s}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let n={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(t.word){let o=this.toString(),s=o.indexOf(t.word);s!==-1&&(n=this.positionInside(s,o),r=this.positionInside(s+t.word.length,o))}else t.start?n={column:t.start.column,line:t.start.line}:t.index&&(n=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<n.line||r.line===n.line&&r.column<=n.column)&&(r={column:n.column+1,line:n.line}),{end:r,start:n}}raw(t,n){return new j_e().raw(this,t,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let n=this,r=!1;for(let o of t)o===this?r=!0:r?(this.parent.insertAfter(n,o),n=o):this.parent.insertBefore(n,o);r||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,n){let r={},o=n==null;n=n||new Map;let s=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let c=this[a];if(Array.isArray(c))r[a]=c.map(u=>typeof u=="object"&&u.toJSON?u.toJSON(null,n):u);else if(typeof c=="object"&&c.toJSON)r[a]=c.toJSON(null,n);else if(a==="source"){let u=n.get(c.input);u==null&&(u=s,n.set(c.input,s),s++),r[a]={end:c.end,inputId:u,start:c.start}}else r[a]=c}return o&&(r.inputs=[...n.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=B_e){t.stringify&&(t=t.stringify);let n="";return t(this,r=>{n+=r}),n}warn(t,n,r){let o={node:this};for(let s in r)o[s]=r[s];return t.warn(n,o)}get proxyOf(){return this}};var Ib=VI;VI.default=VI;let H_e=Ib,WI=class extends H_e{constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Ab=WI;WI.default=WI;let q_e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",V_e=(e=21)=>{let t="",n=e;for(;n--;)t+=q_e[Math.random()*64|0];return t};var W_e={nanoid:V_e};let{SourceMapConsumer:v6,SourceMapGenerator:y6}=Mo,{existsSync:G_e,readFileSync:K_e}=Mo,{dirname:Jx,join:Z_e}=Mo;function Y_e(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let GI=class{constructor(t,n){if(n.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let r=n.map?n.map.prev:void 0,o=this.loadMap(n.from,r);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=Jx(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new v6(this.text)),this.consumerCache}decodeInline(t){let n=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,o=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(o.test(t)||s.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(n.test(t)||r.test(t))return Y_e(t.substr(RegExp.lastMatch.length));let a=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let n=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let r=t.lastIndexOf(n.pop()),o=t.indexOf("*/",r);r>-1&&o>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,o)))}loadFile(t){if(this.root=Jx(t),G_e(t))return this.mapFile=t,K_e(t,"utf-8").toString().trim()}loadMap(t,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let r=n(t);if(r){let o=this.loadFile(r);if(!o)throw new Error("Unable to load previous source map: "+r.toString());return o}}else{if(n instanceof v6)return y6.fromSourceMap(n).toString();if(n instanceof y6)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return t&&(r=Z_e(Jx(t),r)),this.loadFile(r)}}}startWith(t,n){return t?t.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var JB=GI;GI.default=GI;let{SourceMapConsumer:Q_e,SourceMapGenerator:J_e}=Mo,{fileURLToPath:b6,pathToFileURL:sg}=Mo,{isAbsolute:KI,resolve:ZI}=Mo,{nanoid:X_e}=W_e,Xx=Mo,S6=GT,eIe=JB,e_=Symbol("fromOffsetCache"),tIe=!!(Q_e&&J_e),C6=!!(ZI&&KI),Hv=class{constructor(t,n={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!C6||/^\w+:\/\//.test(n.from)||KI(n.from)?this.file=n.from:this.file=ZI(n.from)),C6&&tIe){let r=new eIe(this.css,n);if(r.text){this.map=r;let o=r.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+X_e(6)+">"),this.map&&(this.map.file=this.from)}error(t,n,r,o={}){let s,a,c;if(n&&typeof n=="object"){let f=n,h=r;if(typeof f.offset=="number"){let m=this.fromOffset(f.offset);n=m.line,r=m.col}else n=f.line,r=f.column;if(typeof h.offset=="number"){let m=this.fromOffset(h.offset);a=m.line,c=m.col}else a=h.line,c=h.column}else if(!r){let f=this.fromOffset(n);n=f.line,r=f.col}let u=this.origin(n,r,a,c);return u?s=new S6(t,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,o.plugin):s=new S6(t,a===void 0?n:{column:r,line:n},a===void 0?r:{column:c,line:a},this.css,this.file,o.plugin),s.input={column:r,endColumn:c,endLine:a,line:n,source:this.css},this.file&&(sg&&(s.input.url=sg(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let n,r;if(this[e_])r=this[e_];else{let s=this.css.split(`
148
- `);r=new Array(s.length);let a=0;for(let c=0,u=s.length;c<u;c++)r[c]=a,a+=s[c].length+1;this[e_]=r}n=r[r.length-1];let o=0;if(t>=n)o=r.length-1;else{let s=r.length-2,a;for(;o<s;)if(a=o+(s-o>>1),t<r[a])s=a-1;else if(t>=r[a+1])o=a+1;else{o=a;break}}return{col:t-r[o]+1,line:o+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:ZI(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,n,r,o){if(!this.map)return!1;let s=this.map.consumer(),a=s.originalPositionFor({column:n,line:t});if(!a.source)return!1;let c;typeof r=="number"&&(c=s.originalPositionFor({column:o,line:r}));let u;KI(a.source)?u=sg(a.source):u=new URL(a.source,this.map.consumer().sourceRoot||sg(this.map.mapFile));let f={column:a.column,endColumn:c&&c.column,endLine:c&&c.line,line:a.line,url:u.toString()};if(u.protocol==="file:")if(b6)f.file=b6(u);else throw new Error("file: protocol is not available in this PostCSS build");let h=s.sourceContentFor(a.source);return h&&(f.source=h),f}toJSON(){let t={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(t[n]=this[n]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};var Rb=Hv;Hv.default=Hv;Xx&&Xx.registerInput&&Xx.registerInput(Hv);let{SourceMapConsumer:XB,SourceMapGenerator:Yg}=Mo,{dirname:Qg,relative:eH,resolve:tH,sep:nH}=Mo,{pathToFileURL:w6}=Mo,nIe=Rb,rIe=!!(XB&&Yg),oIe=!!(Qg&&tH&&eH&&nH),sIe=class{constructor(t,n,r,o){this.stringify=t,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let n=`
149
- `;this.css.includes(`\r
150
- `)&&(n=`\r
151
- `),this.css+=n+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let n=this.toUrl(this.path(t.file)),r=t.root||Qg(t.file),o;this.mapOpts.sourcesContent===!1?(o=new XB(t.text),o.sourcesContent&&(o.sourcesContent=null)):o=t.consumer(),this.map.applySourceMap(o,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let n=this.root.nodes.length-1;n>=0;n--)t=this.root.nodes[n],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),oIe&&rIe&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,n=>{t+=n}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Yg.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Yg({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Yg({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,n=1,r="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,a;this.stringify(this.root,(c,u,f)=>{if(this.css+=c,u&&f!=="end"&&(o.generated.line=t,o.generated.column=n-1,u.source&&u.source.start?(o.source=this.sourcePath(u),o.original.line=u.source.start.line,o.original.column=u.source.start.column-1,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,this.map.addMapping(o))),s=c.match(/\n/g),s?(t+=s.length,a=c.lastIndexOf(`
152
- `),n=c.length-a):n+=c.length,u&&f!=="start"){let h=u.parent||{raws:{}};(!(u.type==="decl"||u.type==="atrule"&&!u.nodes)||u!==h.last||h.raws.semicolon)&&(u.source&&u.source.end?(o.source=this.sourcePath(u),o.original.line=u.source.end.line,o.original.column=u.source.end.column-1,o.generated.line=t,o.generated.column=n-2,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,o.generated.line=t,o.generated.column=n-1,this.map.addMapping(o)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let n=this.memoizedPaths.get(t);if(n)return n;let r=this.opts.to?Qg(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Qg(tH(r,this.mapOpts.annotation)));let o=eH(r,t);return this.memoizedPaths.set(t,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let n=t.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let t=new nIe(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!t[r]){t[r]=!0;let o=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(o,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let n=this.memoizedFileURLs.get(t);if(n)return n;if(w6){let r=w6(t).toString();return this.memoizedFileURLs.set(t,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let n=this.memoizedURLs.get(t);if(n)return n;nH==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};var rH=sIe;let iIe=Ib,YI=class extends iIe{constructor(t){super(t),this.type="comment"}};var Tb=YI;YI.default=YI;let{isClean:oH,my:sH}=Fh,iH=Ab,aH=Tb,aIe=Ib,lH,KT,ZT,cH;function uH(e){return e.map(t=>(t.nodes&&(t.nodes=uH(t.nodes)),delete t.source,t))}function dH(e){if(e[oH]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)dH(t)}let Gs=class fH extends aIe{append(...t){for(let n of t){let r=this.normalize(n,this.last);for(let o of r)this.proxyOf.nodes.push(o)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let n of this.nodes)n.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,o;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],o=t(this.proxyOf.nodes[r],r),o!==!1);)this.indexes[n]+=1;return delete this.indexes[n],o}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:t[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>t[n](...r.map(o=>typeof o=="function"?(s,a)=>o(s.toProxy(),a):o)):n==="every"||n==="some"?r=>t[n]((o,...s)=>r(o.toProxy(),...s)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let r=this.index(t),o=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let a of o)this.proxyOf.nodes.splice(r+1,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<s&&(this.indexes[a]=s+o.length);return this.markDirty(),this}insertBefore(t,n){let r=this.index(t),o=r===0?"prepend":!1,s=this.normalize(n,this.proxyOf.nodes[r],o).reverse();r=this.index(t);for(let c of s)this.proxyOf.nodes.splice(r,0,c);let a;for(let c in this.indexes)a=this.indexes[c],r<=a&&(this.indexes[c]=a+s.length);return this.markDirty(),this}normalize(t,n){if(typeof t=="string")t=uH(lH(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let o of t)o.parent&&o.parent.removeChild(o,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let o of t)o.parent&&o.parent.removeChild(o,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new iH(t)]}else if(t.selector)t=[new KT(t)];else if(t.name)t=[new ZT(t)];else if(t.text)t=[new aH(t)];else throw new Error("Unknown node type in node creation");return t.map(o=>(o[sH]||fH.rebuild(o),o=o.proxyOf,o.parent&&o.parent.removeChild(o),o[oH]&&dH(o),typeof o.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(o.raws.before=n.raws.before.replace(/\S/g,"")),o.parent=this.proxyOf,o))}prepend(...t){t=t.reverse();for(let n of t){let r=this.normalize(n,this.first,"prepend").reverse();for(let o of r)this.proxyOf.nodes.unshift(o);for(let o in this.indexes)this.indexes[o]=this.indexes[o]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=t&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(t,n,r){return r||(r=n,n={}),this.walkDecls(o=>{n.props&&!n.props.includes(o.prop)||n.fast&&!o.value.includes(n.fast)||(o.value=o.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((n,r)=>{let o;try{o=t(n,r)}catch(s){throw n.addToError(s)}return o!==!1&&n.walk&&(o=n.walk(t)),o})}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((r,o)=>{if(r.type==="atrule"&&t.test(r.name))return n(r,o)}):this.walk((r,o)=>{if(r.type==="atrule"&&r.name===t)return n(r,o)}):(n=t,this.walk((r,o)=>{if(r.type==="atrule")return n(r,o)}))}walkComments(t){return this.walk((n,r)=>{if(n.type==="comment")return t(n,r)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((r,o)=>{if(r.type==="decl"&&t.test(r.prop))return n(r,o)}):this.walk((r,o)=>{if(r.type==="decl"&&r.prop===t)return n(r,o)}):(n=t,this.walk((r,o)=>{if(r.type==="decl")return n(r,o)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((r,o)=>{if(r.type==="rule"&&t.test(r.selector))return n(r,o)}):this.walk((r,o)=>{if(r.type==="rule"&&r.selector===t)return n(r,o)}):(n=t,this.walk((r,o)=>{if(r.type==="rule")return n(r,o)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Gs.registerParse=e=>{lH=e};Gs.registerRule=e=>{KT=e};Gs.registerAtRule=e=>{ZT=e};Gs.registerRoot=e=>{cH=e};var Tl=Gs;Gs.default=Gs;Gs.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,ZT.prototype):e.type==="rule"?Object.setPrototypeOf(e,KT.prototype):e.type==="decl"?Object.setPrototypeOf(e,iH.prototype):e.type==="comment"?Object.setPrototypeOf(e,aH.prototype):e.type==="root"&&Object.setPrototypeOf(e,cH.prototype),e[sH]=!0,e.nodes&&e.nodes.forEach(t=>{Gs.rebuild(t)})};let lIe=Tl,hH,pH,ch=class extends lIe{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new hH(new pH,this,t).stringify()}};ch.registerLazyResult=e=>{hH=e};ch.registerProcessor=e=>{pH=e};var YT=ch;ch.default=ch;let QI=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var mH=QI;QI.default=QI;let cIe=mH,JI=class{constructor(t,n,r){this.processor=t,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new cIe(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};var QT=JI;JI.default=JI;const t_=39,E6=34,ig=92,x6=47,ag=10,sf=32,lg=12,cg=9,ug=13,uIe=91,dIe=93,fIe=40,hIe=41,pIe=123,mIe=125,gIe=59,vIe=42,yIe=58,bIe=64,dg=/[\t\n\f\r "#'()/;[\\\]{}]/g,fg=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,SIe=/.[\r\n"'(/\\]/,_6=/[\da-f]/i;var CIe=function(t,n={}){let r=t.css.valueOf(),o=n.ignoreErrors,s,a,c,u,f,h,m,g,v,C,b=r.length,E=0,x=[],I=[];function R(){return E}function O(L){throw t.error("Unclosed "+L,E)}function D(){return I.length===0&&E>=b}function N(L){if(I.length)return I.pop();if(E>=b)return;let $=L?L.ignoreUnclosed:!1;switch(s=r.charCodeAt(E),s){case ag:case sf:case cg:case ug:case lg:{a=E;do a+=1,s=r.charCodeAt(a);while(s===sf||s===ag||s===cg||s===ug||s===lg);C=["space",r.slice(E,a)],E=a-1;break}case uIe:case dIe:case pIe:case mIe:case yIe:case gIe:case hIe:{let G=String.fromCharCode(s);C=[G,G,E];break}case fIe:{if(g=x.length?x.pop()[1]:"",v=r.charCodeAt(E+1),g==="url"&&v!==t_&&v!==E6&&v!==sf&&v!==ag&&v!==cg&&v!==lg&&v!==ug){a=E;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(o||$){a=E;break}else O("bracket");for(m=a;r.charCodeAt(m-1)===ig;)m-=1,h=!h}while(h);C=["brackets",r.slice(E,a+1),E,a],E=a}else a=r.indexOf(")",E+1),u=r.slice(E,a+1),a===-1||SIe.test(u)?C=["(","(",E]:(C=["brackets",u,E,a],E=a);break}case t_:case E6:{c=s===t_?"'":'"',a=E;do{if(h=!1,a=r.indexOf(c,a+1),a===-1)if(o||$){a=E+1;break}else O("string");for(m=a;r.charCodeAt(m-1)===ig;)m-=1,h=!h}while(h);C=["string",r.slice(E,a+1),E,a],E=a;break}case bIe:{dg.lastIndex=E+1,dg.test(r),dg.lastIndex===0?a=r.length-1:a=dg.lastIndex-2,C=["at-word",r.slice(E,a+1),E,a],E=a;break}case ig:{for(a=E,f=!0;r.charCodeAt(a+1)===ig;)a+=1,f=!f;if(s=r.charCodeAt(a+1),f&&s!==x6&&s!==sf&&s!==ag&&s!==cg&&s!==ug&&s!==lg&&(a+=1,_6.test(r.charAt(a)))){for(;_6.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===sf&&(a+=1)}C=["word",r.slice(E,a+1),E,a],E=a;break}default:{s===x6&&r.charCodeAt(E+1)===vIe?(a=r.indexOf("*/",E+2)+1,a===0&&(o||$?a=r.length:O("comment")),C=["comment",r.slice(E,a+1),E,a],E=a):(fg.lastIndex=E+1,fg.test(r),fg.lastIndex===0?a=r.length-1:a=fg.lastIndex-2,C=["word",r.slice(E,a+1),E,a],x.push(C),E=a);break}}return E++,C}function M(L){I.push(L)}return{back:M,endOfFile:D,nextToken:N,position:R}};let gH=Tl,qv=class extends gH{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};var JT=qv;qv.default=qv;gH.registerAtRule(qv);let vH=Tl,yH,bH,pu=class extends vH{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,r){let o=super.normalize(t);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let s of o)s.raws.before=n.raws.before}return o}removeChild(t,n){let r=this.index(t);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t={}){return new yH(new bH,this,t).stringify()}};pu.registerLazyResult=e=>{yH=e};pu.registerProcessor=e=>{bH=e};var $h=pu;pu.default=pu;vH.registerRoot(pu);let uh={comma(e){return uh.split(e,[","],!0)},space(e){let t=[" ",`
153
- `," "];return uh.split(e,t)},split(e,t,n){let r=[],o="",s=!1,a=0,c=!1,u="",f=!1;for(let h of e)f?f=!1:h==="\\"?f=!0:c?h===u&&(c=!1):h==='"'||h==="'"?(c=!0,u=h):h==="("?a+=1:h===")"?a>0&&(a-=1):a===0&&t.includes(h)&&(s=!0),s?(o!==""&&r.push(o.trim()),o="",s=!1):o+=h;return(n||o!=="")&&r.push(o.trim()),r}};var SH=uh;uh.default=uh;let CH=Tl,wIe=SH,Vv=class extends CH{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return wIe.comma(this.selector)}set selectors(t){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}};var XT=Vv;Vv.default=Vv;CH.registerRule(Vv);let EIe=Ab,xIe=CIe,_Ie=Tb,IIe=JT,AIe=$h,I6=XT;const A6={empty:!0,space:!0};function RIe(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}let TIe=class{constructor(t){this.input=t,this.root=new AIe,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let n=new IIe;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let r,o,s,a=!1,c=!1,u=[],f=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?f.push(r==="("?")":"]"):r==="{"&&f.length>0?f.push("}"):r===f[f.length-1]&&f.pop(),f.length===0)if(r===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){c=!0;break}else if(r==="}"){if(u.length>0){for(s=u.length-1,o=u[s];o&&o[0]==="space";)o=u[--s];o&&(n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++)}this.end(t);break}else u.push(t);else u.push(t);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(n.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(n,"params",u),a&&(t=u[u.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),c&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let r=0,o;for(let s=n-1;s>=0&&(o=t[s],!(o[0]!=="space"&&(r+=1,r===2)));s--);throw this.input.error("Missed semicolon",o[0]==="word"?o[3]+1:o[2])}colon(t){let n=0,r,o,s;for(let[a,c]of t.entries()){if(r=c,o=r[0],o==="("&&(n+=1),o===")"&&(n-=1),n===0&&o===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return a}s=r}return!1}comment(t){let n=new _Ie;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let r=t[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let o=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=o[2],n.raws.left=o[1],n.raws.right=o[3]}}createTokenizer(){this.tokenizer=xIe(this.input)}decl(t,n){let r=new EIe;this.init(r,t[0][2]);let o=t[t.length-1];for(o[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(o[3]||o[2]||RIe(t)),r.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){let f=t[0][0];if(f===":"||f==="space"||f==="comment")break;r.prop+=t.shift()[1]}r.raws.between="";let s;for(;t.length;)if(s=t.shift(),s[0]===":"){r.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],c;for(;t.length&&(c=t[0][0],!(c!=="space"&&c!=="comment"));)a.push(t.shift());this.precheckMissedSemicolon(t);for(let f=t.length-1;f>=0;f--){if(s=t[f],s[1].toLowerCase()==="!important"){r.important=!0;let h=this.stringFrom(t,f);h=this.spacesFromEnd(t)+h,h!==" !important"&&(r.raws.important=h);break}else if(s[1].toLowerCase()==="important"){let h=t.slice(0),m="";for(let g=f;g>0;g--){let v=h[g][0];if(m.trim().indexOf("!")===0&&v!=="space")break;m=h.pop()[1]+m}m.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=m,t=h)}if(s[0]!=="space"&&s[0]!=="comment")break}t.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(r.raws.between+=a.map(f=>f[1]).join(""),a=[]),this.raw(r,"value",a.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let n=new I6;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}}init(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let n=!1,r=null,o=!1,s=null,a=[],c=t[1].startsWith("--"),u=[],f=t;for(;f;){if(r=f[0],u.push(f),r==="("||r==="[")s||(s=f),a.push(r==="("?")":"]");else if(c&&o&&r==="{")s||(s=f),a.push("}");else if(a.length===0)if(r===";")if(o){this.decl(u,c);return}else break;else if(r==="{"){this.rule(u);return}else if(r==="}"){this.tokenizer.back(u.pop()),n=!0;break}else r===":"&&(o=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(s=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(s),n&&o){if(!c)for(;u.length&&(f=u[u.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,c)}else this.unknownWord(u)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,n,r,o){let s,a,c=r.length,u="",f=!0,h,m;for(let g=0;g<c;g+=1)s=r[g],a=s[0],a==="space"&&g===c-1&&!o?f=!1:a==="comment"?(m=r[g-1]?r[g-1][0]:"empty",h=r[g+1]?r[g+1][0]:"empty",!A6[m]&&!A6[h]?u.slice(-1)===","?f=!1:u+=s[1]:f=!1):u+=s[1];if(!f){let g=r.reduce((v,C)=>v+C[1],"");t.raws[n]={raw:g,value:u}}t[n]=u}rule(t){t.pop();let n=new I6;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let n,r="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],n==="space");)r=t.pop()[1]+r;return r}stringFrom(t,n){let r="";for(let o=n;o<t.length;o++)r+=t[o][1];return t.splice(n,t.length-n),r}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};var OIe=TIe;let MIe=Tl,PIe=OIe,NIe=Rb;function Wv(e,t){let n=new NIe(e,t),r=new PIe(n);try{r.parse()}catch(o){throw o}return r.root}var e2=Wv;Wv.default=Wv;MIe.registerParse(Wv);let{isClean:jo,my:kIe}=Fh,DIe=rH,LIe=_b,UIe=Tl,FIe=YT,R6=QT,$Ie=e2,zIe=$h;const jIe={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},BIe={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},HIe={Once:!0,postcssPlugin:!0,prepare:!0},mu=0;function af(e){return typeof e=="object"&&typeof e.then=="function"}function wH(e){let t=!1,n=jIe[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,mu,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,mu,n+"Exit"]:[n,n+"Exit"]}function T6(e){let t;return e.type==="document"?t=["Document",mu,"DocumentExit"]:e.type==="root"?t=["Root",mu,"RootExit"]:t=wH(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function XI(e){return e[jo]=!1,e.nodes&&e.nodes.forEach(t=>XI(t)),e}let eA={},gu=class EH{constructor(t,n,r){this.stringified=!1,this.processed=!1;let o;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))o=XI(n);else if(n instanceof EH||n instanceof R6)o=XI(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let s=$Ie;r.syntax&&(s=r.syntax.parse),r.parser&&(s=r.parser),s.parse&&(s=s.parse);try{o=s(n,r)}catch(a){this.processed=!0,this.error=a}o&&!o[kIe]&&UIe.rebuild(o)}this.result=new R6(t,o,r),this.helpers={...eA,postcss:eA,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let r=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(o){console&&console.error&&console.error(o)}return t}prepareVisitors(){this.listeners={};let t=(n,r,o)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,o])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!BIe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!HIe[r])if(typeof n[r]=="object")for(let o in n[r])o==="*"?t(n,r,n[r][o]):t(n,r+"-"+o.toLowerCase(),n[r][o]);else typeof n[r]=="function"&&t(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let n=this.plugins[t],r=this.runOnRoot(n);if(af(r))try{await r}catch(o){throw this.handleError(o)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[jo];){t[jo]=!0;let n=[T6(t)];for(;n.length>0;){let r=this.visitTick(n);if(af(r))try{await r}catch(o){let s=n[n.length-1].node;throw this.handleError(o,s)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let o=t.nodes.map(s=>r(s,this.helpers));await Promise.all(o)}else await r(t,this.helpers)}catch(o){throw this.handleError(o)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return af(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=LIe;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let o=new DIe(n,this.result.root,this.result.opts).generate();return this.result.css=o[0],this.result.map=o[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let n=this.runOnRoot(t);if(af(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[jo];)t[jo]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return this.async().then(t,n)}toString(){return this.css}visitSync(t,n){for(let[r,o]of t){this.result.lastPlugin=r;let s;try{s=o(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(af(s))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:o}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(o.length>0&&n.visitorIndex<o.length){let[a,c]=o[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===o.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return c(r.toProxy(),this.helpers)}catch(u){throw this.handleError(u,r)}}if(n.iterator!==0){let a=n.iterator,c;for(;c=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!c[jo]){c[jo]=!0,t.push(T6(c));return}n.iterator=0,delete r.indexes[a]}let s=n.events;for(;n.eventIndex<s.length;){let a=s[n.eventIndex];if(n.eventIndex+=1,a===mu){r.nodes&&r.nodes.length&&(r[jo]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[jo]=!0;let n=wH(t);for(let r of n)if(r===mu)t.nodes&&t.each(o=>{o[jo]||this.walkSync(o)});else{let o=this.listeners[r];if(o&&this.visitSync(o,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};gu.registerPostcss=e=>{eA=e};var xH=gu;gu.default=gu;zIe.registerLazyResult(gu);FIe.registerLazyResult(gu);let qIe=rH,VIe=_b,WIe=e2;const GIe=QT;let tA=class{constructor(t,n,r){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=r,this._map=void 0;let o,s=VIe;this.result=new GIe(this._processor,o,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let c=new qIe(s,o,this._opts,n);if(c.isMap()){let[u,f]=c.generate();u&&(this.result.css=u),f&&(this.result.map=f)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,n){return this.async().then(t,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,n=WIe;try{t=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};var KIe=tA;tA.default=tA;let ZIe=KIe,YIe=xH,QIe=YT,JIe=$h,dh=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new ZIe(this,t,n):new YIe(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var XIe=dh;dh.default=dh;JIe.registerProcessor(dh);QIe.registerProcessor(dh);let eAe=Ab,tAe=JB,nAe=Tb,rAe=JT,oAe=Rb,sAe=$h,iAe=XT;function fh(e,t){if(Array.isArray(e))return e.map(o=>fh(o));let{inputs:n,...r}=e;if(n){t=[];for(let o of n){let s={...o,__proto__:oAe.prototype};s.map&&(s.map={...s.map,__proto__:tAe.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(o=>fh(o,t))),r.source){let{inputId:o,...s}=r.source;r.source=s,o!=null&&(r.source.input=t[o])}if(r.type==="root")return new sAe(r);if(r.type==="decl")return new eAe(r);if(r.type==="rule")return new iAe(r);if(r.type==="comment")return new nAe(r);if(r.type==="atrule")return new rAe(r);throw new Error("Unknown node type: "+e.type)}var aAe=fh;fh.default=fh;let lAe=GT,_H=Ab,cAe=xH,uAe=Tl,t2=XIe,dAe=_b,fAe=aAe,IH=YT,hAe=mH,AH=Tb,RH=JT,pAe=QT,mAe=Rb,gAe=e2,vAe=SH,TH=XT,OH=$h,yAe=Ib;function Mt(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new t2(e)}Mt.plugin=function(t,n){let r=!1;function o(...a){console&&console.warn&&!r&&(r=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
154
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`),kv.LANG&&kv.LANG.startsWith("cn")&&console.warn(t+`: 里面 postcss.plugin 被弃用. 迁移指南:
155
- https://www.w3ctech.com/topic/2226`));let c=n(...a);return c.postcssPlugin=t,c.postcssVersion=new t2().version,c}let s;return Object.defineProperty(o,"postcss",{get(){return s||(s=o()),s}}),o.process=function(a,c,u){return Mt([o(u)]).process(a,c)},o};Mt.stringify=dAe;Mt.parse=gAe;Mt.fromJSON=fAe;Mt.list=vAe;Mt.comment=e=>new AH(e);Mt.atRule=e=>new RH(e);Mt.decl=e=>new _H(e);Mt.rule=e=>new TH(e);Mt.root=e=>new OH(e);Mt.document=e=>new IH(e);Mt.CssSyntaxError=lAe;Mt.Declaration=_H;Mt.Container=uAe;Mt.Processor=t2;Mt.Document=IH;Mt.Comment=AH;Mt.Warning=hAe;Mt.AtRule=RH;Mt.Result=pAe;Mt.Input=mAe;Mt.Rule=TH;Mt.Root=OH;Mt.Node=yAe;cAe.registerPostcss(Mt);var bAe=Mt;Mt.default=Mt;const tn=P_e(bAe);tn.stringify;tn.fromJSON;tn.plugin;tn.parse;tn.list;tn.document;tn.comment;tn.atRule;tn.rule;tn.decl;tn.root;tn.CssSyntaxError;tn.Declaration;tn.Container;tn.Processor;tn.Document;tn.Comment;tn.Warning;tn.AtRule;tn.Result;tn.Input;tn.Rule;tn.Root;tn.Node;class n2{constructor(...t){eo(this,"parentElement",null),eo(this,"parentNode",null),eo(this,"ownerDocument"),eo(this,"firstChild",null),eo(this,"lastChild",null),eo(this,"previousSibling",null),eo(this,"nextSibling",null),eo(this,"ELEMENT_NODE",1),eo(this,"TEXT_NODE",3),eo(this,"nodeType"),eo(this,"nodeName"),eo(this,"RRNodeType")}get childNodes(){const t=[];let n=this.firstChild;for(;n;)t.push(n),n=n.nextSibling;return t}contains(t){if(t instanceof n2){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const O6={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},M6={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},hg={},SAe=()=>!!globalThis.Zone;function r2(e){if(hg[e])return hg[e];const t=globalThis[e],n=t.prototype,r=e in O6?O6[e]:void 0,o=!!(r&&r.every(c=>{var u,f;return!!((f=(u=Object.getOwnPropertyDescriptor(n,c))==null?void 0:u.get)!=null&&f.toString().includes("[native code]"))})),s=e in M6?M6[e]:void 0,a=!!(s&&s.every(c=>{var u;return typeof n[c]=="function"&&((u=n[c])==null?void 0:u.toString().includes("[native code]"))}));if(o&&a&&!SAe())return hg[e]=t.prototype,t.prototype;try{const c=document.createElement("iframe");document.body.appendChild(c);const u=c.contentWindow;if(!u)return t.prototype;const f=u[e].prototype;return document.body.removeChild(c),f?hg[e]=f:n}catch{return n}}const n_={};function ei(e,t,n){var r;const o=`${e}.${String(n)}`;if(n_[o])return n_[o].call(t);const s=r2(e),a=(r=Object.getOwnPropertyDescriptor(s,n))==null?void 0:r.get;return a?(n_[o]=a,a.call(t)):t[n]}const r_={};function MH(e,t,n){const r=`${e}.${String(n)}`;if(r_[r])return r_[r].bind(t);const s=r2(e)[n];return typeof s!="function"?t[n]:(r_[r]=s,s.bind(t))}function CAe(e){return ei("Node",e,"ownerDocument")}function wAe(e){return ei("Node",e,"childNodes")}function EAe(e){return ei("Node",e,"parentNode")}function xAe(e){return ei("Node",e,"parentElement")}function _Ae(e){return ei("Node",e,"textContent")}function IAe(e,t){return MH("Node",e,"contains")(t)}function AAe(e){return MH("Node",e,"getRootNode")()}function RAe(e){return!e||!("host"in e)?null:ei("ShadowRoot",e,"host")}function TAe(e){return e.styleSheets}function OAe(e){return!e||!("shadowRoot"in e)?null:ei("Element",e,"shadowRoot")}function MAe(e,t){return ei("Element",e,"querySelector")(t)}function PAe(e,t){return ei("Element",e,"querySelectorAll")(t)}function PH(){return r2("MutationObserver").constructor}function Ol(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}const Ye={ownerDocument:CAe,childNodes:wAe,parentNode:EAe,parentElement:xAe,textContent:_Ae,contains:IAe,getRootNode:AAe,host:RAe,styleSheets:TAe,shadowRoot:OAe,querySelector:MAe,querySelectorAll:PAe,mutationObserver:PH,patch:Ol};function or(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Lc=`Please stop import mirror directly. Instead of that,\r
156
- now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
157
- or you can use record.mirror to access the mirror instance during recording.`;let P6={map:{},getId(){return console.error(Lc),-1},getNode(){return console.error(Lc),null},removeNodeFromMap(){console.error(Lc)},has(){return console.error(Lc),!1},reset(){console.error(Lc)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(P6=new Proxy(P6,{get(e,t,n){return t==="map"&&console.error(Lc),Reflect.get(e,t,n)}}));function hh(e,t,n={}){let r=null,o=0;return function(...s){const a=Date.now();!o&&n.leading===!1&&(o=a);const c=t-(a-o),u=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(u,s)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(u,s)},c))}}function Ob(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(a){setTimeout(()=>{n.set.call(this,a)},0),s&&s.set&&s.set.call(this,a)}}),()=>Ob(e,t,s||{},!0)}let Gv=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Gv=()=>new Date().getTime());function NH(e){var t,n,r,o;const s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:s.documentElement.scrollLeft||s?.body&&((t=Ye.parentElement(s.body))==null?void 0:t.scrollLeft)||((n=s?.body)==null?void 0:n.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:s?.documentElement.scrollTop||s?.body&&((r=Ye.parentElement(s.body))==null?void 0:r.scrollTop)||((o=s?.body)==null?void 0:o.scrollTop)||0}}function kH(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function DH(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function LH(e){return e?e.nodeType===e.ELEMENT_NODE?e:Ye.parentElement(e):null}function sr(e,t,n,r){if(!e)return!1;const o=LH(e);if(!o)return!1;try{if(typeof t=="string"){if(o.classList.contains(t)||r&&o.closest("."+t)!==null)return!0}else if(Fv(o,t,r))return!0}catch{}return!!(n&&(o.matches(n)||r&&o.closest(n)!==null))}function NAe(e,t){return t.getId(e)!==-1}function o_(e,t,n){return e.tagName==="TITLE"&&n.headTitleMutations?!0:t.getId(e)===oh}function UH(e,t){if(Nf(e))return!1;const n=t.getId(e);if(!t.has(n))return!0;const r=Ye.parentNode(e);return r&&r.nodeType===e.DOCUMENT_NODE?!1:r?UH(r,t):!0}function nA(e){return!!e.changedTouches}function kAe(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function FH(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function $H(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function rA(e){return e?e instanceof n2&&"shadowRoot"in e?!!e.shadowRoot:!!Ye.shadowRoot(e):!1}class DAe{constructor(){we(this,"id",1),we(this,"styleIDMap",new WeakMap),we(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function zH(e){var t;let n=null;return"getRootNode"in e&&((t=Ye.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Ye.host(Ye.getRootNode(e))&&(n=Ye.host(Ye.getRootNode(e))),n}function LAe(e){let t=e,n;for(;n=zH(t);)t=n;return t}function UAe(e){const t=Ye.ownerDocument(e);if(!t)return!1;const n=LAe(e);return Ye.contains(t,n)}function jH(e){const t=Ye.ownerDocument(e);return t?Ye.contains(t,e)||UAe(e):!1}var pt=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(pt||{}),at=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(at||{}),mr=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(mr||{}),Rs=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Rs||{}),vu=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(vu||{}),Uc=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Uc||{}),BH=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(BH||{});function N6(e){return"__ln"in e}class FAe{constructor(){we(this,"length",0),we(this,"head",null),we(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&N6(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&N6(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const k6=(e,t)=>`${e}@${t}`;class $Ae{constructor(){we(this,"frozen",!1),we(this,"locked",!1),we(this,"texts",[]),we(this,"attributes",[]),we(this,"attributeMap",new WeakMap),we(this,"removes",[]),we(this,"mapRemoves",[]),we(this,"movedMap",{}),we(this,"addedSet",new Set),we(this,"movedSet",new Set),we(this,"droppedSet",new Set),we(this,"removesSubTreeCache",new Set),we(this,"mutationCb"),we(this,"blockClass"),we(this,"blockSelector"),we(this,"maskTextClass"),we(this,"maskTextSelector"),we(this,"inlineStylesheet"),we(this,"maskInputOptions"),we(this,"maskTextFn"),we(this,"maskInputFn"),we(this,"keepIframeSrcFn"),we(this,"recordCanvas"),we(this,"inlineImages"),we(this,"slimDOMOptions"),we(this,"dataURLOptions"),we(this,"doc"),we(this,"mirror"),we(this,"iframeManager"),we(this,"stylesheetManager"),we(this,"shadowDomManager"),we(this,"canvasManager"),we(this,"processedNodeManager"),we(this,"unattachedDoc"),we(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),we(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new FAe,o=u=>{let f=u,h=oh;for(;h===oh;)f=f&&f.nextSibling,h=f&&this.mirror.getId(f);return h},s=u=>{const f=Ye.parentNode(u);if(!f||!jH(u))return;let h=!1;if(u.nodeType===Node.TEXT_NODE){const C=f.tagName;if(C==="TEXTAREA")return;C==="STYLE"&&this.addedSet.has(f)&&(h=!0)}const m=Nf(f)?this.mirror.getId(zH(u)):this.mirror.getId(f),g=o(u);if(m===-1||g===-1)return r.addNode(u);const v=qc(u,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:C=>{FH(C,this.mirror)&&this.iframeManager.addIframe(C),$H(C,this.mirror)&&this.stylesheetManager.trackLinkElement(C),rA(u)&&this.shadowDomManager.addShadowRoot(Ye.shadowRoot(u),this.doc)},onIframeLoad:(C,b)=>{this.iframeManager.attachIframe(C,b),this.shadowDomManager.observeAttachShadow(C)},onStylesheetLoad:(C,b)=>{this.stylesheetManager.attachLinkElement(C,b)},cssCaptured:h});v&&(t.push({parentId:m,nextId:g,node:v}),n.add(v.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)D6(this.removesSubTreeCache,u,this.mirror)&&!this.movedSet.has(Ye.parentNode(u))||s(u);for(const u of this.addedSet)!L6(this.droppedSet,u)&&!D6(this.removesSubTreeCache,u,this.mirror)||L6(this.movedSet,u)?s(u):this.droppedSet.add(u);let a=null;for(;r.length;){let u=null;if(a){const f=this.mirror.getId(Ye.parentNode(a.value)),h=o(a.value);f!==-1&&h!==-1&&(u=a)}if(!u){let f=r.tail;for(;f;){const h=f;if(f=f.previous,h){const m=this.mirror.getId(Ye.parentNode(h.value));if(o(h.value)===-1)continue;if(m!==-1){u=h;break}else{const v=h.value,C=Ye.parentNode(v);if(C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const b=Ye.host(C);if(this.mirror.getId(b)!==-1){u=h;break}}}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}a=u.previous,r.removeNode(u.value),s(u.value)}const c={texts:this.texts.map(u=>{const f=u.node,h=Ye.parentNode(f);return h&&h.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(h),{id:this.mirror.getId(f),value:u.value}}).filter(u=>!n.has(u.id)).filter(u=>this.mirror.has(u.id)),attributes:this.attributes.map(u=>{const{attributes:f}=u;if(typeof f.style=="string"){const h=JSON.stringify(u.styleDiff),m=JSON.stringify(u._unchangedStyles);h.length<f.style.length&&(h+m).split("var(").length===f.style.split("var(").length&&(f.style=u.styleDiff)}return{id:this.mirror.getId(u.node),attributes:f}}).filter(u=>!n.has(u.id)).filter(u=>this.mirror.has(u.id)),removes:this.removes,adds:t};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(c))}),we(this,"genTextAreaValueMutation",t=>{let n=this.attributeMap.get(t);n||(n={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(t,n));const r=Array.from(Ye.childNodes(t),o=>Ye.textContent(o)||"").join("");n.attributes.value=Dv({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:Lv(t),value:r,maskInputFn:this.maskInputFn})}),we(this,"processMutation",t=>{if(!o_(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const n=Ye.textContent(t.target);!sr(t.target,this.blockClass,this.blockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:dB(t.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,LH(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,o=t.target.getAttribute(r);if(r==="value"){const a=Lv(n);o=Dv({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:a,value:o,maskInputFn:this.maskInputFn})}if(sr(t.target,this.blockClass,this.blockSelector,!1)||o===t.oldValue)return;let s=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!n.contentDocument)r="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!uB(n.tagName,r))if(s.attributes[r]=cB(this.doc,hl(n.tagName),hl(r),o),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");t.oldValue&&a.setAttribute("style",t.oldValue);for(const c of Array.from(n.style)){const u=n.style.getPropertyValue(c),f=n.style.getPropertyPriority(c);u!==a.style.getPropertyValue(c)||f!==a.style.getPropertyPriority(c)?f===""?s.styleDiff[c]=u:s.styleDiff[c]=[u,f]:s._unchangedStyles[c]=[u,f]}for(const c of Array.from(a.style))n.style.getPropertyValue(c)===""&&(s.styleDiff[c]=!1)}else r==="open"&&n.tagName==="DIALOG"&&(n.matches("dialog:modal")?s.attributes.rr_open_mode="modal":s.attributes.rr_open_mode="non-modal");break}case"childList":{if(sr(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=Nf(t.target)?this.mirror.getId(Ye.host(t.target)):this.mirror.getId(t.target);sr(t.target,this.blockClass,this.blockSelector,!1)||o_(n,this.mirror,this.slimDOMOptions)||!NAe(n,this.mirror)||(this.addedSet.has(n)?(oA(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||UH(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[k6(r,o)]?oA(this.movedSet,n):(this.removes.push({parentId:o,id:r,isShadow:Nf(t.target)&&kf(t.target)?!0:void 0}),zAe(n,this.removesSubTreeCache))),this.mapRemoves.push(n))});break}}}),we(this,"genAdds",(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(o_(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[k6(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);sr(t,this.blockClass,this.blockSelector,!1)||(Ye.childNodes(t).forEach(r=>this.genAdds(r)),rA(t)&&Ye.childNodes(Ye.shadowRoot(t)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function oA(e,t){e.delete(t),Ye.childNodes(t).forEach(n=>oA(e,n))}function zAe(e,t){const n=[e];for(;n.length;){const r=n.pop();t.has(r)||(t.add(r),Ye.childNodes(r).forEach(o=>n.push(o)))}}function D6(e,t,n){return e.size===0?!1:jAe(e,t)}function jAe(e,t,n){const r=Ye.parentNode(t);return r?e.has(r):!1}function L6(e,t){return e.size===0?!1:HH(e,t)}function HH(e,t){const n=Ye.parentNode(t);return n?e.has(n)?!0:HH(e,n):!1}let Df;function BAe(e){Df=e}function HAe(){Df=void 0}const ct=e=>Df?(...n)=>{try{return e(...n)}catch(r){if(Df&&Df(r)===!0)return;throw r}}:e,Ha=[];function zh(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function qH(e,t){const n=new $Ae;Ha.push(n),n.init(e);const r=new(PH())(ct(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function qAe({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let a=[],c;const u=hh(ct(m=>{const g=Date.now()-c;e(a.map(v=>(v.timeOffset-=g,v)),m),a=[],c=null}),s),f=ct(hh(ct(m=>{const g=zh(m),{clientX:v,clientY:C}=nA(m)?m.changedTouches[0]:m;c||(c=Gv()),a.push({x:v,y:C,id:r.getId(g),timeOffset:Gv()-c}),u(typeof DragEvent<"u"&&m instanceof DragEvent?at.Drag:m instanceof MouseEvent?at.MouseMove:at.TouchMove)}),o,{trailing:!1})),h=[or("mousemove",f,n),or("touchmove",f,n),or("drag",f,n)];return ct(()=>{h.forEach(m=>m())})}function VAe({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,c=[];let u=null;const f=h=>m=>{const g=zh(m);if(sr(g,r,o,!0))return;let v=null,C=h;if("pointerType"in m){switch(m.pointerType){case"mouse":v=Rs.Mouse;break;case"touch":v=Rs.Touch;break;case"pen":v=Rs.Pen;break}v===Rs.Touch?mr[h]===mr.MouseDown?C="TouchStart":mr[h]===mr.MouseUp&&(C="TouchEnd"):Rs.Pen}else nA(m)&&(v=Rs.Touch);v!==null?(u=v,(C.startsWith("Touch")&&v===Rs.Touch||C.startsWith("Mouse")&&v===Rs.Mouse)&&(v=null)):mr[h]===mr.Click&&(v=u,u=null);const b=nA(m)?m.changedTouches[0]:m;if(!b)return;const E=n.getId(g),{clientX:x,clientY:I}=b;ct(e)({type:mr[C],id:E,x,y:I,...v!==null&&{pointerType:v}})};return Object.keys(mr).filter(h=>Number.isNaN(Number(h))&&!h.endsWith("_Departed")&&a[h]!==!1).forEach(h=>{let m=hl(h);const g=f(h);if(window.PointerEvent)switch(mr[h]){case mr.MouseDown:case mr.MouseUp:m=m.replace("mouse","pointer");break;case mr.TouchStart:case mr.TouchEnd:return}c.push(or(m,g,t))}),ct(()=>{c.forEach(h=>h())})}function VH({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:s}){const a=ct(hh(ct(c=>{const u=zh(c);if(!u||sr(u,r,o,!0))return;const f=n.getId(u);if(u===t&&t.defaultView){const h=NH(t.defaultView);e({id:f,x:h.left,y:h.top})}else e({id:f,x:u.scrollLeft,y:u.scrollTop})}),s.scroll||100));return or("scroll",a,t)}function WAe({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=ct(hh(ct(()=>{const s=kH(),a=DH();(n!==s||r!==a)&&(e({width:Number(a),height:Number(s)}),n=s,r=a)}),200));return or("resize",o,t)}const GAe=["INPUT","TEXTAREA","SELECT"],U6=new WeakMap;function KAe({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,ignoreClass:s,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:f,userTriggeredOnInput:h}){function m(I){let R=zh(I);const O=I.isTrusted,D=R&&R.tagName;if(R&&D==="OPTION"&&(R=Ye.parentElement(R)),!R||!D||GAe.indexOf(D)<0||sr(R,r,o,!0)||R.classList.contains(s)||a&&R.matches(a))return;let N=R.value,M=!1;const L=Lv(R)||"";L==="radio"||L==="checkbox"?M=R.checked:(c[D.toLowerCase()]||c[L])&&(N=Dv({element:R,maskInputOptions:c,tagName:D,type:L,value:N,maskInputFn:u})),g(R,h?{text:N,isChecked:M,userTriggered:O}:{text:N,isChecked:M});const $=R.name;L==="radio"&&$&&M&&t.querySelectorAll(`input[type="radio"][name="${$}"]`).forEach(G=>{if(G!==R){const j=G.value;g(G,h?{text:j,isChecked:!M,userTriggered:!1}:{text:j,isChecked:!M})}})}function g(I,R){const O=U6.get(I);if(!O||O.text!==R.text||O.isChecked!==R.isChecked){U6.set(I,R);const D=n.getId(I);ct(e)({...R,id:D})}}const C=(f.input==="last"?["change"]:["input","change"]).map(I=>or(I,ct(m),t)),b=t.defaultView;if(!b)return()=>{C.forEach(I=>I())};const E=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),x=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return E&&E.set&&C.push(...x.map(I=>Ob(I[0],I[1],{set(){ct(m)({target:this,isTrusted:!1})}},!1,b))),ct(()=>{C.forEach(I=>I())})}function Kv(e){const t=[];function n(r,o){if(pg("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||pg("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||pg("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||pg("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(a)}return o}return n(e,t)}function Li(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function ZAe({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:ct((h,m,g)=>{const[v,C]=g,{id:b,styleId:E}=Li(m,t,n.styleMirror);return(b&&b!==-1||E&&E!==-1)&&e({id:b,styleId:E,adds:[{rule:v,index:C}]}),h.apply(m,g)})}),r.CSSStyleSheet.prototype.addRule=function(h,m,g=this.cssRules.length){const v=`${h} { ${m} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[v,g])};const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:ct((h,m,g)=>{const[v]=g,{id:C,styleId:b}=Li(m,t,n.styleMirror);return(C&&C!==-1||b&&b!==-1)&&e({id:C,styleId:b,removes:[{index:v}]}),h.apply(m,g)})}),r.CSSStyleSheet.prototype.removeRule=function(h){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[h])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:ct((h,m,g)=>{const[v]=g,{id:C,styleId:b}=Li(m,t,n.styleMirror);return(C&&C!==-1||b&&b!==-1)&&e({id:C,styleId:b,replace:v}),h.apply(m,g)})}));let c;r.CSSStyleSheet.prototype.replaceSync&&(c=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:ct((h,m,g)=>{const[v]=g,{id:C,styleId:b}=Li(m,t,n.styleMirror);return(C&&C!==-1||b&&b!==-1)&&e({id:C,styleId:b,replaceSync:v}),h.apply(m,g)})}));const u={};mg("CSSGroupingRule")?u.CSSGroupingRule=r.CSSGroupingRule:(mg("CSSMediaRule")&&(u.CSSMediaRule=r.CSSMediaRule),mg("CSSConditionRule")&&(u.CSSConditionRule=r.CSSConditionRule),mg("CSSSupportsRule")&&(u.CSSSupportsRule=r.CSSSupportsRule));const f={};return Object.entries(u).forEach(([h,m])=>{f[h]={insertRule:m.prototype.insertRule,deleteRule:m.prototype.deleteRule},m.prototype.insertRule=new Proxy(f[h].insertRule,{apply:ct((g,v,C)=>{const[b,E]=C,{id:x,styleId:I}=Li(v.parentStyleSheet,t,n.styleMirror);return(x&&x!==-1||I&&I!==-1)&&e({id:x,styleId:I,adds:[{rule:b,index:[...Kv(v),E||0]}]}),g.apply(v,C)})}),m.prototype.deleteRule=new Proxy(f[h].deleteRule,{apply:ct((g,v,C)=>{const[b]=C,{id:E,styleId:x}=Li(v.parentStyleSheet,t,n.styleMirror);return(E&&E!==-1||x&&x!==-1)&&e({id:E,styleId:x,removes:[{index:[...Kv(v),b]}]}),g.apply(v,C)})})}),ct(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,a&&(r.CSSStyleSheet.prototype.replace=a),c&&(r.CSSStyleSheet.prototype.replaceSync=c),Object.entries(u).forEach(([h,m])=>{m.prototype.insertRule=f[h].insertRule,m.prototype.deleteRule=f[h].deleteRule})})}function WH({mirror:e,stylesheetManager:t},n){var r,o,s;let a=null;n.nodeName==="#document"?a=e.getId(n):a=e.getId(Ye.host(n));const c=n.nodeName==="#document"?(r=n.defaultView)==null?void 0:r.Document:(s=(o=n.ownerDocument)==null?void 0:o.defaultView)==null?void 0:s.ShadowRoot,u=c?.prototype?Object.getOwnPropertyDescriptor(c?.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!c||!u?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var f;return(f=u.get)==null?void 0:f.call(this)},set(f){var h;const m=(h=u.set)==null?void 0:h.call(this,f);if(a!==null&&a!==-1)try{t.adoptStyleSheets(f,a)}catch{}return m}}),ct(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))}function YAe({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:ct((c,u,f)=>{var h;const[m,g,v]=f;if(n.has(m))return s.apply(u,[m,g,v]);const{id:C,styleId:b}=Li((h=u.parentRule)==null?void 0:h.parentStyleSheet,t,r.styleMirror);return(C&&C!==-1||b&&b!==-1)&&e({id:C,styleId:b,set:{property:m,value:g,priority:v},index:Kv(u.parentRule)}),c.apply(u,f)})});const a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:ct((c,u,f)=>{var h;const[m]=f;if(n.has(m))return a.apply(u,[m]);const{id:g,styleId:v}=Li((h=u.parentRule)==null?void 0:h.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||v&&v!==-1)&&e({id:g,styleId:v,remove:{property:m},index:Kv(u.parentRule)}),c.apply(u,f)})}),ct(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=a})}function QAe({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:o,doc:s}){const a=ct(u=>hh(ct(f=>{const h=zh(f);if(!h||sr(h,t,n,!0))return;const{currentTime:m,volume:g,muted:v,playbackRate:C,loop:b}=h;e({type:u,id:r.getId(h),currentTime:m,volume:g,muted:v,playbackRate:C,loop:b})}),o.media||500)),c=[or("play",a(Uc.Play),s),or("pause",a(Uc.Pause),s),or("seeked",a(Uc.Seeked),s),or("volumechange",a(Uc.VolumeChange),s),or("ratechange",a(Uc.RateChange),s)];return ct(()=>{c.forEach(u=>u())})}function JAe({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(u,f,h){const m=new s(u,f,h);return o.set(m,{family:u,buffer:typeof f!="string",descriptors:h,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),m};const a=Ol(t.fonts,"add",function(c){return function(u){return setTimeout(ct(()=>{const f=o.get(u);f&&(e(f),o.delete(u))}),0),c.apply(this,[u])}});return r.push(()=>{n.FontFace=s}),r.push(a),ct(()=>{r.forEach(c=>c())})}function XAe(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:s}=e;let a=!0;const c=ct(()=>{const u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;const f=[],h=u.rangeCount||0;for(let m=0;m<h;m++){const g=u.getRangeAt(m),{startContainer:v,startOffset:C,endContainer:b,endOffset:E}=g;sr(v,r,o,!0)||sr(b,r,o,!0)||f.push({start:n.getId(v),startOffset:C,end:n.getId(b),endOffset:E})}s({ranges:f})});return c(),or("selectionchange",c)}function eRe({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Ol(n.customElements,"define",function(o){return function(s,a,c){try{t({define:{name:s}})}catch{console.warn(`Custom element callback failed for ${s}`)}return o.apply(this,[s,a,c])}})}function tRe(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:s,viewportResizeCb:a,inputCb:c,mediaInteractionCb:u,styleSheetRuleCb:f,styleDeclarationCb:h,canvasMutationCb:m,fontCb:g,selectionCb:v,customElementCb:C}=e;e.mutationCb=(...b)=>{t.mutation&&t.mutation(...b),n(...b)},e.mousemoveCb=(...b)=>{t.mousemove&&t.mousemove(...b),r(...b)},e.mouseInteractionCb=(...b)=>{t.mouseInteraction&&t.mouseInteraction(...b),o(...b)},e.scrollCb=(...b)=>{t.scroll&&t.scroll(...b),s(...b)},e.viewportResizeCb=(...b)=>{t.viewportResize&&t.viewportResize(...b),a(...b)},e.inputCb=(...b)=>{t.input&&t.input(...b),c(...b)},e.mediaInteractionCb=(...b)=>{t.mediaInteaction&&t.mediaInteaction(...b),u(...b)},e.styleSheetRuleCb=(...b)=>{t.styleSheetRule&&t.styleSheetRule(...b),f(...b)},e.styleDeclarationCb=(...b)=>{t.styleDeclaration&&t.styleDeclaration(...b),h(...b)},e.canvasMutationCb=(...b)=>{t.canvasMutation&&t.canvasMutation(...b),m(...b)},e.fontCb=(...b)=>{t.font&&t.font(...b),g(...b)},e.selectionCb=(...b)=>{t.selection&&t.selection(...b),v(...b)},e.customElementCb=(...b)=>{t.customElement&&t.customElement(...b),C(...b)}}function nRe(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};tRe(e,t);let r;e.recordDOM&&(r=qH(e,e.doc));const o=qAe(e),s=VAe(e),a=VH(e),c=WAe(e,{win:n}),u=KAe(e),f=QAe(e);let h=()=>{},m=()=>{},g=()=>{},v=()=>{};e.recordDOM&&(h=ZAe(e,{win:n}),m=WH(e,e.doc),g=YAe(e,{win:n}),e.collectFonts&&(v=JAe(e)));const C=XAe(e),b=eRe(e),E=[];for(const x of e.plugins)E.push(x.observer(x.callback,n,x.options));return ct(()=>{Ha.forEach(x=>x.reset()),r?.disconnect(),o(),s(),a(),c(),u(),f(),h(),m(),g(),v(),C(),b(),E.forEach(x=>x())})}function pg(e){return typeof window[e]<"u"}function mg(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class F6{constructor(t){we(this,"iframeIdToRemoteIdMap",new WeakMap),we(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,n,r,o){const s=r||this.getIdToRemoteIdMap(t),a=o||this.getRemoteIdToIdMap(t);let c=s.get(n);return c||(c=this.generateIdFn(),s.set(n,c),a.set(c,n)),c}getIds(t,n){const r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(s=>this.getId(t,s,r,o))}getRemoteId(t,n,r){const o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const s=o.get(n);return s||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class rRe{constructor(t){we(this,"iframes",new WeakMap),we(this,"crossOriginIframeMap",new WeakMap),we(this,"crossOriginIframeMirror",new F6(lB)),we(this,"crossOriginIframeStyleMirror"),we(this,"crossOriginIframeRootIdMap",new WeakMap),we(this,"mirror"),we(this,"mutationCb"),we(this,"wrappedEmit"),we(this,"loadListener"),we(this,"stylesheetManager"),we(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new F6(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var r,o;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=t.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(o=this.loadListener)==null||o.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const o=this.crossOriginIframeMap.get(t.source);if(!o)return;const s=this.transformCrossOriginEvent(o,n.data.event);s&&this.wrappedEmit(s,n.data.isCheckout)}transformCrossOriginEvent(t,n){var r;switch(n.type){case pt.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const o=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,o),this.patchRootIdOnNode(n.data.node,o),{timestamp:n.timestamp,type:pt.IncrementalSnapshot,data:{source:at.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case pt.Meta:case pt.Load:case pt.DomContentLoaded:return!1;case pt.Plugin:return n;case pt.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case pt.IncrementalSnapshot:switch(n.data.source){case at.Mutation:return n.data.adds.forEach(o=>{this.replaceIds(o,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(o.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(o.node,s)}),n.data.removes.forEach(o=>{this.replaceIds(o,t,["parentId","id"])}),n.data.attributes.forEach(o=>{this.replaceIds(o,t,["id"])}),n.data.texts.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case at.Drag:case at.TouchMove:case at.MouseMove:return n.data.positions.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case at.ViewportResize:return!1;case at.MediaInteraction:case at.MouseInteraction:case at.Scroll:case at.CanvasMutation:case at.Input:return this.replaceIds(n.data,t,["id"]),n;case at.StyleSheetRule:case at.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case at.Font:return n;case at.Selection:return n.data.ranges.forEach(o=>{this.replaceIds(o,t,["start","end"])}),n;case at.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)==null||r.forEach(o=>{this.replaceStyleIds(o,t,["styleId"])}),n}}return!1}replace(t,n,r,o){for(const s of o)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=t.getIds(r,n[s]):n[s]=t.getId(r,n[s]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==BH.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class oRe{constructor(t){we(this,"shadowDoms",new WeakSet),we(this,"mutationCb"),we(this,"scrollCb"),we(this,"bypassOptions"),we(this,"mirror"),we(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!kf(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const r=qH({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(VH({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(Ye.host(t))),this.restoreHandlers.push(WH({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Ol(t.prototype,"attachShadow",function(o){return function(s){const a=o.call(this,s),c=Ye.shadowRoot(this);return c&&jH(this)&&r.addShadowRoot(c,n),a}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Vc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sRe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var gg=0;gg<Vc.length;gg++)sRe[Vc.charCodeAt(gg)]=gg;var iRe=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=Vc[t[n]>>2],o+=Vc[(t[n]&3)<<4|t[n+1]>>4],o+=Vc[(t[n+1]&15)<<2|t[n+2]>>6],o+=Vc[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const $6=new Map;function aRe(e,t){let n=$6.get(e);return n||(n=new Map,$6.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const GH=(e,t,n)=>{if(!e||!(ZH(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=aRe(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function Jg(e,t,n){if(e instanceof Array)return e.map(r=>Jg(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,o=iRe(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Jg(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Jg(e.data,t,n),e.width,e.height]};if(ZH(e,t)||typeof e=="object"){const r=e.constructor.name,o=GH(e,t,n);return{rr_type:r,index:o}}}}return e}const KH=(e,t,n)=>e.map(r=>Jg(r,t,n)),ZH=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function lRe(e,t,n,r){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of s)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=Ol(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...f){return sr(this.canvas,n,r,!0)||setTimeout(()=>{const h=KH(f,t,this);e(this.canvas,{type:vu["2D"],property:a,args:h})},0),u.apply(this,f)}});o.push(c)}catch{const c=Ob(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:vu["2D"],property:a,args:[u],setter:!0})}});o.push(c)}return()=>{o.forEach(a=>a())}}function cRe(e){return e==="experimental-webgl"?"webgl":e}function z6(e,t,n,r){const o=[];try{const s=Ol(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!sr(this,t,n,!0)){const f=cRe(c);if("__context"in this||(this.__context=f),r&&["webgl","webgl2"].includes(f))if(u[0]&&typeof u[0]=="object"){const h=u[0];h.preserveDrawingBuffer||(h.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});o.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(s=>s())}}function j6(e,t,n,r,o,s){const a=[],c=Object.getOwnPropertyNames(e);for(const u of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof e[u]!="function")continue;const f=Ol(e,u,function(h){return function(...m){const g=h.apply(this,m);if(GH(g,s,this),"tagName"in this.canvas&&!sr(this.canvas,r,o,!0)){const v=KH(m,s,this),C={type:t,property:u,args:v};n(this.canvas,C)}return g}});a.push(f)}catch{const f=Ob(e,u,{set(h){n(this.canvas,{type:t,property:u,args:[h],setter:!0})}});a.push(f)}return a}function uRe(e,t,n,r){const o=[];return o.push(...j6(t.WebGLRenderingContext.prototype,vu.WebGL,e,n,r,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...j6(t.WebGL2RenderingContext.prototype,vu.WebGL2,e,n,r,t)),()=>{o.forEach(s=>s())}}const YH="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",dRe=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),B6=typeof window<"u"&&window.Blob&&new Blob([dRe(YH)],{type:"text/javascript;charset=utf-8"});function fRe(e){let t;try{if(t=B6&&(window.URL||window.webkitURL).createObjectURL(B6),!t)throw"";const n=new Worker(t,{name:e?.name});return n.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker("data:text/javascript;base64,"+YH,{name:e?.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class hRe{constructor(t){we(this,"pendingCanvasMutations",new Map),we(this,"rafStamps",{latestId:0,invokeId:null}),we(this,"mirror"),we(this,"mutationCb"),we(this,"resetObservers"),we(this,"frozen",!1),we(this,"locked",!1),we(this,"processMutation",(u,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(u)||this.pendingCanvasMutations.set(u,[]),this.pendingCanvasMutations.get(u).push(f)});const{sampling:n="all",win:r,blockClass:o,blockSelector:s,recordCanvas:a,dataURLOptions:c}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,a&&n==="all"&&this.initCanvasMutationObserver(r,o,s),a&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o,s,{dataURLOptions:c})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,n,r,o,s){const a=z6(n,r,o,!0),c=new Map,u=new fRe;u.onmessage=C=>{const{id:b}=C.data;if(c.set(b,!1),!("base64"in C.data))return;const{base64:E,type:x,width:I,height:R}=C.data;this.mutationCb({id:b,type:vu["2D"],commands:[{property:"clearRect",args:[0,0,I,R]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:E}],type:x}]},0,0]}]})};const f=1e3/t;let h=0,m;const g=()=>{const C=[];return n.document.querySelectorAll("canvas").forEach(b=>{sr(b,r,o,!0)||C.push(b)}),C},v=C=>{if(h&&C-h<f){m=requestAnimationFrame(v);return}h=C,g().forEach(async b=>{var E;const x=this.mirror.getId(b);if(c.get(x)||b.width===0||b.height===0)return;if(c.set(x,!0),["webgl","webgl2"].includes(b.__context)){const R=b.getContext(b.__context);((E=R?.getContextAttributes())==null?void 0:E.preserveDrawingBuffer)===!1&&R.clear(R.COLOR_BUFFER_BIT)}const I=await createImageBitmap(b);u.postMessage({id:x,bitmap:I,width:b.width,height:b.height,dataURLOptions:s.dataURLOptions},[I])}),m=requestAnimationFrame(v)};m=requestAnimationFrame(v),this.resetObservers=()=>{a(),cancelAnimationFrame(m)}}initCanvasMutationObserver(t,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const o=z6(t,n,r,!1),s=lRe(this.processMutation.bind(this),t,n,r),a=uRe(this.processMutation.bind(this),t,n,r);this.resetObservers=()=>{o(),s(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(a=>{const{type:c,...u}=a;return u}),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}class pRe{constructor(t){we(this,"trackedLinkElements",new WeakSet),we(this,"mutationCb"),we(this,"adoptedStyleSheetCb"),we(this,"styleMirror",new DAe),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},o=[];for(const s of t){let a;this.styleMirror.has(s)?a=this.styleMirror.getId(s):(a=this.styleMirror.add(s),o.push({styleId:a,rules:Array.from(s.rules||CSSRule,(c,u)=>({rule:sB(c,s.href),index:u}))})),r.styleIds.push(a)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class mRe{constructor(){we(this,"nodeMap",new WeakMap),we(this,"active",!1)}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(o=>o!==n)}add(t,n){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let dn,Xg,s_,Zv=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((VU=e.contentWindow)==null?void 0:VU.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const yo=vEe();function jh(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskTextClass:u="rr-mask",maskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:v,maskInputFn:C,maskTextFn:b,hooks:E,packFn:x,sampling:I={},dataURLOptions:R={},mousemoveWait:O,recordDOM:D=!0,recordCanvas:N=!1,recordCrossOriginIframes:M=!1,recordAfter:L=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:$=!1,collectFonts:G=!1,inlineImages:j=!1,plugins:F,keepIframeSrcFn:q=()=>!1,ignoreCSSAttributes:J=new Set([]),errorHandler:Se}=e;BAe(Se);const V=M?window.parent===window:!0;let ee=!1;if(!V)try{window.parent.document&&(ee=!1)}catch{ee=!0}if(V&&!t)throw new Error("emit function is required");if(!V&&!ee)return()=>{};O!==void 0&&I.mousemove===void 0&&(I.mousemove=O),yo.reset();const me=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:g!==void 0?g:{password:!0},ge=fB(v);kAe();let Te,z=0;const te=xe=>{for(const xt of F||[])xt.eventProcessor&&(xe=xt.eventProcessor(xe));return x&&!ee&&(xe=x(xe)),xe};dn=(xe,xt)=>{var _t;const ot=xe;if(ot.timestamp=Gv(),(_t=Ha[0])!=null&&_t.isFrozen()&&ot.type!==pt.FullSnapshot&&!(ot.type===pt.IncrementalSnapshot&&ot.data.source===at.Mutation)&&Ha.forEach(En=>En.unfreeze()),V)t?.(te(ot),xt);else if(ee){const En={type:"rrweb",event:te(ot),origin:window.location.origin,isCheckout:xt};window.parent.postMessage(En,"*")}if(ot.type===pt.FullSnapshot)Te=ot,z=0;else if(ot.type===pt.IncrementalSnapshot){if(ot.data.source===at.Mutation&&ot.data.isAttachIframe)return;z++;const En=r&&z>=r,st=n&&ot.timestamp-Te.timestamp>n;(En||st)&&Xg(!0)}};const fe=xe=>{dn({type:pt.IncrementalSnapshot,data:{source:at.Mutation,...xe}})},ae=xe=>dn({type:pt.IncrementalSnapshot,data:{source:at.Scroll,...xe}}),be=xe=>dn({type:pt.IncrementalSnapshot,data:{source:at.CanvasMutation,...xe}}),Fe=xe=>dn({type:pt.IncrementalSnapshot,data:{source:at.AdoptedStyleSheet,...xe}}),ke=new pRe({mutationCb:fe,adoptedStyleSheetCb:Fe}),le=new rRe({mirror:yo,mutationCb:fe,stylesheetManager:ke,recordCrossOriginIframes:M,wrappedEmit:dn});for(const xe of F||[])xe.getMirror&&xe.getMirror({nodeMirror:yo,crossOriginIframeMirror:le.crossOriginIframeMirror,crossOriginIframeStyleMirror:le.crossOriginIframeStyleMirror});const Re=new mRe;s_=new hRe({recordCanvas:N,mutationCb:be,win:window,blockClass:o,blockSelector:s,mirror:yo,sampling:I.canvas,dataURLOptions:R});const rt=new oRe({mutationCb:fe,scrollCb:ae,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:u,maskTextSelector:f,inlineStylesheet:h,maskInputOptions:me,dataURLOptions:R,maskTextFn:b,maskInputFn:C,recordCanvas:N,inlineImages:j,sampling:I,slimDOMOptions:ge,iframeManager:le,stylesheetManager:ke,canvasManager:s_,keepIframeSrcFn:q,processedNodeManager:Re},mirror:yo});Xg=(xe=!1)=>{if(!D)return;dn({type:pt.Meta,data:{href:window.location.href,width:DH(),height:kH()}},xe),ke.reset(),rt.init(),Ha.forEach(_t=>_t.lock());const xt=jEe(document,{mirror:yo,blockClass:o,blockSelector:s,maskTextClass:u,maskTextSelector:f,inlineStylesheet:h,maskAllInputs:me,maskTextFn:b,maskInputFn:C,slimDOM:ge,dataURLOptions:R,recordCanvas:N,inlineImages:j,onSerialize:_t=>{FH(_t,yo)&&le.addIframe(_t),$H(_t,yo)&&ke.trackLinkElement(_t),rA(_t)&&rt.addShadowRoot(Ye.shadowRoot(_t),document)},onIframeLoad:(_t,ot)=>{le.attachIframe(_t,ot),rt.observeAttachShadow(_t)},onStylesheetLoad:(_t,ot)=>{ke.attachLinkElement(_t,ot)},keepIframeSrcFn:q});if(!xt)return console.warn("Failed to snapshot the document");dn({type:pt.FullSnapshot,data:{node:xt,initialOffset:NH(window)}},xe),Ha.forEach(_t=>_t.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ke.adoptStyleSheets(document.adoptedStyleSheets,yo.getId(document))};try{const xe=[],xt=ot=>{var En;return ct(nRe)({mutationCb:fe,mousemoveCb:(st,ti)=>dn({type:pt.IncrementalSnapshot,data:{source:ti,positions:st}}),mouseInteractionCb:st=>dn({type:pt.IncrementalSnapshot,data:{source:at.MouseInteraction,...st}}),scrollCb:ae,viewportResizeCb:st=>dn({type:pt.IncrementalSnapshot,data:{source:at.ViewportResize,...st}}),inputCb:st=>dn({type:pt.IncrementalSnapshot,data:{source:at.Input,...st}}),mediaInteractionCb:st=>dn({type:pt.IncrementalSnapshot,data:{source:at.MediaInteraction,...st}}),styleSheetRuleCb:st=>dn({type:pt.IncrementalSnapshot,data:{source:at.StyleSheetRule,...st}}),styleDeclarationCb:st=>dn({type:pt.IncrementalSnapshot,data:{source:at.StyleDeclaration,...st}}),canvasMutationCb:be,fontCb:st=>dn({type:pt.IncrementalSnapshot,data:{source:at.Font,...st}}),selectionCb:st=>{dn({type:pt.IncrementalSnapshot,data:{source:at.Selection,...st}})},customElementCb:st=>{dn({type:pt.IncrementalSnapshot,data:{source:at.CustomElement,...st}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskTextClass:u,maskTextSelector:f,maskInputOptions:me,inlineStylesheet:h,sampling:I,recordDOM:D,recordCanvas:N,inlineImages:j,userTriggeredOnInput:$,collectFonts:G,doc:ot,maskInputFn:C,maskTextFn:b,keepIframeSrcFn:q,blockSelector:s,slimDOMOptions:ge,dataURLOptions:R,mirror:yo,iframeManager:le,stylesheetManager:ke,shadowDomManager:rt,processedNodeManager:Re,canvasManager:s_,ignoreCSSAttributes:J,plugins:((En=F?.filter(st=>st.observer))==null?void 0:En.map(st=>({observer:st.observer,options:st.options,callback:ti=>dn({type:pt.Plugin,data:{plugin:st.name,payload:ti}})})))||[]},E)};le.addLoadListener(ot=>{try{xe.push(xt(ot.contentDocument))}catch(En){console.warn(En)}});const _t=()=>{Xg(),xe.push(xt(document)),Zv=!0};return["interactive","complete"].includes(document.readyState)?_t():(xe.push(or("DOMContentLoaded",()=>{dn({type:pt.DomContentLoaded,data:{}}),L==="DOMContentLoaded"&&_t()})),xe.push(or("load",()=>{dn({type:pt.Load,data:{}}),L==="load"&&_t()},window))),()=>{xe.forEach(ot=>{try{ot()}catch(En){String(En).toLowerCase().includes("cross-origin")||console.warn(En)}}),Re.destroy(),Zv=!1,HAe()}}catch(xe){console.warn(xe)}}jh.addCustomEvent=(e,t)=>{if(!Zv)throw new Error("please add custom event after start recording");dn({type:pt.Custom,data:{tag:e,payload:t}})};jh.freezePage=()=>{Ha.forEach(e=>e.freeze())};jh.takeFullSnapshot=e=>{if(!Zv)throw new Error("please take full snapshot after start recording");Xg(e)};jh.mirror=yo;var H6;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(H6||(H6={}));const gRe="rrweb",vRe={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},yRe={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},q6=yRe;class bRe extends uo{constructor(t){super(gRe),this.recordingEvents=[],this.isRecording=!1,this.recordingStartTime=null,this.flushTimer=null,this.stopRecording=null,this.enabled=!1;const n=Object.assign(Object.assign(Object.assign({},q6.recordOptions),t?.recordOptions),vRe);this.config=Object.assign(Object.assign(Object.assign({},q6),t),{recordOptions:n}),Ce.info("RRWebPlugin initialized",{additionalSampleRate:this.config.additionalSampleRate,batchSize:this.config.batchSize,flushInterval:this.config.flushInterval})}enable(){var t;if(this.enabled){Ce.info("RRWebPlugin already enabled");return}const n=(t=this.context)===null||t===void 0?void 0:t.getSession();if(!n||!n.record){Ce.warn("RRWebPlugin skipping - session not being recorded",{hasSession:!!n,sessionRecord:n?.record});return}const r=Math.random();if(r>this.config.additionalSampleRate){Ce.warn("RRWebPlugin skipping - session replay additionalSampleRate",{randomValue:r,samplingRate:this.config.additionalSampleRate});return}this.enabled=!0,Ce.info("RRWebPlugin enabled - starting recording"),this.startRecording()}disable(){if(!this.enabled){Ce.info("RRWebPlugin already disabled");return}Ce.info("RRWebPlugin disabled - stopping recording"),this.enabled=!1,this.stopCurrentRecording()}record(t){const n=t?.action;n==="start"?(Ce.info("RRWebPlugin manual start recording"),this.startRecording()):n==="stop"&&(Ce.info("RRWebPlugin manual stop recording"),this.stopCurrentRecording())}onload(){}startRecording(){this.recordingStartTime=Date.now(),this.recordingEvents=[],this.isRecording=!0,Ce.info("RRWebPlugin starting rrweb recording",{startTime:this.recordingStartTime});const t=jh(Object.assign(Object.assign({},this.config.recordOptions),{emit:this.handleRRWebEvent.bind(this)}));t?(this.stopRecording=t,Ce.info("RRWebPlugin rrweb recording initialized successfully")):Ce.warn("RRWebPlugin failed to initialize rrweb recording"),this.flushTimer=window.setInterval(()=>{this.flush()},this.config.flushInterval)}stopCurrentRecording(){if(!this.isRecording){Ce.info("RRWebPlugin stopCurrentRecording called but not recording");return}Ce.info("RRWebPlugin stopping current recording"),this.isRecording=!1,this.stopRecording&&(this.stopRecording(),this.stopRecording=null,Ce.info("RRWebPlugin rrweb recording stopped")),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null,Ce.info("RRWebPlugin flush timer cleared")),this.flush()}handleRRWebEvent(t){this.isRecording&&(this.recordingEvents.push(t),this.recordingEvents.length>=this.config.batchSize&&(Ce.info("RRWebPlugin flushing events due to batch size",{eventCount:this.recordingEvents.length,batchSize:this.config.batchSize}),this.flush()))}flush(){if(this.recordingEvents.length===0){Ce.info("RRWebPlugin flushEvent called but no events to flush");return}Ce.info("RRWebPlugin flushing events",{eventCount:this.recordingEvents.length});const t=[...this.recordingEvents],n={version:"1.0.0",events:t,eventCount:t.length};this.context.record(TU,n),Ce.info("RRWebPlugin events sent to RUM",{eventType:TU,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}}var SRe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},sA;(function(e){e.Path="PATH",e.Hash="HASH",e.PathAndHash="PATH_AND_HASH"})(sA||(sA={}));const QH="us-west-2",iA=`https://dataplane.rum.${QH}.amazonaws.com`,JH=()=>({unique:!1,domain:window.location.hostname,path:"/",sameSite:"Strict",secure:!0}),XH=e=>({allowCookies:!1,batchLimit:100,client:q1e,compressionStrategy:{enabled:!0},cookieAttributes:e,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:iA,endpointUrl:new URL(iA),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:sA.Path,pagesToExclude:[],pagesToInclude:[/.*/],signing:!1,recordResourceUrl:!0,retries:2,routeChangeComplete:100,routeChangeTimeout:1e4,sessionAttributes:{},sessionEventLimit:200,sessionLengthSeconds:1800,sessionSampleRate:1,suppressSessionStartEvent:!1,useBeacon:!0,userIdRetentionDays:30,enableW3CTraceId:!1,candidatesCacheSize:10});let CRe=class{constructor(t,n,r,o={}){var{cookieAttributes:s}=o,a=SRe(o,["cookieAttributes"]);this.eventBus=new Hj,typeof r>"u"&&(r="us-west-2"),this.applicationId=t;const c=Object.assign(Object.assign({},JH()),s);this.config=Object.assign(Object.assign({fetchFunction:fetch},XH(c)),a),this.config.sessionId&&(this.config.suppressSessionStartEvent=!0),this.config.endpoint=a.endpoint?a.endpoint:iA.replace(QH,r),this.config.endpointUrl=new URL(this.config.endpoint),Ce.configure(this.config.debug),Ce.info("Initialized RUM Slim"),this.eventCache=new twe({id:t,version:n},this.config,this.eventBus),this.dispatchManager=this.initDispatch(r,t),this.pluginManager=this.initPluginManager(t,n),this.eventCache.setPluginFlushHook(()=>this.pluginManager.flush()),this.config.enableRumClient?this.enable():this.disable()}setAwsCredentials(t){this.dispatchManager.setAwsCredentials(t)}setSigningConfigFactory(t){this.dispatchManager.setSigningConfigFactory(t)}addSessionAttributes(t){this.eventCache.addSessionAttributes(t)}getSessionId(){return this.eventCache.getSessionId()}pinSessionId(t){this.eventCache.pinSessionId(t)}startSession(t){return this.eventCache.startSession(t)}getUserId(){return this.eventCache.getUserId()}pinUserId(t){this.eventCache.pinUserId(t)}setEventMetadataHook(t){this.eventCache.setEventMetadataHook(t)}clearEventMetadataHook(){this.eventCache.clearEventMetadataHook()}addPlugin(t){this.pluginManager.addPlugin(t)}dispatch(){this.dispatchManager.dispatchFetch()}dispatchBeacon(){this.dispatchManager.dispatchBeacon()}enable(){this.eventCache.enable(),this.pluginManager.enable(),this.dispatchManager.enable()}disable(){this.dispatchManager.disable(),this.pluginManager.disable(),this.eventCache.disable()}allowCookies(t){this.config.allowCookies=t}clearCookies(){const t=this.config.cookieAttributes;[Rv,Tv,uu,`${Rv}_${this.applicationId}`,`${Tv}_${this.applicationId}`,`${uu}_${this.applicationId}`].forEach(r=>GCe(r,t))}recordPageView(t){this.eventCache.recordPageView(t)}recordError(t){this.pluginManager.record("com.amazonaws.rum.js-error",t)}registerDomEvents(t){this.pluginManager.updatePlugin("com.amazonaws.rum.dom-event",t)}recordEvent(t,n,r){this.eventCache.recordEvent(t,n,r)}initDispatch(t,n){return new V1e(n,t,this.config.endpointUrl,this.eventCache,this.config)}initPluginManager(t,n){const r={applicationId:t,applicationVersion:n,config:this.config,record:this.eventCache.recordEvent,recordCandidate:this.eventCache.recordCandidate,recordPageView:this.eventCache.recordPageView,getSession:this.eventCache.getSession,eventBus:this.eventBus},o=new WCe(r);return this.config.disableAutoPageView||o.addPlugin(new bwe),this.config.eventPluginsToLoad.forEach(s=>{o.addPlugin(s)}),o}};var xo;(function(e){e.Errors="errors",e.Performance="performance",e.Interaction="interaction",e.Http="http",e.Replay="replay"})(xo||(xo={}));var V6;(function(e){e.Path="PATH",e.Hash="HASH",e.PathAndHash="PATH_AND_HASH"})(V6||(V6={}));const wRe=e=>Object.assign(Object.assign({},XH(e)),{signing:!0,telemetries:[xo.Errors,xo.Performance,xo.Http,xo.Replay]});class ERe extends CRe{constructor(t,n,r,o={}){super(t,n,r,Object.assign(Object.assign({},wRe(JH())),o)),Ce.info(`RUM client initialized for app: ${t}`),Ce.info(`Telemetries enabled: ${this.config.telemetries.join(", ")||"none"}`)}initDispatch(t,n){const r=super.initDispatch(t,n);return r.setSigningConfigFactory(SCe),r.setCognitoCredentialProviderFactory((o,s,a,c)=>{const u={identityPoolId:a,guestRoleArn:c,cookieAttributes:o.cookieAttributes};return a&&c?new LCe(u,s).ChainAnonymousCredentialsProvider:new UCe(u,s).ChainAnonymousCredentialsProvider}),this.config.signing&&this.config.identityPoolId&&r.setCognitoCredentials(this.config.identityPoolId,this.config.guestRoleArn),r}initPluginManager(t,n){const r=super.initPluginManager(t,n);return this.constructBuiltinPlugins().forEach(s=>{r.addPlugin(s)}),r}recordError(t){this.pluginManager.record(Wj,t)}registerDomEvents(t){this.pluginManager.updatePlugin(qj,t)}constructBuiltinPlugins(){let t=[];const n=this.telemetryFunctor();return this.config.telemetries.forEach(r=>{typeof r=="string"&&n[r.toLowerCase()]?t=[...t,...n[r.toLowerCase()]({})]:Array.isArray(r)&&n[r[0].toLowerCase()]&&(t=[...t,...n[r[0].toLowerCase()](r[1])])}),t}telemetryFunctor(){return{[xo.Errors]:t=>[new fwe(t)],[xo.Performance]:t=>[new mwe(t),new Cwe(t),new jwe(t)],[xo.Interaction]:t=>[new xT(t)],[xo.Http]:t=>[new Wwe(t),new Hwe(t)],[xo.Replay]:t=>[new bRe(t)]}}}const eq={recordPageView:()=>{},recordError:()=>{},recordEvent:()=>{},recordTiming:()=>{}},xRe=/([?&](token|access_token|id_token|authorization)=[^&]*)|\/messages\/[a-z0-9_-]+/gi,_Re=/\/reset-password\/[^/?#\s]+/gi;function tq(e){return e.replace(xRe,"[redacted]").replace(_Re,"/reset-password/[redacted]")}function IRe(e){const t=e.indexOf("?"),n=e.indexOf("#"),r=t===-1&&n===-1?e.length:t===-1?n:n===-1?t:Math.min(t,n);return tq(e.slice(0,r))}function ARe(e){const t=tq(e.message);if(t===e.message)return e;const n=new Error(t);return n.name=e.name,n.stack=e.stack,n}function RRe(e){return{recordPageView(t){e.recordPageView(IRe(t))},recordError(t,n){e.recordError(ARe(t)),n&&e.recordEvent("telemetry.error_context",n)},recordEvent(t,n){e.recordEvent(t,n??{})},recordTiming(t,n,r){e.recordEvent("telemetry.timing",{...r,name:t,durationMs:String(n)})}}}function W6(e){return e instanceof Error?e:new Error(String(e))}function TRe(e){window.addEventListener("error",t=>{e.recordError(W6(t.error??t.message))}),window.addEventListener("unhandledrejection",t=>{e.recordError(W6(t.reason))})}function ORe(){const{appMonitorId:e,identityPoolId:t,region:n}=Pu().rum;if(!e)return eq;const r=new ERe(e,"1.0.0",n,{sessionSampleRate:1,identityPoolId:t,endpoint:`https://dataplane.rum.${n}.amazonaws.com`,telemetries:["performance"],disableAutoPageView:!0,allowCookies:!1,enableXRay:!1}),o=RRe(r);return TRe(o),o}const MRe="remit.stale-build-reload:",PRe=({reload:e,guard:t,commit:n})=>{if(t===null)return!1;const r=`${MRe}${n}`;return t.getItem(r)!==null?!1:(t.setItem(r,String(Date.now())),e(),!0)},NRe=()=>{window.addEventListener("vite:preloadError",e=>{PRe({reload:()=>window.location.reload(),guard:QA(),commit:Ay})&&e.preventDefault()})},nq=_.createContext(eq);function e7e(){return _.useContext(nq)}const aA="remit.theme",kRe="dark";function G6(){return typeof localStorage>"u"?"system":localStorage.getItem(aA)??"system"}function lA(e){if(typeof document>"u")return;const t=e==="dark"||e==="system"&&typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.toggle(kRe,t)}function t7e(e){typeof localStorage<"u"&&(e==="system"?localStorage.removeItem(aA):localStorage.setItem(aA,e)),lA(e)}const DRe=()=>{if(typeof window>"u"||(lA(G6()),typeof window.matchMedia!="function"))return;const e=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{lA(G6())};typeof e.addEventListener=="function"?e.addEventListener("change",t):e.addListener(t)},LRe=e=>e==="true"||e==="false"||e==="null"||/^["[{]/.test(e)||e!==""&&Number.isFinite(Number(e));function K6(e){return typeof e=="object"&&e!==null?JSON.stringify(e):typeof e=="string"?LRe(e)?JSON.stringify(e):e:String(e)}function URe(e){const t=new URLSearchParams;for(const r of Object.keys(e)){const o=e[r];if(o!==void 0){if(Array.isArray(o)){for(const s of o)t.append(r,K6(s));continue}t.set(r,K6(o))}}const n=t.toString();return n===""?"":`?${n}`}const FRe=(e,t,n,r)=>{const o=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(o,"warn","react-i18next::",!0);Xa(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...o):console?.warn&&console.warn(...o)},Z6={},cA=(e,t,n,r)=>{Xa(n)&&Z6[n]||(Xa(n)&&(Z6[n]=new Date),FRe(e,t,n,r))},rq=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},uA=(e,t,n)=>{e.loadNamespaces(t,rq(e,n))},Y6=(e,t,n,r)=>{if(Xa(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return uA(e,n,r);n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,rq(e,r))},$Re=(e,t,n={})=>!t.languages||!t.languages.length?(cA(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,o)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!o(r.isLanguageChangingTo,e))return!1}}),Xa=e=>typeof e=="string",zRe=e=>typeof e=="object"&&e!==null,jRe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,BRe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},HRe=e=>BRe[e],qRe=e=>e.replace(jRe,HRe);let dA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:qRe};const VRe=(e={})=>{dA={...dA,...e}},WRe=()=>dA;let oq;const GRe=e=>{oq=e},KRe=()=>oq,ZRe={type:"3rdParty",init(e){VRe(e.options.react),GRe(e)}},YRe=_.createContext();class QRe{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const JRe=(e,t)=>{const n=_.useRef();return _.useEffect(()=>{n.current=e},[e,t]),n.current},sq=(e,t,n,r)=>e.getFixedT(t,n,r),XRe=(e,t,n,r)=>_.useCallback(sq(e,t,n,r),[e,t,n,r]),iq=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:o}=_.useContext(YRe)||{},s=n||r||KRe();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new QRe),!s){cA(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const O=(N,M)=>Xa(M)?M:zRe(M)&&Xa(M.defaultValue)?M.defaultValue:Array.isArray(N)?N[N.length-1]:N,D=[O,{},!1];return D.t=O,D.i18n={},D.ready=!1,D}s.options.react?.wait&&cA(s,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...WRe(),...s.options.react,...t},{useSuspense:c,keyPrefix:u}=a;let f=e||o||s.options?.defaultNS;f=Xa(f)?[f]:f||["translation"],s.reportNamespaces.addUsedNamespaces?.(f);const h=(s.isInitialized||s.initializedStoreOnce)&&f.every(O=>$Re(O,s,a)),m=XRe(s,t.lng||null,a.nsMode==="fallback"?f:f[0],u),g=()=>m,v=()=>sq(s,t.lng||null,a.nsMode==="fallback"?f:f[0],u),[C,b]=_.useState(g);let E=f.join();t.lng&&(E=`${t.lng}${E}`);const x=JRe(E),I=_.useRef(!0);_.useEffect(()=>{const{bindI18n:O,bindI18nStore:D}=a;I.current=!0,!h&&!c&&(t.lng?Y6(s,t.lng,f,()=>{I.current&&b(v)}):uA(s,f,()=>{I.current&&b(v)})),h&&x&&x!==E&&I.current&&b(v);const N=()=>{I.current&&b(v)};return O&&s?.on(O,N),D&&s?.store.on(D,N),()=>{I.current=!1,s&&O&&O?.split(" ").forEach(M=>s.off(M,N)),D&&s&&D.split(" ").forEach(M=>s.store.off(M,N))}},[s,E]),_.useEffect(()=>{I.current&&h&&b(g)},[s,u,h]);const R=[C,s,h];if(R.t=C,R.i18n=s,R.ready=h,h||!h&&!c)return R;throw new Promise(O=>{t.lng?Y6(s,t.lng,f,()=>O()):uA(s,f,()=>O())})},eTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts",...e,headers:{"Content-Type":"application/json",...e.headers}}),tTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/oauth/microsoft/start",...e,headers:{"Content-Type":"application/json",...e.headers}}),nTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/test-connection",...e,headers:{"Content-Type":"application/json",...e.headers}}),rTe=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...e}),oTe=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),sTe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...e}),iTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...e,headers:{"Content-Type":"application/json",...e.headers}}),aTe=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...e}),lTe=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),cTe=e=>(e.client??pe).put({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/folder-roles/{role}",...e,headers:{"Content-Type":"application/json",...e.headers}}),n7e=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels",...e}),uTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels",...e,headers:{"Content-Type":"application/json",...e.headers}}),dTe=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels/{labelId}",...e}),fTe=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels/{labelId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),hTe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...e}),pTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...e,headers:{"Content-Type":"application/json",...e.headers}}),r7e=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...e}),mTe=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),gTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/messages/rescan",...e,headers:{"Content-Type":"application/json",...e.headers}}),vTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize",...e,headers:{"Content-Type":"application/json",...e.headers}}),yTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/preview",...e,headers:{"Content-Type":"application/json",...e.headers}}),bTe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/{organizeJobId}",...e}),STe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync",...e}),CTe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync/status",...e}),wTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/trash/empty",...e}),ETe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/search",...e}),xTe=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/{addressId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),_Te=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events",...e}),ITe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events",...e,headers:{"Content-Type":"application/json",...e.headers}}),ATe=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events/{calendarObjectId}",...e}),RTe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events/{calendarObjectId}",...e}),TTe=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events/{calendarObjectId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),OTe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-free-busy",...e}),MTe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions",...e}),PTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions/{suggestionId}/accept",...e,headers:{"Content-Type":"application/json",...e.headers}}),NTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions/{suggestionId}/decline",...e}),kTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions/{suggestionId}/dismiss",...e,headers:{"Content-Type":"application/json",...e.headers}}),DTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions/{suggestionId}/reopen",...e}),LTe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks",...e}),UTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks",...e,headers:{"Content-Type":"application/json",...e.headers}}),FTe=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks/{calendarTaskId}",...e}),$Te=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks/{calendarTaskId}",...e}),zTe=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks/{calendarTaskId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),jTe=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars",...e}),BTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars",...e,headers:{"Content-Type":"application/json",...e.headers}}),HTe=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}",...e}),qTe=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),VTe=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}/feed",...e}),WTe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}/feed",...e}),GTe=e=>(e.client??pe).put({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}/feed",...e}),KTe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/classification-stats",...e}),ZTe=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config",...e}),YTe=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config/export",...e}),QTe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/config/import",...e,headers:{"Content-Type":"application/json",...e.headers}}),o7e=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads",...e}),JTe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads/search",...e}),XTe=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/me",...e,headers:{"Content-Type":"application/json",...e.headers}}),e2e=e=>(e?.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/me/export",...e}),t2e=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/quarantine",...e}),n2e=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/vip-suggestions",...e}),r2e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/delete",...e,headers:{"Content-Type":"application/json",...e.headers}}),o2e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/flags",...e,headers:{"Content-Type":"application/json",...e.headers}}),s2e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/labels",...e,headers:{"Content-Type":"application/json",...e.headers}}),i2e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/move",...e,headers:{"Content-Type":"application/json",...e.headers}}),s7e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/not-spam",...e,headers:{"Content-Type":"application/json",...e.headers}}),i7e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/report-spam",...e,headers:{"Content-Type":"application/json",...e.headers}}),a2e=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}",...e}),l2e=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/calendar-suggestions",...e}),c2e=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/flags",...e,headers:{"Content-Type":"application/json",...e.headers}}),u2e=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/raw",...e}),d2e=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...e}),f2e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...e,headers:{"Content-Type":"application/json",...e.headers}}),h2e=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...e}),p2e=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...e}),m2e=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),g2e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/attachments",...e,headers:{"Content-Type":"application/json",...e.headers}}),v2e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/attachments/{outboxAttachmentId}/complete",...e}),y2e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/send",...e}),b2e=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/people",...e}),a7e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/people/step-up",...e,headers:{"Content-Type":"application/json",...e.headers}}),l7e=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/people/{userId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),c7e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/people/{userId}/password-reset",...e,headers:{"Content-Type":"application/json",...e.headers}}),u7e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/people/{userId}/sign-out",...e,headers:{"Content-Type":"application/json",...e.headers}}),S2e=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/settings",...e}),C2e=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/settings",...e,headers:{"Content-Type":"application/json",...e.headers}}),w2e=e=>(e?.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/settings/classification-provider",...e}),E2e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/settings/classification-test",...e,headers:{"Content-Type":"application/json",...e.headers}}),aq=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/system/update",...e}),x2e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/system/update",...e,headers:{"Content-Type":"application/json",...e.headers}}),_2e=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads",...e}),I2e=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads/{threadId}/messages",...e}),d7e=e=>({mutationFn:async n=>{const{data:r}=await eTe({...e,...n,throwOnError:!0});return r}}),yt=(e,t,n,r)=>{const o={_id:e,baseUrl:t?.baseUrl||(t?.client??pe).getConfig().baseUrl};return t?.body&&(o.body=t.body),t?.headers&&(o.headers=t.headers),t?.path&&(o.path=t.path),t?.query&&(o.query=t.query),[o]},f7e=e=>({mutationFn:async n=>{const{data:r}=await tTe({...e,...n,throwOnError:!0});return r}}),h7e=e=>({mutationFn:async n=>{const{data:r}=await nTe({...e,...n,throwOnError:!0});return r}}),p7e=e=>({mutationFn:async n=>{const{data:r}=await rTe({...e,...n,throwOnError:!0});return r}}),m7e=e=>({mutationFn:async n=>{const{data:r}=await oTe({...e,...n,throwOnError:!0});return r}}),A2e=e=>yt("filterOperationsListFilters",e),g7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await sTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:A2e(e)}),v7e=e=>({mutationFn:async n=>{const{data:r}=await iTe({...e,...n,throwOnError:!0});return r}}),y7e=e=>({mutationFn:async n=>{const{data:r}=await aTe({...e,...n,throwOnError:!0});return r}}),b7e=e=>yt("filterDetailOperationsGetFilter",e),S7e=e=>({mutationFn:async n=>{const{data:r}=await lTe({...e,...n,throwOnError:!0});return r}}),R2e=e=>({mutationFn:async n=>{const{data:r}=await cTe({...e,...n,throwOnError:!0});return r}}),C7e=e=>yt("labelOperationsListLabels",e),w7e=e=>({mutationFn:async n=>{const{data:r}=await uTe({...e,...n,throwOnError:!0});return r}}),E7e=e=>({mutationFn:async n=>{const{data:r}=await dTe({...e,...n,throwOnError:!0});return r}}),x7e=e=>({mutationFn:async n=>{const{data:r}=await fTe({...e,...n,throwOnError:!0});return r}}),o2=e=>yt("mailboxOperationsListMailboxes",e),fA=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await hTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:o2(e)}),T2e=e=>({mutationFn:async n=>{const{data:r}=await pTe({...e,...n,throwOnError:!0});return r}}),_7e=e=>({mutationFn:async n=>{const{data:r}=await mTe({...e,...n,throwOnError:!0});return r}}),I7e=e=>({mutationFn:async n=>{const{data:r}=await vTe({...e,...n,throwOnError:!0});return r}}),A7e=e=>({mutationFn:async n=>{const{data:r}=await yTe({...e,...n,throwOnError:!0});return r}}),O2e=e=>yt("organizeJobDetailOperationsGetOrganizeJob",e),R7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await bTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:O2e(e)}),T7e=e=>({mutationFn:async n=>{const{data:r}=await STe({...e,...n,throwOnError:!0});return r}}),M2e=e=>yt("syncOperationsGetSyncStatus",e),O7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await CTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:M2e(e)}),M7e=e=>({mutationFn:async n=>{const{data:r}=await wTe({...e,...n,throwOnError:!0});return r}}),P2e=e=>yt("addressOperationsSearchAddresses",e),P7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await ETe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:P2e(e)}),N7e=e=>({mutationFn:async n=>{const{data:r}=await xTe({...e,...n,throwOnError:!0});return r}}),N2e=e=>yt("calendarEventOperationsListCalendarEvents",e),k7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await _Te({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:N2e(e)}),D7e=e=>({mutationFn:async n=>{const{data:r}=await ITe({...e,...n,throwOnError:!0});return r}}),L7e=e=>({mutationFn:async n=>{const{data:r}=await ATe({...e,...n,throwOnError:!0});return r}}),k2e=e=>yt("calendarEventDetailOperationsGetCalendarEvent",e),U7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await RTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:k2e(e)}),F7e=e=>({mutationFn:async n=>{const{data:r}=await TTe({...e,...n,throwOnError:!0});return r}}),D2e=e=>yt("calendarFreeBusyOperationsListCalendarFreeBusy",e),$7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await OTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:D2e(e)}),L2e=e=>yt("calendarSuggestionOperationsListCalendarSuggestions",e),z7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await MTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:L2e(e)}),j7e=e=>({mutationFn:async n=>{const{data:r}=await PTe({...e,...n,throwOnError:!0});return r}}),B7e=e=>({mutationFn:async n=>{const{data:r}=await NTe({...e,...n,throwOnError:!0});return r}}),H7e=e=>({mutationFn:async n=>{const{data:r}=await kTe({...e,...n,throwOnError:!0});return r}}),q7e=e=>({mutationFn:async n=>{const{data:r}=await DTe({...e,...n,throwOnError:!0});return r}}),U2e=e=>yt("calendarTaskOperationsListCalendarTasks",e),V7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await LTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:U2e(e)}),W7e=e=>({mutationFn:async n=>{const{data:r}=await UTe({...e,...n,throwOnError:!0});return r}}),G7e=e=>({mutationFn:async n=>{const{data:r}=await FTe({...e,...n,throwOnError:!0});return r}}),F2e=e=>yt("calendarTaskDetailOperationsGetCalendarTask",e),K7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await $Te({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:F2e(e)}),Z7e=e=>({mutationFn:async n=>{const{data:r}=await zTe({...e,...n,throwOnError:!0});return r}}),$2e=e=>yt("calendarOperationsListCalendars",e),Y7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await jTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:$2e(e)}),Q7e=e=>({mutationFn:async n=>{const{data:r}=await BTe({...e,...n,throwOnError:!0});return r}}),J7e=e=>({mutationFn:async n=>{const{data:r}=await HTe({...e,...n,throwOnError:!0});return r}}),X7e=e=>({mutationFn:async n=>{const{data:r}=await qTe({...e,...n,throwOnError:!0});return r}}),eje=e=>({mutationFn:async n=>{const{data:r}=await VTe({...e,...n,throwOnError:!0});return r}}),z2e=e=>yt("calendarDetailOperationsGetCalendarFeed",e),tje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await WTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:z2e(e)}),nje=e=>({mutationFn:async n=>{const{data:r}=await GTe({...e,...n,throwOnError:!0});return r}}),j2e=e=>yt("classificationStatsOperationsGetClassificationStats",e),rje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await KTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:j2e(e)}),lq=e=>yt("configOperationsGetConfig",e),s2=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await ZTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:lq(e)}),B2e=e=>yt("configOperationsExportConfig",e),oje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await YTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:B2e(e)}),sje=e=>({mutationFn:async n=>{const{data:r}=await QTe({...e,...n,throwOnError:!0});return r}}),H2e=e=>yt("threadOperationsListThreads",e),cq=e=>yt("threadOperationsSearchThreads",e),ije=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await JTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:cq(e)}),aje=e=>({mutationFn:async n=>{const{data:r}=await XTe({...e,...n,throwOnError:!0});return r}}),lje=e=>({mutationFn:async n=>{const{data:r}=await e2e({...e,...n,throwOnError:!0});return r}}),q2e=e=>yt("meOperationsListQuarantine",e),V2e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await t2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:q2e(e)}),W2e=e=>yt("meOperationsListVipSuggestions",e),cje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await n2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:W2e(e)}),uje=e=>({mutationFn:async n=>{const{data:r}=await r2e({...e,...n,throwOnError:!0});return r}}),dje=e=>({mutationFn:async n=>{const{data:r}=await o2e({...e,...n,throwOnError:!0});return r}}),fje=e=>({mutationFn:async n=>{const{data:r}=await s2e({...e,...n,throwOnError:!0});return r}}),hje=e=>({mutationFn:async n=>{const{data:r}=await i2e({...e,...n,throwOnError:!0});return r}}),G2e=e=>yt("messageOperationsDescribeMessage",e),pje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await a2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:G2e(e)}),K2e=e=>yt("messageCalendarSuggestionOperationsListMessageCalendarSuggestions",e),mje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await l2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:K2e(e)}),gje=e=>({mutationFn:async n=>{const{data:r}=await c2e({...e,...n,throwOnError:!0});return r}}),Z2e=e=>yt("messageOperationsGetRawMessage",e),vje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await u2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Z2e(e)}),uq=e=>yt("outboxOperationsListOutboxMessages",e),yje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await d2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:uq(e)}),bje=e=>({mutationFn:async n=>{const{data:r}=await f2e({...e,...n,throwOnError:!0});return r}}),Sje=e=>({mutationFn:async n=>{const{data:r}=await h2e({...e,...n,throwOnError:!0});return r}}),Y2e=e=>yt("outboxDetailOperationsGetOutboxMessage",e),Q2e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await p2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Y2e(e)}),Cje=e=>({mutationFn:async n=>{const{data:r}=await m2e({...e,...n,throwOnError:!0});return r}}),wje=e=>({mutationFn:async n=>{const{data:r}=await g2e({...e,...n,throwOnError:!0});return r}}),Eje=e=>({mutationFn:async n=>{const{data:r}=await v2e({...e,...n,throwOnError:!0});return r}}),xje=e=>({mutationFn:async n=>{const{data:r}=await y2e({...e,...n,throwOnError:!0});return r}}),J2e=e=>yt("peopleOperationsListPeople",e),X2e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await b2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:J2e(e)}),eOe=e=>yt("userSettingsOperationsGetUserSettings",e),_je=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await S2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:eOe(e)}),Ije=e=>({mutationFn:async n=>{const{data:r}=await C2e({...e,...n,throwOnError:!0});return r}}),Aje=e=>({mutationFn:async n=>{const{data:r}=await w2e({...e,...n,throwOnError:!0});return r}}),Rje=e=>({mutationFn:async n=>{const{data:r}=await E2e({...e,...n,throwOnError:!0});return r}}),hA=e=>yt("systemOperationsGetSystemUpdate",e),tOe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await aq({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:hA(e)}),nOe=e=>({mutationFn:async n=>{const{data:r}=await x2e({...e,...n,throwOnError:!0});return r}}),dq=e=>yt("unifiedThreadOperationsListAllThreads",e),rOe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await _2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:dq(e)}),fq=e=>yt("threadDetailOperationsListThreadMessages",e),Tje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await I2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:fq(e)}),hq=_.createContext(void 0),oOe=2e3,sOe=6e4,iOe=e=>e==="unfiled"||e==="failed"||e==="blocked",aOe=Py(404),Q6=(e,t)=>iOe(e)||t!=null,lOe=({children:e})=>{const[t,n]=_.useState(),r=ia(),{data:o,error:s}=fl({...Q2e({path:{outboxMessageId:t??""}}),enabled:!!t,meta:aOe,retry:(g,v)=>!zz(v)&&g<1,refetchInterval:g=>Q6(g.state.data?.status,g.state.error)?!1:oOe}),a=_.useCallback(()=>{n(void 0),r.invalidateQueries({queryKey:uq()})},[r]);_.useEffect(()=>{t&&Q6(o?.status,s)&&a()},[o,s,t,a]),_.useEffect(()=>{if(!t)return;const g=setTimeout(a,sOe);return()=>clearTimeout(g)},[t,a]);const c=_.useCallback(g=>{n(g)},[]),u=_.useRef(new Map),f=_.useCallback((g,v)=>{const C=u.current.get(g);return C?(C(v),!0):!1},[]),h=_.useCallback((g,v)=>(u.current.set(g,v),()=>{u.current.get(g)===v&&u.current.delete(g)}),[]),m=_.useMemo(()=>({startSendPolling:c,insertIntoOpenReply:f,registerOpenReply:h}),[c,f,h]);return T.jsx(hq.Provider,{value:m,children:e})},Oje=()=>{const e=_.useContext(hq);if(!e)throw new Error("useCompose must be used within a ComposeProvider");return e};function pA(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function J6(e,t="|"){return e.map(n=>bq(n)).join(t)}function mA(e,t){return typeof t=="bigint"?t.toString():t}class cOe{constructor(t){this._getter=t,this._value=void 0}get value(){const t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}}function i2(e){return new cOe(e)}function uOe(e){return e==null}function a2(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function dOe(e,t){const n=e/t,r=Math.round(n),o=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}const X6=Symbol("evaluating");function fOe(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==X6)return r===void 0&&(r=X6,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function aa(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function pq(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function Ks(e){return pq(e._zod.def)??e._zod.def.shape}function mq(e,t,n){Object.defineProperty(e,t,{get(){const r=n();return aa(this,t,r),r},enumerable:!0,configurable:!0})}function gq(e,t,n){t in e?aa(e,t,n):e[t]=n}function pl(e,t,n,r){const o=Ks(t);for(const s of n){const a=Object.getOwnPropertyDescriptor(o,s);a.enumerable&&(a.get?mq(e,s,()=>{const c=t._zod.def.shape[s];return r?r(c,s):c}):gq(e,s,r?r(a.value,s):a.value))}}function hOe(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?mq(e,n,()=>t[n]):gq(e,n,r.value))}}function Fr(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function pOe(e){return JSON.stringify(e)}function mOe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const vq="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Yv(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const gOe=i2(()=>{if(To.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function yu(e){if(Yv(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Yv(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function yq(e){return yu(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const vOe=new Set(["string","number","symbol"]);function bu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function la(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Ne(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function bq(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function yOe(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const Sq={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},bOe={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function SOe(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s={};return pl(s,e,Mb(e,t)),la(e,Fr(n,{shape:s,checks:[]}))}function Mb(e,t){const n=Ks(e),r=[];for(const o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&r.push(o)}return r}function COe(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=new Set(Mb(e,t)),a={};return pl(a,e,Reflect.ownKeys(Ks(e)).filter(c=>!s.has(c))),la(e,Fr(n,{shape:a,checks:[]}))}function wOe(e,t){if(!yu(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=Ks(e);for(const s of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return la(e,Fr(e._zod.def,{shape:Cq(e,t)}))}function Cq(e,t){const n={};return pl(n,e,Reflect.ownKeys(Ks(e))),hOe(n,t),n}function EOe(e,t){if(!yu(t))throw new Error("Invalid input to safeExtend: expected a plain object");return la(e,Fr(e._zod.def,{shape:Cq(e,t)}))}function xOe(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};pl(n,e,Reflect.ownKeys(Ks(e))),pl(n,t,Reflect.ownKeys(Ks(t)));const r=Fr(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return la(e,r)}function e8(e,t,n,r="partial"){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const c=n?new Set(Mb(t,n)):void 0,u={};return pl(u,t,Reflect.ownKeys(Ks(t)),e&&((f,h)=>c&&!c.has(h)?f:new e({type:"optional",innerType:f}))),la(t,Fr(t._zod.def,{shape:u,checks:[]}))}function _Oe(e,t,n){const r=n?new Set(Mb(t,n)):void 0,o={};return pl(o,t,Reflect.ownKeys(Ks(t)),(s,a)=>r&&!r.has(a)?s:new e({type:"nonoptional",innerType:s})),la(t,Fr(t._zod.def,{shape:o}))}function Ls(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function IOe(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Wc(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function lf(e){return typeof e=="string"?e:e?.message}function t8(e){const t=[];for(const n of e??[]){const r=n._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const o=r.maximum??r.length??r.size;o>=0&&t.push([o,n])}return t}function gA(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function ta(e,t,n){var r;const o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const s=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:lf(e.inst?._zod.def?.error?.(e))??lf(s?.(e))??lf(t?.error?.(e))??lf(n.customError?.(e))??lf(n.localeError?.(e))??"Invalid input",c={};for(const u of Object.keys(e))u==="inst"||u==="schema"||u==="continue"||u==="input"||u==="__proto__"||(c[u]=e[u]);return c.path??(c.path=[]),c.message=a,t?.reportInput&&(c.input=e.input),c}const AOe=/[\uD800-\uDBFF]/;function l2(e){const t=e.length;if(!AOe.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function c2(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ROe(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function ph(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function TOe(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):OOe(e,n,r.value)}}function na(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function wq(e,t,n){return na(e,t,n,!1)}function Eq(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return na(this,n,r(this))},set(o){na(this,n,o)}})}return t}function OOe(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:na(this,t,n.bind(this))},set(r){na(this,t,r)}})}function MOe(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let i_,Ni=!1;const POe={configurable:!0,get(){Ni=!0}};function ut(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&i_!==e._zod){i_=void 0;return}i_=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,POe);const o=Ni;Ni=!1;try{const s=n(this);return Ni?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:s}),Ni=Ni||o,s}catch(s){throw delete this[t],Ni=Ni||o,s}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function NOe(e,t,n,r){const o=MOe(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){const s={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,s),s.value=n(this),Object.defineProperty(this,t,s),s.value},set(s){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:s})}})}const kOe="~constantCatch";function DOe(e){const t=()=>e;return t[kOe]=!0,t}var n8;const a_={value:void 0,enumerable:!1};let r8="captureStackTrace"in Error?Error:null;function LOe(e){const t=r8;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return r8=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function re(e,t,n,r){const o={};function s(g){this.def=g,this.constr=m,this.traits=new Set}s.prototype=o;const a=n,c=a&&new WeakSet;function u(g,v){if(g._zod){if(g._zod.traits.has(e))return}else{a_.value=new s(v);try{Object.defineProperty(g,"_zod",a_)}finally{a_.value=void 0}}if(g._zod.traits.add(e),t(g,v),c){const b=Object.getPrototypeOf(g),E=g._zod.constr.prototype;let x=b;for(;x&&x!==E;)x=Object.getPrototypeOf(x);const I=x??b;c.has(I)||(c.add(I),TOe(I,a))}const C=m.prototype;for(const b in C)Object.prototype.hasOwnProperty.call(C,b)&&(b in g||(g[b]=C[b].bind(g)))}const f=r?.Parent??Object;class h extends f{}Object.defineProperty(h,"name",{value:e});function m(g){const v=r?.Parent?LOe(h):this;u(v,g);const C=v._zod.deferred;if(C){for(const E of C)E();v._zod.deferred=void 0}const b=globalThis.__zod_globalConfig?.postProcessor;return b&&b(v),v}return Object.defineProperty(m,"init",{value:u}),Object.defineProperty(m,Symbol.hasInstance,{value:g=>r?.Parent&&g instanceof r.Parent?!0:g?._zod?.traits?.has(e)}),Object.defineProperty(m,"name",{value:e}),m}class el extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class xq extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(n8=globalThis).__zod_globalConfig??(n8.__zod_globalConfig={});const To=globalThis.__zod_globalConfig;function Xo(e){return e&&Object.assign(To,e),To}function UOe(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,mA,2)),e.message}function FOe(e){this._zod.message=e}const $Oe={get:UOe,set:FOe,enumerable:!0,configurable:!0},l_={value:void 0,enumerable:!1},o8=new WeakSet([Object.prototype,Error.prototype]),_q=(e,t)=>{e.name="$ZodError",l_.value=t,Object.defineProperty(e,"issues",l_),l_.value=void 0,Object.defineProperty(e,"message",$Oe);const n=Object.getPrototypeOf(e);o8.has(n)||(o8.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},zOe=re("$ZodError",_q),Iq=re("$ZodError",_q,void 0,{Parent:Error});function jOe(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function BOe(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?jOe(n,o.path[0],()=>[]).push(t(o)):r.push(t(o));return{formErrors:r,fieldErrors:n}}function HOe(e,t=n=>n.message){const n={_errors:[]},r=(o,s=[])=>{for(const a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>r({issues:c},[...s,...a.path]));else if(a.code==="invalid_key")r({issues:a.issues},[...s,...a.path]);else if(a.code==="invalid_element")r({issues:a.issues},[...s,...a.path]);else{const c=[...s,...a.path];if(c.length===0)n._errors.push(t(a));else{let u=n,f=0;for(;f<c.length;){const h=c[f],m=f===c.length-1;if(h==="_errors"){m&&u._errors.push(t(a)),f++;continue}Object.prototype.hasOwnProperty.call(u,h)||Object.defineProperty(u,h,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const g=u[h];m&&g._errors.push(t(a)),u=g,f++}}}};return r(e),n}function Pb(e,t){return{callee:t?.callee??e,Err:t?.Err}}const Nb=e=>{const t=(n,r,o,s)=>{const a=o?{...o,async:!1}:{async:!1},c=n._zod.run({value:r,issues:[]},a);if(c instanceof Promise)throw new el;if(c.issues.length){const u=new(s?.Err??e)(c.issues.map(f=>ta(f,a,Xo())));throw vq(u,s?.callee??t),u}return c.value};return t},Mje=Nb(Iq),kb=e=>{const t=async(n,r,o,s)=>{const a=o?{...o,async:!0}:{async:!0};let c=n._zod.run({value:r,issues:[]},a);if(c instanceof Promise&&(c=await c),c.issues.length){const u=new(s?.Err??e)(c.issues.map(f=>ta(f,a,Xo())));throw vq(u,s?.callee??t),u}return c.value};return t},Pje=kb(Iq),u2=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new el;return s.issues.length?Aq(e,s.issues,o):{success:!0,data:s.value}};function Aq(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(o=>ta(o,n,Xo()))),t=void 0,n=void 0),r},set error(o){r=o,t=void 0,n=void 0}}}const d2=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?Aq(e,s.issues,o):{success:!0,data:s.value}},qOe=Symbol.for("zod.compile.invalid"),VOe=Symbol.for("zod.compile.fallback"),WOe=((e,t,n)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==qOe)return!0;if(r.definite===!0&&n===void 0)return!1}return GOe(e,t,n)});function GOe(e,t,n){const r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;let s;if(o?(r[VOe]=!0,s=o({value:t,issues:[]},r)):s=e._zod.run({value:t,issues:[]},r),s instanceof Promise)throw new el;return s.issues.length===0}const KOe=async(e,t,n)=>{const r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=e._zod.run({value:t,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},ZOe=e=>{const t=Nb(e),n=(r,o,s,a)=>{const c=s?{...s,direction:"backward"}:{direction:"backward"};return t(r,o,c,Pb(n,a))};return n},YOe=e=>{const t=Nb(e),n=(r,o,s,a)=>t(r,o,s,Pb(n,a));return n},QOe=e=>{const t=kb(e),n=async(r,o,s,a)=>{const c=s?{...s,direction:"backward"}:{direction:"backward"};return await t(r,o,c,Pb(n,a))};return n},JOe=e=>{const t=kb(e),n=async(r,o,s,a)=>await t(r,o,s,Pb(n,a));return n},XOe=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return u2(e)(t,n,o)},eMe=e=>(t,n,r)=>u2(e)(t,n,r),tMe=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return d2(e)(t,n,o)},nMe=e=>async(t,n,r)=>d2(e)(t,n,r),rMe=/^[cC][0-9a-z]{6,}$/,oMe=/^[0-9a-z]+$/,sMe=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,iMe=/^[0-9a-vA-V]{20}$/,aMe=/^[A-Za-z0-9]{27}$/,lMe=/^[a-zA-Z0-9_-]{21}$/;function cMe(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const uMe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,dMe=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,s8=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,fMe=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,hMe="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function pMe(){return new RegExp(hMe,"u")}const mMe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,gMe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,vMe=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,yMe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bMe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,SMe=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,CMe=/^https?$/,wMe=/^\+[1-9]\d{6,14}$/,Rq="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function EMe(e){return new RegExp(`^${e}$`)}const xMe=EMe(Rq);function vA(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function _Me(e){return new RegExp(`^${vA(e)}$`)}function IMe(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${vA({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${vA({precision:e.precision})}`:n;return new RegExp(`^${Rq}T(?:${r})$`)}const AMe=/^[\s\S]{0,}$/,RMe=/^-?\d+$/,f2=/^-?\d+(?:\.\d+)?$/,TMe=/^(?:true|false)$/i,OMe=/^null$/i,MMe=/^[^A-Z]*$/,PMe=/^[^a-z]*$/,Ir=re("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),h2=e=>{const t=e.value;return!uOe(t)&&t.length!==void 0},Qv={number:"number",bigint:"bigint",object:"date"},Tq=re("$ZodCheckLessThan",(e,t)=>{Ir.init(e,t);const n=Qv[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Qv[typeof r.value]??n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Oq=re("$ZodCheckGreaterThan",(e,t)=>{Ir.init(e,t);const n=Qv[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Qv[typeof r.value]??n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),NMe=re("$ZodCheckMultipleOf",(e,t)=>{Ir.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):dOe(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),kMe=re("$ZodCheckNumberFormat",(e,t)=>{Ir.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=Sq[t.format];e._zod.check=a=>{const c=a.value;if(n){if(!Number.isInteger(c)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}c<o&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>s&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),DMe=re("$ZodCheckMaxLength",(e,t)=>{var n;Ir.init(e,t),(n=e._zod.def).when??(n.when=h2),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>t.maximum?l2(o):s)<=t.maximum)return;const c=c2(o);r.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),LMe=re("$ZodCheckMinLength",(e,t)=>{var n;Ir.init(e,t),(n=e._zod.def).when??(n.when=h2),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>=t.minimum&&s<t.minimum*2?l2(o):s)>=t.minimum)return;const c=c2(o);r.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),UMe=re("$ZodCheckLengthEquals",(e,t)=>{var n;Ir.init(e,t),(n=e._zod.def).when??(n.when=h2),e._zod.check=r=>{const o=r.value,s=o.length,a=typeof o=="string"&&s>=t.length&&s<=t.length*2?l2(o):s;if(a===t.length)return;const c=c2(o),u=a>t.length;r.issues.push({origin:c,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Db=re("$ZodCheckStringFormat",(e,t)=>{var n,r;Ir.init(e,t),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),FMe=re("$ZodCheckRegex",(e,t)=>{Db.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),$Me=re("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=MMe),Db.init(e,t)}),zMe=re("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=PMe),Db.init(e,t)}),jMe=re("$ZodCheckIncludes",(e,t)=>{Ir.init(e,t);const n=bu(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),BMe=re("$ZodCheckStartsWith",(e,t)=>{Ir.init(e,t);const n=new RegExp(`^${bu(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),HMe=re("$ZodCheckEndsWith",(e,t)=>{Ir.init(e,t);const n=new RegExp(`.*${bu(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),qMe=re("$ZodCheckOverwrite",(e,t)=>{Ir.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class VMe{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
158
- `).filter(a=>a),o=Math.min(...r.map(a=>a.length-a.trimStart().length)),s=r.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(const a of s)this.content.push(a)}compile(){const t=Function,n=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
159
- ${n.join(`
160
- `)}
161
- };`)(...Object.values(this.closed))}}const WMe={major:4,minor:6,patch:7},Zt=re("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=WMe;const r=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(const s of o)for(const a of s._zod.onattach)a(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(c,u,f)=>{if(c.memo)return c;let h=Ls(c),m;for(const g of u){if(g._zod.def.when){if(IOe(c)||!g._zod.def.when(c))continue}else if(h)continue;const v=c.issues.length,C=g._zod.check(c);if(C instanceof Promise&&f?.async===!1)throw new el;if(m||C instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await C,c.issues.length!==v&&(gA(c.issues,v,e),h||(h=Ls(c,v)))});else{if(c.issues.length===v)continue;gA(c.issues,v,e),h||(h=Ls(c,v))}}return m?m.then(()=>c):c},a=(c,u,f)=>{if(Ls(c))return c.aborted=!0,c;const h=s(u,o,f);if(h instanceof Promise){if(f.async===!1)throw new el;return h.then(m=>e._zod.parse(m,f))}return e._zod.parse(h,f)};e._zod.run=(c,u)=>{if(u.skipChecks)return e._zod.parse(c,u);if(u.direction==="backward"){const h=e._zod.parse({value:c.value,issues:[]},{...u,skipChecks:!0});return h instanceof Promise?h.then(m=>a(m,c,u)):a(h,c,u)}const f=e._zod.parse(c,u);if(f instanceof Promise){if(u.async===!1)throw new el;return f.then(h=>s(h,o,u))}return s(f,o,u)}}},{get"~standard"(){return wq(this,"~standard",Pq(this))},set"~standard"(e){na(this,"~standard",e)}}),Mq=(e,t)=>e.issues.length?{issues:e.issues.map(n=>ta(n,t,Xo()))}:{value:e.value};async function GMe(e,t){const n={async:!0};return Mq(await e._zod.run({value:t,issues:[]},n),n)}function Pq(e){return{validate:t=>{const n={async:!1};try{const r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Mq(r,n)}catch{}return GMe(e,t)},vendor:"zod",version:1}}const p2=re("$ZodString",(e,t)=>{Zt.init(e,t),e._zod.pattern=t.pattern??AMe,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),nn=re("$ZodStringFormat",(e,t)=>{Db.init(e,t),p2.init(e,t)}),KMe=re("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=dMe),nn.init(e,t)}),ZMe=re("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=s8(r))}else t.pattern??(t.pattern=s8());nn.init(e,t)}),YMe=re("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=fMe),nn.init(e,t)}),Nq=1,Jv=2;function kq(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function QMe(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?kq(e)||Jv:JMe(e,t)}function JMe(e,t){if(!t.normalize&&t.protocol?.source===CMe.source&&!/^https?:\/\//i.test(e))return Nq;try{if(typeof URL<"u"){const n=URL;if(typeof n.parse=="function")return n.parse(e)??Jv}return new URL(e)}catch{return Jv}}const XMe=/[\t\n\r]/g;function i8(e){return e.replace(XMe,"")}function ePe(e,t){return t.lastIndex=0,t.test(e.hostname)}function tPe(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const nPe=re("$ZodURL",(e,t)=>{nn.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=QMe(r,t);if(o===Nq){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}if(o===Jv){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});return}if(o===!0){n.value=i8(r);return}t.hostname&&!ePe(o,t.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!tPe(o,t.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?o.href:i8(r);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),rPe=re("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=pMe()),nn.init(e,t)}),oPe=re("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?lMe:cMe(t.length)),nn.init(e,t)}),sPe=re("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=rMe),nn.init(e,t)}),iPe=re("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=oMe),nn.init(e,t)}),aPe=re("$ZodULID",(e,t)=>{t.pattern??(t.pattern=sMe),nn.init(e,t)}),lPe=re("$ZodXID",(e,t)=>{t.pattern??(t.pattern=iMe),nn.init(e,t)}),cPe=re("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=aMe),nn.init(e,t)}),uPe=re("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=IMe(t)),nn.init(e,t)}),dPe=re("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=xMe),nn.init(e,t)}),fPe=re("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=_Me(t)),nn.init(e,t)}),hPe=re("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=uMe),nn.init(e,t)}),pPe=re("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=mMe),nn.init(e,t)}),mPe=/^[0-9a-fA-F:.]+$/;function Dq(e){return mPe.test(e)?kq(`http://[${e}]`):!1}const gPe=re("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=gMe),nn.init(e,t),e._zod.check=n=>{Dq(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),vPe=re("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=vMe),nn.init(e,t)});function yPe(e){const t=e.split("/");if(t.length!==2)return!1;const[n,r]=t;if(!r)return!1;const o=Number(r);return`${o}`!==r||o<0||o>128?!1:Dq(n)}const bPe=re("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=yMe),nn.init(e,t),e._zod.check=n=>{yPe(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function Lq(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Uq=/^[0-9a-zA-Z+/]*={0,2}$/,SPe=re("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Uq),nn.init(e,t),e._zod.check=n=>{Lq(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),m2=/^[A-Za-z0-9_-]*$/;function CPe(e){if(!m2.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Lq(n)}const wPe=re("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=m2),nn.init(e,t),e._zod.check=n=>{CPe(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),EPe=re("$ZodE164",(e,t)=>{t.pattern??(t.pattern=wMe),nn.init(e,t)});function xPe(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const _Pe=re("$ZodJWT",(e,t)=>{nn.init(e,t),e._zod.check=n=>{xPe(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Fq=re("$ZodNumber",(e,t)=>{Zt.init(e,t),e._zod.pattern=f2,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),n}}),IPe=re("$ZodNumberFormat",(e,t)=>{kMe.init(e,t),Fq.init(e,t)}),APe=re("$ZodBoolean",(e,t)=>{Zt.init(e,t),e._zod.pattern=TMe,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),RPe=re("$ZodNull",(e,t)=>{Zt.init(e,t),e._zod.pattern=OMe,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),n}}),TPe=re("$ZodUnknown",(e,t)=>{Zt.init(e,t),e._zod.parse=n=>n}),OPe=re("$ZodNever",(e,t)=>{Zt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function MPe(e,t){const n=t8(e._zod.def.checks);if(!n.length)return;const r=Math.min(...n.map(s=>s[0])),o=e._zod.parse;e._zod.parse=(s,a)=>{const c=t(s.value);if(c>r&&!a?.skipChecks&&a?.direction!=="backward"){for(const[u,f]of t8(e._zod.def.checks))if(c>u&&f._zod.def.when(s)){const h=s.issues.length;return f._zod.check(s),s.issues[h].continue=!1,gA(s.issues,h,e),s}}return o(s,a)}}const PPe=e=>Array.isArray(e)?e.length:-1;function a8(e,t,n){e.issues.length&&t.issues.push(...Wc(n,e.issues)),t.value[n]=e.value}const NPe=re("$ZodArray",(e,t)=>{Zt.init(e,t);const n=To.memoizer;n?.attach(e),e._zod.parse=(r,o)=>{const s=r.value;if(!Array.isArray(s))return r.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),r;r.value=n?n.alloc(e,r,Array(s.length),o):Array(s.length);const a=[],c=o?.abortEarly;for(let u=0;u<s.length;u++){const f=s[u],h=t.element._zod.run({value:f,issues:[]},o);if(h instanceof Promise)a.push(h.then(m=>a8(m,r,u)));else if(a8(h,r,u),c&&h.issues.length!==0&&Ls(h))break}return a.length?Promise.all(a).then(()=>r):r},MPe(e,PPe)});function Xv(e,t,n,r,o,s){const a=n in r,c=s==="optional";if(!(!a&&c&&o==="optional")){if(e.issues.length){if(o!==void 0&&c&&!a)return;t.issues.push(...Wc(n,e.issues))}if(!a&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?(a||o==="defaulted"&&!c)&&(t.value[n]=void 0):t.value[n]=e.value}}const kPe=[];function $q(e){const t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:kPe,o=r.length?[...t,...r]:t;for(const a of o)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);const s=yOe(e.shape);return{...e,allKeys:o,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(s)}}function zq(e,t,n,r,o,s,a){const c=[],u=o.keySet,f=o.catchall._zod,h=f.def.type,m=f.optin,g=f.optout;let v=0;for(const C in t){if(a&&n.issues.length!==v){if(Ls(n,v))break;v=n.issues.length}if(u.has(C))continue;if(C==="__proto__"){h==="never"&&c.push(C);continue}if(h==="never"){c.push(C);continue}const b=f.run({value:t[C],issues:[]},r);b instanceof Promise?e.push(b.then(E=>Xv(E,n,C,t,m,g))):Xv(b,n,C,t,m,g)}return c.length&&n.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:s,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const DPe=re("$ZodObject",(e,t)=>{Zt.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape"),r=n?.get?n.get.raw:t.shape??{};if(r){const f=()=>{const h={...r};return Object.defineProperty(t,"shape",{value:h}),f.raw=h,h};f.raw=r,Object.defineProperty(t,"shape",{get:f})}const o=i2(()=>$q(t));ut(e,"propValues",f=>{const h=f.def.shape,m={};for(const g in h){const v=h[g]._zod;if(v.values){Object.prototype.hasOwnProperty.call(m,g)||aa(m,g,new Set);for(const C of v.values)m[g].add(C);v.optin!==void 0&&m[g].add(void 0)}}return m});const s=Yv,a=t.catchall;let c;const u=To.memoizer;u?.attach(e),e._zod.parse=(f,h)=>{c??(c=o.value);const m=f.value;if(!s(m))return f.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),f;f.value=u?u.alloc(e,f,{},h):{};const g=[],v=c.shape,C=h?.abortEarly;let b=f.issues.length;for(const E of c.allKeys){if(C&&f.issues.length!==b){if(Ls(f,b))break;b=f.issues.length}if(E==="__proto__")continue;const x=v[E],I=x._zod.optin,R=x._zod.optout,O=x._zod.run({value:m[E],issues:[]},h);O instanceof Promise?g.push(O.then(D=>Xv(D,f,E,m,I,R))):Xv(O,f,E,m,I,R)}return a?zq(g,m,f,h,o.value,e,C===!0):g.length?Promise.all(g).then(()=>f):f}}),LPe=re("$ZodObjectJIT",(e,t)=>{DPe.init(e,t);const n=e._zod.parse,r=i2(()=>$q(t)),o=To.memoizer,s=v=>{const C=r.value,b=C.symbolKeys,E=new VMe(["payload","ctx"],{shape:v,inst:e,memo:o,syms:b}),x=D=>`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`,I=(D,N)=>`
162
- let ${D}_ab = false;
163
- for (let i = 0; i < ${D}.issues.length; i++) {
164
- const iss = ${D}.issues[i];
165
- iss.path = iss.path ? [${N}, ...iss.path] : [${N}];
166
- payload.issues.push(iss);
167
- if (iss.continue !== true) ${D}_ab = true;
168
- }
169
- if (${D}_ab && ctx && ctx.abortEarly) {
170
- payload.value = newResult;
171
- return payload;
172
- }`;E.write("const input = payload.value;");const R=Object.create(null);let O=0;for(const D of C.allKeys)R[D]=`key_${O++}`;E.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const D of C.allKeys){if(D==="__proto__")continue;const N=R[D],M=typeof D=="symbol"?`syms[${b.indexOf(D)}]`:pOe(D),L=`${M} in input`,$=v[D],G=$?._zod?.optin,j=G!==void 0,F=$?._zod?.optout==="optional";if(E.write(`const ${N} = ${x(M)};`),j&&F){const q=G==="optional"?`${N}_present`:`${N}.value !== undefined || ${N}_present`;E.write(`
173
- const ${N}_present = ${L};
174
- if (!${N}.issues.length || ${N}_present) {
175
- if (${N}.issues.length) {${I(N,M)}
176
- }
177
-
178
- if (${q}) {
179
- newResult[${M}] = ${N}.value;
180
- }
181
- }
182
-
183
- `)}else j?(E.write(`
184
- if (${N}.issues.length) {${I(N,M)}
185
- }
186
- `),G==="defaulted"?E.write(`newResult[${M}] = ${N}.value;`):E.write(`
187
- if (${N}.value !== undefined || ${L}) {
188
- newResult[${M}] = ${N}.value;
189
- }
190
- `)):E.write(`
191
- const ${N}_present = ${L};
192
- if (${N}.issues.length) {${I(N,M)}
193
- }
194
- if (!${N}_present && !${N}.issues.length) {
195
- payload.issues.push({
196
- code: "invalid_type",
197
- expected: "nonoptional",
198
- input: undefined,
199
- path: [${M}]
200
- });
201
- if (ctx && ctx.abortEarly) {
202
- payload.value = newResult;
203
- return payload;
204
- }
205
- }
206
-
207
- if (${N}_present) {
208
- newResult[${M}] = ${N}.value;
209
- }
210
-
211
- `)}return E.write("payload.value = newResult;"),E.write("return payload;"),E.compile()};let a;const c=Yv,u=!To.jitless,h=u&&gOe.value,m=t.catchall;let g;e._zod.parse=(v,C)=>{g??(g=r.value);const b=v.value;return c(b)?u&&h&&C?.async===!1&&C.jitless!==!0?(a||(a=s(t.shape)),v=a(v,C),m?zq([],b,v,C,g,e,C?.abortEarly===!0):v):n(v,C):(v.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),v)}});function l8(e,t,n,r){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!Ls(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(a=>ta(a,r,Xo())))}),t)}const UPe=re("$ZodUnion",(e,t)=>{Zt.init(e,t),ut(e,"optin",r=>r.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":r.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),ut(e,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ut(e,"values",r=>{if(r.def.options.every(o=>o._zod.values))return new Set(r.def.options.flatMap(o=>Array.from(o._zod.values)))}),ut(e,"pattern",r=>{if(r.def.options.every(o=>o._zod.pattern)){const o=r.def.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>a2(s.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let s=!1;const a=[];for(const c of t.options){const u=c._zod.run({value:r.value,issues:[]},o);if(u instanceof Promise)a.push(u),s=!0;else{if(u.issues.length===0)return u;a.push(u)}}return s?Promise.all(a).then(c=>l8(c,r,e,o)):l8(a,r,e,o)}}),FPe=re("$ZodIntersection",(e,t)=>{Zt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,s=t.left._zod.run({value:o,issues:[]},r),a=t.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||a instanceof Promise?Promise.all([s,a]).then(([u,f])=>c8(n,u,f)):c8(n,s,a)}});function yA(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(yu(e)&&yu(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const s of r){if(s==="__proto__")continue;const a=yA(e[s],t[s]);if(!a.valid)return{valid:!1,mergeErrorPath:[s,...a.mergeErrorPath]};o[s]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],s=t[r],a=yA(o,s);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function c8(e,t,n){const r=new Map;let o;const s=new Map,a=(f,h)=>{let m;if(f.code==="unrecognized_keys"&&!f.path?.length)o??(o=f),m=f.keys;else if(f.code==="invalid_key"&&f.origin==="record"&&f.path?.length===1){const g=String(f.path[0]);s.has(g)||s.set(g,f),m=[g]}else return!1;for(const g of m)r.has(g)||r.set(g,{}),r.get(g)[h]=!0;return!0};for(const f of t.issues)a(f,"l")||e.issues.push(f);for(const f of n.issues)a(f,"r")||e.issues.push(f);const c=[...r].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(c.length){const f=o?c.filter(h=>o.keys.includes(h)):[];f.length&&e.issues.push({...o,keys:f});for(const h of c)!f.includes(h)&&s.has(h)&&e.issues.push(s.get(h))}const u=yA(t.value,n.value);if(!u.valid){if(Ls(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`)}return e.value=u.data,e}const $Pe=re("$ZodRecord",(e,t)=>{Zt.init(e,t);const n=To.memoizer;n?.attach(e),e._zod.parse=(r,o)=>{const s=r.value;if(!yu(s))return r.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),r;const a=[],c=t.keyType._zod.values;if(c&&!t.partial){r.value=n?n.alloc(e,r,{},o):{};const u=new Set;for(const h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){if(u.add(typeof h=="number"?h.toString():h),h==="__proto__")continue;const m=t.keyType._zod.run({value:h,issues:[]},o);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(m.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:m.issues.map(C=>ta(C,o,Xo())),input:h,path:[h],inst:e});continue}const g=m.value;if(g==="__proto__")continue;const v=t.valueType._zod.run({value:s[h],issues:[]},o);v instanceof Promise?a.push(v.then(C=>{C.issues.length&&r.issues.push(...Wc(h,C.issues)),r.value[g]=C.value})):(v.issues.length&&r.issues.push(...Wc(h,v.issues)),r.value[g]=v.value)}let f;for(const h in s)if(!u.has(h))if(t.mode==="loose"){if(h==="__proto__")continue;r.value[h]=s[h]}else f=f??[],f.push(h);f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:f,continue:!0})}else{r.value=n?n.alloc(e,r,{},o):{};let u;for(const f of Reflect.ownKeys(s)){if(f==="__proto__"||!Object.prototype.propertyIsEnumerable.call(s,f))continue;let h=t.keyType._zod.run({value:f,issues:[]},o);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof f=="string"&&f2.test(f)&&h.issues.length){const C=t.keyType._zod.run({value:Number(f),issues:[]},o);if(C instanceof Promise)throw new Error("Async schemas not supported in object keys currently");C.issues.length===0&&(h=C)}if(h.issues.length){t.mode==="loose"?r.value[f]=s[f]:c?(u=u??[],u.push(f)):r.issues.push({code:"invalid_key",origin:"record",issues:h.issues.map(C=>ta(C,o,Xo())),input:f,path:[f],inst:e});continue}const g=h.value;if(g==="__proto__")continue;const v=t.valueType._zod.run({value:s[f],issues:[]},o);v instanceof Promise?a.push(v.then(C=>{C.issues.length&&r.issues.push(...Wc(f,C.issues)),r.value[g]=C.value})):(v.issues.length&&r.issues.push(...Wc(f,v.issues)),r.value[g]=v.value)}u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:u,continue:!0})}return a.length?Promise.all(a).then(()=>r):r}}),zPe=re("$ZodEnum",(e,t)=>{Zt.init(e,t);const n=pA(t.entries),r=new Set(n);e._zod.values=r,ut(e,"pattern",o=>{const s=pA(o.def.entries).filter(a=>vOe.has(typeof a));return new RegExp(s.length?`^(${s.map(a=>bu(a.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,s)=>{const a=o.value;return r.has(a)||o.issues.push({code:"invalid_value",values:n,input:a,inst:e}),o}}),jPe=re("$ZodLiteral",(e,t)=>{Zt.init(e,t);const n=new Set(t.values);e._zod.values=n,ut(e,"pattern",r=>{const o=r.def.values;return new RegExp(o.length?`^(${o.map(s=>typeof s=="string"?bu(s):s?bu(s.toString()):String(s)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(r,o)=>{const s=r.value;return n.has(s)||r.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),r}}),BPe=re("$ZodTransform",(e,t)=>{Zt.init(e,t),e._zod.optin="optional",To.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new xq(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(n.value=a,n));if(o instanceof Promise)throw new el;return n.value=o,n}});function u8(e,t){return e.value=t.issues.length?void 0:t.value,e}const jq=re("$ZodOptional",(e,t)=>{Zt.init(e,t),ut(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",ut(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),ut(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${a2(r.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(n.value===void 0){if(t.innerType._zod.optin!=="defaulted")return n;const o=t.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(s=>u8(n,s)):u8(n,o)}return t.innerType._zod.run(n,r)}}),HPe=re("$ZodExactOptional",(e,t)=>{jq.init(e,t),ut(e,"values",n=>n.def.innerType._zod.values),ut(e,"pattern",n=>n.def.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),qPe=re("$ZodNullable",(e,t)=>{Zt.init(e,t),ut(e,"optin",n=>n.def.innerType._zod.optin),ut(e,"optout",n=>n.def.innerType._zod.optout),ut(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${a2(r.source)}|null)$`):void 0}),ut(e,"values",n=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),VPe=re("$ZodDefault",(e,t)=>{Zt.init(e,t),e._zod.optin="defaulted",ut(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>d8(s,t)):d8(o,t)}});function d8(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const WPe=re("$ZodPrefault",(e,t)=>{Zt.init(e,t),e._zod.optin="defaulted",ut(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),GPe=re("$ZodNonOptional",(e,t)=>{Zt.init(e,t),ut(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>f8(s,e)):f8(o,e)}});function f8(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function h8(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>ta(o,r,Xo()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const KPe=re("$ZodCatch",(e,t)=>{Zt.init(e,t),ut(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),ut(e,"optout",n=>n.def.innerType._zod.optout),ut(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(s=>h8(n,s,t,r)):h8(n,o,t,r)}}),ZPe=re("$ZodPipe",(e,t)=>{Zt.init(e,t),ut(e,"values",n=>n.def.in._zod.values),ut(e,"optin",n=>n.def.in._zod.optin),ut(e,"optout",n=>n.def.out._zod.optout),ut(e,"propValues",n=>n.def.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=t.out._zod.run(n,r);return s instanceof Promise?s.then(a=>vg(a,t.in,r)):vg(s,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>vg(s,t.out,r)):vg(o,t.out,r)}});function vg(e,t,n){return e.issues.some(r=>r.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const YPe=re("$ZodReadonly",(e,t)=>{Zt.init(e,t),ut(e,"propValues",n=>n.def.innerType._zod.propValues),ut(e,"values",n=>n.def.innerType._zod.values),ut(e,"optin",n=>n.def.innerType?._zod?.optin),ut(e,"optout",n=>n.def.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(p8):p8(o)}});function p8(e){return e.memo||(e.value=Object.freeze(e.value)),e}const QPe=re("$ZodLazy",(e,t)=>{Zt.init(e,t),fOe(e._zod,"innerType",()=>{const n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),ut(e,"pattern",n=>n.innerType?._zod?.pattern),ut(e,"propValues",n=>n.innerType?._zod?.propValues),ut(e,"optin",n=>n.innerType?._zod?.optin??void 0),ut(e,"optout",n=>n.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),JPe=re("$ZodCustom",(e,t)=>{Ir.init(e,t),Zt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(s=>m8(s,n,r,e));m8(o,n,r,e)}});function m8(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(ph(o))}}class XPe extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const bA="~memo",g8=[];function Bq(e){return e!==null&&typeof e=="object"}function c_(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}const Hq=new WeakMap,Cf=0,ev=1,Lf=2;function tv(e,t,n){const r=Hq.get(e);if(r!==void 0)return r?Lf:Cf;if(t.has(e))return Lf;t.add(e);let o=Cf;const s=h=>{if(o!==Lf&&h?._zod){const m=tv(h,t);m>o&&(o=m)}},a=(h,m)=>{let g=Cf;for(const v of Reflect.ownKeys(h)){const C=Object.getOwnPropertyDescriptor(h,v);if(!C.enumerable)continue;const b=C.get?ev:C.value?._zod?tv(C.value,t):Cf;b>g&&(g=b)}return g},c=h=>{h>o&&(o=h)},u=e._zod.def;switch(u.type){case"object":{const h=pq(u);c(h?a(h):ev),s(u.catchall);break}case"array":s(u.element);break;case"tuple":for(const h of u.items)s(h);s(u.rest);break;case"record":case"map":s(u.keyType),s(u.valueType);break;case"set":s(u.valueType);break;case"union":for(const h of u.options)s(h);break;case"intersection":s(u.left),s(u.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":s(u.innerType);break;case"pipe":s(u.in),s(u.out);break;case"function":s(u.input),s(u.output);break;case"lazy":{const h=u._cachedInner??void 0;c(h?tv(h,t):ev);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const h in u){const m=Object.getOwnPropertyDescriptor(u,h);if(!m||m.get)continue;const g=m.value;if(!(!g||typeof g!="object")){if(g._zod)s(g);else if(Array.isArray(g))for(const v of g)s(v)}}}return t.delete(e),eNe(e,o)}function eNe(e,t){return t!==ev&&Hq.set(e,t===Lf),t}function tNe(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}let yg;const bg=[],nNe={alloc(e,t,n){const r=yg;if(!r)return n;yg=void 0;const o={value:n,issues:null};return r.set(t.value,o),bg.push(o),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const n=e._zod.parse,r=(o,s)=>{if(s.direction!=="backward"&&oNe(s,o.value))throw new XPe;return n(o,s)};e._zod.parse=r,e._zod.run===n&&(e._zod.run=r)})},attach(e){var t;let n,r=!1,o,s;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const a=e._zod.parse,c=(u,f)=>{if(n===void 0){const x=tv(e,new Set);if(x===Cf)return e._zod.parse=a,e._zod.run===c&&(e._zod.run=a),a(u,f);x===Lf||r?n=!0:r=!0}const h=u.value;if(!Bq(h))return a(u,f);let m=f[bA];m||(m={buckets:new WeakMap,backEdges:void 0},f[bA]=m);let g;o===f?g=s:(g=tNe(m,e),o=f,s=g);const v=g.get(h);if(v)return u.value=v.value,v.issues?v.issues.length&&u.issues.push(...c_(v.issues)):(u.memo=!0,m.backEdges??(m.backEdges=new WeakSet),m.backEdges.add(v.value)),u;yg=g;const C=bg.length,b=a(u,f);yg=void 0;const E=bg.length>C?bg.pop():void 0;return b instanceof Promise?b.then(x=>(E&&(E.issues=x.issues.length?c_(x.issues):g8),x)):(E&&(E.issues=b.issues.length?c_(b.issues):g8),b)};e._zod.parse=c,e._zod.run===a&&(e._zod.run=c)})}};function rNe(){return nNe}function oNe(e,t){const n=e[bA]?.backEdges;return n!==void 0&&Bq(t)&&n.has(t)}const sNe=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(s){return e[s]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function o(s,a){return s==="number"&&typeof a=="number"&&!Number.isFinite(a)?String(a):r[s]??s}return s=>{switch(s.code){case"invalid_type":{const a=o(s.expected),c=ROe(s.input),u=o(c,s.input);return`Invalid input: expected ${a}, received ${u}`}case"invalid_value":return s.values.length===1?`Invalid input: expected ${bq(s.values[0])}`:`Invalid option: expected one of ${J6(s.values,"|")}`;case"too_big":{const a=s.exact?"exactly ":s.inclusive?"<=":"<",c=t(s.origin);return c?`Too big: expected ${s.origin??"value"} to have ${a}${s.maximum.toString()} ${c.unit??"elements"}`:`Too big: expected ${s.origin??"value"} to be ${a}${s.maximum.toString()}`}case"too_small":{const a=s.exact?"exactly ":s.inclusive?">=":">",c=t(s.origin);return c?`Too small: expected ${s.origin} to have ${a}${s.minimum.toString()} ${c.unit}`:`Too small: expected ${s.origin} to be ${a}${s.minimum.toString()}`}case"invalid_format":{const a=s;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${n[a.format]??s.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${s.divisor}`;case"unrecognized_keys":return`Unrecognized key${s.keys.length>1?"s":""}: ${J6(s.keys,", ")}`;case"invalid_key":return`Invalid key in ${s.origin}`;case"invalid_union":return s.options&&Array.isArray(s.options)&&s.options.length>0?`Invalid discriminator value. Expected ${s.options.map(c=>`'${c}'`).join(" | ")}`:s.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${s.origin}`;default:return"Invalid input"}}};function iNe(){return{localeError:sNe()}}var v8;class aNe{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function lNe(){return new aNe}(v8=globalThis).__zod_globalRegistry??(v8.__zod_globalRegistry=lNe());const wf=globalThis.__zod_globalRegistry;function g2(e){return e.checks&&(e.checks=[...e.checks]),e}function cNe(e,t){return new e(g2({type:"string",...Ne(t)}))}function qq(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ne(t)})}function uNe(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ne(t)})}function dNe(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ne(t)})}function fNe(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ne(t)})}function hNe(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ne(t)})}function pNe(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ne(t)})}function mNe(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ne(t)})}function gNe(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ne(t)})}function vNe(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ne(t)})}function yNe(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ne(t)})}function bNe(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ne(t)})}function SNe(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ne(t)})}function CNe(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ne(t)})}function wNe(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ne(t)})}function ENe(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ne(t)})}function xNe(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ne(t)})}function _Ne(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ne(t)})}function INe(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ne(t)})}function ANe(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ne(t)})}function RNe(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ne(t)})}function TNe(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ne(t)})}function ONe(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ne(t)})}function Vq(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ne(t)})}function Wq(e,t){return new e({type:"string",format:"date",check:"string_format",...Ne(t)})}function MNe(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ne(t)})}function PNe(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ne(t)})}function NNe(e,t){return new e(g2({type:"number",checks:[],...Ne(t)}))}function Nje(e,t){return new e(g2({type:"number",coerce:!0,checks:[],...Ne(t)}))}function kNe(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ne(t)})}function DNe(e,t){return new e({type:"boolean",...Ne(t)})}function LNe(e,t){return new e({type:"null",...Ne(t)})}function UNe(e){return new e({type:"unknown"})}function FNe(e,t){return new e({type:"never",...Ne(t)})}function y8(e,t){return new Tq({check:"less_than",...Ne(t),value:e,inclusive:!1})}function u_(e,t){return new Tq({check:"less_than",...Ne(t),value:e,inclusive:!0})}function b8(e,t){return new Oq({check:"greater_than",...Ne(t),value:e,inclusive:!1})}function d_(e,t){return new Oq({check:"greater_than",...Ne(t),value:e,inclusive:!0})}function S8(e,t){return new NMe({check:"multiple_of",...Ne(t),value:e})}function Gq(e,t){return new DMe({check:"max_length",...Ne(t),maximum:e})}function ey(e,t){return new LMe({check:"min_length",...Ne(t),minimum:e})}function Kq(e,t){return new UMe({check:"length_equals",...Ne(t),length:e})}function $Ne(e,t){return new FMe({check:"string_format",format:"regex",...Ne(t),pattern:e})}function zNe(e){return new $Me({check:"string_format",format:"lowercase",...Ne(e)})}function jNe(e){return new zMe({check:"string_format",format:"uppercase",...Ne(e)})}function BNe(e,t){return new jMe({check:"string_format",format:"includes",...Ne(t),includes:e})}function HNe(e,t){return new BMe({check:"string_format",format:"starts_with",...Ne(t),prefix:e})}function qNe(e,t){return new HMe({check:"string_format",format:"ends_with",...Ne(t),suffix:e})}function zu(e){return new qMe({check:"overwrite",tx:e})}function VNe(e){return zu(t=>t.normalize(e))}function WNe(){return zu(e=>e.trim())}function GNe(){return zu(e=>e.toLowerCase())}function KNe(){return zu(e=>e.toUpperCase())}function ZNe(){return zu(e=>mOe(e))}function YNe(e,t,n){return new e({type:"array",element:t,...Ne(n)})}function QNe(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ne(n)})}function JNe(e,t){const n=XNe(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(ph(o,r.value,n._zod.def));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=r.value),s.inst??(s.inst=n),s.continue??(s.continue=!n._zod.def.abort),r.issues.push(ph(s))}},e(r.value,r)),t);return n}function XNe(e,t){const n=new Ir({check:"custom",...Ne(t)});return n._zod.check=e,n}function Uf(e,...t){for(const n of t)for(const r of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,r)&&aa(e,r,n[r]);return e}function Zq(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??wf,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function ra(e,t,n,r,o){const s=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:r.path,message:o}):t.unrepresentable;if(s==="any")return!1;if(s===void 0||s==="throw")throw new Error(o);return Object.assign(n,s),!0}function pn(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;const a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const c=e._zod.toJSONSchema?.();if(c)a.schema=c;else{const h={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,h);else{const g=a.schema,v=t.processors[o.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);v(e,t,g,h)}const m=e._zod.parent;m&&(a.ref||(a.ref=m),pn(m,t,h),t.seen.get(m).isParent=!0)}const u=t.metadataRegistry.get(e);return u&&Uf(a.schema,u),t.io==="input"&&nr(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function C8(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Yq(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const r=new Map;for(const a of e.seen.entries()){const c=e.metadataRegistry.get(a[0])?.id;if(c){const u=r.get(c);if(u&&u!==a[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(c,a[0])}}const o=a=>{const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const m=e.external.registry.get(a[0])?.id,g=e.external.uri??(C=>C);if(m)return{ref:g(m)};const v=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=v,{defId:v,ref:`${g("__shared")}#/${c}/${C8(v)}`}}const u="#",f=`${u}/${c}/`;if(a[1]===n&&!a[1].schema.id)return{ref:u};const h=a[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:f+C8(h)}},s=a=>{if(a[1].schema.$ref)return;const c=a[1],{ref:u,defId:f}=o(a);c.def={...c.schema},f&&(c.defId=f);const h=c.schema;for(const m in h)delete h[m];h.$ref=u};if(e.cycles==="throw")for(const a of e.seen.entries()){const c=a[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
212
-
213
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const c=a[1];if(t===a[0]){s(a);continue}if(e.external){const f=e.external.registry.get(a[0])?.id;if(t!==a[0]&&f){s(a);continue}}if(e.metadataRegistry.get(a[0])?.id){s(a);continue}if(c.cycle){s(a);continue}c.count>1&&e.reused==="ref"&&s(a)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Qq(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const n=[];for(const r of t){if(!r||typeof r!="object")return;Qq(r);const o=Object.keys(r);if(o.length!==1||o[0]!=="type")return;const s=r.type;for(const a of Array.isArray(s)?s:[s]){if(typeof a!="string")return;n.includes(a)||n.push(a)}}delete e.anyOf,e.type=n.length===1?n[0]:n}const Jq=new Set(["type","properties","required","additionalProperties"]),w8=["oneOf","anyOf"];function E8(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function SA(e){const t=[];for(const s of e){if(typeof s!="object"||s.type!=="object")return null;for(const a in s)if(!Jq.has(a))return null;t.push(s)}const n={},r=new Set;for(const s of t){for(const a in s.properties){if(Object.prototype.hasOwnProperty.call(n,a))continue;const c=[];for(const f of t){const h=f.properties?.[a]??E8(f);h!=null&&(c.some(m=>JSON.stringify(m)===JSON.stringify(h))||c.push(h))}const u=c.length===1?c[0]:SA(c)??{allOf:c};aa(n,a,u)}for(const a of s.required??[])r.add(a)}const o={type:"object",properties:n};if(r.size&&(o.required=[...r]),t.every(s=>s.additionalProperties===!1))o.additionalProperties=!1;else{const s=[];for(const a of t){const c=E8(a);c&&!s.some(u=>JSON.stringify(u)===JSON.stringify(c))&&s.push(c)}s.length===1?o.additionalProperties=s[0]:s.length>1&&(o.additionalProperties={allOf:s})}return o}function eke(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const o of Jq)if(o in e)return;const n=t.filter(o=>w8.some(s=>Array.isArray(o[s])));let r=null;if(!n.length)r=SA(t);else{const o=n[0],s=w8.find(u=>Array.isArray(o[u]));if(Object.keys(o).length!==1)return;const a=t.filter(u=>u!==o),c=o[s].map(u=>SA([...a,u]));if(c.some(u=>!u))return;r={[s]:c}}r&&(delete e.allOf,Uf(e,r))}function Xq(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=c=>{const u=e.seen.get(c);if(u.ref===null)return;const f=u.def??u.schema,h={...f},m=u.ref;if(u.ref=null,m){r(m);const v=e.seen.get(m),C=v.schema;if(C.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(C)):Uf(f,C),Uf(f,h),c._zod.parent===m)for(const E in f)E==="$ref"||E==="allOf"||E in h||delete f[E];if(C.$ref&&v.def)for(const E in f)E==="$ref"||E==="allOf"||E in v.def&&JSON.stringify(f[E])===JSON.stringify(v.def[E])&&delete f[E]}const g=c._zod.parent;if(g&&g!==m){r(g);const v=e.seen.get(g);if(v?.schema.$ref&&(f.$ref=v.schema.$ref,v.def))for(const C in f)C==="$ref"||C==="allOf"||C in v.def&&JSON.stringify(f[C])===JSON.stringify(v.def[C])&&delete f[C]}e.override({zodSchema:c,jsonSchema:f,path:u.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const c of[...e.seen.entries()].reverse())r(c[0]);if(e.target!=="openapi-3.0")for(const c of e.seen.entries())Qq(c[1].def??c[1].schema);for(const c of e.deferred)c();if(e.intersections.length){const c=new Map;for(const u of e.seen.values())for(const f of[u.schema,u.def]){const h=f?.allOf;if(!Array.isArray(h))continue;const m=c.get(h);m?m.push(f):c.set(h,[f])}for(const u of e.intersections)for(const f of c.get(u)??[])eke(f)}}const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(c)}Uf(o,n.defId?n.schema:n.def??n.schema);const s=e.metadataRegistry.get(t)?.id;s!==void 0&&o.id===s&&delete o.id;const a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const c of e.seen.entries()){const u=c[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,aa(a,u.defId,u.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?o.$defs=a:o.definitions=a);try{const c=JSON.parse(JSON.stringify(o));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:ty(t,"input",e.processors),output:ty(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function nr(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return nr(r.element,n);if(r.type==="set")return nr(r.valueType,n);if(r.type==="lazy")return nr(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault"||r.type==="catch")return nr(r.innerType,n);if(r.type==="intersection")return nr(r.left,n)||nr(r.right,n);if(r.type==="record"||r.type==="map")return nr(r.keyType,n)||nr(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:nr(r.in,n)||nr(r.out,n);if(r.type==="object"){for(const o in r.shape)if(nr(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(nr(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(nr(o,n))return!0;return!!(r.rest&&nr(r.rest,n))}return!1}const tke=(e,t={})=>n=>{const r=Zq({...n,processors:t});return pn(e,r),Yq(r,e),Xq(r,e)},ty=(e,t,n={})=>r=>{const{libraryOptions:o,target:s}=r??{},a=Zq({...o??{},target:s,io:t,processors:n});return pn(e,a),Yq(a,e),Xq(a,e)},Su=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Cu=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},x8=(e,t)=>{Su(e,"minimum",t),Cu(e,"maximum",t)},eV=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},tV=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},nV=(e,t)=>{e.mime=e.mime?e.mime.filter(n=>t.includes(n)):[...t]},rV=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},_8=(e,t)=>Su(e,"minimum",t.minimum),I8=(e,t)=>Cu(e,"maximum",t.maximum),A8=e=>(t,n)=>{rV(t,n.format);const[r,o]=e[n.format];Su(t,"minimum",r),Cu(t,"maximum",o)},nke={greater_than:(e,t)=>Su(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Cu(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>eV(e,t.value),number_format:A8(Sq),bigint_format:A8(bOe),min_length:_8,max_length:I8,length_equals:(e,t)=>x8(e,t.length),min_size:_8,max_size:I8,size_equals:(e,t)=>x8(e,t.size),string_format:(e,t)=>{rV(e,t.format),t.pattern&&tV(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>nV(e,t.mime)};function _o(e){const t={},n=e._zod.def,r=e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[];for(const s of r)nke[s._zod.def.check]?.(t,s._zod.def);const o=e._zod.bag;o.minimum!==void 0&&Su(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&Su(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&Cu(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&Cu(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&eV(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&nV(t,o.mime);for(const s of o.patterns??[])tV(t,s);return t}const rke={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},oke=new Map([[Uq,bMe],[m2,SMe]]),oV=e=>oke.get(e)??e,ske=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:s,maximum:a,format:c,patterns:u,contentEncoding:f,laxFormat:h}=_o(e);if(typeof s=="number"&&(o.minLength=s),typeof a=="number"&&(o.maxLength=a),c&&(o.format=rke[c]??c,o.format===""&&delete o.format,(c==="time"||h)&&delete o.format),f&&(o.contentEncoding=f),u&&u.size>0){const m=[...u].map(oV);m.length===1?o.pattern=m[0].source:m.length>1&&(o.allOf=[...m.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},ike=(e,t,n,r)=>{const o=n,{minimum:s,maximum:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:f,isInt:h}=_o(e);o.type=h?"integer":"number";const m=typeof f=="number"&&f>=(s??Number.NEGATIVE_INFINITY),g=typeof u=="number"&&u<=(a??Number.POSITIVE_INFINITY),v=t.target==="draft-04"||t.target==="openapi-3.0";if(m?v?(o.minimum=f,o.exclusiveMinimum=!0):o.exclusiveMinimum=f:typeof s=="number"&&(o.minimum=s),g?v?(o.maximum=u,o.exclusiveMaximum=!0):o.exclusiveMaximum=u:typeof a=="number"&&(o.maximum=a),c){const C=new Set;for(const x of c)Number.isFinite(x)&&x!==0?C.add(Math.abs(x)):ra(e,t,o,r,`A multipleOf divisor of ${x} cannot be represented in JSON Schema`);const[b,...E]=C;b!==void 0&&(o.multipleOf=b),E.length&&(o.allOf=[...o.allOf??[],...E.map(x=>({multipleOf:x}))])}},ake=(e,t,n,r)=>{n.type="boolean"},lke=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},cke=(e,t,n,r)=>{n.not={}},uke=(e,t,n,r)=>{},dke=(e,t,n,r)=>{const o=e._zod.def,s=pA(o.entries);if(s.length===0){n.not={};return}s.every(a=>typeof a=="number")&&(n.type="number"),s.every(a=>typeof a=="string")&&(n.type="string"),n.enum=s},fke=(e,t,n,r)=>{const o=e._zod.def;if(o.values.length===0){n.not={};return}const s=[];for(const a of o.values)if(a===void 0){if(ra(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(ra(e,t,n,r,"BigInt literals cannot be represented in JSON Schema"))return;s.push(Number(a))}else s.push(a);if(s.length!==0)if(s.length===1){const a=s[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else s.every(a=>typeof a=="number")&&(n.type="number"),s.every(a=>typeof a=="string")&&(n.type="string"),s.every(a=>typeof a=="boolean")&&(n.type="boolean"),s.every(a=>a===null)&&(n.type="null"),n.enum=s},hke=(e,t,n,r)=>{ra(e,t,n,r,"Custom types cannot be represented in JSON Schema")},pke=(e,t,n,r)=>{ra(e,t,n,r,"Transforms cannot be represented in JSON Schema")},mke=(e,t,n,r)=>{const o=n,s=e._zod.def,{minimum:a,maximum:c}=_o(e);typeof a=="number"&&(o.minItems=a),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=pn(s.element,t,{...r,path:[...r.path,"items"]})};function ny(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?ny(t.out):t.type==="catch"?ny(t.innerType):e._zod.optin}const gke=(e,t,n,r)=>{const o=n,s=e._zod.def,a=s.shape;if(Object.getOwnPropertySymbols(a).length&&ra(e,t,o,r,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const f in a)aa(o.properties,f,pn(a[f],t,{...r,path:[...r.path,"properties",f]}));const u=[];for(const f of Object.keys(a)){const h=s.shape[f];(t.io==="input"?ny(h)===void 0:h._zod.optout===void 0)&&u.push(f)}u.length>0&&(o.required=u),s.catchall?._zod.def.type==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=pn(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},vke=(e,t,n,r)=>{const o=e._zod.def,s=o.inclusive===!1,a=o.options.map((c,u)=>pn(c,t,{...r,path:[...r.path,s?"oneOf":"anyOf",u]}));s?n.oneOf=a:n.anyOf=a},yke=(e,t,n,r)=>{const o=e._zod.def,s=pn(o.left,t,{...r,path:[...r.path,"allOf",0]}),a=pn(o.right,t,{...r,path:[...r.path,"allOf",1]}),c=f=>"allOf"in f&&Object.keys(f).length===1,u=[...c(s)?s.allOf:[s],...c(a)?a.allOf:[a]];n.allOf=u,t.intersections.push(u)};function CA(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);const C=e.get(t)?.def;if(!C)return t;const b=CA(e,C,n);return b===C?t:b}for(const C of["anyOf","oneOf"]){const b=t[C];if(!Array.isArray(b))continue;const E=b.map(x=>CA(e,x,n));E.some((x,I)=>x!==b[I])&&(t={...t,[C]:E})}const r=Array.isArray(t.type)?t.type:[t.type],o=!r.includes("string")&&r.some(C=>C==="number"||C==="integer"),s=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!s?.some(C=>typeof C=="number"))return t;const{minimum:a,maximum:c,exclusiveMinimum:u,exclusiveMaximum:f,multipleOf:h,format:m,id:g,...v}=t;return v.enum?v.enum=v.enum.map(C=>typeof C=="number"?String(C):C):typeof v.const=="number"&&(v.const=String(v.const)),o&&(v.type="string",s||(v.pattern=(r.includes("number")?f2:RMe).source)),v}const wA=new WeakMap;function bke(e){const t=new Map;for(const r of e.seen.values())r.def&&!t.has(r.schema)&&t.set(r.schema,r);const n=new Map;for(const r of wA.get(e)??[]){const o=e.seen.get(r),s=(o?.def??o?.schema)?.propertyNames;if(!s||s===!0||n.has(s))continue;const a=CA(t,s,new Set);a!==s&&n.set(s,a)}if(n.size)for(const r of e.seen.values())for(const o of[r.schema,r.def]){const s=o&&n.get(o.propertyNames);s&&(o.propertyNames=s)}}const Ske=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object";const a=s.keyType,c=_o(a).patterns;if(s.mode==="loose"&&c&&c.size>0){const h=pn(s.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const m of c)aa(o.patternProperties,oV(m).source,h)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=pn(s.keyType,t,{...r,path:[...r.path,"propertyNames"]});let h=wA.get(t);h||(h=[],wA.set(t,h),t.deferred.push(()=>bke(t))),h.push(e)}o.additionalProperties=pn(s.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}const u=a._zod.values,f=t.io==="input"&&ny(s.valueType)!==void 0;if(u&&!s.partial&&!f){const h=[...u].filter(m=>typeof m=="string"||typeof m=="number");h.length>0&&(o.required=h.map(String))}},Cke=(e,t,n,r)=>{const o=e._zod.def,s=pn(o.innerType,t,r),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},wke=(e,t,n,r)=>{const o=e._zod.def;pn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},v2=Symbol();function sV(e,t,n,r,o){let s=!1;const a=JSON.stringify(e,(c,u)=>typeof u!="bigint"?u:(s=!0,null));return s?(ra(t,n,r,o,"BigInt defaults cannot be represented in JSON Schema"),v2):JSON.parse(a)}const Eke=(e,t,n,r)=>{const o=e._zod.def;pn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;const a=sV(o.defaultValue,e,t,n,r);a!==v2&&(n.default=a)},xke=(e,t,n,r)=>{const o=e._zod.def;pn(o.innerType,t,r);const s=t.seen.get(e);if(s.ref=o.innerType,t.io!=="input")return;const a=sV(o.defaultValue,e,t,n,r);a!==v2&&(n._prefault=a)},_ke=(e,t,n,r)=>{const o=e._zod.def;pn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{ra(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=a},Ike=(e,t,n,r)=>{const o=e._zod.def,s=o.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?s?o.out:o.in:o.out;pn(a,t,r);const c=t.seen.get(e);c.ref=a},Ake=(e,t,n,r)=>{const o=e._zod.def;pn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.readOnly=!0},iV=(e,t,n,r)=>{const o=e._zod.def;pn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},Rke=(e,t,n,r)=>{const o=e._zod.innerType;pn(o,t,r);const s=t.seen.get(e);s.ref=o},R8=new WeakSet([Object.prototype,Error.prototype]);function Sg(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const r=n(this);return Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0})}})}const Tke=(e,t)=>{zOe.init(e,t),e.name="ZodError";const n=Object.getPrototypeOf(e);R8.has(n)||(R8.add(n),Sg(n,"format",r=>o=>HOe(r,o)),Sg(n,"flatten",r=>o=>BOe(r,o)),Sg(n,"addIssue",r=>o=>{r.issues.push(o),r.message=JSON.stringify(r.issues,mA,2)}),Sg(n,"addIssues",r=>o=>{r.issues.push(...o),r.message=JSON.stringify(r.issues,mA,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},fo=re("ZodError",Tke,void 0,{Parent:Error}),Oke=Nb(fo),Mke=kb(fo),Pke=u2(fo),Nke=d2(fo),kke=ZOe(fo),Dke=YOe(fo),Lke=QOe(fo),Uke=JOe(fo),Fke=XOe(fo),$ke=eMe(fo),zke=tMe(fo),jke=nMe(fo);function Bke(){To.localeError||Xo(iNe())}function Lb(){To.memoizer||Xo({memoizer:rNe()})}const Yt=re("ZodType",(e,t)=>(Bke(),Zt.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(Fr(t,{checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return la(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(U3e(e,t))},superRefine(e,t){return this.check(F3e(e,t))},overwrite(e){return this.check(zu(e))},optional(){return M8(this)},exactOptional(){return E3e(this)},nullable(){return P8(this)},nullish(){return M8(P8(this))},nonoptional(e){return T3e(this,e)},array(){return ue(this)},or(e){return We([this,e])},and(e){return b3e(this,e)},transform(e){return N8(this,w3e(e))},default(e){return I3e(this,e)},prefault(e){return R3e(this,e)},catch(e){return M3e(this,e)},pipe(e){return N8(this,e)},readonly(){return k3e(this)},describe(e){const t=this.clone();return wf.add(t,{description:e}),t},meta(...e){if(e.length===0)return wf.get(this);const t=this.clone();return wf.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return wq(this,"~standard",{...Pq(this),jsonSchema:{input:ty(this,"input"),output:ty(this,"output")}})},set"~standard"(e){na(this,"~standard",e)},parse:function e(t,n){return Oke(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Mke(this,t,n,{callee:e})},safeParse(e,t){return Pke(this,e,t)},async safeParseAsync(e,t){return Nke(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){na(this,"spa",e)},validate(e,t){return WOe(this,e,t)},validateAsync(e,t){return KOe(this,e,t)},encode:function e(t,n){return kke(this,t,n,{callee:e})},decode:function e(t,n){return Dke(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Lke(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Uke(this,t,n,{callee:e})},safeEncode(e,t){return Fke(this,e,t)},safeDecode(e,t){return $ke(this,e,t)},async safeEncodeAsync(e,t){return zke(this,e,t)},async safeDecodeAsync(e,t){return jke(this,e,t)},toJSONSchema(e){return tke(this,{})(e)},get description(){return wf.get(this)?.description},get _def(){return this._zod.def}}),aV=re("_ZodString",(e,t)=>{p2.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ske(e,n,r)},Eq({format:e=>_o(e).format??null,minLength:e=>_o(e).minimum??null,maxLength:e=>_o(e).maximum??null},{regex(...e){return this.check($Ne(...e))},includes(...e){return this.check(BNe(...e))},startsWith(...e){return this.check(HNe(...e))},endsWith(...e){return this.check(qNe(...e))},min(...e){return this.check(ey(...e))},max(...e){return this.check(Gq(...e))},length(...e){return this.check(Kq(...e))},nonempty(...e){return this.check(ey(1,...e))},lowercase(e){return this.check(zNe(e))},uppercase(e){return this.check(jNe(e))},trim(){return this.check(WNe())},normalize(...e){return this.check(VNe(...e))},toLowerCase(){return this.check(GNe())},toUpperCase(){return this.check(KNe())},slugify(){return this.check(ZNe())}})),Hke=re("ZodString",(e,t)=>{p2.init(e,t),aV.init(e,t)},{email(e){return this.check(qq(uV,e))},url(e){return this.check(mNe(Gke,e))},jwt(e){return this.check(ONe(l3e,e))},emoji(e){return this.check(gNe(Kke,e))},guid(e){return this.check(uNe(Wke,e))},uuid(e){return this.check(dNe(Cg,e))},uuidv4(e){return this.check(fNe(Cg,e))},uuidv6(e){return this.check(hNe(Cg,e))},uuidv7(e){return this.check(pNe(Cg,e))},nanoid(e){return this.check(vNe(Zke,e))},cuid(e){return this.check(yNe(Yke,e))},cuid2(e){return this.check(bNe(Qke,e))},ulid(e){return this.check(SNe(Jke,e))},base64(e){return this.check(ANe(s3e,e))},base64url(e){return this.check(RNe(i3e,e))},xid(e){return this.check(CNe(Xke,e))},ksuid(e){return this.check(wNe(e3e,e))},ipv4(e){return this.check(ENe(t3e,e))},ipv6(e){return this.check(xNe(n3e,e))},cidrv4(e){return this.check(_Ne(r3e,e))},cidrv6(e){return this.check(INe(o3e,e))},e164(e){return this.check(TNe(a3e,e))},datetime(e){return this.check(Vq(lV,e))},date(e){return this.check(Wq(cV,e))},time(e){return this.check(MNe(qke,e))},duration(e){return this.check(PNe(Vke,e))}});function w(e){return cNe(Hke,e)}const ln=re("ZodStringFormat",(e,t)=>{nn.init(e,t),aV.init(e,t)}),lV=re("ZodISODateTime",(e,t)=>{uPe.init(e,t),ln.init(e,t)}),cV=re("ZodISODate",(e,t)=>{dPe.init(e,t),ln.init(e,t)}),qke=re("ZodISOTime",(e,t)=>{fPe.init(e,t),ln.init(e,t)}),Vke=re("ZodISODuration",(e,t)=>{hPe.init(e,t),ln.init(e,t)}),uV=re("ZodEmail",(e,t)=>{YMe.init(e,t),ln.init(e,t)});function kje(e){return qq(uV,e)}const Wke=re("ZodGUID",(e,t)=>{KMe.init(e,t),ln.init(e,t)}),Cg=re("ZodUUID",(e,t)=>{ZMe.init(e,t),ln.init(e,t)}),Gke=re("ZodURL",(e,t)=>{nPe.init(e,t),ln.init(e,t)}),Kke=re("ZodEmoji",(e,t)=>{rPe.init(e,t),ln.init(e,t)}),Zke=re("ZodNanoID",(e,t)=>{oPe.init(e,t),ln.init(e,t)}),Yke=re("ZodCUID",(e,t)=>{sPe.init(e,t),ln.init(e,t)}),Qke=re("ZodCUID2",(e,t)=>{iPe.init(e,t),ln.init(e,t)}),Jke=re("ZodULID",(e,t)=>{aPe.init(e,t),ln.init(e,t)}),Xke=re("ZodXID",(e,t)=>{lPe.init(e,t),ln.init(e,t)}),e3e=re("ZodKSUID",(e,t)=>{cPe.init(e,t),ln.init(e,t)}),t3e=re("ZodIPv4",(e,t)=>{pPe.init(e,t),ln.init(e,t)}),n3e=re("ZodIPv6",(e,t)=>{gPe.init(e,t),ln.init(e,t)}),r3e=re("ZodCIDRv4",(e,t)=>{vPe.init(e,t),ln.init(e,t)}),o3e=re("ZodCIDRv6",(e,t)=>{bPe.init(e,t),ln.init(e,t)}),s3e=re("ZodBase64",(e,t)=>{SPe.init(e,t),ln.init(e,t)}),i3e=re("ZodBase64URL",(e,t)=>{wPe.init(e,t),ln.init(e,t)}),a3e=re("ZodE164",(e,t)=>{EPe.init(e,t),ln.init(e,t)}),l3e=re("ZodJWT",(e,t)=>{_Pe.init(e,t),ln.init(e,t)}),dV=re("ZodNumber",(e,t)=>{Fq.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ike(e,n,r,o),e.isFinite=!0},Eq({minValue:e=>{const{minimum:t,exclusiveMinimum:n}=_o(e);return Math.max(t??Number.NEGATIVE_INFINITY,n??Number.NEGATIVE_INFINITY)},maxValue:e=>{const{maximum:t,exclusiveMaximum:n}=_o(e);return Math.min(t??Number.POSITIVE_INFINITY,n??Number.POSITIVE_INFINITY)},isInt:e=>{const{isInt:t,multipleOf:n}=_o(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>_o(e).format??null},{gt(e,t){return this.check(b8(e,t))},gte(e,t){return this.check(d_(e,t))},min(e,t){return this.check(d_(e,t))},lt(e,t){return this.check(y8(e,t))},lte(e,t){return this.check(u_(e,t))},max(e,t){return this.check(u_(e,t))},int(e){return this.check(T8(e))},safe(e){return this.check(T8(e))},positive(e){return this.check(b8(0,e))},nonnegative(e){return this.check(d_(0,e))},negative(e){return this.check(y8(0,e))},nonpositive(e){return this.check(u_(0,e))},multipleOf(e,t){return this.check(S8(e,t))},step(e,t){return this.check(S8(e,t))},finite(){return this}}));function P(e){return NNe(dV,e)}const c3e=re("ZodNumberFormat",(e,t)=>{IPe.init(e,t),dV.init(e,t)});function T8(e){return kNe(c3e,e)}const u3e=re("ZodBoolean",(e,t)=>{APe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ake(e,n,r)});function ce(e){return DNe(u3e,e)}const d3e=re("ZodNull",(e,t)=>{RPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lke(e,n,r)});function Yn(e){return LNe(d3e,e)}const f3e=re("ZodUnknown",(e,t)=>{TPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>uke()});function ml(){return UNe(f3e)}const h3e=re("ZodNever",(e,t)=>{OPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cke(e,n,r)});function p3e(e){return FNe(h3e,e)}const m3e=re("ZodArray",(e,t)=>{Lb(),NPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mke(e,n,r,o),e.element=t.element},{min(e,t){return this.check(ey(e,t))},nonempty(e){return this.check(ey(1,e))},max(e,t){return this.check(Gq(e,t))},length(e,t){return this.check(Kq(e,t))},unwrap(){return this.element}});function ue(e,t){return YNe(m3e,e,t)}const g3e=re("ZodObject",(e,t)=>{Lb(),LPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gke(e,n,r,o),NOe(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return de(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Fr(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Fr(this._zod.def,{catchall:ml()}))},loose(){return this.clone(Fr(this._zod.def,{catchall:ml()}))},strict(){return this.clone(Fr(this._zod.def,{catchall:p3e()}))},strip(){return this.clone(Fr(this._zod.def,{catchall:void 0}))},extend(e){return wOe(this,e)},safeExtend(e){return EOe(this,e)},merge(e){return xOe(this,e)},pick(e){return SOe(this,e)},omit(e){return COe(this,e)},partial(...e){return e8(fV,this,e[0])},exactPartial(...e){return e8(hV,this,e[0],"exactPartial")},required(...e){return _Oe(pV,this,e[0])}});function U(e,t){const n={type:"object",shape:e??{},...Ne(t)};return new g3e(n)}const v3e=re("ZodUnion",(e,t)=>{UPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vke(e,n,r,o),e.options=t.options});function We(e,t){return new v3e({type:"union",options:e,...Ne(t)})}const y3e=re("ZodIntersection",(e,t)=>{FPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yke(e,n,r,o)});function b3e(e,t){return new y3e({type:"intersection",left:e,right:t})}const O8=re("ZodRecord",(e,t)=>{Lb(),$Pe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ske(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function rn(e,t,n){return!t||!t._zod?new O8({type:"record",keyType:w(),valueType:e,...Ne(t)}):new O8({type:"record",keyType:e,valueType:t,...Ne(n)})}const EA=re("ZodEnum",(e,t)=>{zPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>dke(e,r,o),e.enum=t.entries,e.options=[...e._zod.values];const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const s={};for(const a of r)if(n.has(a))s[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new EA({...t,checks:[],...Ne(o),entries:s})},e.exclude=(r,o)=>{const s={...t.entries};for(const a of r)if(n.has(a))delete s[a];else throw new Error(`Key ${a} not found in enum`);return new EA({...t,checks:[],...Ne(o),entries:s})}});function de(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new EA({type:"enum",entries:n,...Ne(t)})}const S3e=re("ZodLiteral",(e,t)=>{jPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fke(e,n,r,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function he(e,t){return new S3e({type:"literal",values:Array.isArray(e)?e:[e],...Ne(t)})}const C3e=re("ZodTransform",(e,t)=>{Lb(),BPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>pke(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new xq(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(ph(s,n.value,t));else{const a=s;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=n.value),a.inst??(a.inst=e),n.issues.push(ph(a))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n)):(n.value=o,n)}});function w3e(e){return new C3e({type:"transform",transform:e})}const fV=re("ZodOptional",(e,t)=>{jq.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>iV(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function M8(e){return new fV({type:"optional",innerType:e})}const hV=re("ZodExactOptional",(e,t)=>{HPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>iV(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function E3e(e){return new hV({type:"optional",innerType:e})}const x3e=re("ZodNullable",(e,t)=>{qPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Cke(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function P8(e){return new x3e({type:"nullable",innerType:e})}const _3e=re("ZodDefault",(e,t)=>{VPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Eke(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function I3e(e,t){return new _3e({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():yq(t)}})}const A3e=re("ZodPrefault",(e,t)=>{WPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xke(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function R3e(e,t){return new A3e({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():yq(t)}})}const pV=re("ZodNonOptional",(e,t)=>{GPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>wke(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function T3e(e,t){return new pV({type:"nonoptional",innerType:e,...Ne(t)})}const O3e=re("ZodCatch",(e,t)=>{KPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_ke(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function M3e(e,t){return new O3e({type:"catch",innerType:e,catchValue:typeof t=="function"?t:DOe(t)})}const P3e=re("ZodPipe",(e,t)=>{ZPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ike(e,n,r,o),e.in=t.in,e.out=t.out});function N8(e,t){return new P3e({type:"pipe",in:e,out:t})}const N3e=re("ZodReadonly",(e,t)=>{YPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ake(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function k3e(e){return new N3e({type:"readonly",innerType:e})}const D3e=re("ZodLazy",(e,t)=>{QPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Rke(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});function eu(e){return new D3e({type:"lazy",getter:e})}const L3e=re("ZodCustom",(e,t)=>{JPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hke(e,n,r,o)});function U3e(e,t={}){return QNe(L3e,e,t)}function F3e(e,t){return JNe(e,t)}function $3e(e){return Vq(lV,e)}function z3e(e){return Wq(cV,e)}const mV=de(["Pending","Processing","Ready","Failed"]),y2=de(["Inbox","Drafts","Sent","Archive","Junk","Trash","All","Flagged"]),gV=de(["BodyParse"]),vV=de(["UnknownCharset","UnreadableBody"]),yV=de(["Header","Body"]),bV=de(["active","deleting"]),b2=de(["password","oauthMicrosoft"]),Bh=de(["Mail","Calendar"]),SV=de(["not_authenticated","authenticated","selected","logout","reauth_required","credentials_missing"]),S2=de(["idle","discovering_mailboxes","syncing_inbox","syncing_others","complete","error"]),j3e=de(["Appointed","Flagged","Reserved","Proposed","Stale","None"]),B3e=de(["validate","apply"]),H3e=de(["abort","merge"]),q3e=de(["ok","failed","disabled"]),V3e=de(["checking","pulling","snapshotting","stopping","starting","verifying","committing","rollingBack","recovering"]),W3e=de(["succeeded","rolledBack","rollbackFailed","abandoned"]),CV=de(["Active","Disabled"]);de(["sign_in_disabled","caller_disabled","foreign_origin","step_up_required","wrong_password","step_up_locked","cannot_disable_self"]);const G3e=de(["SignOut","Disable","Enable","ResetPassword"]),C2=de(["personal","other_users","shared"]),wV=de(["synced","pending","failed","deleting"]),K3e=de(["normal","cursor_invalid","rebuilding"]),w2=de(["All","Archive","Drafts","Flagged","Junk","Sent","Trash","Important"]),Hh=de(["Standing","Temporary"]),Ub=de(["Active","Expired","Disabled"]),E2=de(["None","UserDisabled","AwaitingFolder","FolderCreateFailed","FolderMissing"]),ca=de(["And","Or"]),Z3e=de(["From","Subject","HasWords","ListId","FromDomain"]),EV=de(["Is","Contains"]),Y3e=de(["From","Subject","ListId"]),Q3e=de(["All","Localpart","Domain","RegistrableDomain"]),Fb=de(["Spam","Phishing","Priority","Personal","Newsletter","Marketing","Automated","Transactional","Social","ColdOutreach"]),qh=de(["Default","Red","Orange","Yellow","Green","Teal","Blue","Purple","Gray"]);de(["Present","Pending","Missing"]);const x2=de(["Pending","Running","Complete","Failed"]),$b=de(["Cal1","Cal2","Cal3","Cal4","Cal5","Cal6"]),xV=de(["VeventOnly","VtodoOnly"]),_V=de(["Default","UserCreated","MailDerived","Subscribed"]),ju=de(["Confirmed","Tentative","Cancelled"]),Bu=de(["Opaque","Transparent"]),Vh=de(["Local","Explicit","Ambiguous"]),IV=de(["Unscheduled","Organizer","NeedsAction","Accepted","Tentative","Declined"]),J3e=de(["Organizer","Guest"]),X3e=de(["NeedsAction","Accepted","Tentative","Declined"]),zb=de(["Request","Reply","Cancel","Counter","Publish","None"]),_2=de(["draft","queued","sending","sent","unfiled","failed","blocked"]);de(["This","Following","All"]);const AV=de(["Accepted","Tentative","Declined"]),Wh=de(["Jev","Jina","Mistral","Gemini","OpenAiCompatible","Local"]),eDe=de(["Hosted","Custom","Local"]),tDe=de(["DecisionApi","ChatJsonSchema","JinaClassify"]),Ac=de(["Saved","Deployment","Default"]),nDe=de(["NoBaseUrl","NoApiKey"]),mh=de(["MoveToSpam","WarnOnly"]),rDe=de(["Unauthorized","ModelNotFound","RateLimited","Rejected","ProviderError","Unreachable","TimedOut","Unparseable"]),oDe=de(["ApiKey","Model","BaseUrl"]),Ml=de(["uncategorized","personal","newsletter","marketing","automated","transactional","social","coldOutreach"]),RV=de(["None","Warn","Junk"]),TV=de(["Spam","Phishing"]);de(["asc","desc"]);const jb=de(["none","yellow","orange","red","purple","blue","teal","green","yellow_bang","red_bang","purple_question","blue_info","orange_guillemet","green_check","yellow_check","blue_star"]),OV=de(["unknown","wellknown","vip"]),Bb=de(["active","deleting","deleted","moving"]),Hb=de(["synced","pending","failed","abandoned"]),qb=de(["none","move","delete","copy"]),MV=de(["MoveToInbox","MoveToJunk"]),sDe=de(["Confident","Unsure"]),iDe=de(["ReportedSender","NeverSpam","Vip","WellKnown","Newsletter"]),aDe=de(["DmarcFail","DkimDmarcFail","SignerMismatch","ReplyToMismatch","LinkTextMismatch","LinkDomainDistant","PunycodeDomain","MixedScriptDomain","ConfusableDomains","SingleOffDomainLink","GeneratedName","FirstContactDomain","RecentlyRegisteredDomain","UnknownRegistrationDate","ClassifierSpam","ClassifierPhishing","ProviderSpam","DisplayNameForeignAddress","DisplayNameLookalike","ModelImpersonation","ModelSpam","ModelClean","ListedPhishingLink","BackendSymbol"]),lDe=de(["Answered","NotConfigured","DailyLimit","RateLimited","OutOfBand"]),cDe=de(["Inline","Rspamd","Model"]),uDe=de(["Unreachable","TimedOut","ServiceError","Unparseable"]),PV=de(["Pending","Stored"]),NV=de(["EmptyFile","UnusableFilename","FileTooLarge","MessageTooLarge","TooManyAttachments","ReservationExpired","UploadMissing","SizeMismatch"]);de(["neverSpam","blocked","vip"]);const dDe=de(["trusted","blocked","muted","vip","junkOnly","category","autoArchive","unsubscribed","neverSpam"]),kV=de(["NotExamined","Examined"]),tu=de(["Pass","Fail","None","Neutral","Softfail"]),DV=de(["from","sender","reply_to","to","cc","bcc"]),LV=de(["TEXT","IMAGE","AUDIO","VIDEO","APPLICATION","MULTIPART","MESSAGE"]),fDe=de(["7BIT","8BIT","BINARY","BASE64","QUOTED-PRINTABLE"]),UV=de(["inline","attachment"]),hDe=de(["mixed","alternative","digest","parallel","related","signed","encrypted","form-data","report"]),FV=de(["in_reply_to","references"]),pDe=de(["RateLimited","DailyCap","NotSettled","NotFound","NotPermitted"]),mDe=de(["Apply","Remove"]),$V=de(["Pending","Accepted","Declined","Tentative","Dismissed","Superseded"]),zV=de(["IcalendarPart","IcalendarAttachment","TextHeuristic"]),gDe=de(["None","Cancellation"]),jV=de(["\\Seen","\\Answered","\\Flagged","\\Deleted","\\Draft"]),BV=de(["$Forwarded","$MDNSent","$Junk","$NotJunk","$Phishing"]),vDe=de(["\\NonExistent","\\Noinferiors","\\Noselect","\\HasChildren","\\HasNoChildren","\\Marked","\\Unmarked","\\Subscribed","\\Remote"]),yDe=de(["s3","filesystem","inline","database"]),bDe=de(["none","gzip","zstd"]);de(["none","blocked","neverSpam"]);de(["Theme","Density","DefaultComposerFormat","PinnedFolders","AccountSignaturePlainText","AccountSignatureHtml","AccountDisplayName","AccountMuted","AccountComposeLanguages","MailboxDisplayName","MailboxMuted","FolderRoleAppointment","FolderRoleAppointmentLabel","MailboxRole","DefaultInvitationSenderAccountId","ClassificationPresetId","ClassificationModel","ClassificationBaseUrl","ClassificationApiKey","ClassificationEnabled","ClassificationDailyLimit","ClassificationUsage","SpamPlacementSpam","SpamPlacementPhishing"]);const SDe=de(["Pending","Complete"]),CDe=de(["FolderRole","MailboxOverride","FilterAction"]);de(["Corresponds","Lookalike","ForeignAddress","Unrelated","NoClaim"]);de(["Retrying","GaveUp"]);const wDe=de(["Spam","Clean","Absent"]),EDe=de(["pending","queued","processing","processed"]),xDe=de(["add","remove"]),_De=de(["pending","queued","processing","processed"]);U({type:he("apiKey"),in:he("header"),name:he("Authorization")});const k8=U({code:w(),message:w(),details:rn(w(),w()).optional()}),IDe=U({path:w(),rule:w(),message:w()});U({statusCode:he(400),code:w(),message:w(),details:rn(w(),w()).optional(),errors:ue(IDe).optional()});U({statusCode:he(401),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:he(404),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:he(409),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:he(422),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:he(403),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:he(204)});U({statusCode:he(409),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:he(409),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:he(422),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:he(412),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:he(404),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:he(409),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:he(409),code:w(),message:w(),details:rn(w(),w()).optional()});U({type:he("aws_proxy"),httpMethod:he("POST"),passthroughBehavior:he("when_no_match"),uri:U({"Fn::Sub":he("arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:{{HandlerFunctionName}}/invocations")})});U({statusCode:he(500),code:w(),message:w(),details:rn(w(),w()).optional()});U({confirmEmail:w()});U({statusCode:he(202),message:w()});const ADe=U({addressId:w().min(25).max(25),displayName:w().optional(),normalizedEmail:w(),inboundCount:P(),outboundCount:P(),replyCount:P(),lastReplyAt:P().optional(),lastInboundAt:P().optional()});U({suggestions:ue(ADe)});U({statusCode:he(202),exportId:w()});U({accountExportRequestId:w().min(25).max(25),accountConfigId:w().min(25).max(25),userId:w(),state:mV,createdAt:P(),updatedAt:P(),expiresAt:P().optional(),objectKey:w().optional(),downloadUrl:w().optional(),errorMessage:w().optional()});U({accountExportRequestId:w().min(25).max(25),accountConfigId:w().min(25).max(25),userId:w(),state:mV,createdAt:P(),updatedAt:P(),expiresAt:P().optional(),objectKey:w().optional(),downloadUrl:w().optional(),errorMessage:w().optional()});const HV=U({depth:P(),contentType:w().max(140)}),RDe=U({quarantineId:w().min(25).max(25),accountConfigId:w().min(25).max(25),accountId:w().min(25).max(25),mailboxId:w().min(25).max(25),uidValidity:P(),uid:P(),mailboxRole:y2.optional(),mailboxPath:w().max(512),quarantinedAt:P(),attempts:P(),failureStage:gV,failureCode:vV,failureMessage:w().max(512),failurePartPath:w().max(140).optional(),workerVersion:w().max(64),contentType:w().max(140).optional(),transferEncoding:w().max(64).optional(),charset:w().max(64).optional(),sizeBytes:P().optional(),structure:ue(HV),messageIdHash:w().max(140).optional(),createdAt:P(),updatedAt:P()}),TDe=U({syncWarningId:w().min(25).max(25),accountConfigId:w().min(25).max(25),accountId:w().min(25).max(25),mailboxId:w().min(25).max(25),uidValidity:P(),uid:P(),stage:yV,attempts:P(),createdAt:P()});U({entries:ue(RDe),warnings:ue(TDe),warningsTotal:P()});U({quarantineId:w().min(25).max(25),accountConfigId:w().min(25).max(25),accountId:w().min(25).max(25),mailboxId:w().min(25).max(25),uidValidity:P(),uid:P(),mailboxRole:y2.optional(),mailboxPath:w().max(512),quarantinedAt:P(),attempts:P(),failureStage:gV,failureCode:vV,failureMessage:w().max(512),failurePartPath:w().max(140).optional(),workerVersion:w().max(64),contentType:w().max(140).optional(),transferEncoding:w().max(64).optional(),charset:w().max(64).optional(),sizeBytes:P().optional(),structure:ue(HV),messageIdHash:w().max(140).optional(),createdAt:P(),updatedAt:P()});U({syncWarningId:w().min(25).max(25),accountConfigId:w().min(25).max(25),accountId:w().min(25).max(25),mailboxId:w().min(25).max(25),uidValidity:P(),uid:P(),stage:yV,attempts:P(),createdAt:P()});const ODe=U({accountConfigId:w().min(25).max(25),userId:w().min(25).max(25),name:w().optional(),state:bV,deletedAt:P().optional(),cascadeStartedAt:P().optional(),createdAt:P(),updatedAt:P()}),Pl=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),MDe=U({role:y2,source:j3e,mailboxId:w().min(25).max(25).optional(),staleAppointmentMailboxId:w().min(25).max(25).optional(),staleAppointmentPath:w().max(512).optional()}),PDe=U({accountId:w().min(25).max(25),accountConfigId:w().min(25).max(25),username:w().min(1),email:w(),authType:b2,syncedServices:ue(Bh),grantedScopes:ue(w()),imapHost:w().min(1),imapPort:P().min(1).max(65535),imapTls:ce(),imapStartTls:ce(),smtpEnabled:ce(),smtpHost:w(),smtpPort:P().min(1).max(65535),smtpTls:ce(),smtpStartTls:ce(),smtpUsername:w(),isActive:ce(),connectionState:SV,lastConnectedAt:P().optional(),lastSyncAt:P().optional(),lastError:w().optional(),syncPhase:S2.optional(),mailboxCountTotal:P().min(0).optional(),mailboxCountSynced:P().min(0).optional(),createdAt:P(),updatedAt:P(),displayName:w().optional(),muted:Pl.optional(),signaturePlainText:w().optional(),signatureHtml:w().optional(),composeLanguages:ue(w()).optional(),folderAppointments:ue(MDe)}),NDe=U({importId:w().min(25).max(25),folderPaths:ue(w())});U({accountConfig:ODe,accounts:ue(PDe),buildCommit:w(),pendingImport:NDe.optional()});U({accountConfigId:w().min(25).max(25),userId:w().min(25).max(25),name:w().optional(),state:bV,deletedAt:P().optional(),cascadeStartedAt:P().optional(),createdAt:P(),updatedAt:P()});U({accountId:w().min(25).max(25),accountConfigId:w().min(25).max(25),username:w().min(1),email:w(),authType:b2,syncedServices:ue(Bh),grantedScopes:ue(w()),passwordHash:w().optional(),oauthRefreshTokenHash:w().optional(),oauthTokenUpdatedAt:P().optional(),imapHost:w().min(1),imapPort:P().min(1).max(65535),imapTls:ce(),imapStartTls:ce(),smtpEnabled:ce(),smtpHost:w(),smtpPort:P().min(1).max(65535),smtpTls:ce(),smtpStartTls:ce(),smtpUsername:w(),smtpPasswordHash:w().optional(),isActive:ce(),connectionState:SV,lastConnectedAt:P().optional(),lastSyncAt:P().optional(),lastError:w().optional(),syncPhase:S2.optional(),mailboxCountTotal:P().min(0).optional(),mailboxCountSynced:P().min(0).optional(),createdAt:P(),updatedAt:P(),deletedAt:P().optional()});U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional()});U({schemaVersion:P(),document:rn(w(),ml())});U({mode:B3e.optional(),onExisting:H3e.optional(),document:rn(w(),ml())});const kDe=U({section:w(),key:w(),verdict:w(),reason:w().optional()});U({importId:w().min(25).max(25).optional(),valid:ce(),schemaVersion:P(),applied:ce(),items:ue(kDe),errors:ue(k8),warnings:ue(k8),accountsNeedingCredentials:ue(w().min(25).max(25))});U({statusCode:he(409),code:w(),message:w(),details:rn(w(),w()).optional()});const DDe=U({status:q3e,lastCheckedAt:w().optional(),latestVersion:w().optional(),publishedAt:w().optional(),summary:w().optional(),releaseNotesUrl:w().optional(),updateAvailable:ce().optional(),schemaVersion:P().optional(),error:w().optional()}),LDe=U({runId:w(),fromVersion:w(),targetVersion:w(),phase:V3e,outcome:We([W3e,Yn()]),startedAt:w(),updatedAt:w(),message:w(),logCommand:w()});U({currentVersion:w(),currentSchemaVersion:P().optional(),check:DDe,run:We([LDe,Yn()])});U({targetVersion:w()});const qV=U({userId:w(),email:w(),createdAt:P(),lastSignInAt:P(),sessionCount:P(),status:CV,isCaller:ce()});U({people:ue(qV)});U({statusCode:he(403),message:w(),details:rn(w(),w()).optional(),code:We([he("sign_in_disabled"),he("caller_disabled"),he("foreign_origin"),he("step_up_required"),he("wrong_password")])});U({password:w(),action:G3e,userId:w()});U({stepUpToken:w(),expiresAt:P()});U({statusCode:he(429),message:w(),details:rn(w(),w()).optional(),code:he("step_up_locked")});U({stepUpToken:w()});U({status:CV,stepUpToken:w()});U({statusCode:he(409),message:w(),details:rn(w(),w()).optional(),code:he("cannot_disable_self")});U({stepUpToken:w()});U({person:qV,resetUrl:w(),expiresAt:P()});U({mailboxId:w().min(25).max(25),accountId:w().min(25).max(25),namespaceType:C2,namespacePrefix:w(),hierarchyDelimiter:w().min(1).max(1),fullPath:w().min(1).max(512),uidValidity:P().min(1),uidNext:P().min(1),highestModseq:w().max(32),messageCount:P().min(0),unseenCount:P().min(0),deletedCount:P().min(0),totalSize:P().min(0),lastSyncUid:P(),highWaterMarkUid:P(),lastMessageSyncAt:P(),initialSyncCompletedAt:P().optional(),parentMailboxId:w(),syncStatus:wV,pendingPath:w().max(512).optional(),syncFailureReason:w(),cursorState:K3e,specialUse:ue(w2).optional(),createdAt:P(),updatedAt:P()});const UDe=U({mailboxId:w().min(25).max(25),accountId:w().min(25).max(25),namespaceType:C2,namespacePrefix:w(),hierarchyDelimiter:w().min(1).max(1),fullPath:w().min(1).max(512),messageCount:P().min(0),unseenCount:P().min(0),deletedCount:P().min(0),lastSyncUid:P(),highWaterMarkUid:P(),lastMessageSyncAt:P(),syncStatus:wV,pendingPath:w().max(512).optional(),syncFailureReason:w(),specialUse:ue(w2).optional(),createdAt:P(),updatedAt:P(),muted:Pl.optional(),displayNameOverride:w().max(256).optional()});U({continuationToken:w().max(800).optional(),items:ue(UDe)});U({namespaceType:C2,fullPath:w().min(1).max(512)});U({fullPath:w().max(512).optional(),muted:We([Pl,Yn()]).optional(),displayNameOverride:We([w(),Yn()]).optional()});U({mailboxId:We([w(),Yn()])});const ua=U({field:Z3e,value:w().max(256)}),VV=U({version:he(0)}),Vb=U({test:he("header"),match:EV,header:Y3e,key:w().max(256)}),Wb=U({test:he("address"),match:EV,part:Q3e,key:w().max(256)}),Gb=U({test:he("hasWords"),words:ue(w().max(256))}),Kb=U({test:he("classification"),label:Fb}),Zb=U({test:he("allof"),tests:ue(We([eu(()=>Zb),eu(()=>Yb),eu(()=>Qb),Vb,Wb,Gb,Kb])).min(1).max(50)}),Yb=U({test:he("anyof"),tests:ue(We([Zb,eu(()=>Yb),eu(()=>Qb),Vb,Wb,Gb,Kb])).min(1).max(50)}),Qb=U({test:he("not"),operand:We([Zb,Yb,eu(()=>Qb),Vb,Wb,Gb,Kb])}),Hu=U({version:he(1),test:We([Zb,Yb,Qb,Vb,Wb,Gb,Kb])});U({filterId:w().min(25).max(25),accountConfigId:w().min(25).max(25),name:w().max(256),scope:Hh,expiresAt:w().optional(),ttl:P().optional(),state:Ub,disabledReason:E2,ruleChangedAt:P(),actionChangedAt:P(),matchOperator:ca,literalClauses:ue(ua),rule:We([VV,Hu]),priority:P(),stop:ce(),actionLabelId:w(),actionMailboxId:w(),createdAt:P(),updatedAt:P()});U({filterId:w().min(25).max(25),accountConfigId:w().min(25).max(25),name:w().max(256),scope:Hh,expiresAt:w().optional(),state:Ub,disabledReason:E2,ruleChangedAt:P(),actionChangedAt:P(),matchOperator:ca,literalClauses:ue(ua),priority:P(),stop:ce(),actionLabelId:w(),actionMailboxId:w(),createdAt:P(),updatedAt:P(),rule:Hu});U({name:w().max(256),scope:Hh,expiresAt:w().optional(),matchOperator:ca,actionLabelId:w(),actionMailboxId:w(),priority:P().optional(),stop:ce().optional(),literalClauses:ue(ua).optional(),rule:Hu.optional()});U({filterId:w().min(25).max(25),accountConfigId:w().min(25).max(25),name:w().max(256),scope:Hh,expiresAt:w().optional(),state:Ub,disabledReason:E2,ruleChangedAt:P(),actionChangedAt:P(),matchOperator:ca,literalClauses:ue(ua),priority:P(),stop:ce(),actionLabelId:w(),actionMailboxId:w(),createdAt:P(),updatedAt:P(),rule:Hu,organizeJobId:w()});U({name:w().max(256).optional(),scope:Hh.optional(),expiresAt:w().optional(),state:Ub.optional(),matchOperator:ca.optional(),literalClauses:ue(ua).optional(),priority:P().optional(),stop:ce().optional(),actionLabelId:w().optional(),actionMailboxId:w().optional(),rule:Hu.optional()});U({labelId:w().min(25).max(25),accountConfigId:w().min(25).max(25),name:w().max(140),normalizedName:w().max(140),color:qh,createdAt:P(),updatedAt:P()});const FDe=U({accountId:w().min(25).max(25),state:We([he("Present"),he("Pending")]),mailboxId:w().min(25).max(25),fullPath:w().max(512)}),$De=U({accountId:w().min(25).max(25),state:he("Missing")});U({labelId:w().min(25).max(25),accountConfigId:w().min(25).max(25),name:w().max(140),color:qh,createdAt:P(),updatedAt:P(),filterCount:P(),folders:ue(We([FDe,$De]))});U({name:w().max(140),color:qh});U({name:w().max(140),color:qh});U({startPosition:w().optional(),filterId:w().min(25).max(25).optional(),matchOperator:ca,literalClauses:ue(ua),actionLabelId:w(),actionMailboxId:w()});U({statusCode:he(202),organizeJobId:w(),state:x2});U({matchedCount:P(),messageIds:ue(w())});U({organizeJobId:w().min(25).max(25),accountConfigId:w().min(25).max(25),userId:w(),state:x2,filterId:w(),matchOperator:ca,literalClauses:ue(ua),rule:We([VV,Hu]),actionLabelId:w(),actionMailboxId:w(),sourceMailboxId:w(),sentAfter:w(),sentBefore:w(),matchedCount:P(),appliedCount:P(),startPosition:w(),nextPosition:w(),remainingCount:P(),failedCount:P(),errorMessage:w(),ttl:P(),createdAt:P(),updatedAt:P()});U({organizeJobId:w().min(25).max(25),accountConfigId:w().min(25).max(25),userId:w(),state:x2,filterId:w(),matchOperator:ca,literalClauses:ue(ua),actionLabelId:w(),actionMailboxId:w(),matchedCount:P(),appliedCount:P(),nextPosition:w(),remainingCount:P(),failedCount:P(),errorMessage:w(),createdAt:P(),updatedAt:P()});const zDe=U({calendarId:w().min(25).max(25),accountConfigId:w().min(25).max(25),urlSegment:w().max(64),displayName:w().max(140),color:$b,componentSet:xV,source:_V,timezone:w().max(64),syncSequence:P(),subscriptionUrl:w().max(2048),subscriptionEnabled:ce(),subscriptionCheckedAt:P(),subscriptionFetchedAt:P(),subscriptionError:w().max(512),createdAt:P(),updatedAt:P()});U({items:ue(zDe)});U({calendarId:w().min(25).max(25),accountConfigId:w().min(25).max(25),urlSegment:w().max(64),displayName:w().max(140),color:$b,componentSet:xV,source:_V,timezone:w().max(64),syncSequence:P(),subscriptionUrl:w().max(2048),subscriptionEnabled:ce(),subscriptionCheckedAt:P(),subscriptionFetchedAt:P(),subscriptionError:w().max(512),createdAt:P(),updatedAt:P()});U({displayName:w().max(140),urlSegment:w().max(64),color:$b.optional(),timezone:w().max(64).optional(),subscriptionUrl:w().max(2048).optional()});U({displayName:w().max(140),color:$b,timezone:w().max(64),subscriptionEnabled:ce()});U({statusCode:he(204)});U({calendarId:w().min(25).max(25),createdAt:P(),rotatedAt:P()});U({calendarId:w().min(25).max(25),feedToken:w().max(512),createdAt:P(),rotatedAt:P()});U({contentType:he("text/calendar; charset=utf-8"),etag:w(),lastModified:w(),icalData:w()});U({statusCode:he(304),etag:w(),lastModified:w()});U({statusCode:he(404),contentType:he("text/plain; charset=utf-8"),message:w()});const jDe=U({calendarId:w().min(25).max(25),calendarObjectId:w().min(25).max(25),recurrenceId:w().max(64),icalUid:w().max(512),summary:w().max(512),start:w().max(64),end:w().max(64),allDay:ce(),status:ju,transparency:Bu,zoneCertainty:Vh,etag:w().max(64),hasRecurrence:ce(),participation:IV});U({items:ue(jDe)});const WV=U({email:w().max(512),displayName:w().max(512)});U({calendarId:w().min(25).max(25),summary:w().max(512),description:w().max(2048).optional(),location:w().max(512).optional(),start:w().max(64),end:w().max(64),allDay:ce().optional(),timeZone:w().max(64).optional(),status:ju.optional(),transparency:Bu.optional(),recurrenceRule:w().max(512).optional(),attendees:ue(WV).optional(),organizerAccountId:w().min(25).max(25).optional()});U({calendarObjectId:w().min(25).max(25),calendarId:w().min(25).max(25),resourceName:w().max(256),icalUid:w().max(512),icalData:w(),etag:w().max(64),sequence:P(),syncSequence:P(),summary:w().max(512),dtStart:w().max(64),dtEnd:w().max(64),allDay:ce(),zoneCertainty:Vh,status:ju,transparency:Bu,hasRecurrence:ce(),expandedThrough:w().max(64),createdAt:P(),updatedAt:P()});const BDe=U({email:w().max(512),displayName:w().max(512),role:J3e,status:X3e}),HDe=U({accepted:P(),declined:P(),tentative:P(),needsAction:P()}),GV=U({email:w().max(512),outboxMessageId:w().min(25).max(25),method:zb,status:_2});U({calendarObjectId:w().min(25).max(25),calendarId:w().min(25).max(25),resourceName:w().max(256),icalUid:w().max(512),icalData:w(),etag:w().max(64),sequence:P(),syncSequence:P(),summary:w().max(512),dtStart:w().max(64),dtEnd:w().max(64),allDay:ce(),zoneCertainty:Vh,status:ju,transparency:Bu,hasRecurrence:ce(),expandedThrough:w().max(64),createdAt:P(),updatedAt:P(),participation:IV,organizer:w().max(512),attendees:ue(BDe),attendeeCounts:HDe,sends:ue(GV)});const qDe=U({summary:w().max(512).optional(),description:w().max(2048).optional(),location:w().max(512).optional(),start:w().max(64).optional(),end:w().max(64).optional(),allDay:ce().optional(),timeZone:w().max(64).optional(),status:ju.optional(),transparency:Bu.optional(),recurrenceRule:w().max(512).optional(),attendees:ue(WV).optional(),organizerAccountId:w().min(25).max(25).optional(),answer:AV.optional()});U({statusCode:he(200),sends:ue(GV)});const VDe=U({start:w().max(64),end:w().max(64)});U({items:ue(VDe)});const WDe=U({state:he("Priced"),currency:he("USD"),perMillionInputTokens:P()}),KV=U({state:he("NoPrice")}),GDe=U({presetId:Wh,label:w(),group:eDe,adapterShape:tDe,defaultBaseUrl:w().optional(),defaultModel:w(),needsKey:ce(),price:We([WDe,KV])}),KDe=U({state:he("NotConfigured")}),ZDe=U({presetId:Ac,model:Ac,baseUrl:Ac,apiKey:Ac,enabled:Ac,dailyLimit:Ac}),YDe=U({state:he("Priced"),currency:he("USD"),amount:P()}),QDe=U({accountId:w().min(25).max(25),calls:P(),dailyLimit:P(),resetsAt:w().datetime(),cost:We([YDe,KV])}),JDe=U({state:he("Configured"),presetId:Wh,model:w(),baseUrl:w(),enabled:ce(),dailyLimit:P(),sources:ZDe,usage:ue(QDe)}),XDe=U({state:he("Unrunnable"),presetId:Wh,reason:nDe}),ZV=U({state:he("Unset")}),I2=U({state:he("Set"),cleanBelow:P().min(0).max(1),spamAt:P().min(0).max(1)}),e5e=U({thresholds:We([ZV,I2]),spamPlacement:mh,phishingPlacement:mh});U({defaultInvitationSenderAccountId:w().min(25).max(25).optional(),defaultInvitationSenderChosen:ce(),classificationPresets:ue(GDe),classification:We([KDe,JDe,XDe]),spam:e5e});U({defaultInvitationSenderAccountId:w().min(25).max(25).optional(),classificationPresetId:Wh.optional(),classificationModel:w().optional(),classificationBaseUrl:w().optional(),classificationApiKey:w().optional(),classificationEnabled:ce().optional(),classificationDailyLimit:P().min(1).optional(),spamPlacementSpam:mh.optional(),spamPlacementPhishing:mh.optional()});U({presetId:Wh,model:w(),baseUrl:w(),apiKey:w()});U({state:he("Passed"),latencyMs:P(),label:Fb,confidence:P()});U({state:he("Failed"),latencyMs:P(),status:P().optional(),kind:rDe,field:oDe.optional(),fix:w()});const t5e=U({category:Ml,count:P()}),n5e=U({label:Fb,count:P()}),r5e=U({spamReportedNotJunk:P(),categoryOverridden:P()}),o5e=U({date:w(),action:RV,kind:TV,count:P()}),s5e=U({from:P().min(0).max(1),count:P()});U({since:w(),examined:P(),byCategory:ue(t5e),byLabel:ue(n5e),corrections:r5e,spamByDay:ue(o5e),spamScoreBands:ue(s5e)});const i5e=U({calendarTaskId:w().min(25).max(25),calendarId:w().min(25).max(25),resourceName:w().max(256),icalUid:w().max(512),icalData:w(),etag:w().max(64),summary:w().max(512),description:w().max(2048),due:w().max(64),dueAt:w().max(64),allDay:ce(),completed:ce(),createdAt:P(),updatedAt:P()});U({items:ue(i5e)});U({calendarTaskId:w().min(25).max(25),calendarId:w().min(25).max(25),resourceName:w().max(256),icalUid:w().max(512),icalData:w(),etag:w().max(64),summary:w().max(512),description:w().max(2048),due:w().max(64),dueAt:w().max(64),allDay:ce(),completed:ce(),createdAt:P(),updatedAt:P()});U({calendarId:w().min(25).max(25).optional(),summary:w().max(512),description:w().max(2048).optional(),due:w().max(64),allDay:ce().optional(),timeZone:w().max(64).optional()});U({summary:w().max(512).optional(),description:w().max(2048).optional(),due:w().max(64).optional(),allDay:ce().optional(),timeZone:w().max(64).optional(),completed:ce().optional()});U({deletedCount:P()});U({triggered:ce(),message:w()});const a5e=U({mailboxId:w().min(25).max(25),fullPath:w(),phase:w(),messagesTotal:P(),messagesSynced:P(),highWaterMarkUid:P(),lastSyncedAt:P().optional()});U({accountId:w().min(25).max(25),syncPhase:S2.optional(),mailboxCountTotal:P().optional(),mailboxCountSynced:P().optional(),lastSyncAt:P().optional(),mailboxes:ue(a5e)});U({email:w().min(1),displayName:w().optional(),username:w().optional(),authType:b2.optional(),syncedServices:ue(Bh).optional(),password:w().optional(),imapHost:w().min(1),imapPort:P().min(1).max(65535),imapTls:ce(),imapStartTls:ce(),smtpEnabled:ce().optional(),smtpHost:w().optional(),smtpPort:P().min(1).max(65535).optional(),smtpTls:ce().optional(),smtpStartTls:ce().optional(),smtpUsername:w().optional(),smtpPassword:w().optional()});U({accountId:w().min(25).max(25).optional(),username:w().min(1),password:w().optional(),imapHost:w().min(1),imapPort:P().min(1).max(65535),imapTls:ce(),imapStartTls:ce(),smtpHost:w().optional(),smtpPort:P().min(1).max(65535).optional(),smtpTls:ce().optional(),smtpStartTls:ce().optional(),smtpUsername:w().optional(),smtpPassword:w().optional()});U({imapSuccess:ce(),imapError:w().optional(),smtpSuccess:ce().optional(),smtpError:w().optional()});U({displayName:w().optional(),password:w().optional(),imapHost:w().optional(),imapPort:P().min(1).max(65535).optional(),imapTls:ce().optional(),imapStartTls:ce().optional(),smtpEnabled:ce().optional(),smtpHost:w().optional(),smtpPort:P().min(1).max(65535).optional(),smtpTls:ce().optional(),smtpStartTls:ce().optional(),smtpUsername:w().optional(),smtpPassword:w().optional(),isActive:ce().optional(),syncedServices:ue(Bh).optional(),signaturePlainText:w().optional(),signatureHtml:w().optional(),composeLanguages:ue(w()).optional(),muted:We([Pl,Yn()]).optional()});U({accountId:w().min(25).max(25),deletedAt:P(),message:w()});U({threadMessageId:w().min(25).max(25),threadId:w().min(25).max(25),messageId:w().min(25).max(25),accountConfigId:w().min(25).max(25),mailboxId:w().min(25).max(25),uid:P().min(1),messageIdHeader:w().optional(),inReplyTo:w().optional(),referenceOrder:P().min(0),fromEmail:w().optional(),fromName:w().optional(),subject:w().optional(),listId:w().max(256).optional(),internalDate:P(),sentDate:P(),isRead:ce(),hasAttachment:ce(),star:jb,hasStars:ce(),isDeleted:ce(),snippet:w().max(256).optional(),category:Ml,createdAt:P(),updatedAt:P()});const Jb=U({fromDomain:w(),dkimDomain:w().optional(),dkimMismatch:ce(),signerDomain:w().optional(),envelopeDomain:w().optional(),signerMessageCount:P().optional(),signerFirstSeenAt:P().optional()}),YV=U({action:MV.optional(),fromPlacement:w().optional(),fromMailboxId:w().min(25).max(25).optional(),destinationMailboxId:w().min(25).max(25).optional(),filterId:w().min(25).max(25).optional()}),QV=U({labelId:w().min(25).max(25),name:w().max(140),color:qh}),Xb=U({reportedAt:P()}),A2=U({action:MV,confidence:sDe,fromPlacement:w(),reasons:ue(w()),dryRun:ce(),decidedAt:P()}),Gh=U({state:he("NotChecked")}),l5e=U({rule:iDe}),c5e=U({rule:he("Filter"),filterId:w().min(25).max(25)}),Kh=U({state:he("ScreenedOut"),screen:We([l5e,c5e])}),u5e=U({name:aDe,symbol:w(),score:P(),options:ue(w())}),Zh=U({state:he("Checked"),score:P().min(0).max(1),action:RV,kind:TV,reasons:ue(u5e),modelOutcome:lDe,decidedBy:cDe}),Yh=U({state:he("Failed"),kind:uDe}),JV=U({threadMessageId:w().min(25).max(25),threadId:w().min(25).max(25),messageId:w().min(25).max(25),accountConfigId:w().min(25).max(25),mailboxId:w().min(25).max(25),fromEmail:w().optional(),fromName:w().optional(),subject:w().optional(),sentDate:P(),isRead:ce(),hasAttachment:ce(),star:jb,hasStars:ce(),isDeleted:ce(),snippet:w().max(256).optional(),createdAt:P(),updatedAt:P(),category:Ml,senderTrust:OV,muted:ce(),authenticity:Jb.optional(),status:Bb,syncStatus:Hb,abandonedMutation:qb,accountId:w().min(25).max(25),autoMoved:YV.optional(),labels:ue(QV).optional(),spamReport:Xb.optional(),placementVerdict:A2.optional(),spamVerdict:We([Gh,Kh,Zh,Yh]),spamCleared:ce()});U({continuationToken:w().max(800).optional(),items:ue(JV)});U({items:ue(JV).optional(),continuationToken:w().max(800).optional(),count:P().optional()});U({accountId:w().min(25).max(25),toAddresses:ue(w()).min(1),ccAddresses:ue(w()).optional(),bccAddresses:ue(w()).optional(),subject:w().optional(),textBody:w().optional(),htmlBody:w().optional(),inReplyTo:w().optional(),references:ue(w()).optional(),sendImmediately:ce().optional()});U({outboxMessageId:w().min(25).max(25),accountId:w().min(25).max(25),accountConfigId:w().min(25).max(25),fromAddress:w(),fromName:w().optional(),toAddresses:ue(w()),ccAddresses:ue(w()),bccAddresses:ue(w()),replyToAddress:w().optional(),subject:w().optional(),messageIdValue:w(),inReplyTo:w().optional(),references:ue(w()),textBody:w().optional(),htmlBody:w().optional(),status:_2,lastError:w().optional(),lastSmtpCode:P().optional(),sentAt:P().optional(),smtpMessageId:w().optional(),appendedUid:P(),createdAt:P(),updatedAt:P()});const d5e=U({outboxAttachmentId:w().min(25).max(25),outboxMessageId:w().min(25).max(25),filename:w().max(256),contentType:w().max(256),sizeBytes:P().min(0),state:PV,contentId:w().max(256),contentUrl:w().url()}),f5e=U({outboxMessageId:w().min(25).max(25),accountId:w().min(25).max(25),fromAddress:w(),fromName:w().optional(),toAddresses:ue(w()),ccAddresses:ue(w()),bccAddresses:ue(w()),subject:w().optional(),inReplyTo:w().optional(),references:ue(w()),textBody:w().optional(),htmlBody:w().optional(),status:_2,lastError:w().optional(),sentAt:P().optional(),createdAt:P(),updatedAt:P(),attachments:ue(d5e)});U({outboxAttachmentId:w().min(25).max(25),outboxMessageId:w().min(25).max(25),accountId:w().min(25).max(25),accountConfigId:w().min(25).max(25),filename:w().max(256),contentType:w().max(256),sizeBytes:P().min(0),state:PV,storageKey:w().max(2048),reservationExpiresAt:P().min(0),createdAt:P(),updatedAt:P()});U({continuationToken:w().max(800).optional(),items:ue(f5e)});U({attachmentIds:ue(w().min(25).max(25)).optional(),toAddresses:ue(w()).optional(),ccAddresses:ue(w()).optional(),bccAddresses:ue(w()).optional(),subject:w().optional(),textBody:w().optional(),htmlBody:w().optional(),inReplyTo:w().optional(),references:ue(w()).optional()});U({filename:w().max(256),contentType:w().max(256),sizeBytes:P().min(1)});U({outboxAttachmentId:w().min(25).max(25),outboxMessageId:w().min(25).max(25),filename:w().max(256),contentType:w().max(256),sizeBytes:P().min(1),contentId:w().max(256),uploadUrl:w().max(2048),uploadExpiresAt:P()});U({code:w(),reason:NV,message:w().max(512),limitBytes:P().min(0),usedBytes:P().min(0)});U({statusCode:We([he(400),he(413)]),code:w(),reason:NV,message:w().max(512),limitBytes:P().min(0),usedBytes:P().min(0)});const XV=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),eW=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),tW=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),nW=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),rW=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),oW=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),sW=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:Ml}),iW=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),aW=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),R2=U({trusted:XV.optional(),blocked:eW.optional(),neverSpam:tW.optional(),muted:Pl.optional(),vip:nW.optional(),wellknown:rW.optional(),junkOnly:oW.optional(),category:sW.optional(),autoArchive:iW.optional(),unsubscribed:aW.optional()});U({addressId:w().min(25).max(25),accountConfigId:w().min(25).max(25),displayName:w().optional(),localPart:w().min(1),domain:w().min(1),normalizedEmail:w(),normalizedCompound:w(),flags:R2,inboundCount:P(),outboundCount:P(),replyCount:P(),lastInboundAt:P(),lastOutboundAt:P().optional(),lastReplyAt:P(),createdAt:P(),updatedAt:P()});U({addressId:w().min(25).max(25),accountConfigId:w().min(25).max(25),displayName:w().optional(),localPart:w().min(1),domain:w().min(1),normalizedEmail:w(),flags:R2,inboundCount:P(),outboundCount:P(),replyCount:P(),lastInboundAt:P(),lastReplyAt:P(),createdAt:P(),updatedAt:P()});const h5e=U({trusted:We([XV,Yn()]).optional(),blocked:We([eW,Yn()]).optional(),neverSpam:We([tW,Yn()]).optional(),muted:We([Pl,Yn()]).optional(),vip:We([nW,Yn()]).optional(),wellknown:We([rW,Yn()]).optional(),junkOnly:We([oW,Yn()]).optional(),category:We([sW,Yn()]).optional(),autoArchive:We([iW,Yn()]).optional(),unsubscribed:We([aW,Yn()]).optional()});U({flags:h5e.optional(),clearFlags:ue(dDe).optional()});const p5e=U({messageId:w().min(25).max(25),mailboxId:w().min(25).max(25),uid:P().min(1),rfc822Size:P().min(0),internalDate:P(),status:Bb,syncStatus:Hb,abandonedMutation:qb,authenticity:Jb.optional(),spamVerdict:We([Gh,Kh,Zh,Yh]),spamCleared:ce(),messageIdHeader:w().optional(),autoMoved:YV.optional(),labels:ue(QV).optional(),spamReport:Xb.optional()}),cf=U({addressId:w().min(25).max(25),displayName:w().optional(),normalizedEmail:w(),addressRole:DV,addressOrder:P(),flags:R2.optional()}),m5e=U({messageId:w().min(25).max(25),date:P(),subject:w().optional(),messageIdValue:w().optional(),from:ue(cf),to:ue(cf),cc:ue(cf),bcc:ue(cf),replyTo:ue(cf),category:Ml,senderTrust:OV}),g5e=U({bodyPartId:w().min(25).max(25),partPath:w().min(1),mediaType:LV,mediaSubtype:w().min(1),contentId:w().optional(),sizeOctets:P().min(0),disposition:UV.optional(),dispositionFilename:w().optional(),isMultipart:ce(),contentUrl:w().url()}),v5e=U({messageIdValue:w(),referenceType:FV,referenceOrder:P().min(0)});U({message:p5e,envelope:m5e,flags:ue(w()),bodyParts:ue(g5e),references:ue(v5e)});const lW=U({dmarc:tu.optional(),spf:tu.optional(),dkim:tu.optional()}),cW=U({classified:ce(),score:w().optional(),source:w().optional()}),uW=U({filterId:w().min(25).max(25),sourceMailboxId:w().min(25).max(25),destinationMailboxId:w().min(25).max(25),decidedAt:P()}),T2=U({label:Fb,confidence:P().min(0).max(1),confident:ce()});U({messageId:w().min(25).max(25),mailboxId:w().min(25).max(25),uid:P().min(1),sequenceNumber:P().min(1),rfc822Size:P().min(0),internalDate:P(),envelopeId:w().min(25).max(25),rootBodyPartId:w().min(25).max(25),bodyStorageKey:w().optional(),status:Bb,syncStatus:Hb,abandonedMutation:qb,originalMailboxId:w().min(25).max(25).optional(),originalUid:P().optional(),category:Ml,classificationState:kV,authenticity:Jb.optional(),authResult:lW.optional(),providerSpam:cW.optional(),hasListUnsubscribe:ce(),movedByRemit:ce(),placementVerdict:A2.optional(),filterMove:uW.optional(),placementDecidedAt:P().optional(),classifierScores:ue(T2),spamReport:Xb.optional(),spamVerdict:We([Gh,Kh,Zh,Yh]),spamCleared:ce(),createdAt:P(),updatedAt:P()});U({messageId:w().min(25).max(25),mailboxId:w().min(25).max(25),uid:P().min(1),sequenceNumber:P().min(1),rfc822Size:P().min(0),internalDate:P(),envelopeId:w().min(25).max(25),rootBodyPartId:w().min(25).max(25),bodyStorageKey:w().optional(),status:Bb,syncStatus:Hb,abandonedMutation:qb,originalMailboxId:w().min(25).max(25).optional(),originalUid:P().optional(),category:Ml,classificationState:kV,authenticity:Jb.optional(),authResult:lW.optional(),providerSpam:cW.optional(),hasListUnsubscribe:ce(),movedByRemit:ce(),placementVerdict:A2.optional(),filterMove:uW.optional(),placementDecidedAt:P().optional(),classifierScores:ue(T2),spamReport:Xb.optional(),spamVerdict:We([Gh,Kh,Zh,Yh]),spamCleared:ce(),createdAt:P(),updatedAt:P(),messageIdHeader:w().optional()});U({bodyPartId:w().min(25).max(25),messageId:w().min(25).max(25),parentBodyPartId:w().min(25).max(25).optional(),partPath:w().min(1),mediaType:LV,mediaSubtype:w().min(1),contentId:w().optional(),contentDescription:w().optional(),transferEncoding:fDe,sizeOctets:P().min(0),lineCount:P().optional(),md5Hash:w().optional(),disposition:UV.optional(),dispositionFilename:w().optional(),language:w().optional(),location:w().optional(),isMultipart:ce(),multipartSubtype:hDe.optional(),createdAt:P(),updatedAt:P()});U({messageReferenceId:w().min(25).max(25),messageId:w().min(25).max(25),envelopeId:w().min(25).max(25),messageIdValue:w(),referenceType:FV,referenceOrder:P().min(0),createdAt:P(),updatedAt:P()});U({raw:w()});U({isRead:ce().optional(),isStarred:ce().optional(),starColor:jb.optional()});U({messageIds:ue(w().min(25).max(25)).min(1).max(10),move:ce().optional()});const y5e=U({messageId:w().min(25).max(25),verdict:We([Gh,Kh,Zh,Yh]),labels:ue(w())}),b5e=U({messageId:w().min(25).max(25),code:pDe,retryable:ce()});U({successful:ue(y5e),failed:ue(b5e)});U({messageIds:ue(w().min(25).max(25)).min(1).max(100),isRead:ce().optional(),isStarred:ce().optional(),starColor:jb.optional()});U({successCount:P(),failureCount:P()});U({messageIds:ue(w().min(25).max(25)).min(1).max(100),permanent:ce().optional()});U({messageIds:ue(w().min(25).max(25)).min(1).max(100)});U({messageIds:ue(w().min(25).max(25)).min(1).max(100),destinationMailboxId:w().min(25).max(25)});U({messageIds:ue(w().min(25).max(25)).min(1).max(100),destinationMailboxId:w().min(25).max(25)});U({messageIds:ue(w().min(25).max(25)).min(1).max(100),labelId:w().min(25).max(25),action:mDe});const S5e=U({messageId:w().min(25).max(25),reason:w()});U({successCount:P(),failureCount:P(),failures:ue(S5e).optional()});U({suggestionId:w().min(25).max(25),accountConfigId:w().min(25).max(25),messageId:w().min(25).max(25),bodyPartId:w().min(25).max(25),icalUid:w().max(512),sequence:P(),method:zb,source:zV,state:$V,summary:w().max(512),dtStart:w().max(64),dtEnd:w().max(64),endsAtUtc:w().max(64),allDay:ce(),location:w().max(512),organizer:w().max(256),zoneCertainty:Vh,icalData:w(),acceptedCalendarObjectId:w(),supersededByMessageId:w(),createdAt:P(),updatedAt:P()});U({suggestionId:w().min(25).max(25),accountConfigId:w().min(25).max(25),messageId:w().min(25).max(25),bodyPartId:w().min(25).max(25),icalUid:w().max(512),sequence:P(),method:zb,source:zV,state:$V,summary:w().max(512),dtStart:w().max(64),dtEnd:w().max(64),endsAtUtc:w().max(64),allDay:ce(),location:w().max(512),organizer:w().max(256),zoneCertainty:Vh,acceptedCalendarObjectId:w(),supersededByMessageId:w(),createdAt:P(),updatedAt:P(),supersededByThreadId:w(),answerOvertakenBy:gDe});U({calendarId:w().min(25).max(25),answer:AV.optional(),event:qDe.optional()});U({muteSender:ce()});U({envelopeAddressId:w().min(25).max(25),messageId:w().min(25).max(25),addressId:w().min(25).max(25),displayName:w().optional(),normalizedEmail:w(),addressRole:DV,addressOrder:P().min(0),createdAt:P(),updatedAt:P()});const C5e=U({kind:CDe,accountId:w().min(25).max(25),folderPath:w().max(512),target:w().max(256),mailboxId:w()});U({importId:w().min(25).max(25),accountConfigId:w().min(25).max(25),schemaVersion:P(),state:SDe,document:rn(w(),ml()),unresolvedRefs:ue(C5e),createdAt:P(),completedAt:P(),updatedAt:P()});U({kind:w()});const w5e=U({kind:he("Boolean"),value:ce()}),E5e=U({kind:he("String"),value:w()}),x5e=U({kind:he("Number"),value:P()}),_5e=U({kind:he("StringList"),value:ue(w())}),I5e=U({kind:he("Map"),value:rn(w(),w())}),A5e=U({kind:he("MutedFlag"),value:Pl}),R5e=U({date:w().date(),calls:P()}),T5e=U({kind:he("DailyCount"),value:R5e});U({accountSettingId:w().min(25).max(25),accountConfigId:w().min(25).max(25),name:w(),value:We([w5e,E5e,x5e,_5e,I5e,A5e,T5e]),createdAt:P(),updatedAt:P()});U({mailboxAttributeId:w().min(25).max(25),mailboxId:w().min(25).max(25),attributeName:vDe});U({mailboxSpecialUseId:w().min(25).max(25),mailboxId:w().min(25).max(25),specialUse:w2});U({mailboxFlagId:w().min(25).max(25),mailboxId:w().min(25).max(25),flagName:We([jV,BV,w()]),isPermanent:ce()});U({mailboxId:w().min(25).max(25),eventName:w(),accountId:w().min(25).max(25),lockId:w().min(25).max(25),acquiredAt:P(),lockedBy:w(),ttl:P()});U({messageFlagId:w().min(25).max(25),messageId:w().min(25).max(25),flagName:We([jV,BV,w()]),setAt:P(),createdAt:P(),updatedAt:P()});const dW=U({name:w(),value:w()}),O5e=U({href:w(),text:w()}),M5e=U({raw:w(),headers:ue(dW),text:w(),html:w(),links:ue(O5e)}),P5e=U({mailFrom:w(),rcpt:ue(w()),ip:w(),helo:w(),hostname:w()}),N5e=U({dmarc:tu,spf:tu,dkim:tu,signerDomain:w(),envelopeDomain:w()}),k5e=U({verdict:wDe,score:w(),headers:ue(dW)}),D5e=U({knownSender:ce(),senderMessagesSeen:P(),senderDomainMessagesSeen:P(),senderDomainRegisteredAt:w().optional(),receivedAt:w(),classifierScores:ue(T2),modelAllowed:ce()});U({message:M5e,envelope:P5e,authentication:N5e,provider:k5e,context:D5e});U({name:he("Inline"),thresholds:We([ZV,I2])});U({name:he("Rspamd"),url:w()});U({name:he("Model"),thresholds:I2});U({messageId:w().min(25).max(25),accountId:w().min(25).max(25),accountConfigId:w().min(25).max(25),sourceMailboxId:w().min(25).max(25),destinationMailboxId:w().min(25).max(25),state:EDe,createdAt:P(),updatedAt:P()});U({messageId:w().min(25).max(25),flagName:w(),accountId:w().min(25).max(25),accountConfigId:w().min(25).max(25),mailboxId:w().min(25).max(25),operation:xDe,state:_De,createdAt:P(),updatedAt:P()});U({envelopeId:w().min(25).max(25),messageId:w().min(25).max(25),dateValue:P(),dateRaw:w(),subject:w().optional(),messageIdValue:w().optional(),createdAt:P(),updatedAt:P()});const L5e=U({state:he("Published"),registeredAt:w()}),U5e=U({state:he("Unpublished")});U({domainRegistrationId:w().max(256),registration:We([L5e,U5e]),createdAt:P(),updatedAt:P()});U({accountConfigId:w().min(25).max(25),senderKey:w().max(256),signerDomain:w().max(256),messageCount:P(),firstSeenAt:P(),lastSeenAt:P(),userAffirmedAt:P(),createdAt:P(),updatedAt:P()});U({bodyPartParameterId:w().min(25).max(25),messageId:w().min(25).max(25),bodyPartId:w().min(25).max(25),parameterName:w().min(1),parameterValue:w(),createdAt:P(),updatedAt:P()});U({messageId:w().min(25).max(25),createdAt:P(),updatedAt:P()});U({messageId:w().min(25).max(25),text:w(),createdAt:P(),updatedAt:P()});U({rawStorageId:w().min(25).max(25),messageId:w().min(25).max(25),storageType:yDe,storageLocation:w(),storageKey:w(),sizeBytes:P().min(0),checksumSha256:w().min(64).max(64),contentEncoding:bDe,storedAt:P(),expiresAt:P().optional(),createdAt:P(),updatedAt:P()});U({outboxMessageId:w().min(25).max(25),accountConfigId:w().min(25).max(25),calendarObjectId:w().min(25).max(25),recipient:w().max(512),method:zb,sequence:P(),icalData:w(),createdAt:P(),updatedAt:P()});U({calendarId:w().min(25).max(25),calendarObjectId:w().min(25).max(25),recurrenceId:w().max(64),startAt:w().max(64),endAt:w().max(64),allDay:ce(),summary:w().max(512),status:ju,transparency:Bu,createdAt:P(),updatedAt:P()});U({feedTokenId:w().min(25).max(25),accountConfigId:w().min(25).max(25),calendarId:w().min(25).max(25),tokenHash:w().max(64),createdAt:P(),rotatedAt:P(),updatedAt:P()});U({messageLabelId:w().min(25).max(25),messageId:w().min(25).max(25),labelId:w().min(25).max(25),accountConfigId:w().min(25).max(25),appliedByFilterId:w().min(25).max(25).optional(),createdAt:P(),updatedAt:P()});U({labelMailboxId:w().min(25).max(25),labelId:w().min(25).max(25),accountId:w().min(25).max(25),mailboxId:w().min(25).max(25),createdAt:P(),updatedAt:P()});U({email:w().optional(),services:ue(Bh).min(1).optional()});U({authorizationUrl:w()});U({kind:he("Boolean"),value:ce()});U({kind:he("String"),value:w()});U({kind:he("String"),value:mh});U({kind:he("Number"),value:P()});U({kind:he("StringList"),value:ue(w())});U({kind:he("Map"),value:rn(w(),w())});U({kind:he("Map"),value:U({encryptedDek:w(),encryptedData:w(),iv:w(),authTag:w()})});U({kind:he("DailyCount"),value:U({date:w(),calls:P().int()})});U({kind:he("MutedFlag"),value:U({value:ce(),setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional()})});const F5e=e=>e.hierarchyDelimiter.length===0?[e.fullPath]:e.fullPath.split(e.hierarchyDelimiter),gh=e=>{const t=F5e(e);return t[t.length-1]||e.fullPath},$5e=(e,t)=>{switch(e.kind){case"appointed":case"flagged":return{allowed:!0,mailbox:e.mailbox};case"proposed":return t==="resolved"?{allowed:!0,mailbox:e.mailbox}:{allowed:!1,reason:"unconfirmed"};case"appointment_stale":return{allowed:!1,reason:"stale"};default:return{allowed:!1,reason:"none"}}},z5e=(e,t)=>$5e(e,t).allowed,j5e={[yc.Appointed]:{kind:"appointed",mailbox:null},[yc.Flagged]:{kind:"flagged",mailbox:null},[yc.Reserved]:{kind:"reserved",mailbox:null},[yc.Proposed]:{kind:"proposed",mailbox:null},[yc.Stale]:{kind:"appointment_stale",appointedMailboxId:"",fallback:{kind:"none"}},[yc.None]:{kind:"none"}},B5e=(e,t)=>z5e(j5e[e],t),O2=()=>typeof navigator<"u"&&(navigator.language||navigator.languages?.[0])||"en-US",es=(e,t)=>new Intl.NumberFormat(O2(),t).format(e),H5e=/^-?\d+$/,M2=e=>{if(e instanceof Date)return e;if(typeof e=="number")return new Date(e);if(typeof e=="string"){const t=e.trim();return H5e.test(t)?new Date(Number(t)):new Date(t)}return new Date(Number.NaN)},P2=e=>Number.isFinite(e.getTime()),Ef=(e,t)=>{const n=M2(e);return P2(n)?new Intl.DateTimeFormat(O2(),t).format(n):""},fW=(e,t)=>Ef(e,{short:{month:"short",day:"numeric"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"},time:{hour:"numeric",minute:"numeric"},datetime:{month:"short",day:"numeric",hour:"numeric",minute:"numeric"}}[t]),Dje=e=>{const t=M2(e);if(!P2(t))return"";const n=new Intl.RelativeTimeFormat(O2(),{numeric:"auto"}),r=Date.now(),o=t.getTime()-r,s=Math.round(o/1e3),a=Math.round(o/(1e3*60)),c=Math.round(o/(1e3*60*60)),u=Math.round(o/(1e3*60*60*24)),f=Math.round(o/(1e3*60*60*24*7));return Math.abs(s)<60?n.format(s,"second"):Math.abs(a)<60?n.format(a,"minute"):Math.abs(c)<24?n.format(c,"hour"):Math.abs(u)<7?n.format(u,"day"):Math.abs(f)<4?n.format(f,"week"):fW(t,"medium")},Lje=e=>{const t=M2(e);if(!P2(t))return"";const n=new Date,r=t.toDateString()===n.toDateString(),o=new Date(n);o.setDate(o.getDate()-1);const s=t.toDateString()===o.toDateString(),a=new Date(n);a.setDate(a.getDate()-6);const c=t>=a&&t<n,u=t.getFullYear()===n.getFullYear();return r?Ef(t,{hour:"numeric",minute:"numeric"}):s?"Yesterday":c?Ef(t,{weekday:"long"}):u?Ef(t,{month:"short",day:"numeric"}):Ef(t,{month:"short",day:"numeric",year:"numeric"})},q5e=e=>`Move ${e===1?"1":es(e)} ${e===1?"message":"messages"} to Trash?`,Uje=({targets:e,trashByAccount:t,hasAppointments:n,isError:r})=>{if(r)return"unavailable";if(!n||e.length===0)return"unknown";let o=!1,s=!1;for(const a of e){if(a.accountId===void 0)return"unknown";const c=t.get(a.accountId);if(c===void 0)return"unknown";if(c.source==="Stale")return"staleTrash";if(c.mailboxId===void 0)return"noTrash";c.mailboxId===a.mailboxId&&(o=!0,B5e(c.source,"confirmed")||(s=!0))}return s?"unconfirmed":o?"permanent":"trash"},V5e=e=>e==="permanent"||e==="unconfirmed",Fje=(e,t,n={})=>{const r=e===1?"1":es(e),o=e===1?"message":"messages",{trashFolderLabel:s,staleFolderLabel:a}=n;if(t==="noTrash")return{title:`Can't delete ${r} ${o} yet`,description:"No folder on this account is set as Trash, so there is nowhere to move the mail. Nothing has been deleted.",confirmLabel:"Pick a Trash folder"};if(t==="staleTrash")return{title:`Can't delete ${r} ${o} yet`,description:a?`The folder you set as this account's Trash — ${a} — is gone from the mail server. Nothing has been deleted.`:"The folder you set as this account's Trash is gone from the mail server. Nothing has been deleted.",confirmLabel:"Pick another folder"};if(t==="unconfirmed"){const c=s?`reader files this account's deleted mail in ${s} because of its name — nobody confirmed it.`:"reader files this account's deleted mail in a folder it matched by name — nobody confirmed it.";return{title:"Confirm this account's Trash folder",description:e>0?`${c} Deleting ${r} ${o} there erases them from the mail server, and that cannot be restored. Nothing has been deleted.`:`${c} Emptying a folder erases everything in it from the mail server, and that cannot be restored. Nothing has been emptied.`,confirmLabel:"Confirm the folder"}}return t==="unavailable"?{title:`Can't delete ${r} ${o}`,description:"reader couldn't read this account's folder settings, so it can't say whether this would move the mail to Trash or erase it. Nothing has been deleted.",confirmLabel:"Sign in again"}:t==="unknown"?{title:`Delete ${r} ${o}?`,description:"Checking where this account files deleted mail…",confirmLabel:"Delete"}:t==="permanent"?{title:`Permanently delete ${r} ${o}?`,description:"They are erased from the mail server and cannot be restored.",confirmLabel:"Delete permanently"}:{title:q5e(e),description:"You can restore them from Trash later.",confirmLabel:"Move to Trash"}},W5e={delete:(e,t)=>`Deleting ${e} of ${t}…`,move:(e,t)=>`Moving ${e} of ${t}…`,markRead:(e,t)=>`Marking ${e} of ${t} as read…`},G5e={delete:"moved to Trash",move:"moved",markRead:"marked as read"},hW=(e,t)=>e==="delete"&&V5e(t)?"permanently deleted":G5e[e],K5e={delete:"couldn't be deleted",move:"couldn't be moved",markRead:"couldn't be marked as read"},Z5e={delete:"Couldn't delete these messages",move:"Couldn't move these messages",markRead:"Couldn't mark these messages as read"},Y5e={delete:"The delete didn't finish.",move:"The move didn't finish.",markRead:"The update didn't finish."},$je=(e,t,n)=>W5e[e](es(t),es(n)),Q5e=(e,t,n="trash")=>`${es(t)} ${hW(e,n)}. Your mail server is still catching up.`,J5e=e=>`Stopped after ${es(e)}`,X5e=(e,t,n,r="trash")=>`${es(t)} of ${es(n)} ${hW(e,r)}. The rest were not sent, apart from the ones already on their way when you stopped — those may still have gone through.`,D8=(e,t)=>t>0?`Stopped after ${es(t)} — some messages ${K5e[e]}`:Z5e[e],eLe=e=>Y5e[e],tLe={delete:e=>`A delete of ${e} messages`,move:e=>`A move of ${e} messages`,markRead:e=>`Marking ${e} messages as read`},nLe=(e,t,n)=>`${tLe[e](es(t))}${n?` in ${n}`:""} is still running — stop it first.`,zje=e=>e==="delete"?"danger":"info",jje=(e,t,n,r)=>n.error!==void 0?null:n.cancelled?{severity:"warning",title:J5e(n.done),detail:X5e(e,n.done,t,r)}:{severity:"info",title:Q5e(e,n.done,r)},pW=100,rLe=(e,t)=>e.kind==="move"?[t,e.destinationMailboxId]:[t],oLe=new AbortController().signal,xA=async e=>e.then(t=>({ok:!0,value:t}),t=>({ok:!1,error:t})),sLe=(e,t=pW)=>{if(e.length===0)return[];const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n},iLe=(e,t=pW)=>{const n=new Map;for(const r of e){const o=n.get(r.accountId);if(o){o.push(r.id);continue}n.set(r.accountId,[r.id])}return[...n.values()].flatMap(r=>sLe(r,t))},mW=async(e,t,n,r)=>{const o=iLe(e),s=e.length;let a=0,c=0;const u=[];for(let f=0;f<o.length;f++){if(r.aborted)return u.push(...o.slice(f).flat()),{done:a,failedIds:u,refused:c,cancelled:!0};const h=o[f],m=await xA(t(h,r));if(!m.ok)return u.push(...o.slice(f).flat()),r.aborted?{done:a,failedIds:u,refused:c,cancelled:!0}:(n({done:a,total:s}),{done:a,failedIds:u,refused:c,cancelled:!1,error:m.error});c+=m.value?.failureCount??0,a+=h.length,n({done:a,total:s})}return{done:a,failedIds:u,refused:c,cancelled:!1}},Bje=async(e,t)=>{await mW(e.map(n=>({id:n,accountId:void 0})),async n=>(await t(n),{successCount:n.length,failureCount:0}),()=>{},oLe)},aLe=async(e,t,n,r,o)=>{let s=0,a=0;const c=[];let u;do{if(o.aborted)return{done:s,failedIds:c,refused:a,cancelled:!0};const f=await xA(e(u,o));if(!f.ok)return o.aborted?{done:s,failedIds:c,refused:a,cancelled:!0}:{done:s,failedIds:c,refused:a,cancelled:!1,error:f.error};const h=f.value;if(h.ids.length>0){const m=await xA(n(h.ids,o));if(!m.ok)return o.aborted?{done:s,failedIds:c,refused:a,cancelled:!0}:{done:s,failedIds:c,refused:a,cancelled:!1,error:m.error};a+=m.value?.failureCount??0,s+=h.ids.length,r({done:s,total:t})}u=h.continuationToken}while(u);return{done:s,failedIds:c,refused:a,cancelled:!1}},lLe=e=>({done:e.done,total:Math.max(e.total,e.done)}),cLe=e=>typeof e=="object"&&e!==null&&Array.isArray(e.pages),uLe=e=>typeof e=="object"&&e!==null&&Array.isArray(e.items),dLe=(e,t)=>e===void 0?e:cLe(e)?{...e,pages:e.pages.map(n=>({...n,items:t(n.items)}))}:uLe(e)?{...e,items:t(e.items)}:e,gW=e=>{const t=[];for(const n of new Set(e))t.push(H2e({path:{mailboxId:n}})),t.push(cq({path:{mailboxId:n}}));return t.push(dq()),t},Hje=(e,t)=>Promise.all(t.map(n=>e.cancelQueries({queryKey:n}))),qje=(e,t)=>t.flatMap(n=>e.getQueriesData({queryKey:n})).filter(n=>n[1]!==void 0).map(([n,r])=>({queryKey:n,data:r})),Vje=(e,t,n)=>{const r=o=>dLe(o,n);for(const o of t)e.setQueriesData({queryKey:o},r)},Wje=(e,t)=>{for(const n of t)e.setQueryData(n.queryKey,n.data)},vW=(e,t)=>{for(const n of t)e.invalidateQueries({queryKey:n})},yW=_.createContext(void 0),fLe=e=>{if(e.action)return e.action;if((e.severity??"error")==="error")return{label:"Report an issue",href:ku(ol({title:`Bug: ${e.title}`,errorMessage:e.detail?`${e.title} — ${e.detail}`:e.title,stack:e.error instanceof Error?e.error.stack:void 0}))}},bW=()=>{const e=_.useContext(yW);if(!e)throw new Error("useErrorBanners must be used within an ErrorBannerProvider");return e},L8=5,hLe=(e,t,n)=>({title:e,detail:SW(n)??t,error:n}),SW=e=>{if(e!=null){if(e instanceof Error)return e.message||void 0;if(typeof e=="string")return e||void 0;if(typeof e=="object"&&"message"in e&&typeof e.message=="string")return e.message||void 0}},Gje=e=>Sl(e)?.code==="message_gone_from_server",Kje=e=>{const t=SW(e);return t?t.startsWith("Message not found"):!1},pLe=(e,t,n)=>e.severity===n&&e.title===t.title&&e.detail===t.detail,mLe=(e,t)=>{const r=[...e.filter(o=>!pLe(o,{title:t.title,detail:t.detail,severity:t.severity},t.severity)),t];return r.length<=L8?r:r.slice(r.length-L8)},gLe=(e,t)=>e.filter(n=>n.id!==t),vLe=(e,t,n)=>({id:t,severity:e.severity??"error",title:e.title,detail:e.detail,action:e.action,onRetry:e.onRetry,createdAt:n}),yLe=new Set(["none","stale","unconfirmed"]),bLe=new Set(Object.values($se)),f_=(e,t)=>{const n=e?.[t];return typeof n=="string"?n:void 0},SLe=e=>{const t=Sl(e);if(t?.code!=="folder_role_unresolved")return;const{details:n}=t;if(!n)return;const r=f_(n,"reason"),o=f_(n,"role"),s=f_(n,"accountId");if(!(!r||!yLe.has(r))&&!(!o||!bLe.has(o)||!s))return{reason:r,role:o,accountId:s}},CLe=e=>Sl(e)?.code==="mailbox_not_settled",wLe=3e4,ELe=1e3,xLe="The folder couldn't be created on the mail server. Please try again.",_Le="The folder was created but the mail server hasn't confirmed it yet, so nothing was attached to it. It's in your folder list — try again in a moment.",ILe=(e,t)=>new Promise((n,r)=>{if(t?.aborted){r(t.reason);return}const o=setTimeout(()=>{t?.removeEventListener("abort",s),n()},e),s=()=>{clearTimeout(o),r(t?.reason)};t?.addEventListener("abort",s,{once:!0})});async function ALe({fetchMailboxes:e,mailboxId:t,signal:n,timeoutMs:r=wLe,pollIntervalMs:o=ELe,delay:s=ILe,now:a=Date.now}){const c=a()+r;for(;;){n?.throwIfAborted();const f=(await e()).find(h=>h.mailboxId===t);if(f?.syncStatus===b3.synced)return f;if(f?.syncStatus===b3.failed)throw new Error(xLe);if(a()>=c)throw new Error(_Le);await s(o,n)}}function CW(e,t){const n=e.trim();return t?`${t.fullPath}${t.hierarchyDelimiter}${n}`:n}const U8=(e,t)=>{const n=t.length===0?[e]:e.split(t);return n[0]?.toLowerCase()==="inbox"&&(n[0]="INBOX"),n.join(t)};function RLe({name:e,delimiter:t,parent:n,existingPaths:r}){const o=e.trim();if(o==="")return"Enter a folder name.";if(t.length>0&&o.includes(t))return`A folder name can't contain "${t}".`;const s=U8(CW(o,n),t);if(r.some(c=>U8(c,t)===s))return"A folder with that name already exists."}function TLe(e){const t=ia(),{data:n}=fl({...fA({path:{accountId:e??""}}),enabled:!!e}),r=cT({...T2e(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:o2({path:{accountId:e}})})}}),o=_.useRef(new Map),s=_.useCallback(async(c,u,f)=>{if(!e)throw new Error("No account to create the folder in. Pick messages from a single account first.");const h=n?.items??[],m=u?h.find(E=>E.fullPath===u):void 0;if(u&&!m)throw new Error(`Couldn't find the folder "${u}" to create this one inside.`);const g=m?{fullPath:m.fullPath,hierarchyDelimiter:m.hierarchyDelimiter}:void 0,v=CW(c,g);let C=o.current.get(v);if(!C){const E=g?.hierarchyDelimiter??h[0]?.hierarchyDelimiter??"/",x=RLe({name:c,delimiter:E,parent:g,existingPaths:h.map(R=>R.fullPath)});if(x)throw new Error(x);C=(await r.mutateAsync({path:{accountId:e},body:{fullPath:v,namespaceType:"personal"}})).mailboxId,o.current.set(v,C)}const b=await ALe({mailboxId:C,signal:f,fetchMailboxes:async()=>(await t.fetchQuery({...fA({path:{accountId:e}}),staleTime:0})).items??[]});return o.current.delete(v),{id:b.mailboxId,label:gh(b),path:b.fullPath}},[r,e,n,t]);return{createFolder:_.useCallback((c,u)=>s(c,"",u),[s]),createFolderIn:s,mutation:r}}const OLe=()=>{const{t:e}=iq("mail",{useSuspense:!1});return _.useCallback((t,n)=>e(t,{defaultValue:n}),[e])},h_={Inbox:"inbox",Drafts:"drafts",Sent:"sent",Archive:"archive",Junk:"junk",Trash:"trash",All:"all",Flagged:"flagged"},Zje={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Junk",trash:"Trash",all:"All",flagged:"Flagged"},vh=["inbox","flagged","drafts","sent","archive","all","junk","trash"];function e0(e){const t=new Map,n=[...e].sort((r,o)=>vh.indexOf(h_[r.role])-vh.indexOf(h_[o.role]));for(const r of n){if(!r.mailboxId||t.has(r.mailboxId))continue;const o=h_[r.role];o&&t.set(r.mailboxId,o)}return t}function wW(e,t,n){const r=e.displayNameOverride?.trim();if(r)return r;const o=gh(e);return!t||!n?o:n(`sidebar.${t}`,o)}const MLe=new Set(["sent","drafts","trash"]),Yje=e=>e===void 0||!MLe.has(e),Qje=100,PLe=e=>e.trim().toLowerCase()==="inbox",NLe=(e,t)=>{if(e.hierarchyDelimiter.length===0)return!1;const n=`${e.fullPath}${e.hierarchyDelimiter}`;return t.some(r=>r.mailboxId!==e.mailboxId&&r.fullPath.startsWith(n))},kLe=["Appointed","Flagged","Reserved"],DLe=(e,t)=>e.mailboxId!==t.mailboxId?!1:e.source==="Stale"?t.specialUse?.includes(e.role)??!1:kLe.includes(e.source),LLe=(e,t)=>t.find(n=>DLe(n,e))?.role;function Jje(e,t,n){if(PLe(e.fullPath))return{deletable:!1,reason:"inbox",message:"The inbox can't be deleted."};const r=LLe(e,n);return r?{deletable:!1,reason:"role",message:`This folder is your ${r} folder. Reassign that role before deleting it.`}:NLe(e,t)?{deletable:!1,reason:"children",message:"This folder has subfolders. Delete them first."}:{deletable:!0}}function ULe(e,t){return e.filter(n=>n.mailboxId!==t)}function Xje(e){return{total:e,moved:0,phase:e===0?"moved":"moving"}}function eBe(e,t){if(e.phase!=="moving")return e;const n=Math.min(e.total,e.moved+Math.max(0,t));return{...e,moved:n,phase:n>=e.total?"moved":"moving"}}function tBe(e,t){return{...e,phase:"failed",error:t}}function nBe(e){return`Moved ${e.moved} of ${e.total}`}function rBe(e){const t=Math.max(0,Math.floor(e/1e3));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function oBe(e){return e>0?"choose-fate":"confirm-empty"}const FLe=new Set(["outbox","postvak uit","boîte d'envoi","postausgang","buzón de salida","posta in uscita","送信トレイ","送件匣","发件箱","skrzynka nadawcza"]),$Le=e=>{const t=gh(e).trim().toLowerCase();return FLe.has(t)},F8=vh.length,zLe=(e,t)=>{const n=e0(t);return[...e.filter(o=>{const s=n.get(o.mailboxId);return s==="drafts"||s==="sent"?!1:!$Le(o)})].sort((o,s)=>{const a=n.has(o.mailboxId)?vh.indexOf(n.get(o.mailboxId)??"inbox"):F8,c=n.has(s.mailboxId)?vh.indexOf(n.get(s.mailboxId)??"inbox"):F8;return a!==c?a-c:gh(o).localeCompare(gh(s),void 0,{sensitivity:"base",numeric:!0})})},jLe=e=>e[0]?.hierarchyDelimiter??"/",BLe=({mailboxes:e,folderAppointments:t,currentMailboxId:n,excludeMailboxId:r,translator:o})=>{const s=zLe(e,t),a=e0(t);return(r?ULe(s,r):s).map(u=>({id:u.mailboxId,label:wW(u,a.get(u.mailboxId),o),path:u.fullPath,isCurrent:u.mailboxId===n,messageCount:u.messageCount}))},EW=_.createContext(void 0),$8=Symbol("appoint-failed"),HLe=({children:e})=>{const t=ia(),n=OLe(),[r,o]=_.useState(null),[s,a]=_.useState(),[c,u]=_.useState({kind:"choosing"}),f=r?.accountId,{data:h}=fl({...s2(),staleTime:1/0,enabled:!!f}),{data:m}=fl({...fA({path:{accountId:f??""}}),enabled:!!f}),{createFolderIn:g}=TLe(f),v=cT({...R2e(),meta:Py(409)}),C=h?.accounts.find(F=>F.accountId===f),b=_.useMemo(()=>m?.items??[],[m]),E=_.useMemo(()=>C?.folderAppointments??[],[C]),x=_.useMemo(()=>BLe({mailboxes:b,folderAppointments:E,translator:n}),[b,E,n]),I=E.find(F=>F.role===r?.role),R=r?.guessedMailboxId??I?.mailboxId,O=b.find(F=>F.mailboxId===R),D=r?.trashFolderLabel??(O?wW(O,e0(E).get(O.mailboxId),n):void 0),N=_.useRef(null),M=_.useCallback(()=>{N.current=null,o(null),a(void 0),u({kind:"choosing"})},[]),L=_.useCallback(F=>{N.current=F,o(F),u({kind:"choosing"}),a(F.reason==="unconfirmed"?F.guessedMailboxId:void 0)},[]),$=_.useCallback(F=>{N.current===F&&M()},[M]),G=_.useCallback(F=>{r&&(u({kind:"appointing"}),v.mutateAsync({path:{accountId:r.accountId,role:r.role},body:{mailboxId:F}}).catch(q=>(u({kind:"appoint-failed",cause:CLe(q)?"mailbox-pending":"generic"}),$8)).then(async q=>{q!==$8&&(await t.invalidateQueries({queryKey:lq()}),u({kind:"acting"}),await r.onAppointed(),$(r))}).catch(()=>$(r)))},[r,v,t,$]),j=_.useMemo(()=>({requestAppointment:L}),[L]);return T.jsxs(EW.Provider,{value:j,children:[e,r&&T.jsx(Vse,{open:!0,reason:r.reason,action:r.action,folders:x,delimiter:jLe(b),trashFolderLabel:D,guessedMailboxId:R,staleFolderLabel:r.staleFolderLabel??I?.staleAppointmentPath,accountEmail:(h?.accounts.length??0)>1?C?.email:void 0,phase:c,selectedId:s,onSelect:a,onCreateFolder:g,onConfirm:G,onCancel:M})]})},qLe=()=>{const e=_.useContext(EW);if(!e)throw new Error("useRoleAppointmentPrompt must be used within a RoleAppointmentPromptProvider");return e},xW=_.createContext(void 0),VLe=({children:e})=>{const[t,n]=_.useState(void 0),r=_.useRef(void 0),o=_.useRef(void 0),s=_.useRef(void 0),a=_.useRef(new Set),c=ia(),{pushError:u}=bW(),{requestAppointment:f}=qLe(),h=_.useRef(async()=>({kind:"ran",outcome:{done:0,failedIds:[],refused:0,cancelled:!1}})),m=_.useCallback(b=>{vW(c,gW(rLe(b.action,b.mailboxId)));const E=new Set;if(b.accountId&&E.add(b.accountId),b.source.kind==="targets")for(const x of b.source.targets)x.accountId&&E.add(x.accountId);for(const x of E)c.invalidateQueries({queryKey:o2({path:{accountId:x}})})},[c]),g=_.useCallback(async b=>{const E=s.current;if(E)return{kind:"refused",reason:nLe(E.action.kind,E.matched,E.mailboxLabel)};const x=Symbol("bulk-run"),I=new AbortController;r.current=I,o.current=x,s.current=b,b.claimEnding&&(a.current.add(x),b.claimEnding(()=>a.current.delete(x))),n({action:b.action,mailboxId:b.mailboxId,progress:{done:0,total:b.matched}});const R=M=>{o.current===x&&n(L=>L&&{...L,progress:lLe(M)})},O=b.source.kind==="targets"?await mW(b.source.targets,b.applyBatch,R,I.signal):await aLe(b.source.fetchPage,b.matched,b.applyBatch,R,I.signal),D=a.current.delete(x);o.current===x&&(o.current=void 0,s.current=void 0,n(void 0));const N=O.error?SLe(O.error):void 0;return N?f({accountId:N.accountId,role:N.role,reason:N.reason,action:{kind:"delete",count:b.matched},onAppointed:async()=>{const M=await h.current({...b,claimEnding:void 0});M.kind==="refused"&&u({title:D8(b.action.kind,0),detail:M.reason})}}):O.error?u(hLe(D8(b.action.kind,O.done),eLe(b.action.kind),O.error)):O.refused>0&&u({severity:"warning",title:O.refused>1?`Couldn't delete ${O.refused} of ${b.matched} messages yet`:"Couldn't delete this message yet",detail:"Something else moved them while the delete was being prepared. They are back where they now sit — try again."}),D||b.reportEnding?.(b.action.kind,b.matched,O),O.done>0&&m(b),{kind:"ran",outcome:O}},[m,u,f]);h.current=g;const v=_.useCallback(b=>{s.current?.mailboxId===b&&r.current?.abort()},[]);_.useEffect(()=>{const b=a.current;return()=>{r.current?.abort(),r.current=void 0,o.current=void 0,s.current=void 0,b.clear()}},[]);const C=_.useMemo(()=>({run:t,start:g,stop:v}),[t,g,v]);return T.jsx(xW.Provider,{value:C,children:e})},sBe=()=>{const e=_.useContext(xW);if(!e)throw new Error("useBulkRun must be used within a BulkRunProvider");return e},WLe=["Phishing","Spam"],_W=e=>WLe.flatMap(t=>e?.filter(n=>n.name===t)??[])[0],GLe=e=>e.state==="Checked"&&e.action!=="None"?{...e,action:e.action}:void 0,KLe=(e,t)=>{if(e.spamCleared)return;const n=_W(e.labels);if(n)return{label:n,suspected:!t.has(e.mailboxId)}},iBe=(e,t)=>!e.spamCleared&&(e.spamVerdict.state==="Failed"||_W(e.labels)!==void 0&&e.spamVerdict.state==="Checked"&&!t),IW=(e,t)=>ku(ol({title:`Spam check: ${e}`,errorMessage:`${e}. ${t}`})),aBe=e=>IW(`Unknown spam reason ${e}`,`The spam check named ${e}, which this version has no sentence for.`),z8=10,ZLe=e=>{const t=new Map;for(const r of e){const o=t.get(r.accountId)??[];o.push(r),t.set(r.accountId,o)}const n=[];for(const[r,o]of t)for(let s=0;s<o.length;s+=z8)n.push({accountId:r,targets:o.slice(s,s+z8)});return n},YLe={nowSpam:0,nowSuspected:0,noLongerSuspected:0},QLe=(e,t,n)=>{const r=GLe(n)?.action,o=t?t.suspected?"Warn":"Junk":void 0;return r===o?e:r==="Junk"?{...e,nowSpam:e.nowSpam+1}:r==="Warn"?{...e,nowSuspected:e.nowSuspected+1}:{...e,noLongerSuspected:e.noLongerSuspected+1}},JLe=(e,t,n)=>{const r=new Map(t.targets.map(a=>[a.messageId,a])),o=n.successful.reduce((a,c)=>QLe(a,r.get(c.messageId)?.before,c.verdict),e.summary),s=[...e.failures,...n.failed.map(a=>({messageId:a.messageId,subject:r.get(a.messageId)?.subject??"(No subject)",code:a.code,retryable:a.retryable}))];return{summary:o,failures:s}},j8=(e,t)=>({successful:[],failed:e.targets.map(n=>({messageId:n.messageId,code:t,retryable:!1}))}),AW=_.createContext(void 0),lBe=()=>_.useContext(AW),XLe=async e=>{const t=await gTe({path:{accountId:e.accountId},body:{messageIds:e.targets.map(r=>r.messageId)}});if(t.data)return t.data;if(!t.response)throw t.error;const n=t.response.status;if(n===401)return"SignedOut";if(n===403)return j8(e,"NotPermitted");if(n===404)return j8(e,"NotFound");throw new Ah(`Check again failed with ${n}`,n,t.error)};function e4e({children:e}){const t=ia(),{pushError:n}=bW(),[r,o]=_.useState(void 0),[s,a]=_.useState(new Set),[c,u]=_.useState(new Map),f=_.useRef(!1),h=_.useRef(!1),m=_.useRef(void 0),g=_.useCallback(I=>{vW(t,gW(I.map(R=>R.mailboxId)));for(const R of new Set(I.map(O=>O.threadId)))R&&t.invalidateQueries({queryKey:fq({path:{threadId:R}})})},[t]),v=_.useCallback(async(I,R)=>{const O=I.length;let D={summary:YLe,failures:[]},N=0;R&&o({state:"Running",checked:N,total:O});for(const L of ZLe(I)){if(h.current)break;a(new Set(L.targets.map(G=>G.messageId)));const $=await XLe(L);if($==="SignedOut"){db(),a(new Set);return}D=JLe(D,L,$),N+=L.targets.length,u(G=>{const j=new Map(G);for(const F of $.successful)j.delete(F.messageId);for(const F of $.failed)j.set(F.messageId,F.code);return j}),R&&o({state:"Running",checked:N,total:O})}if(a(new Set),g(I),h.current){o(void 0);return}if(!R){for(const L of D.failures){const $=L.retryable?I.find(G=>G.messageId===L.messageId):void 0;n({title:"Couldn't check this message again",detail:`${L.subject}: ${xz[L.code]}`,onRetry:$&&(()=>m.current?.([$],!1))})}return}if(D.failures.length===0){o({state:"Done",total:O,summary:D.summary});return}const M=new Set(D.failures.filter(L=>L.retryable).map(L=>L.messageId));o({state:"PartialFailure",checked:N,total:O,failures:D.failures,retry:I.filter(L=>M.has(L.messageId))})},[n,g]),C=_.useCallback((I,R)=>{if(I.length!==0){if(f.current){n({severity:"info",title:"Check again is already running",detail:"Wait for the run in progress to finish, or stop it."});return}f.current=!0,h.current=!1,v(I,R).catch(O=>{a(new Set),o(void 0),fb(O)}).finally(()=>{f.current=!1})}},[v,n]);m.current=C;const b=_.useCallback((I,R)=>{C([...I],R.panel)},[C]),E=_.useMemo(()=>({checkAgain:b,pendingIds:s,failures:c}),[b,s,c]),x=(()=>{if(r)return r.state==="Running"?{...r,onStop:()=>{h.current=!0}}:r.state==="Done"?{...r,onDone:()=>o(void 0)}:{state:"PartialFailure",checked:r.checked,total:r.total,failures:r.failures,reportIssueHref:IW("Check again left messages unchecked",r.failures.map(I=>`${I.messageId}: ${I.code}`).join(", ")),onRetry:()=>C(r.retry,!0),onClose:()=>o(void 0)}})();return T.jsxs(AW.Provider,{value:E,children:[e,x&&T.jsx("div",{className:"pointer-events-none fixed inset-x-3 bottom-3 z-40 flex justify-center",children:T.jsx("div",{className:"pointer-events-auto w-full max-w-md",children:T.jsx(rse,{...x})})})]})}const cBe=(e,t)=>({messageId:e.messageId,accountId:e.accountId,mailboxId:e.mailboxId,threadId:e.threadId,subject:e.subject??"(No subject)",before:KLe(e,t)}),uBe=e=>e.mailboxId&&e.accountId?{messageId:e.id,accountId:e.accountId,mailboxId:e.mailboxId,threadId:e.threadId,subject:e.subject,before:e.spam}:void 0,t4e=600,n4e=300,RW="remit logs",r4e="https://github.com/remit-mail/reader/releases/tag/";function TW(e,t){const n=t?.check.lastCheckedAt;return n!==void 0&&n!==e.since}function o4e(e){const t=wn(e);return`The check could not be requested — ${t===void 0?"the server did not answer":`the server answered ${t}`}. Run \`remit logs backend\` to see why.`}const s4e={checking:"preparing",pulling:"preparing",snapshotting:"preparing",stopping:"restarting",starting:"restarting",verifying:"reconnecting",committing:"reconnecting",rollingBack:"reconnecting",recovering:"reconnecting"};function N2(e){return s4e[e]??"reconnecting"}function OW(e){const t=wn(e);return t===404||t===403||t===401}function _A(e,t){const n=e?.run??null;return n===null||n.outcome!==null||n.runId===t?null:n}function MW(e,t){const n=e?.check;if(n?.status==="ok"&&!(!n.updateAvailable||!n.latestVersion))return{version:n.latestVersion,releasedAt:ry(n.publishedAt)??t,releaseNotesUrl:n.releaseNotesUrl??PW(n.latestVersion),summary:n.summary??""}}function i4e(e){const t=e?.check.schemaVersion,n=e?.currentSchemaVersion;return t===void 0||n===void 0?!1:t>n}function IA(){return t4e+n4e}function AA(e,t){return Math.max(0,Math.floor((t-e)/1e3))}function ry(e){if(!e)return;const t=Date.parse(e);return Number.isNaN(t)?void 0:t}function PW(e){return`${r4e}${e}`}function yh(e,t,n,r,o){return{status:"applying",runId:e,version:t,target:n,phase:r,elapsedSeconds:o}}function a4e(e,t,n){switch(n){case"succeeded":return{status:"succeeded",runId:t.runId,version:t.targetVersion,previousVersion:t.fromVersion,releaseNotesUrl:e.check.releaseNotesUrl??PW(t.targetVersion)};case"rolledBack":return{status:"rolledBack",runId:t.runId,version:t.fromVersion,attemptedVersion:t.targetVersion,reason:t.message,logsCommand:t.logCommand};case"rollbackFailed":return{status:"rollbackFailed",runId:t.runId,attemptedVersion:t.targetVersion,previousVersion:t.fromVersion,reason:t.message,logsCommand:t.logCommand};case"abandoned":return{status:"abandoned",runId:t.runId,version:t.fromVersion,attemptedVersion:t.targetVersion,reason:t.message,logsCommand:t.logCommand};default:return n}}function l4e(e,t,n,r){const o=e.check,s=ry(o.lastCheckedAt);if(n!==null)return{status:"checkFailed",version:e.currentVersion,reason:n,lastCheckedAt:s};if(t!==null&&!TW(t,e))return{status:"checking",version:e.currentVersion};if(o.status==="failed")return{status:"checkFailed",version:e.currentVersion,reason:o.error??"Remit could not reach the update service.",lastCheckedAt:s};if(o.status==="disabled")return{status:"neverChecked",version:e.currentVersion,lastCheckedAt:s};const a=MW(e,r);return a?{status:"available",version:e.currentVersion,release:a}:{status:"upToDate",version:e.currentVersion,checkedAt:ry(o.lastCheckedAt)??r}}function B8(e,t,n){return{surface:{status:"ready",section:e,overlay:t},releaseHeld:n}}function NW(e,t,n,r){return{status:"ready",section:yh(e,t,n,"reconnecting",r),overlay:{kind:"applying",target:n,phase:"reconnecting",elapsedSeconds:r}}}function kW(e,t,n,r,o){return{status:"ready",section:yh(e,t,n,"reconnecting",r),overlay:{kind:"neverCameBack",attemptedVersion:n,previousVersion:t,elapsedSeconds:r,logsCommand:o}}}function c4e(e,t){return{surface:kW(e.runId,e.previousVersion,e.attemptedVersion,t,RW),releaseHeld:!1}}function u4e(e,t,n,r,o){const s=AA(e.startedAt,o),a=t?.currentVersion??e.previousVersion,c=!r&&n!==null&&n.runId===e.runId;if(c&&n!==null&&n.outcome!==null)return null;if(c&&n!==null){const u=N2(n.phase);return B8(yh(n.runId,a,n.targetVersion,u,s),{kind:"applying",target:n.targetVersion,phase:u,elapsedSeconds:s},!1)}return r?s>IA()?c4e(e,s):{surface:NW(e.runId,e.previousVersion,e.attemptedVersion,s),releaseHeld:!1}:t===void 0?{surface:{status:"loading"},releaseHeld:!1}:s>IA()?{surface:{status:"ready",section:{status:"unreachable",runId:e.runId,previousVersion:e.previousVersion,attemptedVersion:e.attemptedVersion,elapsedSeconds:s,logsCommand:n?.logCommand??RW},overlay:{kind:"none"}},releaseHeld:!0}:B8(yh(e.runId,a,e.attemptedVersion,e.phase,s),{kind:"applying",target:e.attemptedVersion,phase:e.phase,elapsedSeconds:s},!1)}function H8(e){const{data:t,isError:n,dismissedRunId:r,checkPress:o,checkFailure:s,sighting:a,now:c}=e;if(n){const h=_A(t,r);if(h!==null){const m=a!==null&&a.runId===h.runId?a.observedAt:c,g=AA(m,c);return g>IA()?kW(h.runId,h.fromVersion,h.targetVersion,g,h.logCommand):NW(h.runId,h.fromVersion,h.targetVersion,g)}return{status:"ready",section:{status:"checkFailed",version:t?.currentVersion??"the current version",reason:"Remit could not reach the update service."},overlay:{kind:"none"}}}if(!t)return{status:"loading"};const u=t.run,f=u!==null&&r!==null&&u.runId===r;if(u!==null&&!f&&u.outcome!==null)return{status:"ready",section:a4e(t,u,u.outcome),overlay:{kind:"none"}};if(u!==null&&!f&&u.outcome===null){const h=AA(ry(u.startedAt)??c,c),m=N2(u.phase);return{status:"ready",section:yh(u.runId,u.fromVersion,u.targetVersion,m,h),overlay:{kind:"applying",target:u.targetVersion,phase:m,elapsedSeconds:h}}}return{status:"ready",section:l4e(t,o,s,c),overlay:{kind:"none"}}}function d4e(e){const{data:t,isError:n,error:r,held:o,now:s}=e,a=t?.run??null;if(OW(r)&&!o)return{surface:{status:"absent"},releaseHeld:!0};if(o){const c=u4e(o,t,a,n,s);return c||{surface:H8(e),releaseHeld:!0}}return{surface:H8(e),releaseHeld:!1}}const f4e=3e4,h4e=5e3,p4e=aR,m4e={...aR,...Rie},g4e=3e4,v4e="The updater did not answer. Run `remit logs updater` to see why.";function y4e(e,t,n,r){if(OW(e)&&!n)return!1;const o=t!==null&&t.outcome===null;return n||o||r?h4e:f4e}function b4e(){const e=ia(),[t,n]=_.useState(null),[r,o]=_.useState(null),[s,a]=_.useState(null),[c,u]=_.useState(null),[f,h]=_.useState(null),m=_.useRef(t);m.current=t;const g=_.useRef(s);g.current=s;const v=e.getQueryData(hA()),C=t!==null||_A(v,r)!==null,b=fl({...tOe(),retry:!1,meta:C?m4e:p4e,refetchInterval:F=>y4e(F.state.error,F.state.data?.run??null,m.current!==null,g.current!==null)}),E=_.useRef(b.data);E.current=b.data;const x=d4e({data:b.data,isError:b.isError,error:b.error,held:t,dismissedRunId:r,checkPress:s,checkFailure:c,sighting:f,now:Date.now()}),I=_A(b.data,r);_.useEffect(()=>{if(I===null){h(F=>F===null?F:null);return}h(F=>F!==null&&F.runId===I.runId?F:{runId:I.runId,observedAt:Date.now()})},[I]);const R=_.useRef(null);R.current=x.surface.status==="ready"&&"runId"in x.surface.section?x.surface.section.runId:null;const{releaseHeld:O}=x;_.useEffect(()=>{O&&n(F=>F===null?F:null)},[O]),_.useEffect(()=>{s!==null&&TW(s,b.data)&&a(null)},[s,b.data]),_.useEffect(()=>{if(s===null)return;const F=s.pressedAt+g4e-Date.now(),q=setTimeout(()=>{a(null),u(v4e)},Math.max(0,F));return()=>clearTimeout(q)},[s]);const{refetch:D}=b,N=_.useCallback(()=>{u(null),a({pressedAt:Date.now(),since:E.current?.check.lastCheckedAt}),aq({query:{refresh:!0},throwOnError:!0}).then(()=>{D()}).catch(F=>{fb(F,aR),a(null),u(o4e(F))})},[D]),M=_.useCallback(()=>{D()},[D]),L=cT({...nOe(),meta:{softError:!0},onSuccess:F=>{const q=F.run;q!==null&&(n({runId:q.runId,attemptedVersion:q.targetVersion,previousVersion:q.fromVersion,phase:N2(q.phase),startedAt:Date.now()}),o(null)),e.setQueryData(hA(),F)},onError:()=>{D()}}),{mutate:$}=L,G=_.useCallback(F=>{$({body:{targetVersion:F}})},[$]),j=_.useCallback(()=>{R.current!==null&&o(R.current),n(null),a(null),u(null)},[]);return{surface:x.surface,appliesSchemaMigration:i4e(b.data),currentVersion:b.data?.currentVersion,release:MW(b.data,Date.now()),onCheck:N,install:G,onDismissResult:j,onRetryConnection:M}}const k2=_.createContext(null);function S4e({children:e}){const t=b4e();return _.createElement(k2.Provider,{value:t},e)}function C4e(){const e=_.useContext(k2);if(e===null)throw new Error("useSelfUpdate must be used within a SelfUpdateProvider");return e}function w4e(){return _.useContext(k2)}function E4e(){const{surface:e,onRetryConnection:t}=C4e();if(e.status!=="ready")return null;const{overlay:n}=e;return n.kind==="applying"?T.jsx(die,{target:n.target,phase:n.phase,elapsedSeconds:n.elapsedSeconds}):n.kind==="neverCameBack"?T.jsx(fie,{attemptedVersion:n.attemptedVersion,previousVersion:n.previousVersion,elapsedSeconds:n.elapsedSeconds,logsCommand:n.logsCommand,onRetryConnection:t}):null}const x4e=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`banner-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,_4e=({children:e})=>{const[t,n]=_.useState([]),r=_.useCallback(c=>{if(c.error!=null&&$z(c.error))return iu(c.error).correlationId;const u=vLe({...c,action:fLe(c)},x4e(),Date.now());return n(f=>mLe(f,u)),u.id},[]),o=_.useCallback(c=>{n(u=>gLe(u,c))},[]),s=_.useCallback(()=>{n([])},[]),a=_.useMemo(()=>({errors:t,pushError:r,dismissError:o,clearAll:s}),[t,r,o,s]);return T.jsxs(yW.Provider,{value:a,children:[e,T.jsx(lse,{errors:t,onDismiss:o})]})},q8="mt-6 inline-flex min-h-11 w-full items-center justify-center gap-2 rounded-md bg-accent px-4 text-sm font-medium text-accent-fg hover:bg-accent-hover focus-visible:ring-2 focus-visible:ring-ring";function DW(){const[e,t]=_.useState(l1e),{Account:n}=a1e(),r=_.useRef(null);return _.useEffect(()=>c1e(t),[]),wy({id:"signed-out",open:e}),Ey(r,e),e?T.jsx("div",{className:"fixed inset-0 z-[70] flex items-center justify-center bg-canvas/80 p-4 backdrop-blur-sm",children:T.jsxs("div",{ref:r,role:"alertdialog","aria-modal":"true","aria-labelledby":"signed-out-title","aria-describedby":"signed-out-text",tabIndex:-1,className:"w-full max-w-sm rounded-lg border border-line bg-surface p-6 shadow-xl outline-none",children:[T.jsx("h2",{id:"signed-out-title",className:"text-lg font-semibold text-fg",children:"You're signed out"}),T.jsx("p",{id:"signed-out-text",className:"mt-2 text-sm text-fg-muted",children:"The server no longer accepts this session. Sign in again to carry on here; you will come back to this screen."}),T.jsx(n,{fallback:T.jsxs("button",{type:"button",onClick:()=>{vU(),window.location.reload()},className:q8,children:[T.jsx(l3,{className:"size-4","aria-hidden":"true"}),"Sign in"]}),children:({signOut:o})=>T.jsxs("button",{type:"button",onClick:()=>{vU(),o()},className:q8,children:[T.jsx(l3,{className:"size-4","aria-hidden":"true"}),"Sign in"]})})]})}):null}const I4e=({error:e,reset:t,info:n})=>{if(My(e))return db(),T.jsx(DW,{});const r=Ry(e),o=iu(e,{recoverable:r,componentStack:n?.componentStack});return T.jsx(Gz,{fatal:o,onRetry:r?t:void 0})},da=mSe()({component:T4e,errorComponent:I4e}),A4e=()=>{const{t:e}=iq("common",{useSuspense:!1});return T.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:z-50 focus:p-4 focus:bg-canvas focus:text-fg focus:rounded-md",children:e("accessibility.skipToContent","Skip to main content")})},R4e=({children:e})=>Pu().updateMode==="managed"?e:T.jsxs(S4e,{children:[e,T.jsx(E4e,{})]});function T4e(){return T.jsxs(_4e,{children:[T.jsx(HLe,{children:T.jsx(VLe,{children:T.jsx(e4e,{children:T.jsx(R4e,{children:T.jsxs(lOe,{children:[T.jsx(A4e,{}),T.jsx("main",{id:"main-content",className:"h-dvh overflow-hidden",children:T.jsx(_.Suspense,{fallback:T.jsx(Iy,{}),children:T.jsx(gj,{})})})]})})})})}),T.jsx(Wz,{}),T.jsx(DW,{})]})}const O4e=_e("/")({beforeLoad:()=>{throw _l({to:"/mail/brief"})}}),M4e=Pu().apiUrl;pe.setConfig({baseUrl:M4e,fetch:M$});pe.interceptors.error.use((e,t)=>e instanceof Ah||!t?e:Sie(e,t.status));const P4e=()=>Pe(()=>import("./calendar-BqFIadRy.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])),N4e=_e("/calendar")({loader:({context:{queryClient:e}})=>{e.prefetchQuery(s2())},component:Me(P4e,"component")}),k4e=()=>Pe(()=>import("./import-DLM5VFnJ.js"),__vite__mapDeps([14,15,16,17,18,19,20,21,22])),D4e=_e("/import")({component:Me(k4e,"component")}),L4e=de(["match","properties","folder","rule","name","review","run"]),U4e=he("search"),F4e=U4e.optional().catch(void 0),$4e=()=>cb({from:"/mail",select:e=>e.wizardFrom}),z4e=L4e.optional().catch(void 0),j4e=(e,t)=>Nz(e,t)+1,LW=()=>cb({from:"/mail",select:e=>e.wizard}),B4e=()=>{const e=kh();return _.useCallback((t,n)=>{e({to:".",search:r=>({...r,wizard:t,wizardFrom:n})})},[e])},dBe=()=>{const e=LW(),t=B4e(),[n,r]=_.useState("organize"),o=_.useCallback(a=>{r(a),t("match")},[t]),s=_.useCallback(()=>{t("properties","search")},[t]);return{verb:n,start:o,startFromSearch:s,isOpen:e!==void 0}},fBe=e=>{const t=_r(),n=kh(),r=LW(),o=$4e(),s=_.useRef(r!==void 0),a=_.useRef(o),c=_.useRef(void 0);_.useEffect(()=>{c.current=void 0},[r]),_.useEffect(()=>{if(!s.current)return;s.current=!1;const m=a.current;(async()=>(await n({to:".",search:g=>({...g,wizard:void 0,wizardFrom:void 0}),replace:!0}),await n({to:".",search:g=>({...g,wizard:e,wizardFrom:m})})))()},[e,n]);const u=_.useCallback(m=>{m===r||c.current===m||(c.current=m,n({to:".",search:g=>({...g,wizard:m})}))},[n,r]),f=_.useCallback(()=>{t.history.back()},[t]),h=_.useCallback((m,g)=>{t.history.go(-j4e(m,g))},[t]);return{step:r,goToStep:u,goBack:f,closeWizard:h}},qu=U({q:w().optional()}),D2=qu.extend({}),UW=qu.extend({}),FW=qu.extend({}),H4e=qu.extend({}),$W=qu.extend({}),zW=D2,q4e=qu.extend({wizard:z4e,wizardFrom:F4e}),wg=U({body:w().optional()}),hBe=e=>{const{body:t,...n}=e;return n},t0={brief:D2.extend(wg.shape),flagged:UW.extend(wg.shape),mailbox:$W.extend(wg.shape),label:FW.extend(wg.shape)},V4e=new Map;function W4e({fullPath:e,hierarchyDelimiter:t}){return e.split(t).some(n=>n.endsWith("_remit"))}function pBe(e){const t=new Map;for(const n of e){const r=e0(n.folderAppointments);for(const[o,s]of r)t.set(o,{role:s});for(const o of n.mailboxes){if(W4e(o))continue;const s=r.get(o.mailboxId),a={providerPath:o.fullPath,hierarchyDelimiter:o.hierarchyDelimiter};t.set(o.mailboxId,s?{role:s,...a}:a)}}return t}function mBe(e){const t=[];for(const[n,r]of e)r.role==="junk"&&t.push(n);return t}function gBe(e,t){const n=t[0];if(!e)return n?{mailboxId:n}:{};for(const o of t){const s=e.get(o);if(s&&Fse(s)!==void 0)return{mailboxId:o,folder:s}}if(!n)return{};const r=e.get(n);return{mailboxId:n,...r?{folder:r}:{}}}const G4e=_.createContext(null),vBe=()=>_.useContext(G4e)??{accounts:[],mailboxNameIndex:new Map,accountNameIndex:new Map,resultFolderIndex:V4e,searchQuery:"",searchInput:"",searchViewKey:"",onSearchChange:()=>{},onSearchClear:()=>{},onSearchClearQuery:()=>{},intelligenceOpen:!1,onToggleIntelligence:()=>{},onRaiseIntelligence:()=>{}},K4e=()=>Pe(()=>import("./mail-BodKXw3C.js"),__vite__mapDeps([23,5,4,3,1,2,6,7,8,9,10,11,24,25,26,27,28,29,30,31,32,17,13,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48])),Z4e=_e("/mail")({loader:({context:{queryClient:e}})=>{e.prefetchQuery(s2()),e.prefetchQuery({...rOe(),staleTime:6e4})},component:Me(K4e,"component"),validateSearch:q4e}),Y4e=()=>Pe(()=>import("./onboarding-8O2rW7qq.js"),__vite__mapDeps([49,50,15,16,17,18,19,30,10,21,48,51,22])),Q4e=_e("/onboarding")({component:Me(Y4e,"component")});function J4e(){const e=w4e(),t=e?.surface.status==="ready"&&e.surface.section.status==="available";return T.jsx(wz,{label:t?"Update available":void 0,children:T.jsx(Ure,{className:"size-4"})})}function X4e(){return fl({...V2e()})}const p_={listed:"Sync warnings",unread:"Warnings could not be read",signedOut:"Session ended"};function eUe(e,t){if(My(t))return p_.signedOut;if(t)return p_.unread;if(e&&((e.entries?.length??0)>0||(e.warnings?.length??0)>0))return p_.listed}function tUe(){const e=X4e();return eUe(e.data,e.error)}function nUe(){const e=tUe();return T.jsx(wz,{label:e,children:T.jsx(eR,{className:"size-4"})})}const rUe=Py(403,404),yBe={...Py(403,404,409,429),...Tie},oUe=new Set([Va.SignInDisabled,Va.CallerDisabled]),jW=e=>{if(wn(e)!==403)return!1;const t=Sl(e)?.code;return t!==void 0&&oUe.has(t)},sUe=e=>{if(Oy(e))return"The server could not be reached. Nothing changed. Try again.";const t=Sl(e)?.code;return t===Va.CannotDisableSelf?"You cannot disable your own account, so one account always stays on.":t===Va.StepUpRequired?"The password check did not carry over to the action. Nothing changed. Try again.":t===Va.ForeignOrigin?"The server refused a request from this address. Nothing changed. Open this page from the server's own address.":wn(e)===404?"That account is gone, or this server no longer has a People page. Reload the page.":"Something went wrong on the server. Nothing changed. Try again."},bBe=e=>Oy(e)?"The server could not be reached. Check your connection and try again.":"The server did not answer as expected. Try again.",SBe=e=>{if(wn(e)===401||jW(e))return{kind:"signedOut"};const t=Sl(e)?.code;return t===Va.WrongPassword?{kind:"wrongPassword"}:t===Va.StepUpLocked?{kind:"locked"}:{kind:"failed",reason:sUe(e)}},CBe=(e,t)=>e==="Disable"?{title:`Disable ${t}?`,body:"They are signed out everywhere within 15 minutes and cannot sign in until you enable them again. Their calendar feed links stop working. Their mail stays.",confirmLabel:"Disable",failedTitle:`${t} was not disabled`,destructive:!0}:e==="Enable"?{title:`Enable ${t}?`,body:"They can sign in again with their password. Calendar feed links they shared before stay off; they make new ones in Settings.",confirmLabel:"Enable",failedTitle:`${t} was not enabled`,destructive:!1}:e==="SignOut"?{title:`Sign ${t} out everywhere?`,body:"Every session and connected app of theirs ends within 15 minutes. They can sign in again with their password.",confirmLabel:"Sign out everywhere",failedTitle:`${t} was not signed out`,destructive:!0}:{title:`Reset the password of ${t}?`,body:"Their password stops working at once and they are signed out everywhere. You get a link to give them, which works once, for 24 hours.",confirmLabel:"Make a reset link",failedTitle:`No reset link was made for ${t}`,destructive:!0},wBe=(e,t)=>{const n=wn(t),r=Sl(t)?.code,o=t instanceof Error?t.message:String(t),s=[n??"no response",r,o].filter(a=>a!==void 0&&a!=="").join(" ");return ku(ol({title:`People: ${e}`,errorMessage:`${e}. The server answered: ${s}`}))},iUe=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),EBe=(e,t)=>iUe(new Date(e),t)?"Today":fW(e,"medium"),xBe=(e,t)=>e.map(n=>n.userId===t.userId?t:n),aUe=()=>({...X2e(),meta:rUe,retry:!1}),lUe=()=>{const e=fl(aUe()),t=e.isError&&jW(e.error);return _.useEffect(()=>{t&&db()},[t]),{...e,unavailable:e.isError&&zz(e.error)}},BW=_.createContext([]),cUe=BW.Provider,uUe=()=>_.useContext(BW),dUe=()=>Pe(()=>import("./settings-MlHARJWl.js"),[]),fUe=[{id:"accounts",label:"Accounts",icon:T.jsx(K$,{className:"size-4"})},{id:"senders",label:"Senders & Rules",icon:T.jsx(Lre,{className:"size-4"})},{id:"folders",label:"Folder roles",icon:T.jsx(Ere,{className:"size-4"})},{id:"filters",label:"Filters",icon:T.jsx(xre,{className:"size-4"})},{id:"labels",label:"Labels",icon:T.jsx(Nre,{className:"size-4"})},{id:"classification",label:"Mail classification",icon:T.jsx(Mre,{className:"size-4"})},{id:"spam",label:"Spam & phishing",icon:T.jsx(Ore,{className:"size-4"})},{id:"calendars",label:"Calendars",icon:T.jsx(gre,{className:"size-4"})},{id:"appearance",label:"Appearance",icon:T.jsx(Are,{className:"size-4"})},{id:"warnings",label:"Warnings",icon:T.jsx(nUe,{})},{id:"advanced",label:"Advanced",icon:T.jsx(J4e,{})}],hUe={id:"people",label:"People",icon:T.jsx(Dre,{className:"size-4"})},_Be=()=>{const e=lUe(),t=uUe(),n=[...fUe];if(n.splice(1,0,...t.map(({id:o,label:s,icon:a})=>({id:o,label:s,icon:a}))),!e.isSuccess)return n;const r=n.findIndex(o=>o.id==="advanced");return[...n.slice(0,r),hUe,...n.slice(r)]},pUe=_e("/settings")({component:Me(dUe,"component")}),mUe=["year","month","week","day","agenda"],gUe=de(mUe),HW="week",IBe=e=>e==="agenda";function vUe(e){const t=gUe.safeParse(e);return t.success?t.data:void 0}const yUe=/^\d{4}-\d{2}-\d{2}$/;function bUe(e){if(!yUe.test(e))return;const[t,n,r]=e.split("-").map(Number),o=Date.UTC(t,n-1,r),s=new Date(o);if(s.getUTCFullYear()===t&&s.getUTCMonth()===n-1&&s.getUTCDate()===r)return e}const wu=e=>String(e).padStart(2,"0");function qW(e){return`${e.getFullYear()}-${wu(e.getMonth()+1)}-${wu(e.getDate())}`}function SUe(e,t){return{view:vUe(e.view)??HW,date:bUe(e.date)??t}}function ABe(e,t,n){const[r,o,s]=e.split("-").map(Number);if(t==="year")return V8(r+n,o,s);if(t==="month")return V8(r,o+n,s);const a=t==="day"?1:7,c=new Date(Date.UTC(r,o-1,s+a*n));return CUe(c)}const CUe=e=>`${e.getUTCFullYear()}-${wu(e.getUTCMonth()+1)}-${wu(e.getUTCDate())}`;function V8(e,t,n){const r=e+Math.floor((t-1)/12),o=((t-1)%12+12)%12+1,s=new Date(Date.UTC(r,o,0)).getUTCDate();return`${r}-${wu(o)}-${wu(Math.min(n,s))}`}const wUe=w().min(1);function EUe(e){const t=e==null?[]:[e].flat(),n=new Set;for(const r of t){if(typeof r!="string"&&typeof r!="number")continue;const o=wUe.safeParse(String(r));o.success&&n.add(o.data)}return[...n].sort()}const L2=U({calendarId:ml().transform(EUe).transform(e=>e.length===0?void 0:e).optional()});function RBe(e,t){return t?e==="week"?"day":e==="year"?"month":e:e}const xUe=_e("/calendar/")({validateSearch:L2,beforeLoad:({search:e,location:t})=>{throw _l({to:"/calendar/$view/$date",params:{view:HW,date:qW(new Date)},search:e,hash:t.hash,replace:!0})}}),_Ue=_e("/mail/")({validateSearch:zW,beforeLoad:({search:e,location:t})=>{throw _l({to:"/mail/brief",search:e,hash:t.hash,replace:!0})}}),IUe=()=>Pe(()=>import("./_mailboxId-DWvQ-9gi.js"),__vite__mapDeps([52,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,53,44,54,55,48,9,39,38,40,56,18,57,58,37,8,10,59,7,60,61,62,16,63,64,65,66,67,12,68,51,69,70,2,41,71,72,73,35,36,74,75,76,77,78,79,80])),AUe=_e("/mail/$mailboxId")({component:Me(IUe,"component"),validateSearch:$W}),RUe=()=>Pe(()=>import("./brief-8diVJSZ9.js"),__vite__mapDeps([81,13])),TUe=()=>Pe(()=>import("./brief-CFBkxoDK.js"),__vite__mapDeps([82,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,83,54,55,48,9,39,38,40,56,18,57,58,37,8,10,59,7,60,61,62,16,63,64,65,66,67,12,68,51,69,70,2,41,71,72,73,74,35,36,84,80])),OUe=_e("/mail/brief")({component:Me(TUe,"component"),validateSearch:D2,errorComponent:Me(RUe,"errorComponent")}),MUe=()=>Pe(()=>import("./flagged-B-j-3yRr.js"),__vite__mapDeps([85,13])),PUe=()=>Pe(()=>import("./flagged-BZJepVc-.js"),__vite__mapDeps([86,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,87,43,38,44,54,55,48,9,39,40,56,18,57,58,37,8,10,59,7,60,61,62,16,63,64,65,66,67,12,68,51,69,70,2,41,71,72,73,75,84,80])),NUe=_e("/mail/flagged")({component:Me(PUe,"component"),validateSearch:UW,errorComponent:Me(MUe,"errorComponent")}),kUe=()=>Pe(()=>import("./outbox-nrXvnMTk.js"),__vite__mapDeps([88,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,89,55,48,46,76,41,9,36,69,90,91,80])),DUe=_e("/mail/outbox")({component:Me(kUe,"component"),validateSearch:H4e}),LUe=_e("/reset-password/$token")({beforeLoad:()=>{throw _l({to:"/"})}}),UUe=()=>Pe(()=>import("./index-Zfii_-4V.js"),[]),FUe=_e("/settings/")({component:Me(UUe,"component")}),$Ue=()=>Pe(()=>import("./_slotId-DQqfctAf.js"),__vite__mapDeps([92,4,3,6,93,7,18,94,41,61])),zUe=_e("/settings/$slotId")({component:Me($Ue,"component")}),jUe=()=>Pe(()=>import("./accounts-D0rPQMGH.js"),__vite__mapDeps([95,50,15,16,17,18,19,30,10,21,48,51,29,96,33,13,59,6,97,93,7,94,41,61,63,90])),BUe=U({editAccountId:w().optional(),focusSmtp:ce().optional(),connected:w().optional(),oauthError:w().optional(),oauthEmail:w().optional(),missingServices:w().optional()}),HUe=_e("/settings/accounts")({component:Me(jUe,"component"),validateSearch:BUe}),qUe=()=>Pe(()=>import("./advanced-q_hG98BB.js"),__vite__mapDeps([98,20,4,3,5,6,19,59,18,21,91,79,99,73,69,77,97,48,93,7,94,41,61])),VUe=_e("/settings/advanced")({component:Me(qUe,"component")}),WUe=()=>Pe(()=>import("./appearance-DM1k2Ta7.js"),__vite__mapDeps([100,6,97,48,93,7,18,94,41,61,70])),GUe=_e("/settings/appearance")({component:Me(WUe,"component")}),KUe=()=>Pe(()=>import("./calendars-52NaEZbX.js"),__vite__mapDeps([101,65,13,38,16,17,19,63,102,31,103,104,25,61,33,18,37,105,6,93,7,94,41])),ZUe=_e("/settings/calendars")({component:Me(KUe,"component")}),YUe=()=>Pe(()=>import("./classification-BgDJ1gwK.js"),__vite__mapDeps([106,107,13,108,16,17,33,96,18,6,93,7,94,41,61])),QUe=_e("/settings/classification")({component:Me(YUe,"component")}),JUe=()=>Pe(()=>import("./filters-VSaDpnX3.js"),__vite__mapDeps([109,13,3,40,62,32,16,17,63,72,70,79,78,18,6,93,7,94,41,61])),XUe=U({filterId:w().optional()}),e6e=_e("/settings/filters")({component:Me(JUe,"component"),validateSearch:XUe}),t6e=()=>Pe(()=>import("./folders-CTNX9Hcm.js"),__vite__mapDeps([110,71,45,6,93,7,18,94,41,61,13,16,17,25])),n6e=_e("/settings/folders")({component:Me(t6e,"component")}),r6e=()=>Pe(()=>import("./labels-CUXsONgB.js"),__vite__mapDeps([111,72,40,16,17,6,93,7,18,94,41,61,13,33])),o6e=_e("/settings/labels")({component:Me(r6e,"component")}),s6e=()=>Pe(()=>import("./people-eWwwIt4_.js"),__vite__mapDeps([112,108,105,58,6,93,7,18,94,41,61])),i6e=_e("/settings/people")({component:Me(s6e,"component")}),a6e=["vip","muted","blocked","neverSpam"],l6e=()=>Pe(()=>import("./senders-vh4OQfD0.js"),__vite__mapDeps([113,31,6,97,48,13,93,7,18,94,41,61])),c6e=U({group:de(a6e).optional()}),u6e=_e("/settings/senders")({component:Me(l6e,"component"),validateSearch:c6e}),d6e=()=>Pe(()=>import("./spam-CecFwFHS.js"),__vite__mapDeps([114,107,56,40,4,3,5,72,13,70,6,93,7,18,94,41,61])),f6e=_e("/settings/spam")({component:Me(d6e,"component")}),h6e=()=>Pe(()=>import("./suggested-vips--pG2iuOT.js"),[]),p6e=_e("/settings/suggested-vips")({component:Me(h6e,"component")}),m6e=()=>Pe(()=>import("./warnings-B2sNE31D.js"),__vite__mapDeps([115,42,38,18,79,105,99,13,6,97,48,93,7,94,41,61])),g6e=_e("/settings/warnings")({component:Me(m6e,"component")}),v6e=()=>Pe(()=>import("./_view._date-BQeaBjoE.js"),__vite__mapDeps([116,65,13,38,102,31,117,118,4,3,5,12,64,66,10,63,67,69,119,47,17,94,120,121,103,104,25,61,122,68,16,41,2,123])),y6e=_e("/calendar/$view/$date")({validateSearch:L2,beforeLoad:({params:e,search:t,location:n})=>{const r=SUe(e,qW(new Date));if(!(r.view===e.view&&r.date===e.date))throw _l({to:"/calendar/$view/$date",params:r,search:t,hash:n.hash,replace:!0})},component:Me(v6e,"component")}),b6e=()=>Pe(()=>import("./index-DLRo9M2D.js"),__vite__mapDeps([124,53,44,54,55,48,34,11,4,3,5,24,9,17,39,38,40,28,29,30,31,32,6,56,18,57,58,37,8,13,10,59,7,60,61,62,16,63,64,65,66,67,12,68,51,69,70,2,41,71,33,72,73,35,36,74,75,76,77,78,79])),S6e=_e("/mail/$mailboxId/")({component:Me(b6e,"component")}),C6e=()=>Pe(()=>import("./_threadId-CCwEReI2.js"),[]),w6e=_e("/mail/$mailboxId/$threadId")({component:Me(C6e,"component")}),E6e=()=>Pe(()=>import("./index-Dylwxpr-.js"),__vite__mapDeps([125,83,54,55,48,34,11,4,3,5,24,9,17,39,38,40,28,29,30,31,32,6,56,18,57,58,37,8,13,10,59,7,60,61,62,16,63,64,65,66,67,12,68,51,69,70,2,41,71,33,72,73,74,35,36,84])),x6e=_e("/mail/brief/")({component:Me(E6e,"component")}),_6e=()=>Pe(()=>import("./_threadId-Dht02PUZ.js"),[]),I6e=_e("/mail/brief/$threadId")({component:Me(_6e,"component")}),A6e=()=>Pe(()=>import("./index-CO1X8-aP.js"),__vite__mapDeps([126,87,43,38,44,54,55,48,34,11,4,3,5,24,9,17,39,40,28,29,30,31,32,6,56,18,57,58,37,8,13,10,59,7,60,61,62,16,63,64,65,66,67,12,68,51,69,70,2,41,71,33,72,73,75,84])),R6e=_e("/mail/flagged/")({component:Me(A6e,"component")}),T6e=()=>Pe(()=>import("./_threadId-Bm7b75jN.js"),[]),O6e=_e("/mail/flagged/$threadId")({component:Me(T6e,"component")}),M6e=_e("/mail/label/")({validateSearch:zW,beforeLoad:({search:e,location:t})=>{throw _l({to:"/mail/brief",search:e,hash:t.hash,replace:!0})}}),P6e=()=>Pe(()=>import("./_labelId-DLeWLaow.js"),__vite__mapDeps([127,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,87,43,38,44,54,55,48,9,39,40,56,18,57,58,37,8,10,59,7,60,61,62,16,63,64,65,66,67,12,68,51,69,70,2,41,71,72,73,75,84,80])),N6e=_e("/mail/label/$labelId")({component:Me(P6e,"component"),validateSearch:FW}),k6e=()=>Pe(()=>import("./index-B--m5QrT.js"),__vite__mapDeps([128,89,55,48,34,11,4,3,5,24,46,76,41,9,36,69,90,91])),D6e=_e("/mail/outbox/")({component:Me(k6e,"component")}),L6e=()=>Pe(()=>import("./index-DtqBFgK5.js"),[]),U6e=_e("/calendar/$view/$date/")({component:Me(L6e,"component")}),F6e=()=>Pe(()=>import("./_calendarObjectId-BiaBDCEt.js"),[]),$6e=_e("/calendar/$view/$date/$calendarObjectId")({component:Me(F6e,"component")}),Fs=e=>String(e).padStart(2,"0"),VW=e=>`${e.getUTCFullYear()}-${Fs(e.getUTCMonth()+1)}-${Fs(e.getUTCDate())}`,U2=e=>{const t=e<0?"-":"+",n=Math.abs(e);return`${t}${Fs(Math.floor(n/60))}:${Fs(n%60)}`};function WW(e,t){const n=new Date(`${e}T${t}:00`);return`${e}T${t}:00${U2(-n.getTimezoneOffset())}`}const m_=new Map;function z6e(e){if(m_.has(e))return m_.get(e);let t;try{t=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{t=void 0}return m_.set(e,t),t}function RA(e,t){const n=z6e(e);if(!n)return Number.NaN;const r=n.formatToParts(new Date(t)),o=c=>Number(r.find(u=>u.type===c)?.value),s=o("hour")%24;return(Date.UTC(o("year"),o("month")-1,o("day"),s,o("minute"),o("second"))-t)/6e4}function W8(e,t,n){if(n==="")return`${e}T${t}:00+00:00`;const r=Date.parse(`${e}T${t}:00Z`),o=RA(n,r);if(Number.isNaN(o))return WW(e,t);const s=RA(n,r-o*6e4);return`${e}T${t}:00${U2(Number.isNaN(s)?o:s)}`}function G8(e,t){const n=Date.parse(e),r=RA(t,n),o=Number.isNaN(r)?-new Date(n).getTimezoneOffset():r,s=new Date(n+o*6e4);return`${VW(s)}T${Fs(s.getUTCHours())}:${Fs(s.getUTCMinutes())}:${Fs(s.getUTCSeconds())}${U2(o)}`}const oy=e=>WW(e,"00:00");function Hi(e,t){const[n,r,o]=e.split("-").map(Number);return VW(new Date(Date.UTC(n,r-1,o+t)))}function g_(e){const[t,n,r]=e.split("-").map(Number),o=new Date(Date.UTC(t,n-1,r));return Hi(e,-((o.getUTCDay()+6)%7))}function j6e(e,t){const[n,r]=t.split("-").map(Number);if(e==="year")return[`${n}-01-01`,`${n+1}-01-01`];if(e==="month"){const s=`${n}-${Fs(r)}-01`,a=r===12?`${n+1}-01-01`:`${n}-${Fs(r+1)}-01`;return[g_(s),Hi(g_(Hi(a,-1)),7)]}if(e==="day")return[t,Hi(t,1)];const o=g_(t);return[o,Hi(o,7)]}function TBe(e,t){const[n,r]=j6e(e,t);return{from:oy(n),to:oy(r)}}function OBe(e,t){return{from:oy(e),to:oy(Hi(e,t))}}const B6e=$3e({offset:!0,local:!1}),GW=z3e(),K8=ml().transform(e=>{const t=We([B6e,GW]).safeParse(e);return t.success?t.data:void 0}).optional(),H6e=L2.extend({start:K8,end:K8}),Eg=e=>GW.safeParse(e).success;function xg(e){return{date:e,endDate:e,startTime:"09:00",endTime:"10:00",allDay:!1}}function MBe(e,t,n,r){if(e===void 0||t===void 0)return xg(n);if(Eg(e)&&Eg(t)){const a=Hi(t,-1);return a<e?xg(n):{date:e,endDate:a,startTime:"",endTime:"",allDay:!0}}if(Eg(e)||Eg(t)||Date.parse(t)<=Date.parse(e))return xg(n);const o=G8(e,r),s=G8(t,r);return{date:o.slice(0,10),endDate:s.slice(0,10),startTime:o.slice(11,16),endTime:s.slice(11,16),allDay:!1}}function PBe(e,t){return e.allDay?{start:e.date,end:Hi(e.endDate,1)}:{start:W8(e.date,e.startTime,t),end:W8(e.endDate,e.endTime,t)}}const q6e=()=>Pe(()=>import("./new-DlRrHbU8.js"),__vite__mapDeps([129,130,121,66,103,104,65,13,38,25,61,118,117,102,31,67,4,3,12,5,120,122,131,16,17,33])),V6e=_e("/calendar/$view/$date/new")({validateSearch:H6e,component:Me(q6e,"component")}),W6e=()=>Pe(()=>import("./index-C2YSZxRF.js"),__vite__mapDeps([132,53,44,54,55,48,34,11,4,3,5,24,9,17,39,38,40,28,29,30,31,32,6,56,18,57,58,37,8,13,10,59,7,60,61,62,16,63,64,65,66,67,12,68,51,69,70,2,41,71,33,72,73,35,36,74,75,76,77,78,79])),G6e=_e("/mail/$mailboxId/$threadId/")({component:Me(W6e,"component")}),K6e=()=>Pe(()=>import("./_messageId-C2YSZxRF.js"),__vite__mapDeps([133,53,44,54,55,48,34,11,4,3,5,24,9,17,39,38,40,28,29,30,31,32,6,56,18,57,58,37,8,13,10,59,7,60,61,62,16,63,64,65,66,67,12,68,51,69,70,2,41,71,33,72,73,35,36,74,75,76,77,78,79])),Z6e=_e("/mail/$mailboxId/$threadId/$messageId")({component:Me(K6e,"component")}),Y6e=()=>Pe(()=>import("./compose._-_outboxMessageId_-CvOAO1iL.js"),__vite__mapDeps([134,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),Q6e=_e("/mail/$mailboxId/compose/{-$outboxMessageId}")({component:Me(Y6e,"component")}),J6e=()=>Pe(()=>import("./index-CPvSvBZB.js"),__vite__mapDeps([135,83,54,55,48,34,11,4,3,5,24,9,17,39,38,40,28,29,30,31,32,6,56,18,57,58,37,8,13,10,59,7,60,61,62,16,63,64,65,66,67,12,68,51,69,70,2,41,71,33,72,73,74,35,36,84])),X6e=_e("/mail/brief/$threadId/")({component:Me(J6e,"component")}),e8e=()=>Pe(()=>import("./_messageId-CPvSvBZB.js"),__vite__mapDeps([136,83,54,55,48,34,11,4,3,5,24,9,17,39,38,40,28,29,30,31,32,6,56,18,57,58,37,8,13,10,59,7,60,61,62,16,63,64,65,66,67,12,68,51,69,70,2,41,71,33,72,73,74,35,36,84])),t8e=_e("/mail/brief/$threadId/$messageId")({component:Me(e8e,"component")}),n8e=()=>Pe(()=>import("./compose._-_outboxMessageId_-EZpX9L3H.js"),__vite__mapDeps([137,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),r8e=_e("/mail/brief/compose/{-$outboxMessageId}")({component:Me(n8e,"component")}),o8e=()=>Pe(()=>import("./index-YwusJB4d.js"),__vite__mapDeps([138,87,43,38,44,54,55,48,34,11,4,3,5,24,9,17,39,40,28,29,30,31,32,6,56,18,57,58,37,8,13,10,59,7,60,61,62,16,63,64,65,66,67,12,68,51,69,70,2,41,71,33,72,73,75,84])),s8e=_e("/mail/flagged/$threadId/")({component:Me(o8e,"component")}),i8e=()=>Pe(()=>import("./_messageId-BB9xOwfs.js"),__vite__mapDeps([139,87,43,38,44,54,55,48,34,11,4,3,5,24,9,17,39,40,28,29,30,31,32,6,56,18,57,58,37,8,13,10,59,7,60,61,62,16,63,64,65,66,67,12,68,51,69,70,2,41,71,33,72,73,75,84])),a8e=_e("/mail/flagged/$threadId/$messageId")({component:Me(i8e,"component")}),l8e=()=>Pe(()=>import("./compose._-_outboxMessageId_-urlj3DLH.js"),__vite__mapDeps([140,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),c8e=_e("/mail/flagged/compose/{-$outboxMessageId}")({component:Me(l8e,"component")}),u8e=()=>Pe(()=>import("./index-BuawSiTp.js"),__vite__mapDeps([141,87,43,38,44,54,55,48,34,11,4,3,5,24,9,17,39,40,28,29,30,31,32,6,56,18,57,58,37,8,13,10,59,7,60,61,62,16,63,64,65,66,67,12,68,51,69,70,2,41,71,33,72,73,75,84])),d8e=_e("/mail/label/$labelId/")({component:Me(u8e,"component")}),f8e=()=>Pe(()=>import("./_threadId-Db39B53v.js"),[]),h8e=_e("/mail/label/$labelId/$threadId")({component:Me(f8e,"component")}),p8e=()=>Pe(()=>import("./compose._-_outboxMessageId_-ByGI1c-o.js"),__vite__mapDeps([142,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),m8e=_e("/mail/outbox/compose/{-$outboxMessageId}")({component:Me(p8e,"component")}),g8e=()=>Pe(()=>import("./_outboxMessageId-BFgW_k_u.js"),__vite__mapDeps([143,89,55,48,34,11,4,3,5,24,46,76,41,9,36,69,90,91])),v8e=_e("/mail/outbox/draft/$outboxMessageId")({component:Me(g8e,"component")}),y8e=()=>Pe(()=>import("./index-DGb7Ls8y.js"),__vite__mapDeps([144,145,65,13,38,118,117,67,4,3,12,5,122,104,25,103,61,33])),b8e=_e("/calendar/$view/$date/$calendarObjectId/")({component:Me(y8e,"component")}),S8e=()=>Pe(()=>import("./_recurrenceId-96pqeQMh.js"),[]),C8e=_e("/calendar/$view/$date/$calendarObjectId/$recurrenceId")({component:Me(S8e,"component")}),w8e=()=>Pe(()=>import("./edit-vn6fIBd6.js"),__vite__mapDeps([146,130,121,66,103,104,65,13,38,25,61,118,117,102,31,67,4,3,12,5,120,122,131,16,17,33])),E8e=_e("/calendar/$view/$date/$calendarObjectId/edit")({component:Me(w8e,"component")}),x8e=()=>Pe(()=>import("./suggestion._suggestionId-DiMWWP0r.js"),__vite__mapDeps([147,65,13,38,121,66,103,104,25,61,67,122,68,60,131,16,17,4,3,12,5])),_8e=_e("/calendar/$view/$date/suggestion/$suggestionId")({component:Me(x8e,"component")}),I8e=()=>Pe(()=>import("./task._calendarTaskId-D-wpEifQ.js"),__vite__mapDeps([148,65,13,38,117,4,3,12,5,119,104,25])),A8e=_e("/calendar/$view/$date/task/$calendarTaskId")({component:Me(I8e,"component")}),R8e=()=>Pe(()=>import("./index-ChWo5_90.js"),__vite__mapDeps([149,87,43,38,44,54,55,48,34,11,4,3,5,24,9,17,39,40,28,29,30,31,32,6,56,18,57,58,37,8,13,10,59,7,60,61,62,16,63,64,65,66,67,12,68,51,69,70,2,41,71,33,72,73,75,84])),T8e=_e("/mail/label/$labelId/$threadId/")({component:Me(R8e,"component")}),O8e=()=>Pe(()=>import("./_messageId-DbVH08AL.js"),__vite__mapDeps([150,87,43,38,44,54,55,48,34,11,4,3,5,24,9,17,39,40,28,29,30,31,32,6,56,18,57,58,37,8,13,10,59,7,60,61,62,16,63,64,65,66,67,12,68,51,69,70,2,41,71,33,72,73,75,84])),M8e=_e("/mail/label/$labelId/$threadId/$messageId")({component:Me(O8e,"component")}),P8e=()=>Pe(()=>import("./compose._-_outboxMessageId_-BY1Sf-7o.js"),__vite__mapDeps([151,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),N8e=_e("/mail/label/$labelId/compose/{-$outboxMessageId}")({component:Me(P8e,"component")}),k8e=()=>Pe(()=>import("./index-DemsYVll.js"),__vite__mapDeps([152,145,65,13,38,118,117,67,4,3,12,5,122,104,25,103,61,33])),D8e=_e("/calendar/$view/$date/$calendarObjectId/$recurrenceId/")({component:Me(k8e,"component")}),L8e=()=>Pe(()=>import("./edit-B9dhadKH.js"),__vite__mapDeps([153,130,121,66,103,104,65,13,38,25,61,118,117,102,31,67,4,3,12,5,120,122,131,16,17,33])),U8e=_e("/calendar/$view/$date/$calendarObjectId/$recurrenceId/edit")({component:Me(L8e,"component")}),F8e=_e("/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}")({validateSearch:t0.mailbox}),$8e=_e("/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}")({validateSearch:t0.brief}),z8e=_e("/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}")({validateSearch:t0.flagged}),j8e=_e("/mail/label/$labelId/$threadId/$messageId/$mode/{-$outboxMessageId}")({validateSearch:t0.label}),B8e=O4e.update({id:"/",path:"/",getParentRoute:()=>da}),F2=N4e.update({id:"/calendar",path:"/calendar",getParentRoute:()=>da}),H8e=D4e.update({id:"/import",path:"/import",getParentRoute:()=>da}),fa=Z4e.update({id:"/mail",path:"/mail",getParentRoute:()=>da}),q8e=Q4e.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>da}),Xn=pUe.update({id:"/settings",path:"/settings",getParentRoute:()=>da}),V8e=xUe.update({id:"/",path:"/",getParentRoute:()=>F2}),W8e=_Ue.update({id:"/",path:"/",getParentRoute:()=>fa}),n0=AUe.update({id:"/$mailboxId",path:"/$mailboxId",getParentRoute:()=>fa}),r0=OUe.update({id:"/brief",path:"/brief",getParentRoute:()=>fa}),o0=NUe.update({id:"/flagged",path:"/flagged",getParentRoute:()=>fa}),s0=DUe.update({id:"/outbox",path:"/outbox",getParentRoute:()=>fa}),G8e=LUe.update({id:"/reset-password/$token",path:"/reset-password/$token",getParentRoute:()=>da}),K8e=FUe.update({id:"/",path:"/",getParentRoute:()=>Xn}),Z8e=zUe.update({id:"/$slotId",path:"/$slotId",getParentRoute:()=>Xn}),Y8e=HUe.update({id:"/accounts",path:"/accounts",getParentRoute:()=>Xn}),Q8e=VUe.update({id:"/advanced",path:"/advanced",getParentRoute:()=>Xn}),J8e=GUe.update({id:"/appearance",path:"/appearance",getParentRoute:()=>Xn}),X8e=ZUe.update({id:"/calendars",path:"/calendars",getParentRoute:()=>Xn}),eFe=QUe.update({id:"/classification",path:"/classification",getParentRoute:()=>Xn}),tFe=e6e.update({id:"/filters",path:"/filters",getParentRoute:()=>Xn}),nFe=n6e.update({id:"/folders",path:"/folders",getParentRoute:()=>Xn}),rFe=o6e.update({id:"/labels",path:"/labels",getParentRoute:()=>Xn}),oFe=i6e.update({id:"/people",path:"/people",getParentRoute:()=>Xn}),sFe=u6e.update({id:"/senders",path:"/senders",getParentRoute:()=>Xn}),iFe=f6e.update({id:"/spam",path:"/spam",getParentRoute:()=>Xn}),aFe=p6e.update({id:"/suggested-vips",path:"/suggested-vips",getParentRoute:()=>Xn}),lFe=g6e.update({id:"/warnings",path:"/warnings",getParentRoute:()=>Xn}),Vu=y6e.update({id:"/$view/$date",path:"/$view/$date",getParentRoute:()=>F2}),cFe=S6e.update({id:"/",path:"/",getParentRoute:()=>n0}),$2=w6e.update({id:"/$threadId",path:"/$threadId",getParentRoute:()=>n0}),uFe=x6e.update({id:"/",path:"/",getParentRoute:()=>r0}),z2=I6e.update({id:"/$threadId",path:"/$threadId",getParentRoute:()=>r0}),dFe=R6e.update({id:"/",path:"/",getParentRoute:()=>o0}),j2=O6e.update({id:"/$threadId",path:"/$threadId",getParentRoute:()=>o0}),fFe=M6e.update({id:"/label/",path:"/label/",getParentRoute:()=>fa}),i0=N6e.update({id:"/label/$labelId",path:"/label/$labelId",getParentRoute:()=>fa}),hFe=D6e.update({id:"/",path:"/",getParentRoute:()=>s0}),pFe=U6e.update({id:"/",path:"/",getParentRoute:()=>Vu}),a0=$6e.update({id:"/$calendarObjectId",path:"/$calendarObjectId",getParentRoute:()=>Vu}),mFe=V6e.update({id:"/new",path:"/new",getParentRoute:()=>Vu}),gFe=G6e.update({id:"/",path:"/",getParentRoute:()=>$2}),KW=Z6e.update({id:"/$messageId",path:"/$messageId",getParentRoute:()=>$2}),vFe=Q6e.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>n0}),yFe=X6e.update({id:"/",path:"/",getParentRoute:()=>z2}),ZW=t8e.update({id:"/$messageId",path:"/$messageId",getParentRoute:()=>z2}),bFe=r8e.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>r0}),SFe=s8e.update({id:"/",path:"/",getParentRoute:()=>j2}),YW=a8e.update({id:"/$messageId",path:"/$messageId",getParentRoute:()=>j2}),CFe=c8e.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>o0}),wFe=d8e.update({id:"/",path:"/",getParentRoute:()=>i0}),B2=h8e.update({id:"/$threadId",path:"/$threadId",getParentRoute:()=>i0}),EFe=m8e.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>s0}),xFe=v8e.update({id:"/draft/$outboxMessageId",path:"/draft/$outboxMessageId",getParentRoute:()=>s0}),_Fe=b8e.update({id:"/",path:"/",getParentRoute:()=>a0}),H2=C8e.update({id:"/$recurrenceId",path:"/$recurrenceId",getParentRoute:()=>a0}),IFe=E8e.update({id:"/edit",path:"/edit",getParentRoute:()=>a0}),AFe=_8e.update({id:"/suggestion/$suggestionId",path:"/suggestion/$suggestionId",getParentRoute:()=>Vu}),RFe=A8e.update({id:"/task/$calendarTaskId",path:"/task/$calendarTaskId",getParentRoute:()=>Vu}),TFe=T8e.update({id:"/",path:"/",getParentRoute:()=>B2}),QW=M8e.update({id:"/$messageId",path:"/$messageId",getParentRoute:()=>B2}),OFe=N8e.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>i0}),MFe=D8e.update({id:"/",path:"/",getParentRoute:()=>H2}),PFe=U8e.update({id:"/edit",path:"/edit",getParentRoute:()=>H2}),NFe=F8e.update({id:"/$mode/{-$outboxMessageId}",path:"/$mode/{-$outboxMessageId}",getParentRoute:()=>KW}),kFe=$8e.update({id:"/$mode/{-$outboxMessageId}",path:"/$mode/{-$outboxMessageId}",getParentRoute:()=>ZW}),DFe=z8e.update({id:"/$mode/{-$outboxMessageId}",path:"/$mode/{-$outboxMessageId}",getParentRoute:()=>YW}),LFe=j8e.update({id:"/$mode/{-$outboxMessageId}",path:"/$mode/{-$outboxMessageId}",getParentRoute:()=>QW}),UFe={CalendarViewDateCalendarObjectIdRecurrenceIdEditRoute:PFe,CalendarViewDateCalendarObjectIdRecurrenceIdIndexRoute:MFe},FFe=H2._addFileChildren(UFe),$Fe={CalendarViewDateCalendarObjectIdRecurrenceIdRoute:FFe,CalendarViewDateCalendarObjectIdEditRoute:IFe,CalendarViewDateCalendarObjectIdIndexRoute:_Fe},zFe=a0._addFileChildren($Fe),jFe={CalendarViewDateCalendarObjectIdRoute:zFe,CalendarViewDateNewRoute:mFe,CalendarViewDateIndexRoute:pFe,CalendarViewDateSuggestionSuggestionIdRoute:AFe,CalendarViewDateTaskCalendarTaskIdRoute:RFe},BFe=Vu._addFileChildren(jFe),HFe={CalendarIndexRoute:V8e,CalendarViewDateRoute:BFe},qFe=F2._addFileChildren(HFe),VFe={MailMailboxIdThreadIdMessageIdModeChar123OutboxMessageIdChar125Route:NFe},WFe=KW._addFileChildren(VFe),GFe={MailMailboxIdThreadIdMessageIdRoute:WFe,MailMailboxIdThreadIdIndexRoute:gFe},KFe=$2._addFileChildren(GFe),ZFe={MailMailboxIdThreadIdRoute:KFe,MailMailboxIdIndexRoute:cFe,MailMailboxIdComposeChar123OutboxMessageIdChar125Route:vFe},YFe=n0._addFileChildren(ZFe),QFe={MailBriefThreadIdMessageIdModeChar123OutboxMessageIdChar125Route:kFe},JFe=ZW._addFileChildren(QFe),XFe={MailBriefThreadIdMessageIdRoute:JFe,MailBriefThreadIdIndexRoute:yFe},e$e=z2._addFileChildren(XFe),t$e={MailBriefThreadIdRoute:e$e,MailBriefIndexRoute:uFe,MailBriefComposeChar123OutboxMessageIdChar125Route:bFe},n$e=r0._addFileChildren(t$e),r$e={MailFlaggedThreadIdMessageIdModeChar123OutboxMessageIdChar125Route:DFe},o$e=YW._addFileChildren(r$e),s$e={MailFlaggedThreadIdMessageIdRoute:o$e,MailFlaggedThreadIdIndexRoute:SFe},i$e=j2._addFileChildren(s$e),a$e={MailFlaggedThreadIdRoute:i$e,MailFlaggedIndexRoute:dFe,MailFlaggedComposeChar123OutboxMessageIdChar125Route:CFe},l$e=o0._addFileChildren(a$e),c$e={MailOutboxIndexRoute:hFe,MailOutboxComposeChar123OutboxMessageIdChar125Route:EFe,MailOutboxDraftOutboxMessageIdRoute:xFe},u$e=s0._addFileChildren(c$e),d$e={MailLabelLabelIdThreadIdMessageIdModeChar123OutboxMessageIdChar125Route:LFe},f$e=QW._addFileChildren(d$e),h$e={MailLabelLabelIdThreadIdMessageIdRoute:f$e,MailLabelLabelIdThreadIdIndexRoute:TFe},p$e=B2._addFileChildren(h$e),m$e={MailLabelLabelIdThreadIdRoute:p$e,MailLabelLabelIdIndexRoute:wFe,MailLabelLabelIdComposeChar123OutboxMessageIdChar125Route:OFe},g$e=i0._addFileChildren(m$e),v$e={MailMailboxIdRoute:YFe,MailBriefRoute:n$e,MailFlaggedRoute:l$e,MailOutboxRoute:u$e,MailIndexRoute:W8e,MailLabelLabelIdRoute:g$e,MailLabelIndexRoute:fFe},y$e=fa._addFileChildren(v$e),b$e={SettingsSlotIdRoute:Z8e,SettingsAccountsRoute:Y8e,SettingsAdvancedRoute:Q8e,SettingsAppearanceRoute:J8e,SettingsCalendarsRoute:X8e,SettingsClassificationRoute:eFe,SettingsFiltersRoute:tFe,SettingsFoldersRoute:nFe,SettingsLabelsRoute:rFe,SettingsPeopleRoute:oFe,SettingsSendersRoute:sFe,SettingsSpamRoute:iFe,SettingsSuggestedVipsRoute:aFe,SettingsWarningsRoute:lFe,SettingsIndexRoute:K8e},S$e=Xn._addFileChildren(b$e),C$e={IndexRoute:B8e,CalendarRoute:qFe,ImportRoute:H8e,MailRoute:y$e,OnboardingRoute:q8e,SettingsRoute:S$e,ResetPasswordTokenRoute:G8e},w$e=da._addFileChildren(C$e)._addFileTypes(),E$e=(e,t,n)=>{const r=MSe({routeTree:w$e,context:{queryClient:e},history:n,stringifySearch:URe,defaultPreload:"intent",defaultPendingComponent:Iy,defaultPendingMs:200,defaultPendingMinMs:300});return r.subscribe("onResolved",o=>{t.recordPageView(o.toLocation.pathname),qie(o.toLocation.pathname)}),r},Be=e=>typeof e=="string",uf=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},Z8=e=>e==null?"":""+e,x$e=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},_$e=/###/g,Y8=e=>e&&e.indexOf("###")>-1?e.replace(_$e,"."):e,Q8=e=>!e||Be(e),Ff=(e,t,n)=>{const r=Be(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(Q8(e))return{};const s=Y8(r[o]);!e[s]&&n&&(e[s]=new n),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={},++o}return Q8(e)?{}:{obj:e,k:Y8(r[o])}},J8=(e,t,n)=>{const{obj:r,k:o}=Ff(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let s=t[t.length-1],a=t.slice(0,t.length-1),c=Ff(e,a,Object);for(;c.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),c=Ff(e,a,Object),c?.obj&&typeof c.obj[`${c.k}.${s}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${s}`]=n},I$e=(e,t,n,r)=>{const{obj:o,k:s}=Ff(e,t,Object);o[s]=o[s]||[],o[s].push(n)},sy=(e,t)=>{const{obj:n,k:r}=Ff(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},A$e=(e,t,n)=>{const r=sy(e,n);return r!==void 0?r:sy(t,n)},JW=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?Be(e[r])||e[r]instanceof String||Be(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):JW(e[r],t[r],n):e[r]=t[r]);return e},Rc=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var R$e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const T$e=e=>Be(e)?e.replace(/[&<>"'\/]/g,t=>R$e[t]):e;class O$e{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const M$e=[" ",",","?","!",";"],P$e=new O$e(20),N$e=(e,t,n)=>{t=t||"",n=n||"";const r=M$e.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=P$e.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!o.test(e);if(!s){const a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(s=!0)}return s},TA=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let o=e;for(let s=0;s<r.length;){if(!o||typeof o!="object")return;let a,c="";for(let u=s;u<r.length;++u)if(u!==s&&(c+=n),c+=r[u],a=o[c],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&u<r.length-1)continue;s+=u-s+1;break}o=a}return o},iy=e=>e?.replace("_","-"),k$e={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class ay{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||k$e,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(Be(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new ay(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ay(this.logger,t)}}var Wo=new ay;class l0{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(a=>{let[c,u]=a;for(let f=0;f<u;f++)c(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[c,u]=a;for(let f=0;f<u;f++)c.apply(c,[t,...r])})}}class X8 extends l0{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;t.indexOf(".")>-1?c=t.split("."):(c=[t,n],r&&(Array.isArray(r)?c.push(...r):Be(r)&&s?c.push(...r.split(s)):c.push(r)));const u=sy(this.data,c);return!u&&!n&&!r&&t.indexOf(".")>-1&&(t=c[0],n=c[1],r=c.slice(2).join(".")),u||!a||!Be(r)?u:TA(this.data?.[t]?.[n],r,s)}addResource(t,n,r,o){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let c=[t,n];r&&(c=c.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(c=t.split("."),o=n,n=c[1]),this.addNamespaces(n),J8(this.data,c,o),s.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in r)(Be(r[s])||Array.isArray(r[s]))&&this.addResource(t,n,s,r[s],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},c=[t,n];t.indexOf(".")>-1&&(c=t.split("."),o=r,r=n,n=c[1]),this.addNamespaces(n);let u=sy(this.data,c)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?JW(u,r,s):u={...u,...r},J8(this.data,c,u),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var XW={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(s=>{t=this.processors[s]?.process(t,n,r,o)??t}),t}};const eF={},tF=e=>!Be(e)&&typeof e!="boolean"&&typeof e!="number";class ly extends l0{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),x$e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Wo.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};return t==null?!1:this.resolve(t,n)?.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,c=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!N$e(t,r,o);if(a&&!c){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:Be(s)?[s]:s};const f=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(f[0])>-1)&&(s=f.shift()),t=f.join(o)}return{key:t,namespaces:Be(s)?[s]:s}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:c}=this.extractFromKey(t[t.length-1],n),u=c[c.length-1],f=n.lng||this.language,h=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode"){if(h){const j=n.nsSeparator||this.options.nsSeparator;return o?{res:`${u}${j}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:`${u}${j}${a}`}return o?{res:a,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:a}const m=this.resolve(t,n);let g=m?.res;const v=m?.usedKey||a,C=m?.exactUsedKey||a,b=["[object Number]","[object Function]","[object RegExp]"],E=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,I=n.count!==void 0&&!Be(n.count),R=ly.hasDefaultValue(n),O=I?this.pluralResolver.getSuffix(f,n.count,n):"",D=n.ordinal&&I?this.pluralResolver.getSuffix(f,n.count,{ordinal:!1}):"",N=I&&!n.ordinal&&n.count===0,M=N&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${O}`]||n[`defaultValue${D}`]||n.defaultValue;let L=g;x&&!g&&R&&(L=M);const $=tF(L),G=Object.prototype.toString.apply(L);if(x&&L&&$&&b.indexOf(G)<0&&!(Be(E)&&Array.isArray(L))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const j=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,L,{...n,ns:c}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(m.res=j,m.usedParams=this.getUsedParamsDetails(n),m):j}if(s){const j=Array.isArray(L),F=j?[]:{},q=j?C:v;for(const J in L)if(Object.prototype.hasOwnProperty.call(L,J)){const Se=`${q}${s}${J}`;R&&!g?F[J]=this.translate(Se,{...n,defaultValue:tF(M)?M[J]:void 0,joinArrays:!1,ns:c}):F[J]=this.translate(Se,{...n,joinArrays:!1,ns:c}),F[J]===Se&&(F[J]=L[J])}g=F}}else if(x&&Be(E)&&Array.isArray(g))g=g.join(E),g&&(g=this.extendTranslation(g,t,n,r));else{let j=!1,F=!1;!this.isValidLookup(g)&&R&&(j=!0,g=M),this.isValidLookup(g)||(F=!0,g=a);const J=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&F?void 0:g,Se=R&&M!==g&&this.options.updateMissing;if(F||j||Se){if(this.logger.log(Se?"updateKey":"missingKey",f,u,a,Se?M:g),s){const ge=this.resolve(a,{...n,keySeparator:!1});ge&&ge.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let V=[];const ee=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ee&&ee[0])for(let ge=0;ge<ee.length;ge++)V.push(ee[ge]);else this.options.saveMissingTo==="all"?V=this.languageUtils.toResolveHierarchy(n.lng||this.language):V.push(n.lng||this.language);const me=(ge,Te,z)=>{const te=R&&z!==g?z:J;this.options.missingKeyHandler?this.options.missingKeyHandler(ge,u,Te,te,Se,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ge,u,Te,te,Se,n),this.emit("missingKey",ge,u,Te,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?V.forEach(ge=>{const Te=this.pluralResolver.getSuffixes(ge,n);N&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Te.indexOf(`${this.options.pluralSeparator}zero`)<0&&Te.push(`${this.options.pluralSeparator}zero`),Te.forEach(z=>{me([ge],a+z,n[`defaultValue${z}`]||M)})}):me(V,a,M))}g=this.extendTranslation(g,t,n,m,r),F&&g===a&&this.options.appendNamespaceToMissingKey&&(g=`${u}:${a}`),(F||j)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${a}`:a,j?g:void 0))}return o?(m.res=g,m.usedParams=this.getUsedParamsDetails(n),m):g}extendTranslation(t,n,r,o,s){var a=this;if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=Be(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(f){const g=t.match(this.interpolator.nestingRegexp);h=g&&g.length}let m=r.replace&&!Be(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),t=this.interpolator.interpolate(t,m,r.lng||this.language||o.usedLng,r),f){const g=t.match(this.interpolator.nestingRegexp),v=g&&g.length;h<v&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var g=arguments.length,v=new Array(g),C=0;C<g;C++)v[C]=arguments[C];return s?.[0]===v[0]&&!r.context?(a.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):a.translate(...v,n)},r)),r.interpolation&&this.interpolator.reset()}const c=r.postProcess||this.options.postProcess,u=Be(c)?[c]:c;return t!=null&&u?.length&&r.applyPostProcessor!==!1&&(t=XW.handle(u,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,s,a,c;return Be(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(r))return;const f=this.extractFromKey(u,n),h=f.key;o=h;let m=f.namespaces;this.options.fallbackNS&&(m=m.concat(this.options.fallbackNS));const g=n.count!==void 0&&!Be(n.count),v=g&&!n.ordinal&&n.count===0,C=n.context!==void 0&&(Be(n.context)||typeof n.context=="number")&&n.context!=="",b=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);m.forEach(E=>{this.isValidLookup(r)||(c=E,!eF[`${b[0]}-${E}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(c)&&(eF[`${b[0]}-${E}`]=!0,this.logger.warn(`key "${o}" for languages "${b.join(", ")}" won't get resolved as namespace "${c}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(x=>{if(this.isValidLookup(r))return;a=x;const I=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(I,h,x,E,n);else{let O;g&&(O=this.pluralResolver.getSuffix(x,n.count,n));const D=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(I.push(h+O),n.ordinal&&O.indexOf(N)===0&&I.push(h+O.replace(N,this.options.pluralSeparator)),v&&I.push(h+D)),C){const M=`${h}${this.options.contextSeparator}${n.context}`;I.push(M),g&&(I.push(M+O),n.ordinal&&O.indexOf(N)===0&&I.push(M+O.replace(N,this.options.pluralSeparator)),v&&I.push(M+D))}}let R;for(;R=I.pop();)this.isValidLookup(r)||(s=R,r=this.getResource(x,E,R,n))}))})}),{res:r,usedKey:o,exactUsedKey:s,usedLng:a,usedNS:c}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Be(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const s of n)delete o[s]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class nF{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wo.create("languageUtils")}getScriptPartFromCode(t){if(t=iy(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=iy(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Be(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(s=>{if(s===o)return s;if(!(s.indexOf("-")<0&&o.indexOf("-")<0)&&(s.indexOf("-")>0&&o.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===o||s.indexOf(o)===0&&o.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Be(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],s=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return Be(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):Be(t)&&s(this.formatLanguageCode(t)),r.forEach(a=>{o.indexOf(a)<0&&s(this.formatLanguageCode(a))}),o}}const rF={zero:0,one:1,two:2,few:3,many:4,other:5},oF={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class D$e{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Wo.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=iy(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:r,type:o});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(r,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),oF;if(!t.match(/-|_/))return oF;const u=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(u,n)}return this.pluralRulesCache[s]=a,a}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,s)=>rF[o]-rF[s]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const sF=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=A$e(e,t,n);return!s&&o&&Be(n)&&(s=TA(e,n,r),s===void 0&&(s=TA(t,n,r))),s},v_=e=>e.replace(/\$/g,"$$$$");class L$e{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Wo.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:s,prefixEscaped:a,suffix:c,suffixEscaped:u,formatSeparator:f,unescapeSuffix:h,unescapePrefix:m,nestingPrefix:g,nestingPrefixEscaped:v,nestingSuffix:C,nestingSuffixEscaped:b,nestingOptionsSeparator:E,maxReplaces:x,alwaysFormat:I}=t.interpolation;this.escape=n!==void 0?n:T$e,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=s?Rc(s):a||"{{",this.suffix=c?Rc(c):u||"}}",this.formatSeparator=f||",",this.unescapePrefix=h?"":m||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=g?Rc(g):v||Rc("$t("),this.nestingSuffix=C?Rc(C):b||Rc(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=x||1e3,this.alwaysFormat=I!==void 0?I:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let s,a,c;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},f=v=>{if(v.indexOf(this.formatSeparator)<0){const x=sF(n,u,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,r,{...o,...n,interpolationkey:v}):x}const C=v.split(this.formatSeparator),b=C.shift().trim(),E=C.join(this.formatSeparator).trim();return this.format(sF(n,u,b,this.options.keySeparator,this.options.ignoreJSONStructure),E,r,{...o,...n,interpolationkey:b})};this.resetRegExp();const h=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,m=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>v_(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?v_(this.escape(v)):v_(v)}].forEach(v=>{for(c=0;s=v.regex.exec(t);){const C=s[1].trim();if(a=f(C),a===void 0)if(typeof h=="function"){const E=h(t,s,o);a=Be(E)?E:""}else if(o&&Object.prototype.hasOwnProperty.call(o,C))a="";else if(m){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${t}`),a="";else!Be(a)&&!this.useRawValueToEscape&&(a=Z8(a));const b=v.safeValue(a);if(t=t.replace(s[0],b),m?(v.regex.lastIndex+=a.length,v.regex.lastIndex-=s[0].length):v.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,s,a;const c=(u,f)=>{const h=this.nestingOptionsSeparator;if(u.indexOf(h)<0)return u;const m=u.split(new RegExp(`${h}[ ]*{`));let g=`{${m[1]}`;u=m[0],g=this.interpolate(g,a);const v=g.match(/'/g),C=g.match(/"/g);((v?.length??0)%2===0&&!C||C.length%2!==0)&&(g=g.replace(/'/g,'"'));try{a=JSON.parse(g),f&&(a={...f,...a})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,b),`${u}${h}${g}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,u};for(;o=this.nestingRegexp.exec(t);){let u=[];a={...r},a=a.replace&&!Be(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let f=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const h=o[1].split(this.formatSeparator).map(m=>m.trim());o[1]=h.shift(),u=h,f=!0}if(s=n(c.call(this,o[1].trim(),a),a),s&&o[0]===t&&!Be(s))return s;Be(s)||(s=Z8(s)),s||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),s=""),f&&(s=u.reduce((h,m)=>this.format(h,m,r.lng,{...r,interpolationkey:o[1].trim()}),s.trim())),t=t.replace(o[0],s),this.regexp.lastIndex=0}return t}}const U$e=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(a=>{if(a){const[c,...u]=a.split(":"),f=u.join(":").trim().replace(/^'+|'+$/g,""),h=c.trim();n[h]||(n[h]=f),f==="false"&&(n[h]=!1),f==="true"&&(n[h]=!0),isNaN(f)||(n[h]=parseInt(f,10))}})}return{formatName:t,formatOptions:n}},Tc=e=>{const t={};return(n,r,o)=>{let s=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(s={...s,[o.interpolationkey]:void 0});const a=r+JSON.stringify(s);let c=t[a];return c||(c=e(iy(r),o),t[a]=c),c(n)}};class F$e{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Wo.create("formatter"),this.options=t,this.formats={number:Tc((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return s=>o.format(s)}),currency:Tc((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return s=>o.format(s)}),datetime:Tc((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return s=>o.format(s)}),relativetime:Tc((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return s=>o.format(s,r.range||"day")}),list:Tc((n,r)=>{const o=new Intl.ListFormat(n,{...r});return s=>o.format(s)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Tc(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=n.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(c=>c.indexOf(")")>-1)){const c=s.findIndex(u=>u.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,c)].join(this.formatSeparator)}return s.reduce((c,u)=>{const{formatName:f,formatOptions:h}=U$e(u);if(this.formats[f]){let m=c;try{const g=o?.formatParams?.[o.interpolationkey]||{},v=g.locale||g.lng||o.locale||o.lng||r;m=this.formats[f](c,v,{...h,...o,...g})}catch(g){this.logger.warn(g)}return m}else this.logger.warn(`there was no format function for ${f}`);return c},t)}}const $$e=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class z$e extends l0{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Wo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(t,n,r,o){const s={},a={},c={},u={};return t.forEach(f=>{let h=!0;n.forEach(m=>{const g=`${f}|${m}`;!r.reload&&this.store.hasResourceBundle(f,m)?this.state[g]=2:this.state[g]<0||(this.state[g]===1?a[g]===void 0&&(a[g]=!0):(this.state[g]=1,h=!1,a[g]===void 0&&(a[g]=!0),s[g]===void 0&&(s[g]=!0),u[m]===void 0&&(u[m]=!0)))}),h||(c[f]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const o=t.split("|"),s=o[0],a=o[1];n&&this.emit("failedLoading",s,a,n),!n&&r&&this.store.addResourceBundle(s,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const c={};this.queue.forEach(u=>{I$e(u.loaded,[s],a),$$e(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(f=>{c[f]||(c[f]={});const h=u.loaded[f];h.length&&h.forEach(m=>{c[f][m]===void 0&&(c[f][m]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:s,callback:a});return}this.readingCalls++;const c=(f,h)=>{if(this.readingCalls--,this.waitingReads.length>0){const m=this.waitingReads.shift();this.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.callback)}if(f&&h&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,s*2,a)},s);return}a(f,h)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const f=u(t,n);f&&typeof f.then=="function"?f.then(h=>c(null,h)).catch(c):c(null,f)}catch(f){c(f)}return}return u(t,n,c)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Be(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Be(n)&&(n=[n]);const s=this.queueLoad(t,n,r,o);if(!s.toLoad.length)return s.pending.length||o(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],s=r[1];this.read(o,s,"read",void 0,void 0,(a,c)=>{a&&this.logger.warn(`${n}loading namespace ${s} for language ${o} failed`,a),!a&&c&&this.logger.log(`${n}loaded namespace ${s} for language ${o}`,c),this.loaded(t,a,c)})}saveMissing(t,n,r,o,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const u={...a,isUpdate:s},f=this.backend.create.bind(this.backend);if(f.length<6)try{let h;f.length===5?h=f(t,n,r,o,u):h=f(t,n,r,o),h&&typeof h.then=="function"?h.then(m=>c(null,m)).catch(c):c(null,h)}catch(h){c(h)}else f(t,n,r,o,c,u)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const iF=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Be(e[1])&&(t.defaultValue=e[1]),Be(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),aF=e=>(Be(e.ns)&&(e.ns=[e.ns]),Be(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Be(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),_g=()=>{},j$e=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class bh extends l0{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=aF(t),this.services={},this.logger=Wo,this.modules={external:[]},j$e(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(Be(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=iF();this.options={...o,...this.options,...aF(n)},this.options.interpolation={...o.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const s=h=>h?typeof h=="function"?new h:h:null;if(!this.options.isClone){this.modules.logger?Wo.init(s(this.modules.logger),this.options):Wo.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=F$e;const m=new nF(this.options);this.store=new X8(this.options.resources,this.options);const g=this.services;g.logger=Wo,g.resourceStore=this.store,g.languageUtils=m,g.pluralResolver=new D$e(m,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),h&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(g.formatter=s(h),g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new L$e(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new z$e(s(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",function(v){for(var C=arguments.length,b=new Array(C>1?C-1:0),E=1;E<C;E++)b[E-1]=arguments[E];t.emit(v,...b)}),this.modules.languageDetector&&(g.languageDetector=s(this.modules.languageDetector),g.languageDetector.init&&g.languageDetector.init(g,this.options.detection,this.options)),this.modules.i18nFormat&&(g.i18nFormat=s(this.modules.i18nFormat),g.i18nFormat.init&&g.i18nFormat.init(this)),this.translator=new ly(this.services,this.options),this.translator.on("*",function(v){for(var C=arguments.length,b=new Array(C>1?C-1:0),E=1;E<C;E++)b[E-1]=arguments[E];t.emit(v,...b)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,r||(r=_g),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(h=>{this[h]=function(){return t.store[h](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=function(){return t.store[h](...arguments),t}});const u=uf(),f=()=>{const h=(m,g)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(g),r(m,g)};if(this.languages&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};return this.options.resources||!this.options.initAsync?f():setTimeout(f,0),u}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_g;const o=Be(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],a=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(f=>{f!=="cimode"&&s.indexOf(f)<0&&s.push(f)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>a(u)),this.options.preload?.forEach?.(c=>a(c)),this.services.backendConnector.load(s,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(t,n,r){const o=uf();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=_g),this.services.backendConnector.reload(t,n,s=>{o.resolve(),r(s)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&XW.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=uf();this.emit("languageChanging",t);const s=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},a=(u,f)=>{f?(s(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(u,function(){return r.t(...arguments)})},c=u=>{!t&&!u&&this.services.languageDetector&&(u=[]);const f=Be(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);f&&(this.language||s(f),this.translator.language||this.translator.changeLanguage(f),this.services.languageDetector?.cacheUserLanguage?.(f)),this.loadResources(f,h=>{a(h,f)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(t),o}getFixedT(t,n,r){var o=this;const s=function(a,c){let u;if(typeof c!="object"){for(var f=arguments.length,h=new Array(f>2?f-2:0),m=2;m<f;m++)h[m-2]=arguments[m];u=o.options.overloadTranslationOptionHandler([a,c].concat(h))}else u={...c};u.lng=u.lng||s.lng,u.lngs=u.lngs||s.lngs,u.ns=u.ns||s.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||r||s.keyPrefix);const g=o.options.keySeparator||".";let v;return u.keyPrefix&&Array.isArray(a)?v=a.map(C=>`${u.keyPrefix}${g}${C}`):v=u.keyPrefix?`${u.keyPrefix}${g}${a}`:a,o.t(v,u)};return Be(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.translator?.translate(...n)}exists(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.translator?.exists(...n)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(c,u)=>{const f=this.services.backendConnector.state[`${c}|${u}`];return f===-1||f===0||f===2};if(n.precheck){const c=n.precheck(this,a);if(c!==void 0)return c}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!o||a(s,t)))}loadNamespaces(t,n){const r=uf();return this.options.ns?(Be(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=uf();Be(t)&&(t=[t]);const o=this.options.preload||[],s=t.filter(a=>o.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=o.concat(s),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new nF(iF());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new bh(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_g;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},s=new bh(o);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(c=>{s[c]=this[c]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r){const c=Object.keys(this.store.data).reduce((u,f)=>(u[f]={...this.store.data[f]},Object.keys(u[f]).reduce((h,m)=>(h[m]={...u[f][m]},h),{})),{});s.store=new X8(c,o),s.services.resourceStore=s.store}return s.translator=new ly(s.services,o),s.translator.on("*",function(c){for(var u=arguments.length,f=new Array(u>1?u-1:0),h=1;h<u;h++)f[h-1]=arguments[h];s.emit(c,...f)}),s.init(o,n),s.translator.options=o,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const er=bh.createInstance();er.createInstance=bh.createInstance;er.createInstance;er.dir;er.init;er.loadResources;er.reloadResources;er.use;er.changeLanguage;er.getFixedT;er.t;er.exists;er.setDefaultNamespace;er.hasLoadedNamespace;er.loadNamespaces;er.loadLanguages;const{slice:B$e,forEach:H$e}=[];function q$e(e){return H$e.call(B$e.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function V$e(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const lF=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,W$e=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},o=encodeURIComponent(t);let s=`${e}=${o}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!lF.test(r.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${r.domain}`}if(r.path){if(!lF.test(r.path))throw new TypeError("option path is invalid");s+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(s+="; Partitioned"),s},cF={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=W$e(e,t,o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var G$e={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return cF.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:s}=t;n&&typeof document<"u"&&cF.create(n,e,r,o,s)}},K$e={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const s=r.substring(1).split("&");for(let a=0;a<s.length;a++){const c=s[a].indexOf("=");c>0&&s[a].substring(0,c)===t&&(n=s[a].substring(c+1))}}return n}},Z$e={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const s=o.substring(1);if(t){const a=s.split("&");for(let c=0;c<a.length;c++){const u=a[c].indexOf("=");u>0&&a[c].substring(0,u)===t&&(r=a[c].substring(u+1))}}if(r)return r;if(!r&&n>-1){const a=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?a[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let Oc=null;const uF=()=>{if(Oc!==null)return Oc;try{if(Oc=typeof window<"u"&&window.localStorage!==null,!Oc)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Oc=!1}return Oc};var Y$e={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&uF())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&uF()&&window.localStorage.setItem(n,e)}};let Mc=null;const dF=()=>{if(Mc!==null)return Mc;try{if(Mc=typeof window<"u"&&window.sessionStorage!==null,!Mc)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Mc=!1}return Mc};var Q$e={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&dF())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&dF()&&window.sessionStorage.setItem(n,e)}},J$e={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let s=0;s<n.length;s++)t.push(n[s]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},X$e={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},eze={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},tze={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let eG=!1;try{document.cookie,eG=!0}catch{}const tG=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];eG||tG.splice(1,1);const nze=()=>({order:tG,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class nG{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=q$e(n,this.options||{},nze()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(G$e),this.addDetector(K$e),this.addDetector(Y$e),this.addDetector(Q$e),this.addDetector(J$e),this.addDetector(X$e),this.addDetector(eze),this.addDetector(tze),this.addDetector(Z$e)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.filter(r=>r!=null&&!V$e(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}nG.type="languageDetector";const rG=["__proto__","constructor","prototype"];function oG(e){return!(typeof e!="string"||e.length===0||e.length>128||rG.indexOf(e)>-1||e.indexOf("..")>-1||e.indexOf("\\")>-1||/[?#%:&=;\s]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function sG(e){return!(!oG(e)||e.indexOf("/")>-1||e.indexOf("@")>-1)}function rze(e){return!(!oG(e)||e.indexOf("//")>-1)}const oze={lng:sG,ns:rze};function Ig(e){return typeof e!="string"?e:e.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function sze(e){if(typeof e!="string"||e.length===0)return e;try{const t=new URL(e);return t.username||t.password?(t.username="",t.password="",t.toString()):e}catch{return e.replace(/(\/\/)[^/@\s]+@/g,"$1")}}function iG(){return typeof XMLHttpRequest=="function"||typeof XMLHttpRequest=="object"}function ize(e){return!!e&&typeof e.then=="function"}function aze(e){return ize(e)?e:Promise.resolve(e)}const lze=/\{\{(.+?)\}\}/g,fF=/^[/\\]{2}/;function hF(e,t){let n=!1;const r=e.replace(lze,(o,s)=>{const a=s.trim();if(rG.indexOf(a)>-1)return o;const c=t[a];if(c==null)return o;const u=oze[a]||sG,f=String(c).split("+");for(const h of f)if(!u(h))return n=!0,o;return f.join("+")});return n||fF.test(r)&&!fF.test(e)?null:r}const tl=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof window<"u"?window:void 0;let cy;typeof fetch=="function"?cy=fetch:tl&&typeof tl.fetch=="function"&&(cy=tl.fetch);const pF=iG()&&tl?tl.XMLHttpRequest:void 0,cze=typeof ActiveXObject=="function"&&tl?tl.ActiveXObject:void 0,aG=["__proto__","constructor","prototype"],OA=(e,t)=>{if(t&&typeof t=="object"){let n="";for(const r of Object.keys(t))aG.indexOf(r)>-1||(n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r]));if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},mF=(e,t,n,r)=>{const o=s=>{if(!s.ok)return n(s.statusText||"Error",{status:s.status});s.text().then(a=>{n(null,{status:s.status,data:a})}).catch(n)};if(r){const s=r(e,t);if(s instanceof Promise){s.then(o).catch(n);return}}typeof fetch=="function"?fetch(e,t).then(o).catch(n):cy(e,t).then(o).catch(n)},uze=(e,t,n,r)=>{e.queryStringParams&&(t=OA(t,e.queryStringParams));const o={...typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders};typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]=`i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),n&&(o["Content-Type"]="application/json");const s=typeof e.requestOptions=="function"?e.requestOptions(n):e.requestOptions,a={method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o,...e._omitFetchOptions?{}:s},c=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{mF(t,a,r,c)}catch(u){if(!s||Object.keys(s).length===0||!u.message||u.message.indexOf("not implemented")<0)return r(u);try{Object.keys(s).forEach(f=>{delete a[f]}),mF(t,a,r,c),e._omitFetchOptions=!0}catch(f){r(f)}}},dze=(e,t,n,r)=>{n&&typeof n=="object"&&(n=OA("",n).slice(1)),e.queryStringParams&&(t=OA(t,e.queryStringParams));try{const o=pF?new pF:new cze("MSXML2.XMLHTTP.3.0");o.open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");let s=e.customHeaders;if(s=typeof s=="function"?s():s,s)for(const a of Object.keys(s))aG.indexOf(a)>-1||o.setRequestHeader(a,s[a]);o.onreadystatechange=()=>{o.readyState>3&&r(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(o){console&&console.log(o)}},fze=(e,t,n,r)=>{if(typeof n=="function"&&(r=n,n=void 0),r=r||(()=>{}),cy&&t.indexOf("file:")!==0)return uze(e,t,n,r);if(iG()||typeof ActiveXObject=="function")return dze(e,t,n,r);r(new Error("No fetch and no xhr implementation found!"))},hze=()=>({loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:e=>JSON.parse(e),stringify:JSON.stringify,parsePayload:(e,t,n)=>({[t]:n||""}),parseLoadPayload:(e,t)=>{},request:fze,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}});var lG=class{constructor(e,t={},n={}){this.services=e,this.options=t,this.allOptions=n,this.type="backend",this.init(e,t,n)}init(e,t={},n={}){if(this.services=e,this.options={...hze(),...this.options||{},...t},this.allOptions=n,this.services&&this.options.reloadInterval){const r=setInterval(()=>this.reload(),this.options.reloadInterval);typeof r=="object"&&typeof r.unref=="function"&&r.unref()}}readMulti(e,t,n){this._readAny(e,e,t,t,n)}read(e,t,n){this._readAny([e],e,[t],t,n)}_readAny(e,t,n,r,o){let s=this.options.loadPath;typeof this.options.loadPath=="function"&&(s=this.options.loadPath(e,n)),s=aze(s),s.then(a=>{if(!a)return o(null,{});const c=hF(a,{lng:e.join("+"),ns:n.join("+")});if(c==null){const u=e.map(Ig).join(", "),f=n.map(Ig).join(", ");return o(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+u+"] namespaces=["+f+"]"),!1)}this.loadUrl(c,o,t,r)})}loadUrl(e,t,n,r){const o=typeof n=="string"?[n]:n,s=typeof r=="string"?[r]:r,a=this.options.parseLoadPayload(o,s),c=Ig(sze(e));this.options.request(this.options,e,a,(u,f)=>{if(f&&(f.status>=500&&f.status<600||!f.status))return t("failed loading "+c+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return t("failed loading "+c+"; status code: "+f.status,!1);if(!f&&u&&u.message){const g=u.message.toLowerCase();if(["failed","fetch","network","load"].find(v=>g.indexOf(v)>-1))return t("failed loading "+c+": "+Ig(u.message),!0)}if(u)return t(u,!1);let h,m;try{typeof f.data=="string"?h=this.options.parse(f.data,n,r):h=f.data}catch{m="failed parsing "+c+" to json"}if(m)return t(m,!1);t(null,h)})}create(e,t,n,r,o){if(!this.options.addPath)return;typeof e=="string"&&(e=[e]);const s=this.options.parsePayload(t,n,r);let a=0;const c=[],u=[];e.forEach(f=>{let h=this.options.addPath;typeof this.options.addPath=="function"&&(h=this.options.addPath(f,t));const m=hF(h,{lng:f,ns:t});if(m==null){a+=1,o&&a===e.length&&o(c,u);return}this.options.request(this.options,m,s,(g,v)=>{a+=1,c.push(g),u.push(v),a===e.length&&typeof o=="function"&&o(c,u)})})}reload(){const{backendConnector:e,languageUtils:t,logger:n}=this.services,r=e.language;if(r&&r.toLowerCase()==="cimode")return;const o=[],s=a=>{t.toResolveHierarchy(a).forEach(c=>{o.indexOf(c)<0&&o.push(c)})};s(r),this.allOptions.preload&&this.allOptions.preload.forEach(a=>s(a)),o.forEach(a=>{this.allOptions.ns.forEach(c=>{e.read(a,c,"read",null,null,(u,f)=>{u&&n.warn(`loading namespace ${c} for language ${a} failed`,u),!u&&f&&n.log(`loaded namespace ${c} for language ${a}`,f),e.loaded(`${a}|${c}`,u,f)})})})}};lG.type="backend";er.use(lG).use(nG).use(ZRe).init({fallbackLng:"en",supportedLngs:["en","nl","de","fr"],ns:["common","mail"],defaultNS:"common",backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},detection:{order:["navigator","htmlTag"],caches:[]},interpolation:{escapeValue:!1},react:{useSuspense:!0,bindI18n:"languageChanged loaded"}});const pze=({authProvider:e,settingsSlots:t=[],rootElementId:n="root"})=>{jie(),DRe(),e.configure(),r1e(e);const r=ORe();Mie(r);const o=new Tbe({queryCache:new z7({onError:u1e}),mutationCache:new $7({onError:d1e}),defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1}}});NRe();const s=E$e(o,r);for(const u of t)if(Object.hasOwn(s.routesByPath,`/settings/${u.id}`))throw new Error(`Settings slot "${u.id}" collides with a built-in settings section`);r.recordPageView(window.location.pathname);const a=document.getElementById(n);if(!a)throw new Error(`Root element not found: #${n}`);const{Shell:c}=e;$Se.createRoot(a).render(T.jsx(_.StrictMode,{children:T.jsx(nq.Provider,{value:r,children:T.jsxs(Obe,{client:o,children:[T.jsx(i1e,{value:e,children:T.jsx(cUe,{value:t,children:T.jsx(c,{children:T.jsx(kSe,{router:s})})})}),!1]})})}))};pze({authProvider:ibe});export{wW as $,Iy as A,Vn as B,gre as C,joe as D,XA as E,Cre as F,mre as G,Sre as H,K$ as I,wz as J,fj as K,Q$ as L,Ire as M,_r as N,gj as O,vBe as P,tUe as Q,Jie as R,Mre as S,kre as T,vW as U,gW as V,iq as W,D_ as X,fA as Y,yje as Z,e0 as _,fl as a,fW as a$,Yje as a0,H2e as a1,Eu as a2,STe as a3,o2 as a4,My as a5,Aie as a6,fb as a7,Pu as a8,G4e as a9,ol as aA,aR as aB,aje as aC,lje as aD,g3 as aE,HUe as aF,p7e as aG,Dje as aH,O7e as aI,cse as aJ,h9e as aK,Loe as aL,f9e as aM,oje as aN,C4e as aO,yie as aP,gie as aQ,mie as aR,wn as aS,Ah as aT,G6 as aU,t7e as aV,z2e as aW,tje as aX,eje as aY,nje as aZ,zz as a_,a1e as aa,uUe as ab,AUe as ac,v9e as ad,zUe as ae,_Be as af,eR as ag,Nje as ah,dV as ai,B as aj,Mje as ak,Pje as al,zOe as am,bW as an,hLe as ao,h7e as ap,d7e as aq,jf as ar,Mz as as,L$ as at,U as au,ce as av,w as aw,kje as ax,zze as ay,ku as az,Et as b,_W as b$,Q7e as b0,X7e as b1,$2e as b2,jze as b3,Bze as b4,Nze as b5,gse as b6,Uze as b7,Dze as b8,Pze as b9,Jje as bA,h_ as bB,CLe as bC,Zje as bD,yBe as bE,J2e as bF,xBe as bG,a7e as bH,u7e as bI,c7e as bJ,l7e as bK,CBe as bL,SBe as bM,db as bN,lUe as bO,bBe as bP,wBe as bQ,EBe as bR,P7e as bS,N7e as bT,Ef as bU,u6e as bV,a6e as bW,Rre as bX,cje as bY,W2e as bZ,rje as b_,Pse as ba,iR as bb,b7e as bc,S7e as bd,TLe as be,OLe as bf,BLe as bg,jLe as bh,e6e as bi,yse as bj,Fze as bk,kse as bl,ILe as bm,r7e as bn,hTe as bo,Xje as bp,tBe as bq,i2e as br,eBe as bs,o7e as bt,Qje as bu,oBe as bv,nBe as bw,rBe as bx,R2e as by,_7e as bz,s2 as c,Fbe as c$,GLe as c0,wze as c1,Lje as c2,_je as c3,bze as c4,IW as c5,xm as c6,_2e as c7,Tie as c8,Sl as c9,gze as cA,yze as cB,SW as cC,wje as cD,Eje as cE,Cje as cF,M$ as cG,bje as cH,Pe as cI,Oje as cJ,Q2e as cK,xje as cL,Sje as cM,aOe as cN,Coe as cO,_oe as cP,woe as cQ,Noe as cR,gh as cS,G2e as cT,Fu as cU,An as cV,vv as cW,M7 as cX,xbe as cY,Mbe as cZ,kbe as c_,Ije as ca,Aje as cb,Rje as cc,Yze as cd,$ze as ce,X4e as cf,pBe as cg,Lre as ch,yoe as ci,U7e as cj,qW as ck,W8 as cl,PBe as cm,IBe as cn,ABe as co,RBe as cp,Er as cq,rSe as cr,de as cs,y9e as ct,cb as cu,SUe as cv,hBe as cw,Nne as cx,GN as cy,mze as cz,so as d,Aze as d$,Dbe as d0,Lbe as d1,rr as d2,zbe as d3,U4 as d4,Ube as d5,dq as d6,C7e as d7,w7e as d8,x7e as d9,_re as dA,Fse as dB,Ore as dC,Eoe as dD,xre as dE,F1 as dF,Gse as dG,Nz as dH,Xze as dI,Qze as dJ,i9e as dK,lie as dL,l9e as dM,e9e as dN,a9e as dO,aie as dP,Zse as dQ,ro as dR,kze as dS,d9e as dT,c9e as dU,u9e as dV,s9e as dW,r9e as dX,Lz as dY,Sze as dZ,_ze as d_,E7e as da,n7e as db,m9e as dc,p9e as dd,jbe as de,qLe as df,SLe as dg,M7e as dh,cq as di,JTe as dj,uq as dk,Fje as dl,es as dm,KLe as dn,dBe as dp,LW as dq,jje as dr,lBe as ds,Q5e as dt,$je as du,zje as dv,cBe as dw,iBe as dx,Gze as dy,Wze as dz,ia as e,g7e as e$,Ize as e0,Eze as e1,xze as e2,Rze as e3,Tze as e4,Yoe as e5,Cze as e6,Xoe as e7,Qoe as e8,xz as e9,OBe as eA,Zze as eB,aBe as eC,B4e as eD,Uje as eE,sBe as eF,o2e as eG,r2e as eH,ije as eI,cLe as eJ,uLe as eK,$4e as eL,fBe as eM,Jze as eN,n9e as eO,t9e as eP,o9e as eQ,uBe as eR,fje as eS,Nre as eT,fse as eU,Oze as eV,Mze as eW,I7e as eX,R7e as eY,A7e as eZ,Lze as e_,dje as ea,Bje as eb,Wje as ec,fq as ed,Hje as ee,qje as ef,Vje as eg,uje as eh,Ry as ei,hje as ej,Tje as ek,dLe as el,gje as em,P2e as en,iu as eo,Hze as ep,gBe as eq,Vze as er,qze as es,pje as et,i7e as eu,s7e as ev,Kze as ew,vje as ex,Gje as ey,Kje as ez,cT as f,v7e as f0,A2e as f1,y7e as f2,Hi as f3,TBe as f4,G8 as f5,Y7e as f6,D7e as f7,F7e as f8,L7e as f9,J7e as fa,k7e as fb,$7e as fc,mje as fd,j7e as fe,B7e as ff,H7e as fg,q7e as fh,z7e as fi,MTe as fj,mBe as fk,rOe as fl,M2 as fm,W7e as fn,Z7e as fo,G7e as fp,V7e as fq,K7e as fr,N6e as fs,MBe as ft,b8e as fu,E8e as fv,A8e as fw,D8e as fx,U8e as fy,bre as fz,sje as g,m7e as h,T7e as i,T as j,lq as k,e7e as l,f7e as m,wy as n,Ey as o,Xt as p,Pre as q,_ as r,Py as s,Hf as t,kh as u,Ese as v,Sse as w,vre as x,$$ as y,Tre as z};