@remit/web-client-dist 0.0.693 → 0.0.695
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.
- package/assets/BriefPane-BJLNB-w7.js +1 -0
- package/assets/{CalendarEventEditor-ByaBmUP7.js → CalendarEventEditor-MMNLFvjJ.js} +1 -1
- package/assets/{CalendarEventPopup-NPO2QK5a.js → CalendarEventPopup-DVJ9DC_Y.js} +1 -1
- package/assets/{CalendarLoadFailed-MMfmxIOT.js → CalendarLoadFailed-uHGxFBGx.js} +1 -1
- package/assets/{CalendarQuickCreate-BhMEUw9n.js → CalendarQuickCreate-CzJ4lehP.js} +1 -1
- package/assets/{CalendarSession-B8ChEcvA.js → CalendarSession-BVuy8A2H.js} +1 -1
- package/assets/CollectionPane-RUuB6sFo.js +1 -0
- package/assets/{DesktopChrome-Ut5v-Z4q.js → DesktopChrome-Ct-IB4ks.js} +1 -1
- package/assets/{DropdownMenu-DeSAAnwz.js → DropdownMenu-CTCHgh4X.js} +1 -1
- package/assets/{EmptyState-nnSadc_r.js → EmptyState-CN-AyHj-.js} +1 -1
- package/assets/{ErrorState-DMaeeewe.js → ErrorState-Bk3DwNvd.js} +1 -1
- package/assets/{FullCompose-DktaLciC.js → FullCompose-BWiLy3Vm.js} +1 -1
- package/assets/{LabelApplyTrigger-ez73tEPG.js → LabelApplyTrigger-52QGuTLD.js} +1 -1
- package/assets/{MailShell-BpzbpiB4.js → MailShell-DAqGpnce.js} +1 -1
- package/assets/{MailViewChrome-C8hjtsK2.js → MailViewChrome-BDymWKX9.js} +1 -1
- package/assets/MailboxPane-DUI-sxQF.js +135 -0
- package/assets/{MessageBody-D4k3ez4t.js → MessageBody-BeciCqb_.js} +4 -4
- package/assets/MessageToolbar-BYhqv9RG.js +1 -0
- package/assets/{NavMenuButton-Du6gwKpU.js → NavMenuButton-A6v6v8tE.js} +1 -1
- package/assets/{OnboardingWizard-DE2nyJkH.js → OnboardingWizard-CIneAccs.js} +1 -1
- package/assets/OutboxPane-InUnHiNC.js +1 -0
- package/assets/{ReportLink-zQuTfqJn.js → ReportLink-q8WFRQli.js} +1 -1
- package/assets/_calendarObjectId-B3IHxxnZ.js +1 -0
- package/assets/_labelId-BX1_9FW3.js +1 -0
- package/assets/_mailboxId-BKCf6hRR.js +1 -0
- package/assets/_messageId-DGc5xyqH.js +1 -0
- package/assets/_messageId-ODP9L5rG.js +1 -0
- package/assets/_messageId-_9l1GYCG.js +1 -0
- package/assets/_messageId-t0gwqxwG.js +1 -0
- package/assets/_outboxMessageId-DGFiVWCU.js +1 -0
- package/assets/_recurrenceId-yqFEhvsn.js +1 -0
- package/assets/_slotId-Cf-NASLE.js +1 -0
- package/assets/_threadId-Bvd5G-pJ.js +1 -0
- package/assets/_threadId-BwJQjORR.js +1 -0
- package/assets/_threadId-CFLbzDUi.js +1 -0
- package/assets/_threadId-Dj29QtLs.js +1 -0
- package/assets/{_view._date-BEWywi53.js → _view._date-dARprXsM.js} +1 -1
- package/assets/{account-service-status-BUrjl90m.js → account-service-status-DexPoUiT.js} +1 -1
- package/assets/{accounts-BKuizqtY.js → accounts-DPvTdrTr.js} +1 -1
- package/assets/advanced-CDr_JOXg.js +1 -0
- package/assets/{agenda-time-TSGSlLRN.js → agenda-time-BcOiQ5_R.js} +1 -1
- package/assets/{app-chrome-a0-5AITB.js → app-chrome-6ZXmy5H4.js} +1 -1
- package/assets/{appearance-N8-8YrHT.js → appearance-BQZnBlkc.js} +1 -1
- package/assets/{avatar-DgKc162N.js → avatar-B_QEsxCw.js} +1 -1
- package/assets/{badge-JIJtKd2K.js → badge-CeCxCmzS.js} +1 -1
- package/assets/{bottom-sheet-6SRJicmu.js → bottom-sheet-DWqGf7I3.js} +1 -1
- package/assets/{brief-xjy0DnZr.js → brief-B7EfkUB4.js} +1 -1
- package/assets/brief-NsiukvBp.js +1 -0
- package/assets/{calendar-Di5oc2bm.js → calendar-CJGXdypt.js} +1 -1
- package/assets/{calendar-D_6yFuPu.js → calendar-DxjT7IrR.js} +1 -1
- package/assets/{calendar-event-popup-ShfopMbU.js → calendar-event-popup-y4Z860B0.js} +1 -1
- package/assets/{calendar-event-sidebar-73r7iWYB.js → calendar-event-sidebar-BaAGgT2x.js} +1 -1
- package/assets/{calendar-failure-note-ue_eGWKG.js → calendar-failure-note-CJvPzX2o.js} +1 -1
- package/assets/{calendar-guests-BwFd8bsh.js → calendar-guests-DeRthr7k.js} +1 -1
- package/assets/{calendar-suggestion-CmlMj01X.js → calendar-suggestion-BulekNHV.js} +1 -1
- package/assets/{calendars-Zl5qFuho.js → calendars-D-Use38B.js} +1 -1
- package/assets/{card-CpdfeZg0.js → card-0Dzt3Scs.js} +1 -1
- package/assets/{checkbox-C3sJmmOb.js → checkbox-DIKh2-eX.js} +1 -1
- package/assets/{chevron-down-BjVAPUIZ.js → chevron-down-BnC2m4J6.js} +1 -1
- package/assets/{chevron-left-CPIlsz08.js → chevron-left-CNQ3caMn.js} +1 -1
- package/assets/{circle-check-CIFCh3Pe.js → circle-check-CTlM3FQo.js} +1 -1
- package/assets/{circle-check-big-reCDNK7n.js → circle-check-big-DCVJA_H0.js} +1 -1
- package/assets/{circle-question-mark-CcoXqBlZ.js → circle-question-mark-CpApZe3H.js} +1 -1
- package/assets/classification-C7_2tIfb.js +1 -0
- package/assets/{clock-BvslxjM5.js → clock-CTlZVcLb.js} +1 -1
- package/assets/cloud-off-CtJJ9OTh.js +1 -0
- package/assets/compose._-_outboxMessageId_-BT2RKEAF.js +1 -0
- package/assets/compose._-_outboxMessageId_-B_NGqkpg.js +1 -0
- package/assets/compose._-_outboxMessageId_-CCPr3GjM.js +1 -0
- package/assets/compose._-_outboxMessageId_-CFBNHbeY.js +1 -0
- package/assets/compose._-_outboxMessageId_-Cw-Zq1kx.js +1 -0
- package/assets/{config-import-04fOLGAf.js → config-import-CHZ9oJuF.js} +1 -1
- package/assets/{confirm-dialog-CyYTO5x5.js → confirm-dialog-Cc446-7C.js} +1 -1
- package/assets/{copy-DhCC4a-G.js → copy-jXKvwaUz.js} +1 -1
- package/assets/{credential-steps-CDQpL_Qv.js → credential-steps-yT5IXLY8.js} +1 -1
- package/assets/{download-DPsR-mx8.js → download-CyhaY4zL.js} +1 -1
- package/assets/{draft-DCLq6qco.js → draft-C1ufEqDz.js} +1 -1
- package/assets/edit-BGhTeEac.js +1 -0
- package/assets/edit-CeXJ3wiI.js +1 -0
- package/assets/{external-link-BsGep1V-.js → external-link-1TiTglgB.js} +1 -1
- package/assets/{file-braces-CplGXMNS.js → file-braces-CXZUVCry.js} +1 -1
- package/assets/filters-CR0iG1ow.js +1 -0
- package/assets/flagged-B4N5fCui.js +1 -0
- package/assets/{flagged-BIfTM0zc.js → flagged-DuEE_WUV.js} +1 -1
- package/assets/{folder-input-DiXjxyWE.js → folder-input-kcvJkrLj.js} +1 -1
- package/assets/{folders-DQc8V606.js → folders-6mmHeM8E.js} +1 -1
- package/assets/{help-copy-DZY11DWz.js → help-copy-CIhcXCo3.js} +1 -1
- package/assets/{import-BFpbM0fn.js → import-76KXkdMq.js} +1 -1
- package/assets/index-5PtybTMj.js +1 -0
- package/assets/index-B-gNDz7v.js +1 -0
- package/assets/index-B1AltYi_.js +1 -0
- package/assets/index-BX5kv92z.js +1 -0
- package/assets/index-CzMYehsR.js +1 -0
- package/assets/{index-DjD_uOHk.css → index-DS2W4dIw.css} +1 -1
- package/assets/index-DT4iQTvg.js +1 -0
- package/assets/index-DZ4zN_a2.js +1 -0
- package/assets/index-Xq-TD3Lr.js +1 -0
- package/assets/index-eKzwYumy.js +1 -0
- package/assets/index-ehMMhnu5.js +1 -0
- package/assets/{index-Ch9-pOcE.js → index-iXcp-mGT.js} +10 -10
- package/assets/index-rui9BQ_f.js +1 -0
- package/assets/index-t0gwqxwG.js +1 -0
- package/assets/index-yeSesYv-.js +213 -0
- package/assets/{kbd-87RT_Nj_.js → kbd-BVK8yKhS.js} +1 -1
- package/assets/{label-chip-DMq-zsvm.js → label-chip-CrQMhpJe.js} +1 -1
- package/assets/{labels-ra9ROlwe.js → labels-CaXUAL8B.js} +1 -1
- package/assets/{mail-Bd3Nb9N7.js → mail-CLkdzm71.js} +1 -1
- package/assets/mail-CiuTTyMm.js +1 -0
- package/assets/{menu-DPaXdm-B.js → menu-Cn2tY52U.js} +1 -1
- package/assets/{nav-link-DbsxgxMR.js → nav-link-BvlYCbp-.js} +1 -1
- package/assets/new-ZEuIlDnl.js +1 -0
- package/assets/onboarding-bCsMaIPY.js +1 -0
- package/assets/{onboarding-completion-YPHv2tnn.js → onboarding-completion-CJl9zKMA.js} +1 -1
- package/assets/outbox-BthyAXQ5.js +1 -0
- package/assets/{pencil-CUjJNGXo.js → pencil-A679n1yJ.js} +1 -1
- package/assets/{people-Dj45Sj6w.js → people-C5ni4bV_.js} +1 -1
- package/assets/{plus-DEbDoPs_.js → plus-D9A6i0pi.js} +1 -1
- package/assets/{popover-menu-mRa93JRF.js → popover-menu-wrc2e8Vk.js} +1 -1
- package/assets/{refresh-cw-CRjuvR6N.js → refresh-cw-BRmmCn_2.js} +1 -1
- package/assets/{reply-D62C8M_H.js → reply-DL5kkaJs.js} +1 -1
- package/assets/{rich-text-DuAbH45K.js → rich-text-EZFEOU8t.js} +1 -1
- package/assets/{rich-text-spellcheck-worker-provider-D7WsKeGh.js → rich-text-spellcheck-worker-provider-NOmoFs4G.js} +1 -1
- package/assets/{rotate-ccw-nJVUfniy.js → rotate-ccw-C2NtRHS-.js} +1 -1
- package/assets/{roving-focus-CSY9NYZu.js → roving-focus-CSq3MPWi.js} +1 -1
- package/assets/{row-actions-DQQOtYGX.js → row-actions-Cthc4RCY.js} +1 -1
- package/assets/{search-mirror-BXJ0y1kD.js → search-mirror-CCAs_ZWe.js} +1 -1
- package/assets/{search-scope-B_8aEz2h.js → search-scope-DaiXqXNv.js} +1 -1
- package/assets/{search-token-index-oQMvIa8e.js → search-token-index-VBBiMTaA.js} +1 -1
- package/assets/{sections-CNfPMOAR.js → sections-uFHlOXiA.js} +1 -1
- package/assets/{segmented-control-C-RwTZ8I.js → segmented-control-DNxc5Ghi.js} +1 -1
- package/assets/{select-TMp5ih6Q.js → select-B9t8348S.js} +1 -1
- package/assets/senders-uBzIqu95.js +1 -0
- package/assets/settings-BLs90wKU.js +1 -0
- package/assets/{settings-screen-DfxQ6K4C.js → settings-screen-CafoSGzb.js} +1 -1
- package/assets/shield-check-BdZGtm0z.js +1 -0
- package/assets/spam-DKjh33Xi.js +1 -0
- package/assets/{suggest-list-D8Ma2KQS.js → suggest-list-Do7i1-gb.js} +1 -1
- package/assets/{suggested-vips-D-q4Ski_.js → suggested-vips-C-je5foZ.js} +1 -1
- package/assets/suggestion._suggestionId-DF2BM_zX.js +1 -0
- package/assets/{switch-DJaDWP2C.js → switch-1RDXcNo-.js} +1 -1
- package/assets/{task._calendarTaskId-BDTL-x3M.js → task._calendarTaskId-B7k5whQt.js} +1 -1
- package/assets/{undo-2-YQhybyJt.js → undo-2-B-b8_FeJ.js} +1 -1
- package/assets/{useCalendarData-DcKv8J39.js → useCalendarData-BcNSn1yP.js} +1 -1
- package/assets/{useCalendarScheduling-BNESC6Sx.js → useCalendarScheduling-Dfk1b293.js} +1 -1
- package/assets/{useCalendarSuggestions-asjHDP2Q.js → useCalendarSuggestions-D_tk6nh4.js} +1 -1
- package/assets/{useCalendarTasks-DvRUJS7T.js → useCalendarTasks-CX2Wh1Fn.js} +1 -1
- package/assets/useClassificationSettings-Bi0m63-O.js +1 -0
- package/assets/{useDebouncedValue-Ci-c9u_d.js → useDebouncedValue-AWe2Zncy.js} +1 -1
- package/assets/{useFilters-zI-LLBh6.js → useFilters-Bp1QgyWU.js} +1 -1
- package/assets/useJunkMailboxIds-CWScvBHw.js +1 -0
- package/assets/useLabels-CGE9kc74.js +1 -0
- package/assets/{useLayoutTier-MVSmVZp-.js → useLayoutTier-D5MoTNho.js} +1 -1
- package/assets/{useMediaQuery-DyVqQyw1.js → useMediaQuery-Bf7zukl9.js} +1 -1
- package/assets/{useMessageBodyContent-Am5kUaI9.js → useMessageBodyContent-BxjoKGiE.js} +1 -1
- package/assets/{useQueries-DSE4jlRt.js → useQueries-Dj93detX.js} +1 -1
- package/assets/{useRefreshControl-Ck0n6NLI.js → useRefreshControl-DCFTdDZz.js} +1 -1
- package/assets/{useResultFolderIndex-Rs6vWQYC.js → useResultFolderIndex-DAcbTt0T.js} +1 -1
- package/assets/useSignature-CA8ypw7f.js +1 -0
- package/assets/{warnings-CyUEYIiz.js → warnings-C-blkf-m.js} +3 -3
- package/index.html +2 -2
- package/package.json +1 -1
- package/assets/BriefPane-yrb4BVCw.js +0 -1
- package/assets/CollectionPane-CxujucTw.js +0 -1
- package/assets/MailboxPane-B7qGrdvh.js +0 -135
- package/assets/MessageToolbar-BUDWthZC.js +0 -1
- package/assets/OutboxPane-DPSNZUuT.js +0 -1
- package/assets/_calendarObjectId-CEpV_AQA.js +0 -1
- package/assets/_labelId-DABFD4PZ.js +0 -1
- package/assets/_mailboxId-BRoS8Mwj.js +0 -1
- package/assets/_messageId-BTtnQ0o_.js +0 -1
- package/assets/_messageId-C0UBmFqw.js +0 -1
- package/assets/_messageId-DxeGB2Ak.js +0 -1
- package/assets/_messageId-UxNdXfkW.js +0 -1
- package/assets/_outboxMessageId-buKygU4B.js +0 -1
- package/assets/_recurrenceId-6oeOt-u4.js +0 -1
- package/assets/_slotId-F8i3-z-s.js +0 -1
- package/assets/_threadId-BxgdFrfy.js +0 -1
- package/assets/_threadId-CiXEbmEZ.js +0 -1
- package/assets/_threadId-DClgthvx.js +0 -1
- package/assets/_threadId-Dtgsuh5z.js +0 -1
- package/assets/advanced-DJpNc3kM.js +0 -1
- package/assets/brief-B2lB0FJy.js +0 -1
- package/assets/classification-B4oAmRL8.js +0 -1
- package/assets/compose._-_outboxMessageId_-BBirD1SC.js +0 -1
- package/assets/compose._-_outboxMessageId_-BXrZc_aU.js +0 -1
- package/assets/compose._-_outboxMessageId_-B_bwVs79.js +0 -1
- package/assets/compose._-_outboxMessageId_-CZX2i0CY.js +0 -1
- package/assets/compose._-_outboxMessageId_-HahCa7sA.js +0 -1
- package/assets/edit-BRJX6z-q.js +0 -1
- package/assets/edit-C3-Hl_Ov.js +0 -1
- package/assets/filters-BdDuzTmL.js +0 -1
- package/assets/flagged-BH8Kawij.js +0 -1
- package/assets/index-BG0V0va3.js +0 -1
- package/assets/index-BHkrM-Kn.js +0 -1
- package/assets/index-BTtnQ0o_.js +0 -1
- package/assets/index-BUGqdwU9.js +0 -1
- package/assets/index-C3cMdadO.js +0 -1
- package/assets/index-Cu349H81.js +0 -1
- package/assets/index-DTrFBojr.js +0 -213
- package/assets/index-DU8baGSk.js +0 -1
- package/assets/index-DdvMNVJS.js +0 -1
- package/assets/index-UxNdXfkW.js +0 -1
- package/assets/index-cDwHPIf0.js +0 -1
- package/assets/index-hxyTtlVC.js +0 -1
- package/assets/index-muoe1j5g.js +0 -1
- package/assets/mail-DZQ29OS_.js +0 -1
- package/assets/new-CcqLVf2J.js +0 -1
- package/assets/onboarding-CJFUg80G.js +0 -1
- package/assets/outbox-D-d3HzZr.js +0 -1
- package/assets/senders-Bb7Q_eFp.js +0 -1
- package/assets/settings-BIc36rPe.js +0 -1
- package/assets/shield-check-BEVo2ulB.js +0 -1
- package/assets/suggestion._suggestionId-B5pkmBKQ.js +0 -1
- package/assets/useLabels-CaeBr4vJ.js +0 -1
- package/assets/useSignature-D7iBQ4gs.js +0 -1
package/assets/index-DTrFBojr.js
DELETED
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/calendar-D_6yFuPu.js","assets/DesktopChrome-Ut5v-Z4q.js","assets/useLayoutTier-MVSmVZp-.js","assets/useMediaQuery-DyVqQyw1.js","assets/nav-link-DbsxgxMR.js","assets/reply-D62C8M_H.js","assets/sections-CNfPMOAR.js","assets/avatar-DgKc162N.js","assets/popover-menu-mRa93JRF.js","assets/roving-focus-CSY9NYZu.js","assets/mail-Bd3Nb9N7.js","assets/app-chrome-a0-5AITB.js","assets/calendar-Di5oc2bm.js","assets/ErrorState-DMaeeewe.js","assets/import-BFpbM0fn.js","assets/credential-steps-CDQpL_Qv.js","assets/select-TMp5ih6Q.js","assets/chevron-down-BjVAPUIZ.js","assets/badge-JIJtKd2K.js","assets/card-CpdfeZg0.js","assets/config-import-04fOLGAf.js","assets/file-braces-CplGXMNS.js","assets/onboarding-completion-YPHv2tnn.js","assets/mail-DZQ29OS_.js","assets/useMessageBodyContent-Am5kUaI9.js","assets/pencil-CUjJNGXo.js","assets/MailShell-BpzbpiB4.js","assets/FullCompose-DktaLciC.js","assets/index-Ch9-pOcE.js","assets/useSignature-D7iBQ4gs.js","assets/account-form-helpers-DhckT_PN.js","assets/useDebouncedValue-Ci-c9u_d.js","assets/suggest-list-D8Ma2KQS.js","assets/confirm-dialog-CyYTO5x5.js","assets/search-scope-B_8aEz2h.js","assets/useRefreshControl-Ck0n6NLI.js","assets/circle-check-big-reCDNK7n.js","assets/refresh-cw-CRjuvR6N.js","assets/useQueries-DSE4jlRt.js","assets/search-token-index-oQMvIa8e.js","assets/useLabels-CaeBr4vJ.js","assets/menu-DPaXdm-B.js","assets/useResultFolderIndex-Rs6vWQYC.js","assets/folder-failure-CqkVSsrb.js","assets/outbox-status-BlKn6P0x.js","assets/account-service-status-BUrjl90m.js","assets/kbd-87RT_Nj_.js","assets/onboarding-CJFUg80G.js","assets/OnboardingWizard-DE2nyJkH.js","assets/checkbox-C3sJmmOb.js","assets/_mailboxId-BRoS8Mwj.js","assets/MailboxPane-B7qGrdvh.js","assets/MailViewChrome-C8hjtsK2.js","assets/MessageToolbar-BUDWthZC.js","assets/MessageBody-D4k3ez4t.js","assets/undo-2-YQhybyJt.js","assets/DropdownMenu-DeSAAnwz.js","assets/download-DPsR-mx8.js","assets/EmptyState-nnSadc_r.js","assets/calendar-suggestion-CmlMj01X.js","assets/useCalendarSuggestions-asjHDP2Q.js","assets/agenda-time-TSGSlLRN.js","assets/plus-DEbDoPs_.js","assets/calendar-format-BwCpz-JZ.js","assets/calendar-failure-note-ue_eGWKG.js","assets/clock-BvslxjM5.js","assets/segmented-control-C-RwTZ8I.js","assets/shield-check-BEVo2ulB.js","assets/useFilters-zI-LLBh6.js","assets/folder-input-DiXjxyWE.js","assets/label-chip-DMq-zsvm.js","assets/LabelApplyTrigger-ez73tEPG.js","assets/NavMenuButton-Du6gwKpU.js","assets/bottom-sheet-6SRJicmu.js","assets/circle-question-mark-CcoXqBlZ.js","assets/circle-check-CIFCh3Pe.js","assets/search-mirror-BXJ0y1kD.js","assets/brief-xjy0DnZr.js","assets/brief-B2lB0FJy.js","assets/BriefPane-yrb4BVCw.js","assets/wizard-selection-zWa1qc6-.js","assets/flagged-BIfTM0zc.js","assets/flagged-BH8Kawij.js","assets/CollectionPane-CxujucTw.js","assets/outbox-D-d3HzZr.js","assets/OutboxPane-DPSNZUuT.js","assets/row-actions-DQQOtYGX.js","assets/rotate-ccw-nJVUfniy.js","assets/_slotId-F8i3-z-s.js","assets/settings-screen-DfxQ6K4C.js","assets/chevron-left-CPIlsz08.js","assets/accounts-BKuizqtY.js","assets/switch-DJaDWP2C.js","assets/help-copy-DZY11DWz.js","assets/advanced-DJpNc3kM.js","assets/external-link-BsGep1V-.js","assets/appearance-N8-8YrHT.js","assets/calendars-Zl5qFuho.js","assets/useCalendarScheduling-BNESC6Sx.js","assets/calendar-guests-BwFd8bsh.js","assets/calendar-event-popup-ShfopMbU.js","assets/copy-DhCC4a-G.js","assets/classification-B4oAmRL8.js","assets/ReportLink-zQuTfqJn.js","assets/filters-BdDuzTmL.js","assets/folders-DQc8V606.js","assets/labels-ra9ROlwe.js","assets/people-Dj45Sj6w.js","assets/senders-Bb7Q_eFp.js","assets/warnings-CyUEYIiz.js","assets/_view._date-BEWywi53.js","assets/useCalendarTasks-DvRUJS7T.js","assets/useCalendarData-DcKv8J39.js","assets/CalendarLoadFailed-MMfmxIOT.js","assets/CalendarQuickCreate-BhMEUw9n.js","assets/draft-DCLq6qco.js","assets/CalendarSession-B8ChEcvA.js","assets/_view-CtgngRpB.css","assets/index-cDwHPIf0.js","assets/index-BHkrM-Kn.js","assets/index-DdvMNVJS.js","assets/_labelId-DABFD4PZ.js","assets/index-BG0V0va3.js","assets/new-CcqLVf2J.js","assets/CalendarEventEditor-ByaBmUP7.js","assets/calendar-event-sidebar-73r7iWYB.js","assets/index-BTtnQ0o_.js","assets/_messageId-BTtnQ0o_.js","assets/compose._-_outboxMessageId_-B_bwVs79.js","assets/index-UxNdXfkW.js","assets/_messageId-UxNdXfkW.js","assets/compose._-_outboxMessageId_-HahCa7sA.js","assets/index-DU8baGSk.js","assets/_messageId-DxeGB2Ak.js","assets/compose._-_outboxMessageId_-BXrZc_aU.js","assets/index-C3cMdadO.js","assets/compose._-_outboxMessageId_-CZX2i0CY.js","assets/_outboxMessageId-buKygU4B.js","assets/index-BUGqdwU9.js","assets/CalendarEventPopup-NPO2QK5a.js","assets/edit-BRJX6z-q.js","assets/suggestion._suggestionId-B5pkmBKQ.js","assets/task._calendarTaskId-BDTL-x3M.js","assets/index-hxyTtlVC.js","assets/_messageId-C0UBmFqw.js","assets/compose._-_outboxMessageId_-BBirD1SC.js","assets/index-Cu349H81.js","assets/edit-C3-Hl_Ov.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
function s8(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 $p=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var T1={exports:{}},Sd={};var kP;function gG(){if(kP)return Sd;kP=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 u in o)u!=="key"&&(s[u]=o[u])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:s}}return Sd.Fragment=t,Sd.jsx=n,Sd.jsxs=n,Sd}var DP;function vG(){return DP||(DP=1,T1.exports=gG()),T1.exports}var O=vG();const yG="Logging",bG="x-amz-user-agent",SG="NoHubcallbackProvidedException";var Ar;(function(e){e.DEBUG="DEBUG",e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e.VERBOSE="VERBOSE",e.NONE="NONE"})(Ar||(Ar={}));const LP={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class Un{constructor(t,n=Ar.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;Un.LOG_LEVEL&&(r=Un.LOG_LEVEL),typeof window<"u"&&window.LOG_LEVEL&&(r=window.LOG_LEVEL);const o=LP[r];if(!(LP[t]>=o))return;let a=console.log.bind(console);t===Ar.ERROR&&console.error&&(a=console.error.bind(console)),t===Ar.WARN&&console.warn&&(a=console.warn.bind(console)),Un.BIND_ALL_LOG_LEVELS&&(t===Ar.INFO&&console.info&&(a=console.info.bind(console)),t===Ar.DEBUG&&console.debug&&(a=console.debug.bind(console)));const u=`[${t}] ${this._ts()} ${this.name}`;let c="";if(n.length===1&&typeof n[0]=="string")c=`${u} - ${n[0]}`,a(c);else if(n.length===1)c=`${u} ${n[0]}`,a(u,n[0]);else if(typeof n[0]=="string"){let f=n.slice(1);f.length===1&&(f=f[0]),c=`${u} - ${n[0]} ${f}`,a(`${u} - ${n[0]}`,f)}else c=`${u} ${n}`,a(u,n);for(const f of this._pluggables){const h={message:c,timestamp:Date.now()};f.pushLogs([h])}}log(...t){this._log(Ar.INFO,...t)}info(...t){this._log(Ar.INFO,...t)}warn(...t){this._log(Ar.WARN,...t)}error(...t){this._log(Ar.ERROR,...t)}debug(...t){this._log(Ar.DEBUG,...t)}verbose(...t){this._log(Ar.VERBOSE,...t)}addPluggable(t){t&&t.getCategoryName()===yG&&(this._pluggables.push(t),t.configure(this._config))}listPluggables(){return this._pluggables}}Un.LOG_LEVEL=null;Un.BIND_ALL_LOG_LEVELS=!1;class dr 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:u,requestId:c}=s;this.metadata={extendedRequestId:a,httpStatusCode:u,requestId:c}}this.constructor=dr,Object.setPrototypeOf(this,dr.prototype)}}var zi;(function(e){e.NoEndpointId="NoEndpointId",e.PlatformNotSupported="PlatformNotSupported",e.Unknown="Unknown",e.NetworkError="NetworkError"})(zi||(zi={}));const Dv=(e,t=dr)=>(n,r,o)=>{const{message:s,recoverySuggestion:a}=e[r];if(!n)throw new t({name:r,message:o?`${s} ${o}`:s,recoverySuggestion:a})},Fo=typeof Symbol<"u"?Symbol("amplify_default"):"@@amplify_default",wd=new Un("Hub");class i8{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){wd.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===Fo||wd.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){wd.error(a)}}listen(t,n,r="noname"){let o;if(typeof n!="function")throw new dr({name:SG,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=>{wd.debug(`Dispatching to ${n} with `,r);try{s.callback(t)}catch(a){wd.error(a)}})}}const zo=new i8("__default__"),xg=new i8("internal-hub"),DI=()=>{if(typeof window=="object"&&typeof window.crypto=="object")return window.crypto;if(typeof crypto=="object")return crypto;throw new dr({name:"MissingPolyfill",message:"Cannot resolve the `crypto` function from the environment."})},wG=()=>{if(typeof window<"u"&&typeof window.btoa=="function")return window.btoa;if(typeof btoa=="function")return btoa;throw new dr({name:"Base64EncoderError",message:"Cannot resolve the `btoa` function from the environment."})},CG=()=>{if(typeof window<"u"&&typeof window.atob=="function")return window.atob;if(typeof atob=="function")return atob;throw new dr({name:"Base64EncoderError",message:"Cannot resolve the `atob` function from the environment."})},LI={convert(e,t){let n=e;return t?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),CG()(n)}};var Lo;(function(e){e.AuthTokenConfigException="AuthTokenConfigException",e.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",e.AuthUserPoolException="AuthUserPoolException",e.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",e.OAuthNotConfigureException="OAuthNotConfigureException"})(Lo||(Lo={}));const EG={[Lo.AuthTokenConfigException]:{message:"Auth Token Provider not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app."},[Lo.AuthUserPoolAndIdentityPoolException]:{message:"Auth UserPool or IdentityPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."},[Lo.AuthUserPoolException]:{message:"Auth UserPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."},[Lo.InvalidIdentityPoolIdException]:{message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."},[Lo.OAuthNotConfigureException]:{message:"oauth param not configured.",recoverySuggestion:"Make sure to call Amplify.configure with oauth parameter in your app."}},UI=Dv(EG);function We(e){let t=!0;e?t=!!e.userPoolId&&!!e.userPoolClientId:t=!1,UI(t,Lo.AuthUserPoolException)}function Lv(e){const t=!!e?.loginWith?.oauth?.domain&&!!e?.loginWith?.oauth?.redirectSignOut&&!!e?.loginWith?.oauth?.redirectSignIn&&!!e?.loginWith?.oauth?.responseType;UI(t,Lo.OAuthNotConfigureException)}function Ym(e){const t=!!e?.identityPoolId;UI(t,Lo.InvalidIdentityPoolIdException)}function Ms(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(LI.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 a8=e=>{const t=Reflect.ownKeys(e);for(const n of t){const r=e[n];(r&&typeof r=="object"||typeof r=="function")&&a8(r)}return Object.freeze(e)},_G=new Un("parseAWSExports"),xG={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},IG=(e={})=>{if(!Object.prototype.hasOwnProperty.call(e,"aws_project_region"))throw new dr({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:u,aws_cognito_mfa_configuration:c,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:w,aws_mandatory_sign_in:S,aws_mobile_analytics_app_id:C,aws_mobile_analytics_app_region:E,aws_user_files_s3_bucket:I,aws_user_files_s3_bucket_region:A,aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing:T,aws_user_pools_id:N,aws_user_pools_web_client_id:M,geo:R,oauth:k,predictions:L,aws_cloud_logic_custom:q,Notifications:$,modelIntrospection:D}=e,j={};C&&(j.Analytics={Pinpoint:{appId:C,region:E}});const{InAppMessaging:Z,Push:he}=$??{};if(Z?.AWSPinpoint||he?.AWSPinpoint){if(Z?.AWSPinpoint){const{appId:oe,region:fe}=Z.AWSPinpoint;j.Notifications={InAppMessaging:{Pinpoint:{appId:oe,region:fe}}}}if(he?.AWSPinpoint){const{appId:oe,region:fe}=he.AWSPinpoint;j.Notifications={...j.Notifications,PushNotification:{Pinpoint:{appId:oe,region:fe}}}}}if(Array.isArray(s)&&(j.Interactions={LexV1:Object.fromEntries(s.map(oe=>[oe.name,oe]))}),r){const oe=xG[n];oe||_G.debug(`Invalid authentication type ${n}. Falling back to IAM.`),j.API={GraphQL:{endpoint:r,apiKey:t,region:o,defaultAuthMode:oe??"iam"}},D&&(j.API.GraphQL.modelIntrospection=D)}const B=c?{status:c&&c.toLowerCase(),totpEnabled:f?.includes("TOTP")??!1,smsEnabled:f?.includes("SMS")??!1}:void 0,Q=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,ue=Array.from(new Set([...m??[],...g??[]])).reduce((oe,fe)=>({...oe,[fe.toLowerCase()]:{required:!0}}),{}),Ce=w?.includes("EMAIL")??!1,U=w?.includes("PHONE_NUMBER")??!1;(a||N)&&(j.Auth={Cognito:{identityPoolId:a,allowGuestAccess:S!=="enable",signUpVerificationMethod:u,userAttributes:ue,userPoolClientId:M,userPoolId:N,mfa:B,passwordFormat:Q,loginWith:{username:!(Ce||U),email:Ce,phone:U}}});const X=k?Object.keys(k).length>0:!1,ie=v?v.length>0:!1;if(j.Auth&&X&&(j.Auth.Cognito.loginWith={...j.Auth.Cognito.loginWith,oauth:{...AG(k),...ie&&{providers:RG(v)}}}),I&&(j.Storage={S3:{bucket:I,region:A,dangerouslyConnectToHttpEndpointForTesting:T}}),R){const{amazon_location_service:oe}=R;j.Geo={LocationService:{maps:oe.maps,geofenceCollections:oe.geofenceCollections,searchIndices:oe.search_indices,region:oe.region}}}if(q&&(j.API={...j.API,REST:q.reduce((oe,fe)=>{const{name:Me,endpoint:Ae,region:se,service:we}=fe;return{...oe,[Me]:{endpoint:Ae,...we?{service:we}:void 0,...se?{region:se}:void 0}}},{})}),L){const{VoiceId:oe}=L?.convert?.speechGenerator?.defaults??{};j.Predictions=oe?{...L,convert:{...L.convert,speechGenerator:{...L.convert.speechGenerator,defaults:{voiceId:oe}}}}:L}return j},UP=e=>e?.split(",")??[],AG=({domain:e,scope:t,redirectSignIn:n,redirectSignOut:r,responseType:o})=>({domain:e,scopes:t,redirectSignIn:UP(n),redirectSignOut:UP(r),responseType:o}),RG=e=>e.map(t=>{const n=t.toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}),l8=Symbol("oauth-listener"),Dn=[];for(let e=0;e<256;++e)Dn.push((e+256).toString(16).slice(1));function TG(e,t=0){return(Dn[e[t+0]]+Dn[e[t+1]]+Dn[e[t+2]]+Dn[e[t+3]]+"-"+Dn[e[t+4]]+Dn[e[t+5]]+"-"+Dn[e[t+6]]+Dn[e[t+7]]+"-"+Dn[e[t+8]]+Dn[e[t+9]]+"-"+Dn[e[t+10]]+Dn[e[t+11]]+Dn[e[t+12]]+Dn[e[t+13]]+Dn[e[t+14]]+Dn[e[t+15]]).toLowerCase()}let O1;const OG=new Uint8Array(16);function MG(){if(!O1){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");O1=crypto.getRandomValues.bind(crypto)}return O1(OG)}const PG=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$P={randomUUID:PG};function NG(e,t,n){e=e||{};const r=e.random??e.rng?.()??MG();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 TG(r)}function Nu(e,t,n){return $P.randomUUID&&!t&&!e?$P.randomUUID():NG(e,t,n)}function kG(e){const{version:t}=e;return t?t.startsWith("1"):!1}function DG(e){if(!e)return;const{bucket_name:t,aws_region:n,buckets:r}=e;return{S3:{bucket:t,region:n,buckets:r&&WG(r)}}}function LG(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:u,oauth:c,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:VG(s),smsEnabled:a?.includes("SMS"),totpEnabled:a?.includes("TOTP")}),u&&(v.Cognito.allowGuestAccess=u),c&&(v.Cognito.loginWith={oauth:{domain:c.domain,redirectSignIn:c.redirect_sign_in_uri,redirectSignOut:c.redirect_sign_out_uri,responseType:c.response_type==="token"?"token":"code",scopes:c.scopes,providers:qG(c.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((w,S)=>({...w,[S]:{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 UG(e){if(!e?.amazon_pinpoint)return;const{amazon_pinpoint:t}=e;return{Pinpoint:{appId:t.app_id,region:t.aws_region}}}function $G(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 FG(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:u8(n),region:t,apiKey:o,modelIntrospection:s}}}function zG(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:u8(o),region:n,apiKey:r}}}function jG(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 BG(e){const t={};if(e.storage&&(t.Storage=DG(e.storage)),e.auth&&(t.Auth=LG(e.auth)),e.analytics&&(t.Analytics=UG(e.analytics)),e.geo&&(t.Geo=$G(e.geo)),e.data&&(t.API=FG(e.data)),e.custom){const n=zG(e.custom);n&&"Events"in n&&(t.API={...t.API,...n})}return e.notifications&&(t.Notifications=jG(e.notifications)),t}const HG={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"};function u8(e){return HG[e]}const FP={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"};function qG(e=[]){return e.reduce((t,n)=>(FP[n]!==void 0&&t.push(FP[n]),t),[])}function VG(e){return e==="OPTIONAL"?"optional":e==="REQUIRED"?"on":"off"}function WG(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((u,[c,f])=>(f!==void 0&&(u[c]=f),u),{}):void 0;t[n]={bucketName:r,region:o,paths:a}}),t}const c8=e=>Object.keys(e).some(t=>t.startsWith("aws_"))?IG(e):kG(e)?BG(e):e;var zP=function(){return zP=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},zP.apply(this,arguments)};function _6e(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 GG(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 u(h){try{f(r.next(h))}catch(m){a(m)}}function c(h){try{f(r.throw(h))}catch(m){a(m)}}function f(h){h.done?s(h.value):o(h.value).then(u,c)}f((r=r.apply(e,t||[])).next())})}function KG(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=u(0),a.throw=u(1),a.return=u(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(f){return function(h){return c([f,h])}}function c(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 x6e(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 Gr=64,ZG=32,YG=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]),QG=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],XG=Math.pow(2,53)-1,Qm=(function(){function e(){this.state=Int32Array.from(QG),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>XG)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=t[n++],r--,this.bufferLength===Gr&&(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%Gr>=Gr-8){for(var o=this.bufferLength;o<Gr;o++)n.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(var o=this.bufferLength;o<Gr-8;o++)n.setUint8(o,0);n.setUint32(Gr-8,Math.floor(t/4294967296),!0),n.setUint32(Gr-4,t),this.hashBuffer(),this.finished=!0}for(var s=new Uint8Array(ZG),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],u=r[3],c=r[4],f=r[5],h=r[6],m=r[7],g=0;g<Gr;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],w=(v>>>17|v<<15)^(v>>>19|v<<13)^v>>>10;v=this.temp[g-15];var S=(v>>>7|v<<25)^(v>>>18|v<<14)^v>>>3;this.temp[g]=(w+this.temp[g-7]|0)+(S+this.temp[g-16]|0)}var C=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&f^~c&h)|0)+(m+(YG[g]+this.temp[g]|0)|0)|0,E=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&s^o&a^s&a)|0;m=h,h=f,f=c,c=u+C|0,u=a,a=s,s=o,o=C+E|0}r[0]+=o,r[1]+=s,r[2]+=a,r[3]+=u,r[4]+=c,r[5]+=f,r[6]+=h,r[7]+=m},e})();const JG=e=>new TextEncoder().encode(e);var eK=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:JG;function d8(e){return e instanceof Uint8Array?e:typeof e=="string"?eK(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function tK(e){return typeof e=="string"?e.length===0:e.byteLength===0}var Wa=(function(){function e(t){this.secret=t,this.hash=new Qm,this.reset()}return e.prototype.update=function(t){if(!(tK(t)||this.error))try{this.hash.update(d8(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 GG(this,void 0,void 0,function(){return KG(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Qm,this.secret){this.outer=new Qm;var t=nK(this.secret),n=new Uint8Array(Gr);n.set(t);for(var r=0;r<Gr;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 nK(e){var t=d8(e);if(t.byteLength>Gr){var n=new Qm;n.update(t),t=n.digest()}var r=new Uint8Array(Gr);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 un;(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"})(un||(un={}));var eo;(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"})(eo||(eo={}));var ws;(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"})(ws||(ws={}));var jP;(function(e){e.Record="1",e.IdentifyUser="2"})(jP||(jP={}));var BP;(function(e){e.GraphQl="1",e.Get="2",e.Post="3",e.Put="4",e.Patch="5",e.Del="6",e.Head="7"})(BP||(BP={}));var $e;(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"})($e||($e={}));var HP;(function(e){e.Subscribe="1",e.GraphQl="2"})(HP||(HP={}));var rf;(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"})(rf||(rf={}));var C_;(function(e){e.SyncMessages="1",e.IdentifyUser="2",e.NotifyMessageInteraction="3"})(C_||(C_={}));var qP;(function(e){e.None="0"})(qP||(qP={}));var VP;(function(e){e.Convert="1",e.Identify="2",e.Interpret="3"})(VP||(VP={}));var WP;(function(e){e.Subscribe="1"})(WP||(WP={}));var GP;(function(e){e.InitializePushNotifications="1",e.IdentifyUser="2"})(GP||(GP={}));var ho;(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"})(ho||(ho={}));const rK="6.18.0",Uv=()=>typeof global<"u",uc=()=>typeof window<"u",f8=()=>typeof document<"u",$I=()=>typeof process<"u",bf=(e,t)=>!!Object.keys(e).find(n=>n.startsWith(t));var KP={};function oK(){const e=r=>r.startsWith("_react")||r.startsWith("__react"),t=r=>Object.keys(r).find(e),n=()=>Array.from(document.querySelectorAll("[id]"));return f8()&&n().some(t)}function sK(){return $I()&&typeof KP<"u"&&!!Object.keys(KP).find(e=>e.includes("react"))}function iK(){return uc()&&bf(window,"__VUE")}function aK(){return Uv()&&bf(global,"__VUE")}var ZP={};function lK(){return uc()&&bf(window,"__SVELTE")}function uK(){return $I()&&typeof ZP<"u"&&!!Object.keys(ZP).find(e=>e.includes("svelte"))}function cK(){return uc()&&window.next&&typeof window.next=="object"}function dK(){return Uv()&&(bf(global,"__next")||bf(global,"__NEXT"))}function fK(){return uc()&&(window.__NUXT__!==void 0||window.$nuxt!==void 0)}function hK(){return Uv()&&typeof global.__NUXT_PATHS__<"u"}var YP={};function pK(){const e=!!(f8()&&document.querySelector("[ng-version]")),t=!!(uc()&&typeof window.ng<"u");return e||t}function mK(){return $I()&&typeof YP=="object"&&YP.npm_lifecycle_script?.startsWith("ng ")||!1}function gK(){return typeof navigator<"u"&&typeof navigator.product<"u"&&navigator.product==="ReactNative"}function vK(){return Uv()&&typeof global.expo<"u"}function yK(){return uc()}const bK=[{platform:un.Expo,detectionMethod:vK},{platform:un.ReactNative,detectionMethod:gK},{platform:un.NextJs,detectionMethod:cK},{platform:un.Nuxt,detectionMethod:fK},{platform:un.Angular,detectionMethod:pK},{platform:un.React,detectionMethod:oK},{platform:un.VueJs,detectionMethod:iK},{platform:un.Svelte,detectionMethod:lK},{platform:un.WebUnknown,detectionMethod:yK},{platform:un.NextJsSSR,detectionMethod:dK},{platform:un.NuxtSSR,detectionMethod:hK},{platform:un.ReactSSR,detectionMethod:sK},{platform:un.VueJsSSR,detectionMethod:aK},{platform:un.AngularSSR,detectionMethod:mK},{platform:un.SvelteSSR,detectionMethod:uK}];function SK(){return bK.find(e=>e.detectionMethod())?.platform||un.ServerSideUnknown}let of;const M1=[];let E_=!1;const wK=10,CK=10,EK=1e3,h8=()=>{if(!of){if(of=SK(),E_)for(;M1.length;)M1.pop()?.();else M1.forEach(e=>{e()});QP(un.ServerSideUnknown,wK),QP(un.WebUnknown,CK)}return of};function _K(){of=void 0}function QP(e,t){of===e&&!E_&&setTimeout(()=>{_K(),E_=!0,setTimeout(h8,EK)},t)}const Ei={},ms=e=>{Ei[e.category]=e.apis.reduce((r,o)=>({...r,[o]:{refCount:r[o]?.refCount?r[o].refCount+1:1,additionalDetails:e.additionalDetails}}),Ei[e.category]??{});let t=!1;return()=>{t||(t=!0,e.apis.forEach(r=>{const o=Ei[e.category][r].refCount;o>1?Ei[e.category][r].refCount=o-1:(delete Ei[e.category][r],Object.keys(Ei[e.category]).length||delete Ei[e.category])}))}},xK=(e,t)=>Ei[e]?.[t]?.additionalDetails,IK="aws-amplify",AK=e=>e.replace(/\+.*/,""),RK=({category:e,action:t}={})=>{const n=[[IK,AK(rK)]];if(e&&n.push([e,t]),n.push(["framework",h8()]),e&&t){const r=xK(e,t);r&&r.forEach(o=>{n.push(o)})}return n},$v=e=>RK(e).map(([r,o])=>r&&o?`${r}/${o}`:r).join(" "),Fv=()=>typeof window<"u"&&typeof window.document<"u",XP=new Un("Auth");class TK{configure(t,n){this.authConfig=t,this.authOptions=n,t&&t.Cognito?.userPoolEndpoint&&XP.warn(JP("Amazon Cognito User Pool")),t&&t.Cognito?.identityPoolEndpoint&&XP.warn(JP("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 JP=e=>`You are using a custom Amazon ${e} endpoint, ensure the endpoint is correct.`;class OK{constructor(){this.oAuthListener=void 0,this.isConfigured=!1,this.resourcesConfig={},this.libraryOptions={},this.Auth=new TK}configure(t,n){const r=c8(t);this.resourcesConfig=r,n&&(this.libraryOptions=n),this.resourcesConfig=a8(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."),zo.dispatch("core",{event:"configure",data:this.resourcesConfig},"Configure",Fo),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}[l8](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 Tt=new OK,p8=(e,t)=>e.Auth.fetchAuthSession(t),zv=e=>p8(Tt,e);function m8(){return Tt.Auth.clearCredentials()}const jv=e=>{const{headers:t,statusCode:n}=e;return{...MK(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"]}},MK=e=>typeof e?.$metadata=="object",cc=async e=>{if(!e||e.statusCode<300)return;const t=await Jf(e),r=(a=>{const[u]=a.toString().split(/[,:]+/);return u.includes("#")?u.split("#")[1]:u})(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:jv(e)})},Jf=async e=>{if(!e.body)throw new Error("Missing response payload");const t=await e.body.json();return Object.assign(t,{$metadata:jv(e)})},hn=(e,t,n,r)=>async(o,s)=>{const a={...r,...o},u=await a.endpointResolver(a,s),c=await t(s,u),f=await e(c,{...a});return n(f)},PK=300*1e3;function NK(e=PK){return r=>{const o=2**r*100+100*Math.random();return o>e?!1:o}}const g8=3,eN="amz-sdk-invocation-id",kK="amz-sdk-request",tN=300*1e3,v8=e=>{const n=NK(tN)(e);return n===!1?tN:n},DK=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],LK=e=>!!e&&DK.includes(e),y8=e=>async(t,n)=>{const r=n??await e(t)??void 0,o=r?.code||r?.name,s=t?.statusCode;return{retryable:zK(n)||FK(s,o)||LK(o)||jK(s,o)}},UK=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],$K=["TimeoutError","RequestTimeout","RequestTimeoutException"],FK=(e,t)=>e===429||!!t&&UK.includes(t),zK=e=>[zi.NetworkError,"ERR_NETWORK"].includes(e?.name),jK=(e,t)=>!!e&&[500,502,503,504].includes(e)||!!t&&$K.includes(t),b8="cognito-identity",S8={service:b8,retryDecider:y8(cc),computeDelay:v8,cache:"no-store"},BK=({maxAttempts:e=g8,retryDecider:t,computeDelay:n,abortSignal:r})=>{if(e<1)throw new Error("maxAttempts must be greater than 0");return(o,s)=>async function(u){let c,f=s.attemptsCount??0,h;const m=()=>{if(h)return nN(h,f),h;throw nN(c,f),c};for(;!r?.aborted&&f<e;){try{h=await o(u),c=void 0}catch(w){c=w,h=void 0}f=(s.attemptsCount??0)>f?s.attemptsCount??0:f+1,s.attemptsCount=f;const{isCredentialsExpiredError:g,retryable:v}=await t(h,c,s);if(v){if(s.isCredentialsExpired=!!g,!r?.aborted&&f<e){const w=n(f);await HK(w,r)}continue}else return m()}if(r?.aborted)throw new Error("Request aborted.");return m()}},HK=(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},nN=(e,t)=>{Object.prototype.toString.call(e)==="[object Object]"&&(e.$metadata={...e.$metadata??{},attempts:t})},qK=Nu,VK=()=>e=>async function(n){return n.headers[eN]||(n.headers[eN]=qK()),e(n)},WK=({maxAttempts:e=g8})=>(t,n)=>async function(o){const s=n.attemptsCount??0;return o.headers[kK]=`attempt=${s+1}; max=${e}`,t(o)},GK=({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)}},FI=(e,t)=>(n,r)=>{const o={};let s=a=>e(a,r);for(let a=t.length-1;a>=0;a--){const u=t[a];s=u(r)(s,o)}return s(n)},P1=e=>{let t;return()=>(t||(t=e()),t)},KK=e=>!["HEAD","GET"].includes(e.toUpperCase()),ZK=async({url:e,method:t,headers:n,body:r},{abortSignal:o,cache:s,withCrossDomainCredentials:a})=>{let u;try{u=await fetch(e,{method:t,headers:n,body:KK(t)?r:void 0,signal:o,cache:s,credentials:a?"include":"same-origin"})}catch(m){throw m instanceof TypeError?new dr({name:zi.NetworkError,message:"A network error has occurred.",underlyingError:m}):m}const c={};u.headers?.forEach((m,g)=>{c[g.toLowerCase()]=m});const f={statusCode:u.status,headers:c,body:null},h=Object.assign(u.body??{},{text:P1(()=>u.text()),blob:P1(()=>u.blob()),json:P1(()=>u.json())});return{...f,body:h}},w8=FI(ZK,[GK,VK,BK,WK]),YK=()=>e=>async function(n){return n.headers["cache-control"]="no-store",e(n)},C8=FI(w8,[YK]),E8=e=>(t,n)=>{const r=QK(e),o=JSON.stringify(t);return XK(n,r,o)},QK=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}),XK=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"}),rN=e=>hn(C8,E8("GetCredentialsForIdentity"),JK,{...S8,...e,userAgentValue:$v()}),JK=async e=>{if(e.statusCode>=300)throw await cc(e);const t=await Jf(e);return{IdentityId:t.IdentityId,Credentials:eZ(t.Credentials),$metadata:jv(e)}},eZ=({Expiration:e,...t}={})=>({...t,Expiration:e&&new Date(e*1e3)}),tZ=e=>hn(C8,E8("GetId"),nZ,{...S8,...e,userAgentValue:$v()}),nZ=async e=>{if(e.statusCode>=300)throw await cc(e);return{IdentityId:(await Jf(e)).IdentityId,$metadata:jv(e)}},_8={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},rZ={partitions:[_8,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},x8=e=>{const{partitions:t}=rZ;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 _8.outputs.dnsSuffix},Qi=URL,oZ=({region:e})=>({url:new Qi(`https://${b8}.${e}.${x8(e)}`)});class qd extends dr{constructor(){super({name:zi.PlatformNotSupported,message:"Function not supported on current platform"})}}class I8{constructor(t){this.storage=t}async setItem(t,n){if(!this.storage)throw new qd;this.storage.setItem(t,n)}async getItem(t){if(!this.storage)throw new qd;return this.storage.getItem(t)}async removeItem(t){if(!this.storage)throw new qd;this.storage.removeItem(t)}async clear(){if(!this.storage)throw new qd;this.storage.clear()}}class A8{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 R8=new Un("CoreStorageUtils"),sZ=()=>{try{if(typeof window<"u"&&window.localStorage)return window.localStorage}catch{R8.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new A8},T8=()=>{try{if(typeof window<"u"&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw new Error("sessionStorage is not defined")}catch{return R8.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new A8}};class iZ extends I8{constructor(){super(sZ())}}class aZ extends I8{constructor(){super(T8())}}class lZ{constructor(t){this._storage=t}get storage(){if(!this._storage)throw new qd;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 uZ extends lZ{constructor(){super(T8())}}function Fp(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 cZ={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 __(e,t){function n(o,s,a){if(!(typeof document>"u")){a=Fp({},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 u="";for(var c in a)a[c]&&(u+="; "+c,a[c]!==!0&&(u+="="+a[c].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+u}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],a={},u=0;u<s.length;u++){var c=s[u].split("="),f=c.slice(1).join("=");try{var h=decodeURIComponent(c[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,"",Fp({},s,{expires:-1}))},withAttributes:function(o){return __(this.converter,Fp({},this.attributes,o))},withConverter:function(o){return __(Fp({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var zp=__(cZ,{path:"/"});class dZ{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){zp.set(t,n,this.getData())}async getItem(t){return zp.get(t)??null}async removeItem(t){zp.remove(t,this.getData())}async clear(){const t=zp.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 eh=new iZ;new aZ;const xs=new uZ,fZ=new Un("I18n");let hZ=class{constructor(){this._options=null,this._lang=null,this._dict={}}setDefaultLanguage(){!this._lang&&typeof window<"u"&&window&&window.navigator&&(this._lang=window.navigator.language),fZ.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 Aa;(function(e){e.NotConfigured="NotConfigured"})(Aa||(Aa={}));const pZ={[Aa.NotConfigured]:{message:"i18n is not configured."}},jp=Dv(pZ),oN=new Un("I18n");let Bp={language:null},lo=null,O8=class xa{static configure(t){return oN.debug("configure I18n"),t&&(Bp=Object.assign({},Bp,t.I18n||t),xa.createInstance()),Bp}static getModuleName(){return"I18n"}static createInstance(){oN.debug("create I18n instance"),!lo&&(lo=new hZ)}static setLanguage(t){xa.checkConfig(),jp(!!lo,Aa.NotConfigured),lo.setLanguage(t)}static get(t,n){return xa.checkConfig(),jp(!!lo,Aa.NotConfigured),lo.get(t,n)}static putVocabulariesForLanguage(t,n){xa.checkConfig(),jp(!!lo,Aa.NotConfigured),lo.putVocabulariesForLanguage(t,n)}static putVocabularies(t){xa.checkConfig(),jp(!!lo,Aa.NotConfigured),lo.putVocabularies(t)}static checkConfig(){return lo||xa.createInstance(),!0}};O8.createInstance();const mZ=e=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=new Uint8Array(e);DI().getRandomValues(r);for(const o of r)n.push(t[o%t.length]);return n.join("")};function gZ(e){return(e.match(/.{2}/g)||[]).map(n=>String.fromCharCode(parseInt(n,16))).join("")}function vZ(e){return e.split("").map(t=>t.charCodeAt(0).toString(16).padStart(2,"0")).join("")}const yZ=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 sN({expiresAt:e,clockDrift:t,tolerance:n=5e3}){return Date.now()+t+n>e}const bZ=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(c=>`${c.brand}/${c.version}`).join(";");return[t,n,o,r,t,a].filter(c=>c).join(" ")||navigator.userAgent};function SZ(e){return Array.from(e,t=>String.fromCodePoint(t)).join("")}const zu={convert(e,t={urlSafe:!1,skipPadding:!1}){const n=typeof e=="string"?e:SZ(e);let r=wG()(n);return t.urlSafe&&(r=r.replace(/\+/g,"-").replace(/\//g,"_")),t.skipPadding&&(r=r.replace(/=/g,"")),r}};function wZ(){return DI().getRandomValues(new Uint32Array(1))[0]}function CZ(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 zI{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(wZ());return new zI(n,t)}toString(){return CZ(this)}}var Ue;(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"})(Ue||(Ue={}));const M8={[Ue.EmptyChallengeResponse]:{message:"challengeResponse is required to confirmSignIn"},[Ue.EmptyConfirmResetPasswordUsername]:{message:"username is required to confirmResetPassword"},[Ue.EmptyConfirmSignUpCode]:{message:"code is required to confirmSignUp"},[Ue.EmptyConfirmSignUpUsername]:{message:"username is required to confirmSignUp"},[Ue.EmptyConfirmResetPasswordConfirmationCode]:{message:"confirmationCode is required to confirmResetPassword"},[Ue.EmptyConfirmResetPasswordNewPassword]:{message:"newPassword is required to confirmResetPassword"},[Ue.EmptyResendSignUpCodeUsername]:{message:"username is required to confirmSignUp"},[Ue.EmptyResetPasswordUsername]:{message:"username is required to resetPassword"},[Ue.EmptySignInPassword]:{message:"password is required to signIn"},[Ue.EmptySignInUsername]:{message:"username is required to signIn"},[Ue.EmptySignUpPassword]:{message:"password is required to signUp"},[Ue.EmptySignUpUsername]:{message:"username is required to signUp"},[Ue.CustomAuthSignInPassword]:{message:"A password is not needed when signing in with CUSTOM_WITHOUT_SRP",recoverySuggestion:"Do not include a password in your signIn call."},[Ue.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"},[Ue.EmptyVerifyTOTPSetupCode]:{message:"code is required to verifyTotpSetup"},[Ue.EmptyUpdatePassword]:{message:"oldPassword and newPassword are required to changePassword"},[Ue.EmptyConfirmUserAttributeCode]:{message:"confirmation code is required to confirmUserAttribute"},[Ue.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 _n;(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"})(_n||(_n={}));var jo;(function(e){e.SignInException="SignInException",e.OAuthSignInError="OAuthSignInException"})(jo||(jo={}));class Oe extends dr{constructor(t){super(t),this.constructor=Oe,Object.setPrototypeOf(this,Oe.prototype)}}function Kt(e,t){const{message:n,recoverySuggestion:r}=M8[t];if(!e)throw new Oe({name:t,message:n,recoverySuggestion:r})}function nt(e){const t=e?.split("_")[0];if(!e||e.indexOf("_")<0||!t||typeof t!="string")throw new Oe({name:"InvalidUserPoolId",message:"Invalid user pool id provided."});return t}function x_(e){if(!e||!e.includes(":"))throw new Oe({name:"InvalidIdentityPoolIdException",message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."});return e.split(":")[0]}function iN(e){return Object.entries(e).map(([t,n])=>({Name:t,Value:n}))}function EZ(e){const t={};return e?.forEach(n=>{n.Name&&(t[n.Name]=n.Value)}),t}var aN;(function(e){e.ConcurrentModificationException="ConcurrentModificationException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"})(aN||(aN={}));var lN;(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"})(lN||(lN={}));var uN;(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"})(uN||(uN={}));var cN;(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"})(cN||(cN={}));var dN;(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"})(dN||(dN={}));var fN;(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"})(fN||(fN={}));var hN;(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"})(hN||(hN={}));var pN;(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"})(pN||(pN={}));var mN;(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"})(mN||(mN={}));var gN;(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"})(gN||(gN={}));var vN;(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"})(vN||(vN={}));var yN;(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"})(yN||(yN={}));var bN;(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"})(bN||(bN={}));var SN;(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"})(SN||(SN={}));var Ig;(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"})(Ig||(Ig={}));var wN;(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"})(wN||(wN={}));var CN;(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"})(CN||(CN={}));var EN;(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"})(EN||(EN={}));var I_;(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"})(I_||(I_={}));var _N;(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"})(_N||(_N={}));var xN;(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"})(xN||(xN={}));var IN;(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"})(IN||(IN={}));var AN;(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"})(AN||(AN={}));var RN;(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"})(RN||(RN={}));const Bv="UserUnAuthenticatedException",_Z="UserAlreadyAuthenticatedException",xZ="DeviceMetadataNotFoundException",P8="AutoSignInException",IZ="InvalidRedirectException",AZ="InvalidAppSchemeException",RZ="InvalidPreferredRedirectUrlException",TZ=new Oe({name:IZ,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 Oe({name:AZ,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 Oe({name:RZ,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 OZ="InvalidOriginException",MZ=new Oe({name:OZ,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."}),PZ="OAuthSignOutException",NZ="TokenRefreshException",kZ="UnexpectedSignInInterruptionException";function dc(e){if(!e||!e.accessToken)throw new Oe({name:Bv,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}function DZ(e){if(!e||!e.idToken)throw new Oe({name:Bv,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}const LZ=new Oe({name:NZ,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' }`}),UZ=new Oe({name:Bv,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function N8(e){if(zZ(e))throw LZ;if(!FZ(e))throw UZ}function k8(e){if(!e||!e.deviceKey||!e.deviceGroupKey||!e.randomPassword)throw new Oe({name:xZ,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 $Z={inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"};function D8(e){return e?.accessToken||e?.idToken}function FZ(e){return D8(e)&&e?.refreshToken}function zZ(e){return D8(e)&&!e?.refreshToken}const jZ=async e=>{const t=e.getConfig().Auth?.Cognito;We(t);const n=await e.Auth.getTokens({forceRefresh:!1});dc(n);const{"cognito:username":r,sub:o}=n.idToken?.payload??{},s={username:r,userId:o},a=BZ(n);return a&&(s.signInDetails=a),s};function BZ(e){return e?.signInDetails}const Hv=async()=>jZ(Tt),vt=(e,t)=>$v({category:eo.Auth,action:e,...t}),xn=e=>(t,n)=>{const r=HZ(e),o=JSON.stringify(t);return qZ(n,r,o)},HZ=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${e}`}),qZ=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"});function to(e){if(!e||e.name==="Error"||e instanceof TypeError)throw new Oe({name:zi.Unknown,message:"An unknown error has occurred.",underlyingError:e})}const $n=()=>async e=>{if(e.statusCode>=300){const t=await cc(e);throw to(t),new Oe({name:t.name,message:t.message,metadata:t.$metadata})}return Jf(e)},VZ=()=>(e,t)=>async function(r){return r.headers={...r.headers,"cache-control":"no-store",...await Tt.libraryOptions?.Auth?.headers?.()},e(r)},In=FI(w8,[VZ]),L8="cognito-idp",An={service:L8,retryDecider:y8(cc),computeDelay:v8,get userAgentValue(){return $v()},cache:"no-store"},th=e=>hn(In,xn("InitiateAuth"),$n(),{...An,...e}),Or=e=>hn(In,xn("RespondToAuthChallenge"),$n(),{...An,...e}),WZ=e=>hn(In,xn("VerifySoftwareToken"),$n(),{...An,...e}),GZ=e=>hn(In,xn("AssociateSoftwareToken"),$n(),{...An,...e}),KZ=({region:e})=>({url:new Qi(`https://${L8}.${e}.${x8(e)}`)}),rt=({endpointOverride:e})=>t=>e?{url:new Qi(e)}:KZ(t),ZZ=e=>hn(In,xn("GetTokensFromRefreshToken"),$n(),{...An,...e}),YZ=async({tokens:e,authConfig:t,username:n,clientMetadata:r})=>{We(t?.Cognito);const{userPoolId:o,userPoolClientId:s,userPoolEndpoint:a}=t.Cognito,u=nt(o);N8(e);const c=ZZ({endpointResolver:rt({endpointOverride:a})}),{AuthenticationResult:f}=await c({region:u},{ClientId:s,RefreshToken:e.refreshToken,DeviceKey:e.deviceMetadata?.deviceKey,ClientMetadata:r}),h=Ms(f?.AccessToken??""),m=f?.IdToken?Ms(f.IdToken):void 0,{iat:g}=h.payload;if(!g)throw new Oe({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}},QZ=yZ(YZ),XZ={accessToken:"accessToken",idToken:"idToken",oidcProvider:"oidcProvider",clockDrift:"clockDrift",refreshToken:"refreshToken",deviceKey:"deviceKey",randomPasswordKey:"randomPasswordKey",deviceGroupKey:"deviceGroupKey",signInDetails:"signInDetails",oauthMetadata:"oauthMetadata"};var Ag;(function(e){e.InvalidAuthTokens="InvalidAuthTokens"})(Ag||(Ag={}));const JZ={[Ag.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},eY=Dv(JZ),TN="CognitoIdentityServiceProvider";class tY{getKeyValueStorage(){if(!this.keyValueStorage)throw new Oe({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 Oe({name:"NoSessionFoundException",message:"Auth session was not found. Make sure to call signIn."});const r=Ms(n),o=await this.getKeyValueStorage().getItem(t.idToken),s=o?Ms(o):void 0,a=await this.getKeyValueStorage().getItem(t.refreshToken)??void 0,u=await this.getKeyValueStorage().getItem(t.clockDrift)??"0",c=Number.parseInt(u),f=await this.getKeyValueStorage().getItem(t.signInDetails),h={accessToken:r,idToken:s,refreshToken:a,deviceMetadata:await this.getDeviceMetadata()??void 0,clockDrift:c,username:await this.getLastAuthUser()};return f&&(h.signInDetails=JSON.parse(f)),h}catch{return null}}async storeTokens(t){eY(t!==void 0,Ag.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){We(this.authConfig?.Cognito);const n=t??await this.getLastAuthUser();return nY(TN,`${this.authConfig.Cognito.userPoolClientId}.${n}`)}getLastAuthUserKey(){We(this.authConfig?.Cognito);const t=this.authConfig.Cognito.userPoolClientId;return`${TN}.${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 nY=(e,t)=>jI(XZ)(`${e}`,t);function jI(e){const t=Object.values({...e});return(n,r)=>t.reduce((o,s)=>({...o,[s]:`${n}.${r}.${s}`}),{})}const ON="amplify-signin-with-hostedUI",To="CognitoIdentityServiceProvider";class U8{constructor(t){this.keyValueStorage=t}async clearOAuthInflightData(){We(this.cognitoConfig);const t=Oo(To,this.cognitoConfig.userPoolClientId);await Promise.all([this.keyValueStorage.removeItem(t.inflightOAuth),this.keyValueStorage.removeItem(t.oauthPKCE),this.keyValueStorage.removeItem(t.oauthState)])}async clearOAuthData(){We(this.cognitoConfig);const t=Oo(To,this.cognitoConfig.userPoolClientId);return await this.clearOAuthInflightData(),await this.keyValueStorage.removeItem(ON),this.keyValueStorage.removeItem(t.oauthSignIn)}loadOAuthState(){We(this.cognitoConfig);const t=Oo(To,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(t.oauthState)}storeOAuthState(t){We(this.cognitoConfig);const n=Oo(To,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthState,t)}loadPKCE(){We(this.cognitoConfig);const t=Oo(To,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(t.oauthPKCE)}storePKCE(t){We(this.cognitoConfig);const n=Oo(To,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthPKCE,t)}setAuthConfig(t){this.cognitoConfig=t}async loadOAuthInFlight(){We(this.cognitoConfig);const t=Oo(To,this.cognitoConfig.userPoolClientId);return await this.keyValueStorage.getItem(t.inflightOAuth)==="true"}async storeOAuthInFlight(t){We(this.cognitoConfig);const n=Oo(To,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(n.inflightOAuth,`${t}`)}async loadOAuthSignIn(){We(this.cognitoConfig);const t=Oo(To,this.cognitoConfig.userPoolClientId),n=await this.keyValueStorage.getItem(ON),[r,o]=(await this.keyValueStorage.getItem(t.oauthSignIn))?.split(",")??[];return{isOAuthSignIn:r==="true"||n==="true",preferPrivateSession:o==="true"}}async storeOAuthSignIn(t,n=!1){We(this.cognitoConfig);const r=Oo(To,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(r.oauthSignIn,`${t},${n}`)}}const Oo=(e,t)=>jI($Z)(e,t),ar=new U8(eh),A_=[],rY=e=>{A_.push(e)},$8=()=>{for(;A_.length;)A_.pop()?.()};class oY{constructor(){this.waitForInflightOAuth=Fv()?async()=>{if(await ar.loadOAuthInFlight())return this.inflightPromise?this.inflightPromise:(this.inflightPromise=new Promise((t,n)=>{rY(t)}),this.inflightPromise)}:async()=>{}}setAuthConfig(t){ar.setAuthConfig(t.Cognito),this.authConfig=t}setTokenRefresher(t){this.tokenRefresher=t}setAuthTokenStore(t){this.tokenStore=t}getTokenStore(){if(!this.tokenStore)throw new Oe({name:"EmptyTokenStoreException",message:"TokenStore not set"});return this.tokenStore}getTokenRefresher(){if(!this.tokenRefresher)throw new Oe({name:"EmptyTokenRefresherException",message:"TokenRefresher not set"});return this.tokenRefresher}setClientMetadataProvider(t){this.clientMetadataProvider=t}async getTokens(t){let n;try{We(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&&sN({expiresAt:(n.idToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0}),s=sN({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}),zo.dispatch("auth",{event:"tokenRefresh"},"Auth",Fo),s}catch(o){return this.handleErrors(o)}}handleErrors(t){if(to(t),this.isAuthenticationError(t)&&this.clearTokens(),zo.dispatch("auth",{event:"tokenRefresh_failure",data:{error:t}},"Auth",Fo),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 sY{constructor(){this.authTokenStore=new tY,this.authTokenStore.setKeyValueStorage(eh),this.tokenOrchestrator=new oY,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(QZ)}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 Xm=new sY,{tokenOrchestrator:fr}=Xm;async function js(e){if(e.AccessToken){const t=Ms(e.AccessToken),n=(t.payload.iat||0)*1e3,r=new Date().getTime(),o=n>0?n-r:0;let s,a,u;e.RefreshToken&&(a=e.RefreshToken),e.IdToken&&(s=Ms(e.IdToken)),e?.NewDeviceMetadata&&(u=e.NewDeviceMetadata);const c={accessToken:t,idToken:s,refreshToken:a,clockDrift:o,deviceMetadata:u,username:e.username};e?.signInDetails&&(c.signInDetails=e.signInDetails),await fr.setTokens({tokens:c})}else throw new dr({message:"Invalid tokens",name:"InvalidTokens",recoverySuggestion:"Check Cognito UserPool settings"})}const iY="Unable to get user session following successful sign-in.",Xi=async()=>{try{zo.dispatch("auth",{event:"signedIn",data:await Hv()},"Auth",Fo)}catch(e){throw e.name===Bv?new Oe({name:kZ,message:iY,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 F8(){return{active:!1}}const aY=(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 F8();default:return e}},lY=e=>{let t=e(F8(),{type:"RESET"});return{getState:()=>t,dispatch:n=>{t=e(t,n)}}},Ni=lY(aY),uY=180*1e3,Hp="CognitoSignInState",Is={username:`${Hp}.username`,challengeName:`${Hp}.challengeName`,signInSession:`${Hp}.signInSession`,expiry:`${Hp}.expiry`},cY=(e,t)=>{switch(t.type){case"SET_SIGN_IN_SESSION":return qp({signInSession:t.value}),{...e,signInSession:t.value};case"SET_SIGN_IN_STATE":return qp(t.value),{...t.value};case"SET_CHALLENGE_NAME":return qp({challengeName:t.value}),{...e,challengeName:t.value};case"SET_USERNAME":return qp({username:t.value}),{...e,username:t.value};case"SET_INITIAL_STATE":return fY();case"RESET_STATE":return z8(),BI();default:return e}},dY=e=>{const t=Number(e),n=Date.now();return t<=n},So=()=>{Bo.dispatch({type:"RESET_STATE"})},z8=()=>{for(const e of Object.values(Is))xs.removeItem(e)},BI=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),fY=()=>{const e=xs.getItem(Is.expiry);if(!e||dY(e))return z8(),BI();const t=xs.getItem(Is.username)??void 0,n=xs.getItem(Is.challengeName)??void 0,r=xs.getItem(Is.signInSession)??void 0;return{username:t,challengeName:n,signInSession:r}},hY=e=>{let t=e(BI(),{type:"SET_INITIAL_STATE"});return{getState:()=>t,dispatch:n=>{t=e(t,n)}}},Bo=hY(cY);function ol(e){Bo.dispatch({type:"SET_SIGN_IN_STATE",value:e})}const qp=({challengeName:e,signInSession:t,username:n})=>{n&&xs.setItem(Is.username,n),e&&xs.setItem(Is.challengeName,e),t&&(xs.setItem(Is.signInSession,t),xs.setItem(Is.expiry,String(Date.now()+uY)))},MN="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 Xr extends dr{constructor(t){super(t),this.constructor=Xr,Object.setPrototypeOf(this,Xr.prototype)}}var At;(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"})(At||(At={}));const N1="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",PN="Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.",ju={[At.PasskeyNotSupported]:{message:"Passkeys may not be supported on this device.",recoverySuggestion:MN},[At.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:PN},[At.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:PN},[At.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:MN},[At.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."},[At.PasskeyAlreadyExists]:{message:"Passkey already exists in authenticator.",recoverySuggestion:"Proceed with existing passkey or try again after deleting the credential."},[At.PasskeyRegistrationCanceled]:{message:"Passkey registration ceremony has been canceled.",recoverySuggestion:N1},[At.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:N1},[At.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:N1},[At.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},fc=Dv(ju,Xr),j8=e=>{if(e instanceof Error){if(e.name==="AbortError"){const{message:t,recoverySuggestion:n}=ju[At.PasskeyOperationAborted];return new Xr({name:At.PasskeyOperationAborted,message:t,recoverySuggestion:n,underlyingError:e})}if(e.name==="SecurityError"){const{message:t,recoverySuggestion:n}=ju[At.RelyingPartyMismatch];return new Xr({name:At.RelyingPartyMismatch,message:t,recoverySuggestion:n,underlyingError:e})}}return new Xr({name:zi.Unknown,message:"An unknown error has occurred.",underlyingError:e})},pY=e=>{if(e instanceof Xr)return e;if(e instanceof Error&&e.name==="NotAllowedError"){const{message:t,recoverySuggestion:n}=ju[At.PasskeyAuthenticationCanceled];return new Xr({name:At.PasskeyAuthenticationCanceled,message:t,recoverySuggestion:n,underlyingError:e})}return j8(e)},B8=()=>Fv()&&window.isSecureContext&&"credentials"in navigator&&typeof window.PublicKeyCredential=="function",Uo=e=>zu.convert(new Uint8Array(e),{urlSafe:!0,skipPadding:!0}),sf=e=>Uint8Array.from(LI.convert(e,{urlSafe:!0}),t=>t.charCodeAt(0)).buffer,mY=e=>{const t=sf(e.user.id),n=sf(e.challenge),r=(e.excludeCredentials||[]).map(o=>({...o,id:sf(o.id)}));return{...e,excludeCredentials:r,challenge:n,user:{...e.user,id:t}}},gY=e=>{const t={clientDataJSON:Uo(e.response.clientDataJSON),attestationObject:Uo(e.response.attestationObject),transports:e.response.getTransports(),publicKeyAlgorithm:e.response.getPublicKeyAlgorithm(),authenticatorData:Uo(e.response.getAuthenticatorData())},n=e.response.getPublicKey();n&&(t.publicKey=Uo(n));const r={type:e.type,id:e.id,rawId:Uo(e.rawId),clientExtensionResults:e.getClientExtensionResults(),response:t};return e.authenticatorAttachment&&(r.authenticatorAttachment=e.authenticatorAttachment),r},vY=e=>{const t=sf(e.challenge),n=(e.allowCredentials||[]).map(r=>({...r,id:sf(r.id)}));return{...e,challenge:t,allowCredentials:n}},yY=e=>{const t={clientDataJSON:Uo(e.response.clientDataJSON),authenticatorData:Uo(e.response.authenticatorData),signature:Uo(e.response.signature)};e.response.userHandle&&(t.userHandle=Uo(e.response.userHandle));const n={id:e.id,rawId:Uo(e.rawId),type:e.type,clientExtensionResults:e.getClientExtensionResults(),response:t};return e.authenticatorAttachment&&(n.authenticatorAttachment=e.authenticatorAttachment),n};function bY(e){fc([!!e,!!e?.challenge,!!e?.user,!!e?.rp,!!e?.pubKeyCredParams].every(Boolean),At.InvalidPasskeyRegistrationOptions)}function SY(e){fc(e&&e instanceof PublicKeyCredential&&e.response instanceof AuthenticatorAttestationResponse,At.PasskeyRegistrationFailed)}function wY(e){fc(e&&e instanceof PublicKeyCredential&&e.response instanceof AuthenticatorAssertionResponse,At.PasskeyRetrievalFailed)}const CY=async e=>{try{const t=B8();fc(t,At.PasskeyNotSupported);const n=vY(e),r=await navigator.credentials.get({publicKey:n});return wY(r),yY(r)}catch(t){throw pY(t)}},EY=e=>hn(In,xn("ConfirmDevice"),$n(),{...An,...e}),Jm={convert(e){return new TextEncoder().encode(e)}};function Se(e,t){e!=null&&this.fromString(e,t)}function Zn(){return new Se(null,null)}let Ui;const _Y=0xdeadbeefcafe,NN=(_Y&16777215)===15715070;function xY(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 IY(e,t,n,r,o,s){const a=t&32767,u=t>>15;for(;--s>=0;){let c=this[e]&32767;const f=this[e++]>>15,h=u*c+f*a;c=a*c+((h&32767)<<15)+n[r]+(o&1073741823),o=(c>>>30)+(h>>>15)+u*f+(o>>>30),n[r++]=c&1073741823}return o}function AY(e,t,n,r,o,s){const a=t&16383,u=t>>14;for(;--s>=0;){let c=this[e]&16383;const f=this[e++]>>14,h=u*c+f*a;c=a*c+((h&16383)<<14)+n[r]+o,o=(c>>28)+(h>>14)+u*f,n[r++]=c&268435455}return o}const kN=typeof navigator<"u";kN&&NN&&navigator.appName==="Microsoft Internet Explorer"?(Se.prototype.am=IY,Ui=30):kN&&NN&&navigator.appName!=="Netscape"?(Se.prototype.am=xY,Ui=26):(Se.prototype.am=AY,Ui=28);Se.prototype.DB=Ui;Se.prototype.DM=(1<<Ui)-1;Se.prototype.DV=1<<Ui;const HI=52;Se.prototype.FV=Math.pow(2,HI);Se.prototype.F1=HI-Ui;Se.prototype.F2=2*Ui-HI;const RY="0123456789abcdefghijklmnopqrstuvwxyz",qv=[];let hc,Zr;hc=48;for(Zr=0;Zr<=9;++Zr)qv[hc++]=Zr;hc=97;for(Zr=10;Zr<36;++Zr)qv[hc++]=Zr;hc=65;for(Zr=10;Zr<36;++Zr)qv[hc++]=Zr;function DN(e){return RY.charAt(e)}function TY(e,t){const n=qv[e.charCodeAt(t)];return n??-1}function OY(e){for(let t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function MY(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 qI(e){const t=Zn();return t.fromInt(e),t}function PY(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=TY(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&&Se.ZERO.subTo(this,this)}function NY(){const e=this.s&this.DM;for(;this.t>0&&this[this.t-1]==e;)--this.t}function kY(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,u=this.DB-a*this.DB%t;if(a-- >0)for(u<this.DB&&(r=this[a]>>u)>0&&(o=!0,s=DN(r));a>=0;)u<t?(r=(this[a]&(1<<u)-1)<<t-u,r|=this[--a]>>(u+=this.DB-t)):(r=this[a]>>(u-=t)&n,u<=0&&(u+=this.DB,--a)),r>0&&(o=!0),o&&(s+=DN(r));return o?s:"0"}function DY(){const e=Zn();return Se.ZERO.subTo(this,e),e}function LY(){return this.s<0?this.negate():this}function UY(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 VI(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 $Y(){return this.t<=0?0:this.DB*(this.t-1)+VI(this[this.t-1]^this.s&this.DM)}function FY(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 zY(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 jY(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,u;for(u=this.t-1;u>=0;--u)t[u+s+1]=this[u]>>r|a,a=(this[u]&o)<<n;for(u=s-1;u>=0;--u)t[u]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()}function BY(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 HY(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 qY(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&&Se.ZERO.subTo(t,t)}function VY(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 WY(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=Zn());const s=Zn(),a=this.s,u=e.s,c=this.DB-VI(r[r.t-1]);c>0?(r.lShiftTo(c,s),o.lShiftTo(c,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,w=1<<this.F2;let S=n.t,C=S-f;const E=t===null?Zn():t;for(s.dlShiftTo(C,E),n.compareTo(E)>=0&&(n[n.t++]=1,n.subTo(E,n)),Se.ONE.dlShiftTo(f,E),E.subTo(s,s);s.t<f;)s[s.t++]=0;for(;--C>=0;){let I=n[--S]===h?this.DM:Math.floor(n[S]*g+(n[S-1]+w)*v);if((n[S]+=s.am(0,I,n,C,0,f))<I)for(s.dlShiftTo(C,E),n.subTo(E,n);n[S]<--I;)n.subTo(E,n)}t!==null&&(n.drShiftTo(f,t),a!==u&&Se.ZERO.subTo(t,t)),n.t=f,n.clamp(),c>0&&n.rShiftTo(c,n),a<0&&Se.ZERO.subTo(n,n)}function GY(e){const t=Zn();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(Se.ZERO)>0&&e.subTo(t,t),t}function KY(){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 ZY(e){return this.compareTo(e)===0}function YY(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 QY(e){const t=Zn();return this.addTo(e,t),t}function XY(e){const t=Zn();return this.subTo(e,t),t}function JY(e){const t=Zn();return this.multiplyTo(e,t),t}function eQ(e){const t=Zn();return this.divRemTo(e,t,null),t}function pc(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 tQ(e){const t=Zn();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(Se.ZERO)>0&&this.m.subTo(t,t),t}function nQ(e){const t=Zn();return e.copyTo(t),this.reduce(t),t}function rQ(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 oQ(e,t){e.squareTo(t),this.reduce(t)}function sQ(e,t,n){e.multiplyTo(t,n),this.reduce(n)}pc.prototype.convert=tQ;pc.prototype.revert=nQ;pc.prototype.reduce=rQ;pc.prototype.mulTo=sQ;pc.prototype.sqrTo=oQ;function iQ(e,t,n){let r=e.bitLength(),o,s=qI(1);const a=new pc(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 u=[];let c=3;const f=o-1,h=(1<<o)-1;if(u[1]=a.convert(this),o>1){const E=Zn();for(a.sqrTo(u[1],E);c<=h;)u[c]=Zn(),a.mulTo(E,u[c-2],u[c]),c+=2}let m=e.t-1,g,v=!0,w=Zn(),S;for(r=VI(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)),c=o;(g&1)===0;)g>>=1,--c;if((r-=c)<0&&(r+=this.DB,--m),v)u[g].copyTo(s),v=!1;else{for(;c>1;)a.sqrTo(s,w),a.sqrTo(w,s),c-=2;c>0?a.sqrTo(s,w):(S=s,s=w,w=S),a.mulTo(w,u[g],s)}for(;m>=0&&(e[m]&1<<r)===0;)a.sqrTo(s,w),S=s,s=w,w=S,--r<0&&(r=this.DB-1,--m)}const C=a.revert(s);return n(null,C),C}Se.prototype.copyTo=OY;Se.prototype.fromInt=MY;Se.prototype.fromString=PY;Se.prototype.clamp=NY;Se.prototype.dlShiftTo=FY;Se.prototype.drShiftTo=zY;Se.prototype.lShiftTo=jY;Se.prototype.rShiftTo=BY;Se.prototype.subTo=HY;Se.prototype.multiplyTo=qY;Se.prototype.squareTo=VY;Se.prototype.divRemTo=WY;Se.prototype.invDigit=KY;Se.prototype.addTo=YY;Se.prototype.toString=kY;Se.prototype.negate=DY;Se.prototype.abs=LY;Se.prototype.compareTo=UY;Se.prototype.bitLength=$Y;Se.prototype.mod=GY;Se.prototype.equals=ZY;Se.prototype.add=QY;Se.prototype.subtract=XY;Se.prototype.multiply=JY;Se.prototype.divide=eQ;Se.prototype.modPow=iQ;Se.ZERO=qI(0);Se.ONE=qI(1);const aQ=async({a:e,g:t,k:n,x:r,B:o,N:s,U:a})=>new Promise((u,c)=>{t.modPow(r,s,(f,h)=>{if(f){c(f);return}o.subtract(n.multiply(h)).modPow(e.add(a.multiply(r)),s,(m,g)=>{if(m){c(m);return}u(g.mod(s))})})}),lQ="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",H8={},R_={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),H8[e]=t,R_[t]=e}const Bu=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 R_)t[n/2]=R_[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return t},WI=e=>{let t="";for(let n=0;n<e.byteLength;n++)t+=H8[e[n]];return t},T_=e=>{const t=new Wa;t.update(e);const n=t.digestSync(),r=WI(n);return new Array(64-r.length).join("0")+r},eg=e=>T_(Bu(e)),uQ=/^[89a-f]/i,Cs=e=>{if(!(e instanceof Se))throw new Error("Not a BigInteger");const t=e.compareTo(Se.ZERO)<0;let n=e.abs().toString(16);if(n=n.length%2!==0?`0${n}`:n,n=uQ.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 Se(r,16).add(Se.ONE).toString(16),n.toUpperCase().startsWith("FF8")&&(n=n.substring(2))}return n},cQ=({A:e,B:t})=>{const n=new Se(eg(Cs(e)+Cs(t)),16);if(n.equals(Se.ZERO))throw new Error("U cannot be zero.");return n},dQ=(e,t,n)=>{const r=new Wa(t);r.update(e);const o=r.digestSync(),s=new Wa(o);return s.update(n),s.digestSync().slice(0,16)},GI=e=>{const t=new zI().random(e).toString();return Bu(t)},fQ=()=>zu.convert(GI(40));class hQ{constructor({userPoolName:t,a:n,g:r,A:o,N:s}){this.encoder=Jm,this.userPoolName=t,this.a=n,this.g=r,this.A=o,this.N=s,this.k=new Se(eg(`${Cs(s)}${Cs(r)}`),16)}getRandomPassword(){if(!this.randomPassword)throw new Oe({name:"EmptyBigIntegerRandomPassword",message:"random password is empty"});return this.randomPassword}getSaltToHashDevices(){if(!this.saltToHashDevices)throw new Oe({name:"EmptyBigIntegersaltToHashDevices",message:"saltToHashDevices is empty"});return this.saltToHashDevices}getVerifierDevices(){if(!this.verifierDevices)throw new Oe({name:"EmptyBigIntegerVerifierDevices",message:"verifyDevices is empty"});return this.verifierDevices}async generateHashDevice(t,n){this.randomPassword=fQ();const r=`${t}${n}:${this.randomPassword}`,o=T_(r),s=WI(GI(16));return this.saltToHashDevices=Cs(new Se(s,16)),new Promise((a,u)=>{this.g.modPow(new Se(eg(this.saltToHashDevices+o),16),this.N,(c,f)=>{if(c){u(c);return}this.verifierDevices=Cs(f),a()})})}async getPasswordAuthenticationKey({username:t,password:n,serverBValue:r,salt:o}){if(r.mod(this.N).equals(Se.ZERO))throw new Error("B cannot be zero.");const s=cQ({A:this.A,B:r}),a=`${this.userPoolName}${t}:${n}`,u=T_(a),c=new Se(eg(Cs(o)+u),16),f=await aQ({a:this.a,g:this.g,k:this.k,x:c,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),dQ(Bu(Cs(f)),Bu(Cs(s)),g)}}const pQ=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(Se.ZERO)){o(new Error("Illegal parameter. A mod N cannot be 0."));return}r(a)})}),nh=async e=>{const t=new Se(lQ,16),n=new Se("2",16),r=mQ(),o=await pQ({a:r,g:n,N:t});return new hQ({userPoolName:e,a:r,g:n,A:o,N:t})},mQ=()=>{const e=WI(GI(128));return new Se(e,16)};async function sl({userPoolId:e,userPoolEndpoint:t,newDeviceMetadata:n,accessToken:r}){if(!n)return;const o=e.split("_")[1]||"",s=await nh(o),a=n?.DeviceKey,u=n?.DeviceGroupKey;try{await s.generateHashDevice(u??"",a??"")}catch{return}const c={Salt:zu.convert(Bu(s.getSaltToHashDevices())),PasswordVerifier:zu.convert(Bu(s.getVerifierDevices()))},f=s.getRandomPassword();try{return await EY({endpointResolver:rt({endpointOverride:t})})({region:nt(e)},{AccessToken:r,DeviceName:await bZ(),DeviceKey:n?.DeviceKey,DeviceSecretVerifierConfig:c}),{deviceKey:a,deviceGroupKey:u,randomPassword:f}}catch{return}}async function gQ(e){const t=Tt.getConfig().Auth?.Cognito;We(t);const{username:n,signInSession:r,signInDetails:o,challengeName:s}=Bo.getState();if(s!=="WEB_AUTHN"||!n)throw new Oe({name:jo.SignInException,message:"Unable to proceed due to invalid sign in state."});const{CREDENTIAL_REQUEST_OPTIONS:a}=e;fc(!!a,At.InvalidPasskeyAuthenticationOptions);const u=await CY(JSON.parse(a)),c=Or({endpointResolver:rt({endpointOverride:t.userPoolEndpoint})}),{ChallengeName:f,ChallengeParameters:h,AuthenticationResult:m,Session:g}=await c({region:nt(t.userPoolId),userAgentValue:vt($e.ConfirmSignIn)},{ChallengeName:"WEB_AUTHN",ChallengeResponses:{USERNAME:n,CREDENTIAL:JSON.stringify(u)},ClientId:t.userPoolClientId,Session:r});if(ol({signInSession:g,username:n,challengeName:f,signInDetails:o}),m)return await js({...m,username:n,NewDeviceMetadata:await sl({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:m.NewDeviceMetadata,accessToken:m.AccessToken}),signInDetails:o}),Bo.dispatch({type:"RESET_STATE"}),await Xi(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};if(f==="WEB_AUTHN")throw new Oe({name:jo.SignInException,message:"Sequential WEB_AUTHN challenges returned from underlying service cannot be handled."});return{challengeName:f,challengeParameters:h}}function Rn({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 vQ=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yQ=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],q8=()=>{const e=new Date,t=yQ[e.getUTCDay()],n=vQ[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 u=e.getUTCFullYear();return`${t} ${n} ${r} ${o}:${s}:${a} UTC ${u}`},V8=({userPoolName:e,username:t,challengeParameters:n,dateNow:r,hkdf:o})=>{const s=Jm.convert(e),a=Jm.convert(t),u=bQ(n.SECRET_BLOCK),c=Jm.convert(r),f=new Uint8Array(s.byteLength+a.byteLength+u.byteLength+c.byteLength);f.set(s,0),f.set(a,s.byteLength),f.set(u,s.byteLength+a.byteLength),f.set(c,s.byteLength+a.byteLength+u.byteLength);const h=new Wa(o);h.update(f);const m=h.digestSync();return zu.convert(m)},bQ=e=>{const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),r=LI.convert(n),o=new Uint8Array(r.length);for(let s=0;s<r.length;++s)o[s]=r.charCodeAt(s);return o};async function rh({username:e,config:t,clientMetadata:n,session:r,tokenOrchestrator:o}){const{userPoolId:s,userPoolEndpoint:a}=t,u=t.userPoolClientId,c=await o?.getDeviceMetadata(e);k8(c);const f=await nh(c.deviceGroupKey),h={USERNAME:e,SRP_A:f.A.toString(16),DEVICE_KEY:c.deviceKey},m={ChallengeName:"DEVICE_SRP_AUTH",ClientId:u,ChallengeResponses:h,ClientMetadata:n,Session:r},g=Or({endpointResolver:rt({endpointOverride:a})}),{ChallengeParameters:v,Session:w}=await g({region:nt(s)},m);return SQ(e,v,n,w,f,t,o)}async function SQ(e,t,n,r,o,{userPoolId:s,userPoolClientId:a,userPoolEndpoint:u},c){const f=await c?.getDeviceMetadata(e);k8(f);const h=new Se(t?.SRP_B,16),m=new Se(t?.SALT,16),{deviceKey:g}=f,{deviceGroupKey:v}=f,w=await o.getPasswordAuthenticationKey({username:f.deviceKey,password:f.randomPassword,serverBValue:h,salt:m}),S=q8(),C={USERNAME:t?.USERNAME??e,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:S,PASSWORD_CLAIM_SIGNATURE:V8({username:g,userPoolName:v,challengeParameters:t,dateNow:S,hkdf:w}),DEVICE_KEY:g},E=Rn({username:e,userPoolId:s,userPoolClientId:a}),I={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:a,ChallengeResponses:C,Session:r,ClientMetadata:n,UserContextData:E};return Or({endpointResolver:rt({endpointOverride:u})})({region:nt(s)},I)}async function KI(e,t,n,r,o,s,a){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=s,h=u?.split("_")[1]||"",m=new Se(t?.SRP_B,16),g=new Se(t?.SALT,16),v=t?.USER_ID_FOR_SRP;if(!v)throw new Oe({name:"EmptyUserIdForSRPException",message:"USER_ID_FOR_SRP was not found in challengeParameters"});const w=await o.getPasswordAuthenticationKey({username:v,password:e,serverBValue:m,salt:g}),S=q8(),C={USERNAME:v,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:S,PASSWORD_CLAIM_SIGNATURE:V8({username:v,userPoolName:h,challengeParameters:t,dateNow:S,hkdf:w})},E=await a.getDeviceMetadata(v);E&&E.deviceKey&&(C.DEVICE_KEY=E.deviceKey);const I=Rn({username:v,userPoolId:u,userPoolClientId:c}),A={ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:C,ClientMetadata:n,Session:r,ClientId:c,UserContextData:I},N=await Or({endpointResolver:rt({endpointOverride:f})})({region:nt(u)},A);return N.ChallengeName==="DEVICE_SRP_AUTH"?rh({username:v,config:s,clientMetadata:n,session:N.Session,tokenOrchestrator:a}):N}async function mc(e,t,n,r){try{return await e(...t)}catch(o){if(o instanceof Oe&&o.name==="ResourceNotFoundException"&&o.message.includes("Device does not exist."))return await r.clearDeviceMetadata(n),e(...t);throw o}}function il(e){const{dispatch:t}=Bo;t({type:"SET_USERNAME",value:e})}async function W8({username:e,password:t,clientMetadata:n,config:r,tokenOrchestrator:o,authFlow:s,preferredChallenge:a}){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=r,h=u?.split("_")[1]||"",m=await nh(h),g={USERNAME:e,SRP_A:m.A.toString(16)};s==="USER_AUTH"&&a&&(g.PREFERRED_CHALLENGE=a);const v=Rn({username:e,userPoolId:u,userPoolClientId:c}),w={AuthFlow:s,AuthParameters:g,ClientMetadata:n,ClientId:c,UserContextData:v},C=await th({endpointResolver:rt({endpointOverride:f})})({region:nt(u),userAgentValue:vt($e.SignIn)},w),{ChallengeParameters:E,Session:I}=C,A=E?.USERNAME??e;return il(A),C.ChallengeName==="PASSWORD_VERIFIER"?mc(KI,[t,E,n,I,m,r,o],A,o):C}async function wQ({username:e,session:t,selectedChallenge:n,config:r,clientMetadata:o}){return Or({endpointResolver:rt({endpointOverride:r.userPoolEndpoint})})({region:nt(r.userPoolId),userAgentValue:vt($e.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:{USERNAME:e,ANSWER:n},ClientId:r.userPoolClientId,Session:t,ClientMetadata:o})}async function CQ(e,t,n,r,o){const{userPoolId:s,userPoolClientId:a,userPoolEndpoint:u}=r,c={ANSWER:"PASSWORD",USERNAME:e,PASSWORD:t},f=Rn({username:e,userPoolId:s,userPoolClientId:a}),m=await Or({endpointResolver:rt({endpointOverride:u})})({region:nt(s),userAgentValue:vt($e.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:c,ClientId:a,ClientMetadata:n,Session:o,UserContextData:f}),g=m.ChallengeParameters?.USERNAME??e;return il(g),m}async function EQ(e,t,n,r,o,s){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=r,f=a.split("_")[1]||"",h=await nh(f),m={ANSWER:"PASSWORD_SRP",USERNAME:e,SRP_A:h.A.toString(16)},g=Rn({username:e,userPoolId:a,userPoolClientId:u}),w=await Or({endpointResolver:rt({endpointOverride:c})})({region:nt(a),userAgentValue:vt($e.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:m,ClientId:u,ClientMetadata:n,Session:o,UserContextData:g}),S=w.ChallengeParameters?.USERNAME??e;return il(S),w.ChallengeName==="PASSWORD_VERIFIER"?mc(KI,[t,w.ChallengeParameters,n,w.Session,h,r,s],S,s):w}const O_="userAttributes.";function _Q(e){return"isSignedIn"in e&&"nextStep"in e}async function xQ({challengeResponse:e,clientMetadata:t,session:n,username:r,config:o,tokenOrchestrator:s}){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=o,f={USERNAME:r,ANSWER:e},h=await s?.getDeviceMetadata(r);h&&h.deviceKey&&(f.DEVICE_KEY=h.deviceKey);const m=Rn({username:r,userPoolId:a,userPoolClientId:u}),g={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:f,Session:n,ClientMetadata:t,ClientId:u,UserContextData:m},w=await Or({endpointResolver:rt({endpointOverride:c})})({region:nt(a),userAgentValue:vt($e.ConfirmSignIn)},g);return w.ChallengeName==="DEVICE_SRP_AUTH"?rh({username:r,config:o,clientMetadata:t,session:w.Session,tokenOrchestrator:s}):w}async function IQ({challengeResponse:e,username:t,clientMetadata:n,session:r,deviceName:o,config:s}){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=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=WZ({endpointResolver:rt({endpointOverride:c})}),{Session:v}=await g({region:nt(a),userAgentValue:vt($e.ConfirmSignIn)},{UserCode:e,Session:r,FriendlyDeviceName:o});Bo.dispatch({type:"SET_SIGN_IN_SESSION",value:v});const w={ChallengeName:"MFA_SETUP",ChallengeResponses:f,Session:v,ClientMetadata:n,ClientId:u};return Or({endpointResolver:rt({endpointOverride:c})})({region:nt(a),userAgentValue:vt($e.ConfirmSignIn)},w)}if(e.includes("@")){f.EMAIL=e;const g={ChallengeName:"MFA_SETUP",ChallengeResponses:f,Session:r,ClientMetadata:n,ClientId:u};return Or({endpointResolver:rt({endpointOverride:c})})({region:nt(a),userAgentValue:vt($e.ConfirmSignIn)},g)}throw new Oe({name:jo.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 AQ({challengeResponse:e,username:t,clientMetadata:n,session:r,config:o}){const{userPoolId:s,userPoolClientId:a,userPoolEndpoint:u}=o;Kt(e==="TOTP"||e==="SMS"||e==="EMAIL",Ue.IncorrectMFAMethod);const c={USERNAME:t,ANSWER:UQ(e)},f=Rn({username:t,userPoolId:s,userPoolClientId:a}),h={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:c,Session:r,ClientMetadata:n,ClientId:a,UserContextData:f};return Or({endpointResolver:rt({endpointOverride:u})})({region:nt(s),userAgentValue:vt($e.ConfirmSignIn)},h)}async function RQ({challengeResponse:e,clientMetadata:t,session:n,username:r,requiredAttributes:o,config:s}){const{userPoolId:a,userPoolClientId:u,userPoolEndpoint:c}=s,f={...DQ(o),NEW_PASSWORD:e,USERNAME:r},h=Rn({username:r,userPoolId:a,userPoolClientId:u}),m={ChallengeName:"NEW_PASSWORD_REQUIRED",ChallengeResponses:f,ClientMetadata:t,Session:n,ClientId:u,UserContextData:h};return Or({endpointResolver:rt({endpointOverride:c})})({region:nt(a),userAgentValue:vt($e.ConfirmSignIn)},m)}async function TQ(e,t,n,r,o){const{userPoolClientId:s,userPoolId:a,userPoolEndpoint:u}=r,c={USERNAME:e,PASSWORD:t},f=await o.getDeviceMetadata(e);f&&f.deviceKey&&(c.DEVICE_KEY=f.deviceKey);const h=Rn({username:e,userPoolId:a,userPoolClientId:s}),m={AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:c,ClientMetadata:n,ClientId:s,UserContextData:h},v=await th({endpointResolver:rt({endpointOverride:u})})({region:nt(a),userAgentValue:vt($e.SignIn)},m),w=v.ChallengeParameters?.USERNAME??v.ChallengeParameters?.USER_ID_FOR_SRP??e;return il(w),v.ChallengeName==="DEVICE_SRP_AUTH"?rh({username:w,config:r,clientMetadata:n,session:v.Session,tokenOrchestrator:o}):v}async function OQ(e,t,n,r,o){return W8({username:e,password:t,clientMetadata:n,config:r,tokenOrchestrator:o,authFlow:"USER_SRP_AUTH"})}async function MQ(e,t,n,r){const{userPoolClientId:o,userPoolId:s,userPoolEndpoint:a}=n,u={USERNAME:e},c=await r.getDeviceMetadata(e);c&&c.deviceKey&&(u.DEVICE_KEY=c.deviceKey);const f=Rn({username:e,userPoolId:s,userPoolClientId:o}),h={AuthFlow:"CUSTOM_AUTH",AuthParameters:u,ClientMetadata:t,ClientId:o,UserContextData:f},g=await th({endpointResolver:rt({endpointOverride:a})})({region:nt(s),userAgentValue:vt($e.SignIn)},h),v=g.ChallengeParameters?.USERNAME??e;return il(v),g.ChallengeName==="DEVICE_SRP_AUTH"?rh({username:v,config:n,clientMetadata:t,session:g.Session,tokenOrchestrator:r}):g}async function PQ(e,t,n,r,o){We(r);const{userPoolId:s,userPoolClientId:a,userPoolEndpoint:u}=r,c=s?.split("_")[1]||"",f=await nh(c),h={USERNAME:e,SRP_A:f.A.toString(16),CHALLENGE_NAME:"SRP_A"},m=Rn({username:e,userPoolId:s,userPoolClientId:a}),g={AuthFlow:"CUSTOM_AUTH",AuthParameters:h,ClientMetadata:n,ClientId:a,UserContextData:m},v=th({endpointResolver:rt({endpointOverride:u})}),{ChallengeParameters:w,Session:S}=await v({region:nt(s),userAgentValue:vt($e.SignIn)},g),C=w?.USERNAME??e;return il(C),mc(KI,[t,w,n,S,f,r,o],C,o)}async function al(e){const{challengeName:t,challengeParameters:n,availableChallenges:r}=e,o=Tt.getConfig().Auth?.Cognito;switch(We(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}=Bo.getState(),u=LN(UN(n.MFAS_CAN_SETUP))||[],c=FQ(u),f=c.includes("TOTP"),h=c.includes("EMAIL");if(f&&h)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION",allowedMFATypes:c}};if(h)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"}};if(f){const m=GZ({endpointResolver:rt({endpointOverride:o.userPoolEndpoint})}),{Session:g,SecretCode:v}=await m({region:nt(o.userPoolId)},{Session:s});return Bo.dispatch({type:"SET_SIGN_IN_SESSION",value:g}),{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_TOTP_SETUP",totpSetupDetails:NQ(v,a)}}}throw new Oe({name:jo.SignInException,message:`Cannot initiate MFA setup from available types: ${u}`})}case"NEW_PASSWORD_REQUIRED":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",missingAttributes:kQ(n.requiredAttributes)}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:LN(UN(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 gQ(n);return _Q(s)?s:al(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 Oe({name:jo.SignInException,message:`An error occurred during the sign in process. ${t} challengeName returned by the underlying service was not addressed.`})}function NQ(e,t){return{sharedSecret:e,getSetupUri:(n,r)=>{const o=`otpauth://totp/${n}:${r??t}?secret=${e}&issuer=${n}`;return new Qi(o)}}}function gc(e){if(e===Ig.PasswordResetRequiredException)return{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}};if(e===Ig.UserNotConfirmedException)return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}}function kQ(e){return e?JSON.parse(e).map(n=>n.includes(O_)?n.replace(O_,""):n):[]}function DQ(e){if(!e)return{};const t={};return Object.entries(e).forEach(([n,r])=>{r&&(t[`${O_}${n}`]=r)}),t}async function LQ(e,t,n,r,o,s,a,u){const c=u?.userAttributes,f=u?.friendlyDeviceName;switch(t){case"WEB_AUTHN":case"SELECT_CHALLENGE":return r==="PASSWORD_SRP"||r==="PASSWORD"?{ChallengeName:r,Session:n,$metadata:{}}:wQ({username:e,session:n,selectedChallenge:r,config:o,clientMetadata:a});case"SELECT_MFA_TYPE":return AQ({challengeResponse:r,clientMetadata:a,session:n,username:e,config:o});case"MFA_SETUP":return IQ({challengeResponse:r,clientMetadata:a,session:n,username:e,deviceName:f,config:o});case"NEW_PASSWORD_REQUIRED":return RQ({challengeResponse:r,clientMetadata:a,session:n,username:e,requiredAttributes:c,config:o});case"CUSTOM_CHALLENGE":return mc(xQ,[{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 zQ({challengeName:t,challengeResponse:r,clientMetadata:a,session:n,username:e,config:o,tokenOrchestrator:s});case"PASSWORD":return CQ(e,r,a,o,n);case"PASSWORD_SRP":return EQ(e,r,a,o,n,s)}throw new Oe({name:jo.SignInException,message:`An error occurred during the sign in process.
|
|
5
|
-
${t} challengeName returned by the underlying service was not addressed.`})}function UQ(e){let t="SMS_MFA";return e==="TOTP"&&(t="SOFTWARE_TOKEN_MFA"),e==="EMAIL"&&(t="EMAIL_OTP"),t}function $Q(e){if(e==="SMS_MFA")return"SMS";if(e==="SOFTWARE_TOKEN_MFA")return"TOTP";if(e==="EMAIL_OTP")return"EMAIL"}function LN(e){if(e)return e.map($Q).filter(Boolean)}function UN(e){return e?JSON.parse(e):[]}function FQ(e){return e.filter(t=>t==="EMAIL"||t==="TOTP")}async function G8(){let e;try{e=await Hv()}catch{}if(e&&e.userId&&e.username)throw new Oe({name:_Z,message:"There is already a signed in user.",recoverySuggestion:"Call signOut before calling signIn again."})}function oh(e){return Bo.getState().username??e}async function zQ({challengeName:e,challengeResponse:t,clientMetadata:n,session:r,username:o,config:s,tokenOrchestrator:a}){const{userPoolId:u,userPoolClientId:c,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=Rn({username:o,userPoolId:u,userPoolClientId:c}),v={ChallengeName:e,ChallengeResponses:h,Session:r,ClientMetadata:n,ClientId:c,UserContextData:g},S=await Or({endpointResolver:rt({endpointOverride:f})})({region:nt(u),userAgentValue:vt($e.ConfirmSignIn)},v);return S.ChallengeName==="DEVICE_SRP_AUTH"?rh({username:o,config:s,clientMetadata:n,session:S.Session,tokenOrchestrator:a}):S}async function jQ(e){const t=Tt.getConfig().Auth?.Cognito;We(t);const{username:n,password:r,options:o}=e,s={loginId:n,authFlowType:"CUSTOM_WITHOUT_SRP"},a=o?.clientMetadata;Kt(!!n,Ue.EmptySignInUsername),Kt(!r,Ue.CustomAuthSignInPassword);try{const{ChallengeName:u,ChallengeParameters:c,AuthenticationResult:f,Session:h}=await mc(MQ,[n,a,t,fr],n,fr),m=oh(n);return ol({signInSession:h,username:m,challengeName:u,signInDetails:s}),f?(await js({username:m,...f,NewDeviceMetadata:await sl({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:s}),So(),await Xi(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):al({challengeName:u,challengeParameters:c})}catch(u){So(),to(u);const c=gc(u.name);if(c)return c;throw u}}async function BQ(e){const{username:t,password:n,options:r}=e,o={loginId:t,authFlowType:"CUSTOM_WITH_SRP"},s=Tt.getConfig().Auth?.Cognito;We(s);const a=r?.clientMetadata;Kt(!!t,Ue.EmptySignInUsername),Kt(!!n,Ue.EmptySignInPassword);try{const{ChallengeName:u,ChallengeParameters:c,AuthenticationResult:f,Session:h}=await PQ(t,n,a,s,fr),m=oh(t);return ol({signInSession:h,username:m,challengeName:u,signInDetails:o}),f?(await js({username:m,...f,NewDeviceMetadata:await sl({userPoolId:s.userPoolId,userPoolEndpoint:s.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:o}),So(),await Xi(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):al({challengeName:u,challengeParameters:c})}catch(u){So(),to(u);const c=gc(u.name);if(c)return c;throw u}}const K8=async()=>{throw new Oe({name:P8,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 ZI=K8;function M_(e){ZI=e}function ur(e=!0){e&&(ZI=K8),Ni.dispatch({type:"RESET"})}async function $N(e){const{username:t,password:n}=e,r=Tt.getConfig().Auth?.Cognito,o={loginId:t,authFlowType:"USER_SRP_AUTH"};We(r);const s=e.options?.clientMetadata;Kt(!!t,Ue.EmptySignInUsername),Kt(!!n,Ue.EmptySignInPassword);try{const{ChallengeName:a,ChallengeParameters:u,AuthenticationResult:c,Session:f}=await OQ(t,n,s,r,fr),h=oh(t);return ol({signInSession:f,username:h,challengeName:a,signInDetails:o}),c?(await js({username:h,...c,NewDeviceMetadata:await sl({userPoolId:r.userPoolId,userPoolEndpoint:r.userPoolEndpoint,newDeviceMetadata:c.NewDeviceMetadata,accessToken:c.AccessToken}),signInDetails:o}),So(),await Xi(),ur(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):al({challengeName:a,challengeParameters:u})}catch(a){So(),ur(),to(a);const u=gc(a.name);if(u)return u;throw a}}async function HQ(e){const{username:t,password:n,options:r}=e,o=Tt.getConfig().Auth?.Cognito,s={loginId:t,authFlowType:"USER_PASSWORD_AUTH"};We(o);const a=r?.clientMetadata;Kt(!!t,Ue.EmptySignInUsername),Kt(!!n,Ue.EmptySignInPassword);try{const{ChallengeName:u,ChallengeParameters:c,AuthenticationResult:f,Session:h}=await mc(TQ,[t,n,a,o,fr],t,fr),m=oh(t);return ol({signInSession:h,username:m,challengeName:u,signInDetails:s}),f?(await js({...f,username:m,NewDeviceMetadata:await sl({userPoolId:o.userPoolId,userPoolEndpoint:o.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:s}),So(),await Xi(),ur(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):al({challengeName:u,challengeParameters:c})}catch(u){So(),ur(),to(u);const c=gc(u.name);if(c)return c;throw u}}async function qQ({username:e,clientMetadata:t,config:n,tokenOrchestrator:r,preferredChallenge:o,password:s,session:a}){const{userPoolId:u,userPoolClientId:c,userPoolEndpoint:f}=n,h=Rn({username:e,userPoolId:u,userPoolClientId:c}),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)&&Kt(!1,Ue.InvalidPreferredChallenge),o==="PASSWORD_SRP")return Kt(!!s,Ue.EmptySignInPassword),W8({username:e,password:s,clientMetadata:t,config:n,tokenOrchestrator:r,authFlow:"USER_AUTH",preferredChallenge:o});o==="PASSWORD"&&(Kt(!!s,Ue.EmptySignInPassword),m.PASSWORD=s),m.PREFERRED_CHALLENGE=o}const g={AuthFlow:"USER_AUTH",AuthParameters:m,ClientMetadata:t,ClientId:c,UserContextData:h};a&&(g.Session=a);const w=await th({endpointResolver:rt({endpointOverride:f})})({region:nt(u),userAgentValue:vt($e.SignIn)},g);return il(e),w}async function Z8(e){const{username:t,password:n,options:r}=e,o=Tt.getConfig().Auth?.Cognito,s={loginId:t,authFlowType:"USER_AUTH"};We(o);const a=r?.clientMetadata,u=r?.preferredChallenge??o?.passwordless?.preferredChallenge;Kt(!!t,Ue.EmptySignInUsername);try{const c={username:t,config:o,tokenOrchestrator:fr,clientMetadata:a,preferredChallenge:u,password:n},f=Ni.getState();f.active&&f.username===t&&(c.session=f.session);const h=await qQ(c),m=oh(t);return ol({signInSession:h.Session,username:m,challengeName:h.ChallengeName,signInDetails:s}),h.AuthenticationResult?(await js({username:m,...h.AuthenticationResult,NewDeviceMetadata:await sl({userPoolId:o.userPoolId,userPoolEndpoint:o.userPoolEndpoint,newDeviceMetadata:h.AuthenticationResult.NewDeviceMetadata,accessToken:h.AuthenticationResult.AccessToken}),signInDetails:s}),So(),await Xi(),ur(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):al({challengeName:h.ChallengeName,challengeParameters:h.ChallengeParameters,availableChallenges:"AvailableChallenges"in h?h.AvailableChallenges:void 0})}catch(c){So(),ur(),to(c);const f=gc(c.name);if(f)return f;throw c}}async function YI(e){ur(!1);const t=e.options?.authFlowType;switch(await G8(),t){case"USER_SRP_AUTH":return $N(e);case"USER_PASSWORD_AUTH":return HQ(e);case"CUSTOM_WITHOUT_SRP":return jQ(e);case"CUSTOM_WITH_SRP":return BQ(e);case"USER_AUTH":return Z8(e);default:return $N(e)}}const Y8=180*1e3;function VQ(e){const t=xg.listen("auth-internal",async({payload:r})=>{r.event==="confirmSignUp"&&r.data?.isSignUpComplete&&(xg.dispatch("auth-internal",{event:"autoSignIn"}),M_(X8(e)),t())}),n=setTimeout(()=>{t(),clearTimeout(n),ur()},Y8)}function Q8(e,t){let n;return r=>{n||e(...r),clearTimeout(n),n=setTimeout(()=>{n=void 0},t)}}function WQ(e,t,n){const r=Date.now(),o=setInterval(async()=>{if(Date.now()-r>Y8)clearInterval(o),n(new Oe({name:P8,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."})),ur();else try{const u=await YI(e);u.nextStep.signInStep!=="CONFIRM_SIGN_UP"&&(t(u),clearInterval(o),ur())}catch(u){clearInterval(o),n(u),ur()}},5e3)}const GQ=Q8(WQ,300),KQ=Q8(YQ,300);function ZQ(e){return async()=>new Promise((t,n)=>{GQ([e,t,n])})}async function YQ(e,t,n){try{const r=e?.options?.authFlowType==="USER_AUTH"?await Z8(e):await YI(e);t(r),ur()}catch(r){n(r),ur()}}function X8(e){return async()=>new Promise((t,n)=>{KQ([e,t,n])})}const QQ=X8,XQ=()=>async e=>{if(e.statusCode>=300){const t=await cc(e);if(to(t),t.name===I_.InvalidParameterException&&/'password'/.test(t.message)&&/Member must not be null/.test(t.message)){const n=Ue.EmptySignUpPassword,{message:r,recoverySuggestion:o}=M8[n];throw new Oe({name:n,message:r,recoverySuggestion:o})}throw new Oe({name:t.name,message:t.message})}return Jf(e)},JQ=e=>hn(In,xn("SignUp"),XQ(),{...An,...e});async function eX(e){const{username:t,password:n,options:r}=e,o=Tt.getConfig().Auth?.Cognito,s=o?.signUpVerificationMethod??"code",{clientMetadata:a,validationData:u,autoSignIn:c}=e.options??{};We(o),Kt(!!t,Ue.EmptySignUpUsername);const f=typeof c!="boolean"?c:void 0,h={username:t,options:f};f?.authFlowType!=="CUSTOM_WITHOUT_SRP"&&(h.password=n);const{userPoolId:m,userPoolClientId:g,userPoolEndpoint:v}=o,w=JQ({endpointResolver:rt({endpointOverride:v})}),S={Username:t,Password:void 0,UserAttributes:r?.userAttributes&&iN(r?.userAttributes),ClientMetadata:a,ValidationData:u&&iN(u),ClientId:g,UserContextData:Rn({username:t,userPoolId:m,userPoolClientId:g})};n&&(S.Password=n);const{UserSub:C,CodeDeliveryDetails:E,UserConfirmed:I,Session:A}=await w({region:nt(m),userAgentValue:vt($e.SignUp)},S);(f||c===!0)&&(Ni.dispatch({type:"START"}),Ni.dispatch({type:"SET_USERNAME",value:t}),Ni.dispatch({type:"SET_SESSION",value:A}));const T={destination:E?.Destination,deliveryMedium:E?.DeliveryMedium,attributeName:E?.AttributeName},N=!!I,M=Ni.getState().active;if(N)return M?(M_(QQ(h)),{isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"},userId:C}):{isSignUpComplete:!0,nextStep:{signUpStep:"DONE"},userId:C};if(M){if(s==="link")return M_(ZQ(h)),{isSignUpComplete:!1,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN",codeDeliveryDetails:T},userId:C};VQ(h)}return{isSignUpComplete:!1,nextStep:{signUpStep:"CONFIRM_SIGN_UP",codeDeliveryDetails:T},userId:C}}const tX=e=>hn(In,xn("ForgotPassword"),$n(),{...An,...e});async function J8(e){const{username:t}=e;Kt(!!t,Ue.EmptyResetPasswordUsername);const n=Tt.getConfig().Auth?.Cognito;We(n);const{userPoolClientId:r,userPoolId:o,userPoolEndpoint:s}=n,a=e.options?.clientMetadata,u=Rn({username:t,userPoolId:o,userPoolClientId:r}),h=(await tX({endpointResolver:rt({endpointOverride:s})})({region:nt(o),userAgentValue:vt($e.ResetPassword)},{Username:t,ClientMetadata:a,ClientId:r,UserContextData:u})).CodeDeliveryDetails;return{isPasswordReset:!1,nextStep:{resetPasswordStep:"CONFIRM_RESET_PASSWORD_WITH_CODE",codeDeliveryDetails:{deliveryMedium:h?.DeliveryMedium,destination:h?.Destination,attributeName:h?.AttributeName}}}}const nX=e=>hn(In,xn("ConfirmForgotPassword"),$n(),{...An,...e});async function rX(e){const t=Tt.getConfig().Auth?.Cognito;We(t);const{userPoolClientId:n,userPoolId:r,userPoolEndpoint:o}=t,{username:s,newPassword:a}=e;Kt(!!s,Ue.EmptyConfirmResetPasswordUsername),Kt(!!a,Ue.EmptyConfirmResetPasswordNewPassword);const u=e.confirmationCode;Kt(!!u,Ue.EmptyConfirmResetPasswordConfirmationCode);const c=e.options?.clientMetadata,f=Rn({username:s,userPoolId:r,userPoolClientId:n});await nX({endpointResolver:rt({endpointOverride:o})})({region:nt(t.userPoolId),userAgentValue:vt($e.ConfirmResetPassword)},{Username:s,ConfirmationCode:u,Password:a,ClientMetadata:c,ClientId:t.userPoolClientId,UserContextData:f})}const oX=e=>hn(In,xn("ResendConfirmationCode"),$n(),{...An,...e});async function sX(e){const{username:t}=e;Kt(!!t,Ue.EmptySignUpUsername);const n=Tt.getConfig().Auth?.Cognito;We(n);const{userPoolClientId:r,userPoolId:o,userPoolEndpoint:s}=n,a=e.options?.clientMetadata,u=Rn({username:t,userPoolId:o,userPoolClientId:r}),c=oX({endpointResolver:rt({endpointOverride:s})}),{CodeDeliveryDetails:f}=await c({region:nt(n.userPoolId),userAgentValue:vt($e.ResendSignUpCode)},{Username:t,ClientMetadata:a,ClientId:n.userPoolClientId,UserContextData:u}),{DeliveryMedium:h,AttributeName:m,Destination:g}={...f};return{destination:g,deliveryMedium:h,attributeName:m||void 0}}const iX=e=>hn(In,xn("ConfirmSignUp"),$n(),{...An,...e});async function aX(e){const{username:t,confirmationCode:n,options:r}=e,o=Tt.getConfig().Auth?.Cognito;We(o);const{userPoolId:s,userPoolClientId:a,userPoolEndpoint:u}=o,c=r?.clientMetadata;Kt(!!t,Ue.EmptyConfirmSignUpUsername),Kt(!!n,Ue.EmptyConfirmSignUpCode);const f=Rn({username:t,userPoolId:s,userPoolClientId:a}),h=iX({endpointResolver:rt({endpointOverride:u})}),{Session:m}=await h({region:nt(o.userPoolId),userAgentValue:vt($e.ConfirmSignUp)},{Username:t,ConfirmationCode:n,ClientMetadata:c,ForceAliasCreation:r?.forceAliasCreation,ClientId:o.userPoolClientId,UserContextData:f});return new Promise((g,v)=>{try{const w={isSignUpComplete:!0,nextStep:{signUpStep:"DONE"}},S=Ni.getState();if(!S.active||S.username!==t){g(w),ur();return}Ni.dispatch({type:"SET_SESSION",value:m});const C=xg.listen("auth-internal",({payload:E})=>{E.event==="autoSignIn"&&(g({isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"}}),C())});xg.dispatch("auth-internal",{event:"confirmSignUp",data:w})}catch(w){v(w)}})}async function e$(e){const{challengeResponse:t,options:n}=e,{username:r,challengeName:o,signInSession:s,signInDetails:a}=Bo.getState(),u=Tt.getConfig().Auth?.Cognito;We(u);const c=n?.clientMetadata;if(Kt(!!t,Ue.EmptyChallengeResponse),!r||!o||!s)throw new Oe({name:jo.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 LQ(r,o,s,t,u,fr,c,n);return ol({signInSession:f,username:r,challengeName:h,signInDetails:a}),m?(await js({username:r,...m,NewDeviceMetadata:await sl({userPoolId:u.userPoolId,userPoolEndpoint:u.userPoolEndpoint,newDeviceMetadata:m.NewDeviceMetadata,accessToken:m.AccessToken}),signInDetails:a}),So(),await Xi(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):al({challengeName:h,challengeParameters:g})}catch(f){to(f);const h=gc(f.name);if(h)return h;throw f}}const lX=e=>hn(In,xn("GetUser"),$n(),{...An,...e}),uX=e=>hn(In,xn("VerifyUserAttribute"),$n(),{...An,...e});async function cX(e){const t=Tt.getConfig().Auth?.Cognito;We(t);const{userPoolEndpoint:n,userPoolId:r}=t,{confirmationCode:o,userAttributeKey:s}=e;Kt(!!o,Ue.EmptyConfirmUserAttributeCode);const{tokens:a}=await zv({forceRefresh:!1});dc(a),await uX({endpointResolver:rt({endpointOverride:n})})({region:nt(r),userAgentValue:vt($e.ConfirmUserAttribute)},{AccessToken:a.accessToken.toString(),AttributeName:s,Code:o})}new Un("AuthError");const dX={oauthSignInError:{message:_n.OAUTH_ERROR,log:"Make sure Cognito Hosted UI has been configured correctly"},noConfig:{message:_n.DEFAULT_MSG},missingAuthConfig:{message:_n.DEFAULT_MSG},emptyUsername:{message:_n.EMPTY_USERNAME},invalidUsername:{message:_n.INVALID_USERNAME},emptyPassword:{message:_n.EMPTY_PASSWORD},emptyCode:{message:_n.EMPTY_CODE},signUpError:{message:_n.SIGN_UP_ERROR},noMFA:{message:_n.NO_MFA},invalidMFA:{message:_n.INVALID_MFA},emptyChallengeResponse:{message:_n.EMPTY_CHALLENGE},noUserSession:{message:_n.NO_USER_SESSION},deviceConfig:{message:_n.DEVICE_CONFIG},networkError:{message:_n.NETWORK_ERROR},autoSignInError:{message:_n.AUTOSIGNIN_ERROR},default:{message:_n.DEFAULT_MSG}},ji=(e,t)=>new Oe({message:e??"An error has occurred during the oauth process.",name:jo.OAuthSignInError,recoverySuggestion:dX.oauthSignInError.log});var P_;(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"})(P_||(P_={}));const fX="`signInWithRedirect` has been canceled.",hX="An error occurred while validating the state.",pX="Try to initiate an OAuth flow from Amplify",t$=async e=>{const t=await ar.loadOAuthState(),n=e===t?t:void 0;if(!n)throw new Oe({name:P_.OAuthSignInError,message:e===null?fX:hX,recoverySuggestion:e===null?void 0:pX});return n},n$=async({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:r,responseType:o,domain:s,preferPrivateSession:a})=>{const u=new Qi(e),c=u.searchParams.get("error"),f=u.searchParams.get("error_description");if(c)throw ji(f??c);return o==="code"?mX({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:r,domain:s,preferPrivateSession:a}):gX({currentUrl:e,redirectUri:r,preferPrivateSession:a})},mX=async({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:r,domain:o,preferPrivateSession:s})=>{const a=new Qi(e),u=a.searchParams.get("code"),c=a.searchParams.get("state");if(!u||!c)throw ji("User cancelled OAuth flow.");const f=await t$(c),h="https://"+o+"/oauth2/token",m=await ar.loadPKCE(),g={grant_type:"authorization_code",code:u,client_id:n,redirect_uri:r,...m?{code_verifier:m}:{}},v=Object.entries(g).map(([M,R])=>`${encodeURIComponent(M)}=${encodeURIComponent(R)}`).join("&"),{access_token:w,refresh_token:S,id_token:C,error:E,error_message:I,token_type:A,expires_in:T}=await(await fetch(h,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",[bG]:t},body:v})).json();if(E)throw ji(I??E);const N=(w&&Ms(w).payload.username)??"username";return await js({username:N,AccessToken:w,IdToken:C,RefreshToken:S}),r$({redirectUri:r,state:f,preferPrivateSession:s})},gX=async({currentUrl:e,redirectUri:t,preferPrivateSession:n})=>{const r=new Qi(e),{id_token:o,access_token:s,state:a,token_type:u,expires_in:c,error_description:f,error:h}=(r.hash??"#").substring(1).split("&").map(v=>v.split("=")).reduce((v,[w,S])=>({...v,[w]:S}),{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 ji(f??h);if(!s)throw ji("No access token returned from OAuth flow.");const m=await t$(a),g=(s&&Ms(s).payload.username)??"username";return await js({username:g,AccessToken:s,IdToken:o}),r$({redirectUri:t,state:m,preferPrivateSession:n})},r$=async({redirectUri:e,state:t,preferPrivateSession:n})=>{await fr.setOAuthMetadata({oauthSignIn:!0}),await ar.clearOAuthData(),await ar.storeOAuthSignIn(!0,n),$8(),bX(e),vX(t)&&zo.dispatch("auth",{event:"customOAuthState",data:gZ(yX(t))},"Auth",Fo),zo.dispatch("auth",{event:"signInWithRedirect"},"Auth",Fo),await Xi()},vX=e=>/-/.test(e),yX=e=>e.split("-").splice(1).join("-"),bX=e=>{typeof window<"u"&&typeof window.history<"u"&&window.history.replaceState(window.history.state,"",e)};function QI(e,t){{const n=e?.find(SX)??e?.find(wX),r=e?.find(EX)??e?.find(CX);if(n)return n;throw r?MZ:TZ}}const SX=e=>e.startsWith(String(window.location.origin+(window.location.pathname||"/"))),wX=e=>e.includes(String(window.location.hostname)),CX=e=>e.startsWith("http://"),EX=e=>e.startsWith("https://"),XI=async e=>{$8(),await ar.clearOAuthInflightData(),zo.dispatch("auth",{event:"signInWithRedirect_failure",data:{error:e}},"Auth",Fo)},_X=async e=>{try{We(e),Lv(e),ar.setAuthConfig(e)}catch{return}if(await ar.loadOAuthInFlight())try{const t=window.location.href,{loginWith:n,userPoolClientId:r}=e,{domain:o,redirectSignIn:s,responseType:a}=n.oauth,u=QI(s);await n$({currentUrl:t,clientId:r,domain:o,redirectUri:u,responseType:a,userAgentValue:vt($e.SignInWithRedirect)})}catch(t){await XI(t)}};Fv()&&Tt[l8](_X);const xX={Google:"Google",Facebook:"Facebook",Amazon:"LoginWithAmazon",Apple:"SignInWithApple"},o$=async e=>{window?.location&&(window.location.href=e.replace("http://","https://"))},FN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",IX=e=>{const t=new Uint8Array(e);DI().getRandomValues(t);let n="",r;for(const o of t)n+=FN.charAt(o%FN.length);return{value:n,method:"S256",toCodeChallenge(){return r||(r=AX(n),r)}}};function AX(e){const t=new Wa;return t.update(e),RX(zu.convert(t.digestSync(),{urlSafe:!0}))}function RX(e){return e.replace(/=/g,"")}const TX=()=>mZ(32),OX=e=>{async function t(n){if(n.persisted&&await e.loadOAuthInFlight()){const o=ji("User cancelled OAuth flow.");await XI(o)}window.removeEventListener("pageshow",t)}window.addEventListener("pageshow",t)};async function s$(e){const t=Tt.getConfig().Auth?.Cognito;We(t),Lv(t),ar.setAuthConfig(t),e?.options?.prompt||await G8();let n="COGNITO",r;return typeof e?.provider=="string"?n=xX[e.provider]:e?.provider?.custom?n=e.provider.custom:e?.provider?.idpIdentifier&&({idpIdentifier:r}=e.provider),MX({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 MX=async({oauthConfig:e,provider:t,idpIdentifier:n,clientId:r,customState:o,preferPrivateSession:s,options:a,authSessionOpener:u})=>{const{domain:c,redirectSignIn:f,responseType:h,scopes:m}=e,{loginHint:g,lang:v,nonce:w,prompt:S}=a??{},C=TX(),E=u||o$,I=o?`${C}-${vZ(o)}`:C,{value:A,method:T,toCodeChallenge:N}=IX(128),M=QI(e.redirectSignIn);Fv()&&ar.storeOAuthInFlight(!0),ar.storeOAuthState(I),ar.storePKCE(A);const R=new URLSearchParams;R.append("redirect_uri",M),R.append("response_type",h),R.append("client_id",r),n?R.append("idp_identifier",n):R.append("identity_provider",t),R.append("scope",m.join(" ")),g&&R.append("login_hint",g),v&&R.append("lang",v),w&&R.append("nonce",w),S&&R.append("prompt",S.toLowerCase()),R.append("state",I),h==="code"&&(R.append("code_challenge",N()),R.append("code_challenge_method",T));const k=`https://${c}/oauth2/authorize?${R.toString()}`;OX(ar);const{type:L,error:q,url:$}=await E(k,f,s)??{};try{if(L==="error")throw ji(String(q));if(L==="canceled")throw ji(String(L));L==="success"&&$&&await n$({currentUrl:$,clientId:r,domain:c,redirectUri:M,responseType:h,userAgentValue:vt($e.SignInWithRedirect),preferPrivateSession:s})}catch(D){throw await XI(D),D}},PX=async e=>{const t=e.getConfig().Auth?.Cognito;We(t);const{userPoolEndpoint:n,userPoolId:r}=t,{tokens:o}=await p8(e,{forceRefresh:!1});dc(o);const s=lX({endpointResolver:rt({endpointOverride:n})}),{UserAttributes:a}=await s({region:nt(r),userAgentValue:vt($e.FetchUserAttributes)},{AccessToken:o.accessToken.toString()});return EZ(a)},i$=()=>PX(Tt),NX=async e=>{await e.clearOAuthData(),fr.clearTokens(),await m8(),zo.dispatch("auth",{event:"signedOut"},"Auth",Fo)},kX=async(e,t=!1,n)=>{Lv(e);const{loginWith:r,userPoolClientId:o}=e,{domain:s,redirectSignOut:a}=r.oauth,u=QI(a),c=`https://${s}/logout?${Object.entries({client_id:o,logout_uri:encodeURIComponent(u)}).map(([f,h])=>`${f}=${h}`).join("&")}`;return o$(c)},DX=async(e,t,n,r)=>{const{isOAuthSignIn:o}=await t.loadOAuthSignIn(),s=await n.getOAuthMetadata();if(await NX(t),o||s?.oauthSignIn)return kX(e,!1)},LX=e=>hn(In,xn("RevokeToken"),$n(),{...An,...e}),UX=new Un("Auth");async function $X(e){const t=Tt.getConfig().Auth?.Cognito;We(t),await FX(t);let n;try{Lv(t),n=!0}catch{n=!1}if(n){const r=new U8(eh);r.setAuthConfig(t);const{type:o}=await DX(t,r,fr)??{};if(o==="error")throw new Oe({name:PZ,message:"An error occurred when attempting to log out from OAuth provider."})}else fr.clearTokens(),await m8(),zo.dispatch("auth",{event:"signedOut"},"Auth",Fo)}async function FX(e){try{const{userPoolEndpoint:t,userPoolId:n,userPoolClientId:r}=e,o=await fr.getTokenStore().loadTokens();N8(o),zX(o.accessToken)&&await LX({endpointResolver:rt({endpointOverride:t})})({region:nt(n),userAgentValue:vt($e.SignOut)},{ClientId:r,Token:o.refreshToken})}catch{UX.debug("Client signOut error caught but will proceed with token removal")}}const zX=e=>!!e?.payload?.origin_jti,jX=e=>hn(In,xn("GetUserAttributeVerificationCode"),$n(),{...An,...e}),BX=async e=>{const{userAttributeKey:t,options:n}=e,r=Tt.getConfig().Auth?.Cognito,o=n?.clientMetadata;We(r);const{userPoolEndpoint:s,userPoolId:a}=r,{tokens:u}=await zv({forceRefresh:!1});dc(u);const c=jX({endpointResolver:rt({endpointOverride:s})}),{CodeDeliveryDetails:f}=await c({region:nt(a),userAgentValue:vt($e.SendUserAttributeVerificationCode)},{AccessToken:u.accessToken.toString(),ClientMetadata:o,AttributeName:t}),{DeliveryMedium:h,AttributeName:m,Destination:g}={...f};return{destination:g,deliveryMedium:h,attributeName:m}},HX={identityId:"identityId"},qX=new Un("DefaultIdentityIdStore");class a${setAuthConfig(t){Ym(t.Cognito),this.authConfig=t,this._authKeys=VX("Cognito",t.Cognito.identityPoolId)}constructor(t){this._authKeys={},this._hasGuestIdentityId=!1,this.keyValueStorage=t}async loadIdentityId(){Ym(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 qX.log("Error getting stored IdentityId.",t),null}}async storeIdentityId(t){Ym(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 VX=(e,t)=>jI(HX)(`com.amplify.${e}`,t),N_=({endpointOverride:e})=>t=>e?{url:new Qi(e)}:oZ(t);function l$(e){const t=Ms(e).payload.iss,n={};if(!t)throw new Oe({name:"InvalidIdTokenException",message:"Invalid Idtoken."});const r=t.replace(/(^\w+:|^)\/\//,"");return n[r]=e,n}async function WX({tokens:e,authConfig:t,identityIdStore:n}){n.setAuthConfig({Cognito:t});const r=await n.loadIdentityId();if(r)return r.id;const o=e?.idToken?l$(e.idToken.toString()):{},s=await GX(o,t);return n.storeIdentityId({id:s,type:e?"primary":"guest"}),s}async function GX(e,t){const n=t?.identityPoolId,r=x_(n),o=tZ({endpointResolver:N_({endpointOverride:t.identityPoolEndpoint})});let s;try{s=(await o({region:r},{IdentityPoolId:n,Logins:e})).IdentityId}catch(a){throw to(a),new Oe(a)}if(!s)throw new Oe({name:"GetIdResponseException",message:"Received undefined response from getId operation",recoverySuggestion:"Make sure to pass a valid identityPoolId in the configuration."});return s}const Vp=new Un("CognitoCredentialsProvider"),zN=3e3*1e3;class u${constructor(t){this._nextCredentialsRefresh=0,this._identityIdStore=t}async clearCredentialsAndIdentityId(){Vp.debug("Clearing out credentials and identityId"),this._credentialsAndIdentityId=void 0,await this._identityIdStore.clearIdentityId()}async clearCredentials(){Vp.debug("Clearing out in-memory credentials"),this._credentialsAndIdentityId=void 0}async getCredentialsAndIdentityId(t){const n=t.authenticated,{tokens:r}=t,{authConfig:o}=t;try{Ym(o?.Cognito)}catch{return}if(!n&&!o.Cognito.allowGuestAccess)return;const{forceRefresh:s}=t,a=this.hasTokenChanged(r),u=await WX({tokens:r,authConfig:o.Cognito,identityIdStore:this._identityIdStore});return(s||a)&&this.clearCredentials(),n?(DZ(r),this.credsForOIDCTokens(o.Cognito,r,u)):this.getGuestCredentials(u,o.Cognito)}async getGuestCredentials(t,n){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&this._credentialsAndIdentityId.isAuthenticatedCreds===!1)return Vp.info("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const r=x_(n.identityPoolId),o=rN({endpointResolver:N_({endpointOverride:n.identityPoolEndpoint})});let s;try{s=await o({region:r},{IdentityId:t})}catch(a){throw to(a),new Oe(a)}if(s?.Credentials?.AccessKeyId&&s?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+zN;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 Oe({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 Vp.debug("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const o=n.idToken?l$(n.idToken.toString()):{},s=x_(t.identityPoolId),a=rN({endpointResolver:N_({endpointOverride:t.identityPoolEndpoint})});let u;try{u=await a({region:s},{IdentityId:r,Logins:o})}catch(c){throw to(c),new Oe(c)}if(u?.Credentials?.AccessKeyId&&u?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+zN;const c={credentials:{accessKeyId:u.Credentials.AccessKeyId,secretAccessKey:u.Credentials.SecretKey,sessionToken:u.Credentials.SessionToken,expiration:u.Credentials.Expiration},identityId:r};return u.IdentityId&&(c.identityId=u.IdentityId,this._identityIdStore.storeIdentityId({id:u.IdentityId,type:"primary"})),this._credentialsAndIdentityId={...c,isAuthenticatedCreds:!0,associatedIdToken:n.idToken?.toString()},c}else throw new Oe({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 KX=new u$(new a$(eh)),c$={configure(e,t){const n=c8(e),r=new dZ({sameSite:"lax"}),o=t?.ssr?r:eh,s=t?.ssr?new u$(new a$(r)):KX;if(!n.Auth||t?.Auth){Tt.configure(n,t);return}Xm.setAuthConfig(n.Auth),Xm.setKeyValueStorage(o),Tt.configure(n,{...t,Auth:{tokenProvider:Xm,credentialsProvider:s}})},getConfig(){return Tt.getConfig()}},ZX="https://github.com/remit-mail/reader/issues/new",YX=["internal","acme","tailscale","off"],QX=["self","managed"],jN=(e,t,n)=>e.find(r=>r===t)??n,vc=()=>{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:jN(YX,e.tlsMode,"off"),issuesUrl:e.issuesUrl??ZX,updateMode:jN(QX,e.updateMode,"self")}},d$=()=>{const e=vc(),{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}},Vv=()=>d$()!==null,f$=()=>{const e=d$();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 XX={};const tg=Object.create(null),Cd=e=>XX||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?tg:globalThis),_i=new Proxy(tg,{get(e,t){return Cd()[t]??tg[t]},has(e,t){return t in Cd()||t in tg},set(e,t,n){const r=Cd(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=Cd(!0);return delete n[t],!0},ownKeys(){const e=Cd(!0);return Object.keys(e)}});_i.NODE_ENV;var ng=class extends Error{constructor(e,t){super(e,t),this.name="BetterAuthError",this.message=e,this.stack=""}};const JX=47;function h$(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===JX;)t--;return t===e.length?e:e.slice(0,t)}function eJ(e){try{return(h$(new URL(e).pathname)||"/")!=="/"}catch{throw new ng(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function tJ(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 BN(e,t="/api/auth"){if(tJ(e),eJ(e))return e;const n=h$(e);return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function nJ(e,t,n,r,o){{const s=_i.BETTER_AUTH_URL||_i.NEXT_PUBLIC_BETTER_AUTH_URL||_i.PUBLIC_BETTER_AUTH_URL||_i.NUXT_PUBLIC_BETTER_AUTH_URL||_i.NUXT_PUBLIC_AUTH_URL||(_i.BASE_URL!=="/"?_i.BASE_URL:void 0);if(s)return BN(s,t)}if(typeof window<"u"&&window.location)return BN(window.location.origin,t)}const rJ={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*:/},oJ=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,HN={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},sJ=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function iJ(e){return e instanceof Date&&!isNaN(e.getTime())}function aJ(e){const t=sJ.exec(e);if(!t)return null;const[,n,r,o,s,a,u,c,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(u,10),c?parseInt(c.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 iJ(g)?g:null}function lJ(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(),u=a.toLowerCase();if(u.length<=9&&u in HN)return HN[u];if(!oJ.test(a)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(rJ).some(([c,f])=>{const h=f.test(a);return h&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${c} 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=aJ(h);if(m)return m}return o?o(f,h):h})}catch(c){if(n)throw c;return e}}function uJ(e,t={strict:!0}){return lJ(e,t)}const cJ=["javascript:","data:","vbscript:"];function dJ(e){let t;try{t=new URL(e)}catch{return!0}return!cJ.includes(t.protocol)}const fJ={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&dJ(e.data.url)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};let mo=[],xi=0;const rg=4,hJ=globalThis.nanostoresGlobal||={epoch:0};let pJ=()=>{for(xi=0;xi<mo.length;xi+=rg)mo[xi](mo[xi+1].value,mo[xi+2],mo[xi+3]);mo.length=0};const p$=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=xi+rg;s<mo.length;)mo[s]===r?mo.splice(s,rg):s+=rg;let o=t.indexOf(r);~o&&(t.splice(o,1),--n.lc||n.off())}},notify(r,o){hJ.epoch++;let s=!mo.length&&!0;for(let a of t)mo.push(a,n,r,o);s&&pJ()},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},mJ=2,gJ=5,Wp=6,Gp=10;let m$=(e,t,n,r)=>(e.events=e.events||{},e.events[n+Gp]||(e.events[n+Gp]=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+Gp](),delete e.events[n+Gp])}),vJ=(e,t)=>m$(e,t,mJ,n=>{let r=e.set,o=e.setKey;return e.setKey&&(e.setKey=(s,a)=>{let u;if(n({abort:()=>{u=!0},changed:s,newValue:{...e.value,[s]:a}}),!u)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 g$=1e3;let yJ=(e,t)=>m$(e,r=>{let o=t(r);o&&e.events[Wp].push(o)},gJ,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[Wp]=[],e.off=()=>{s(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let a of e.events[Wp])a();e.events[Wp]=[]}},g$)},()=>{e.listen=o,e.off=s}});function bJ(e,t,n){let r=new Set(t);return e.listen((o,s,a)=>{(a===void 0?t.some(u=>o[u]!==s[u]):r.has(a)||r.has(a.split(/\.|\[/)[0]))&&n(o,s,a)})}function qN(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Rg(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(!Rg(e[n],t[n]))return!1;return!0}if(qN(e)&&qN(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)||!Rg(e[o],t[o]))return!1;return!0}return!1}function SJ(e,t){return vJ(e,({newValue:n,abort:r})=>{t(e.value,n)&&r()})}const k_=Symbol.for("better-auth:auth-query");function wJ(e){return k_ in e&&e[k_]===!0}function CJ(e){const t=p$(e);return Object.defineProperty(t,k_,{value:!0}),t}const k1=Symbol.for("better-auth:broadcast-channel"),EJ=()=>Math.floor(Date.now()/1e3);var _J=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:EJ()}))}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 D1(e="better-auth.message"){return globalThis[k1]||(globalThis[k1]=new _J(e)),globalThis[k1]}const L1=Symbol.for("better-auth:focus-manager");var xJ=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 VN(){return globalThis[L1]||(globalThis[L1]=new xJ),globalThis[L1]}const U1=Symbol.for("better-auth:online-manager");var IJ=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 $1(){return globalThis[U1]||(globalThis[U1]=new IJ),globalThis[U1]}const F1=()=>Math.floor(Date.now()/1e3),AJ=5;function RJ(e){const{fetchSession:t,shouldPollSession:n=()=>!0,sessionSignal:r,options:o={}}=e,s=o.sessionOptions?.refetchInterval??0,a=o.sessionOptions?.refetchOnWindowFocus??!0,u=o.sessionOptions?.refetchWhenOffline??!1,c={isInitialized:!1,lastSessionRequest:0},f=()=>u||$1().isOnline,h=A=>{if(f()){if(A?.event==="storage"){t();return}if(A?.event==="poll"){c.lastSessionRequest=F1(),t();return}if(A?.event==="visibilitychange"){if(F1()-c.lastSessionRequest<AJ)return;c.lastSessionRequest=F1(),t();return}t()}},m=A=>{D1().post({event:"session",data:{trigger:A},clientId:Math.random().toString(36).substring(7)})},g=()=>{s&&s>0&&(c.pollInterval=setInterval(()=>{n()&&h({event:"poll"})},s*1e3))},v=()=>{c.unsubscribeBroadcast=D1().subscribe(()=>{h({event:"storage"})})},w=()=>{a&&(c.unsubscribeFocus=VN().subscribe(()=>{h({event:"visibilitychange"})}))},S=()=>{c.unsubscribeOnline=$1().subscribe(A=>{A&&h({event:"visibilitychange"})})},C=()=>{c.unsubscribeSignal=r.listen(()=>{t()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,g(),v(),w(),S(),C(),c.cleanupBroadcastSetup=D1().setup(),c.cleanupFocusSetup=VN().setup(),c.cleanupOnlineSetup=$1().setup())},cleanup:()=>{c.isInitialized&&(c.pollInterval&&(clearInterval(c.pollInterval),c.pollInterval=void 0),c.unsubscribeBroadcast&&(c.unsubscribeBroadcast(),c.unsubscribeBroadcast=void 0),c.unsubscribeFocus&&(c.unsubscribeFocus(),c.unsubscribeFocus=void 0),c.unsubscribeOnline&&(c.unsubscribeOnline(),c.unsubscribeOnline=void 0),c.unsubscribeSignal&&(c.unsubscribeSignal(),c.unsubscribeSignal=void 0),c.cleanupBroadcastSetup&&(c.cleanupBroadcastSetup(),c.cleanupBroadcastSetup=void 0),c.cleanupFocusSetup&&(c.cleanupFocusSetup(),c.cleanupFocusSetup=void 0),c.cleanupOnlineSetup&&(c.cleanupOnlineSetup(),c.cleanupOnlineSetup=void 0),c.isInitialized=!1,c.lastSessionRequest=0)},triggerRefetch:h,broadcastSessionUpdate:m}}const TJ=()=>typeof window>"u",OJ=g$;function MJ(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 WN(e){return typeof e=="object"&&e!==null&&"data"in e&&"error"in e?e:{data:e,error:null}}function PJ(e){return!e||e.session===null&&e.user===null?null:e}function NJ(e,t){return Rg(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function kJ(e,t){const n=p$(!1);let r,o=0,s=0;n.listen(()=>{s++,o=0});const a=v=>h(v),u=CJ({data:null,error:null,isPending:!0,isRefetching:!1,refetch:a});SJ(u,NJ);const c=async(v,w)=>{const S=u.value;if(u.set({...S,isPending:S.data===null,isRefetching:!0,error:null,refetch:a}),v.aborted)return"aborted";try{const C=await e("/get-session",{method:"GET",query:w?.query,signal:v});if(v.aborted)return"aborted";let{data:E,error:I}=WN(C),A="fresh";if(E?.needsRefresh)try{const R=await e("/get-session",{method:"POST",signal:v});if(v.aborted)return"aborted";({data:E,error:I}=WN(R))}catch{if(v.aborted)return"aborted";A="stale"}if(I){const R=u.value,k=I?.status===401;return u.set({data:k?null:R.data,error:I,isPending:!1,isRefetching:!1,refetch:a}),"failed"}const T=PJ(E),N=u.value,M=N.data!=null&&T!=null&&Rg(N.data,T)?N.data:T;return u.set({data:M,error:null,isPending:!1,isRefetching:!1,refetch:a}),A}catch(C){if(v.aborted)return"aborted";const E=u.value;return u.set({data:E.data,error:C,isPending:!1,isRefetching:!1,refetch:a}),"failed"}},f=()=>{const v=u.value.data?.session?.expiresAt,w=v instanceof Date?v.getTime():Number.POSITIVE_INFINITY;return Math.min(Date.now()+OJ,w)},h=v=>{o=0,r?.cancel();const w=new AbortController,S={cancel:()=>w.abort(),promise:Promise.resolve().then(()=>w.signal.aborted?"aborted":c(w.signal,v)),revision:s};r=S;const C=E=>{r===S&&(r=void 0,E==="fresh"&&S.revision===s&&(o=f()))};return S.promise.then(C,()=>C("failed")),S.promise.then(()=>{})},m=()=>r?.revision===s?r.promise.then(()=>{}):Date.now()<o?Promise.resolve():h();let g=()=>{};return yJ(u,()=>{let v;TJ()||(v=setTimeout(()=>{m()},0));const w=RJ({fetchSession:h,shouldPollSession:()=>u.value.data!=null,sessionSignal:n,options:t});return w.init(),g=w.broadcastSessionUpdate,()=>{v&&clearTimeout(v),w.cleanup()}}),{session:u,$sessionSignal:n,broadcastSessionUpdate:v=>g(v)}}function z1(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 D_(e,t,n=".",r){if(!z1(t))return D_(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]]:z1(a)&&z1(o[s])?o[s]=D_(a,o[s],(n?`${n}.`:"")+s.toString(),r):o[s]=a))}return o}function DJ(e){return(...t)=>t.reduce((n,r)=>D_(n,r,"",e),{})}const LJ=DJ();var UJ=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 $J=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,u,c;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((u=h.hooks)===null||u===void 0?void 0:u.onError),r.onRetry.push((c=h.hooks)===null||c===void 0?void 0:c.onRetry)}return{url:e,options:n,hooks:r}};var GN=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}},FJ=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 zJ(e){if(typeof e=="number")return new GN({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new GN(e);case"exponential":return new FJ(e);default:throw new Error("Invalid retry strategy")}}const jJ=["get","post","put","patch","delete"];function JI(e){if(!e.startsWith("@"))return{method:void 0,path:e};const t=e.indexOf("/"),n=e.slice(1,t===-1?void 0:t);return jJ.includes(n)?{method:n,path:t===-1?e:e.slice(t+1)}:{method:void 0,path:e}}const BJ=e=>e==="."||e==="..",HJ=e=>e.split(":").map(t=>encodeURIComponent(t)).join(":");function qJ(e,t){const n=t.get(e);if(n===void 0)return HJ(e);if(BJ(n))throw new TypeError("Path parameters cannot be reserved path segments");return encodeURIComponent(n)}function VJ(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}=JI(e);a!==e&&(e=`/${a}`),s.endsWith("/")||(s+="/");let[u,c]=e.replace(s,"").split("?");const f=new URLSearchParams(c);for(const[g,v]of Object.entries(o||{})){if(v==null)continue;let w;if(typeof v=="string")w=v;else if(Array.isArray(v)){for(const S of v)f.append(g,S);continue}else w=JSON.stringify(v);f.set(g,w)}const h=new Map;if(r)if(Array.isArray(r)){const g=u.split("/").filter(v=>v.startsWith(":"));for(const[v,w]of g.entries()){const S=r[v];h.set(w,String(S))}}else for(const[g,v]of Object.entries(r))h.set(`:${g}`,String(v));u=u.split("/").map(g=>qJ(g,h)).join("/"),u=u.replace(/^\/+/,"");let m=f.toString();return m=m.length>0?`?${m}`.replace(/\+/g,"%20"):"",s.startsWith("http")?new URL(`${u}${m}`,s):`${s}${u}${m}`}const WJ=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},GJ=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function KJ(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 GJ.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function ZJ(e){try{return JSON.parse(e),!0}catch{return!1}}function v$(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 KN(e){try{return JSON.parse(e)}catch{return e}}function ZN(e){return typeof e=="function"}function YJ(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&ZN(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&ZN(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}function y$(...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 QJ(e){const t=new Headers(y$(e?.headers,await WJ(e)));if(!t.has("content-type")){const n=XJ(e?.body);n&&t.set("content-type",n)}return t}function XJ(e){return v$(e)?"application/json":null}function JJ(e){const t=e.get("content-type");return t?t.split(";")[0].trim().toLowerCase():null}function eee(e,t){const{body:n}=e;return n?!v$(n)||typeof n=="string"?n:JJ(t)==="application/x-www-form-urlencoded"?new URLSearchParams(n).toString():JSON.stringify(n):null}function tee(e,t){if(t?.method)return t.method.toUpperCase();const{method:n}=JI(e);return n?n.toUpperCase():t?.body?"POST":"GET"}function nee(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var ree=class b$ extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,b$.prototype)}};async function Vd(e,t){const n=await e["~standard"].validate(t);if(n.issues)throw new ree(n.issues);return n.value}function Sf(e){"@babel/helpers - typeof";return Sf=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},Sf(e)}function oee(e,t){if(Sf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function see(e){var t=oee(e,"string");return Sf(t)=="symbol"?t:t+""}function iee(e,t,n){return(t=see(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YN(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 ct(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YN(Object(n),!0).forEach(function(r){iee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const L_=async(e,t)=>{var n,r,o;const{hooks:s,url:a,options:u}=await $J(e,t),c=YJ(u),f=new AbortController,h=(n=u.signal)!==null&&n!==void 0?n:f.signal,m=VJ(a,u),g=await QJ(u),v=eee(u,g),w=tee(a,u),S=ct(ct({},u),{},{url:m,headers:g,body:v,method:w,signal:h});for(const j of s.onRequest)if(j){const Z=await j(S);typeof Z=="object"&&Z!==null&&Object.assign(S,Z)}("pipeTo"in S&&typeof S.pipeTo=="function"||typeof(t==null||(r=t.body)===null||r===void 0?void 0:r.pipe)=="function")&&("duplex"in S||(S.duplex="half"));const{clearTimeout:C}=nee(u,f);let E=await c(S.url,S);C();const I={response:E,request:S};for(const j of s.onResponse)if(j){var A;const Z=await j(ct(ct({},I),{},{response:!(t==null||(A=t.hookOptions)===null||A===void 0)&&A.cloneResponse?E.clone():E}));Z instanceof Response?E=Z:typeof Z=="object"&&Z!==null&&(E=Z.response)}if(E.ok){if(S.method==="HEAD")return{data:"",error:null};const j=KJ(E),Z={data:null,response:E,request:S};if(j==="json"||j==="text"){var T;const he=await E.text();Z.data=await((T=S.jsonParser)!==null&&T!==void 0?T:KN)(he)}else Z.data=await E[j]();S?.output&&S.output&&!S.disableValidation&&(Z.data=await Vd(S.output,Z.data));for(const he of s.onSuccess)if(he){var N;await he(ct(ct({},Z),{},{response:!(t==null||(N=t.hookOptions)===null||N===void 0)&&N.cloneResponse?E.clone():E}))}return t?.throw?Z.data:{data:Z.data,error:null}}const M=(o=t?.jsonParser)!==null&&o!==void 0?o:KN,R=await E.text(),k=ZJ(R),L=k?await M(R):null,q={response:E,responseText:R,request:S,error:ct(ct({},L),{},{status:E.status,statusText:E.statusText})};for(const j of s.onError)if(j){var $;await j(ct(ct({},q),{},{response:!(t==null||($=t.hookOptions)===null||$===void 0)&&$.cloneResponse?E.clone():E}))}if(t?.retry){var D;const j=zJ(t.retry),Z=(D=t.retryAttempt)!==null&&D!==void 0?D:0;if(await j.shouldAttemptRetry(Z,E)){for(const B of s.onRetry)B&&await B(I);const he=j.getDelay(Z);return await new Promise(B=>setTimeout(B,he)),await L_(e,ct(ct({},t),{},{retryAttempt:Z+1}))}}if(t?.throw)throw new UJ(E.status,E.statusText,k?L:R);return{data:null,error:ct(ct({},L),{},{status:E.status,statusText:E.statusText})}},aee=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r;let o=ct(ct({},n),e.query!==void 0&&{query:ct(ct({},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,u;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))),!((u=s.config)===null||u===void 0)&&u.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 c;const{method:m,path:g}=JI(f);m&&(t=t.slice(0,t.length-f.length)+g);let v=n?.headers;if(h.headers&&!n?.disableValidation){const S={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((I,A)=>{S[A.toLowerCase()]=I});else if(typeof n.headers=="object")for(const[I,A]of Object.entries(n.headers))A!=null&&(S[I.toLowerCase()]=A)}const C=await Vd(h.headers,S),E={};for(const[I,A]of Object.entries(C))E[I.toLowerCase()]=A;v=E}const w=(c=h.method)!==null&&c!==void 0?c:m;if(o=ct(ct(ct(ct({},o),w!==void 0&&{method:w}),h.output!==void 0&&{output:h.output}),v!==void 0&&{headers:v}),!n?.disableValidation){if(h.query&&(o.query=await Vd(h.query,n?.query),o.query!==null&&typeof o.query=="object")){const S=ct({},e.query);for(const C of Object.keys(S))n?.query&&Object.prototype.hasOwnProperty.call(n.query,C)&&(S[C]=n.query[C]);o.query=ct(ct({},S),o.query)}o=ct(ct({},o),{},{body:h.input?await Vd(h.input,n?.body):n?.body,params:h.params?await Vd(h.params,n?.params):n?.params})}return{url:t,options:o}}}return ct({url:t},(n!==void 0||e.query!==void 0)&&{options:o})}}),lee=e=>{async function t(n,r){const o=ct(ct(ct({},e),r),{},{headers:y$(e?.headers,r?.headers),plugins:[...e?.plugins||[],aee(e||{}),...r?.plugins||[]]});if(e?.catchAllError)try{return await L_(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 L_(n,o)}return t};var Ca={};const uee=e=>{if(typeof process>"u")return;const t="/api/auth";if(Ca.NEXT_PUBLIC_AUTH_URL)return Ca.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(Ca.NEXTAUTH_URL)try{return Ca.NEXTAUTH_URL}catch{}if(Ca.VERCEL_URL)try{const n=Ca.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${n}${Ca.VERCEL_URL}`).origin}${t}`}catch{}}},cee=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",dee=(e,t)=>{const n="credentials"in Request.prototype,r=nJ(e?.baseURL,e?.basePath)??uee()??"/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:u,onRequest:c,onResponse:f,...h}={},m=lee({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(R){return R?uJ(R,{strict:!1}):null},customFetchImpl:fetch,...h,plugins:[s,...h.plugins||[],fJ,...o]}),{$sessionSignal:g,session:v,broadcastSessionUpdate:w}=kJ(m,e);let S=!1;const C=R=>{S||R===null||(S=!0,MJ(v,R))},E=[];let I={};const A={$sessionSignal:g,session:v},T={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},N=[{signal:"$sessionSignal",matcher:cee,callback(R){R==="/sign-out"?w("signout"):(R==="/update-user"||R==="/update-session")&&w("updateUser")}}];for(const R of E)R.getAtoms&&Object.assign(A,R.getAtoms?.(m)),R.pathMethods&&Object.assign(T,R.pathMethods),R.atomListeners&&N.push(...R.atomListeners);const M={notify:R=>{A[R].set(!A[R].get())},listen:(R,k)=>{A[R].subscribe(k)},atoms:A};for(const R of E)R.getActions&&(I=LJ(R.getActions?.(m,M,e)??{},I));return{get baseURL(){return r},pluginsActions:I,pluginsAtoms:A,pluginPathMethods:T,atomListeners:N,hydrateSession:C,$sessionSignal:g,$fetch:m,$store:M}};function fee(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function hee(e){return e.charAt(0).toUpperCase()+e.slice(1)}const pee=new RegExp("[\\p{Ll}\\d]+|\\p{Lu}+(?!\\p{Ll})|\\p{Lu}[\\p{Ll}\\d]+|\\p{Lo}+","gu"),mee=/['\u2019]/g;function gee(e){return e.replace(mee,"").match(pee)??[]}function vee(e){return gee(e).map(t=>t.toLowerCase()).join("-")}function yee(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 bee(e,t,n,r,o){function s(a=[]){return new Proxy(function(){},{get(u,c){if(typeof c!="string"||c==="then"||c==="catch"||c==="finally")return;const f=[...a,c];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"||fee(h)?h:s(f)},apply:async(u,c,f)=>{const h="/"+a.map(vee).join("/"),m=f[0]||{},g=f[1]||{},{query:v,fetchOptions:w,...S}=m,C={...g,...w},E=yee(h,n,m);return await t(h,{...C,body:E==="GET"?void 0:{...S,...C?.body||{}},query:v||C?.query,method:E,async onSuccess(I){if(await C?.onSuccess?.(I),!o||C.disableSignal)return;const A=o.filter(N=>N.matcher(h));if(!A.length)return;const T=new Set;for(const N of A){const M=r[N.signal];if(!M)return;if(T.has(N.signal))continue;T.add(N.signal);const R=M.get();setTimeout(()=>{M.set(!R)},10),N.callback?.(h)}}})}})}return s()}var j1={exports:{}},Le={};var QN;function See(){if(QN)return Le;QN=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"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function v(U){return U===null||typeof U!="object"?null:(U=g&&U[g]||U["@@iterator"],typeof U=="function"?U:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function E(U,X,ie){this.props=U,this.context=X,this.refs=C,this.updater=ie||w}E.prototype.isReactComponent={},E.prototype.setState=function(U,X){if(typeof U!="object"&&typeof U!="function"&&U!=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,U,X,"setState")},E.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function I(){}I.prototype=E.prototype;function A(U,X,ie){this.props=U,this.context=X,this.refs=C,this.updater=ie||w}var T=A.prototype=new I;T.constructor=A,S(T,E.prototype),T.isPureReactComponent=!0;var N=Array.isArray;function M(){}var R={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function L(U,X,ie){var oe=ie.ref;return{$$typeof:e,type:U,key:X,ref:oe!==void 0?oe:null,props:ie}}function q(U,X){return L(U.type,X,U.props)}function $(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function D(U){var X={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(ie){return X[ie]})}var j=/\/+/g;function Z(U,X){return typeof U=="object"&&U!==null&&U.key!=null?D(""+U.key):X.toString(36)}function he(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(M,M):(U.status="pending",U.then(function(X){U.status==="pending"&&(U.status="fulfilled",U.value=X)},function(X){U.status==="pending"&&(U.status="rejected",U.reason=X)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function B(U,X,ie,oe,fe){var Me=typeof U;(Me==="undefined"||Me==="boolean")&&(U=null);var Ae=!1;if(U===null)Ae=!0;else switch(Me){case"bigint":case"string":case"number":Ae=!0;break;case"object":switch(U.$$typeof){case e:case t:Ae=!0;break;case h:return Ae=U._init,B(Ae(U._payload),X,ie,oe,fe)}}if(Ae)return fe=fe(U),Ae=oe===""?"."+Z(U,0):oe,N(fe)?(ie="",Ae!=null&&(ie=Ae.replace(j,"$&/")+"/"),B(fe,X,ie,"",function(Ze){return Ze})):fe!=null&&($(fe)&&(fe=q(fe,ie+(fe.key==null||U&&U.key===fe.key?"":(""+fe.key).replace(j,"$&/")+"/")+Ae)),X.push(fe)),1;Ae=0;var se=oe===""?".":oe+":";if(N(U))for(var we=0;we<U.length;we++)oe=U[we],Me=se+Z(oe,we),Ae+=B(oe,X,ie,Me,fe);else if(we=v(U),typeof we=="function")for(U=we.call(U),we=0;!(oe=U.next()).done;)oe=oe.value,Me=se+Z(oe,we++),Ae+=B(oe,X,ie,Me,fe);else if(Me==="object"){if(typeof U.then=="function")return B(he(U),X,ie,oe,fe);throw X=String(U),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return Ae}function Q(U,X,ie){if(U==null)return U;var oe=[],fe=0;return B(U,oe,"","",function(Me){return X.call(ie,Me,fe++)}),oe}function ae(U){if(U._status===-1){var X=U._result;X=X(),X.then(function(ie){(U._status===0||U._status===-1)&&(U._status=1,U._result=ie)},function(ie){(U._status===0||U._status===-1)&&(U._status=2,U._result=ie)}),U._status===-1&&(U._status=0,U._result=X)}if(U._status===1)return U._result.default;throw U._result}var ue=typeof reportError=="function"?reportError:function(U){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof U=="object"&&U!==null&&typeof U.message=="string"?String(U.message):String(U),error:U});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",U);return}console.error(U)},Ce={map:Q,forEach:function(U,X,ie){Q(U,function(){X.apply(this,arguments)},ie)},count:function(U){var X=0;return Q(U,function(){X++}),X},toArray:function(U){return Q(U,function(X){return X})||[]},only:function(U){if(!$(U))throw Error("React.Children.only expected to receive a single React element child.");return U}};return Le.Activity=m,Le.Children=Ce,Le.Component=E,Le.Fragment=n,Le.Profiler=o,Le.PureComponent=A,Le.StrictMode=r,Le.Suspense=c,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,Le.__COMPILER_RUNTIME={__proto__:null,c:function(U){return R.H.useMemoCache(U)}},Le.cache=function(U){return function(){return U.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(U,X,ie){if(U==null)throw Error("The argument must be a React element, but you passed "+U+".");var oe=S({},U.props),fe=U.key;if(X!=null)for(Me in X.key!==void 0&&(fe=""+X.key),X)!k.call(X,Me)||Me==="key"||Me==="__self"||Me==="__source"||Me==="ref"&&X.ref===void 0||(oe[Me]=X[Me]);var Me=arguments.length-2;if(Me===1)oe.children=ie;else if(1<Me){for(var Ae=Array(Me),se=0;se<Me;se++)Ae[se]=arguments[se+2];oe.children=Ae}return L(U.type,fe,oe)},Le.createContext=function(U){return U={$$typeof:a,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null},U.Provider=U,U.Consumer={$$typeof:s,_context:U},U},Le.createElement=function(U,X,ie){var oe,fe={},Me=null;if(X!=null)for(oe in X.key!==void 0&&(Me=""+X.key),X)k.call(X,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(fe[oe]=X[oe]);var Ae=arguments.length-2;if(Ae===1)fe.children=ie;else if(1<Ae){for(var se=Array(Ae),we=0;we<Ae;we++)se[we]=arguments[we+2];fe.children=se}if(U&&U.defaultProps)for(oe in Ae=U.defaultProps,Ae)fe[oe]===void 0&&(fe[oe]=Ae[oe]);return L(U,Me,fe)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(U){return{$$typeof:u,render:U}},Le.isValidElement=$,Le.lazy=function(U){return{$$typeof:h,_payload:{_status:-1,_result:U},_init:ae}},Le.memo=function(U,X){return{$$typeof:f,type:U,compare:X===void 0?null:X}},Le.startTransition=function(U){var X=R.T,ie={};R.T=ie;try{var oe=U(),fe=R.S;fe!==null&&fe(ie,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(M,ue)}catch(Me){ue(Me)}finally{X!==null&&ie.types!==null&&(X.types=ie.types),R.T=X}},Le.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},Le.use=function(U){return R.H.use(U)},Le.useActionState=function(U,X,ie){return R.H.useActionState(U,X,ie)},Le.useCallback=function(U,X){return R.H.useCallback(U,X)},Le.useContext=function(U){return R.H.useContext(U)},Le.useDebugValue=function(){},Le.useDeferredValue=function(U,X){return R.H.useDeferredValue(U,X)},Le.useEffect=function(U,X){return R.H.useEffect(U,X)},Le.useEffectEvent=function(U){return R.H.useEffectEvent(U)},Le.useId=function(){return R.H.useId()},Le.useImperativeHandle=function(U,X,ie){return R.H.useImperativeHandle(U,X,ie)},Le.useInsertionEffect=function(U,X){return R.H.useInsertionEffect(U,X)},Le.useLayoutEffect=function(U,X){return R.H.useLayoutEffect(U,X)},Le.useMemo=function(U,X){return R.H.useMemo(U,X)},Le.useOptimistic=function(U,X){return R.H.useOptimistic(U,X)},Le.useReducer=function(U,X,ie){return R.H.useReducer(U,X,ie)},Le.useRef=function(U){return R.H.useRef(U)},Le.useState=function(U){return R.H.useState(U)},Le.useSyncExternalStore=function(U,X,ie){return R.H.useSyncExternalStore(U,X,ie)},Le.useTransition=function(){return R.H.useTransition()},Le.version="19.2.7",Le}var XN;function sh(){return XN||(XN=1,j1.exports=See()),j1.exports}var _=sh();const F=lc(_),wee=s8({__proto__:null,default:F},[_]);function Cee(e,t={}){const n=_.useRef(e.get()),{keys:r,deps:o=[e,r]}=t,s=_.useCallback(u=>{const c=f=>{n.current!==f&&(n.current=f,u())};return c(e.value),r?.length?bJ(e,r,c):e.listen(c)},o),a=()=>n.current;return _.useSyncExternalStore(s,a,wJ(e)?()=>e.init:a)}function Eee(e){return`use${hee(e)}`}function _ee(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,hydrateSession:o,$fetch:s,$store:a,atomListeners:u}=dee(e),c={};for(const[f,h]of Object.entries(r))c[Eee(f)]=()=>Cee(h);return bee({...n,...c,hydrateSession:o,$fetch:s,$store:a},s,t,r,u)}const xee=10,ku=[],Iee=["x-correlation-id","x-request-id","x-amzn-requestid","x-amzn-trace-id","apigw-requestid","x-trace-id"];function Aee(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 Ree(e,t){return t?.method?t.method.toUpperCase():typeof e!="string"&&!(e instanceof URL)&&e.method?e.method.toUpperCase():"GET"}function Tee(e){for(const t of Iee){const n=e.headers.get(t);if(n)return n}}function Oee(e){ku.push(e),ku.length>xee&&ku.shift()}function JN(e){const{input:t,init:n,response:r,durationMs:o}=e;Oee({method:Ree(t,n),path:Aee(t),status:r?.status??0,durationMs:Math.round(o),correlationId:r?Tee(r):void 0,timestamp:new Date().toISOString()})}function Mee(){return ku.slice()}function Pee(){for(let e=ku.length-1;e>=0;e--){const t=ku[e];if(t.status===0||t.status>=400)return t}}class eA extends Error{constructor(t){super(t instanceof Error&&t.message?t.message:"The request could not be completed.",{cause:t}),this.name="NetworkError"}}const Nee=e=>typeof e=="object"&&e!==null&&"name"in e&&e.name==="AbortError",S$=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 JN({input:e,init:t,response:o,durationMs:performance.now()-n}),o}catch(r){throw Nee(r)?r:(JN({input:e,init:t,durationMs:performance.now()-n}),new eA(r))}},tA=()=>{try{return globalThis.sessionStorage??null}catch{return null}},Wv=()=>vc().betterAuthEnabled,kee="EMAIL_PASSWORD_SIGN_UP_DISABLED",Dee=e=>typeof e=="object"&&e!==null&&e.code===kee,Ga=_ee(),Lee=60,Uee=30,U_="remit.better-auth.token",$ee=()=>{const e=tA()?.getItem(U_);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},w$=e=>{const t=tA();if(t)try{if(!e){t.removeItem(U_);return}t.setItem(U_,JSON.stringify(e))}catch{}};let Ra=null,Tg=0;const Fee=()=>Ra||(Ra=$ee(),Ra),ka=()=>Math.floor(Date.now()/1e3),zee=e=>{const[,t]=e.split(".");if(!t)return ka();try{const n=JSON.parse(atob(t.replace(/-/g,"+").replace(/_/g,"/")));return typeof n.exp=="number"?n.exp:ka()}catch{return ka()}};class Og extends Error{status;constructor(t,n){super(t),this.name="AuthTokenError",this.status=n}}const jee=async()=>{const e=await S$("/api/auth/token",{credentials:"include"});if(!e.ok)throw new Og(`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 Og("The token endpoint returned no token")};let Ed=null;const Bee=()=>Ed||(Ed=jee().then(e=>(Ra={value:e,expiresAt:zee(e)},w$(Ra),Tg=0,e)).finally(()=>{Ed=null}),Ed),Hee=e=>e.expiresAt-Lee>ka(),ek=e=>e.expiresAt>ka(),qee=e=>e instanceof eA?!0:e instanceof Og?e.status===408||e.status===429||(e.status??0)>=500:!1,Vee=e=>e instanceof Og&&(e.status===401||e.status===403),Wee=async()=>{const e=Fee();if(e&&Hee(e)||e&&ek(e)&&ka()<Tg)return e.value;try{return await Bee()}catch(t){if(Vee(t))throw nA(),t.status===403&&Ga.$store.notify("$sessionSignal"),t;if(e&&ek(e)&&qee(t))return Tg=ka()+Uee,e.value;throw t}},nA=()=>{Tg=0,w$(null),Ra=null};const Gee=e=>e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function Kee(e,t,n=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:Gee(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}const Zee=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 Yee=e=>{const t=Zee(e);return t.charAt(0).toUpperCase()+t.slice(1)};const $_=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const Ea={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 B1(e){return e!=null}function Qee(e,t={}){const n=t.attributeNames??{},r=g=>n[g]??g,o=e.size??e.width??Ea.width,s=e.size??e.height??Ea.height,a=e.aliases?.filter(g=>typeof g=="string"&&g.trim()!=="").map(g=>`lucide-${g}`)??[],u=[...e.name?[`lucide-${e.name}`]:[],...a],c=t.className?.split(" ").filter(Boolean)??[],f=t.includeDefaultClasses===!1?$_(...c):$_("lucide",...u,...c),h=t.absoluteStrokeWidth?Number(t.strokeWidth??Ea["stroke-width"])*Number(e.size??e.width??Ea.width)/Number(t.size??t.width??Ea.width):t.strokeWidth??Ea["stroke-width"];return["svg",{...Object.entries(Ea).reduce((g,[v,w])=>(g[r(v)]=w,g),{}),..."color"in t&&t.color&&{[r("stroke")]:t.color},..."size"in t&&B1(t.size)&&{[r("width")]:t.size,[r("height")]:t.size},..."width"in t&&B1(t.width)&&{[r("width")]:t.width},..."height"in t&&B1(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,w,S]=g,C=t.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...w}:w;return S?[v,C,S]:[v,C]})]}function Xee(e,t={}){return Qee(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const Jee=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},ete=_.createContext({}),tte=()=>_.useContext(ete),nte=_.forwardRef(({color:e,size:t,width:n,height:r,strokeWidth:o,absoluteStrokeWidth:s,nonScalingStroke:a,className:u="",children:c,iconNode:f=[],icon:h={node:f,aliases:[],size:24},...m},g)=>{const{size:v=24,strokeWidth:w=2,absoluteStrokeWidth:S=!1,nonScalingStroke:C=!1,color:E="currentColor",className:I=""}=tte()??{},A=!!c||Jee(m),[T,N,M=[]]=Xee(h,{color:e??E,width:n??t??v,height:r??t??v,strokeWidth:o??w,absoluteStrokeWidth:s??S,nonScalingStroke:a??C,className:$_(I,u),hasA11yProp:A,attributes:m});return _.createElement(T,{ref:g,...N},[...M.map(([R,k])=>_.createElement(R,k)),...Array.isArray(c)?c:[c]])});function yt(e,t=[],n=[]){const r=typeof e=="string"?Kee(e,t,n):e,o=_.forwardRef(({className:s,...a},u)=>_.createElement(nte,{ref:u,icon:r,className:s,...a}));return r.name&&(o.displayName=Yee(r.name)),o}const C$={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"}]]};C$.node;const rte=yt(C$);const E$={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"}]]};E$.node;const ote=yt(E$);const _$={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};_$.node;const x$=yt(_$);const I$={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};I$.node;const ste=yt(I$);const A$={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"]};A$.node;const R$=yt(A$);const T$={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"}]]};T$.node;const ite=yt(T$);const O$={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"}]]};O$.node;const ate=yt(O$);const M$={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"}]]};M$.node;const lte=yt(M$);const P$={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"}]]};P$.node;const ute=yt(P$);const N$={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"}]]};N$.node;const cte=yt(N$);const k$={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"}]]};k$.node;const dte=yt(k$);const D$={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"]};D$.node;const fte=yt(D$);const L$={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"}]]};L$.node;const U$=yt(L$);const $$={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"}]]};$$.node;const hte=yt($$);const F$={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};F$.node;const z$=yt(F$);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 tk=yt(j$);const B$={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"}]]};B$.node;const pte=yt(B$);const H$={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"]};H$.node;const rA=yt(H$);const q$={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"}]]};q$.node;const mte=yt(q$);const V$={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};V$.node;const gte=yt(V$);const W$={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"}]]};W$.node;const vte=yt(W$);const G$={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"]};G$.node;const yte=yt(G$);const K$={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"}]]};K$.node;const bte=yt(K$);const Z$={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"}]]};Z$.node;const Ste=yt(Z$);const Y$={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"]};Y$.node;const wte=yt(Y$);const Q$={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"]};Q$.node;const oA=yt(Q$);const X$={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"}]]};X$.node;const Cte=yt(X$);const J$={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"}]]};J$.node;const Ete=yt(J$);const eF={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"}]]};eF.node;const _te=yt(eF);const tF={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};tF.node;const F_=yt(tF);function nF(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=nF(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function xte(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=nF(e))&&(r&&(r+=" "),r+=t);return r}const sA="-",Ite=e=>{const t=Rte(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const u=a.split(sA);return u[0]===""&&u.length!==1&&u.shift(),rF(u,t)||Ate(a)},getConflictingClassGroupIds:(a,u)=>{const c=n[a]||[];return u&&r[a]?[...c,...r[a]]:c}}},rF=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?rF(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(sA);return t.validators.find(({validator:a})=>a(s))?.classGroupId},nk=/^\[(.+)\]$/,Ate=e=>{if(nk.test(e)){const t=nk.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Rte=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Ote(Object.entries(e.classGroups),n).forEach(([s,a])=>{z_(a,r,s,t)}),r},z_=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:rk(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(Tte(o)){z_(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,a])=>{z_(a,rk(t,s),n,r)})})},rk=(e,t)=>{let n=e;return t.split(sA).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Tte=e=>e.isThemeGetter,Ote=(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,u])=>[t+a,u])):s);return[n,o]}):e,Mte=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)}}},oF="!",Pte=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,a=u=>{const c=[];let f=0,h=0,m;for(let C=0;C<u.length;C++){let E=u[C];if(f===0){if(E===o&&(r||u.slice(C,C+s)===t)){c.push(u.slice(h,C)),h=C+s;continue}if(E==="/"){m=C;continue}}E==="["?f++:E==="]"&&f--}const g=c.length===0?u:u.substring(h),v=g.startsWith(oF),w=v?g.substring(1):g,S=m&&m>h?m-h:void 0;return{modifiers:c,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:S}};return n?u=>n({className:u,parseClassName:a}):a},Nte=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},kte=e=>({cache:Mte(e.cacheSize),parseClassName:Pte(e),...Ite(e)}),Dte=/\s+/,Lte=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],a=e.trim().split(Dte);let u="";for(let c=a.length-1;c>=0;c-=1){const f=a[c],{modifiers:h,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}=n(f);let w=!!v,S=r(w?g.substring(0,v):g);if(!S){if(!w){u=f+(u.length>0?" "+u:u);continue}if(S=r(g),!S){u=f+(u.length>0?" "+u:u);continue}w=!1}const C=Nte(h).join(":"),E=m?C+oF:C,I=E+S;if(s.includes(I))continue;s.push(I);const A=o(S,w);for(let T=0;T<A.length;++T){const N=A[T];s.push(E+N)}u=f+(u.length>0?" "+u:u)}return u};function Ute(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=sF(t))&&(r&&(r+=" "),r+=n);return r}const sF=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=sF(e[r]))&&(n&&(n+=" "),n+=t);return n};function $te(e,...t){let n,r,o,s=a;function a(c){const f=t.reduce((h,m)=>m(h),e());return n=kte(f),r=n.cache.get,o=n.cache.set,s=u,u(c)}function u(c){const f=r(c);if(f)return f;const h=Lte(c,n);return o(c,h),h}return function(){return s(Ute.apply(null,arguments))}}const Lt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},iF=/^\[(?:([a-z-]+):)?(.+)\]$/i,Fte=/^\d+\/\d+$/,zte=new Set(["px","full","screen"]),jte=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bte=/\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$/,Hte=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,qte=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vte=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gs=e=>Du(e)||zte.has(e)||Fte.test(e),Si=e=>yc(e,"length",Jte),Du=e=>!!e&&!Number.isNaN(Number(e)),H1=e=>yc(e,"number",Du),_d=e=>!!e&&Number.isInteger(Number(e)),Wte=e=>e.endsWith("%")&&Du(e.slice(0,-1)),je=e=>iF.test(e),wi=e=>jte.test(e),Gte=new Set(["length","size","percentage"]),Kte=e=>yc(e,Gte,aF),Zte=e=>yc(e,"position",aF),Yte=new Set(["image","url"]),Qte=e=>yc(e,Yte,tne),Xte=e=>yc(e,"",ene),xd=()=>!0,yc=(e,t,n)=>{const r=iF.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Jte=e=>Bte.test(e)&&!Hte.test(e),aF=()=>!1,ene=e=>qte.test(e),tne=e=>Vte.test(e),nne=()=>{const e=Lt("colors"),t=Lt("spacing"),n=Lt("blur"),r=Lt("brightness"),o=Lt("borderColor"),s=Lt("borderRadius"),a=Lt("borderSpacing"),u=Lt("borderWidth"),c=Lt("contrast"),f=Lt("grayscale"),h=Lt("hueRotate"),m=Lt("invert"),g=Lt("gap"),v=Lt("gradientColorStops"),w=Lt("gradientColorStopPositions"),S=Lt("inset"),C=Lt("margin"),E=Lt("opacity"),I=Lt("padding"),A=Lt("saturate"),T=Lt("scale"),N=Lt("sepia"),M=Lt("skew"),R=Lt("space"),k=Lt("translate"),L=()=>["auto","contain","none"],q=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",je,t],D=()=>[je,t],j=()=>["",gs,Si],Z=()=>["auto",Du,je],he=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>["start","end","center","between","around","evenly","stretch"],ue=()=>["","0",je],Ce=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[Du,je];return{cacheSize:500,separator:":",theme:{colors:[xd],spacing:[gs,Si],blur:["none","",wi,je],brightness:U(),borderColor:[e],borderRadius:["none","","full",wi,je],borderSpacing:D(),borderWidth:j(),contrast:U(),grayscale:ue(),hueRotate:U(),invert:ue(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[Wte,Si],inset:$(),margin:$(),opacity:U(),padding:D(),saturate:U(),scale:U(),sepia:ue(),skew:U(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",je]}],container:["container"],columns:[{columns:[wi]}],"break-after":[{"break-after":Ce()}],"break-before":[{"break-before":Ce()}],"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:[...he(),je]}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",_d,je]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",je]}],grow:[{grow:ue()}],shrink:[{shrink:ue()}],order:[{order:["first","last","none",_d,je]}],"grid-cols":[{"grid-cols":[xd]}],"col-start-end":[{col:["auto",{span:["full",_d,je]},je]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[xd]}],"row-start-end":[{row:["auto",{span:[_d,je]},je]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",je]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",je]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...ae()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ae(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ae(),"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:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",je,t]}],"min-w":[{"min-w":[je,t,"min","max","fit"]}],"max-w":[{"max-w":[je,t,"none","full","min","max","fit","prose",{screen:[wi]},wi]}],h:[{h:[je,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[je,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[je,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[je,t,"auto","min","max","fit"]}],"font-size":[{text:["base",wi,Si]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",H1]}],"font-family":[{font:[xd]}],"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",je]}],"line-clamp":[{"line-clamp":["none",Du,H1]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",gs,je]}],"list-image":[{"list-image":["none",je]}],"list-style-type":[{list:["none","disc","decimal",je]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",gs,Si]}],"underline-offset":[{"underline-offset":["auto",gs,je]}],"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:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je]}],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",je]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...he(),Zte]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Kte]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Qte]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"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:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:B()}],"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:["",...B()]}],"outline-offset":[{"outline-offset":[gs,je]}],"outline-w":[{outline:[gs,Si]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[gs,Si]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",wi,Xte]}],"shadow-color":[{shadow:[xd]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",wi,je]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[m]}],saturate:[{saturate:[A]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"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",je]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",je]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",je]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[_d,je]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",je]}],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",je]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",je]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[gs,Si,H1]}],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"]}}},rne=$te(nne);function rn(...e){return rne(xte(e))}var q1={exports:{}},zn={};var ok;function one(){if(ok)return zn;ok=1;var e=sh();function t(c){var f="https://react.dev/errors/"+c;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 #"+c+"; 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(c,f,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:m==null?null:""+m,children:c,containerInfo:f,implementation:h}}var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(c,f){if(c==="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(c,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(c,f,null,h)},zn.flushSync=function(c){var f=a.T,h=r.p;try{if(a.T=null,r.p=2,c)return c()}finally{a.T=f,r.p=h,r.d.f()}},zn.preconnect=function(c,f){typeof c=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(c,f))},zn.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},zn.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var h=f.as,m=u(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(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:v}):h==="script"&&r.d.X(c,{crossOrigin:m,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},zn.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=u(f.as,f.crossOrigin);r.d.M(c,{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(c)},zn.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,m=u(h,f.crossOrigin);r.d.L(c,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(c,f){if(typeof c=="string")if(f){var h=u(f.as,f.crossOrigin);r.d.m(c,{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(c)},zn.requestFormReset=function(c){r.d.r(c)},zn.unstable_batchedUpdates=function(c,f){return c(f)},zn.useFormState=function(c,f,h){return a.H.useFormState(c,f,h)},zn.useFormStatus=function(){return a.H.useHostTransitionStatus()},zn.version="19.2.7",zn}var sk;function lF(){if(sk)return q1.exports;sk=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(),q1.exports=one(),q1.exports}var sne=lF();const Id={action:null,nextPrefix:null,preventDefault:!1},ine={b:"goBrief",i:"goInbox",s:"goSent",f:"goFlagged",",":"goSettings"},ane={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 lne(e,t){const n=e.key.toLowerCase(),r=e.metaKey||e.ctrlKey;if(e.inEditable)return{...Id,nextPrefix:t==="g"?null:t};if(e.onControl&&(n==="enter"||n===" "))return{...Id,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{...Id,nextPrefix:t==="g"?null:t};if(n==="escape")return{action:"back",nextPrefix:null,preventDefault:!1};if(t==="g"){const a=ine[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=ane[n];if(o){const s=o.requireShift===!0,a=n.length===1&&!/[a-z0-9]/.test(n);return!s&&e.shiftKey&&!a?Id:{action:o.action,nextPrefix:null,preventDefault:!0}}return Id}function une(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable}const cne="data-message-row",dne='button, a[href], summary, [role="button"], [role="menuitem"], [role="tab"], [role="switch"], [role="checkbox"]';function fne(e){if(!(e instanceof HTMLElement))return!1;const t=e.closest(dne);return t?!t.hasAttribute(cne):!1}const hne=["reply","replyAll","forward","delete","toggleStar","toggleRead","muteSender","blockSender","vipSender","markJunk"],pne=["focusNext","focusPrevious","focusFirst","focusLast","openFocused","toggleSelect","extendSelectDown","extendSelectUp","selectAll","toggleDensity"],En=(e,...t)=>({action:e,requires:t});En("help"),En("goBrief",{listIsNot:"brief"}),En("goFlagged",{listIsNot:"flagged"}),En("goInbox",{listIsNot:"inbox"}),En("goSent",{listIsNot:"sent"}),En("goSettings"),En("compose"),En("focusSearch"),En("toggleIntelligence"),[...pne.map(e=>En(e,"listVisible")),...hne.map(e=>En(e,"aimed")),En("back","selection")],En("focusNext","threadOpen",{not:"listVisible"}),En("focusPrevious","threadOpen",{not:"listVisible"}),En("reply","threadOpen"),En("replyAll","threadOpen"),En("forward","threadOpen"),En("back");function mne(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 gne="[data-escape-owner]";let Hu=[],vne=0;const yne=()=>++vne;function uF(){const[e]=_.useState(yne);return e}const bne=(e,t)=>e.depth-t.depth;function Sne(){return[...Hu].sort(bne).map(e=>({id:e.id,handles:Object.entries(e.run()).filter(([,t])=>t).map(([t])=>t)}))}function wne(){let e;for(const t of Hu)(!e||t.depth>e.depth)&&(e=t);return e}function A6e(e){return mne(e,Sne())}function Cne(e){if(e.key==="Escape"){const t=document.activeElement;return t instanceof Element&&t.closest(gne)?null:"back"}return lne({key:e.key,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,inEditable:une(e.target),onControl:fne(e.target)},null).action}function ik(e){const t=wne();if(!t)return;const n=Cne(e);if(!n)return;const r=t.run()[n];r&&(e.preventDefault(),e.stopImmediatePropagation(),r())}function ak(e){const t=Hu.length===0;if(Hu=e,t!==(e.length===0)){if(e.length>0){window.addEventListener("keydown",ik,!0);return}window.removeEventListener("keydown",ik,!0)}}function Gv({id:e,open:t,answers:n={}}){const r=_.useRef(n);r.current=n;const o=uF();_.useEffect(()=>{if(!t)return;const s={id:e,depth:o,run:()=>r.current};return ak([...Hu,s]),()=>{ak(Hu.filter(a=>a!==s))}},[e,t,o])}const cF="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",dF={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"},fF={sm:"h-7 px-2.5 text-xs",md:"h-9 px-3.5 text-sm",touch:"h-11 w-11 text-sm"};function Jr({variant:e="primary",size:t="md",icon:n,className:r,children:o,ref:s,...a}){return O.jsxs("button",{type:"button",ref:s,className:rn(cF,dF[e],fF[t],r),...a,children:[n,o]})}function R6e({variant:e="primary",size:t="md",icon:n,external:r,className:o,children:s,...a}){return O.jsxs("a",{className:rn(cF,dF[e],fF[t],o),...r?{target:"_blank",rel:"noopener noreferrer"}:{},...a,children:[n,s]})}const Ene='a[href], button, input, select, textarea, iframe, [tabindex], [contenteditable]:not([contenteditable="false"])';function _ne(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 lk(e){const t=e.querySelectorAll('[role="dialog"][aria-modal="true"]');return[...(t[t.length-1]??e).querySelectorAll(Ene)].filter(_ne)}const j_=new Set;function xne(e){for(const t of j_)if(t>e)return!1;return!0}function Ine(e,t){return!(t instanceof HTMLElement)||t===document.body||t===document.documentElement?!1:!e.contains(t)}function Kv(e,t){const n=uF();_.useEffect(()=>{if(t)return j_.add(n),()=>{j_.delete(n)}},[t,n]),_.useEffect(()=>{if(!t)return;const r=document.activeElement instanceof HTMLElement?document.activeElement:null,o=e.current;return o&&(lk(o)[0]??o).focus(),()=>{r?.isConnected&&r.focus()}},[t,e]),_.useEffect(()=>{if(!t)return;const r=o=>{if(o.key!=="Tab"||o.defaultPrevented||!xne(n))return;const s=e.current;if(!s)return;const a=document.activeElement;if(Ine(s,a))return;const u=lk(s),c=u[0],f=u.at(-1);if(!c||!f){o.preventDefault(),s.focus();return}const h=a instanceof HTMLElement&&u.includes(a);if(o.shiftKey){(!h||a===c)&&(o.preventDefault(),f.focus());return}(!h||a===f)&&(o.preventDefault(),c.focus())};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[t,e,n])}const Ane=({label:e,onDismiss:t,className:n})=>O.jsx("button",{type:"button","aria-label":e,tabIndex:-1,onClick:t,className:rn("absolute inset-0 bg-canvas/80",n)}),Rne={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"},Tne={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"},One={info:"status",success:"status",warning:"alert",danger:"alert"};function Yr({tone:e="info",variant:t="framed",onDismiss:n,role:r,className:o,children:s,...a}){const u=t==="soft";return O.jsxs("div",{role:r??One[e],className:rn("flex gap-2 px-3 py-2 text-sm",u?rn("items-start rounded-md",Tne[e]):rn("items-center border",Rne[e]),o),...a,children:[O.jsx("div",{className:"flex-1 min-w-0",children:s}),n&&(u?O.jsx(Jr,{variant:"ghost",size:"sm",icon:O.jsx(F_,{className:"size-3.5"}),onClick:n,"aria-label":"Dismiss",className:"-mr-1 shrink-0"}):O.jsx("button",{type:"button",onClick:n,"aria-label":"Dismiss",className:"shrink-0 rounded-md p-1 hover:bg-fg/10 transition-colors",children:O.jsx(F_,{className:"size-4","aria-hidden":"true"})}))]})}function uk({open:e,onClose:t,title:n,children:r,className:o,anchor:s="center"}){const a=_.useRef(null);if(Gv({id:"dialog",open:e,answers:{back:t}}),Kv(a,e),!e)return null;const u=s==="left",c=s==="right";return O.jsxs("div",{className:rn("fixed inset-0 z-50 flex",u?"items-stretch justify-start":c?"items-stretch justify-end":"items-center justify-center px-4"),children:[O.jsx(Ane,{label:"Dismiss dialog",onDismiss:t}),O.jsxs("div",{ref:a,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title",tabIndex:-1,className:rn("relative z-10 overflow-hidden border-line bg-surface shadow-xl",u?"safe-area-frame h-full w-72 max-w-[85vw] border-r":c?"safe-area-frame h-full w-[80vw] max-w-[320px] border-l":"w-full max-w-lg rounded-md border",o),children:[O.jsx("h2",{id:"dialog-title",className:"sr-only",children:n}),r]})]})}function hF({children:e,label:t}){return O.jsxs("span",{className:"relative inline-flex",children:[e,t!==void 0&&O.jsxs(O.Fragment,{children:[O.jsx("span",{"data-testid":"attention-dot",className:"absolute -right-1 -top-1 size-2 rounded-full bg-accent-2"}),O.jsx("span",{className:"sr-only",children:t})]})]})}function Zv({children:e,className:t}){return O.jsx("div",{"data-auth-page":!0,className:rn("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:O.jsx("div",{className:"w-full max-w-[26rem]",children:e})})}const Mne="Secure sign-in powered by AWS Cognito";function iA(e){const t=e?.note??"Secure sign-in";return O.jsx("div",{className:"text-center pt-5",children:O.jsx("p",{className:"text-xs text-fg-muted",children:t})})}const Pne=()=>O.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:[O.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),O.jsx("path",{d:"M3 7l9 6 9-6"})]});function Yv({wordmark:e="remit,",tagline:t="your email client in the cloud.",mark:n=O.jsx(Pne,{})}){return O.jsxs("div",{className:"text-center pb-6",children:[O.jsx("div",{className:"flex items-center justify-center pb-3",children:n}),O.jsx("h1",{className:"text-[1.75rem] font-semibold tracking-[-0.01em] text-fg",children:e}),O.jsx("p",{className:"mt-1 text-sm text-fg-muted",children:t})]})}const Nne={default:rn("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 wf({icon:e,className:t,variant:n="default",trailing:r,ref:o,...s}){return O.jsxs("div",{className:rn(Nne[n],t),children:[e&&O.jsx("span",{className:"text-fg-subtle shrink-0",children:e}),O.jsx("input",{ref:o,className:"min-w-0 flex-1 bg-transparent text-fg placeholder:text-fg-subtle outline-none",...s}),r]})}const kne={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"}},Dne={error:R$,warning:oA,info:hte},Lne={error:"Error",warning:"Warning",info:"Information"},Une=({id:e,severity:t,title:n,detail:r,action:o,onDismiss:s})=>{const a=kne[t],u=Dne[t];return O.jsxs("div",{role:t==="error"?"alert":"status","aria-live":t==="error"?"assertive":"polite",className:rn("pointer-events-auto flex items-start gap-3 rounded-md border bg-canvas px-3 py-2 shadow-lg",a.container),children:[O.jsx(u,{className:rn("size-5 shrink-0 mt-0.5",a.icon),"aria-hidden":"true"}),O.jsxs("div",{className:"flex-1 min-w-0",children:[O.jsx("p",{className:rn("text-sm font-medium",a.title),children:n}),r&&O.jsx("p",{className:"mt-0.5 text-xs text-fg-muted break-words",children:r}),o&&O.jsx("a",{href:o.href,target:"_blank",rel:"noopener noreferrer",className:"mt-1 inline-block text-xs font-medium text-accent-2 underline underline-offset-2",children:o.label})]}),O.jsx("button",{type:"button",onClick:()=>s(e),className:"shrink-0 rounded-md p-1 text-fg-muted hover:bg-surface-raised hover:text-fg transition-colors","aria-label":`Dismiss ${Lne[t].toLowerCase()}`,children:O.jsx(F_,{className:"size-4","aria-hidden":"true"})})]})},$ne=({errors:e,onDismiss:t})=>e.length===0?null:O.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:O.jsx("div",{className:"flex w-full max-w-md flex-col gap-2",children:e.map(n=>O.jsx(Une,{id:n.id,severity:n.severity,title:n.title,detail:n.detail,action:n.action,onDismiss:t},n.id))})});function Fne({className:e,children:t,...n}){return O.jsx("label",{className:rn("mb-1 block text-xs font-medium text-fg-muted",e),...n,children:t})}const zne="Matches on what the messages say about themselves — sender, subject, list. No reading involved.",jne={From:"From",Subject:"Subject",HasWords:"Has the words",ListId:"List",FromDomain:"Domain"};function Bne(e){return jne[e]}const Hne={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 T6e(e){return Hne[e]}function qne(e){return e==="HasWords"}function pF(e){return e.clauses.length>0}function mF(e){return e.clauses.filter(t=>qne(t.field))}const O6e=["From","Subject","HasWords","ListId","FromDomain"],Vne={all:"Match all",any:"Match any"};function M6e(e){return Vne[e]}function Wne(e){return e==="all"?"and":"or"}function P6e(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 Gne={once:"Just once",standing:"Keep doing this",until:"Until a date"};function N6e(e){return Gne[e]}function k6e(e){return e==="once"?"Apply now":e==="standing"?"Save rule":"Save until then"}const Kr={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."},D6e="Can't count matches — “has the words” reads message bodies, which only a saved rule does.";function gF(e){if(e.status==="loading")return Kr.counting;if(e.status==="ready"&&e.stale)return Kr.recounting}function L6e(e,t){return pF(e)?e.scope==="once"&&mF(e).length>0?Kr.bodyTextOnce:!e.moveMailboxId&&!e.labelId?Kr.noAction:(e.scope==="standing"||e.scope==="until")&&(e.name??"").trim()===""?Kr.unnamed:e.scope==="until"&&!e.until?Kr.noUntilDate:gF(t):Kr.noMatch}const aA=(e,t)=>t.length===0?[e]:e.split(t),Kne=(e,t)=>{const n=aA(e,t);return n[n.length-1]||e},Cf=(e,t)=>{if(t.length===0)return"";const n=e.lastIndexOf(t);return n===-1?"":e.slice(0,n)},vF=(e,t)=>aA(e,t).length-1,Ef=(e,t)=>{const n=[];let r=e,o=Cf(r,t);for(;o&&o.length<r.length;)n.push(o),r=o,o=Cf(r,t);return n},Zne=(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 u of e)Cf(u.path,t)===a.path&&s(u)}};for(const a of e){const u=Cf(a.path,t);u&&n.has(u)||s(a)}return o},yF=(e,t)=>e.label.toLowerCase().includes(t)||e.path.toLowerCase().includes(t),Yne=(e,t,n)=>{const r=new Set;if(!t)return r;for(const o of e)if(yF(o,t))for(const s of Ef(o.path,n))r.add(s);return r},Qne=(e,t,n,r=new Set)=>{const o=(u,c)=>({folder:u,depth:vF(u.path,n),context:c,expanded:r.has(u.path)});if(!t)return e.map(u=>o(u,!1));const s=new Set;for(const u of e)yF(u,t)&&s.add(u.path);const a=new Set(s);for(const u of s)for(const c of Ef(u,n))a.add(c);return e.filter(u=>a.has(u.path)).map(u=>o(u,!s.has(u.path)))},Xne=(e,t,n)=>{const r=new Set(e.map(o=>o.path));return e.filter(o=>Ef(o.path,n).every(s=>!r.has(s)||t.has(s))).map(o=>({folder:o,depth:vF(o.path,n),context:!1,expanded:t.has(o.path)}))},Jne=(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},ere=e=>typeof e=="object"&&e!==null&&"name"in e&&e.name==="AbortError",Do=e=>e!==void 0&&!e.context,V1=e=>e!==void 0&&!e.folder.isCurrent&&!e.context,W1=e=>{for(let t=0;t<e.length;t+=1)if(Do(e[t]))return t;return-1},tre=e=>{for(let t=e.length-1;t>=0;t-=1)if(Do(e[t]))return t;return-1},ck=(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(Do(e[a]))return a}return-1},nre=(e,t,n)=>{const r=e[t];if(!r)return-1;const o=Cf(r.folder.path,n);if(!o)return-1;for(let s=t-1;s>=0;s-=1)if(e[s]?.folder.path===o)return Do(e[s])?s:-1;return-1},B_="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",bF=14,rre=60,H_=({depth:e})=>e>0?O.jsx("span",{"aria-hidden":"true",className:"shrink-0",style:{width:e*bF}}):null,q_=({depth:e})=>O.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute right-0 bottom-0 h-px bg-line",style:{left:rre+e*bF}}),ore=({label:e,depth:t,expanded:n,ariaLabel:r,selected:o=!1,context:s=!1,current:a=!1,currentTag:u,messageCount:c,failure:f,separated:h=!1,actions:m,tabIndex:g,onActivate:v,onFocus:w,ref:S})=>{const C=O.jsx(ste,{className:rn("size-4 shrink-0 text-fg-subtle transition-transform",n&&"rotate-90"),"aria-hidden":"true"}),E=O.jsx(ute,{className:"size-4 shrink-0 text-fg-subtle","aria-hidden":"true"}),I=c===void 0?null:O.jsxs("span",{"aria-hidden":"true",className:"shrink-0 text-2xs text-fg-subtle",children:[c," ",c===1?"msg":"msgs"]}),A=O.jsxs("span",{className:"min-w-0 flex-1",children:[O.jsx("span",{className:"block truncate",children:e}),f&&O.jsxs("span",{className:"flex items-center gap-1 text-2xs text-danger",children:[O.jsx(R$,{className:"size-3 shrink-0","aria-hidden":"true"}),O.jsx("span",{className:"truncate",children:f})]})]}),T=f?`${r} — ${f}`:r;return s?O.jsxs("div",{className:"relative flex items-center",children:[O.jsxs("div",{role:"treeitem","aria-level":t+1,"aria-selected":!1,"aria-expanded":n,"aria-label":T,className:rn(B_,"opacity-60"),children:[O.jsx(H_,{depth:t}),C,E,A,I]}),m,h&&O.jsx(q_,{depth:t})]}):O.jsxs("div",{className:"relative flex items-center",children:[O.jsxs("button",{ref:S,type:"button",role:"treeitem","aria-level":t+1,"aria-selected":o,"aria-expanded":n,"aria-current":a?"true":void 0,"aria-label":T,tabIndex:g,onClick:v,onFocus:w,className:rn(B_,"hover:bg-surface-raised active:bg-surface-sunken",a&&"text-fg-muted"),children:[O.jsx(H_,{depth:t}),C,E,A,I,a&&u&&O.jsx("span",{className:"shrink-0 text-xs text-fg-muted",children:u}),o&&O.jsx(x$,{className:"size-4 shrink-0 text-accent","aria-hidden":"true"})]}),m,h&&O.jsx(q_,{depth:t})]})},dk=({label:e,ariaLabel:t,depth:n=0,prominence:r="prominent",separated:o=!1,onOpen:s})=>O.jsxs("div",{className:rn("relative",r==="prominent"&&"p-2"),children:[O.jsxs("button",{type:"button",onClick:s,"aria-label":t,"data-prominence":r,className:rn(B_,"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:[O.jsx(H_,{depth:n}),O.jsx("span",{"aria-hidden":"true",className:"size-4 shrink-0"}),O.jsx(cte,{className:"size-4 shrink-0","aria-hidden":"true"}),O.jsx("span",{className:"min-w-0 flex-1 truncate",children:e})]}),o&&O.jsx(q_,{depth:n})]}),SF={nameLabel:"Folder name",namePlaceholder:"Hotels",insideLabel:"Inside",create:"Create folder",cancel:"Cancel",createPending:"Creating folder…"},sre=({parentLabel:e,name:t,onNameChange:n,onSubmit:r,onCancel:o,pending:s=!1,error:a,labels:u})=>{const c={...SF,...u},f=_.useId(),h=_.useRef(null),m=_.useRef(null);return _.useEffect(()=>{h.current?.focus({preventScroll:!0}),m.current?.scrollIntoView({block:"nearest"})},[]),O.jsxs("div",{ref:m,className:"space-y-3 border-y border-line bg-surface-sunken px-3 py-3",children:[O.jsxs("div",{children:[O.jsx(Fne,{htmlFor:f,children:c.nameLabel}),O.jsx(wf,{id:f,ref:h,value:t,placeholder:c.namePlaceholder,onChange:g=>n(g.target.value),onKeyDown:g=>{g.key==="Enter"&&(g.preventDefault(),r()),g.key==="Escape"&&(g.preventDefault(),o())}})]}),O.jsxs("p",{className:"text-xs text-fg-muted",children:[c.insideLabel," ",O.jsx("span",{className:"font-medium text-fg",children:e})]}),a&&O.jsx("p",{className:"text-xs text-danger",role:"alert",children:a}),O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(Jr,{variant:"ghost",size:"md",onClick:o,className:"min-h-11 shrink-0",children:c.cancel}),O.jsx(Jr,{variant:"secondary",size:"md",onClick:r,disabled:s,className:"min-h-11 shrink-0",children:s?c.createPending:c.create})]})]})},ire={...SF,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."},are=({folders:e,selectedId:t,onSelect:n,rowActions:r,rowFailure:o,onCreateFolder:s,onCancel:a,delimiter:u="/",labels:c,autoFocusFilter:f=!1})=>{const h={...ire,...c},[m,g]=_.useState(""),[v,w]=_.useState(()=>{const se=e.find(we=>we.id===t);return new Set(se?Ef(se.path,u):[])}),[S,C]=_.useState(null),[E,I]=_.useState(""),[A,T]=_.useState(),[N,M]=_.useState(!1),[R,k]=_.useState(-1),L=_.useRef([]),q=_.useRef(null),$=_.useRef(!1),D=_.useRef(null);_.useEffect(()=>()=>D.current?.abort(),[]),_.useEffect(()=>{f&&q.current?.focus()},[f]);const j=m.trim().toLowerCase(),Z=_.useMemo(()=>Zne(e,u),[e,u]),he=_.useMemo(()=>{const se=Yne(Z,j,u);return se.size===0?v:new Set([...v,...se])},[Z,v,j,u]),B=_.useMemo(()=>j?Qne(Z,j,u,he):Xne(Z,he,u),[Z,j,u,he]),Q=_.useMemo(()=>s?Jne(B,u):void 0,[B,u,s]);_.useEffect(()=>{k(se=>Do(B[se])?se:W1(B))},[B]),_.useEffect(()=>{$.current&&($.current=!1,!(R<0)&&L.current[R]?.focus())},[R]);const ae=_.useCallback((se,we)=>{w(Ze=>{if(we)return new Set([...Ef(se,u),se]);const ve=new Set(Ze);return ve.delete(se),ve})},[u]),ue=_.useCallback(se=>{V1(se)&&n?.(se.folder.id),ae(se.folder.path,!se.expanded)},[n,ae]),Ce=_.useCallback(()=>{D.current?.abort(),C(null),I(""),T(void 0),M(!1)},[]),U=_.useCallback(se=>{D.current?.abort(),C({anchorId:se?.id??null,parentPath:se?.path??"",parentLabel:se?.label??h.topLevel}),I(""),T(void 0),M(!1)},[h.topLevel]),X=_.useCallback(()=>{if(!s||!S||N)return;const se=E.trim();if(se===""){T(h.nameRequired);return}M(!0),T(void 0),D.current?.abort();const we=new AbortController;D.current=we;const Ze=S.parentPath;s(se,Ze,we.signal).then(ve=>{M(!1),C(null),I(""),Ze&&ae(Ze,!0),n?.(ve.id)}).catch(ve=>{ere(ve)||(T(ve instanceof Error?ve.message:h.createError),M(!1))})},[s,S,N,E,n,ae,h.nameRequired,h.createError]),ie=_.useCallback(se=>{const we=se.target;if(!(we instanceof Element)||!we.closest('[role="treeitem"]'))return;const Ze=pt=>{se.preventDefault(),$.current=!0,k(pt)},ve=B[R];switch(se.key){case"ArrowDown":return Ze(ck(B,R,1));case"ArrowUp":return Ze(ck(B,R,-1));case"Home":return Ze(W1(B));case"End":return Ze(tre(B));case"ArrowRight":{if(!Do(ve)||!ve)return;if(se.preventDefault(),!ve.expanded){ae(ve.folder.path,!0);return}const pt=R+1;Do(B[pt])&&Ze(pt);return}case"ArrowLeft":{if(!Do(ve)||!ve)return;if(se.preventDefault(),ve.expanded){ae(ve.folder.path,!1);return}const pt=nre(B,R,u);pt>=0&&Ze(pt);return}case"Enter":case" ":{if(!Do(ve)||!ve)return;se.preventDefault(),ue(ve);return}case"Escape":se.preventDefault(),a?.();return;default:return}},[B,R,u,ue,ae,a]),oe=S!==null&&S.anchorId!==null&&(Q?.some(se=>se.kind==="create"&&se.parent.id===S.anchorId)??!1),fe=S&&O.jsx(sre,{parentLabel:S.parentLabel,name:E,onNameChange:se=>{I(se),T(void 0)},onSubmit:X,onCancel:Ce,pending:N,error:A,labels:h}),Me=se=>se.context?`${se.folder.label} ${h.contextSuffix}`:V1(se)?h.optionLabel(se.folder):`${se.folder.label} ${h.currentSuffix}`,Ae=(se,we,Ze)=>{const{folder:ve,depth:pt}=se,mt=V1(se);return O.jsx(ore,{ref:Ye=>{L.current[we]=Ye},label:ve.label,depth:pt,expanded:se.expanded,context:se.context,current:ve.isCurrent,currentTag:h.currentTag,messageCount:ve.messageCount,selected:mt&&ve.id===t,separated:Ze,failure:o?.(ve),actions:r?.(ve),ariaLabel:Me(se),tabIndex:we===R?0:-1,onActivate:()=>ue(se),onFocus:()=>k(we)})};return O.jsxs("div",{className:"flex min-h-0 w-full min-w-0 flex-col",children:[O.jsx(wf,{ref:q,variant:"inline",className:"border-b border-line px-3 py-2",icon:O.jsx(gte,{className:"size-4","aria-hidden":"true"}),type:"search",value:m,onChange:se=>g(se.target.value),onKeyDown:se=>{if(se.key==="Escape"){se.preventDefault(),a?.();return}if(se.key!=="ArrowDown")return;se.preventDefault();const we=Do(B[R])?R:W1(B);we<0||($.current=!0,k(we),L.current[we]?.focus())},placeholder:h.filterPlaceholder,"aria-label":h.filterAriaLabel}),s&&O.jsx("div",{className:"shrink-0 border-b border-line","data-create-anchor":"top",children:S&&!oe?fe:O.jsx(dk,{label:h.newFolder,ariaLabel:h.newFolder,prominence:"prominent",onOpen:()=>U(null)})}),B.length===0?O.jsx("p",{className:"px-3 py-3 text-sm text-fg-muted","aria-live":"polite",children:e.length===0?h.noFolders:h.emptyMessage(m)}):O.jsx("div",{role:"tree","aria-label":h.treeAriaLabel,className:"min-h-0 flex-1 overflow-y-auto overflow-x-hidden pb-24",onKeyDown:ie,children:(Q??B.map((se,we)=>({kind:"folder",row:se,index:we}))).map((se,we,Ze)=>{const ve=we<Ze.length-1;return se.kind==="create"?O.jsx("div",{role:"none","data-create-anchor":se.parent.id,children:S?.anchorId===se.parent.id?fe:O.jsx(dk,{label:h.newFolder,ariaLabel:h.newSubfolder(se.parent.label),depth:se.depth,prominence:"quiet",separated:ve,onOpen:()=>U(se.parent)})},`new:${se.parent.id}`):O.jsx("div",{role:"none",children:Ae(se.row,se.index,ve)},se.row.folder.id)})})]})},lre={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Spam",trash:"Trash",flagged:"Starred",all:"All Mail"};function ure(e){return lre[e]}const cre=new Set(["all","flagged"]);function dre(e){return cre.has(e)}const fre=new Set(["[Gmail]","[Google Mail]"]);function hre(e){if(e.role)return dre(e.role)?void 0:ure(e.role);if(!e.providerPath)return;const t=aA(e.providerPath,e.hierarchyDelimiter);if(!fre.has(t[0]))return Kne(e.providerPath,e.hierarchyDelimiter)}function U6e(e){return e==="inbox"?O.jsx(U$,{className:"size-4"}):e==="drafts"?O.jsx(lte,{className:"size-4"}):e==="sent"?O.jsx(vte,{className:"size-4"}):e==="archive"?O.jsx(rte,{className:"size-4"}):e==="junk"?O.jsx(rA,{className:"size-4"}):e==="trash"?O.jsx(wte,{className:"size-4"}):e==="flagged"?O.jsx(bte,{className:"size-4"}):O.jsx(pte,{className:"size-4"})}const pre={Inbox:"Inbox",Drafts:"Drafts",Sent:"Sent",Archive:"Archive",Junk:"Junk",Trash:"Trash",All:"All",Flagged:"Flagged"},$6e={Body:"Body"},F6e={Mail:"Mail",Calendar:"Calendar"},su={Appointed:"Appointed",Flagged:"Flagged",Reserved:"Reserved",Proposed:"Proposed",Stale:"Stale",None:"None"},Da={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"},fk={synced:"synced",failed:"failed"},z6e={Saved:"Saved",Deployment:"Deployment",Default:"Default"},j6e={NoBaseUrl:"NoBaseUrl",NoApiKey:"NoApiKey"},B6e={uncategorized:"uncategorized",personal:"personal",newsletter:"newsletter",marketing:"marketing",automated:"automated",transactional:"transactional",social:"social",coldOutreach:"coldOutreach"},H6e={Wellknown:"wellknown",Vip:"vip"},q6e={Lookalike:"Lookalike",ForeignAddress:"ForeignAddress",Unrelated:"Unrelated"},V6e={abandoned:"abandoned"},W6e={none:"none",move:"move",delete:"delete"},G6e={MoveToInbox:"MoveToInbox",MoveToJunk:"MoveToJunk"},K6e={Confident:"Confident",Unsure:"Unsure"},Z6e={Attachment:"attachment"},Y6e={None:"None"},Q6e={Retrying:"Retrying",GaveUp:"GaveUp"};function wF(e){const[t,n]=_.useState(!1),r=t?ate:ite,o=t?"Hide password":"Show password";return O.jsx(wf,{...e,type:t?"text":"password",trailing:O.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:O.jsx(r,{className:"size-4","aria-hidden":!0})})})}const mre=e=>e===1?"message":"messages",Mg=e=>`${e.toLocaleString()} ${mre(e)}`,G1=(e,t)=>e.kind==="delete"?`delete ${Mg(e.count)}`:t===void 0?"empty it":`empty ${Mg(t)}`,CF=e=>e.kind==="delete"?"Nothing has been deleted.":"Nothing has been emptied.",gre=(e,t,n={})=>{const{trashFolderLabel:r,staleFolderLabel:o,selectedCount:s}=n,a=CF(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 ${G1(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 ${G1(t,void 0)}`,cancelLabel:"Cancel"};const u=t.kind==="delete"?`Deleting ${Mg(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. ${u}`:`${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. ${u}`,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 ${G1(t,s)}`,cancelLabel:"Cancel"}},vre=(e,t,n,r)=>e.kind==="appointing"?{headline:"Setting the Trash folder…",status:n}:t.kind==="delete"?{headline:`Deleting ${Mg(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."},yre=(e,t,n,r)=>e==="unconfirmed"&&t.kind==="delete"&&n!==void 0&&r===n,bre=(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. ${CF(t)} Please try again.`,Sre=({open:e,reason:t,action:n,folders:r,delimiter:o,trashFolderLabel:s,guessedMailboxId:a,staleFolderLabel:u,accountEmail:c,phase:f,selectedId:h,onSelect:m,onCreateFolder:g,onConfirm:v,onCancel:w})=>{const S=_.useRef(null),C=f.kind==="appointing"||f.kind==="acting";_.useEffect(()=>{C&&S.current?.focus()},[C]);const E=r.find(N=>N.id===h),I=gre(t,n,{trashFolderLabel:s,staleFolderLabel:u,selectedCount:E?.messageCount}),A=yre(t,n,a,h),T=n.kind==="emptyTrash"||A;if(!e)return null;if(C){const N=vre(f,n,E?.label??"",A);return O.jsx(uk,{open:e,onClose:()=>{},title:I.title,children:O.jsxs("div",{ref:S,"data-escape-owner":!0,tabIndex:-1,className:"flex flex-col items-center gap-3 px-5 py-10 text-center outline-none",children:[O.jsx(z$,{className:"size-8 animate-spin text-accent-2"}),O.jsx("p",{className:"text-sm font-medium text-fg",children:N.headline}),O.jsx("p",{className:"text-xs text-fg-muted",role:"status","aria-live":"polite",children:N.status})]})})}return O.jsxs(uk,{open:e,onClose:w,title:I.title,children:[O.jsxs("header",{className:"flex items-center gap-2 border-b border-line px-5 py-3",children:[O.jsx(oA,{className:`size-4 shrink-0 ${T?"text-danger":"text-warning"}`}),O.jsx("span",{className:"flex-1 text-sm font-semibold text-fg",children:I.title})]}),O.jsxs("div",{className:"flex max-h-[70vh] flex-col",children:[O.jsxs("div",{className:"space-y-1 px-5 py-4",children:[O.jsx("p",{className:"text-sm text-fg-muted",children:I.description}),c&&O.jsx("p",{className:"text-xs text-fg-subtle",children:c})]}),f.kind==="appoint-failed"&&O.jsx("div",{className:"px-5 pb-3",children:O.jsx(Yr,{tone:"danger",variant:"soft",children:bre(f.cause,n,E?.label??"That folder")})}),O.jsx("p",{className:"px-5 pb-2 text-sm text-fg-muted",children:I.pickerPrompt}),O.jsx("div",{className:"flex h-[26rem] min-h-0 flex-1 overflow-hidden",children:O.jsx(are,{folders:r,selectedId:h,delimiter:o,onSelect:m,onCreateFolder:t==="none"?g:void 0,onCancel:w,labels:{treeAriaLabel:"Folders on this account",optionLabel:N=>`Set ${N.label}${N.messageCount===void 0?"":`, ${N.messageCount} messages`}, as Trash`}})})]}),O.jsxs("footer",{className:"flex items-center justify-end gap-2 border-t border-line px-5 py-3",children:[O.jsx(Jr,{variant:"secondary",size:"sm",onClick:w,children:I.cancelLabel}),E&&O.jsx(Jr,{variant:T?"danger":"primary",size:"sm",onClick:()=>v(E.id),children:O.jsx("span",{className:"truncate",children:I.confirmLabel})})]})]})},wre={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}},Cre=e=>wre[e],Ere={match:"Apply to",properties:"Properties",folder:"Folder",rule:"Rule",name:"Name",review:"Review",run:"Run"},X6e=e=>Ere[e],J6e=({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"]},EF=(e,t)=>Math.max(0,e.indexOf(t)),e5e=(e,t)=>EF(e,t)===0||t==="run",_F=(e,t)=>({clauses:[...e.clauses],matchOperator:e.matchOperator,moveMailboxId:e.moveMailboxId,scope:t,until:e.until,name:e.name}),_re=e=>mF(_F(e,e.scope??"once")),hk=e=>{if(!(e.scope!=="standing"&&e.scope!=="until")&&!pF(_F(e,e.scope)))return Kr.noMatch},xre="A rule only works within one account — clear the selection, or pick messages from a single account.",Ire="A destination only works within one account — clear the selection, or pick messages from a single account.",t5e="Matching beyond the messages you picked only works within one account — clear the selection, or pick messages from a single account.",Are="A rule only works within one folder — clear the selection, or pick messages from a single folder.",Rre="A destination only works within one folder — clear the selection, or pick messages from a single folder.",Tre={spansAccounts:{rule:xre,destination:Ire},spansFolders:{rule:Are,destination:Rre}},Ore="A match this wide applies once — use “Make this a filter” above the results to keep doing it.",n5e=(e,t)=>e==="escalated"?Ore:t.rule,r5e=(e,t)=>{const n=e===void 0?"spansAccounts":t;if(!n)return{accountId:e};const r=Tre[n];return{accountId:n==="spansAccounts"?void 0:e,rule:r.rule,destination:r.destination}},o5e=e=>e===void 0?["selected"]:["selected","properties"],Mre="This matches no messages, so there is nothing to do. Go back and change what it applies to.",Pre="Fill in every property, or take the empty one off.",Nre="Pick a destination first.",kre="Choose one of the three first.",s5e=(e,t,n)=>{if(e==="properties")return t.clauses.length===0?Kr.noMatch:t.clauses.some(r=>r.value.trim()==="")?Pre:void 0;if(e==="folder")return t.moveMailboxId?void 0:Nre;if(e==="rule"){if(!t.scope)return kre;const r=hk(t);return r||(t.scope==="once"&&_re(t).length>0?Kr.bodyTextOnce:t.scope==="until"&&!t.until?.trim()?Kr.noUntilDate:void 0)}if(e==="name"&&!t.name?.trim())return Kr.unnamed;if(e==="review"){const r=hk(t);return r||(n.status==="uncounted"?void 0:n.status==="ready"&&n.count===0&&!n.stale?Mre:gF(n))}},i5e="Nothing matches this yet. Widen a property, or match on a different one.",a5e=({state:e,verb:t,scope:n,matched:r,applied:o,failed:s,failureReason:a})=>{const{label:u,present:c,past:f}=Cre(t),h=f.toLowerCase(),m=n==="standing"||n==="until",v={screenTitle:e==="saving"||e==="backApplyRunning"||e==="statusUnknown"||e==="commitFailed"?u:"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…":`${c} ${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":`${c} — 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 ${u.toLowerCase()}`,detail:a??"Nothing has changed.",tone:"danger",dismissLabel:a===void 0?"Not now":"Close",retryLabel:a===void 0?"Try again":void 0}},Dre=e=>`${Bne(e.field)} "${e.value}"`,xF=(e,t)=>e.map(Dre).join(` ${Wne(t)} `),Lre=(e,t)=>e==="selected"?`These ${t} messages`:"Its properties",l5e=e=>e==="selected"?"Only the messages ticked in the list.":zne,Ure=e=>`Every message ${e}`,IF="the list is showing",u5e="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.",c5e="This covers messages not shown in the list, and anything else matching by the time it runs.",d5e=({mode:e,selectedCount:t,clauses:n,matchOperator:r,escalatedScope:o})=>e==="escalated"?Ure(o??IF):e==="properties"?xF(n,r):Lre(e,t),f5e=({mode:e,selectedCount:t,clauses:n,matchOperator:r,escalatedScope:o,escalatedCount:s})=>{if(e==="selected")return`${t} messages`;if(e==="escalated"){const a=o??IF;return s===void 0?`every message ${a}`:`all ${s.toLocaleString()} messages ${a}`}return n.length===0?"every message":`every message where ${xF(n,r)}`},$re={preparing:"Getting the new version ready",restarting:"Restarting Remit",reconnecting:"Waiting for Remit to answer again"};function pk(e){return $re[e]}function Fre(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 h5e(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 p5e(e){return new Date(e).toLocaleDateString(void 0,{dateStyle:"medium"})}const mk=["preparing","restarting","reconnecting"],AF="fixed inset-0 z-50 flex flex-col items-center justify-center gap-6 bg-canvas p-6 text-center outline-none";function zre({target:e,phase:t,elapsedSeconds:n}){const r=_.useRef(null);Kv(r,!0),Gv({id:"self-update",open:!0});const o=mk.indexOf(t);return O.jsxs("div",{ref:r,role:"dialog","aria-modal":"true","aria-labelledby":"self-update-progress-title",tabIndex:-1,className:AF,children:[O.jsxs("div",{className:"max-w-md space-y-2",children:[O.jsxs("h1",{id:"self-update-progress-title",className:"text-lg font-semibold text-fg",children:["Installing Remit ",e]}),O.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."})]}),O.jsx("ol",{className:"w-full max-w-sm space-y-2 text-left",children:mk.map((s,a)=>{const u=a<o,c=a===o;return O.jsxs("li",{className:rn("flex items-center gap-3 rounded-sm border px-row-inset py-2 text-sm",c?"border-line-strong bg-surface text-fg":"border-line bg-surface-sunken text-fg-subtle"),children:[u?O.jsx(x$,{className:"size-4 shrink-0 text-positive","aria-hidden":!0}):c?O.jsx(z$,{className:"size-4 shrink-0 animate-spin text-accent-2","aria-hidden":!0}):O.jsx("span",{className:"size-4 shrink-0 rounded-full border border-line-strong"}),pk(s)]},s)})}),O.jsxs("p",{"aria-live":"polite",className:"max-w-md text-xs text-fg-subtle",children:[O.jsx("span",{className:"sr-only",children:`${pk(t)}. `}),Fre(n)]})]})}function jre({attemptedVersion:e,previousVersion:t,elapsedSeconds:n,logsCommand:r,onRetryConnection:o}){const s=_.useRef(null);Kv(s,!0);const a=Math.max(1,Math.round(n/60));return O.jsxs("div",{ref:s,role:"alertdialog","aria-modal":"true","aria-labelledby":"self-update-unreachable-title",tabIndex:-1,className:AF,children:[O.jsx(rA,{className:"size-12 shrink-0 text-danger","aria-hidden":!0}),O.jsxs("div",{className:"max-w-lg space-y-3",children:[O.jsx("h1",{id:"self-update-unreachable-title",className:"text-lg font-semibold text-fg",children:"Remit has not answered since the restart"}),O.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."]}),O.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:"]}),O.jsx("code",{className:"block rounded-xs bg-surface-sunken px-3 py-2 text-left text-xs text-fg-muted",children:r})]}),O.jsx("div",{className:"flex flex-wrap items-center justify-center gap-2",children:O.jsx(Jr,{size:"sm",onClick:o,children:"Try connecting again"})})]})}const Bre=()=>O.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:[O.jsx("div",{className:"mb-3 h-6 w-24 rounded bg-surface-sunken"}),Array.from({length:6}).map((e,t)=>O.jsxs("div",{className:"flex items-center gap-2 py-1.5",children:[O.jsx("div",{className:"size-5 shrink-0 rounded bg-surface-sunken"}),O.jsx("div",{className:"h-3.5 flex-1 rounded bg-surface-sunken"})]},t))]}),Hre=()=>O.jsx("div",{className:"min-w-0 flex-1",children:Array.from({length:8}).map((e,t)=>O.jsxs("div",{className:"flex items-start gap-3 border-b border-line py-2 pl-5 pr-4",children:[O.jsx("div",{className:"mt-0.5 size-7 shrink-0 rounded-full bg-surface-sunken"}),O.jsxs("div",{className:"flex-1 space-y-1.5",children:[O.jsxs("div",{className:"flex justify-between gap-2",children:[O.jsx("div",{className:"h-3.5 w-28 rounded bg-surface-sunken"}),O.jsx("div",{className:"h-3 w-12 rounded bg-surface-sunken"})]}),O.jsx("div",{className:"h-3.5 w-48 rounded bg-surface-sunken"}),O.jsx("div",{className:"h-3 w-full rounded bg-surface-sunken"})]})]},t))}),Qv=()=>O.jsxs("div",{className:"flex h-full animate-pulse bg-canvas","aria-hidden":"true",children:[O.jsx(Bre,{}),O.jsx(Hre,{})]}),Xv="c060bfc67d5102a79f9b459c52f34b19398a74a2",qre="2026-11-13T20:13:24.062Z",Vre=Xv.slice(0,7),Wre=/^[0-9a-f]{40}$/.test(Xv),Gre=Wre?`https://github.com/remit-mail/reader/commit/${Xv}`:void 0;class Jv extends Error{constructor(t,n,r){super(t),this.status=n,this.body=r,this.name="ApiError"}status;body}const V_=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ll=e=>{const t=e instanceof Jv?e.body:e;if(!V_(t))return;const{code:n,details:r}=t;if(typeof n=="string")return{code:n,details:V_(r)?r:void 0}},Kre=(e,t)=>{if(V_(e)&&e.message!==void 0&&e.message!==null){const n=String(e.message);if(n)return n}return`Request failed with status ${t}`},Zre=(e,t)=>new Jv(Kre(e,t),t,e),pn=e=>{if(e instanceof Jv)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}},RF=e=>pn(e)!==void 0,ey=e=>{const t=pn(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"),Yre=()=>typeof navigator<"u"&&navigator.onLine===!1,ny=e=>ty(e)||RF(e)?!1:e instanceof eA?!0:Yre(),Qre=e=>!RF(e)&&!ty(e)&&!ny(e),TF=e=>ey(e)||Qre(e),Xre=e=>e instanceof Error&&e.name==="AuthTokenError"&&pn(e)===403,ry=e=>pn(e)===401||Xre(e),Jre=(e,t)=>{if(t?.softError===!0)return!0;const n=t?.softErrorStatuses;if(!Array.isArray(n))return!1;const r=pn(e);return r!==void 0&&n.includes(r)},eoe=[502,503,504],toe=(e,t)=>{if(t?.restartExpected!==!0)return!1;const n=pn(e);return n!==void 0&&eoe.includes(n)},noe=(e,t)=>ey(e)?!toe(e,t)&&t?.ownsServerErrors!==!0:ty(e)||ny(e)||ry(e)?!1:TF(e)?!0:!Jre(e,t),lA={softError:!0},oy=(...e)=>({softErrorStatuses:e}),roe={restartExpected:!0},ooe={ownsServerErrors:!0},OF=e=>pn(e)===404,soe=e=>ey(e),W_=new Set;let MF=null,PF=null;const ioe=e=>{PF=e},aoe=e=>e instanceof Error?e:new Error(NF(e)),NF=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.",loe=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`fatal-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,qu=(e,t)=>{const n={error:e,message:NF(e),correlationId:loe(),at:Date.now(),recoverable:t?.recoverable??soe(e),stack:e instanceof Error?e.stack:void 0,componentStack:t?.componentStack};MF=n,poe(`Fatal: ${n.message} [${n.correlationId}]`),PF?.recordError(aoe(e),{fatal:"true",correlationId:n.correlationId});for(const r of W_)r(n);return n},uoe=e=>(W_.add(e),()=>{W_.delete(e)}),coe=()=>MF,doe=20,og=[],foe=new Set(["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"]);function hoe(e){return typeof e!="string"?!1:foe.has(e.replace(/\.\s*$/,""))}function sg(e){og.push(e),og.length>doe&&og.shift()}function poe(e){sg(e)}function moe(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 goe(){const e=console.error.bind(console);console.error=(...t)=>{sg(moe(t)),e(...t)},window.addEventListener("error",t=>{hoe(t.message)||(sg(`Uncaught ${t.error instanceof Error?`${t.error.name}: ${t.error.message}`:String(t.message)} (${t.filename}:${t.lineno})`),qu(t.error??t.message))}),window.addEventListener("unhandledrejection",t=>{const n=t.reason,r=n instanceof Error?`${n.name}: ${n.message}`:String(n);sg(`Unhandled rejection: ${r}`),qu(n)})}function voe(){return og.slice()}const yoe=8,yu=[];function boe(e){const t=e.split(/[?#]/)[0],n=yu[yu.length-1];n&&n.path===t||(yu.push({path:t,timestamp:new Date().toISOString()}),yu.length>yoe&&yu.shift())}function Soe(){return yu.slice()}const K1=7500,gk=`
|
|
13
|
-
… (truncated — the copy action on this screen has the full report)`;function Vu(e){return{appShortSha:Vre,appCommitUrl:Gre,appBuildTime:qre,userAgent:navigator.userAgent,viewport:`${window.innerWidth}×${window.innerHeight}`,timestamp:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,href:window.location.href,recentErrors:voe(),requests:Mee(),routes:Soe(),failingRequest:Pee(),errorMessage:e?.errorMessage,stack:e?.stack,componentStack:e?.componentStack,quarantine:e?.quarantine,syncWarning:e?.syncWarning,title:e?.title}}function Z1(e){return["```",e,"```"].join(`
|
|
14
|
-
`)}function kF(e){const t=/T(\d{2}:\d{2}:\d{2})/.exec(e);return t?t[1]:e}function woe(e){return`- **Version**: ${e.appCommitUrl?`[\`${e.appShortSha}\`](${e.appCommitUrl})`:`\`${e.appShortSha}\``} built ${e.appBuildTime}`}function Coe(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 Eoe(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`| ${kF(n.timestamp)} | ${n.method} | \`${n.path}\` | ${r} | ${n.durationMs}ms | ${n.correlationId??""} |`}),""]}function _oe(e){return e.length===0?["## Navigation trail","(none)",""]:["## Navigation trail",...e.map(n=>`- ${kF(n.timestamp)} \`${n.path}\``),""]}function DF(e,t){const n=e.recentErrors.length>0?e.recentErrors.map(s=>` - ${s}`).join(`
|
|
15
|
-
`):" (none)",r=["## Environment",woe(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(...Coe(e.failingRequest)),e.quarantine){const s=t?.quarantineStructure??e.quarantine.structure;r.push(e.quarantine.head,"",Z1(s),"",e.quarantine.disclaimer,"")}e.syncWarning&&r.push(e.syncWarning,"");const o=t?.stack??e.stack;return o&&r.push("## Stacktrace",Z1(o),""),e.componentStack&&r.push("## Component stack",Z1(e.componentStack),""),r.push(...Eoe(e.requests)),r.push(..._oe(e.routes)),r.push("## Recent console errors",n,"","## Steps to reproduce","1. ","","## Expected behaviour","","## Actual behaviour",""),r.join(`
|
|
16
|
-
`)}function xoe(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 Kp(e,t){const n=new URLSearchParams({title:xoe(e),body:DF(e,t)});return`${vc().issuesUrl}?${n.toString()}`}function Ioe(e){return DF(e)}function ih(e){const t=Kp(e);if(t.length<=K1)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(Kp(n,o).length<=K1)break;let u=0,c=a.length,f=0;for(;u<=c;){const h=u+c>>1;Kp(n,{...o,[s]:a.slice(0,h)+gk}).length<=K1?(f=h,u=h+1):c=h-1}o={...o,[s]:a.slice(0,f)+gk}}return Kp(n,o)}function Aoe(){const e=ih(Vu());window.open(e,"_blank","noopener,noreferrer")}const Roe="/mail",LF=()=>{const[e,t]=_.useState(()=>coe());return _.useEffect(()=>uoe(t),[]),e?O.jsx(UF,{fatal:e}):null},vk=e=>({errorMessage:e.message,stack:e.stack,componentStack:e.componentStack}),UF=({fatal:e,onRetry:t})=>{Gv({id:"fatal-error",open:!0});const[n,r]=_.useState(!1),o=()=>{window.location.reload()},s=()=>{if(t){t();return}o()},a=()=>{const f=ih(Vu(vk(e)));window.open(f,"_blank","noopener,noreferrer")},u=async()=>{const f=Ioe(Vu(vk(e)));await navigator.clipboard.writeText(f),r(!0),window.setTimeout(()=>r(!1),2e3)},c=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 O.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:[O.jsx(rA,{className:"size-16 shrink-0","aria-hidden":"true"}),O.jsxs("div",{className:"max-w-lg space-y-3",children:[O.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Something broke"}),O.jsx("p",{className:"text-base text-red-50",children:c}),O.jsx("p",{className:"break-words font-mono text-sm text-red-100",children:e.message}),O.jsxs("p",{className:"font-mono text-xs text-red-200",children:["Reference: ",e.correlationId]})]}),O.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[e.recoverable?O.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"}):O.jsx("a",{href:Roe,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"}),O.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"}),O.jsx("button",{type:"button",onClick:u,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"})]})]})},Toe=({betterAuthEnabled:e,cognitoConfigured:t})=>e?"betterAuth":t?"cognito":"none",uA=e=>Toe(e)==="cognito"?Mne:void 0,Ooe="Fetch Error",Moe=429,cA=(e,t)=>{if(e&&typeof e=="object"&&t in e){const n=e[t];if(typeof n=="string"&&n.trim().length>0)return n}},_f=e=>cA(e,"message"),Poe=e=>ty(e)?!1:cA(e,"statusText")===Ooe?!0:pn(e)===void 0,$F=e=>{if(Poe(e))return"network";const t=pn(e);return t===void 0?"fatal":t===Moe?"rateLimited":t===404||t>=500?"fatal":_f(e)?"validation":"fatal"},Noe="Can't reach the server. You may be offline — check your connection and try again.",koe="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.",Doe=(e,t)=>t==="network"?Noe:t==="rateLimited"?koe:_f(e)??"Please check your details and try again.",Loe=e=>{const t=pn(e);if(t===void 0)return"no response";const n=cA(e,"statusText");return n?`${t} ${n}`:String(t)},Uoe=(e,t)=>{const n=Loe(e),r=pn(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=_f(e),s=o?` Server said: ${o}.`:"";return`${t.method} ${t.path} failed: ${n}. ${r}${s}`},$oe=(e,t)=>{qu(new Error(Uoe(e,t)),{recoverable:!1})},Foe={SIGN_IN_DISABLED:"signInOff",ACCOUNT_DISABLED:"accountDisabled"},dA=e=>{if(pn(e)!==403||!e||typeof e!="object"||!("code"in e))return;const{code:t}=e;return typeof t=="string"?Foe[t]:void 0},zoe=/\/reset-password\/([^/]+)\/?$/,joe=e=>{const t=zoe.exec(e);return t?.[1]?decodeURIComponent(t[1]):void 0},Boe="Your password was not set",Hoe=e=>ih({...Vu({title:`Reset password: ${e}`,errorMessage:e}),href:`${window.location.origin}/reset-password/<token>`}),qoe=e=>{if(dA(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:_f(e)??"Use 12 to 128 characters."};const n=$F(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=pn(e),o=_f(e);return{kind:"server",message:`${Boe}. The server answered ${r??"nothing"}${o?`: ${o}`:""}.`}};function Voe({token:e,onDone:t}){const[n,r]=_.useState(""),[o,s]=_.useState(null),[a,u]=_.useState(!1),c=_.useRef(null);_.useEffect(()=>{c.current?.focus()},[]);const f=async h=>{if(h.preventDefault(),a)return;s(null),u(!0);const m=await Ga.resetPassword({newPassword:n,token:e}).then(g=>g.error??null,g=>g);if(u(!1),!m){t();return}s(qoe(m))};return O.jsxs(Zv,{children:[O.jsx(Yv,{}),O.jsxs("form",{onSubmit:f,className:"mt-6 flex flex-col gap-4 rounded-lg border border-line bg-surface p-7 shadow-lg",children:[O.jsx("h1",{className:"text-base font-semibold text-fg",children:"Choose a new password"}),o?.kind==="deadLink"&&O.jsx(Yr,{tone:"danger",children:"This link no longer works. Ask for a new one."}),o?.kind==="signInOff"&&O.jsxs(Yr,{tone:"info",children:[O.jsx("p",{className:"font-medium",children:"Sign-in is turned off on this server."}),O.jsx("p",{className:"mt-1",children:"The link works once the person who runs this server turns sign-in back on."})]}),o?.kind==="inline"&&O.jsx(Yr,{tone:"danger",children:o.message}),o?.kind==="server"&&O.jsxs(Yr,{tone:"danger",children:[O.jsx("p",{children:o.message}),O.jsx("a",{href:Hoe(o.message),target:"_blank",rel:"noreferrer",className:"mt-1 inline-block font-medium text-accent hover:underline",children:"Report an issue"})]}),O.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[O.jsx("label",{htmlFor:"reset-new-password",className:"text-fg-muted",children:"New password"}),O.jsx(wF,{ref:c,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}),O.jsx("p",{id:"reset-new-password-hint",className:"text-xs text-fg-muted",children:o?.kind==="password"?O.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."})]}),O.jsx(Jr,{type:"submit","aria-busy":a,children:"Set password"})]}),O.jsx(iA,{note:uA({betterAuthEnabled:!0,cognitoConfigured:!1})})]})}const Woe=({onRetry:e,onReport:t})=>O.jsxs(Zv,{children:[O.jsx(Yv,{}),O.jsxs("div",{className:"flex flex-col gap-4 rounded-lg border border-line bg-surface p-7 shadow-lg",children:[O.jsxs(Yr,{tone:"warning",children:[O.jsx("p",{className:"font-medium",children:"Too many requests from this address"}),O.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."})]}),O.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."}),O.jsx(Jr,{onClick:e,children:"Try again"}),O.jsx(Jr,{variant:"ghost",size:"sm",onClick:t,children:"Report an issue"})]})]}),Goe=429,Koe=({data:e,isPending:t,error:n})=>{const r=dA(n);return r?{kind:"refused",refusal:r}:e?{kind:"active"}:t?{kind:"pending"}:pn(n)===Goe?{kind:"rateLimited"}:{kind:"signedOut"}},Zoe={method:"POST",path:"/api/auth/sign-up/email"},Yoe={method:"POST",path:"/api/auth/sign-in/email"},Qoe=({notice:e})=>{const t=_.useRef(null);return _.useEffect(()=>{t.current?.focus()},[]),O.jsxs("div",{ref:t,tabIndex:-1,className:"outline-none",children:[e==="signInOff"&&O.jsxs(Yr,{tone:"info",children:[O.jsx("p",{className:"font-medium",children:"Sign-in is turned off on this server."}),O.jsx("p",{className:"mt-1",children:"The person who runs this server turned it off. Ask them when it is back."})]}),e==="accountDisabled"&&O.jsxs(Yr,{tone:"danger",children:[O.jsx("p",{className:"font-medium",children:"This account is disabled."}),O.jsx("p",{className:"mt-1",children:"Ask the person who runs this server."})]}),e==="passwordChanged"&&O.jsx(Yr,{tone:"success",children:"Password changed. Sign in with your new password."})]})},yk=({notice:e})=>{const[t,n]=_.useState("signIn"),[r,o]=_.useState(""),[s,a]=_.useState(""),[u,c]=_.useState(""),[f,h]=_.useState(null),[m,g]=_.useState(!1),[v,w]=_.useState(!1),[S,C]=_.useState(e),E=S==="signInOff",I=v||E?"signIn":t,A=(N,M)=>{const R=dA(N);if(R){C(R);return}if(Dee(N)){w(!0),n("signIn");return}const k=$F(N);if(k==="fatal"){$oe(N,M);return}h(Doe(N,k))},T=async N=>{if(N.preventDefault(),m)return;h(null),C(void 0),g(!0);const M=I==="signUp"?Zoe:Yoe,R=await(I==="signUp"?Ga.signUp.email({email:s,password:u,name:r}):Ga.signIn.email({email:s,password:u})).then(k=>k.error??null,k=>k);g(!1),R&&A(R,M)};return O.jsxs(O.Fragment,{children:[O.jsx(LF,{}),O.jsxs(Zv,{children:[O.jsx(Yv,{}),O.jsxs("form",{onSubmit:T,className:"mt-6 flex flex-col gap-4 rounded-lg border border-line bg-surface p-7 shadow-lg",children:[S&&O.jsx(Qoe,{notice:S},S),E?null:v?O.jsx(Yr,{tone:"info",children:"New signups are currently closed. Sign in with an existing account, or contact your administrator for access."}):O.jsxs("div",{className:"flex gap-1",children:[O.jsx(Jr,{size:"sm",variant:I==="signIn"?"secondary":"ghost","aria-pressed":I==="signIn",onClick:()=>n("signIn"),children:"Sign in"}),O.jsx(Jr,{size:"sm",variant:I==="signUp"?"secondary":"ghost","aria-pressed":I==="signUp",onClick:()=>n("signUp"),children:"Create account"})]}),f&&O.jsx(Yr,{tone:"danger",children:f}),I==="signUp"&&O.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[O.jsx("label",{htmlFor:"ba-name",className:"text-fg-muted",children:"Name"}),O.jsx(wf,{id:"ba-name",type:"text",autoComplete:"name",value:r,onChange:N=>o(N.target.value),placeholder:"Your name",required:!0})]}),O.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[O.jsx("label",{htmlFor:"ba-email",className:"text-fg-muted",children:"Email"}),O.jsx(wf,{id:"ba-email",type:"email",autoComplete:"email",value:s,onChange:N=>a(N.target.value),placeholder:"you@example.com",required:!0,disabled:E})]}),O.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[O.jsx("label",{htmlFor:"ba-password",className:"text-fg-muted",children:"Password"}),O.jsx(wF,{id:"ba-password",autoComplete:I==="signUp"?"new-password":"current-password",value:u,onChange:N=>c(N.target.value),placeholder:"Your password",required:!0,disabled:E})]}),O.jsx(Jr,{type:"submit",disabled:E,children:I==="signUp"?"Create account":"Sign in"})]}),O.jsx(iA,{note:uA({betterAuthEnabled:Wv(),cognitoConfigured:!1})})]})]})},Xoe=({session:e,onRetry:t,notice:n,children:r})=>{const o=Koe(e);return o.kind==="active"?O.jsx(O.Fragment,{children:r}):o.kind==="pending"?O.jsx(Qv,{}):o.kind==="rateLimited"?O.jsx(Woe,{onRetry:t,onReport:Aoe}):o.kind==="refused"?O.jsx(yk,{notice:o.refusal},o.refusal):O.jsx(yk,{notice:n})},Joe=({children:e})=>{const{data:t,isPending:n,error:r,refetch:o}=Ga.useSession(),[s,a]=_.useState(()=>joe(window.location.pathname)),[u,c]=_.useState(void 0);return s?O.jsx(Voe,{token:s,onDone:()=>{window.history.replaceState(null,"","/"),a(void 0),c("passwordChanged")}}):O.jsx(Xoe,{session:{data:t,isPending:n,error:r},onRetry:()=>{o()},notice:u,children:e})},ese=({children:e,fallback:t=null})=>{const{data:n}=Ga.useSession();if(!n)return O.jsx(O.Fragment,{children:t});const r=async()=>{await Ga.signOut(),nA()};return O.jsx(O.Fragment,{children:e({email:n.user.email??null,signOut:r})})},Pg={configure:()=>{},getToken:Wee,resetToken:nA,Shell:Joe,Account:ese};var Y1,bk;function tse(){if(bk)return Y1;bk=1;function e(){this.__data__=[],this.size=0}return Y1=e,Y1}var Q1,Sk;function ah(){if(Sk)return Q1;Sk=1;function e(t,n){return t===n||t!==t&&n!==n}return Q1=e,Q1}var X1,wk;function sy(){if(wk)return X1;wk=1;var e=ah();function t(n,r){for(var o=n.length;o--;)if(e(n[o][0],r))return o;return-1}return X1=t,X1}var J1,Ck;function nse(){if(Ck)return J1;Ck=1;var e=sy(),t=Array.prototype,n=t.splice;function r(o){var s=this.__data__,a=e(s,o);if(a<0)return!1;var u=s.length-1;return a==u?s.pop():n.call(s,a,1),--this.size,!0}return J1=r,J1}var eS,Ek;function rse(){if(Ek)return eS;Ek=1;var e=sy();function t(n){var r=this.__data__,o=e(r,n);return o<0?void 0:r[o][1]}return eS=t,eS}var tS,_k;function ose(){if(_k)return tS;_k=1;var e=sy();function t(n){return e(this.__data__,n)>-1}return tS=t,tS}var nS,xk;function sse(){if(xk)return nS;xk=1;var e=sy();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 nS=t,nS}var rS,Ik;function iy(){if(Ik)return rS;Ik=1;var e=tse(),t=nse(),n=rse(),r=ose(),o=sse();function s(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var f=a[u];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,rS=s,rS}var oS,Ak;function ise(){if(Ak)return oS;Ak=1;var e=iy();function t(){this.__data__=new e,this.size=0}return oS=t,oS}var sS,Rk;function ase(){if(Rk)return sS;Rk=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return sS=e,sS}var iS,Tk;function lse(){if(Tk)return iS;Tk=1;function e(t){return this.__data__.get(t)}return iS=e,iS}var aS,Ok;function use(){if(Ok)return aS;Ok=1;function e(t){return this.__data__.has(t)}return aS=e,aS}var lS,Mk;function FF(){if(Mk)return lS;Mk=1;var e=typeof $p=="object"&&$p&&$p.Object===Object&&$p;return lS=e,lS}var uS,Pk;function Go(){if(Pk)return uS;Pk=1;var e=FF(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return uS=n,uS}var cS,Nk;function ay(){if(Nk)return cS;Nk=1;var e=Go(),t=e.Symbol;return cS=t,cS}var dS,kk;function cse(){if(kk)return dS;kk=1;var e=ay(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function s(a){var u=n.call(a,o),c=a[o];try{a[o]=void 0;var f=!0}catch{}var h=r.call(a);return f&&(u?a[o]=c:delete a[o]),h}return dS=s,dS}var fS,Dk;function dse(){if(Dk)return fS;Dk=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return fS=n,fS}var hS,Lk;function bc(){if(Lk)return hS;Lk=1;var e=ay(),t=cse(),n=dse(),r="[object Null]",o="[object Undefined]",s=e?e.toStringTag:void 0;function a(u){return u==null?u===void 0?o:r:s&&s in Object(u)?t(u):n(u)}return hS=a,hS}var pS,Uk;function Bs(){if(Uk)return pS;Uk=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return pS=e,pS}var mS,$k;function fA(){if($k)return mS;$k=1;var e=bc(),t=Bs(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",s="[object Proxy]";function a(u){if(!t(u))return!1;var c=e(u);return c==r||c==o||c==n||c==s}return mS=a,mS}var gS,Fk;function fse(){if(Fk)return gS;Fk=1;var e=Go(),t=e["__core-js_shared__"];return gS=t,gS}var vS,zk;function hse(){if(zk)return vS;zk=1;var e=fse(),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 vS=n,vS}var yS,jk;function zF(){if(jk)return yS;jk=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 yS=n,yS}var bS,Bk;function pse(){if(Bk)return bS;Bk=1;var e=fA(),t=hse(),n=Bs(),r=zF(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,a=Function.prototype,u=Object.prototype,c=a.toString,f=u.hasOwnProperty,h=RegExp("^"+c.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 bS=m,bS}var SS,Hk;function mse(){if(Hk)return SS;Hk=1;function e(t,n){return t?.[n]}return SS=e,SS}var wS,qk;function ul(){if(qk)return wS;qk=1;var e=pse(),t=mse();function n(r,o){var s=t(r,o);return e(s)?s:void 0}return wS=n,wS}var CS,Vk;function hA(){if(Vk)return CS;Vk=1;var e=ul(),t=Go(),n=e(t,"Map");return CS=n,CS}var ES,Wk;function ly(){if(Wk)return ES;Wk=1;var e=ul(),t=e(Object,"create");return ES=t,ES}var _S,Gk;function gse(){if(Gk)return _S;Gk=1;var e=ly();function t(){this.__data__=e?e(null):{},this.size=0}return _S=t,_S}var xS,Kk;function vse(){if(Kk)return xS;Kk=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return xS=e,xS}var IS,Zk;function yse(){if(Zk)return IS;Zk=1;var e=ly(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function o(s){var a=this.__data__;if(e){var u=a[s];return u===t?void 0:u}return r.call(a,s)?a[s]:void 0}return IS=o,IS}var AS,Yk;function bse(){if(Yk)return AS;Yk=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 AS=r,AS}var RS,Qk;function Sse(){if(Qk)return RS;Qk=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 RS=n,RS}var TS,Xk;function wse(){if(Xk)return TS;Xk=1;var e=gse(),t=vse(),n=yse(),r=bse(),o=Sse();function s(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var f=a[u];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,TS=s,TS}var OS,Jk;function Cse(){if(Jk)return OS;Jk=1;var e=wse(),t=iy(),n=hA();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return OS=r,OS}var MS,e3;function Ese(){if(e3)return MS;e3=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return MS=e,MS}var PS,t3;function uy(){if(t3)return PS;t3=1;var e=Ese();function t(n,r){var o=n.__data__;return e(r)?o[typeof r=="string"?"string":"hash"]:o.map}return PS=t,PS}var NS,n3;function _se(){if(n3)return NS;n3=1;var e=uy();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return NS=t,NS}var kS,r3;function xse(){if(r3)return kS;r3=1;var e=uy();function t(n){return e(this,n).get(n)}return kS=t,kS}var DS,o3;function Ise(){if(o3)return DS;o3=1;var e=uy();function t(n){return e(this,n).has(n)}return DS=t,DS}var LS,s3;function Ase(){if(s3)return LS;s3=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 LS=t,LS}var US,i3;function pA(){if(i3)return US;i3=1;var e=Cse(),t=_se(),n=xse(),r=Ise(),o=Ase();function s(a){var u=-1,c=a==null?0:a.length;for(this.clear();++u<c;){var f=a[u];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,US=s,US}var $S,a3;function Rse(){if(a3)return $S;a3=1;var e=iy(),t=hA(),n=pA(),r=200;function o(s,a){var u=this.__data__;if(u instanceof e){var c=u.__data__;if(!t||c.length<r-1)return c.push([s,a]),this.size=++u.size,this;u=this.__data__=new n(c)}return u.set(s,a),this.size=u.size,this}return $S=o,$S}var FS,l3;function mA(){if(l3)return FS;l3=1;var e=iy(),t=ise(),n=ase(),r=lse(),o=use(),s=Rse();function a(u){var c=this.__data__=new e(u);this.size=c.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=o,a.prototype.set=s,FS=a,FS}var zS,u3;function Tse(){if(u3)return zS;u3=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return zS=t,zS}var jS,c3;function Ose(){if(c3)return jS;c3=1;function e(t){return this.__data__.has(t)}return jS=e,jS}var BS,d3;function Mse(){if(d3)return BS;d3=1;var e=pA(),t=Tse(),n=Ose();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,BS=r,BS}var HS,f3;function Pse(){if(f3)return HS;f3=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 HS=e,HS}var qS,h3;function Nse(){if(h3)return qS;h3=1;function e(t,n){return t.has(n)}return qS=e,qS}var VS,p3;function jF(){if(p3)return VS;p3=1;var e=Mse(),t=Pse(),n=Nse(),r=1,o=2;function s(a,u,c,f,h,m){var g=c&r,v=a.length,w=u.length;if(v!=w&&!(g&&w>v))return!1;var S=m.get(a),C=m.get(u);if(S&&C)return S==u&&C==a;var E=-1,I=!0,A=c&o?new e:void 0;for(m.set(a,u),m.set(u,a);++E<v;){var T=a[E],N=u[E];if(f)var M=g?f(N,T,E,u,a,m):f(T,N,E,a,u,m);if(M!==void 0){if(M)continue;I=!1;break}if(A){if(!t(u,function(R,k){if(!n(A,k)&&(T===R||h(T,R,c,f,m)))return A.push(k)})){I=!1;break}}else if(!(T===N||h(T,N,c,f,m))){I=!1;break}}return m.delete(a),m.delete(u),I}return VS=s,VS}var WS,m3;function BF(){if(m3)return WS;m3=1;var e=Go(),t=e.Uint8Array;return WS=t,WS}var GS,g3;function kse(){if(g3)return GS;g3=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o,s){r[++n]=[s,o]}),r}return GS=e,GS}var KS,v3;function Dse(){if(v3)return KS;v3=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o){r[++n]=o}),r}return KS=e,KS}var ZS,y3;function Lse(){if(y3)return ZS;y3=1;var e=ay(),t=BF(),n=ah(),r=jF(),o=kse(),s=Dse(),a=1,u=2,c="[object Boolean]",f="[object Date]",h="[object Error]",m="[object Map]",g="[object Number]",v="[object RegExp]",w="[object Set]",S="[object String]",C="[object Symbol]",E="[object ArrayBuffer]",I="[object DataView]",A=e?e.prototype:void 0,T=A?A.valueOf:void 0;function N(M,R,k,L,q,$,D){switch(k){case I:if(M.byteLength!=R.byteLength||M.byteOffset!=R.byteOffset)return!1;M=M.buffer,R=R.buffer;case E:return!(M.byteLength!=R.byteLength||!$(new t(M),new t(R)));case c:case f:case g:return n(+M,+R);case h:return M.name==R.name&&M.message==R.message;case v:case S:return M==R+"";case m:var j=o;case w:var Z=L&a;if(j||(j=s),M.size!=R.size&&!Z)return!1;var he=D.get(M);if(he)return he==R;L|=u,D.set(M,R);var B=r(j(M),j(R),L,q,$,D);return D.delete(M),B;case C:if(T)return T.call(M)==T.call(R)}return!1}return ZS=N,ZS}var YS,b3;function HF(){if(b3)return YS;b3=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 YS=e,YS}var QS,S3;function Hs(){if(S3)return QS;S3=1;var e=Array.isArray;return QS=e,QS}var XS,w3;function qF(){if(w3)return XS;w3=1;var e=HF(),t=Hs();function n(r,o,s){var a=o(r);return t(r)?a:e(a,s(r))}return XS=n,XS}var JS,C3;function Use(){if(C3)return JS;C3=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,s=0,a=[];++r<o;){var u=t[r];n(u,r,t)&&(a[s++]=u)}return a}return JS=e,JS}var ew,E3;function VF(){if(E3)return ew;E3=1;function e(){return[]}return ew=e,ew}var tw,_3;function WF(){if(_3)return tw;_3=1;var e=Use(),t=VF(),n=Object.prototype,r=n.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(a){return a==null?[]:(a=Object(a),e(o(a),function(u){return r.call(a,u)}))}:t;return tw=s,tw}var nw,x3;function $se(){if(x3)return nw;x3=1;function e(t,n){for(var r=-1,o=Array(t);++r<t;)o[r]=n(r);return o}return nw=e,nw}var rw,I3;function cl(){if(I3)return rw;I3=1;function e(t){return t!=null&&typeof t=="object"}return rw=e,rw}var ow,A3;function Fse(){if(A3)return ow;A3=1;var e=bc(),t=cl(),n="[object Arguments]";function r(o){return t(o)&&e(o)==n}return ow=r,ow}var sw,R3;function gA(){if(R3)return sw;R3=1;var e=Fse(),t=cl(),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 sw=s,sw}var Wd={exports:{}},iw,T3;function zse(){if(T3)return iw;T3=1;function e(){return!1}return iw=e,iw}Wd.exports;var O3;function vA(){return O3||(O3=1,(function(e,t){var n=Go(),r=zse(),o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===o,u=a?n.Buffer:void 0,c=u?u.isBuffer:void 0,f=c||r;e.exports=f})(Wd,Wd.exports)),Wd.exports}var aw,M3;function cy(){if(M3)return aw;M3=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 aw=n,aw}var lw,P3;function yA(){if(P3)return lw;P3=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return lw=t,lw}var uw,N3;function jse(){if(N3)return uw;N3=1;var e=bc(),t=yA(),n=cl(),r="[object Arguments]",o="[object Array]",s="[object Boolean]",a="[object Date]",u="[object Error]",c="[object Function]",f="[object Map]",h="[object Number]",m="[object Object]",g="[object RegExp]",v="[object Set]",w="[object String]",S="[object WeakMap]",C="[object ArrayBuffer]",E="[object DataView]",I="[object Float32Array]",A="[object Float64Array]",T="[object Int8Array]",N="[object Int16Array]",M="[object Int32Array]",R="[object Uint8Array]",k="[object Uint8ClampedArray]",L="[object Uint16Array]",q="[object Uint32Array]",$={};$[I]=$[A]=$[T]=$[N]=$[M]=$[R]=$[k]=$[L]=$[q]=!0,$[r]=$[o]=$[C]=$[s]=$[E]=$[a]=$[u]=$[c]=$[f]=$[h]=$[m]=$[g]=$[v]=$[w]=$[S]=!1;function D(j){return n(j)&&t(j.length)&&!!$[e(j)]}return uw=D,uw}var cw,k3;function Bse(){if(k3)return cw;k3=1;function e(t){return function(n){return t(n)}}return cw=e,cw}var Gd={exports:{}};Gd.exports;var D3;function Hse(){return D3||(D3=1,(function(e,t){var n=FF(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===r,a=s&&n.process,u=(function(){try{var c=o&&o.require&&o.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}})();e.exports=u})(Gd,Gd.exports)),Gd.exports}var dw,L3;function bA(){if(L3)return dw;L3=1;var e=jse(),t=Bse(),n=Hse(),r=n&&n.isTypedArray,o=r?t(r):e;return dw=o,dw}var fw,U3;function GF(){if(U3)return fw;U3=1;var e=$se(),t=gA(),n=Hs(),r=vA(),o=cy(),s=bA(),a=Object.prototype,u=a.hasOwnProperty;function c(f,h){var m=n(f),g=!m&&t(f),v=!m&&!g&&r(f),w=!m&&!g&&!v&&s(f),S=m||g||v||w,C=S?e(f.length,String):[],E=C.length;for(var I in f)(h||u.call(f,I))&&!(S&&(I=="length"||v&&(I=="offset"||I=="parent")||w&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||o(I,E)))&&C.push(I);return C}return fw=c,fw}var hw,$3;function SA(){if($3)return hw;$3=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||e;return n===o}return hw=t,hw}var pw,F3;function KF(){if(F3)return pw;F3=1;function e(t,n){return function(r){return t(n(r))}}return pw=e,pw}var mw,z3;function qse(){if(z3)return mw;z3=1;var e=KF(),t=e(Object.keys,Object);return mw=t,mw}var gw,j3;function Vse(){if(j3)return gw;j3=1;var e=SA(),t=qse(),n=Object.prototype,r=n.hasOwnProperty;function o(s){if(!e(s))return t(s);var a=[];for(var u in Object(s))r.call(s,u)&&u!="constructor"&&a.push(u);return a}return gw=o,gw}var vw,B3;function dy(){if(B3)return vw;B3=1;var e=fA(),t=yA();function n(r){return r!=null&&t(r.length)&&!e(r)}return vw=n,vw}var yw,H3;function ZF(){if(H3)return yw;H3=1;var e=GF(),t=Vse(),n=dy();function r(o){return n(o)?e(o):t(o)}return yw=r,yw}var bw,q3;function Wse(){if(q3)return bw;q3=1;var e=qF(),t=WF(),n=ZF();function r(o){return e(o,n,t)}return bw=r,bw}var Sw,V3;function Gse(){if(V3)return Sw;V3=1;var e=Wse(),t=1,n=Object.prototype,r=n.hasOwnProperty;function o(s,a,u,c,f,h){var m=u&t,g=e(s),v=g.length,w=e(a),S=w.length;if(v!=S&&!m)return!1;for(var C=v;C--;){var E=g[C];if(!(m?E in a:r.call(a,E)))return!1}var I=h.get(s),A=h.get(a);if(I&&A)return I==a&&A==s;var T=!0;h.set(s,a),h.set(a,s);for(var N=m;++C<v;){E=g[C];var M=s[E],R=a[E];if(c)var k=m?c(R,M,E,a,s,h):c(M,R,E,s,a,h);if(!(k===void 0?M===R||f(M,R,u,c,h):k)){T=!1;break}N||(N=E=="constructor")}if(T&&!N){var L=s.constructor,q=a.constructor;L!=q&&"constructor"in s&&"constructor"in a&&!(typeof L=="function"&&L instanceof L&&typeof q=="function"&&q instanceof q)&&(T=!1)}return h.delete(s),h.delete(a),T}return Sw=o,Sw}var ww,W3;function Kse(){if(W3)return ww;W3=1;var e=ul(),t=Go(),n=e(t,"DataView");return ww=n,ww}var Cw,G3;function Zse(){if(G3)return Cw;G3=1;var e=ul(),t=Go(),n=e(t,"Promise");return Cw=n,Cw}var Ew,K3;function Yse(){if(K3)return Ew;K3=1;var e=ul(),t=Go(),n=e(t,"Set");return Ew=n,Ew}var _w,Z3;function Qse(){if(Z3)return _w;Z3=1;var e=ul(),t=Go(),n=e(t,"WeakMap");return _w=n,_w}var xw,Y3;function Xse(){if(Y3)return xw;Y3=1;var e=Kse(),t=hA(),n=Zse(),r=Yse(),o=Qse(),s=bc(),a=zF(),u="[object Map]",c="[object Object]",f="[object Promise]",h="[object Set]",m="[object WeakMap]",g="[object DataView]",v=a(e),w=a(t),S=a(n),C=a(r),E=a(o),I=s;return(e&&I(new e(new ArrayBuffer(1)))!=g||t&&I(new t)!=u||n&&I(n.resolve())!=f||r&&I(new r)!=h||o&&I(new o)!=m)&&(I=function(A){var T=s(A),N=T==c?A.constructor:void 0,M=N?a(N):"";if(M)switch(M){case v:return g;case w:return u;case S:return f;case C:return h;case E:return m}return T}),xw=I,xw}var Iw,Q3;function Jse(){if(Q3)return Iw;Q3=1;var e=mA(),t=jF(),n=Lse(),r=Gse(),o=Xse(),s=Hs(),a=vA(),u=bA(),c=1,f="[object Arguments]",h="[object Array]",m="[object Object]",g=Object.prototype,v=g.hasOwnProperty;function w(S,C,E,I,A,T){var N=s(S),M=s(C),R=N?h:o(S),k=M?h:o(C);R=R==f?m:R,k=k==f?m:k;var L=R==m,q=k==m,$=R==k;if($&&a(S)){if(!a(C))return!1;N=!0,L=!1}if($&&!L)return T||(T=new e),N||u(S)?t(S,C,E,I,A,T):n(S,C,R,E,I,A,T);if(!(E&c)){var D=L&&v.call(S,"__wrapped__"),j=q&&v.call(C,"__wrapped__");if(D||j){var Z=D?S.value():S,he=j?C.value():C;return T||(T=new e),A(Z,he,E,I,T)}}return $?(T||(T=new e),r(S,C,E,I,A,T)):!1}return Iw=w,Iw}var Aw,X3;function YF(){if(X3)return Aw;X3=1;var e=Jse(),t=cl();function n(r,o,s,a,u){return r===o?!0:r==null||o==null||!t(r)&&!t(o)?r!==r&&o!==o:e(r,o,s,a,n,u)}return Aw=n,Aw}var Rw={exports:{}},Tw={},Ow={exports:{}},Mw={};var J3;function eie(){if(J3)return Mw;J3=1;var e=sh();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 u(m,g){var v=g(),w=r({inst:{value:v,getSnapshot:g}}),S=w[0].inst,C=w[1];return s(function(){S.value=v,S.getSnapshot=g,c(S)&&C({inst:S})},[m,v,g]),o(function(){return c(S)&&C({inst:S}),m(function(){c(S)&&C({inst:S})})},[m]),a(v),v}function c(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:u;return Mw.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Mw}var eD;function tie(){return eD||(eD=1,Ow.exports=eie()),Ow.exports}var tD;function nie(){if(tD)return Tw;tD=1;var e=sh(),t=tie();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,u=e.useMemo,c=e.useDebugValue;return Tw.useSyncExternalStoreWithSelector=function(f,h,m,g,v){var w=s(null);if(w.current===null){var S={hasValue:!1,value:null};w.current=S}else S=w.current;w=u(function(){function E(M){if(!I){if(I=!0,A=M,M=g(M),v!==void 0&&S.hasValue){var R=S.value;if(v(R,M))return T=R}return T=M}if(R=T,r(A,M))return R;var k=g(M);return v!==void 0&&v(R,k)?(A=M,R):(A=M,T=k)}var I=!1,A,T,N=m===void 0?null:m;return[function(){return E(h())},N===null?void 0:function(){return E(N())}]},[h,m,g,v]);var C=o(f,w[0],w[1]);return a(function(){S.hasValue=!0,S.value=C},[C]),c(C),C},Tw}var nD;function rie(){return nD||(nD=1,Rw.exports=nie()),Rw.exports}var QF=rie();var ce=function(){return ce=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},ce.apply(this,arguments)};function wA(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 et(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 lt(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(u){a={error:u}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s}function Ft(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 wt;(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"})(wt||(wt={}));var Ka;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(Ka||(Ka={}));var G_=wt.Start,CA=wt.Stop,lh=wt.Raise,fy=wt.Send,XF=wt.Cancel,oie=wt.NullEvent,EA=wt.Assign;wt.After;wt.DoneState;var JF=wt.Log,sie=wt.Init,K_=wt.Invoke;wt.ErrorExecution;var rD=wt.ErrorPlatform,iie=wt.ErrorCustom,_A=wt.Update,aie=wt.Choose,lie=wt.Pure,ez=".",oD={},Z_="xstate.guard",uie="",Zp;function xA(e,t,n){n===void 0&&(n=ez);var r=af(e,n),o=af(t,n);return dt(o)?dt(r)?o===r:!1:dt(r)?r in o:Object.keys(r).every(function(s){return s in o?xA(r[s],o[s]):!1})}function tz(e){try{return dt(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 Y_(e,t){try{return Sc(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function cie(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function af(e,t){if(cie(e))return e.value;if(Sc(e))return Ng(e);if(typeof e!="string")return e;var n=Y_(e,t);return Ng(n)}function Ng(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 Kd(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 sD(e,t,n){var r,o,s={};try{for(var a=et(Object.keys(e)),u=a.next();!u.done;u=a.next()){var c=u.value,f=e[c];n(f)&&(s[c]=t(f,c,e))}}catch(h){r={error:h}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return s}var die=function(e){return function(t){var n,r,o=t;try{for(var s=et(e),a=s.next();!a.done;a=s.next()){var u=a.value;o=o[u]}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o}};function fie(e,t){return function(n){var r,o,s=n;try{for(var a=et(e),u=a.next();!u.done;u=a.next()){var c=u.value;s=s[t][c]}}catch(f){r={error:f}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return s}}function ig(e){if(!e)return[[]];if(dt(e))return[[e]];var t=Gt(Object.keys(e).map(function(n){var r=e[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:ig(e[n]).map(function(o){return[n].concat(o)})}));return t}function Gt(e){var t;return(t=[]).concat.apply(t,Ft([],lt(e),!1))}function nz(e){return Sc(e)?e:[e]}function co(e){return e===void 0?[]:nz(e)}function kg(e,t,n){var r,o;if(ft(e))return e(t,n.data);var s={};try{for(var a=et(Object.keys(e)),u=a.next();!u.done;u=a.next()){var c=u.value,f=e[c];ft(f)?s[c]=f(t,n.data):s[c]=f}}catch(h){r={error:h}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return s}function hie(e){return/^(done|error)\./.test(e)}function iD(e){return!!(e instanceof Promise||e!==null&&(ft(e)||typeof e=="object")&&ft(e.then))}function pie(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function mie(e,t){var n,r,o=lt([[],[]],2),s=o[0],a=o[1];try{for(var u=et(e),c=u.next();!c.done;c=u.next()){var f=c.value;t(f)?s.push(f):a.push(f)}}catch(h){n={error:h}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return[s,a]}function rz(e,t){return Kd(e.states,function(n,r){if(n){var o=(dt(t)?void 0:t[r])||(n?n.current:void 0);if(o)return{current:o,states:rz(n,o)}}})}function gie(e,t){return{current:t,states:rz(e,t)}}function aD(e,t,n,r){var o=e&&n.reduce(function(s,a){var u,c,f=a.assignment,h={state:r,action:a,_event:t},m={};if(ft(f))m=f(s,t.data,h);else try{for(var g=et(Object.keys(f)),v=g.next();!v.done;v=g.next()){var w=v.value,S=f[w];m[w]=ft(S)?S(s,t.data,h):S}}catch(C){u={error:C}}finally{try{v&&!v.done&&(c=g.return)&&c.call(g)}finally{if(u)throw u.error}}return Object.assign({},s,m)},e);return o}var vie=function(){};function Sc(e){return Array.isArray(e)}function ft(e){return typeof e=="function"}function dt(e){return typeof e=="string"}function oz(e,t){if(e)return dt(e)?{type:Z_,name:e,predicate:t?t[e]:void 0}:ft(e)?{type:Z_,name:e.name,predicate:e}:e}function yie(e){try{return"subscribe"in e&&ft(e.subscribe)}catch{return!1}}var Oi=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();Zp={},Zp[Oi]=function(){return this},Zp[Symbol.observable]=function(){return this};function Wu(e){return!!e&&"__xstatenode"in e}function bie(e){return!!e&&typeof e.send=="function"}var Sie=(function(){var e=0;return function(){return e++,e.toString(16)}})();function hy(e,t){return dt(e)||typeof e=="number"?ce({type:e},t):e}function Ln(e,t){if(!dt(e)&&"$$type"in e&&e.$$type==="scxml")return e;var n=hy(e);return ce({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function iu(e,t){var n=nz(t).map(function(r){return typeof r>"u"||typeof r=="string"||Wu(r)?{target:r,event:e}:ce(ce({},r),{event:e})});return n}function wie(e){if(!(e===void 0||e===uie))return co(e)}function sz(e,t,n,r,o){var s=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===Z_)return(s?.[t.name]||t.predicate)(n,r.data,a);var u=s?.[t.type];if(!u)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return u(n,r.data,a)}function iz(e){return typeof e=="string"?{type:e}:e}function lf(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 Yp(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Q_(e){return(e.type===lh||e.type===fy&&e.to===Ka.Internal)&&typeof e.delay!="number"}var La=Ln({type:sie});function Dg(e,t){return t&&t[e]||void 0}function Gu(e,t){var n;if(dt(e)||typeof e=="number"){var r=Dg(e,t);ft(r)?n={type:e,exec:r}:r?n=r:n={type:e,exec:void 0}}else if(ft(e))n={type:e.name||e.toString(),exec:e};else{var r=Dg(e.type,t);if(ft(r))n=ce(ce({},e),{exec:r});else if(r){var o=r.type||e.type;n=ce(ce(ce({},r),e),{type:o})}else n=e}return n}var _s=function(e,t){if(!e)return[];var n=Sc(e)?e:[e];return n.map(function(r){return Gu(r,t)})};function py(e){var t=Gu(e);return ce(ce({id:dt(e)?e:t.id},t),{type:t.type})}function az(e,t){return{type:lh,event:typeof e=="function"?e:hy(e),delay:t?t.delay:void 0,id:t?.id}}function lz(e,t,n,r){var o={_event:n},s=Ln(ft(e.event)?e.event(t,n.data,o):e.event),a;if(dt(e.delay)){var u=r&&r[e.delay];a=ft(u)?u(t,n.data,o):u}else a=ft(e.delay)?e.delay(t,n.data,o):e.delay;return ce(ce({},e),{type:lh,_event:s,delay:a})}function my(e,t){return{to:t?t.to:void 0,type:fy,event:ft(e)?e:hy(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:ft(e)?e.name:tz(e)}}function uz(e,t,n,r){var o={_event:n},s=Ln(ft(e.event)?e.event(t,n.data,o):e.event),a;if(dt(e.delay)){var u=r&&r[e.delay];a=ft(u)?u(t,n.data,o):u}else a=ft(e.delay)?e.delay(t,n.data,o):e.delay;var c=ft(e.to)?e.to(t,n.data,o):e.to;return ce(ce({},e),{to:c,_event:s,event:s.data,delay:a})}function cz(e,t){return my(e,ce(ce({},t),{to:Ka.Parent}))}function dz(){return cz(_A)}var fz=function(e,t,n){return ce(ce({},e),{value:dt(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},hz=function(e){return{type:XF,sendId:e}};function pz(e){var t=py(e);return{type:wt.Start,activity:t,exec:void 0}}function mz(e){var t=ft(e)?e:py(e);return{type:wt.Stop,activity:t,exec:void 0}}function gz(e,t,n){var r=ft(e.activity)?e.activity(t,n.data):e.activity,o=typeof r=="string"?{id:r}:r,s={type:wt.Stop,activity:o};return s}var vz=function(e){return{type:EA,assignment:e}};function yz(e,t){var n=t?"#".concat(t):"";return"".concat(wt.After,"(").concat(e,")").concat(n)}function Zd(e,t){var n="".concat(wt.DoneState,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function uf(e,t){var n="".concat(wt.DoneInvoke,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function _u(e,t){var n="".concat(wt.ErrorPlatform,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function bz(e,t){return my(function(n,r){return r},ce(ce({},t),{to:e}))}function Cie(e){return{type:wt.Choose,conds:e}}var Eie=function(e){var t,n,r=[];try{for(var o=et(e),s=o.next();!s.done;s=o.next())for(var a=s.value,u=0;u<a.actions.length;){if(a.actions[u].type===EA){r.push(a.actions[u]),a.actions.splice(u,1);continue}u++}}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 xf(e,t,n,r,o,s,a){a===void 0&&(a=!1);var u=a?[]:Eie(o),c=u.length?aD(n,r,u,t):n,f=a?[n]:void 0,h=[];function m(w,S){var C;switch(S.type){case lh:{var E=lz(S,c,r,e.options.delays);return s&&typeof E.delay=="number"&&s(E,c,r),E}case fy:var I=uz(S,c,r,e.options.delays);return s&&I.to!==Ka.Internal&&(w==="entry"?h.push(I):s(I,c,r)),I;case JF:{var A=fz(S,c,r);return s?.(A,c,r),A}case aie:{var T=S,N=(C=T.conds.find(function(B){var Q=oz(B.cond,e.options.guards);return!Q||sz(e,Q,c,r,s?void 0:t)}))===null||C===void 0?void 0:C.actions;if(!N)return[];var M=lt(xf(e,t,c,r,[{type:w,actions:_s(co(N),e.options.actions)}],s,a),2),R=M[0],k=M[1];return c=k,f?.push(c),R}case lie:{var N=S.get(c,r.data);if(!N)return[];var L=lt(xf(e,t,c,r,[{type:w,actions:_s(co(N),e.options.actions)}],s,a),2),q=L[0],$=L[1];return c=$,f?.push(c),q}case CA:{var A=gz(S,c,r);return s?.(A,n,r),A}case EA:{c=aD(c,r,[S],s?void 0:t),f?.push(c);break}default:var D=Gu(S,e.options.actions),j=D.exec;if(s)s(D,c,r);else if(j&&f){var Z=f.length-1,he=ce(ce({},D),{exec:function(B){for(var Q=[],ae=1;ae<arguments.length;ae++)Q[ae-1]=arguments[ae];j.apply(void 0,Ft([f[Z]],lt(Q),!1))}});D=he}return D}}function g(w){var S,C,E=[];try{for(var I=et(w.actions),A=I.next();!A.done;A=I.next()){var T=A.value,N=m(w.type,T);N&&(E=E.concat(N))}}catch(M){S={error:M}}finally{try{A&&!A.done&&(C=I.return)&&C.call(I)}finally{if(S)throw S.error}}return h.forEach(function(M){s(M,c,r)}),h.length=0,E}var v=Gt(o.map(g));return[v,c]}const Sz=Object.freeze(Object.defineProperty({__proto__:null,after:yz,assign:vz,cancel:hz,choose:Cie,done:Zd,doneInvoke:uf,error:_u,forwardTo:bz,getActionFunction:Dg,initEvent:La,raise:az,resolveActions:xf,resolveLog:fz,resolveRaise:lz,resolveSend:uz,resolveStop:gz,send:my,sendParent:cz,sendUpdate:dz,start:pz,stop:mz,toActionObject:Gu,toActionObjects:_s,toActivityDefinition:py},Symbol.toStringTag,{value:"Module"}));var Lg=[],bu=function(e,t){Lg.push(e);var n=t(e);return Lg.pop(),n},_ie=function(e){return e(Lg[Lg.length-1])};function wz(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[Oi]=function(){return this},t}function xie(e,t,n,r){var o,s=iz(e.src),a=(o=t?.options.services)===null||o===void 0?void 0:o[s.type],u=e.data?kg(e.data,n,r):void 0,c=a?IA(a,e.id,u):wz(e.id);return c.meta=e,c}function IA(e,t,n){var r=wz(t);if(r.deferred=!0,Wu(e)){var o=r.state=bu(void 0,function(){return(n?e.withContext(n):e).initialState});r.getSnapshot=function(){return o}}return r}function Iie(e){try{return typeof e.send=="function"}catch{return!1}}function Aie(e){return Iie(e)&&"id"in e}function Rie(e){var t;return ce((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[Oi]=function(){return this},t),e)}var Ug=function(e){return e.type==="atomic"||e.type==="final"};function Cz(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function If(e){return Cz(e).filter(function(t){return t.type!=="history"})}function Ez(e){var t=[e];return Ug(e)?t:t.concat(Gt(If(e).map(Ez)))}function Yd(e,t){var n,r,o,s,a,u,c,f,h=new Set(e),m=X_(h),g=new Set(t);try{for(var v=et(g),w=v.next();!w.done;w=v.next())for(var S=w.value,C=S.parent;C&&!g.has(C);)g.add(C),C=C.parent}catch(L){n={error:L}}finally{try{w&&!w.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var E=X_(g);try{for(var I=et(g),A=I.next();!A.done;A=I.next()){var S=A.value;if(S.type==="compound"&&(!E.get(S)||!E.get(S).length))m.get(S)?m.get(S).forEach(function(q){return g.add(q)}):S.initialStateNodes.forEach(function(q){return g.add(q)});else if(S.type==="parallel")try{for(var T=(a=void 0,et(If(S))),N=T.next();!N.done;N=T.next()){var M=N.value;g.has(M)||(g.add(M),m.get(M)?m.get(M).forEach(function(q){return g.add(q)}):M.initialStateNodes.forEach(function(q){return g.add(q)}))}}catch(q){a={error:q}}finally{try{N&&!N.done&&(u=T.return)&&u.call(T)}finally{if(a)throw a.error}}}}catch(L){o={error:L}}finally{try{A&&!A.done&&(s=I.return)&&s.call(I)}finally{if(o)throw o.error}}try{for(var R=et(g),k=R.next();!k.done;k=R.next())for(var S=k.value,C=S.parent;C&&!g.has(C);)g.add(C),C=C.parent}catch(L){c={error:L}}finally{try{k&&!k.done&&(f=R.return)&&f.call(R)}finally{if(c)throw c.error}}return g}function _z(e,t){var n=t.get(e);if(!n)return{};if(e.type==="compound"){var r=n[0];if(r){if(Ug(r))return r.key}else return{}}var o={};return n.forEach(function(s){o[s.key]=_z(s,t)}),o}function X_(e){var t,n,r=new Map;try{for(var o=et(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(u){t={error:u}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function Tie(e,t){var n=Yd([e],t);return _z(e,X_(n))}function Qd(e,t){return Array.isArray(e)?e.some(function(n){return n===t}):e instanceof Set?e.has(t):!1}function Oie(e){return Ft([],lt(new Set(Gt(Ft([],lt(e.map(function(t){return t.ownEvents})),!1)))),!1)}function ag(e,t){return t.type==="compound"?If(t).some(function(n){return n.type==="final"&&Qd(e,n)}):t.type==="parallel"?If(t).every(function(n){return ag(e,n)}):!1}function Mie(e){return e===void 0&&(e=[]),e.reduce(function(t,n){return n.meta!==void 0&&(t[n.id]=n.meta),t},{})}function lD(e){return new Set(Gt(e.map(function(t){return t.tags})))}function xz(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(dt(e)||dt(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(function(o){return xz(e[o],t[o])})}function Pie(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function Nie(e,t){var n=e.exec,r=ce(ce({},e),{exec:n!==void 0?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return r}var fo=(function(){function e(t){var n=this,r;this.actions=[],this.activities=oD,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||oD,this.meta=Mie(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 Oie(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=La;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=La;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="."),dt(t))return[t];var o=Object.keys(t);return o.concat.apply(o,Ft([],lt(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=wA(t,["configuration","transitions","tags","machine"]);return ce(ce({},r),{tags:Array.from(n)})},e.prototype.matches=function(t){return xA(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var n;vie(!!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})(),kie={deferEvents:!1},uD=(function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=ce(ce({},kie),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})(),Pw=new Map,Die=0,Ad={bookId:function(){return"x:".concat(Die++)},register:function(e,t){return Pw.set(e,t),e},get:function(e){return Pw.get(e)},free:function(e){Pw.delete(e)}};function AA(){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 Lie(){var e=AA();if(e&&"__xstate__"in e)return e.__xstate__}function Uie(e){if(AA()){var t=Lie();t&&t.register(e)}}function $ie(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,c),r.forEach(function(h){return h.next(n)})}s=!1}},u=Rie({id:t.id,send:function(f){o.push(f),a()},getSnapshot:function(){return n},subscribe:function(f,h,m){var g=lf(f,h,m);return r.add(g),g.next(n),{unsubscribe:function(){r.delete(g)}}}}),c={parent:t.parent,self:u,id:t.id||"anonymous",observers:r};return n=e.start?e.start(c):n,u}var J_={sync:!1,autoForward:!1},vn;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(vn||(vn={}));var Fie=(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=vn.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(h,m){if(Sc(h))return r.batch(h),r.state;var g=Ln(hy(h,m));if(r.status===vn.Stopped)return r.state;if(r.status!==vn.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===Ka.Parent||r.parent.id===m),w=v?r.parent:dt(m)?m===Ka.Internal?r:r.children.get(m)||Ad.get(m):bie(m)?m:void 0;if(!w){if(!v)throw new Error("Unable to send event to child '".concat(m,"' from service '").concat(r.id,"'."));return}if("machine"in w){if(r.status!==vn.Stopped||r.parent!==w||r.state.done){var S=ce(ce({},h),{name:h.name===iie?"".concat(_u(r.id)):h.name,origin:r.sessionId});!g&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([w,S]):w.send(S)}}else!g&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([w,h.data]):w.send(h.data)},this._exec=function(h,m,g,v){v===void 0&&(v=r.machine.options.actions);var w=h.exec||Dg(h.type,v),S=ft(w)?w:w?w.exec:h.exec;if(S)try{return S(m,g.data,r.machine.config.predictableActionArguments?{action:h,_event:g}:{action:h,state:r.state,_event:g})}catch(Z){throw r.parent&&r.parent.send({type:"xstate.error",data:Z}),Z}switch(h.type){case lh:{var C=h;r.defer(C);break}case fy:var E=h;if(typeof E.delay=="number"){r.defer(E);return}else E.to?r.sendTo(E._event,E.to,g===La):r.send(E._event);break;case XF:r.cancel(h.sendId);break;case G_:{if(r.status!==vn.Running)return;var I=h.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[I.id||I.type])break;if(I.type===wt.Invoke){var A=iz(I.src),T=r.machine.options.services?r.machine.options.services[A.type]:void 0,N=I.id,M=I.data,R="autoForward"in I?I.autoForward:!!I.forward;if(!T)return;var k=M?kg(M,m,g):void 0;if(typeof T=="string")return;var L=ft(T)?T(m,g.data,{data:k,src:A,meta:I.meta}):T;if(!L)return;var q=void 0;Wu(L)&&(L=k?L.withContext(k):L,q={autoForward:R}),r.spawn(L,N,q)}else r.spawnActivity(I);break}case CA:{r.stopChild(h.activity.id);break}case JF:var $=h,D=$.label,j=$.value;D?r.logger(D,j):r.logger(j);break}};var o=ce(ce({},e.defaultOptions),n),s=o.clock,a=o.logger,u=o.parent,c=o.id,f=c!==void 0?c:t.id;this.id=f,this.logger=a,this.clock=s,this.parent=u,this.options=o,this.scheduler=new uD({deferEvents:this.options.deferEvents}),this.sessionId=Ad.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:bu(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=et(t.actions),a=s.next();!a.done;a=s.next()){var u=a.value;this.exec(u,t,n)}}catch(c){r={error:c}}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,u,c,f,h,m=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||n===La)&&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(L){m.state.children[L.id]=L}),this.devTools&&this.devTools.send(n.data,t),t.event)try{for(var v=et(this.eventListeners),w=v.next();!w.done;w=v.next()){var S=w.value;S(t.event)}}catch(L){r={error:L}}finally{try{w&&!w.done&&(o=v.return)&&o.call(v)}finally{if(r)throw r.error}}try{for(var C=et(this.listeners),E=C.next();!E.done;E=C.next()){var S=E.value;S(t,t.event)}}catch(L){s={error:L}}finally{try{E&&!E.done&&(a=C.return)&&a.call(C)}finally{if(s)throw s.error}}try{for(var I=et(this.contextListeners),A=I.next();!A.done;A=I.next()){var T=A.value;T(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(L){u={error:L}}finally{try{A&&!A.done&&(c=I.return)&&c.call(I)}finally{if(u)throw u.error}}if(this.state.done){var N=t.configuration.find(function(L){return L.type==="final"&&L.parent===m.machine}),M=N&&N.doneData?kg(N.doneData,t.context,n):void 0;this._doneEvent=uf(this.id,M);try{for(var R=et(this.doneListeners),k=R.next();!k.done;k=R.next()){var S=k.value;S(this._doneEvent)}}catch(L){f={error:L}}finally{try{k&&!k.done&&(h=R.return)&&h.call(R)}finally{if(f)throw f.error}}this._stop(),this._stopChildren(),Ad.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===vn.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,n,r){var o=this,s=lf(t,n,r);this.listeners.add(s.next),this.status!==vn.NotStarted&&s.next(this.state);var a=function(){o.doneListeners.delete(a),o.stopListeners.delete(a),s.complete()};return this.status===vn.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===vn.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===vn.Running)return this;this.machine._init(),Ad.register(this.sessionId,this),this.initialized=!0,this.status=vn.Running;var r=t===void 0?this.initialState:bu(this,function(){return Pie(t)?n.machine.resolveState(t):n.machine.resolveState(fo.from(t,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,La)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){ft(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,n,r,o,s,a,u,c,f,h;try{for(var m=et(this.listeners),g=m.next();!g.done;g=m.next()){var v=g.value;this.listeners.delete(v)}}catch(R){t={error:R}}finally{try{g&&!g.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}try{for(var w=et(this.stopListeners),S=w.next();!S.done;S=w.next()){var v=S.value;v(),this.stopListeners.delete(v)}}catch(R){r={error:R}}finally{try{S&&!S.done&&(o=w.return)&&o.call(w)}finally{if(r)throw r.error}}try{for(var C=et(this.contextListeners),E=C.next();!E.done;E=C.next()){var v=E.value;this.contextListeners.delete(v)}}catch(R){s={error:R}}finally{try{E&&!E.done&&(a=C.return)&&a.call(C)}finally{if(s)throw s.error}}try{for(var I=et(this.doneListeners),A=I.next();!A.done;A=I.next()){var v=A.value;this.doneListeners.delete(v)}}catch(R){u={error:R}}finally{try{A&&!A.done&&(c=I.return)&&c.call(I)}finally{if(u)throw u.error}}if(!this.initialized)return this;this.initialized=!1,this.status=vn.Stopped,this._initialState=void 0;try{for(var T=et(Object.keys(this.delayedEventsMap)),N=T.next();!N.done;N=T.next()){var M=N.value;this.clock.clearTimeout(this.delayedEventsMap[M])}}catch(R){f={error:R}}finally{try{N&&!N.done&&(h=T.return)&&h.call(T)}finally{if(f)throw f.error}}this.scheduler.clear(),this.scheduler=new uD({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=Ln({type:"xstate.stop"}),s=bu(t,function(){var a=Gt(Ft([],lt(t.state.configuration),!1).sort(function(m,g){return g.order-m.order}).map(function(m){return _s(m.onExit,t.machine.options.actions)})),u=lt(xf(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),c=u[0],f=u[1],h=new fo({value:t.state.value,context:f,_event:o,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:c.filter(function(m){return!Q_(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(),Ad.free(t.sessionId)}}),this},e.prototype.batch=function(t){var n=this;if(!(this.status===vn.NotStarted&&this.options.deferEvents)){if(this.status!==vn.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,u=!1,c=[],f=function(v){var w=Ln(v);n.forward(w),a=bu(n,function(){return n.machine.transition(a,w,void 0,r||void 0)}),c.push.apply(c,Ft([],lt(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(S){return Nie(S,a)})),!1)),u=u||!!a.changed};try{for(var h=et(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=u,a.actions=c,n.update(a,Ln(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=Ln(t);if(o.name.indexOf(rD)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(rD)===0}))throw o.data.data;var s=bu(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=et(this.forwardTo),s=o.next();!s.done;s=o.next()){var a=s.value,u=this.children.get(a);if(!u)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));u.send(t)}}catch(c){n={error:c}}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),ft(n.stop)&&n.stop())},e.prototype.spawn=function(t,n,r){if(this.status!==vn.Running)return IA(t,n);if(iD(t))return this.spawnPromise(Promise.resolve(t),n);if(ft(t))return this.spawnCallback(t,n);if(Aie(t))return this.spawnActor(t,n);if(yie(t))return this.spawnObservable(t,n);if(Wu(t))return this.spawnMachine(t,ce(ce({},r),{id:n}));if(pie(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,ce(ce({},this.options),{parent:this,id:n.id||t.id})),s=ce(ce({},J_),n);s.sync&&o.onTransition(function(u){r.send(_A,{state:u,id:o.id})});var a=o;return this.children.set(o.id,a),s.autoForward&&this.forwardTo.add(o.id),o.onDone(function(u){r.removeChild(o.id),r.send(Ln(u,{origin:o.id}))}).start(),a},e.prototype.spawnBehavior=function(t,n){var r=$ie(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(c){s||(a=c,o.removeChild(n),o.send(Ln(uf(n,c),{origin:n})))},function(c){if(!s){o.removeChild(n);var f=_u(n,c);try{o.send(Ln(f,{origin:n}))}catch{o.devTools&&o.devTools.send(f,o.state),o.machine.strict&&o.stop()}}});var u=(r={id:n,send:function(){},subscribe:function(c,f,h){var m=lf(c,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[Oi]=function(){return this},r);return this.children.set(n,u),u},e.prototype.spawnCallback=function(t,n){var r,o=this,s=!1,a=new Set,u=new Set,c,f=function(g){c=g,u.forEach(function(v){return v(g)}),!s&&o.send(Ln(g,{origin:n}))},h;try{h=t(f,function(g){a.add(g)})}catch(g){this.send(_u(n,g))}if(iD(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=lf(g);return u.add(v.next),{unsubscribe:function(){u.delete(v.next)}}},stop:function(){s=!0,ft(h)&&h()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},r[Oi]=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(c){s=c,o.send(Ln(c,{origin:n}))},function(c){o.removeChild(n),o.send(Ln(_u(n,c),{origin:n}))},function(){o.removeChild(n),o.send(Ln(uf(n),{origin:n}))}),u=(r={id:n,send:function(){},subscribe:function(c,f,h){return t.subscribe(c,f,h)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return s},toJSON:function(){return{id:n}}},r[Oi]=function(){return this},r);return this.children.set(n,u),u},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[Oi]=function(){return this},r))},e.prototype.attachDev=function(){var t=AA();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(ce(ce({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:ce({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}Uie(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Oi]=function(){return this},e.prototype.getSnapshot=function(){return this.status===vn.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=Iz,e})(),zie=function(e){return dt(e)?ce(ce({},J_),{name:e}):ce(ce(ce({},J_),{name:Sie()}),e)};function Rd(e,t){var n=zie(t);return _ie(function(r){return r?r.spawn(e,n.name,n):IA(e,n.name)})}function Iz(e,t){var n=new Fie(e,t);return n}function jie(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function Qp(e){return ce(ce({type:K_},e),{toJSON:function(){e.onDone,e.onError;var t=wA(e,["onDone","onError"]);return ce(ce({},t),{type:K_,src:jie(e.src)})}})}var Xp="",ex="#",Nw="*",au={},lu=function(e){return e[0]===ex},Bie=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Hie=(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(Bie(),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:ez),this.id=this.config.id||Ft([this.machine.key],lt(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?Kd(this.config.states,function(f,h){var m,g=new e(f,{},void 0,{parent:s,key:h});return Object.assign(s.idMap,ce((m={},m[g.id]=g,m),g.idMap)),g}):au;var u=0;function c(f){var h,m;f.order=u++;try{for(var g=et(Cz(f)),v=g.next();!v.done;v=g.next()){var w=v.value;c(w)}}catch(S){h={error:S}}finally{try{v&&!v.done&&(m=g.return)&&m.call(g)}finally{if(h)throw h.error}}}c(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===Xp}):Xp in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=co(this.config.entry||this.config.onEntry).map(function(f){return Gu(f)}),this.onExit=co(this.config.exit||this.config.onExit).map(function(f){return Gu(f)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=co(this.config.invoke).map(function(f,h){var m,g;if(Wu(f)){var v=Yp(s.id,h);return s.machine.options.services=ce((m={},m[v]=f,m),s.machine.options.services),Qp({src:v,id:v})}else if(dt(f.src)){var v=f.id||Yp(s.id,h);return Qp(ce(ce({},f),{id:v,src:f.src}))}else if(Wu(f.src)||ft(f.src)){var v=f.id||Yp(s.id,h);return s.machine.options.services=ce((g={},g[v]=f.src,g),s.machine.options.services),Qp(ce(ce({id:v},f),{src:v}))}else{var w=f.src;return Qp(ce(ce({id:Yp(s.id,h)},f),{src:w}))}}),this.activities=co(this.config.activities).concat(this.invoke).map(function(f){return py(f)}),this.transition=this.transition.bind(this),this.tags=co(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||Ez(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,u=r.services,c=r.delays;return new e(this.config,{actions:ce(ce({},o),t.actions),activities:ce(ce({},s),t.activities),guards:ce(ce({},a),t.guards),services:ce(ce({},u),t.services),delays:ce(ce({},c),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 ft(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:Kd(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===Xp,r=this.transitions.filter(function(o){var s=o.eventType===t;return n?s:s||o.eventType===Nw});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 u=ft(s)?"".concat(t.id,":delay[").concat(a,"]"):s,c=yz(u,t.id);return t.onEntry.push(my(c,{delay:s})),t.onExit.push(hz(c)),c},o=Sc(n)?n.map(function(s,a){var u=r(s.delay,a);return ce(ce({},s),{event:u})}):Gt(Object.keys(n).map(function(s,a){var u=n[s],c=dt(u)?{target:u}:u,f=isNaN(+s)?s:+s,h=r(f,a);return co(c).map(function(m){return ce(ce({},m),{event:h,delay:f})})}));return o.map(function(s){var a=s.delay;return ce(ce({},t.formatTransition(s)),{delay:a})})},e.prototype.getStateNodes=function(t){var n,r=this;if(!t)return[];var o=t instanceof fo?t.value:af(t,this.delimiter);if(dt(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),u=[this];return u.push.apply(u,Ft([],lt(Gt(a.map(function(c){return r.getStateNode(c).getStateNodes(o[c])}))),!1)),u},e.prototype.handles=function(t){var n=tz(t);return this.events.includes(n)},e.prototype.resolveState=function(t){var n=t instanceof fo?t:fo.create(t),r=Array.from(Yd([],this.getStateNodes(n.value)));return new fo(ce(ce({},n),{value:this.resolve(n.value),configuration:r,done:ag(r,this),tags:lD(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 u=et(Object.keys(t)),c=u.next();!c.done;c=u.next()){var f=c.value,h=t[f];if(h){var m=this.getStateNode(f),g=m._transition(h,n,r);g&&(a[f]=g)}}}catch(E){o={error:E}}finally{try{c&&!c.done&&(s=u.return)&&s.call(u)}finally{if(o)throw o.error}}var v=Object.keys(a).map(function(E){return a[E]}),w=Gt(v.map(function(E){return E.transitions})),S=v.some(function(E){return E.transitions.length>0});if(!S)return this.next(n,r);var C=Gt(Object.keys(a).map(function(E){return a[E].configuration}));return{transitions:w,exitSet:Gt(v.map(function(E){return E.exitSet})),configuration:C,source:n,actions:Gt(Object.keys(a).map(function(E){return a[E].actions}))}},e.prototype._transition=function(t,n,r){return dt(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,Ln(n))},e.prototype.next=function(t,n){var r,o,s=this,a=n.name,u=[],c=[],f;try{for(var h=et(this.getCandidates(a)),m=h.next();!m.done;m=h.next()){var g=m.value,v=g.cond,w=g.in,S=t.context,C=w?dt(w)&&lu(w)?t.matches(af(this.getStateNodeById(w).path,this.delimiter)):xA(af(w,this.delimiter),die(this.path.slice(0,-2))(t.value)):!0,E=!1;try{E=!v||sz(this.machine,v,S,n,t)}catch(T){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(T.message))}if(E&&C){g.target!==void 0&&(c=g.target),u.push.apply(u,Ft([],lt(g.actions),!1)),f=g;break}}}catch(T){r={error:T}}finally{try{m&&!m.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}if(f){if(!c.length)return{transitions:[f],exitSet:[],configuration:t.value?[this]:[],source:t,actions:u};var I=Gt(c.map(function(T){return s.getRelativeStateNodes(T,t.historyValue)})),A=!!f.internal;return{transitions:[f],exitSet:A?[]:Gt(c.map(function(T){return s.getPotentiallyReenteringNodes(T)})),configuration:I,source:t,actions:u}}},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,u){var c,f,h,m,g=this,v=a?Yd([],this.getStateNodes(a.value)):[],w=new Set;try{for(var S=et(Array.from(t).sort(function($,D){return $.order-D.order})),C=S.next();!C.done;C=S.next()){var E=C.value;(!Qd(v,E)||Qd(r.exitSet,E)||E.parent&&w.has(E.parent))&&w.add(E)}}catch($){c={error:$}}finally{try{C&&!C.done&&(f=S.return)&&f.call(S)}finally{if(c)throw c.error}}try{for(var I=et(v),A=I.next();!A.done;A=I.next()){var E=A.value;(!Qd(t,E)||Qd(r.exitSet,E.parent))&&r.exitSet.push(E)}}catch($){h={error:$}}finally{try{A&&!A.done&&(m=I.return)&&m.call(I)}finally{if(h)throw h.error}}r.exitSet.sort(function($,D){return D.order-$.order});var T=Array.from(w).sort(function($,D){return $.order-D.order}),N=new Set(r.exitSet),M=Gt(T.map(function($){var D=[];if($.type!=="final")return D;var j=$.parent;if(!j.parent)return D;D.push(Zd($.id,$.doneData),Zd(j.id,$.doneData?kg($.doneData,o,s):void 0));var Z=j.parent;return Z.type==="parallel"&&If(Z).every(function(he){return ag(r.configuration,he)})&&D.push(Zd(Z.id)),D})),R=T.map(function($){var D=$.onEntry,j=$.activities.map(function(Z){return pz(Z)});return{type:"entry",actions:_s(u?Ft(Ft([],lt(D),!1),lt(j),!1):Ft(Ft([],lt(j),!1),lt(D),!1),g.machine.options.actions)}}).concat({type:"state_done",actions:M.map(function($){return az($)})}),k=Array.from(N).map(function($){return{type:"exit",actions:_s(Ft(Ft([],lt($.onExit),!1),lt($.activities.map(function(D){return mz(D)})),!1),g.machine.options.actions)}}),L=k.concat({type:"transition",actions:_s(r.actions,this.machine.options.actions)}).concat(R);if(n){var q=_s(Gt(Ft([],lt(t),!1).sort(function($,D){return D.order-$.order}).map(function($){return $.onExit})),this.machine.options.actions).filter(function($){return!Q_($)});return L.concat({type:"stop",actions:q})}return L},e.prototype.transition=function(t,n,r,o){t===void 0&&(t=this.initialState);var s=Ln(n),a;if(t instanceof fo)a=r===void 0?t:this.resolveState(fo.from(t,r));else{var u=dt(t)?this.resolve(Ng(this.getResolvedPath(t))):this.resolve(t),c=r??this.machine.context;a=this.resolveState(fo.from(u,c))}if(this.strict&&!this.events.includes(s.name)&&!hie(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=Yd([],this.getStateNodes(a.value)),m=f.configuration.length?Yd(h,f.configuration):h;return f.configuration=Ft([],lt(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,Ft([],lt(a),!1)),t},e.prototype.resolveTransition=function(t,n,r,o,s){var a,u,c,f,h=this;s===void 0&&(s=La);var m=t.configuration,g=!n||t.transitions.length>0,v=g?t.configuration:n?n.configuration:[],w=ag(v,this),S=g?Tie(this.machine,m):void 0,C=n?n.historyValue?n.historyValue:t.source?this.machine.historyValue(n.value):void 0:void 0,E=this.getActions(new Set(v),w,t,r,s,n,o),I=n?ce({},n.activities):{};try{for(var A=et(E),T=A.next();!T.done;T=A.next()){var N=T.value;try{for(var M=(c=void 0,et(N.actions)),R=M.next();!R.done;R=M.next()){var k=R.value;k.type===G_?I[k.activity.id||k.activity.type]=k:k.type===CA&&(I[k.activity.id||k.activity.type]=!1)}}catch(oe){c={error:oe}}finally{try{R&&!R.done&&(f=M.return)&&f.call(M)}finally{if(c)throw c.error}}}}catch(oe){a={error:oe}}finally{try{T&&!T.done&&(u=A.return)&&u.call(A)}finally{if(a)throw a.error}}var L=lt(xf(this,n,r,s,E,o,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),q=L[0],$=L[1],D=lt(mie(q,Q_),2),j=D[0],Z=D[1],he=q.filter(function(oe){var fe;return oe.type===G_&&((fe=oe.activity)===null||fe===void 0?void 0:fe.type)===K_}),B=he.reduce(function(oe,fe){return oe[fe.activity.id]=xie(fe.activity,h.machine,$,s),oe},n?ce({},n.children):{}),Q=new fo({value:S||n.value,context:$,_event:s,_sessionid:n?n._sessionid:null,historyValue:S?C?gie(C,S):void 0:n?n.historyValue:void 0,history:!S||t.source?n:void 0,actions:S?Z:[],activities:S?I:n?n.activities:{},events:[],configuration:v,transitions:t.transitions,children:B,done:w,tags:lD(v),machine:this}),ae=r!==$;Q.changed=s.name===_A||ae;var ue=Q.history;ue&&delete ue.history;var Ce=!w&&(this._transient||m.some(function(oe){return oe._transient}));if(!g&&(!Ce||s.name===Xp))return Q;var U=Q;if(!w)for(Ce&&(U=this.resolveRaisedTransition(U,{type:oie},s,o));j.length;){var X=j.shift();U=this.resolveRaisedTransition(U,X._event,s,o)}var ie=U.changed||(ue?!!U.actions.length||ae||typeof ue.value!=typeof U.value||!xz(U.value,ue.value):void 0);return U.changed=ie,U.history=ue,U},e.prototype.getStateNode=function(t){if(lu(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=lu(t)?t.slice(ex.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"&&lu(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var n=Y_(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||au;switch(this.type){case"parallel":return Kd(this.initialStateValue,function(s,a){return s?r.getStateNode(a).resolve(t[a]||s):au});case"compound":if(dt(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?Kd(t,function(s,a){return s?r.getStateNode(a).resolve(s):au}):this.initialStateValue||{};default:return t||au}},e.prototype.getResolvedPath=function(t){if(lu(t)){var n=this.machine.idMap[t.slice(ex.length)];if(!n)throw new Error("Unable to find state node '".concat(t,"'"));return n.path}return Y_(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=sD(this.states,function(r){return r.initialStateValue||au},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=Ug(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;dt(n.target)?t=lu(n.target)?Ng(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(Ug(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=ig(this.initialStateValue);return Gt(n.map(function(r){return t.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var n=lt(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:sD(this.states,function(n,r){if(!t)return n.historyValue();var o=dt(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?Gt(ig(o).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var s=fie(r.path,"states")(t).current;return dt(s)?[r.getStateNode(s)]:Gt(ig(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=Gt(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 u=et(Object.keys(s)),c=u.next();!c.done;c=u.next()){var f=c.value,h=s[f];if(h.states)try{for(var m=(r=void 0,et(h.events)),g=m.next();!g.done;g=m.next()){var v=g.value;a.add("".concat(v))}}catch(w){r={error:w}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(r)throw r.error}}}}catch(w){t={error:w}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}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(!dt(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(u){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
|
|
20
|
-
`).concat(u.message))}else return n.getStateNodeByPath(s)})},e.prototype.formatTransition=function(t){var n=this,r=wie(t.target),o="internal"in t?t.internal:r?r.some(function(c){return dt(c)&&c[0]===n.delimiter}):!0,s=this.machine.options.guards,a=this.resolveTarget(r),u=ce(ce({},t),{actions:_s(co(t.actions)),cond:oz(t.cond,s),target:a,source:this,internal:o,eventType:t.event,toJSON:function(){return ce(ce({},u),{target:u.target?u.target.map(function(c){return"#".concat(c.id)}):void 0,source:"#".concat(n.id)})}});return u},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=Nw,u=s[a],c=u===void 0?[]:u,f=wA(s,[typeof a=="symbol"?a:a+""]);o=Gt(Object.keys(f).map(function(I){var A=iu(I,f[I]);return A}).concat(iu(Nw,c)))}var h=this.config.always?iu("",this.config.always):[],m=this.config.onDone?iu(String(Zd(this.id)),this.config.onDone):[],g=Gt(this.invoke.map(function(I){var A=[];return I.onDone&&A.push.apply(A,Ft([],lt(iu(String(uf(I.id)),I.onDone)),!1)),I.onError&&A.push.apply(A,Ft([],lt(iu(String(_u(I.id)),I.onError)),!1)),A})),v=this.after,w=Gt(Ft(Ft(Ft(Ft([],lt(m),!1),lt(g),!1),lt(o),!1),lt(h),!1).map(function(I){return co(I).map(function(A){return r.formatTransition(A)})}));try{for(var S=et(v),C=S.next();!C.done;C=S.next()){var E=C.value;w.push(E)}}catch(I){t={error:I}}finally{try{C&&!C.done&&(n=S.return)&&n.call(S)}finally{if(t)throw t.error}}return w},e})();function wc(e,t){return new Hie(e,t)}var vs=vz,gy=dz,qie=bz,Vie=_.useLayoutEffect;function cD(e){var t=_.useRef();return t.current||(t.current={v:e()}),t.current.v}var $g=function(){return $g=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},$g.apply(this,arguments)},Wie=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},Gie=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(u){a={error:u}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s};function Kie(e,t){var n=cD(function(){return typeof e=="function"?e():e}),r=t.context,o=t.guards,s=t.actions,a=t.activities,u=t.services,c=t.delays;t.state;var f=Wie(t,["context","guards","actions","activities","services","delays","state"]),h=cD(function(){var m={context:r,guards:o,actions:s,activities:a,services:u,delays:c},g=n.withConfig(m,function(){return $g($g({},n.context),r)});return Iz(g,f)});return Vie(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,u),Object.assign(h.machine.options.delays,c)},[s,o,a,u,c]),h}function Zie(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Gie(t,2),o=r[0],s=o===void 0?{}:o,a=r[1],u=Kie(e,s);return _.useEffect(function(){if(a){var c=u.subscribe(lf(a));return function(){c.unsubscribe()}}},[a]),_.useEffect(function(){var c=s.state;return u.start(c?fo.create(c):void 0),function(){u.stop(),u.status=vn.NotStarted}},[]),u}function Yie(e){return e.status!==0?e.getSnapshot():e.machine.initialState}function Qie(e){return"state"in e&&"machine"in e}function Xie(e){return"state"in e}var Jie=function(e,t){return e===t},eae=function(e,t){if(Qie(e)){if(e.status===0&&t.current)return t.current;var n=Yie(e);return t.current=e.status===0?n:null,n}return Xie(e)?e.state:void 0};function tae(e,t,n,r){n===void 0&&(n=Jie);var o=_.useRef(null),s=_.useCallback(function(c){var f=e.subscribe(c).unsubscribe;return f},[e]),a=_.useCallback(function(){return eae(e,o)},[e,r]),u=QF.useSyncExternalStoreWithSelector(s,a,a,t,n);return u}const nae=e=>{if(e instanceof Xr)return e;if(e instanceof Error){if(e.name==="InvalidStateError"){const{message:t,recoverySuggestion:n}=ju[At.PasskeyAlreadyExists];return new Xr({name:At.PasskeyAlreadyExists,message:t,recoverySuggestion:n,underlyingError:e})}if(e.name==="NotAllowedError"){const{message:t,recoverySuggestion:n}=ju[At.PasskeyRegistrationCanceled];return new Xr({name:At.PasskeyRegistrationCanceled,message:t,recoverySuggestion:n,underlyingError:e})}}return j8(e)},rae=async e=>{try{const t=B8();fc(t,At.PasskeyNotSupported);const n=mY(e),r=await navigator.credentials.create({publicKey:n});return SY(r),gY(r)}catch(t){throw nae(t)}},oae=e=>hn(In,xn("StartWebAuthnRegistration"),$n(),{...An,...e}),sae=e=>hn(In,xn("CompleteWebAuthnRegistration"),$n(),{...An,...e});async function iae(){const e=Tt.getConfig().Auth?.Cognito;We(e);const{userPoolEndpoint:t,userPoolId:n}=e,{tokens:r}=await zv();dc(r);const o=oae({endpointResolver:rt({endpointOverride:t})}),{CredentialCreationOptions:s}=await o({region:nt(n),userAgentValue:vt($e.StartWebAuthnRegistration)},{AccessToken:r.accessToken.toString()});bY(s);const a=await rae(s);await sae({endpointResolver:rt({endpointOverride:t})})({region:nt(n),userAgentValue:vt($e.CompleteWebAuthnRegistration)},{AccessToken:r.accessToken.toString(),Credential:a})}const aae=e=>hn(In,xn("ListWebAuthnCredentials"),$n(),{...An,...e});async function lae(e,t){const n=e.getConfig().Auth?.Cognito;We(n);const{userPoolEndpoint:r,userPoolId:o}=n,{tokens:s}=await e.Auth.fetchAuthSession();dc(s);const a=aae({endpointResolver:rt({endpointOverride:r})}),{Credentials:u=[],NextToken:c}=await a({region:nt(o),userAgentValue:vt($e.ListWebAuthnCredentials)},{AccessToken:s.accessToken.toString(),MaxResults:t?.pageSize,NextToken:t?.nextToken});return{credentials:u.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:c}}async function RA(e){return lae(Tt,e)}const TA=e=>e.context.actorRef?.getSnapshot(),Af=e=>TA(e)?.context,uae={category:eo.AI,apis:[ws.CreateConversation,ws.DeleteConversation,ws.ListConversations,ws.UpdateConversation,ws.OnMessage,ws.SendMessage,ws.Generation]},cae={apis:[$e.DeleteUser,$e.UpdatePassword],category:eo.Auth},dae={apis:[$e.SignUp,$e.ConfirmSignUp,$e.ResendSignUpCode,$e.SignIn,$e.ConfirmSignIn,$e.FetchUserAttributes,$e.SignOut,$e.ResetPassword,$e.ConfirmResetPassword,$e.SignInWithRedirect],category:eo.Auth},fae={apis:[ho.UploadData],category:eo.Storage},hae={apis:[C_.NotifyMessageInteraction],category:eo.InAppMessaging},pae={category:eo.Geo,apis:[rf.SearchByText,rf.SearchForSuggestions,rf.SearchByPlaceId]},mae={category:eo.Geo,apis:[]},gae={apis:[ho.UploadData],category:eo.Storage},vae={apis:[ho.UploadData,ho.Copy,ho.GetUrl,ho.List,ho.Remove,ho.GetDataAccess,ho.ListCallerAccessGrants],category:eo.Storage};function Mr(e){return e!=null&&!Array.isArray(e)&&typeof e=="object"}function Ps(e){return typeof e=="string"||typeof e=="object"&&Object.prototype.toString.call(e)==="[object String]"}function yae(e){return Mr(e)&&Object.prototype.toString.call(e)==="[object Map]"}function bae(e){return Mr(e)&&Object.prototype.toString.call(e)==="[object Set]"}function OA(e){if(e==null)return!0;if(Mr(e)&&(yae(e)||bae(e)))return!e.size;if(Mr(e)&&(Ps(e)||Array.isArray(e)))return!e.length;for(const t in e)if(Ns(e,t))return!1;return!0}function Sae(e){return Array.isArray(e)&&OA(e)}function wae(...e){return e.every(Sae)}function Az(e){return Mr(e)&&OA(e)}function Cae(...e){return e.every(Az)}function Ns(e,t){return e!=null&&Object.prototype.hasOwnProperty.call(e,t)}function ks(e){return typeof e=="function"}const Rt=(e,t)=>t?`${e}--${t}`:"",cr=(e,t,n)=>n?`${e}--${t}`:"";function Eae(...e){}function _ae(e,t){const n={},r={};return Object.entries(e).forEach(([o,s])=>{t(o)?n[o]=s:r[o]=s}),[n,r]}const Rz=({payload:e},t,n)=>{const{data:r,event:o}=e,{send:s}=t,{onSignIn:a,onSignOut:u}=n??{};switch(o){case"signedIn":{ks(a)&&a(e);break}case"signInWithRedirect":{s("SIGN_IN_WITH_REDIRECT");break}case"signedOut":{ks(u)&&u(),s("SIGN_OUT");break}case"tokenRefresh_failure":{if(r?.error?.name===zi.NetworkError)return;s("SIGN_OUT");break}}},xae=(e,t=Rz)=>{const n=r=>t(r,e);return zo.listen("auth",n,"authenticator-hub-handler")},Tz=["+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:Tz,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}},Iae=["^","$","*",".","[","]","{","}","(",")","?",'"',"!","@","#","%","&","/","\\",",",">","<","'",":",";","|","_","~","`","=","+","-"," "],Aae=(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}},Rae=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")}},Tae=e=>{const t=Af(e)??{},{allowedMfaTypes:n,availableAuthMethods:r,challengeName:o,codeDeliveryDetails:s,preferredChallenge:a,remoteError:u,selectedAuthMethod:c,validationError:f,totpSecretCode:h=null,unverifiedUserAttributes:m,username:g}=t,{socialProviders:v=[],loginMechanisms:w}=e.context?.config??{},S=w?.[0],C=t?.user??e.context?.user,E=!!(f&&Object.keys(f).length>0),I=TA(e),A=e.hasTag("pending")||I?.hasTag("pending"),T=Aae(e,I),N=(R=>{switch(R){case"idle":case"setup":return"configuring";case"authenticated":return"authenticated";default:return"unauthenticated"}})(T);return{allowedMfaTypes:n,authStatus:N,availableAuthMethods:r,challengeName:o,codeDeliveryDetails:s,error:u,hasValidationErrors:E,isPending:A,loginMechanism:S,preferredChallenge:a,route:T,selectedAuthMethod:c,socialProviders:v,totpSecretCode:h,unverifiedUserAttributes:m,user:C,username:g,validationErrors:f}},Oae=({send:e,state:t})=>{const n=Rae(e),r=Tae(t);return{...n,...r}};var xu;(function(e){e.Apple="Apple",e.Amazon="Amazon",e.Facebook="Facebook",e.Google="Google"})(xu||(xu={}));var dD;(function(e){e.Email="email",e.PhoneNumber="phone_number"})(dD||(dD={}));const Mae=["birthdate","email","family_name","given_name","middle_name","name","nickname","phone_number","preferred_username","profile","website"],Pae=["username","email","phone_number"],Oz=[...Pae,...Mae,"confirmation_code","password","confirm_password"],Nae=e=>Oz.includes(e),Mz=e=>Oz.includes(e),kae=e=>Array.isArray(e),Dae=e=>e?kae(e)?e:[e]:null,Lae=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("")},Uae=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("")},$ae=e=>{const t=e.split("@");return`${Lae(t[0])}@${t[1]}`},Fae=(e,t)=>e==="Phone Number"?Uae(t):$ae(t),zae=e=>Iae.some(t=>e.includes(t)),jae=(e,t,n)=>encodeURI(`otpauth://totp/${e}:${t}?secret=${n}&issuer=${e}`);function Bae(e,...t){return Object.entries(e).reduce((n,[r,o])=>({...n,[r]:t.includes(r)?o:o?.trim()}),{})}const Hae={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"},lg={...Hae},ge={...lg};function de(e){return O8.get(e)}const MA=e=>{const t=e?.context.config?.loginMechanisms,[n]=t??["username"];return n},qae=e=>{const t={...e};for(const[n,r]of Object.entries(e)){const{label:o,placeholder:s}=r;t[n]={...r,label:o?de(o):void 0,placeholder:s?de(s):void 0}}return t},Vae=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),Wae="+1",Ds=e=>{let t=vy[e];const{type:n}=t;return n==="tel"&&(t={...t,dialCode:Wae}),t},yy=e=>{const t=MA(e);return{...Ds(t),autocomplete:"username"}},ug=e=>({confirmation_code:{...Ds("confirmation_code"),label:"Code *",placeholder:"Code"}}),Gae=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:{...yy(e)}};return o&&(s.password={...Ds("password"),autocomplete:"current-password"}),s},Kae=e=>{const{loginMechanisms:t,signUpAttributes:n}=e.context.config,r=MA(e),s=e.context.actorRef?.getSnapshot()?.context?.availableAuthMethods,a=s&&s.length>1,u=Array.from(new Set([...t,"password","confirm_password",...n])),c={};for(const f of u)if(Mz(f)){const h=f===r?yy(e):Ds(f),m=a&&(f==="email"||f==="phone_number"||f==="password"||f==="confirm_password");c[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 c},Zae=e=>({confirmation_code:{...Ds("confirmation_code"),placeholder:"Enter your code"}}),Yae=e=>{const t=MA(e),{label:n}=vy[t];return{username:{...yy(e),label:`Enter your ${n.toLowerCase()}`,placeholder:`Enter your ${n.toLowerCase()}`}}},Qae=e=>({...ug(),password:{...Ds("password"),label:"New Password",placeholder:"New Password"},confirm_password:{...Ds("confirm_password"),label:"Confirm Password",placeholder:"Confirm Password"}}),Xae=e=>{const t=TA(e),{missingAttributes:n}=t.context,r=Array.from(new Set(["password","confirm_password",...n??[]])),o={};for(const s of r)Mz(s)?o[s]={...Ds(s)}:console.debug(`Authenticator does not have a default implementation for ${s}. Customize ForceNewPassword FormFields to add your own.`);return o},Jae=e=>({email:Ds("email")}),ele={signIn:Gae,signUp:Kae,confirmSignUp:Zae,confirmSignIn:ug,forceNewPassword:Xae,forgotPassword:Yae,confirmResetPassword:Qae,confirmVerifyUser:ug,setupEmail:Jae,setupTotp:ug},tle=(e,t)=>{const n=ele[e];return n(t)},nle=(e,t)=>{const n=Af(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 u={...yy(t),...s};return{...r,[o]:u}}else if(Nae(o)){const u={...vy[o],...s};return{...r,[o]:u}}else return{...r,[o]:s}},{})},rle=(e,t)=>{const n=tle(e,t),r=nle(e,t),o={...n,...r};return delete o.QR,qae(o)},ole=e=>e.map(t=>{const n=t[0],r={...t[1],order:void 0};return[n,r]}),sle=(e,t)=>{const n=rle(e,t);return ole(Vae(n))},ile=e=>{switch(e){case"EMAIL_OTP":return de(ge.CONFIRM_EMAIL);case"SMS_MFA":return de(ge.CONFIRM_SMS);case"SOFTWARE_TOKEN_MFA":return de(ge.CONFIRM_TOTP);default:return de(ge.CONFIRM_MFA_DEFAULT)}},ale=e=>{const{DeliveryMedium:t,Destination:n}=e??{},r=t==="EMAIL",o=t==="SMS",s=de(ge.CODE_ARRIVAL);return r||o?`${de(r?ge.CODE_EMAILED:ge.CODE_TEXTED)} ${n}. ${s}.`:`${de(ge.CODE_SENT)}. ${s}.`},lle=e=>{const{DeliveryMedium:t}=e??{},n=t==="EMAIL";return de(!n&&t==="SMS"?ge.WE_SENT_CODE:n?ge.WE_EMAILED:ge.WE_TEXTED)},ule={amazon:"Amazon",apple:"Apple",facebook:"Facebook",google:"Google"},cle=(e,t)=>de(`Sign ${e==="signIn"?"In":"Up"} with ${ule[t]}`),dle=e=>de(e==="MFA_SETUP"?ge.MFA_SETUP_SELECTION:ge.MFA_SELECTION),fle=e=>{switch(e){case"email":return de(ge.EMAIL_ADDRESS);case"phone_number":return de(ge.PHONE_NUMBER);default:return de(ge.USERNAME)}},hle=e=>{switch(e){case"EMAIL":return de(lg.EMAIL_OTP);case"SMS":return de(lg.SMS_MFA);case"TOTP":return de(lg.SOFTWARE_TOKEN_MFA);default:return de(e)}},Sn={getBackToSignInText:()=>de(ge.BACK_SIGN_IN),getChangePasswordText:()=>de(ge.CHANGE_PASSWORD),getChangingText:()=>de(ge.CHANGING_PASSWORD),getConfirmText:()=>de(ge.CONFIRM),getConfirmingText:()=>de(ge.CONFIRMING),getContinueText:()=>de(ge.CONTINUE),getCopyText:()=>de(ge.UPPERCASE_COPY),getHidePasswordText:()=>de(ge.HIDE_PASSWORD),getLoadingText:()=>de(ge.LOADING),getOrText:()=>de(ge.OR),getResendCodeText:()=>de(ge.RESEND_CODE),getSendCodeText:()=>de(ge.SEND_CODE),getSendingText:()=>de(ge.SENDING),getShowPasswordText:()=>de(ge.SHOW_PASSWORD),getSubmitText:()=>de(ge.SUBMIT),getSubmittingText:()=>de(ge.SUBMITTING),getSignInTabText:()=>de(ge.SIGN_IN_TAB),getSignUpTabText:()=>de(ge.CREATE_ACCOUNT),getForgotPasswordText:e=>de(e?ge.FORGOT_PASSWORD:ge.FORGOT_YOUR_PASSWORD),getSigningInText:()=>de(ge.SIGNING_IN_BUTTON),getSignInText:()=>de(ge.SIGN_IN_BUTTON),getCreatingAccountText:()=>de(ge.CREATING_ACCOUNT),getCreateAccountText:()=>de(ge.CREATE_ACCOUNT),getCreateAccountWithEmailText:()=>de(ge.CREATE_ACCOUNT_WITH_EMAIL_OTP),getCreateAccountWithPasswordText:()=>de(ge.CREATE_ACCOUNT_WITH_PASSWORD),getCreateAccountWithSmsText:()=>de(ge.CREATE_ACCOUNT_WITH_SMS_OTP),getDeliveryMessageText:ale,getDeliveryMethodText:lle,getChallengeText:ile,getResetYourPasswordText:()=>de(ge.RESET_PASSWORD),getSetupEmailText:()=>de(ge.SETUP_EMAIL),getSetupTotpText:()=>de(ge.SETUP_TOTP),getSetupTotpInstructionsText:()=>de("Copy and paste the secret key below into an authenticator app and then enter the code in the text field below."),getCopiedText:()=>de("COPIED"),getSignInWithFederationText:cle,getMfaTypeLabelByValue:hle,getSelectMfaTypeByChallengeName:dle,getSelectMfaTypeText:()=>de(ge.SELECT_MFA_TYPE),getSkipText:()=>de(ge.SKIP),getVerifyText:()=>de(ge.VERIFY),getVerifyContactText:()=>de(ge.VERIFY_CONTACT),getAccountRecoveryInfoText:()=>de(ge.VERIFY_HEADING),getPasskeyPromptHeadingText:()=>de(ge.PASSKEY_PROMPT_HEADING),getPasskeyPromptDescriptionText:()=>de(ge.PASSKEY_PROMPT_DESCRIPTION),getCreatePasskeyText:()=>de(ge.CREATE_PASSKEY),getRegisteringText:()=>de(ge.REGISTERING),getContinueWithoutPasskeyText:()=>de(ge.CONTINUE_WITHOUT_PASSKEY),getPasskeyCreatedSuccessText:()=>de(ge.PASSKEY_CREATED_SUCCESS),getPasskeyRegisteredText:()=>de(ge.PASSKEY_REGISTERED),getPasskeyRegistrationFailedText:()=>de(ge.PASSKEY_REGISTRATION_FAILED),getPasskeyLabelText:()=>de(ge.PASSKEY_LABEL),getExistingPasskeysText:()=>de(ge.EXISTING_PASSKEYS),getSetupAnotherPasskeyText:()=>de(ge.SETUP_ANOTHER_PASSKEY),getSignInWithPasswordText:()=>de(ge.SIGN_IN_WITH_PASSWORD),getSignInWithEmailText:()=>de(ge.SIGN_IN_WITH_EMAIL),getSignInWithSmsText:()=>de(ge.SIGN_IN_WITH_SMS),getSignInWithPasskeyText:()=>de(ge.SIGN_IN_WITH_PASSKEY),getOtherSignInOptionsText:()=>de(ge.OTHER_SIGN_IN_OPTIONS),getEnterUsernameFirstText:()=>de(ge.ENTER_USERNAME_FIRST),getUsernameLabelByLoginMechanism:fle,getInvalidEmailText:()=>de("Please enter a valid email"),getRequiredFieldText:()=>de("This field is required")};var kw,fD;function Pz(){if(fD)return kw;fD=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 kw=e,kw}var Dw,hD;function ple(){if(hD)return Dw;hD=1;var e=mA(),t=YF(),n=1,r=2;function o(s,a,u,c){var f=u.length,h=f,m=!c;if(s==null)return!h;for(s=Object(s);f--;){var g=u[f];if(m&&g[2]?g[1]!==s[g[0]]:!(g[0]in s))return!1}for(;++f<h;){g=u[f];var v=g[0],w=s[v],S=g[1];if(m&&g[2]){if(w===void 0&&!(v in s))return!1}else{var C=new e;if(c)var E=c(w,S,v,s,a,C);if(!(E===void 0?t(S,w,n|r,c,C):E))return!1}}return!0}return Dw=o,Dw}var Lw,pD;function Nz(){if(pD)return Lw;pD=1;var e=Bs();function t(n){return n===n&&!e(n)}return Lw=t,Lw}var Uw,mD;function mle(){if(mD)return Uw;mD=1;var e=Nz(),t=ZF();function n(r){for(var o=t(r),s=o.length;s--;){var a=o[s],u=r[a];o[s]=[a,u,e(u)]}return o}return Uw=n,Uw}var $w,gD;function kz(){if(gD)return $w;gD=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return $w=e,$w}var Fw,vD;function gle(){if(vD)return Fw;vD=1;var e=ple(),t=mle(),n=kz();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 Fw=r,Fw}var zw,yD;function PA(){if(yD)return zw;yD=1;var e=bc(),t=cl(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return zw=r,zw}var jw,bD;function NA(){if(bD)return jw;bD=1;var e=Hs(),t=PA(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(s,a){if(e(s))return!1;var u=typeof s;return u=="number"||u=="symbol"||u=="boolean"||s==null||t(s)?!0:r.test(s)||!n.test(s)||a!=null&&s in Object(a)}return jw=o,jw}var Bw,SD;function vle(){if(SD)return Bw;SD=1;var e=pA(),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,u=o?o.apply(this,a):a[0],c=s.cache;if(c.has(u))return c.get(u);var f=r.apply(this,a);return s.cache=c.set(u,f)||c,f};return s.cache=new(n.Cache||e),s}return n.Cache=e,Bw=n,Bw}var Hw,wD;function yle(){if(wD)return Hw;wD=1;var e=vle(),t=500;function n(r){var o=e(r,function(a){return s.size===t&&s.clear(),a}),s=o.cache;return o}return Hw=n,Hw}var qw,CD;function ble(){if(CD)return qw;CD=1;var e=yle(),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,u,c,f){s.push(c?f.replace(n,"$1"):u||a)}),s});return qw=r,qw}var Vw,ED;function Sle(){if(ED)return Vw;ED=1;var e=ay(),t=Pz(),n=Hs(),r=PA(),o=e?e.prototype:void 0,s=o?o.toString:void 0;function a(u){if(typeof u=="string")return u;if(n(u))return t(u,a)+"";if(r(u))return s?s.call(u):"";var c=u+"";return c=="0"&&1/u==-1/0?"-0":c}return Vw=a,Vw}var Ww,_D;function kA(){if(_D)return Ww;_D=1;var e=Sle();function t(n){return n==null?"":e(n)}return Ww=t,Ww}var Gw,xD;function by(){if(xD)return Gw;xD=1;var e=Hs(),t=NA(),n=ble(),r=kA();function o(s,a){return e(s)?s:t(s,a)?[s]:n(r(s))}return Gw=o,Gw}var Kw,ID;function uh(){if(ID)return Kw;ID=1;var e=PA();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Kw=t,Kw}var Zw,AD;function DA(){if(AD)return Zw;AD=1;var e=by(),t=uh();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 Zw=n,Zw}var Yw,RD;function wle(){if(RD)return Yw;RD=1;var e=DA();function t(n,r,o){var s=n==null?void 0:e(n,r);return s===void 0?o:s}return Yw=t,Yw}var Qw,TD;function Cle(){if(TD)return Qw;TD=1;function e(t,n){return t!=null&&n in Object(t)}return Qw=e,Qw}var Xw,OD;function Ele(){if(OD)return Xw;OD=1;var e=by(),t=gA(),n=Hs(),r=cy(),o=yA(),s=uh();function a(u,c,f){c=e(c,u);for(var h=-1,m=c.length,g=!1;++h<m;){var v=s(c[h]);if(!(g=u!=null&&f(u,v)))break;u=u[v]}return g||++h!=m?g:(m=u==null?0:u.length,!!m&&o(m)&&r(v,m)&&(n(u)||t(u)))}return Xw=a,Xw}var Jw,MD;function _le(){if(MD)return Jw;MD=1;var e=Cle(),t=Ele();function n(r,o){return r!=null&&t(r,o,e)}return Jw=n,Jw}var eC,PD;function xle(){if(PD)return eC;PD=1;var e=YF(),t=wle(),n=_le(),r=NA(),o=Nz(),s=kz(),a=uh(),u=1,c=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,u|c)}}return eC=f,eC}var tC,ND;function LA(){if(ND)return tC;ND=1;function e(t){return t}return tC=e,tC}var nC,kD;function Ile(){if(kD)return nC;kD=1;function e(t){return function(n){return n?.[t]}}return nC=e,nC}var rC,DD;function Ale(){if(DD)return rC;DD=1;var e=DA();function t(n){return function(r){return e(r,n)}}return rC=t,rC}var oC,LD;function Rle(){if(LD)return oC;LD=1;var e=Ile(),t=Ale(),n=NA(),r=uh();function o(s){return n(s)?e(r(s)):t(s)}return oC=o,oC}var sC,UD;function Tle(){if(UD)return sC;UD=1;var e=gle(),t=xle(),n=LA(),r=Hs(),o=Rle();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 sC=s,sC}var iC,$D;function Dz(){if($D)return iC;$D=1;var e=ul(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return iC=t,iC}var aC,FD;function UA(){if(FD)return aC;FD=1;var e=Dz();function t(n,r,o){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[r]=o}return aC=t,aC}var lC,zD;function Lz(){if(zD)return lC;zD=1;var e=UA(),t=ah(),n=Object.prototype,r=n.hasOwnProperty;function o(s,a,u){var c=s[a];(!(r.call(s,a)&&t(c,u))||u===void 0&&!(a in s))&&e(s,a,u)}return lC=o,lC}var uC,jD;function Ole(){if(jD)return uC;jD=1;var e=Lz(),t=by(),n=cy(),r=Bs(),o=uh();function s(a,u,c,f){if(!r(a))return a;u=t(u,a);for(var h=-1,m=u.length,g=m-1,v=a;v!=null&&++h<m;){var w=o(u[h]),S=c;if(w==="__proto__"||w==="constructor"||w==="prototype")return a;if(h!=g){var C=v[w];S=f?f(C,w,v):void 0,S===void 0&&(S=r(C)?C:n(u[h+1])?[]:{})}e(v,w,S),v=v[w]}return a}return uC=s,uC}var cC,BD;function Mle(){if(BD)return cC;BD=1;var e=DA(),t=Ole(),n=by();function r(o,s,a){for(var u=-1,c=s.length,f={};++u<c;){var h=s[u],m=e(o,h);a(m,h)&&t(f,n(h,o),m)}return f}return cC=r,cC}var dC,HD;function $A(){if(HD)return dC;HD=1;var e=KF(),t=e(Object.getPrototypeOf,Object);return dC=t,dC}var fC,qD;function Ple(){if(qD)return fC;qD=1;var e=HF(),t=$A(),n=WF(),r=VF(),o=Object.getOwnPropertySymbols,s=o?function(a){for(var u=[];a;)e(u,n(a)),a=t(a);return u}:r;return fC=s,fC}var hC,VD;function Nle(){if(VD)return hC;VD=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return hC=e,hC}var pC,WD;function kle(){if(WD)return pC;WD=1;var e=Bs(),t=SA(),n=Nle(),r=Object.prototype,o=r.hasOwnProperty;function s(a){if(!e(a))return n(a);var u=t(a),c=[];for(var f in a)f=="constructor"&&(u||!o.call(a,f))||c.push(f);return c}return pC=s,pC}var mC,GD;function FA(){if(GD)return mC;GD=1;var e=GF(),t=kle(),n=dy();function r(o){return n(o)?e(o,!0):t(o)}return mC=r,mC}var gC,KD;function Dle(){if(KD)return gC;KD=1;var e=qF(),t=Ple(),n=FA();function r(o){return e(o,n,t)}return gC=r,gC}var vC,ZD;function Lle(){if(ZD)return vC;ZD=1;var e=Pz(),t=Tle(),n=Mle(),r=Dle();function o(s,a){if(s==null)return{};var u=e(r(s),function(c){return[c]});return a=t(a),n(s,u,function(c,f){return a(c,f[0])})}return vC=o,vC}var Ule=Lle();const $le=lc(Ule),Fle=!0,zle="",Rf=(e,t)=>`${e}${t}`.replace(/[^A-Z0-9+]/gi,""),jle=(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:")}},Ble=e=>{const{phone_number:t,...n}=$le(e,jle);if(Ps(t)&&t!==zle){const{country_code:r}=e;return{...n,phone_number:Rf(r,t)}}return n},Hle=(e,t,n,r)=>{const{password:o,...s}=t,a=Ble(s),u=r&&r!=="PASSWORD";let c=a;r==="SMS_OTP"&&a.email&&(c={...a,email:""});const f={autoSignIn:u?{enabled:!0,authFlowType:"USER_AUTH",preferredChallenge:r}:Fle,userAttributes:{...n==="phone_number"?{...c,phone_number:e}:c}};return{username:e,password:u?void 0:o,options:f}},qle=({formValues:e,loginMechanisms:t})=>{const n=e.__authMethod;if(n==="SMS_OTP"){const{country_code:o,phone_number:s}=e;return Rf(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 Rf(o,s)}return e[r]},Vle=(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:He}=Sz,Wle=He({actorDoneData:void 0}),Gle=He({challengeName:void 0}),Kle=He({missingAttributes:void 0}),Zle=He({remoteError:void 0}),Yle=He({formValues:e=>({username:e.formValues?.username})}),Qle=He({touched:{}}),Xle=He({user:void 0}),Jle=He({validationError:{}}),eue=He({totpSecretCode:(e,{data:t})=>{const{sharedSecret:n}=t.nextStep?.totpSetupDetails??{};return n}}),tue=He({allowedMfaTypes:(e,{data:t})=>t.nextStep?.allowedMFATypes}),nue=He({step:"SIGN_IN"}),rue=He({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),oue=He({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),sue=He({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}}}),iue=He({username:({formValues:e,loginMechanisms:t})=>{const n=t[0],{username:r,country_code:o}=e;return n==="phone_number"?Rf(o,r):r}}),aue=He({username:qle}),lue=He({username:({formValues:e,loginMechanisms:t})=>{const n=t[0],{username:r,country_code:o}=e;return n==="phone_number"?Rf(o,r):r}}),uue=He({step:(e,{data:t})=>t.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":t.nextStep.signInStep}),cue=He({step:(e,{data:t})=>t.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":t.nextStep.signUpStep}),due=He({step:(e,{data:t})=>t.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":t.nextStep.resetPasswordStep}),fue=He({missingAttributes:(e,{data:t})=>t.nextStep?.missingAttributes}),hue=He({validationError:(e,{data:t})=>t}),pue=He({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")?de(ge.PASSWORDLESS_NOT_ENABLED):n.includes("Cannot send code to either")?de(ge.CODE_DELIVERY_FAILED):n.includes("Invalid code or auth state")?de(ge.VERIFICATION_CODE_INVALID):n.includes("session is expired")?de(ge.VERIFICATION_CODE_EXPIRED):n.includes("ceremony has been canceled")?de(ge.PASSKEY_AUTHENTICATION_CANCELED):n||t}}),mue=He({user:(e,{data:t})=>t}),YD=e=>({Destination:e.destination,DeliveryMedium:e.deliveryMedium,AttributeName:e.attributName}),gue=He({codeDeliveryDetails:(e,{data:t})=>t?.nextStep?.codeDeliveryDetails?YD(t.nextStep.codeDeliveryDetails):YD(t)}),vue=He({formValues:(e,{data:t})=>{const{name:n,value:r}=t;return{...e.formValues,[n]:r}}}),yue=He({formValues:(e,{data:t})=>Bae({...e.formValues,...t},"password")}),bue=He({touched:(e,{data:t})=>({...e.touched,[t.name]:!0})}),Sue=He({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}}}}),wue=He({selectedUserAttribute:void 0}),Cue=He({selectedUserAttribute:e=>e.formValues?.unverifiedAttr}),Eue=He({step:"CONFIRM_SIGN_UP"}),_ue=He({selectedAuthMethod:(e,{data:t})=>t.method}),xue=He({selectedAuthMethod:(e,{data:t})=>t?.__authMethod||"PASSWORD"}),Iue=He({step:"SELECT_AUTH_METHOD"}),Aue=He({fetchedUserAttributes:(e,t)=>t.data}),Rue=He({hasExistingPasskeys:(e,t)=>t.data}),Tue=He({hasExistingPasskeys:!1}),ch={clearActorDoneData:Wle,clearChallengeName:Gle,clearError:Zle,clearFormValues:Yle,clearHasExistingPasskeys:Tue,clearMissingAttributes:Kle,clearSelectedUserAttribute:wue,clearTouched:Qle,clearUser:Xle,clearValidationError:Jle,handleBlur:bue,handleInput:vue,handleSubmit:yue,setAllowedMfaTypes:tue,setChallengeName:sue,setCodeDeliveryDetails:gue,setFetchedUserAttributes:Aue,setFieldErrors:hue,setHasExistingPasskeys:Rue,setMissingAttributes:fue,setNextResetPasswordStep:due,setNextSignInStep:uue,setNextSignUpStep:cue,setRemoteError:pue,setConfirmAttributeCompleteStep:oue,setConfirmSignUpSignUpStep:Eue,setSelectAuthMethodStep:Iue,setSelectedAuthMethod:_ue,setSelectedAuthMethodFromForm:xue,setShouldVerifyUserAttributeStep:rue,setSelectedUserAttribute:Cue,setSignInStep:nue,setTotpSecretCode:eue,setUser:mue,setUnverifiedUserAttributes:Sue,setUsernameForgotPassword:iue,setUsernameSignIn:lue,setUsernameSignUp:aue},Oue=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],Mue=(e,{data:t})=>t?.nextStep.signInStep==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",Pue=(e,{data:t})=>t?.nextStep?.signInStep==="RESET_PASSWORD",Nue=(e,{data:t})=>t?.nextStep.signInStep==="CONFIRM_SIGN_UP",kue=(e,{data:t})=>t?.nextStep.signUpStep==="COMPLETE_AUTO_SIGN_IN",Due=(e,{data:t})=>t?.nextStep.signUpStep==="DONE"&&e.step==="CONFIRM_SIGN_UP",Lue=(e,{data:t})=>t?.nextStep.signInStep==="DONE",Uue=(e,{data:t})=>t?.nextStep.signUpStep==="DONE",$ue=(e,{data:t})=>t?.nextStep.resetPasswordStep==="DONE",Fue=(e,{data:t})=>t?.step==="CONFIRM_ATTRIBUTE_COMPLETE",zue=(e,{data:t})=>t?.step==="CONFIRM_ATTRIBUTE_WITH_CODE",jue=(e,{data:t})=>t?.step==="SHOULD_CONFIRM_USER_ATTRIBUTE",Bue=(e,{data:t})=>t?.step==="RESET_PASSWORD",Hue=(e,{data:t})=>t?.step==="CONFIRM_SIGN_UP",que=({step:e})=>Oue.includes(e),Vue=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",Wue=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",Gue=({step:e})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(e),Kue=({step:e})=>e==="RESET_PASSWORD",Zue=({step:e})=>e==="CONFIRM_RESET_PASSWORD_WITH_CODE",Yue=({step:e})=>e==="CONFIRM_SIGN_UP",Que=(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")},Xue=(e,{data:t})=>t.message==="User is already confirmed.",Jue=({availableAuthMethods:e,preferredChallenge:t,selectedAuthMethod:n})=>e&&e.length>1&&(!t||n===null),ece=({passwordless:e,hasExistingPasskeys:t})=>{const{passkeyRegistrationPrompts:n}=e||{};return!n||t?!1:typeof n=="boolean"?n:n.afterSignin==="ALWAYS"},tce=({passwordless:e,hasExistingPasskeys:t})=>{const{passkeyRegistrationPrompts:n}=e||{};return!n||t?!1:typeof n=="boolean"?n:n.afterSignup==="ALWAYS"},nce=({passwordless:e})=>e?.passkeyRegistrationPrompts!=null,rce=({selectedAuthMethod:e,step:t})=>e!=null&&t==="SELECT_AUTH_METHOD",Sy={hasCompletedAttributeConfirmation:Fue,hasCompletedResetPassword:$ue,hasCompletedSignIn:Lue,hasCompletedSignUp:Uue,hasPasskeyRegistrationPrompts:nce,isConfirmSignUpStep:Hue,isConfirmUserAttributeStep:zue,isResetPasswordStep:Bue,isShouldConfirmUserAttributeStep:jue,isUserAlreadyConfirmed:Xue,shouldAutoSignIn:kue,shouldManualSignIn:Due,shouldConfirmResetPassword:Zue,shouldConfirmSignIn:que,shouldConfirmSignInWithNewPassword:Mue,shouldConfirmSignUp:Yue,shouldConfirmSignUpFromSignIn:Nue,shouldResetPassword:Kue,shouldResetPasswordFromSignIn:Pue,shouldReturnToSelectMethod:rce,shouldSelectAuthMethod:Jue,shouldSetupTotp:Vue,shouldSetupEmail:Wue,shouldSelectMfaType:Gue,shouldVerifyAttribute:Que,shouldPromptPasskeyRegistration:ece,shouldPromptPasskeyRegistrationAfterSignup:tce};var yC,QD;function Uz(){if(QD)return yC;QD=1;var e=UA(),t=ah();function n(r,o,s){(s!==void 0&&!t(r[o],s)||s===void 0&&!(o in r))&&e(r,o,s)}return yC=n,yC}var bC,XD;function oce(){if(XD)return bC;XD=1;function e(t){return function(n,r,o){for(var s=-1,a=Object(n),u=o(n),c=u.length;c--;){var f=u[t?c:++s];if(r(a[f],f,a)===!1)break}return n}}return bC=e,bC}var SC,JD;function sce(){if(JD)return SC;JD=1;var e=oce(),t=e();return SC=t,SC}var Xd={exports:{}};Xd.exports;var eL;function ice(){return eL||(eL=1,(function(e,t){var n=Go(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===r,a=s?n.Buffer:void 0,u=a?a.allocUnsafe:void 0;function c(f,h){if(h)return f.slice();var m=f.length,g=u?u(m):new f.constructor(m);return f.copy(g),g}e.exports=c})(Xd,Xd.exports)),Xd.exports}var wC,tL;function ace(){if(tL)return wC;tL=1;var e=BF();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return wC=t,wC}var CC,nL;function lce(){if(nL)return CC;nL=1;var e=ace();function t(n,r){var o=r?e(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}return CC=t,CC}var EC,rL;function uce(){if(rL)return EC;rL=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 EC=e,EC}var _C,oL;function cce(){if(oL)return _C;oL=1;var e=Bs(),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 _C=n,_C}var xC,sL;function dce(){if(sL)return xC;sL=1;var e=cce(),t=$A(),n=SA();function r(o){return typeof o.constructor=="function"&&!n(o)?e(t(o)):{}}return xC=r,xC}var IC,iL;function fce(){if(iL)return IC;iL=1;var e=dy(),t=cl();function n(r){return t(r)&&e(r)}return IC=n,IC}var AC,aL;function hce(){if(aL)return AC;aL=1;var e=bc(),t=$A(),n=cl(),r="[object Object]",o=Function.prototype,s=Object.prototype,a=o.toString,u=s.hasOwnProperty,c=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=u.call(m,"constructor")&&m.constructor;return typeof g=="function"&&g instanceof g&&a.call(g)==c}return AC=f,AC}var RC,lL;function $z(){if(lL)return RC;lL=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return RC=e,RC}var TC,uL;function pce(){if(uL)return TC;uL=1;var e=Lz(),t=UA();function n(r,o,s,a){var u=!s;s||(s={});for(var c=-1,f=o.length;++c<f;){var h=o[c],m=a?a(s[h],r[h],h,s,r):void 0;m===void 0&&(m=r[h]),u?t(s,h,m):e(s,h,m)}return s}return TC=n,TC}var OC,cL;function mce(){if(cL)return OC;cL=1;var e=pce(),t=FA();function n(r){return e(r,t(r))}return OC=n,OC}var MC,dL;function gce(){if(dL)return MC;dL=1;var e=Uz(),t=ice(),n=lce(),r=uce(),o=dce(),s=gA(),a=Hs(),u=fce(),c=vA(),f=fA(),h=Bs(),m=hce(),g=bA(),v=$z(),w=mce();function S(C,E,I,A,T,N,M){var R=v(C,I),k=v(E,I),L=M.get(k);if(L){e(C,I,L);return}var q=N?N(R,k,I+"",C,E,M):void 0,$=q===void 0;if($){var D=a(k),j=!D&&c(k),Z=!D&&!j&&g(k);q=k,D||j||Z?a(R)?q=R:u(R)?q=r(R):j?($=!1,q=t(k,!0)):Z?($=!1,q=n(k,!0)):q=[]:m(k)||s(k)?(q=R,s(R)?q=w(R):(!h(R)||f(R))&&(q=o(k))):$=!1}$&&(M.set(k,q),T(q,k,A,N,M),M.delete(k)),e(C,I,q)}return MC=S,MC}var PC,fL;function vce(){if(fL)return PC;fL=1;var e=mA(),t=Uz(),n=sce(),r=gce(),o=Bs(),s=FA(),a=$z();function u(c,f,h,m,g){c!==f&&n(f,function(v,w){if(g||(g=new e),o(v))r(c,f,w,h,u,m,g);else{var S=m?m(a(c,w),v,w+"",c,f,g):void 0;S===void 0&&(S=v),t(c,w,S)}},s)}return PC=u,PC}var NC,hL;function yce(){if(hL)return NC;hL=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 NC=e,NC}var kC,pL;function bce(){if(pL)return kC;pL=1;var e=yce(),t=Math.max;function n(r,o,s){return o=t(o===void 0?r.length-1:o,0),function(){for(var a=arguments,u=-1,c=t(a.length-o,0),f=Array(c);++u<c;)f[u]=a[o+u];u=-1;for(var h=Array(o+1);++u<o;)h[u]=a[u];return h[o]=s(f),e(r,this,h)}}return kC=n,kC}var DC,mL;function Sce(){if(mL)return DC;mL=1;function e(t){return function(){return t}}return DC=e,DC}var LC,gL;function wce(){if(gL)return LC;gL=1;var e=Sce(),t=Dz(),n=LA(),r=t?function(o,s){return t(o,"toString",{configurable:!0,enumerable:!1,value:e(s),writable:!0})}:n;return LC=r,LC}var UC,vL;function Cce(){if(vL)return UC;vL=1;var e=800,t=16,n=Date.now;function r(o){var s=0,a=0;return function(){var u=n(),c=t-(u-a);if(a=u,c>0){if(++s>=e)return arguments[0]}else s=0;return o.apply(void 0,arguments)}}return UC=r,UC}var $C,yL;function Ece(){if(yL)return $C;yL=1;var e=wce(),t=Cce(),n=t(e);return $C=n,$C}var FC,bL;function _ce(){if(bL)return FC;bL=1;var e=LA(),t=bce(),n=Ece();function r(o,s){return n(t(o,s,e),o+"")}return FC=r,FC}var zC,SL;function xce(){if(SL)return zC;SL=1;var e=ah(),t=dy(),n=cy(),r=Bs();function o(s,a,u){if(!r(u))return!1;var c=typeof a;return(c=="number"?t(u)&&n(a,u.length):c=="string"&&a in u)?e(u[a],s):!1}return zC=o,zC}var jC,wL;function Ice(){if(wL)return jC;wL=1;var e=_ce(),t=xce();function n(r){return e(function(o,s){var a=-1,u=s.length,c=u>1?s[u-1]:void 0,f=u>2?s[2]:void 0;for(c=r.length>3&&typeof c=="function"?(u--,c):void 0,f&&t(s[0],s[1],f)&&(c=u<3?void 0:c,u=1),o=Object(o);++a<u;){var h=s[a];h&&r(o,h,a,c)}return o})}return jC=n,jC}var BC,CL;function Ace(){if(CL)return BC;CL=1;var e=vce(),t=Ice(),n=t(function(r,o,s){e(r,o,s)});return BC=n,BC}var Rce=Ace();const Tce=lc(Rce),wy=async(e,t,n,r)=>{const o=await Promise.all(r.map(a=>a(e,t,n))),s=Tce({},...o);return OA(s)?Promise.resolve():Promise.reject(s)},Oce=8,Mce=e=>Array.isArray(e),Pce=e=>{if(e)return Mce(e)?Object.entries(e).map(([t,n])=>Object.keys(n)[0]):Object.keys(e)},Bi={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=Pce(r),a=n?.oauth?.providers?n.oauth.providers?.map(f=>f.toString().toLowerCase()):void 0,u=e.Auth?.Cognito?.passwordless,c={emailOtpEnabled:u?.emailOtpEnabled??u?.email_otp_enabled===!0,smsOtpEnabled:u?.smsOtpEnabled??u?.sms_otp_enabled===!0,webAuthnEnabled:!!(u?.webAuthn??u?.web_authn),preferredChallenge:u?.preferredChallenge??u?.preferred_challenge};return{...t,loginMechanisms:o,signUpAttributes:s,socialProviders:a,passwordlessCapabilities:c}},getCurrentUser:Hv,handleSignIn:YI,handleSignUp:eX,handleConfirmSignIn:e$,handleConfirmSignUp:aX,handleForgotPasswordSubmit:rX,handleForgotPassword:J8,handleResendSignUpCode:sX,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??Oce;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&&!zae(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 Nce({services:e}){return wc({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:{...ch,sendUpdate:gy()},guards:Sy,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 wy(t.formValues,t.touched,t.passwordSettings,[Bi.validateFormPassword,Bi.validateConfirmPassword])}}})}const Fz=e=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:e},onError:{actions:"setRemoteError",target:e}}}),kce=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",cg={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"}},Jp=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",...cg}},resend:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"resendSignInCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"edit"},onError:{actions:"setRemoteError",target:"edit"}}}}});function Dce({services:e}){return wc({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:{...Fz("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 RA();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:cg.onDone,onError:[{cond:"shouldReturnToSelectMethod",actions:"setRemoteError",target:"selectMethod"},cg.onError]}}}},confirmSignIn:{...Jp(["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",...cg}}}}}},setupTotp:{...Jp(["clearFormValues","clearError","clearTouched"])},setupEmail:{...Jp(["clearFormValues","clearError","clearTouched"])},selectMfaType:{...Jp(["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:{...ch,sendUpdate:gy()},guards:Sy,services:{async fetchUserAttributes(){return i$()},resetPassword({username:t}){return J8({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:u}=t;return e.handleSignIn({username:n,password:u})}else return e.handleSignIn({username:n,options:{authFlowType:"USER_AUTH",preferredChallenge:a}})},confirmSignIn({formValues:t,step:n}){const r=kce(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,...u}=t,c;return r&&(c=`${o}${r}`.replace(/[^A-Z0-9+]/gi,""),u={...u,phone_number:c}),e$({challengeResponse:n,options:{userAttributes:u}})},signInWithRedirect(t,{data:n}){return s$(n)},async validateFields(t){return wy(t.formValues,t.touched,t.passwordSettings,[Bi.validateFormPassword,Bi.validateConfirmPassword])}}})}const Lce={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},Uce={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 $ce({services:e}){return wc({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...Uce}},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 RA();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:{...Fz("signUp")},resetPassword:{invoke:{src:"resetPassword",...Lce}},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:{...ch,sendUpdate:gy()},guards:Sy,services:{autoSignIn(){return ZI()},async fetchUserAttributes(){return i$()},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 s$(n)},handleSignUp(t){const{formValues:n,loginMechanisms:r,username:o,selectedAuthMethod:s,preferredChallenge:a}=t,u=r[0],f=Hle(o,n,u,s??a);return e.handleSignUp(f)},async validateSignUp(t){return wy(t.formValues,t.touched,t.passwordSettings,[e.validateFormPassword,e.validateConfirmPassword,e.validatePreferredUsername,e.validateRequiredFieldsForAuthMethod,e.validateCustomSignUp])}}})}const Fce=()=>wc({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:()=>$X()}});function zce(){return wc({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:{...ch,sendUpdate:gy()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:e}}){return BX({userAttributeKey:e})},async confirmVerifyUserAttribute({formValues:{confirmation_code:e},selectedUserAttribute:t}){return cX({confirmationCode:e,userAttributeKey:t})},async validateFields(e){return wy(e.formValues,e.touched,e.passwordSettings,[Bi.validateFormPassword,Bi.validateConfirmPassword])}}})}const em=(e,t)=>{const n=Vle(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:jce,stop:Bce}=Sz,Td=e=>Bce(e),Hce={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},qce={always:{actions:"configure",target:"getConfig"}};function Vce(e){const{useNextWaitConfig:t,...n}=e??{};return wc({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:Bi,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?qce:Hce,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:Td("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:Td("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:Td("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:Td("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:Td("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:{...ch,forwardToActor:jce([{cond:"hasActor",actions:qie(({actorRef:o})=>o)}]),setActorDoneData:vs({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:vs({passwordlessCapabilities:(o,{data:s})=>s.passwordlessCapabilities,config(o,{data:s}){const{loginMechanisms:a=s.loginMechanisms??[],signUpAttributes:u=s.signUpAttributes??[],socialProviders:c=s.socialProviders??[],initialState:f,formFields:h,passwordSettings:m=s.passwordFormat??{},passwordless:g}=o.config;return a.length===0&&a.push("username"),{formFields:Wce(h)??{},initialState:f,loginMechanisms:a,passwordSettings:m,passwordless:g,signUpAttributes:u,socialProviders:c}}}),spawnSignInActor:vs({actorRef:(o,s)=>{const{services:a}=o,u=Dce({services:a}).withContext(em(o,"SIGN_IN"));return Rd(u,{name:"signInActor"})}}),spawnSignUpActor:vs({actorRef:(o,s)=>{const{services:a}=o,u=$ce({services:a}).withContext(em(o,"SIGN_UP"));return Rd(u,{name:"signUpActor"})}}),spawnForgotPasswordActor:vs({actorRef:(o,s)=>{const{services:a}=o,u=Nce({services:a}).withContext(em(o,"FORGOT_PASSWORD"));return Rd(u,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:vs({actorRef:o=>{const s=zce().withContext(em(o));return Rd(s,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:vs({actorRef:o=>{const s=Fce().withContext({user:o?.user});return Rd(s,{name:"signOutActor"})}}),configure:vs((o,s)=>{const{services:a,...u}=Az(n)?s.data??{}:n;return{services:{...Bi,...a},config:u}}),setHasSetup:vs({hasSetup:!0})},guards:{...Sy,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 Wce(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 Gce={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},Kce={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"}},Zce={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}"}}},Yce={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}"}}}},Qce={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}"}}}},Xce={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}"}}}},Jce={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}"}}},ede={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}"}}},tde={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"}}}},nde={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}"}}},rde={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}"}}},ode={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}"}}}},sde={alignItems:{value:"flex-start"},alignContent:{value:"center"},flexDirection:{value:"column"},justifyContent:{value:"center"}},ide={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}"}}}}},ade={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}"}}},lde={height:{value:"{space.relative.full.value}"}},ude={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}"}},cde={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}"}}},dde={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)"}}}},fde={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}"}}},hde={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}"}}}}},pde={gap:{value:"{space.zero.value}"},vertical:{alignItems:{value:"center"}},outer:{alignItems:{value:"center"}}},mde={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}"}},gde={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}"}}},vde={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"}}}},yde={gap:{value:"{space.medium.value}"},justifyContent:{value:"normal"},alignItems:{value:"stretch"},alignContent:{value:"normal"},flexWrap:{value:"nowrap"}},bde={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}"}}},Sde={highlighted:{fontWeight:{value:"{fontWeights.bold}"}}},wde={lineHeight:{value:1},height:{value:"1em"}},Cde={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}"}}},Ede={maxWidth:{value:"100%"},height:{value:"auto"},objectFit:{value:"initial"},objectPosition:{value:"initial"}},_de={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}"}}},xde={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}"}}},Ide={cameraModule:{backgroundColor:{value:"{colors.background.primary.value}"}}},Ade={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}"}}},Rde={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}"}}},Tde={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"}}}},Ode={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}"}}},Mde={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}"}}}},Pde={color:{value:"{components.fieldcontrol.color}"},borderColor:{value:"{components.fieldcontrol.borderColor}"},fontSize:{value:"{components.fieldcontrol.fontSize}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor}"}}},Nde={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}"}}},kde={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}"}}}},Dde={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}"}}},Lde={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}"}}},Ude={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}"}}}},$de={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}"}}}},Fde={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}"}}},zde={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"}}}},jde={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}"}}}},Bde={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"}}}},Hde={_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}"}}}},qde={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}"}}}},Vde={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}"}}},Wde={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}"}}},Gde={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},Kde={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}"}}},Zde={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}"}}}}},Yde={alignItems:{value:"center"},alignContent:{value:"center"},justifyContent:{value:"flex-start"}},Qde={accordion:dde,aiConversation:Yce,alert:Zce,authenticator:Xce,autocomplete:Qce,avatar:Jce,badge:ede,breadcrumbs:tde,button:nde,card:rde,checkbox:ode,checkboxfield:sde,collection:ide,copy:ade,countrycodeselect:lde,divider:ude,dropzone:cde,field:fde,fieldcontrol:hde,fieldgroup:pde,fieldmessages:gde,fieldset:mde,fileuploader:vde,flex:yde,heading:bde,icon:wde,highlightmatch:Sde,image:Ede,inappmessaging:_de,input:Cde,link:xde,liveness:Ide,loader:Ade,menu:Rde,message:Tde,pagination:Ode,passwordfield:Mde,phonenumberfield:Pde,placeholder:Nde,radio:kde,radiogroup:Dde,rating:Lde,searchfield:Ude,select:$de,selectfield:Fde,sliderfield:zde,stepperfield:jde,storagemanager:Bde,switchfield:Hde,table:qde,tabs:Vde,text:Wde,textareafield:Gde,textfield:Kde,togglebutton:Zde,togglebuttongroup:Yde},Xde={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`}}},ys={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"}},Jde={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}},efe={small:{value:"1.25"},medium:{value:"1.5"},large:{value:"2"}},tfe={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"}},nfe={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},rfe={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},ofe={xs:{value:"0.125rem"},small:{value:"0.25rem"},medium:{value:"0.5rem"},large:{value:"1rem"},xl:{value:"2rem"},xxl:{value:"4rem"},xxxl:{value:"8rem"}},sfe={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}"}}},bs={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%"}}},ife={short:{value:"100ms"},medium:{value:"250ms"},long:{value:"500ms"}},afe={slideX:{small:{value:"translateX(0.5em)"},medium:{value:"translateX(1em)"},large:{value:"translateX(2em)"}}},lfe={components:Qde,borderWidths:Gce,colors:Kce,fonts:Xde,fontSizes:ys,fontWeights:Jde,lineHeights:efe,opacities:tfe,outlineOffsets:nfe,outlineWidths:rfe,radii:ofe,shadows:sfe,space:bs,time:ife,transforms:afe};ys.xxs,ys.xs,ys.small,ys.medium,ys.large,ys.xl,ys.xxl,ys.xxxl,bs.xxxs,bs.xs,bs.small,bs.medium,bs.large,bs.xl,bs.xxl,bs.xxxl;const ufe={values:{base:0,small:480,medium:768,large:992,xl:1280,xxl:1536},defaultBreakpoint:"base"},zz={tokens:lfe,breakpoints:ufe,name:"default-theme"};var HC,EL;function cfe(){if(EL)return HC;EL=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 HC=e,HC}var qC,_L;function dfe(){if(_L)return qC;_L=1;function e(t){return function(n){return t?.[n]}}return qC=e,qC}var VC,xL;function ffe(){if(xL)return VC;xL=1;var e=dfe(),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 VC=n,VC}var WC,IL;function hfe(){if(IL)return WC;IL=1;var e=ffe(),t=kA(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",o="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",a=r+o+s,u="["+a+"]",c=RegExp(u,"g");function f(h){return h=t(h),h&&h.replace(n,e).replace(c,"")}return WC=f,WC}var GC,AL;function pfe(){if(AL)return GC;AL=1;var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(n){return n.match(e)||[]}return GC=t,GC}var KC,RL;function mfe(){if(RL)return KC;RL=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 KC=t,KC}var ZC,TL;function gfe(){if(TL)return ZC;TL=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",u="\\xac\\xb1\\xd7\\xf7",c="\\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=u+c+f+h,w="['’]",S="["+v+"]",C="["+o+"]",E="\\d+",I="["+s+"]",A="["+a+"]",T="[^"+e+v+E+s+a+m+"]",N="\\ud83c[\\udffb-\\udfff]",M="(?:"+C+"|"+N+")",R="[^"+e+"]",k="(?:\\ud83c[\\udde6-\\uddff]){2}",L="[\\ud800-\\udbff][\\udc00-\\udfff]",q="["+m+"]",$="\\u200d",D="(?:"+A+"|"+T+")",j="(?:"+q+"|"+T+")",Z="(?:"+w+"(?:d|ll|m|re|s|t|ve))?",he="(?:"+w+"(?:D|LL|M|RE|S|T|VE))?",B=M+"?",Q="["+g+"]?",ae="(?:"+$+"(?:"+[R,k,L].join("|")+")"+Q+B+")*",ue="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ce="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",U=Q+B+ae,X="(?:"+[I,k,L].join("|")+")"+U,ie=RegExp([q+"?"+A+"+"+Z+"(?="+[S,q,"$"].join("|")+")",j+"+"+he+"(?="+[S,q+D,"$"].join("|")+")",q+"?"+D+"+"+Z,q+"+"+he,Ce,ue,E,X].join("|"),"g");function oe(fe){return fe.match(ie)||[]}return ZC=oe,ZC}var YC,OL;function vfe(){if(OL)return YC;OL=1;var e=pfe(),t=mfe(),n=kA(),r=gfe();function o(s,a,u){return s=n(s),a=u?void 0:a,a===void 0?t(s)?r(s):e(s):s.match(a)||[]}return YC=o,YC}var QC,ML;function yfe(){if(ML)return QC;ML=1;var e=cfe(),t=hfe(),n=vfe(),r="['’]",o=RegExp(r,"g");function s(a){return function(u){return e(n(t(u).replace(o,"")),a,"")}}return QC=s,QC}var XC,PL;function bfe(){if(PL)return XC;PL=1;var e=yfe(),t=e(function(n,r,o){return n+(o?"-":"")+r.toLowerCase()});return XC=t,XC}var Sfe=bfe();const jz=lc(Sfe),wfe=/\{([^}]+)\}/g;function Bz(e){const t=new RegExp(wfe);if(typeof e=="string")return t.test(e);if(typeof e=="object"){let n=!1;for(const r in e)if(Ns(e,r)){const o=e[r];if(Bz(o)){n=!0;break}}return n}return!1}const Cfe="amplify";function tx(e){return Object.entries(e).map(([t,n])=>{const r=Cy(n)?n.toString():Hz({value:n});return`${jz(t)}:${r}; `}).join(" ")}function zA({path:e=[]}){return`${jz([Cfe,...e].join(" "))}`}const Efe=["offsetX","offsetY","blurRadius","spreadRadius","color"];function Hz(e){const{value:t}=e;return Ps(t)?kL(t):NL(t)?Efe.map(n=>kL(NL(e)?e[n]:t[n])).join(" "):t}function Cy(e){return Mr(e)&&Ns(e,"value")}function NL(e){return Mr(e)&&Ns(e,"offsetX")}function kL(e){if(!e)return"";if(Bz(e)){const t=e.replace(/\{|\}/g,"").replace(".value","").split(".");return`var(--${zA({path:t})})`}return e}const DL=({token:e,path:t})=>{const n=`--${zA({path:t})}`,{value:r}=e,o=Hz(e);return{name:n,original:r,path:t,value:o,toString:()=>`var(${n})`}};function nx({tokens:e,path:t=[],setupToken:n}){if(Ns(e,"value"))return n({token:e,path:t});const r={};for(const o in e)if(Ns(e,o)){const s=e[o],a=Mr(s)?s:{value:s};r[o]=nx({tokens:a,path:t.concat(o),setupToken:n})}return r}function rx(e,t){t=t||[];for(var n in e)Ns(e,n)&&(Mr(e[n])&&"value"in e[n]?t.push(e[n]):Mr(e[n])&&rx(e[n],t));return t}function qz(e,t,n){if(e==null)return{};var r,o,s,a,u,c,f=e[0]||{},h=1,m=e.length;for(n=n||[],typeof f!="object"&&(f={});h<m;h++)if((u=e[h])!=null){for(a in u)if(Ns(u,a)&&a!=="__proto__"&&(r=f[a],s=u[a],f!==s))if(s&&(Mr(s)||(o=Array.isArray(s)))){o?(o=!1,c=r&&Array.isArray(r)?r:[]):c=r&&Mr(r)?r:{};var g=n.slice(0);g.push(a),f[a]=qz([c,s],t,g)}else s!==void 0&&(f[a]=s)}return f}function LL(e,t){return t?`${e} { ${Object.entries(t).map(([n,r])=>`--${n}:${r}; `).join(" ")}}
|
|
24
|
-
`:""}function Ai(e,t){let n="";const{_modifiers:r={},_element:o={},_vars:s,...a}=t;if(Object.keys(a).length){const[u,c]=_ae(a,f=>f.startsWith(":")||f.startsWith("["));Object.entries(u).forEach(([f,h])=>{const{_modifiers:m={},_element:g={},_vars:v,...w}=h;n+=`${e}${f} { ${tx(w)} }
|
|
25
|
-
`,n+=LL(`${e}${f}`,v)}),n+=`${e} { ${tx(c)} }
|
|
26
|
-
`}return n+=LL(e,s),Object.entries(r).forEach(([u,c])=>{c&&Object.keys(c).length&&(n+=Ai(`${e}--${u}`,c))}),Object.entries(o).forEach(([u,c])=>{c&&Object.keys(c).length&&(n+=Ai(`${e}__${u}`,c))}),n}function _fe({theme:e,components:t}){let n="";const{tokens:r,name:o,breakpoints:s}=e;return t.forEach(({name:a,theme:u,overrides:c})=>{const f=`amplify-${a}`,h=`[data-amplify-theme="${o}"] .${f}`,m=ks(u)?u(r):u;n+=Ai(h,m),c&&c.forEach(g=>{const v=ks(g.theme)?g.theme(r):g.theme;if("mediaQuery"in g&&(n+=`@media (${g.mediaQuery}) {
|
|
27
|
-
${Ai(h,v)}
|
|
28
|
-
}`),"breakpoint"in g){const w=s.values[g.breakpoint];n+=`
|
|
29
|
-
@media (min-width: ${w}px) {
|
|
30
|
-
${Ai(h,v)}
|
|
31
|
-
}`}"selector"in g&&(n+=Ai(`${g.selector} .${f}`,v)),"colorMode"in g&&(n+=`
|
|
32
|
-
@media (prefers-color-scheme: ${g.colorMode}) {
|
|
33
|
-
${Ai(`[data-amplify-theme="${o}"][data-amplify-color-mode="system"] .${f}`,v)}
|
|
34
|
-
}
|
|
35
|
-
`,n+=Ai(`[data-amplify-theme="${o}"][data-amplify-color-mode="${g.colorMode}"] .${f}`,v))})}),n}function UL({keys:e,value:t}){return e.reduce((n,r)=>({...n,[r]:{value:`{colors.${t}.${r}.value}`}}),{})}function xfe({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 u=ks(a)?a(t):a;n+=tx(u),n+=`
|
|
39
|
-
}`}),n+=`
|
|
40
|
-
}`}),n}function Ey(e,t=zz){const n=qz([{},t,{...e,components:{}}]),{primaryColor:r,secondaryColor:o}=n;Ps(r)&&(n.tokens.colors.primary=UL({keys:Object.keys(n.tokens.colors[r]),value:r})),Ps(o)&&(n.tokens.colors.secondary=UL({keys:Object.keys(n.tokens.colors[o]),value:o}));const s=nx({tokens:n.tokens,setupToken:DL}),{breakpoints:a,name:u}=n;let c=`[data-amplify-theme="${u}"] {
|
|
41
|
-
`+rx(s).map(h=>`${h.name}: ${h.value};`).join(`
|
|
42
|
-
`)+`
|
|
43
|
-
}
|
|
44
|
-
`;e?.components&&(c+=_fe({theme:{...n,tokens:s},components:e.components}));let f=[];return n.animations&&(c+=xfe({animations:n.animations,tokens:s})),n.overrides&&(f=n.overrides.map(h=>{const m=nx({tokens:h.tokens,setupToken:DL}),g=rx(m).map(v=>`${v.name}: ${v.value};`).join(`
|
|
45
|
-
`);if("selector"in h&&(c+=`
|
|
46
|
-
${h.selector} {
|
|
47
|
-
${g}
|
|
48
|
-
}
|
|
49
|
-
`),"mediaQuery"in h&&(c+=`
|
|
50
|
-
@media (${h.mediaQuery}) {
|
|
51
|
-
[data-amplify-theme="${u}"] {
|
|
52
|
-
${g}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
`),"breakpoint"in h){const v=n.breakpoints.values[h.breakpoint];c+=`
|
|
56
|
-
@media (min-width: ${v}px) {
|
|
57
|
-
[data-amplify-theme="${u}"] {
|
|
58
|
-
${g}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
`}return"colorMode"in h&&(c+=`
|
|
62
|
-
@media (prefers-color-scheme: ${h.colorMode}) {
|
|
63
|
-
[data-amplify-theme="${u}"][data-amplify-color-mode="system"] {
|
|
64
|
-
${g}
|
|
65
|
-
color-scheme: ${h.colorMode};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
`,c+=`
|
|
69
|
-
[data-amplify-theme="${u}"][data-amplify-color-mode="${h.colorMode}"] {
|
|
70
|
-
${g}
|
|
71
|
-
color-scheme: ${h.colorMode};
|
|
72
|
-
}
|
|
73
|
-
`),{...h,tokens:m}})),{tokens:s,breakpoints:a,name:u,cssText:c,containerProps:({colorMode:h}={})=>({"data-amplify-theme":u,"data-amplify-color-mode":h}),overrides:f}}const Ne=(...e)=>{const t=[];for(const n of e)if(n){if(Ps(n)){t.push(n);continue}if(typeof n=="number"){t.push(n.toString());continue}if(Array.isArray(n)){t.push(Ne(...n));continue}if(Mr(n)){if(n.toString!==Object.prototype.toString&&n.toString()!=="[object Object]"){t.push(n.toString());continue}for(const r in n)Ns(n,r)&&n[r]&&t.push(r)}}return t.join(" ")},re={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"},Ife=({componentName:e,packageName:t,version:n})=>{const r=[`ui-${t}`,n];switch(e){case"AIConversation":{ms({...uae,additionalDetails:[[e],r]});break}case"Authenticator":{ms({...dae,additionalDetails:[[e],r]});break}case"ChangePassword":case"DeleteUser":{ms({...cae,additionalDetails:[["AccountSettings"],r]});break}case"FileUploader":{ms({...fae,additionalDetails:[[e],r]});break}case"InAppMessaging":{ms({...hae,additionalDetails:[[e],r]});break}case"LocationSearch":{ms({...pae,additionalDetails:[[e],r]});break}case"MapView":{ms({...mae,additionalDetails:[[e],r]});break}case"StorageManager":{ms({...gae,additionalDetails:[[e],r]});break}case"StorageBrowser":{ms({...vae,additionalDetails:[[e],r]});break}}return Eae},ox=F.createContext(null),Afe=e=>(t,n)=>{Rz(t,n,e)};function Vz({children:e}){const[t,n]=F.useState("configuring");F.useEffect(()=>{Hv().then(()=>{n("authenticated")}).catch(()=>{n("unauthenticated")})},[]);const r=_.useContext(ox),o=Zie(Vce),s=_.useMemo(()=>r??{authStatus:t,service:o},[t,r,o]),{service:a}=s;return _.useEffect(()=>xae(a,Afe({onSignIn:()=>{n("authenticated")},onSignOut:()=>{n("unauthenticated")}})),[a]),F.createElement(ox.Provider,{value:s},e)}const Rfe="`useAuthenticator` must be used inside an `Authenticator.Provider`.",Tfe=["confirmResetPassword","confirmSignIn","confirmSignUp","confirmVerifyUser","forceNewPassword","forgotPassword","selectMfaType","setupEmail","setupTotp","signIn","signUp","verifyUser"],Ofe=e=>Tfe.some(t=>t===e),Mfe=()=>!1;function Pfe(e,t){return e.length!==t.length?!1:e.every((n,r)=>{const o=t[r];return wae(n,o)||Cae(n,o)?!0:n===o})}const Nfe=e=>(t,n)=>{const r=e(t),o=e(n);return Pfe(r,o)},kfe=e=>({...Af(e)?.formFields?.setupTotp?.QR}),Dfe=e=>e.flatMap(([t,n])=>({name:t,...n})),Lfe=(e={})=>e&&Object.entries(e).map(([t,n])=>!Ps(n)||!t?{}:{name:t,label:n,type:"radio",value:n}),Ufe=(e=[])=>e.map(t=>({name:"mfa_type",label:Sn.getMfaTypeLabelByValue(t),type:"radio",value:t})),$fe=(e,t)=>Ofe(e)?e==="verifyUser"?Lfe(Af(t).unverifiedUserAttributes):e==="selectMfaType"?Ufe(Af(t).allowedMfaTypes):Dfe(sle(e,t)):[];function ot(e){const t=F.useContext(ox);if(!t)throw new Error(Rfe);const{service:n}=t,{send:r}=n,o=_.useCallback(S=>({...Oae({send:r,state:S})}),[r]),s=e?Nfe(e):Mfe,{authStatus:a}=t,u=tae(n,o,s),{route:c,totpSecretCode:f,user:h,...m}=u,g=n.getSnapshot(),v=c==="setupTotp"?kfe(g):null,w=$fe(c,g);return{...m,authStatus:a,route:c,totpSecretCode:f,user:h,fields:w,QRFields:v}}const Ffe=({route:e})=>[e];function zfe(e){const{route:t,initializeMachine:n}=ot(Ffe),r=F.useRef(!1);F.useEffect(()=>{!r.current&&t==="setup"&&(n(e),r.current=!0)},[n,t,e])}const jfe=({shouldWarn:e,message:t})=>{_.useEffect(()=>{},[e,t])};function Bfe({componentName:e,packageName:t,version:n}){_.useEffect(()=>Ife({componentName:e,packageName:t,version:n}),[e,t,n])}const Wz=_.createContext({theme:Ey(),colorMode:void 0}),jA={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"},BA={Alert:{dismissButtonLabel:"Dismiss alert"},PhoneNumberField:{countryCodeLabel:"Country code"},PasswordField:{passwordIsHidden:"Password is hidden",passwordIsShown:"Password is shown",showPassword:"Show password"}},sx={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"},Hfe=e=>e in sx,Gz=e=>typeof e=="string"&&e.length===0,$L=e=>e==null||Gz(e),_y=e=>Object.keys(e),HA=(e,t,n)=>{if(typeof t!="string")return t;if(t.includes(" "))return t.split(" ").map(r=>HA(e,r,n)).join(" ");if(Hfe(e)){const r=t.split("."),o=sx[e];let s=n[o];for(let a=0;a<r.length;a++){if(s){s=s[r[a]];continue}break}return Cy(s)?`var(--${zA({path:[sx[e],...r]})})`:t}return t},qfe=({breakpoint:e,breakpoints:t,values:n})=>{const r=n[e];if(r!==void 0)return r;const o=_y(t).sort((a,u)=>t[u]-t[a]),s=o.slice(o.indexOf(e));for(const a of s){const u=n[a];if(u!==void 0)return u}return null},Vfe=e=>_y(e).reduce((t,n)=>n in zz.breakpoints.values?{...t,[n]:e[n]}:t,{}),Wfe=({breakpoint:e,breakpoints:t,values:n})=>{let r={};const o=_y(t).sort((s,a)=>t[s]-t[a]);return Array.isArray(n)?n.forEach((s,a)=>{r[o[a]]=s}):typeof n=="object"&&(r=Vfe(n)),qfe({breakpoint:e,breakpoints:t,values:r})},Gfe=({breakpoints:e})=>{const t=_y(e).sort((n,r)=>e[r]-e[n]);return t.map((n,r)=>{let o="";const s=e[n],a=t[r-1],u=a?e[a]-1:null;return s>=0&&(o=`(min-width: ${s}px)`),u!==null&&(o&&(o+=" and "),o+=`(max-width: ${u}px)`),{breakpoint:n,query:o,maxWidth:u,minWidth:s}})},Kfe=typeof window>"u"?_.useEffect:_.useLayoutEffect,Zfe=({breakpoints:e,defaultBreakpoint:t})=>{const r=typeof window<"u"&&typeof window.matchMedia<"u"?window.matchMedia:null,o=_.useMemo(()=>Gfe({breakpoints:e}),[e]),[s,a]=_.useState(t),u=_.useCallback((c,f)=>{c&&a(f)},[a]);return Kfe(()=>{if(!r)return;const c=o.map(({query:f,breakpoint:h})=>{const m=r(f);u(m.matches,h);const g=v=>{v.matches&&a(h)};return m.addEventListener("change",g),()=>m.removeEventListener("change",g)});return()=>{c.forEach(f=>f())}},[e,a,r,o]),_.useDebugValue(s,c=>c),s},Yfe=e=>typeof e>"u"||typeof e.theme>"u"?Ey():e.theme,Qfe=()=>{const e=_.useContext(Wz);return Yfe(e)},Xfe=({value:e,propKey:t,tokens:n})=>Cy(e)?e.toString():Ps(e)?Ps(t)?HA(t,e,n):e:null,Jfe=e=>e==="auto"||typeof e=="number"&&!isNaN(e)||typeof e=="string"&&!isNaN(parseFloat(e)),JC=e=>e==="auto"?"auto":`span ${e}`,FL=e=>Jfe(e)?JC(e):Array.isArray(e)?e.map(t=>JC(t)):typeof e=="object"&&e!=null?Object.entries(e).reduce((t,[n,r])=>({...t,[n]:JC(r)}),{}):null,ehe=e=>{const{rowSpan:t,columnSpan:n,row:r,column:o,...s}=e,{rowFromSpanValue:a,columnFromSpanValue:u}=_.useMemo(()=>({rowFromSpanValue:FL(t),columnFromSpanValue:FL(n)}),[t,n]);return{row:$L(r)?a:r,column:$L(o)?u:o,...s}},the=e=>e in jA,nhe=({props:e={},style:t={},breakpoint:n,breakpoints:r,tokens:o})=>{const s={};return Object.keys(e).filter(a=>e[a]!==null).forEach(a=>{if(the(a)){const u=e[a];if(u==null||Gz(u))return;const c=jA[a];let f="";Cy(u)?f=u.toString():typeof u=="string"?f=HA(a,u,o):typeof u=="number"?f=u:typeof u=="object"&&(f=Xfe({propKey:a,tokens:o,value:Wfe({values:u,breakpoint:n,breakpoints:r})})),t={...t,[c]:f}}else typeof e[a]<"u"&&(s[a]=e[a])}),{propStyles:t,nonStyleProps:s}},rhe=(e,t)=>{const{breakpoints:{values:n,defaultBreakpoint:r},tokens:o}=Qfe(),s=Zfe({breakpoints:n,defaultBreakpoint:r}),a=ehe(e);return _.useMemo(()=>nhe({props:a,style:t,breakpoint:s,breakpoints:n,tokens:o}),[a,t,n,s,o])},Ot=e=>_.forwardRef(e),ohe=({as:e="div",children:t,testId:n,ariaLabel:r,isDisabled:o,style:s,inert:a,...u},c)=>{const{propStyles:f,nonStyleProps:h}=rhe(u,s);return _.createElement(e,{"aria-label":r,"data-testid":n,disabled:o,ref:c,inert:a?"":null,style:f,...h},t)},ke=Ot(ohe);ke.displayName="View";const Od={minX:0,minY:0,width:24,height:24},she=({className:e,as:t="svg",fill:n="currentColor",pathData:r,viewBox:o=Od,children:s,paths:a,...u},c)=>{const f=o.minX??Od.minX,h=o.minY??Od.minY,m=o.width??Od.width,g=o.height??Od.height;let v;return s&&(v=s),a&&(v=a.map((w,S)=>_.createElement("path",{...w,key:S}))),r&&(v=_.createElement("path",{d:r,fill:n})),_.createElement(ke,{as:t,className:Ne(re.Icon,e),ref:c,viewBox:`${f} ${h} ${m} ${g}`,...u},v)},Kz=Ot(she);Kz.displayName="Icon";const ihe=_.createContext({});function xy(e){const t=_.useContext(ihe);if(e&&t)return t[e]}const ahe=e=>{const{className:t,...n}=e;return _.createElement(ke,{as:"span",width:"1em",height:"1em",className:Ne(re.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"})))},lhe=e=>{const{className:t,...n}=e;return _.createElement(ke,{as:"span",width:"1em",height:"1em",className:Ne(re.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"})))},uhe=e=>{const{className:t,...n}=e;return _.createElement(ke,{as:"span",width:"1em",height:"1em",className:Ne(re.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"})))},che=e=>{const{className:t,...n}=e;return _.createElement(ke,{as:"span",width:"1em",height:"1em",className:Ne(re.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"})))},Zz=({variation:e,ariaHidden:t,ariaLabel:n,role:r})=>{const o=xy("alert");let s;switch(e){case"info":s=o?.info??_.createElement(uhe,{"aria-hidden":t,"aria-label":n,role:r});break;case"error":s=o?.error??_.createElement(lhe,{"aria-hidden":t,"aria-label":n,role:r});break;case"warning":s=o?.warning??_.createElement(che,{"aria-hidden":t,"aria-label":n,role:r});break;case"success":s=o?.success??_.createElement(ahe,{"aria-hidden":t,"aria-label":n,role:r});break}return s?_.createElement("span",{className:re.AlertIcon},s):null};Zz.displayName="AlertIcon";const dhe=globalThis?.document?_.useLayoutEffect:()=>{},fhe="amplify-id",hhe=wee.useId||(()=>{});let phe=0;const Hi=e=>{const[t,n]=_.useState(hhe());return dhe(()=>{e||n(r=>r??String(phe++))},[e]),e??(t?`${fhe}-${t}`:"")},Yz=_.createContext({isFieldsetDisabled:!1}),dh=e=>{let n=_.useContext(Yz).isFieldsetDisabled;return(n===void 0||n===!1)&&(n=e),{isFieldsetDisabled:n}},mhe=({className:e,children:t,...n},r)=>_.createElement(ke,{className:Ne(re.Flex,e),ref:r,...n},t),Pe=Ot(mhe);Pe.displayName="Flex";const ghe="linear-empty",vhe="linear-filled",yhe="circular-empty",bhe="circular-filled",zL=8,ix=42,tm=2*ix*Math.PI,She=({className:e,filledColor:t,emptyColor:n,size:r,variation:o,isDeterminate:s=!1,isPercentageTextHidden:a=!1,percentage:u=0,...c},f)=>{u=Math.min(u,100),u=Math.max(u,0);const h=`${u}%`,m=Ne(re.Loader,Rt(re.Loader,r),Rt(re.Loader,o),cr(re.Loader,"determinate",s),e),g=_.createElement("g",null,_.createElement("line",{x1:"0",x2:"100%",y1:"50%",y2:"50%",style:{stroke:String(n)},"data-testid":ghe}),_.createElement("line",{x1:"0",x2:s?h:"100%",y1:"50%",y2:"50%",style:{stroke:s&&u===0?"none":t?String(t):void 0},"data-testid":vhe}),s?_.createElement("text",{"aria-live":"polite",className:Ne(re.LoaderLabel,a?re.VisuallyHidden:null),x:`${-1+u}%`,y:"200%"},h):null),v=_.createElement("g",null,_.createElement("circle",{cx:"50%",cy:"50%",r:`${ix}%`,strokeWidth:`${zL}%`,style:{stroke:String(n)},"data-testid":yhe}),_.createElement("circle",{cx:"50%",cy:"50%",r:`${ix}%`,strokeWidth:`${zL}%`,style:{stroke:String(t),strokeDasharray:s?`${tm}% ${tm}%`:void 0,strokeDashoffset:s?`${tm-tm*u/100}%`:void 0},"data-testid":bhe}),s?_.createElement("text",{"aria-live":"polite",className:Ne(re.LoaderLabel,a?re.VisuallyHidden:null),x:"130%",y:"80%"},h):null);return _.createElement(ke,{as:"svg","aria-valuenow":s?u:void 0,className:m,ref:f,role:"progressbar",...c},o==="linear"?g:v)},Qz=Ot(She);Qz.displayName="Loader";const whe=["link","primary",void 0],Che=({className:e,children:t,colorTheme:n,isFullWidth:r=!1,isDisabled:o,isLoading:s,loadingText:a="",size:u,type:c="button",variation:f,...h},m)=>{const g=whe.includes(f)&&n?`${f??"outlined"}--${n}`:void 0,{isFieldsetDisabled:v}=dh(o??s??h.disabled),w=Ne(re.Button,re.FieldGroupControl,Rt(re.Button,f),Rt(re.Button,g),Rt(re.Button,u),cr(re.Button,"disabled",v),cr(re.Button,"loading",s),cr(re.Button,"fullwidth",r),e);return _.createElement(ke,{ref:m,as:"button",className:w,isDisabled:v,type:c,...h},s?_.createElement(Pe,{as:"span",className:re.ButtonLoaderWrapper},_.createElement(Qz,{size:u}),a||null):t)},zt=Ot(Che);zt.displayName="Button";const Ehe=e=>{const{className:t,size:n,...r}=e;return _.createElement(ke,{as:"span",width:n??"1em",height:n??"1em",className:Ne(re.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"})))},_he=({as:e="p",className:t,children:n,isTruncated:r,variation:o,...s},a)=>{const u=Ne(re.Text,Rt(re.Text,o),cr(re.Text,"truncated",r),t);return _.createElement(ke,{as:e,className:u,ref:a,...s},n)},Qr=Ot(_he);Qr.displayName="Text";const xhe="qa-field-description",Iy=({descriptiveText:e,labelHidden:t,...n})=>e?_.createElement(Qr,{"data-testid":xhe,className:Ne(re.FieldDescription,{[re.VisuallyHidden]:t}),...n},e):null;Iy.displayName="FieldDescription";const Ay=({errorMessage:e,hasError:t,...n})=>t&&e?_.createElement(Qr,{className:re.FieldErrorMessage,...n},e):null;Ay.displayName="FieldErrorMessage";const Ihe=({children:e,className:t,visuallyHidden:n,...r},o)=>_.createElement(ke,{as:"label",className:Ne(re.Label,t,{[re.VisuallyHidden]:n}),ref:o,...r},e),qA=Ot(Ihe);qA.displayName="Label";const Ahe=({buttonRef:e,children:t,className:n,dismissButtonLabel:r=BA.Alert.dismissButtonLabel,hasIcon:o=!0,heading:s,isDismissible:a=!1,onDismiss:u,variation:c,...f},h)=>{const[m,g]=_.useState(!1),v=xy("alert"),w=_.useCallback(()=>{g(!m),ks(u)&&u()},[g,u,m]);return m?null:_.createElement(Pe,{className:Ne(re.Alert,n,Rt(re.Alert,c)),ref:h,role:"alert",...f},o&&_.createElement(Zz,{variation:c,ariaHidden:!0}),_.createElement(ke,{flex:"1"},s&&_.createElement(ke,{className:re.AlertHeading},s),_.createElement(ke,{className:re.AlertBody},t)),a&&_.createElement(zt,{ariaLabel:r,variation:"link",className:re.AlertDismiss,onClick:w,ref:e},v?.close??_.createElement(Ehe,{"aria-hidden":"true"})))},Xz=Ot(Ahe);Xz.displayName="Alert";const Ua=(e,t)=>e&&t?`${e}-${t}`:void 0,Rhe=({children:e,className:t,innerEndComponent:n,innerStartComponent:r,orientation:o="horizontal",outerEndComponent:s,outerStartComponent:a,variation:u,...c},f)=>{const h=r!=null,m=n!=null,g=h?re.FieldGroupHasInnerStart:null,v=m?re.FieldGroupHasInnerEnd:null,w=Ne(re.FieldGroup,g,v,Rt(re.FieldGroup,o),t);return _.createElement(Pe,{className:w,ref:f,...c},a&&_.createElement(ke,{className:Ne(re.FieldGroupOuterStart,Rt(re.FieldGroupOuterStart,u))},a),_.createElement(ke,{className:Ne(re.FieldGroupFieldWrapper,Rt(re.FieldGroupFieldWrapper,o))},r&&_.createElement(ke,{className:re.FieldGroupInnerStart},r),e,n&&_.createElement(ke,{className:re.FieldGroupInnerEnd},n)),s&&_.createElement(ke,{className:Ne(re.FieldGroupOuterEnd,Rt(re.FieldGroupOuterEnd,u))},s))},Jz=Ot(Rhe);Jz.displayName="FieldGroup";const The=({autoComplete:e,checked:t,className:n,defaultChecked:r,defaultValue:o,id:s,isDisabled:a,isReadOnly:u,isRequired:c,size:f,type:h="text",hasError:m=!1,value:g,variation:v,...w},S)=>{const C=Ne(re.Input,re.FieldGroupControl,Rt(re.Input,v),cr(re.Input,"error",m),Rt(re.Input,f),n),{isFieldsetDisabled:E}=dh(a);return _.createElement(ke,{"aria-invalid":m,as:"input",autoComplete:e,checked:t,className:C,defaultChecked:r,defaultValue:o,isDisabled:E,id:s,readOnly:u,ref:S,required:c,type:h,value:g,...w})},VA=Ot(The);VA.displayName="Input";const Ohe=e=>e in jA,e9=e=>{const t={styleProps:{},rest:{}};return Object.keys(e).forEach(n=>{Ohe(n)?t.styleProps={...t.styleProps,[n]:e[n]}:t.rest={...t.rest,[n]:e[n]}}),t},WA=e=>{const t=e.filter(n=>n!==void 0).join(" ");return t.length>0?t:void 0},GA="error",KA="description",Mhe=(e,t)=>{const{className:n,descriptiveText:r,errorMessage:o,hasError:s=!1,id:a,innerEndComponent:u,innerStartComponent:c,label:f,labelHidden:h=!1,outerEndComponent:m,outerStartComponent:g,size:v,testId:w,variation:S,inputStyles:C,...E}=e,I=Hi(a),A=Hi(),T=r?Ua(A,KA):void 0,N=s?Ua(A,GA):void 0,M=WA([N,T]),{styleProps:R,rest:k}=e9(E);return _.createElement(Pe,{className:Ne(re.Field,Rt(re.Field,v),re.TextField,n),testId:w,...R},_.createElement(qA,{htmlFor:I,visuallyHidden:h},f),_.createElement(Iy,{id:T,labelHidden:h,descriptiveText:r}),_.createElement(Jz,{outerStartComponent:g,outerEndComponent:m,innerStartComponent:c,innerEndComponent:u,variation:S},_.createElement(VA,{"aria-describedby":M,hasError:s,id:I,ref:t,size:v,variation:S,...C,...k})),_.createElement(Ay,{id:N,hasError:s,errorMessage:o}))},fh=Ot(Mhe);fh.displayName="TextField";const Phe=({as:e="span",children:t,className:n,...r},o)=>_.createElement(ke,{as:e,className:Ne(re.VisuallyHidden,n),ref:o,...r},t),Ry=Ot(Phe);Ry.displayName="VisuallyHidden";const Nhe=({className:e,orientation:t="horizontal",size:n,label:r,...o},s)=>{const a=Ne(re.Divider,Rt(re.Divider,t),Rt(re.Divider,n),e);return _.createElement(ke,{"aria-orientation":t,as:"hr",className:a,"data-label":r,ref:s,...o})},ZA=Ot(Nhe);ZA.displayName="Divider";const khe=e=>{const{className:t,...n}=e;return _.createElement(ke,{as:"span",width:"1em",height:"1em",className:Ne(re.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"})))},Dhe=({children:e,className:t,isDisabled:n,legend:r,legendHidden:o,size:s,testId:a,variation:u="plain",...c},f)=>{const{isFieldsetDisabled:h}=dh(n),m=_.useMemo(()=>({isFieldsetDisabled:h}),[h]),g=Ne(re.Fieldset,Rt(re.Fieldset,u),Rt(re.Fieldset,s),t),v=Ne(re.FieldsetLegend,Rt(re.FieldsetLegend,s),{[re.VisuallyHidden]:o});return _.createElement(Yz.Provider,{value:m},_.createElement(Pe,{as:"fieldset",className:g,ref:f,disabled:h,testId:a,...c},_.createElement(Ry,{as:"legend"},r),_.createElement(ke,{as:"div","aria-hidden":"true",className:v},r),e))},t9=Ot(Dhe);t9.displayName="Fieldset";const Lhe={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},Uhe=({className:e,children:t,isTruncated:n,level:r=6,...o},s)=>_.createElement(ke,{as:Lhe[r],className:Ne(re.Heading,Rt(re.Heading,r),cr(re.Heading,"truncated",n),e),ref:s,...o},t),Yn=Ot(Uhe);Yn.displayName="Heading";var $he=_.createContext(void 0),Fhe=e=>{const{dir:t,children:n}=e;return O.jsx($he.Provider,{value:t,children:n})};const zhe=e=>{const{className:t,...n}=e;return _.createElement(ke,{as:"span",width:"1em",height:"1em",className:Ne(re.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"})))},jhe=e=>{const{className:t,...n}=e;return _.createElement(ke,{as:"span",width:"1em",height:"1em",className:Ne(re.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:Bhe,passwordIsShown:Hhe,showPassword:qhe}=BA.PasswordField,Vhe=({fieldType:e,passwordIsHiddenLabel:t=Bhe,passwordIsShownLabel:n=Hhe,showPasswordButtonLabel:r=qhe,size:o,hasError:s,...a},u)=>{const c=xy("passwordField"),f=Ne(re.FieldShowPassword,cr(re.FieldShowPassword,"error",s)),h=e==="password"?c?.visibility??_.createElement(jhe,{"aria-hidden":"true"}):c?.visibilityOff??_.createElement(zhe,{"aria-hidden":"true"});return _.createElement(zt,{"aria-checked":e!=="password",ariaLabel:r,className:f,colorTheme:s?"error":void 0,ref:u,role:"switch",size:o,...a},_.createElement(Ry,{"aria-live":"polite"},e==="password"?t:n),h)},n9=Ot(Vhe);n9.displayName="ShowPasswordButton";const Whe=({autoComplete:e="current-password",label:t,className:n,hideShowPassword:r=!1,passwordIsHiddenLabel:o,passwordIsShownLabel:s,showPasswordButtonLabel:a,showPasswordButtonRef:u,size:c,hasError:f,...h},m)=>{const[g,v]=_.useState("password"),w=_.useCallback(()=>{v(g==="password"?"text":"password")},[v,g]);return _.createElement(fh,{autoComplete:e,outerEndComponent:r?null:_.createElement(n9,{fieldType:g,onClick:w,passwordIsHiddenLabel:o,passwordIsShownLabel:s,ref:u,size:c,showPasswordButtonLabel:a,hasError:f}),size:c,type:g,label:t,className:Ne(re.PasswordField,n),ref:m,hasError:f,...h})},YA=Ot(Whe);YA.displayName="PasswordField";const Ghe=({autoComplete:e,className:t,size:n,variation:r,value:o,defaultValue:s,hasError:a,icon:u,iconColor:c,children:f,placeholder:h,isDisabled:m,isRequired:g,isMultiple:v=!1,selectSize:w=1,...S},C)=>{const I=o===void 0&&s===void 0&&h,A=v||w>1,T=Ne(re.Select,re.FieldGroupControl,Rt(re.Select,n),Rt(re.Select,r),cr(re.Select,"error",a),cr(re.Select,"expanded",A),t),N=xy("select"),{isFieldsetDisabled:M}=dh(m);return _.createElement(ke,{className:re.SelectWrapper},_.createElement(ke,{"aria-invalid":a,as:"select",autoComplete:e,value:o,defaultValue:I?"":s,isDisabled:M,multiple:v,size:w,required:g,className:T,ref:C,...S},h&&_.createElement("option",{value:""},h),f),A?null:_.createElement(Pe,{className:Ne(re.SelectIcon,Rt(re.SelectIcon,n)),color:c,"aria-hidden":"true"},u??N?.expand??_.createElement(khe,null)))},r9=Ot(Ghe);r9.displayName="Select";const Khe=({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)),Zhe=(e,t)=>{const{children:n,className:r,descriptiveText:o,errorMessage:s,hasError:a=!1,id:u,label:c,labelHidden:f=!1,options:h,size:m,testId:g,inputStyles:v,...w}=e,S=Hi(u),C=Hi(),E=o?Ua(C,KA):void 0,I=a?Ua(C,GA):void 0,A=WA([I,E]),{styleProps:T,rest:N}=e9(w);return _.createElement(Pe,{className:Ne(re.Field,Rt(re.Field,m),re.SelectField,r),testId:g,...T},_.createElement(qA,{htmlFor:S,visuallyHidden:f},c),_.createElement(Iy,{id:E,labelHidden:f,descriptiveText:o}),_.createElement(r9,{"aria-describedby":A,hasError:a,id:S,ref:t,size:m,...N,...v},Khe({children:n,options:h})),_.createElement(Ay,{id:I,hasError:a,errorMessage:s}))},o9=Ot(Zhe);o9.displayName="SelectField";const Yhe=({className:e,dialCodeList:t,isReadOnly:n,...r},o)=>{const s=t??Tz,a=_.useMemo(()=>s.map(u=>_.createElement("option",{key:u,value:u,disabled:n},u)),[s,n]);return _.createElement(o9,{"aria-disabled":n,autoComplete:"tel-country-code",className:Ne(re.CountryCodeSelect,re.DialCodeSelect,e),labelHidden:!0,ref:o,...r},a)},s9=Ot(Yhe);s9.displayName="DialCodeSelect";const Qhe=({autoComplete:e="tel-national",className:t,defaultDialCode:n,dialCodeLabel:r=BA.PhoneNumberField.countryCodeLabel,dialCodeList:o,dialCodeName:s,dialCodeRef:a,hasError:u,isDisabled:c,isReadOnly:f,onDialCodeChange:h,onInput:m,size:g,variation:v,...w},S)=>_.createElement(fh,{outerStartComponent:_.createElement(s9,{defaultValue:n,dialCodeList:o,className:t,hasError:u,isDisabled:c,isReadOnly:f,label:r,name:s,onChange:h,ref:a,size:g,variation:v}),autoComplete:e,className:Ne(re.PhoneNumberField,t),hasError:u,isDisabled:c,isReadOnly:f,onInput:m,ref:S,size:g,type:"tel",variation:v,...w}),i9=Ot(Qhe);i9.displayName="PhoneNumberField";const Xhe={name:"default"},a9=F.createContext(Xhe),Jhe=()=>_.useContext(a9),epe=({children:e,className:t,id:n,isDisabled:r=!1,testId:o,value:s,labelPosition:a,...u},c)=>{const{currentValue:f,defaultValue:h,name:m,hasError:g,isGroupDisabled:v=!1,isRequired:w,isReadOnly:S,onChange:C,size:E,labelPosition:I}=Jhe(),{isFieldsetDisabled:A}=dh(v||r||S&&h!==s),T=f!==void 0?s===f:void 0,N=h!==void 0?s===h:void 0,M=a??I;return _.createElement(Pe,{as:"label",className:Ne(re.Radio,cr(re.Radio,"disabled",A),M?`amplify-label-${M}`:null,t)},e&&_.createElement(Qr,{as:"span",className:Ne(re.RadioLabel,cr(re.RadioLabel,"disabled",A))},e),_.createElement(VA,{checked:T,className:Ne(re.VisuallyHidden,re.RadioInput),defaultChecked:N,hasError:g,id:n,isDisabled:A,isReadOnly:S,isRequired:w,onChange:C,ref:c,type:"radio",name:m,value:s,...u}),_.createElement(Pe,{"aria-hidden":"true",as:"span",className:Ne(re.RadioButton,Rt(re.RadioButton,E)),testId:o}))},QA=Ot(epe);QA.displayName="Radio";const tpe=({children:e,className:t,defaultValue:n,descriptiveText:r,errorMessage:o,hasError:s=!1,id:a,isDisabled:u,isRequired:c,isReadOnly:f,legend:h,legendHidden:m=!1,labelPosition:g,onChange:v,name:w,size:S,testId:C,value:E,variation:I,...A},T)=>{const N=Hi(a),M=Hi(),R=r?Ua(M,KA):void 0,k=s?Ua(M,GA):void 0,L=WA([k,R]),q=Ua(C,re.RadioGroup),$=_.useMemo(()=>({currentValue:E,defaultValue:n,hasError:s,isRequired:c,isReadOnly:f,isGroupDisabled:u,onChange:v,size:S,name:w,labelPosition:g}),[n,s,u,c,f,v,S,w,E,g]);return _.createElement(t9,{className:Ne(re.Field,Rt(re.Field,S),re.RadioGroupField,t),isDisabled:u,legend:h,legendHidden:m,ref:T,role:"radiogroup",size:S,testId:C,variation:I,...A},_.createElement(Iy,{id:R,labelHidden:m,descriptiveText:r}),_.createElement(Pe,{"aria-describedby":L,className:re.RadioGroup,id:N,testId:q},_.createElement(a9.Provider,{value:$},e)),_.createElement(Ay,{id:k,hasError:s,errorMessage:o}))},XA=Ot(tpe);XA.displayName="RadioGroupField";const Ty=_.createContext({groupId:"",activeTab:"",setActiveTab:()=>{}}),l9="-",npe=({className:e,value:t,children:n,onClick:r,as:o="button",role:s="tab",...a},u)=>{const{activeTab:c,setActiveTab:f,groupId:h}=_.useContext(Ty);let m=t;typeof m=="string"&&(m=m.replace(" ",l9));const g=c===t,v=w=>{ks(r)&&r?.(w),f(t)};return _.createElement(ke,{...a,role:s,as:o,id:`${h}-tab-${m}`,"aria-selected":g,"aria-controls":`${h}-panel-${m}`,tabIndex:g?void 0:-1,className:Ne(re.TabsItem,cr(re.TabsItem,"active",c===t),e),ref:u,onClick:v},n)},JA=Ot(npe);JA.displayName="Tabs.Item";const rpe=e=>_.isValidElement(e),ope=({className:e,children:t,indicatorPosition:n,spacing:r,role:o="tablist",...s},a)=>{const u=_.useRef(null),{activeTab:c,setActiveTab:f}=_.useContext(Ty);_.useImperativeHandle(a,()=>u.current);const h=_.useMemo(()=>_.Children.toArray(t).map(S=>{if(S&&rpe(S))return S.props.value}).filter(S=>!!S),[t]),m=h.indexOf(c),g=_.useCallback(()=>{let S=m===h.length-1?0:m+1;const C=u.current?.querySelectorAll("button")??[];for(;C[S].disabled;)S===h.length-1?S=0:S++;const E=h[S];if(E){f(E);const I=C[S];I?.focus(),I?.click()}},[m,f,h]),v=_.useCallback(()=>{let S=m===0?h.length-1:m-1;const C=u.current?.querySelectorAll("button")??[];for(;C[S].disabled;)S===0?S=h.length-1:S--;const E=h[S];if(E){f(E);const I=C[S];I?.focus(),I?.click()}},[m,f,h]),w=_.useCallback(S=>{switch(S.key){case"ArrowLeft":S.preventDefault(),S.stopPropagation(),v();break;case"ArrowUp":case"ArrowRight":S.preventDefault(),S.stopPropagation(),g();break}},[v,g]);return _.createElement(ke,{...s,role:o,onKeyDown:w,className:Ne(re.TabsList,n?Rt(re.TabsList,n):null,r?Rt(re.TabsList,r):null,e),ref:u},t)},eR=Ot(ope);eR.displayName="Tabs.List";const spe=({className:e,value:t,children:n,role:r="tabpanel",...o},s)=>{const{activeTab:a,isLazy:u,groupId:c}=_.useContext(Ty);if(u&&a!==t)return null;let f=t;return typeof f=="string"&&(f=f.replace(" ",l9)),_.createElement(ke,{...o,role:r,id:`${c}-panel-${f}`,"aria-labelledby":`${c}-tab-${f}`,className:Ne(re.TabsPanel,cr(re.TabsPanel,"active",a===t),e),ref:s},n)},tR=Ot(spe);tR.displayName="Tabs.Panel";const ipe=({children:e,defaultValue:t,className:n,value:r,onValueChange:o,isLazy:s,...a},u)=>{const c=Hi(),f=r!==void 0,[h,m]=_.useState(()=>f?r:t),g=f?r:h??"",v=_.useCallback(S=>{ks(o)&&o(S),f||m(S)},[o,f]),w=_.useMemo(()=>({activeTab:g,isLazy:s,setActiveTab:v,groupId:c}),[g,v,s,c]);return _.createElement(Ty.Provider,{value:w},_.createElement(ke,{...a,ref:u,className:Ne(n,re.Tabs)},e))},nR=Ot(ipe);nR.displayName="Tabs.Container";const ape=({items:e,indicatorPosition:t,justifyContent:n,spacing:r,...o},s)=>_.createElement(nR,{...o,ref:s},_.createElement(eR,{indicatorPosition:t,justifyContent:n,spacing:r},e?.map(({value:a,label:u,content:c,...f})=>_.createElement(JA,{...f,key:a,value:a},u))),e?.map(({value:a,content:u,isDisabled:c})=>_.createElement(tR,{key:a,value:a,isDisabled:c},u))),Ia=Object.assign(Ot(ape),{Item:JA,List:eR,Panel:tR,Container:nR});Ia.displayName="Tabs";const eE=({errors:e,id:t,dataAttr:n})=>{if(!(e?.length>0))return null;const r=n?{[n]:!0}:{};return F.createElement(ke,{...r,id:t},e.map(o=>F.createElement(Qr,{key:o,role:"alert",variation:"error"},de(o))))},lpe="6.15.4",upe=({message:e,shouldWarn:t})=>{jfe({message:e,shouldWarn:t})},u9=_.createContext(null),Pr=()=>{const e=_.useContext(u9);if(!e)throw new Error("`useCustomComponents` cannot be used outside of a `CustomComponentsContext.Provider`");return e},cpe=e=>{const t=new FormData(e.target);return Object.fromEntries(t)};function Nr(){const{submitForm:e,updateBlur:t,updateForm:n}=ot(a=>[a.submitForm,a.updateBlur,a.updateForm]),r=_.useCallback(({target:{name:a}})=>{t({name:a})},[t]),o=_.useCallback(({target:{checked:a,name:u,type:c,value:f}})=>{n({name:u,value:c==="checkbox"&&!a?void 0:f})},[n]),s=_.useCallback(a=>{a.preventDefault(),e(cpe(a))},[e]);return{handleBlur:r,handleChange:o,handleSubmit:s}}const mr=()=>{const{error:e}=ot(t=>[t.error]);return F.createElement(F.Fragment,null,e?F.createElement(Xz,{variation:"error",isDismissible:!0},de(e)):null)};function jL({autocomplete:e,dialCode:t,name:n,type:r,...o}){const{validationErrors:s}=ot(({validationErrors:h})=>[h]),a=_.useMemo(()=>Dae(s[n]),[n,s]),u=a?.length>0,c=Hi(),f=u?c:void 0;return r==="tel"?_.createElement(_.Fragment,null,_.createElement(i9,{...o,name:n,defaultDialCode:t,dialCodeName:"country_code",autoComplete:e,hasError:u,"aria-describedby":f}),_.createElement(eE,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:c})):r==="password"?_.createElement(_.Fragment,null,_.createElement(YA,{...o,name:n,autoCapitalize:"off",autoComplete:e,hasError:u,"aria-describedby":f}),_.createElement(eE,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:c})):_.createElement(_.Fragment,null,_.createElement(fh,{...o,name:n,autoCapitalize:"off",autoComplete:e,hasError:u,type:r,"aria-describedby":f}),_.createElement(eE,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:c}))}function Ko({includePassword:e}={}){const{fields:t}=ot(({route:u})=>[u]),{selectedAuthMethod:n,preferredChallenge:r}=ot(u=>[u.selectedAuthMethod,u.preferredChallenge]),o=n??r,s=e??(!o||o==="PASSWORD"),a=_.useRef(t.map((u,c)=>(u.name==="password"||u.name==="confirm_password")&&!s?_.createElement(jL,{key:c,...u,isRequired:!1}):_.createElement(jL,{key:c,...u})).filter(Boolean)).current;return _.createElement(_.Fragment,null,a)}function hr({children:e,className:t,variation:n="default"}){ot(({route:s})=>[s]);const{components:{Header:r,Footer:o}}=Pr();return F.createElement(ke,{className:t,"data-amplify-authenticator":"","data-variation":n},F.createElement(ke,{"data-amplify-container":""},F.createElement(r,null),F.createElement(ke,{"data-amplify-router":"","data-amplify-router-content":void 0},e),F.createElement(o,null)))}const{getDeliveryMessageText:dpe,getDeliveryMethodText:fpe,getConfirmingText:hpe,getConfirmText:ppe,getResendCodeText:mpe}=Sn;function Za({className:e,variation:t}){const{isPending:n,resendCode:r,codeDeliveryDetails:o}=ot(f=>[f.isPending,f.resendCode,f.codeDeliveryDetails]),{handleChange:s,handleSubmit:a}=Nr(),{components:{ConfirmSignUp:{Header:u=Za.Header,Footer:c=Za.Footer}}}=Pr();return F.createElement(hr,{className:e,variation:t},F.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignup":"",method:"post",onChange:s,onSubmit:a},F.createElement(Pe,{as:"fieldset",direction:"column",isDisabled:n},F.createElement(u,null),F.createElement(Pe,{direction:"column"},F.createElement(Qr,{className:"amplify-authenticator__subtitle"},dpe(o)),F.createElement(Ko,null),F.createElement(mr,null),F.createElement(zt,{variation:"primary",isDisabled:n,type:"submit",loadingText:hpe(),isLoading:n},ppe()),F.createElement(zt,{onClick:r,type:"button"},mpe())),F.createElement(c,null))))}const gpe=()=>{const{codeDeliveryDetails:e}=ot(t=>[t.codeDeliveryDetails]);return F.createElement(Yn,{level:4},fpe(e))};Za.Header=gpe;Za.Footer=function(){return null};const{getChangePasswordText:c9,getChangingText:vpe,getBackToSignInText:ype}=Sn,yo=({className:e,variation:t})=>{const{isPending:n,toSignIn:r}=ot(h=>[h.isPending,h.toSignIn]),{handleBlur:o,handleChange:s,handleSubmit:a}=Nr(),{components:{ForceNewPassword:{FormFields:u=yo.FormFields,Header:c=yo.Header,Footer:f=yo.Footer}}}=Pr();return F.createElement(hr,{className:e,variation:t},F.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forcenewpassword":"",method:"post",onChange:s,onSubmit:a,onBlur:o},F.createElement(Pe,{as:"fieldset",direction:"column",isDisabled:n},F.createElement(c,null),F.createElement(u,null),F.createElement(mr,null),F.createElement(zt,{isDisabled:n,type:"submit",variation:"primary",isLoading:n,loadingText:vpe()},c9()),F.createElement(zt,{onClick:r,type:"button",variation:"link",size:"small"},ype()),F.createElement(f,null))))};yo.FormFields=function(){return F.createElement(Ko,null)};yo.Header=function(){return F.createElement(Yn,{level:4},c9())};yo.Footer=function(){return null};var uu={},tE,BL;function bpe(){return BL||(BL=1,tE=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),tE}var nE={},Ci={},HL;function dl(){if(HL)return Ci;HL=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 Ci.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},Ci.getSymbolTotalCodewords=function(r){return t[r]},Ci.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},Ci.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},Ci.isKanjiModeEnabled=function(){return typeof e<"u"},Ci.toSJIS=function(r){return e(r)},Ci}var rE={},qL;function rR(){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}}})(rE)),rE}var oE,VL;function Spe(){if(VL)return oE;VL=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++}},oE=e,oE}var sE,WL;function wpe(){if(WL)return sE;WL=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]},sE=e,sE}var iE={},GL;function Cpe(){return GL||(GL=1,(function(e){const t=dl().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,u=[s-7];for(let c=1;c<o-1;c++)u[c]=u[c-1]-a;return u.push(6),u.reverse()},e.getPositions=function(r){const o=[],s=e.getRowColCoords(r),a=s.length;for(let u=0;u<a;u++)for(let c=0;c<a;c++)u===0&&c===0||u===0&&c===a-1||u===a-1&&c===0||o.push([s[u],s[c]]);return o}})(iE)),iE}var aE={},KL;function Epe(){if(KL)return aE;KL=1;const e=dl().getSymbolSize,t=7;return aE.getPositions=function(r){const o=e(r);return[[0,0],[o-t,0],[0,o-t]]},aE}var lE={},ZL;function _pe(){return ZL||(ZL=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,u=0,c=0,f=null,h=null;for(let m=0;m<s;m++){u=c=0,f=h=null;for(let g=0;g<s;g++){let v=o.get(m,g);v===f?u++:(u>=5&&(a+=t.N1+(u-5)),f=v,u=1),v=o.get(g,m),v===h?c++:(c>=5&&(a+=t.N1+(c-5)),h=v,c=1)}u>=5&&(a+=t.N1+(u-5)),c>=5&&(a+=t.N1+(c-5))}return a},e.getPenaltyN2=function(o){const s=o.size;let a=0;for(let u=0;u<s-1;u++)for(let c=0;c<s-1;c++){const f=o.get(u,c)+o.get(u,c+1)+o.get(u+1,c)+o.get(u+1,c+1);(f===4||f===0)&&a++}return a*t.N2},e.getPenaltyN3=function(o){const s=o.size;let a=0,u=0,c=0;for(let f=0;f<s;f++){u=c=0;for(let h=0;h<s;h++)u=u<<1&2047|o.get(f,h),h>=10&&(u===1488||u===93)&&a++,c=c<<1&2047|o.get(h,f),h>=10&&(c===1488||c===93)&&a++}return a*t.N3},e.getPenaltyN4=function(o){let s=0;const a=o.data.length;for(let c=0;c<a;c++)s+=o.data[c];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 u=0;u<a;u++)for(let c=0;c<a;c++)s.isReserved(c,u)||s.xor(c,u,n(o,c,u))},e.getBestMask=function(o,s){const a=Object.keys(e.Patterns).length;let u=0,c=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<c&&(c=h,u=f)}return u}})(lE)),lE}var nm={},YL;function d9(){if(YL)return nm;YL=1;const e=rR(),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 uE={},Md={},QL;function xpe(){if(QL)return Md;QL=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]})(),Md.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},Md.exp=function(r){return e[r]},Md.mul=function(r,o){return r===0||o===0?0:e[t[r]+t[o]]},Md}var XL;function Ipe(){return XL||(XL=1,(function(e){const t=xpe();e.mul=function(r,o){const s=new Uint8Array(r.length+o.length-1);for(let a=0;a<r.length;a++)for(let u=0;u<o.length;u++)s[a+u]^=t.mul(r[a],o[u]);return s},e.mod=function(r,o){let s=new Uint8Array(r);for(;s.length-o.length>=0;){const a=s[0];for(let c=0;c<o.length;c++)s[c]^=t.mul(o[c],a);let u=0;for(;u<s.length&&s[u]===0;)u++;s=s.slice(u)}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}})(uE)),uE}var cE,JL;function Ape(){if(JL)return cE;JL=1;const e=Ipe();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 u=new Uint8Array(this.degree);return u.set(s,a),u}return s},cE=t,cE}var dE={},fE={},hE={},e4;function f9(){return e4||(e4=1,hE.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),hE}var Mo={},t4;function h9(){if(t4)return Mo;t4=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
|
-
]))+`;Mo.KANJI=new RegExp(n,"g"),Mo.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Mo.BYTE=new RegExp(r,"g"),Mo.NUMERIC=new RegExp(e,"g"),Mo.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+n+"$"),s=new RegExp("^"+e+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Mo.testKanji=function(c){return o.test(c)},Mo.testNumeric=function(c){return s.test(c)},Mo.testAlphanumeric=function(c){return a.test(c)},Mo}var n4;function fl(){return n4||(n4=1,(function(e){const t=f9(),n=h9();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}}})(fE)),fE}var r4;function Rpe(){return r4||(r4=1,(function(e){const t=dl(),n=d9(),r=rR(),o=fl(),s=f9(),a=7973,u=t.getBCHDigit(a);function c(g,v,w){for(let S=1;S<=40;S++)if(v<=e.getCapacity(S,w,g))return S}function f(g,v){return o.getCharCountIndicator(g,v)+4}function h(g,v){let w=0;return g.forEach(function(S){const C=f(S.mode,v);w+=C+S.getBitsLength()}),w}function m(g,v){for(let w=1;w<=40;w++)if(h(g,w)<=e.getCapacity(w,v,o.MIXED))return w}e.from=function(v,w){return s.isValid(v)?parseInt(v,10):w},e.getCapacity=function(v,w,S){if(!s.isValid(v))throw new Error("Invalid QR Code version");typeof S>"u"&&(S=o.BYTE);const C=t.getSymbolTotalCodewords(v),E=n.getTotalCodewordsCount(v,w),I=(C-E)*8;if(S===o.MIXED)return I;const A=I-f(S,v);switch(S){case o.NUMERIC:return Math.floor(A/10*3);case o.ALPHANUMERIC:return Math.floor(A/11*2);case o.KANJI:return Math.floor(A/13);case o.BYTE:default:return Math.floor(A/8)}},e.getBestVersionForData=function(v,w){let S;const C=r.from(w,r.M);if(Array.isArray(v)){if(v.length>1)return m(v,C);if(v.length===0)return 1;S=v[0]}else S=v;return c(S.mode,S.getLength(),C)},e.getEncodedBits=function(v){if(!s.isValid(v)||v<7)throw new Error("Invalid QR Code version");let w=v<<12;for(;t.getBCHDigit(w)-u>=0;)w^=a<<t.getBCHDigit(w)-u;return v<<12|w}})(dE)),dE}var pE={},o4;function Tpe(){if(o4)return pE;o4=1;const e=dl(),t=1335,n=21522,r=e.getBCHDigit(t);return pE.getEncodedBits=function(s,a){const u=s.bit<<3|a;let c=u<<10;for(;e.getBCHDigit(c)-r>=0;)c^=t<<e.getBCHDigit(c)-r;return(u<<10|c)^n},pE}var mE={},gE,s4;function Ope(){if(s4)return gE;s4=1;const e=fl();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 u=this.data.length-o;u>0&&(s=this.data.substr(o),a=parseInt(s,10),r.put(a,u*3+1))},gE=t,gE}var vE,i4;function Mpe(){if(i4)return vE;i4=1;const e=fl(),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)},vE=n,vE}var yE,a4;function Ppe(){return a4||(a4=1,yE=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}),yE}var bE,l4;function Npe(){if(l4)return bE;l4=1;const e=Ppe(),t=fl();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)},bE=n,bE}var SE,u4;function kpe(){if(u4)return SE;u4=1;const e=fl(),t=dl();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)}},SE=n,SE}var wE={exports:{}},c4;function Dpe(){return c4||(c4=1,(function(e){var t={single_source_shortest_paths:function(n,r,o){var s={},a={};a[r]=0;var u=t.PriorityQueue.make();u.push(r,0);for(var c,f,h,m,g,v,w,S,C;!u.empty();){c=u.pop(),f=c.value,m=c.cost,g=n[f]||{};for(h in g)g.hasOwnProperty(h)&&(v=g[h],w=m+v,S=a[h],C=typeof a[h]>"u",(C||S>w)&&(a[h]=w,u.push(h,w),s[h]=f))}if(typeof o<"u"&&typeof a[o]>"u"){var E=["Could not find a path from ",r," to ",o,"."].join("");throw new Error(E)}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})(wE)),wE.exports}var d4;function Lpe(){return d4||(d4=1,(function(e){const t=fl(),n=Ope(),r=Mpe(),o=Npe(),s=kpe(),a=h9(),u=dl(),c=Dpe();function f(E){return unescape(encodeURIComponent(E)).length}function h(E,I,A){const T=[];let N;for(;(N=E.exec(A))!==null;)T.push({data:N[0],index:N.index,mode:I,length:N[0].length});return T}function m(E){const I=h(a.NUMERIC,t.NUMERIC,E),A=h(a.ALPHANUMERIC,t.ALPHANUMERIC,E);let T,N;return u.isKanjiModeEnabled()?(T=h(a.BYTE,t.BYTE,E),N=h(a.KANJI,t.KANJI,E)):(T=h(a.BYTE_KANJI,t.BYTE,E),N=[]),I.concat(A,T,N).sort(function(R,k){return R.index-k.index}).map(function(R){return{data:R.data,mode:R.mode,length:R.length}})}function g(E,I){switch(I){case t.NUMERIC:return n.getBitsLength(E);case t.ALPHANUMERIC:return r.getBitsLength(E);case t.KANJI:return s.getBitsLength(E);case t.BYTE:return o.getBitsLength(E)}}function v(E){return E.reduce(function(I,A){const T=I.length-1>=0?I[I.length-1]:null;return T&&T.mode===A.mode?(I[I.length-1].data+=A.data,I):(I.push(A),I)},[])}function w(E){const I=[];for(let A=0;A<E.length;A++){const T=E[A];switch(T.mode){case t.NUMERIC:I.push([T,{data:T.data,mode:t.ALPHANUMERIC,length:T.length},{data:T.data,mode:t.BYTE,length:T.length}]);break;case t.ALPHANUMERIC:I.push([T,{data:T.data,mode:t.BYTE,length:T.length}]);break;case t.KANJI:I.push([T,{data:T.data,mode:t.BYTE,length:f(T.data)}]);break;case t.BYTE:I.push([{data:T.data,mode:t.BYTE,length:f(T.data)}])}}return I}function S(E,I){const A={},T={start:{}};let N=["start"];for(let M=0;M<E.length;M++){const R=E[M],k=[];for(let L=0;L<R.length;L++){const q=R[L],$=""+M+L;k.push($),A[$]={node:q,lastCount:0},T[$]={};for(let D=0;D<N.length;D++){const j=N[D];A[j]&&A[j].node.mode===q.mode?(T[j][$]=g(A[j].lastCount+q.length,q.mode)-g(A[j].lastCount,q.mode),A[j].lastCount+=q.length):(A[j]&&(A[j].lastCount=q.length),T[j][$]=g(q.length,q.mode)+4+t.getCharCountIndicator(q.mode,I))}}N=k}for(let M=0;M<N.length;M++)T[N[M]].end=0;return{map:T,table:A}}function C(E,I){let A;const T=t.getBestModeForData(E);if(A=t.from(I,T),A!==t.BYTE&&A.bit<T.bit)throw new Error('"'+E+'" cannot be encoded with mode '+t.toString(A)+`.
|
|
76
|
-
Suggested mode is: `+t.toString(T));switch(A===t.KANJI&&!u.isKanjiModeEnabled()&&(A=t.BYTE),A){case t.NUMERIC:return new n(E);case t.ALPHANUMERIC:return new r(E);case t.KANJI:return new s(E);case t.BYTE:return new o(E)}}e.fromArray=function(I){return I.reduce(function(A,T){return typeof T=="string"?A.push(C(T,null)):T.data&&A.push(C(T.data,T.mode)),A},[])},e.fromString=function(I,A){const T=m(I,u.isKanjiModeEnabled()),N=w(T),M=S(N,A),R=c.find_path(M.map,"start","end"),k=[];for(let L=1;L<R.length-1;L++)k.push(M.table[R[L]].node);return e.fromArray(v(k))},e.rawSplit=function(I){return e.fromArray(m(I,u.isKanjiModeEnabled()))}})(mE)),mE}var f4;function Upe(){if(f4)return nE;f4=1;const e=dl(),t=rR(),n=Spe(),r=wpe(),o=Cpe(),s=Epe(),a=_pe(),u=d9(),c=Ape(),f=Rpe(),h=Tpe(),m=fl(),g=Lpe();function v(M,R){const k=M.size,L=s.getPositions(R);for(let q=0;q<L.length;q++){const $=L[q][0],D=L[q][1];for(let j=-1;j<=7;j++)if(!($+j<=-1||k<=$+j))for(let Z=-1;Z<=7;Z++)D+Z<=-1||k<=D+Z||(j>=0&&j<=6&&(Z===0||Z===6)||Z>=0&&Z<=6&&(j===0||j===6)||j>=2&&j<=4&&Z>=2&&Z<=4?M.set($+j,D+Z,!0,!0):M.set($+j,D+Z,!1,!0))}}function w(M){const R=M.size;for(let k=8;k<R-8;k++){const L=k%2===0;M.set(k,6,L,!0),M.set(6,k,L,!0)}}function S(M,R){const k=o.getPositions(R);for(let L=0;L<k.length;L++){const q=k[L][0],$=k[L][1];for(let D=-2;D<=2;D++)for(let j=-2;j<=2;j++)D===-2||D===2||j===-2||j===2||D===0&&j===0?M.set(q+D,$+j,!0,!0):M.set(q+D,$+j,!1,!0)}}function C(M,R){const k=M.size,L=f.getEncodedBits(R);let q,$,D;for(let j=0;j<18;j++)q=Math.floor(j/3),$=j%3+k-8-3,D=(L>>j&1)===1,M.set(q,$,D,!0),M.set($,q,D,!0)}function E(M,R,k){const L=M.size,q=h.getEncodedBits(R,k);let $,D;for($=0;$<15;$++)D=(q>>$&1)===1,$<6?M.set($,8,D,!0):$<8?M.set($+1,8,D,!0):M.set(L-15+$,8,D,!0),$<8?M.set(8,L-$-1,D,!0):$<9?M.set(8,15-$-1+1,D,!0):M.set(8,15-$-1,D,!0);M.set(L-8,8,1,!0)}function I(M,R){const k=M.size;let L=-1,q=k-1,$=7,D=0;for(let j=k-1;j>0;j-=2)for(j===6&&j--;;){for(let Z=0;Z<2;Z++)if(!M.isReserved(q,j-Z)){let he=!1;D<R.length&&(he=(R[D]>>>$&1)===1),M.set(q,j-Z,he),$--,$===-1&&(D++,$=7)}if(q+=L,q<0||k<=q){q-=L,L=-L;break}}}function A(M,R,k){const L=new n;k.forEach(function(Z){L.put(Z.mode.bit,4),L.put(Z.getLength(),m.getCharCountIndicator(Z.mode,M)),Z.write(L)});const q=e.getSymbolTotalCodewords(M),$=u.getTotalCodewordsCount(M,R),D=(q-$)*8;for(L.getLengthInBits()+4<=D&&L.put(0,4);L.getLengthInBits()%8!==0;)L.putBit(0);const j=(D-L.getLengthInBits())/8;for(let Z=0;Z<j;Z++)L.put(Z%2?17:236,8);return T(L,M,R)}function T(M,R,k){const L=e.getSymbolTotalCodewords(R),q=u.getTotalCodewordsCount(R,k),$=L-q,D=u.getBlocksCount(R,k),j=L%D,Z=D-j,he=Math.floor(L/D),B=Math.floor($/D),Q=B+1,ae=he-B,ue=new c(ae);let Ce=0;const U=new Array(D),X=new Array(D);let ie=0;const oe=new Uint8Array(M.buffer);for(let we=0;we<D;we++){const Ze=we<Z?B:Q;U[we]=oe.slice(Ce,Ce+Ze),X[we]=ue.encode(U[we]),Ce+=Ze,ie=Math.max(ie,Ze)}const fe=new Uint8Array(L);let Me=0,Ae,se;for(Ae=0;Ae<ie;Ae++)for(se=0;se<D;se++)Ae<U[se].length&&(fe[Me++]=U[se][Ae]);for(Ae=0;Ae<ae;Ae++)for(se=0;se<D;se++)fe[Me++]=X[se][Ae];return fe}function N(M,R,k,L){let q;if(Array.isArray(M))q=g.fromArray(M);else if(typeof M=="string"){let he=R;if(!he){const B=g.rawSplit(M);he=f.getBestVersionForData(B,k)}q=g.fromString(M,he||40)}else throw new Error("Invalid data");const $=f.getBestVersionForData(q,k);if(!$)throw new Error("The amount of data is too big to be stored in a QR Code");if(!R)R=$;else if(R<$)throw new Error(`
|
|
77
|
-
The chosen QR Code version cannot contain this amount of data.
|
|
78
|
-
Minimum version required to store current data is: `+$+`.
|
|
79
|
-
`);const D=A(R,k,q),j=e.getSymbolSize(R),Z=new r(j);return v(Z,R),w(Z),S(Z,R),E(Z,k,0),R>=7&&C(Z,R),I(Z,D),isNaN(L)&&(L=a.getBestMask(Z,E.bind(null,Z,k))),a.applyMask(L,Z),E(Z,k,L),{modules:Z,version:R,errorCorrectionLevel:k,maskPattern:L,segments:q}}return nE.create=function(R,k){if(typeof R>"u"||R==="")throw new Error("No input text");let L=t.M,q,$;return typeof k<"u"&&(L=t.from(k.errorCorrectionLevel,t.M),q=f.from(k.version),$=a.from(k.maskPattern),k.toSJISFunc&&e.setToSJISFunction(k.toSJISFunc)),N(R,q,L,$)},nE}var CE={},EE={},h4;function p9(){return h4||(h4=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,u=o.modules.data,c=e.getScale(a,s),f=Math.floor((a+s.margin*2)*c),h=s.margin*c,m=[s.color.light,s.color.dark];for(let g=0;g<f;g++)for(let v=0;v<f;v++){let w=(g*f+v)*4,S=s.color.light;if(g>=h&&v>=h&&g<f-h&&v<f-h){const C=Math.floor((g-h)/c),E=Math.floor((v-h)/c);S=m[u[C*a+E]?1:0]}r[w++]=S.r,r[w++]=S.g,r[w++]=S.b,r[w]=S.a}}})(EE)),EE}var p4;function $pe(){return p4||(p4=1,(function(e){const t=p9();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,u){let c=u,f=a;typeof c>"u"&&(!a||!a.getContext)&&(c=a,a=void 0),a||(f=r()),c=t.getOptions(c);const h=t.getImageWidth(s.modules.size,c),m=f.getContext("2d"),g=m.createImageData(h,h);return t.qrToImageData(g.data,s,c),n(m,f,h),m.putImageData(g,0,0),f},e.renderToDataURL=function(s,a,u){let c=u;typeof c>"u"&&(!a||!a.getContext)&&(c=a,a=void 0),c||(c={});const f=e.render(s,a,c),h=c.type||"image/png",m=c.rendererOpts||{};return f.toDataURL(h,m.quality)}})(CE)),CE}var _E={},m4;function Fpe(){if(m4)return _E;m4=1;const e=p9();function t(o,s){const a=o.a/255,u=s+'="'+o.hex+'"';return a<1?u+" "+s+'-opacity="'+a.toFixed(2).slice(1)+'"':u}function n(o,s,a){let u=o+s;return typeof a<"u"&&(u+=" "+a),u}function r(o,s,a){let u="",c=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]||(u+=f?n("M",g+a,.5+v+a):n("m",c,0),c=0,f=!1),g+1<s&&o[m+1]||(u+=n("h",h),h=0)):c++}return u}return _E.render=function(s,a,u){const c=e.getOptions(a),f=s.modules.size,h=s.modules.data,m=f+c.margin*2,g=c.color.light.a?"<path "+t(c.color.light,"fill")+' d="M0 0h'+m+"v"+m+'H0z"/>':"",v="<path "+t(c.color.dark,"stroke")+' d="'+r(h,f,c.margin)+'"/>',w='viewBox="0 0 '+m+" "+m+'"',C='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+w+' shape-rendering="crispEdges">'+g+v+`</svg>
|
|
80
|
-
`;return typeof u=="function"&&u(null,C),C},_E}var g4;function zpe(){if(g4)return uu;g4=1;const e=bpe(),t=Upe(),n=$pe(),r=Fpe();function o(s,a,u,c,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=u,u=a,a=c=void 0):m===3&&(a.getContext&&typeof f>"u"?(f=c,c=void 0):(f=c,c=u,u=a,a=void 0))}else{if(m<1)throw new Error("Too few arguments provided");return m===1?(u=a,a=c=void 0):m===2&&!a.getContext&&(c=u,u=a,a=void 0),new Promise(function(v,w){try{const S=t.create(u,c);v(s(S,a,c))}catch(S){w(S)}})}try{const v=t.create(u,c);f(null,s(v,a,c))}catch(v){f(v)}}return uu.create=t.create,uu.toCanvas=o.bind(null,n.render),uu.toDataURL=o.bind(null,n.renderToDataURL),uu.toString=o.bind(null,function(s,a,u){return r.render(s,u)}),uu}var jpe=zpe();const Bpe=lc(jpe),Hpe=e=>e==="signIn"||e==="signUp",oR=e=>!!e&&(e==="EMAIL_OTP"||e==="SMS_MFA"),{getConfirmText:qpe,getConfirmingText:Vpe,getBackToSignInText:Wpe,getResendCodeText:Gpe}=Sn,Oy=()=>{const{isPending:e,toSignIn:t,challengeName:n,resendCode:r,selectedAuthMethod:o,availableAuthMethods:s}=ot(c=>[c.isPending,c.toSignIn,c.challengeName,c.resendCode,c.selectedAuthMethod,c.availableAuthMethods]),a=!!o&&o!=="PASSWORD"||!!s?.some(c=>c!=="PASSWORD"),u=oR(n)&&a&&r;return F.createElement(Pe,{direction:"column"},F.createElement(zt,{isDisabled:e,type:"submit",variation:"primary",isLoading:e,loadingText:Vpe()},qpe()),u&&F.createElement(zt,{onClick:r,type:"button"},Gpe()),F.createElement(zt,{onClick:t,type:"button",variation:"link",size:"small"},Wpe()))},Kpe=new Un("SetupTotp-logger"),{getSetupTotpText:Zpe,getCopiedText:Ype,getLoadingText:Qpe}=Sn,qi=({className:e,variation:t})=>{const{totpSecretCode:n,isPending:r,username:o,QRFields:s}=ot(T=>[T.isPending,T.totpSecretCode,T.username]),{handleChange:a,handleSubmit:u}=Nr(),{components:{SetupTotp:{Header:c=qi.Header,Footer:f=qi.Footer}}}=Pr(),[h,m]=_.useState(!0),[g,v]=_.useState(),[w,S]=_.useState("COPY"),{totpIssuer:C="AWSCognito",totpUsername:E=o}=s??{},I=_.useCallback(async()=>{try{const T=jae(C,E,n),N=await Bpe.toDataURL(T);v(N)}catch(T){Kpe.error(T)}finally{m(!1)}},[C,E,n]);_.useEffect(()=>{g||I()},[I,g]);const A=()=>{navigator.clipboard.writeText(n),S(Ype())};return _.createElement(hr,{className:e,variation:t},_.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-totp":"",method:"post",onChange:a,onSubmit:u},_.createElement(Pe,{as:"fieldset",direction:"column",isDisabled:r},_.createElement(c,null),_.createElement(Pe,{direction:"column"},h?_.createElement("p",null,Qpe(),"…"):_.createElement("img",{"data-amplify-qrcode":!0,src:g,alt:"qr code",width:"228",height:"228"}),_.createElement(Pe,{"data-amplify-copy":!0},_.createElement("div",null,n),_.createElement(Pe,{"data-amplify-copy-svg":!0,onClick:A},_.createElement("div",{"data-amplify-copy-tooltip":!0},w),_.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(Ko,null),_.createElement(mr,null)),_.createElement(Oy,null),_.createElement(f,null))))};qi.Header=function(){return _.createElement(Yn,{level:3},Zpe())};qi.Footer=function(){return null};const{getSubmitText:Xpe,getSubmittingText:Jpe}=Sn,My=e=>{const{cancelButtonSendType:t,cancelButtonText:n,submitButtonText:r}=e,{isPending:o,resendCode:s,skipVerification:a,toSignIn:u}=ot(m=>[m.isPending]),c=()=>{switch(t){case"SKIP":a();break;case"RESEND":s();break;case"SIGN_IN":u();break;default:return}},f=o?F.createElement(F.Fragment,null,Jpe(),"…"):F.createElement(F.Fragment,null,Xpe()),h=r??f;return F.createElement(Pe,{direction:"column"},F.createElement(zt,{variation:"primary",isDisabled:o,type:"submit"},h),F.createElement(Pe,{direction:"column",alignItems:"center"},F.createElement(zt,{onClick:c,type:"button",variation:"link",size:"small"},n)))},eme=()=>F.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"},F.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"})),tme=()=>F.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"},F.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"}),F.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"}),F.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"}),F.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"})),nme=()=>F.createElement(Kz,{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"}),rme=()=>F.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"},F.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"}),F.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"})),rm=e=>{const{icon:t,provider:n,text:r}=e,{toFederatedSignIn:o}=ot(),s=u=>{u.preventDefault(),o({provider:n})};let a;return t==="facebook"?a=F.createElement(nme,null):t==="google"?a=F.createElement(tme,null):t==="amazon"?a=F.createElement(rme,null):t==="apple"&&(a=F.createElement(eme,null)),F.createElement(zt,{onClick:s,className:"federated-sign-in-button",gap:"1rem"},a,F.createElement(Qr,{as:"span"},r))},{getSignInWithFederationText:om,getOrText:ome}=Sn;function m9(){const{route:e,socialProviders:t}=ot(({route:n,socialProviders:r})=>[n,r]);return t.length===0?null:F.createElement(Pe,{direction:"column",padding:"0 0 1rem 0",className:"federated-sign-in-container"},t.map(n=>{switch(n){case"amazon":return F.createElement(rm,{icon:"amazon",key:n,provider:xu.Amazon,text:om(e,n)});case"apple":return F.createElement(rm,{icon:"apple",key:n,provider:xu.Apple,text:om(e,n)});case"facebook":return F.createElement(rm,{icon:"facebook",key:n,provider:xu.Facebook,text:om(e,n)});case"google":return F.createElement(rm,{icon:"google",key:n,provider:xu.Google,text:om(e,n)});default:console.error(`Authenticator does not support ${n}. Please open an issue: https://github.com/aws-amplify/amplify-ui/issues/choose`)}}),F.createElement(ZA,{size:"small",label:ome()}))}const{getSignInText:sm,getSigningInText:sme,getForgotPasswordText:ime,getSignInWithEmailText:ame,getSignInWithSmsText:lme,getSignInWithPasskeyText:ume,getOtherSignInOptionsText:cme,getEnterUsernameFirstText:dme}=Sn;function Ls(){const{isPending:e,availableAuthMethods:t,preferredChallenge:n,toShowAuthMethods:r}=ot(E=>[E.isPending,E.availableAuthMethods,E.preferredChallenge,E.toShowAuthMethods]),{handleChange:o,handleSubmit:s}=Nr(),[a,u]=F.useState(""),{components:{SignIn:{Header:c=Ls.Header,Footer:f=Ls.Footer}}}=Pr(),m=t&&t.length>1&&n,g=a.trim().length>0,v=F.useCallback(E=>{const{name:I,value:A}=E.target;I==="username"&&typeof A=="string"&&u(A),o(E)},[o]),w=()=>{if(!n)return sm();switch(n){case"EMAIL_OTP":return ame();case"SMS_OTP":return lme();case"WEB_AUTHN":return ume();default:return sm()}},S=E=>{E.preventDefault(),s(E)},C=E=>{E.preventDefault(),r()};return F.createElement(ke,null,F.createElement(c,null),F.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signin":"",method:"post",onSubmit:m?S:s,onChange:v},F.createElement(m9,null),F.createElement(Pe,{direction:"column"},F.createElement(Pe,{as:"fieldset",direction:"column",isDisabled:e},F.createElement(Ry,null,F.createElement("legend",null,sm())),F.createElement(Ko,null)),F.createElement(mr,null),F.createElement(zt,{isDisabled:e,type:"submit",variation:"primary",isLoading:e,loadingText:sme()},m?w():sm()),m&&F.createElement(zt,{onClick:C,size:"small",variation:"link",isDisabled:e||!g,title:g?void 0:dme()},cme()),F.createElement(f,null))))}const fme=()=>{const{toForgotPassword:e}=ot(t=>[t.toForgotPassword]);return F.createElement(ke,{"data-amplify-footer":""},F.createElement(zt,{onClick:e,size:"small",variation:"link"},ime()))};Ls.Footer=fme;Ls.Header=function(){return null};const{getCreateAccountText:v4,getCreatingAccountText:hme,getCreateAccountWithEmailText:pme,getCreateAccountWithPasswordText:mme,getCreateAccountWithSmsText:gme,getOrText:vme}=Sn;function bo(){const{hasValidationErrors:e,isPending:t,availableAuthMethods:n,preferredChallenge:r,selectedAuthMethod:o}=ot(A=>[A.hasValidationErrors,A.isPending,A.availableAuthMethods,A.preferredChallenge,A.selectedAuthMethod]),{handleChange:s,handleBlur:a,handleSubmit:u}=Nr(),{components:{SignUp:{Header:c=bo.Header,FormFields:f=bo.FormFields,Footer:h=bo.Footer}}}=Pr(),m=n?.filter(A=>A!=="WEB_AUTHN"),g=m&&m.length>1,v=r&&r!=="WEB_AUTHN"?r:"PASSWORD",w=m?.filter(A=>A!==v)??[],C=(o??v)!=="PASSWORD",E=A=>{switch(A){case"EMAIL_OTP":return pme();case"SMS_OTP":return gme();case"PASSWORD":return g?mme():v4();default:return v4()}},I=A=>T=>{T.preventDefault();const N=T.target.closest("form");if(N){if(!N.__authMethod){const M=document.createElement("input");M.name="__authMethod",N.appendChild(M)}N.__authMethod.type="hidden",N.__authMethod.value=A,N.requestSubmit()}};return F.createElement(ke,null,F.createElement(c,null),F.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signup":"",method:"post",onChange:s,onSubmit:u,onBlur:a},F.createElement(m9,null),F.createElement(Pe,{as:"fieldset",direction:"column",isDisabled:t},F.createElement(Pe,{direction:"column"},F.createElement(f,{includePassword:!C}),F.createElement(mr,null)),F.createElement(zt,{isDisabled:(!g||w.length==0)&&e||t,isFullWidth:!0,type:"submit",variation:"primary",isLoading:t,loadingText:hme(),onClick:I(v)},E(v)),g&&w.length>0&&F.createElement(F.Fragment,null,F.createElement(Pe,{justifyContent:"center",padding:"medium 0"},vme()),w.map(A=>F.createElement(zt,{key:A,isDisabled:t,isFullWidth:!0,type:"button",variation:"primary",onClick:I(A)},E(A)))),F.createElement(h,null))))}bo.Header=function(){return null};bo.FormFields=function(){return F.createElement(Ko,null)};bo.Footer=function(){return null};const{getSignInTabText:yme,getSignUpTabText:bme}=Sn,Sme=({className:e,hideSignUp:t,variation:n})=>{const{route:r,toSignIn:o,toSignUp:s}=ot(a=>[a.route,a.toSignIn,a.toSignUp]);return F.createElement(hr,{className:e,variation:n},t?F.createElement(ke,{"data-amplify-router-content":""},r==="signIn"&&F.createElement(Ls,null)):F.createElement(Ia.Container,{value:r,isLazy:!0,onValueChange:a=>{a!==r&&(a==="signIn"?o():s())}},F.createElement(Ia.List,{spacing:"equal",indicatorPosition:"top"},F.createElement(Ia.Item,{value:"signIn"},yme()),F.createElement(Ia.Item,{value:"signUp"},bme())),F.createElement(Ia.Panel,{value:"signIn","data-amplify-router-content":""},F.createElement(Ls,null)),F.createElement(Ia.Panel,{value:"signUp","data-amplify-router-content":""},F.createElement(bo,null))))},{getAccountRecoveryInfoText:wme,getSkipText:Cme}=Sn,Ya=({className:e,variation:t})=>{const{isPending:n}=ot(u=>[u.isPending]),{handleChange:r,handleSubmit:o}=Nr(),{components:{ConfirmVerifyUser:{Header:s=Ya.Header,Footer:a=Ya.Footer}}}=Pr();return F.createElement(hr,{className:e,variation:t},F.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmverifyuser":"",method:"post",onChange:r,onSubmit:o},F.createElement(Pe,{as:"fieldset",direction:"column",isDisabled:n},F.createElement(s,null),F.createElement(Pe,{direction:"column"},F.createElement(Ko,null)),F.createElement(mr,null),F.createElement(My,{cancelButtonText:Cme(),cancelButtonSendType:"SKIP"}),F.createElement(a,null))))};Ya.Header=function(){return F.createElement(Yn,{level:3},wme())};Ya.Footer=function(){return null};const{getSkipText:Eme,getVerifyText:_me,getVerifyContactText:xme,getAccountRecoveryInfoText:Ime}=Sn,Ame=e=>Object.entries(e).map(([t,n],r)=>{const o=vy[t].label;return F.createElement(QA,{name:"unverifiedAttr",value:t,key:t,defaultChecked:r===0},de(o),":"," ",Fae(o,n))}),Qa=({className:e,variation:t})=>{const{components:{VerifyUser:{Header:n=Qa.Header,Footer:r=Qa.Footer}}}=Pr(),{isPending:o,unverifiedUserAttributes:s}=ot(({isPending:h,unverifiedUserAttributes:m})=>[h,m]),{handleChange:a,handleSubmit:u}=Nr(),c=o?F.createElement(F.Fragment,null,"Verifying…"):F.createElement(F.Fragment,null,_me()),f=F.createElement(XA,{legend:xme(),name:"verify_context",isDisabled:o,legendHidden:!0},Ame(s));return F.createElement(hr,{className:e,variation:t},F.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-verifyuser":"",method:"post",onChange:a,onSubmit:u},F.createElement(Pe,{as:"fieldset",direction:"column",isDisabled:o},F.createElement(n,null),f,F.createElement(mr,null),F.createElement(My,{cancelButtonText:Eme(),cancelButtonSendType:"SKIP",submitButtonText:c}),F.createElement(r,null))))};Qa.Header=function(){return F.createElement(Yn,{level:3},Ime())};Qa.Footer=function(){return null};const{getChallengeText:Rme,getDeliveryMessageText:Tme,getDeliveryMethodText:Ome}=Sn,Xa=({className:e,variation:t})=>{const{isPending:n,challengeName:r,codeDeliveryDetails:o}=ot(h=>[h.isPending,h.challengeName,h.codeDeliveryDetails]),{handleChange:s,handleSubmit:a}=Nr(),{components:{ConfirmSignIn:{Header:u=Xa.Header,Footer:c=Xa.Footer}}}=Pr(),f=oR(r)&&o;return F.createElement(hr,{className:e,variation:t},F.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignin":"",method:"post",onChange:s,onSubmit:a},F.createElement(Pe,{as:"fieldset",direction:"column",isDisabled:n},F.createElement(u,null),F.createElement(Pe,{direction:"column"},f&&F.createElement(Qr,{className:"amplify-authenticator__subtitle"},Tme(o)),F.createElement(Ko,null),F.createElement(mr,null)),F.createElement(Oy,null),F.createElement(c,null))))};function Mme(){const{challengeName:e,codeDeliveryDetails:t}=ot(({challengeName:r,codeDeliveryDetails:o})=>[r,o]),n=oR(e)&&t;return F.createElement(F.Fragment,null,F.createElement(Yn,{level:3},Rme(e)),n&&F.createElement(Yn,{level:5},Ome(t)))}Xa.Header=Mme;Xa.Footer=function(){return null};const{getResendCodeText:Pme,getResetYourPasswordText:Nme}=Sn,Ja=({className:e,variation:t})=>{const{isPending:n}=ot(c=>[c.isPending]),{handleBlur:r,handleChange:o,handleSubmit:s}=Nr(),{components:{ConfirmResetPassword:{Header:a=Ja.Header,Footer:u=Ja.Footer}}}=Pr();return F.createElement(hr,{className:e,variation:t},F.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmresetpassword":"",method:"post",onSubmit:s,onChange:o,onBlur:r},F.createElement(Pe,{as:"fieldset",direction:"column",isDisabled:n},F.createElement(a,null),F.createElement(Pe,{direction:"column"},F.createElement(Ko,null)),F.createElement(mr,null),F.createElement(My,{cancelButtonSendType:"RESEND",cancelButtonText:Pme()}),F.createElement(u,null))))};Ja.Header=function(){const t=Nme();return F.createElement(Yn,{level:3},t)};Ja.Footer=function(){return null};const{getBackToSignInText:kme,getSendingText:Dme,getSendCodeText:Lme,getResetYourPasswordText:Ume}=Sn,Vi=({className:e,variation:t})=>{const{isPending:n}=ot(u=>[u.isPending]),{handleChange:r,handleSubmit:o}=Nr(),{components:{ForgotPassword:{Header:s=Vi.Header,Footer:a=Vi.Footer}}}=Pr();return F.createElement(hr,{className:e,variation:t},F.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forgotpassword":"",method:"post",onChange:r,onSubmit:o},F.createElement(Pe,{as:"fieldset",direction:"column",isDisabled:n},F.createElement(s,null),F.createElement(Pe,{direction:"column"},F.createElement(Ko,null)),F.createElement(mr,null),F.createElement(My,{cancelButtonText:kme(),cancelButtonSendType:"SIGN_IN",submitButtonText:n?F.createElement(F.Fragment,null,Dme(),"…"):F.createElement(F.Fragment,null,Lme())}),F.createElement(a,null))))};Vi.Header=function(){return F.createElement(Yn,{level:3},Ume())};Vi.Footer=function(){return null};const{getMfaTypeLabelByValue:$me,getSelectMfaTypeByChallengeName:Fme,getSelectMfaTypeText:zme}=Sn,Wi=({className:e,variation:t})=>{const{isPending:n,allowedMfaTypes:r=[]}=ot(c=>[c.isPending,c.allowedMfaTypes]),{handleChange:o,handleSubmit:s}=Nr(),{components:{SelectMfaType:{Header:a=Wi.Header,Footer:u=Wi.Footer}}}=Pr();return _.createElement(hr,{className:e,variation:t},_.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-select-mfa-type":"",method:"post",onChange:o,onSubmit:s},_.createElement(Pe,{as:"fieldset",direction:"column",isDisabled:n},_.createElement(a,null),_.createElement(Pe,{direction:"column"},_.createElement(XA,{name:"mfa_type",legend:zme(),legendHidden:!0,isDisabled:n,isRequired:!0},r.map((c,f)=>_.createElement(QA,{name:"mfa_type",key:c,value:c,defaultChecked:f===0},$me(c)))),_.createElement(mr,null)),_.createElement(Oy,null),_.createElement(u,null))))};Wi.Header=function(){const{challengeName:t}=ot(n=>[n.challengeName]);return _.createElement(Yn,{level:3},Fme(t))};Wi.Footer=function(){return null};const{getSetupEmailText:jme}=Sn,Gi=({className:e,variation:t})=>{const{isPending:n}=ot(u=>[u.isPending]),{handleChange:r,handleSubmit:o}=Nr(),{components:{SetupEmail:{Header:s=Gi.Header,Footer:a=Gi.Footer}}}=Pr();return _.createElement(hr,{className:e,variation:t},_.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-email":"",method:"post",onChange:r,onSubmit:o},_.createElement(Pe,{as:"fieldset",direction:"column",isDisabled:n},_.createElement(s,null),_.createElement(Pe,{direction:"column"},_.createElement(Ko,null),_.createElement(mr,null)),_.createElement(Oy,null),_.createElement(a,null))))};Gi.Header=function(){return _.createElement(Yn,{level:3},jme())};Gi.Footer=function(){return null};const{getSignInWithPasswordText:ax,getSignInWithEmailText:Bme,getSignInWithSmsText:Hme,getSignInWithPasskeyText:qme,getSigningInText:Vme,getBackToSignInText:Wme,getOrText:Gme,getUsernameLabelByLoginMechanism:Kme}=Sn,Zme=e=>{switch(e){case"EMAIL_OTP":return Bme();case"SMS_OTP":return Hme();case"WEB_AUTHN":return qme();case"PASSWORD":return ax();default:return ax()}},Yme=({className:e,variation:t})=>{const{isPending:n,username:r,availableAuthMethods:o,toSignIn:s,selectAuthMethod:a,loginMechanism:u}=ot(S=>[S.isPending,S.username,S.availableAuthMethods,S.toSignIn,S.selectAuthMethod,S.loginMechanism]),{handleChange:c,handleSubmit:f}=Nr(),h=o??[],m=h.includes("PASSWORD"),g=h.filter(S=>S!=="PASSWORD"),v=S=>{a({method:S})},w=Kme(u);return F.createElement(hr,{className:e,variation:t},F.createElement("form",{"data-amplify-form":!0,"data-amplify-authenticator-signinselect":!0,method:"post",onSubmit:f,onChange:c},F.createElement(Pe,{direction:"column"},F.createElement(fh,{label:w,name:"username",value:r,isReadOnly:!0,isDisabled:!0}),m&&F.createElement(F.Fragment,null,F.createElement(YA,{label:"Password",name:"password",autoComplete:"current-password",isDisabled:n}),F.createElement(zt,{isDisabled:n,type:"submit",variation:"primary",isFullWidth:!0,isLoading:n,loadingText:Vme()},ax())),m&&g.length>0&&F.createElement(ZA,{label:Gme()}),g.length>0&&F.createElement(Pe,{direction:"column",gap:"0.5rem"},g.map(S=>F.createElement(zt,{key:S,variation:"primary",isFullWidth:!0,isDisabled:n,onClick:()=>v(S)},Zme(S)))),F.createElement(mr,null),F.createElement(zt,{onClick:s,size:"small",variation:"link",isDisabled:n},Wme()))))},Qme=e=>{const{className:t,...n}=e;return _.createElement(ke,{as:"span",width:"1em",height:"1em",className:Ne(re.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"})))},Xme=e=>{const{className:t,...n}=e;return _.createElement(ke,{as:"span",width:"1em",height:"1em",className:Ne(re.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:Jme,getPasskeyPromptDescriptionText:ege,getCreatePasskeyText:tge,getRegisteringText:nge,getContinueWithoutPasskeyText:rge,getPasskeyCreatedSuccessText:oge,getPasskeyRegisteredText:sge,getPasskeyRegistrationFailedText:ige,getPasskeyLabelText:age,getExistingPasskeysText:lge,getSetupAnotherPasskeyText:uge,getContinueText:cge}=Sn;function dge({className:e,variation:t}){const[n,r]=F.useState(!1),[o,s]=F.useState(null),[a,u]=F.useState(!1),[c,f]=F.useState([]),{submitForm:h,isPending:m}=ot(E=>[E.submitForm,E.isPending]),g=F.useCallback(async()=>{try{const E=await RA();f(E.credentials||[])}catch{}},[]);F.useEffect(()=>{n&&g()},[n,g]);const v=F.useCallback(()=>{h({type:"SKIP"})},[h]),w=F.useCallback(()=>{h({type:"SUBMIT"})},[h]),S=F.useCallback(async()=>{try{s(null),u(!0),await iae(),r(!0)}catch(E){const I=E,A=I.name??"",T=I.message??"";if(A==="PasskeyRegistrationCanceled"||A==="NotAllowedError"||T.includes("canceled")||T.includes("cancelled")||T.includes("ceremony has been canceled")||T.includes("not allowed")){v();return}s(ige())}finally{u(!1)}},[v]);if(n)return F.createElement(hr,{className:e,variation:t},F.createElement(Pe,{direction:"column",padding:"large","data-amplify-authenticator-passkeyprompt":""},F.createElement(Pe,{direction:"column",gap:"xs"},F.createElement(Qme,{className:"amplify-authenticator__passkey-success-icon"}),F.createElement(Yn,{level:4},oge()),F.createElement(Qr,null,sge())),c.length>0&&F.createElement(ke,{marginTop:"large"},F.createElement(Yn,{level:5},lge()),F.createElement(Pe,{direction:"column",gap:"xs",marginTop:"xs"},c.map((E,I)=>F.createElement(ke,{key:E.credentialId,className:"amplify-authenticator__passkey-credential-item"},F.createElement(Qr,{fontSize:"small"},E.friendlyCredentialName??`${age()} ${I+1}`))))),F.createElement(Pe,{direction:"column",gap:"medium",marginTop:"large"},F.createElement(zt,{onClick:()=>{r(!1),S()},variation:"link"},uge()),F.createElement(zt,{onClick:()=>w(),variation:"primary",isFullWidth:!0},cge()))));const C=m||a;return F.createElement(hr,{className:e,variation:t},F.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-passkeyprompt":""},F.createElement(Pe,{direction:"column",gap:"medium"},F.createElement(Yn,{level:4},Jme()),F.createElement(Qr,null,ege()),F.createElement(Pe,{justifyContent:"center"},F.createElement(Xme,{className:"amplify-authenticator__passkey-icon"})),F.createElement(Pe,{direction:"column",gap:"medium"},F.createElement(zt,{onClick:()=>{S()},variation:"primary",isDisabled:C,isLoading:a,loadingText:nge()},tge()),F.createElement(zt,{onClick:v,variation:"link",isDisabled:C},rge()),o&&F.createElement(Qr,{className:"amplify-authenticator__passkey-error"},o),F.createElement(mr,null)))))}function y4(){return null}const fge=e=>{switch(e){case"authenticated":case"idle":case"setup":case"transition":return y4;case"confirmSignUp":return Za;case"confirmSignIn":return Xa;case"selectMfaType":return Wi;case"setupEmail":return Gi;case"setupTotp":return qi;case"signIn":case"signUp":return Sme;case"signInSelectAuthFactor":return Yme;case"passkeyPrompt":return dge;case"forceNewPassword":return yo;case"forgotPassword":return Vi;case"confirmResetPassword":return Ja;case"verifyUser":return Qa;case"confirmVerifyUser":return Ya;default:return console.warn(`Unhandled Authenticator route - please open an issue: ${e}`),y4}};function hge({className:e,hideSignUp:t,variation:n}){const{route:r}=ot(({route:s})=>[s]),o=_.useMemo(()=>fge(r),[r]);return F.createElement(o,{className:e,hideSignUp:Hpe(r)?t:void 0,variation:n})}const pge={Header:()=>null,SignIn:{Header:Ls.Header,Footer:Ls.Footer},SignUp:{Header:bo.Header,FormFields:bo.FormFields,Footer:bo.Footer},ConfirmSignUp:{Header:Za.Header,Footer:Za.Footer},SelectMfaType:{Header:Wi.Header,Footer:Wi.Footer},SetupEmail:{Header:Gi.Header,Footer:Gi.Footer},SetupTotp:{Header:qi.Header,Footer:qi.Footer},ConfirmResetPassword:{Header:Ja.Header,Footer:Ja.Footer},ConfirmSignIn:{Header:Xa.Header,Footer:Xa.Footer},VerifyUser:{Header:Qa.Header,Footer:Qa.Footer},ConfirmVerifyUser:{Header:Ya.Header,Footer:Ya.Footer},ForceNewPassword:{Header:yo.Header,Footer:yo.Footer,FormFields:yo.FormFields},ForgotPassword:{Header:Vi.Header,Footer:Vi.Footer},Footer:()=>null};function mge({children:e,className:t,components:n,formFields:r,hideSignUp:o,initialState:s,loginMechanisms:a,passwordSettings:u,passwordless:c,signUpAttributes:f,services:h,socialProviders:m,variation:g}){upe({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:w,user:S}=ot(({route:I,signOut:A,user:T})=>[I,A,T]);zfe({initialState:s,loginMechanisms:a,passwordSettings:u,passwordless:c,services:h,signUpAttributes:f,socialProviders:m,formFields:r});const C=_.useMemo(()=>({components:{...pge,...n}}),[n]);return v==="authenticated"||v==="signOut"?e?_.createElement(_.Fragment,null,ks(e)?e({signOut:w,user:S}):e):null:_.createElement(u9.Provider,{value:C},_.createElement(hge,{className:t,hideSignUp:o,variation:g}))}function Zo(e){return Bfe({componentName:"Authenticator",packageName:"react",version:lpe}),_.createElement(Vz,null,_.createElement(mge,{...e}))}Zo.Provider=Vz;Zo.ForgotPassword=Vi;Zo.SetupTotp=qi;Zo.SignIn=Ls;Zo.SignUp=bo;Zo.ForceNewPassword=yo;Zo.SelectMfaType=Wi;Zo.SetupEmail=Gi;const g9=({cssText:e,...t})=>e===void 0||/<\/style/i.test(e)?null:_.createElement("style",{...t,dangerouslySetInnerHTML:{__html:e}});g9.displayName="Style";const v9=({theme:e,...t})=>{if(!e)return null;const{name:n,cssText:r}=e;return _.createElement(g9,{...t,cssText:r,id:`amplify-theme-${n}`})};v9.displayName="ThemeStyle";function gge({children:e,colorMode:t,direction:n="ltr",nonce:r,theme:o}){const s=_.useMemo(()=>({theme:Ey(o),colorMode:t}),[o,t]);return _.createElement(Wz.Provider,{value:s},_.createElement(Fhe,{dir:n},_.createElement("div",{"data-amplify-theme":s.theme.name,"data-amplify-color-mode":t,dir:n},e),o?_.createElement(v9,{theme:s.theme,nonce:r}):null))}const vge=({configured:e,authStatus:t})=>t==="authenticated",yge=e=>e?e.signInDetails?.loginId??e.username??null:null,bge=({children:e,fallback:t=null})=>{const{authStatus:n,signOut:r,user:o}=ot(s=>[s.authStatus,s.signOut,s.user]);return vge({configured:!0,authStatus:n})?O.jsx(O.Fragment,{children:e({email:yge(o),signOut:()=>r()})}):O.jsx(O.Fragment,{children:t})},Sge=({children:e,fallback:t=null})=>Vv()?O.jsx(bge,{fallback:t,children:e}):O.jsx(O.Fragment,{children:t}),b4='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',qs=e=>`var(${e})`,Wt=qs("--accent"),wge=qs("--accent-hover"),S4=qs("--accent-soft"),Pd=qs("--accent-fg"),w4=qs("--surface"),cu=qs("--fg"),Cge=qs("--surface-sunken"),im=qs("--fg-muted"),Nd=qs("--line"),Ege=Ey({name:"remit",tokens:{colors:{brand:{primary:{10:{value:S4},20:{value:S4},40:{value:Wt},60:{value:Wt},80:{value:Wt},90:{value:Wt},100:{value:Wt}}},background:{primary:{value:w4},secondary:{value:Cge}},font:{primary:{value:cu},secondary:{value:im},tertiary:{value:im},interactive:{value:Wt},inverse:{value:Pd},hover:{value:Wt},focus:{value:Wt},active:{value:Wt}},border:{primary:{value:Nd},secondary:{value:Nd},focus:{value:Wt}}},fonts:{default:{variable:{value:b4},static:{value:b4}}},radii:{small:{value:"3px"},medium:{value:"5px"},large:{value:"7px"}},components:{authenticator:{router:{borderColor:{value:Nd},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:w4}},form:{padding:{value:"1.75rem"}},orContainer:{color:{value:im}}},button:{color:{value:cu},primary:{backgroundColor:{value:Wt},color:{value:Pd},_hover:{backgroundColor:{value:wge},color:{value:Pd}},_focus:{backgroundColor:{value:Wt},color:{value:Pd}},_active:{backgroundColor:{value:Wt},color:{value:Pd}}},link:{color:{value:Wt},_hover:{color:{value:Wt},backgroundColor:{value:"transparent"}},_focus:{color:{value:Wt},backgroundColor:{value:"transparent"}},_active:{color:{value:Wt},backgroundColor:{value:"transparent"}}}},fieldcontrol:{color:{value:cu},borderColor:{value:Nd},_focus:{borderColor:{value:Wt},boxShadow:{value:`0 0 0 2px ${Wt}`}}},field:{label:{color:{value:cu}}},tabs:{borderColor:{value:Nd},item:{color:{value:im},backgroundColor:{value:"transparent"},_active:{color:{value:Wt},borderColor:{value:Wt},backgroundColor:{value:"transparent"}},_hover:{color:{value:Wt}},_focus:{color:{value:Wt}}}},heading:{color:{value:cu}},text:{color:{value:cu}}}}}),_ge={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"}}},xge=()=>O.jsx(Yr,{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:O.jsxs("span",{className:"flex items-center gap-2",children:[O.jsx("strong",{className:"font-semibold shrink-0",children:"Local dev"}),O.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."}),O.jsx("span",{className:"truncate sm:hidden",children:"— no Cognito; signed out"})]})}),Ige=()=>O.jsx(iA,{note:uA({betterAuthEnabled:!1,cognitoConfigured:Vv()})}),Age=({children:e})=>{const{authStatus:t}=ot(n=>[n.authStatus]);return t==="authenticated"?O.jsx(O.Fragment,{children:e}):t==="configuring"?O.jsx(Qv,{}):O.jsx(gge,{theme:Ege,children:O.jsxs(Zv,{children:[O.jsx(Yv,{}),O.jsx(Zo,{hideSignUp:!1,formFields:_ge,components:{Footer:Ige}})]})})},Rge=({children:e})=>Vv()?O.jsx(Zo.Provider,{children:O.jsx(Age,{children:e})}):O.jsxs("div",{className:"pt-7 sm:pt-10 [&_#main-content]:h-[calc(100dvh-1.75rem)] sm:[&_#main-content]:h-[calc(100dvh-2.5rem)]",children:[O.jsx(xge,{}),e]}),y9=60;let Lu=null;const b9=()=>Math.floor(Date.now()/1e3),Tge=e=>e!==null&&e.expiresAt-y9>b9(),Oge=async()=>{const t=(await zv()).tokens?.idToken;return t?(Lu={value:t.toString(),expiresAt:t.payload.exp??b9()+y9},Lu.value):(Lu=null,null)},Mge=async()=>Vv()?Tge(Lu)?Lu.value:Oge():null,Pge=()=>{Lu=null},Fg={configure:f$,getToken:Mge,resetToken:Pge,Shell:Rge,Account:Sge},Nge=({children:e})=>Wv()?O.jsx(Pg.Shell,{children:e}):O.jsx(Fg.Shell,{children:e}),kge=e=>Wv()?O.jsx(Pg.Account,{...e}):O.jsx(Fg.Account,{...e}),Dge={configure:f$,getToken:()=>Wv()?Pg.getToken():Fg.getToken(),resetToken:()=>{Pg.resetToken(),Fg.resetToken()},Shell:Nge,Account:kge};var Cc=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(){}},Lge=class extends Cc{#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"}},sR=new Lge,Uge={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},$ge=class{#e=Uge;#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)}},Ta=new $ge;function Fge(e){setTimeout(e,0)}var zge=typeof window>"u"||"Deno"in globalThis;function Wn(){}function jge(e,t){return typeof e=="function"?e(t):e}function lx(e){return typeof e=="number"&&e>=0&&e!==1/0}function S9(e,t){return Math.max(e+(t||0)-Date.now(),0)}function $i(e,t){return typeof e=="function"?e(t):e}function Rr(e,t){return typeof e=="function"?e(t):e}function C4(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:u}=e;if(a){if(r){if(t.queryHash!==iR(a,t.options))return!1}else if(!Tf(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||o&&o!==t.state.fetchStatus||s&&!s(t))}function E4(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(el(t.options.mutationKey)!==el(s))return!1}else if(!Tf(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function iR(e,t){return(t?.queryKeyHashFn||el)(e)}function el(e){return JSON.stringify(e,(t,n)=>ux(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Tf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Tf(e[n],t[n])):!1}var Bge=Object.prototype.hasOwnProperty;function w9(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=_4(e)&&_4(t);if(!r&&!(ux(e)&&ux(t)))return t;const s=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),u=a.length,c=r?new Array(u):{};let f=0;for(let h=0;h<u;h++){const m=r?h:a[h],g=e[m],v=t[m];if(g===v){c[m]=g,(r?h<s:Bge.call(e,m))&&f++;continue}if(g===null||v===null||typeof g!="object"||typeof v!="object"){c[m]=v;continue}const w=w9(g,v,n+1);c[m]=w,w===g&&f++}return s===u&&f===s?e:c}function zg(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 _4(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ux(e){if(!x4(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!x4(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function x4(e){return Object.prototype.toString.call(e)==="[object Object]"}function Hge(e){return new Promise(t=>{Ta.setTimeout(t,e)})}function cx(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?w9(e,t):t}function qge(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Vge(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var aR=Symbol();function C9(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===aR?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function lR(e,t){return typeof e=="function"?e(...t):!!e}function Wge(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 Of=(()=>{let e=()=>zge;return{isServer(){return e()},setIsServer(t){e=t}}})();function dx(){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 Gge=Fge;function Kge(){let e=[],t=0,n=u=>{u()},r=u=>{u()},o=Gge;const s=u=>{t?e.push(u):o(()=>{n(u)})},a=()=>{const u=e;e=[],u.length&&o(()=>{r(()=>{u.forEach(c=>{n(c)})})})};return{batch:u=>{let c;t++;try{c=u()}finally{t--,t||a()}return c},batchCalls:u=>(...c)=>{s(()=>{u(...c)})},schedule:s,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{o=u}}}var bn=Kge(),Zge=class extends Cc{#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}},jg=new Zge;function Yge(e){return Math.min(1e3*2**e,3e4)}function E9(e){return(e??"online")==="online"?jg.isOnline():!0}var fx=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function _9(e){let t=!1,n=0,r;const o=dx(),s=()=>o.status!=="pending",a=S=>{if(!s()){const C=new fx(S);g(C),e.onCancel?.(C)}},u=()=>{t=!0},c=()=>{t=!1},f=()=>sR.isFocused()&&(e.networkMode==="always"||jg.isOnline())&&e.canRun(),h=()=>E9(e.networkMode)&&e.canRun(),m=S=>{s()||(r?.(),o.resolve(S))},g=S=>{s()||(r?.(),o.reject(S))},v=()=>new Promise(S=>{r=C=>{(s()||f())&&S(C)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),w=()=>{if(s())return;let S;const C=n===0?e.initialPromise:void 0;try{S=C??e.fn()}catch(E){S=Promise.reject(E)}Promise.resolve(S).then(m).catch(E=>{if(s())return;const I=e.retry??(Of.isServer()?0:3),A=e.retryDelay??Yge,T=typeof A=="function"?A(n,E):A,N=I===!0||typeof I=="number"&&n<I||typeof I=="function"&&I(n,E);if(t||!N){g(E);return}n++,e.onFail?.(n,E),Hge(T).then(()=>f()?void 0:v()).then(()=>{t?g(E):w()})})};return{promise:o,status:()=>o.status,cancel:a,continue:()=>(r?.(),o),cancelRetry:u,continueRetry:c,canStart:h,start:()=>(h()?w():v().then(w),o)}}var x9=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lx(this.gcTime)&&(this.#e=Ta.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Of.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Ta.clearTimeout(this.#e),this.#e=void 0)}};function Qge(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 u={pages:[],pageParams:[]},c=0;const f=async()=>{let h=!1;const m=w=>{Wge(w,()=>t.signal,()=>h=!0)},g=C9(t.options,t.fetchOptions),v=async(w,S,C)=>{if(h)return Promise.reject(t.signal.reason);if(S==null&&w.pages.length)return Promise.resolve(w);const I=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:S,direction:C?"backward":"forward",meta:t.options.meta};return m(M),M})(),A=await g(I),{maxPages:T}=t.options,N=C?Vge:qge;return{pages:N(w.pages,A,T),pageParams:N(w.pageParams,S,T)}};if(o&&s.length){const w=o==="backward",S=w?I9:hx,C={pages:s,pageParams:a},E=S(r,C);u=await v(C,E,w)}else{const w=e??s.length;do{const S=c===0?a[0]??r.initialPageParam:hx(r,u);if(c>0&&S==null)break;u=await v(u,S),c++}while(c<w)}return u};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 hx(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 I9(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function m5e(e,t){return t?hx(e,t)!=null:!1}function g5e(e,t){return!t||!e.getPreviousPageParam?!1:I9(e,t)!=null}var Xge=class extends x9{#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=A4(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=A4(this.options);t.data!==void 0&&(this.setState(I4(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=cx(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(Wn).catch(Wn):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=>Rr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===aR||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>$i(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:!S9(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.#c()?this.#o.cancel({revert:!0}):this.#o.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){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 c=this.observers.find(f=>f.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},o=()=>{const c=C9(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(c,h,this):c(h)},a=(()=>{const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return r(c),c})();(this.#e==="infinite"?Qge(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=_9({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:c=>{c instanceof fx&&c.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(c,f)=>{this.#l({type:"failed",failureCount:c,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 c=await this.#o.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#r.config.onSuccess?.(c,this),this.#r.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof fx){if(c.silent)return this.#o.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#l({type:"error",error:c}),this.#r.config.onError?.(c,this),this.#r.config.onSettled?.(this.state.data,c,this),c}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,...A9(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...I4(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),bn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function A9(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:E9(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function I4(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function A4(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 Jge=class extends Cc{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#a=dx(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#s;#o;#a;#i;#c;#l;#p;#d;#f;#u;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),R4(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return px(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return px(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#w(),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 Rr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#C(),this.#t.setOptions(this.options),t._defaulted&&!zg(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&T4(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Rr(this.options.enabled,this.#t)!==Rr(t.enabled,this.#t)||$i(this.options.staleTime,this.#t)!==$i(t.staleTime,this.#t))&&this.#g();const o=this.#v();r&&(this.#t!==n||Rr(this.options.enabled,this.#t)!==Rr(t.enabled,this.#t)||o!==this.#u)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return tve(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.#C();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Wn)),t}#g(){this.#S();const e=$i(this.options.staleTime,this.#t);if(Of.isServer()||this.#r.isStale||!lx(e))return;const n=S9(this.#r.dataUpdatedAt,e)+1;this.#d=Ta.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.#w(),this.#u=e,!(Of.isServer()||Rr(this.options.enabled,this.#t)===!1||!lx(this.#u)||this.#u===0)&&(this.#f=Ta.setInterval(()=>{(this.options.refetchIntervalInBackground||sR.isFocused())&&this.#h()},this.#u))}#b(){this.#g(),this.#y(this.#v())}#S(){this.#d!==void 0&&(Ta.clearTimeout(this.#d),this.#d=void 0)}#w(){this.#f!==void 0&&(Ta.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,c=e!==n?e.state:this.#n,{state:f}=e;let h={...f},m=!1,g;if(t._optimisticResults){const k=this.hasListeners(),L=!k&&R4(e,t),q=k&&T4(e,n,t,r);(L||q)&&(h={...h,...A9(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:v,errorUpdatedAt:w,status:S}=h;g=h.data;let C=!1;if(t.placeholderData!==void 0&&g===void 0&&S==="pending"){let k;o?.isPlaceholderData&&t.placeholderData===a?.placeholderData?(k=o.data,C=!0):k=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,k!==void 0&&(S="success",g=cx(o?.data,k,t),m=!0)}if(t.select&&g!==void 0&&!C)if(o&&g===s?.data&&t.select===this.#c)g=this.#l;else try{this.#c=t.select,g=t.select(g),g=cx(o?.data,g,t),this.#l=g,this.#i=null}catch(k){this.#i=k}this.#i&&(v=this.#i,g=this.#l,w=Date.now(),S="error");const E=h.fetchStatus==="fetching",I=S==="pending",A=S==="error",T=I&&E,N=g!==void 0,R={status:S,fetchStatus:h.fetchStatus,isPending:I,isSuccess:S==="success",isError:A,isInitialLoading:T,isLoading:T,data:g,dataUpdatedAt:h.dataUpdatedAt,error:v,errorUpdatedAt:w,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:E,isRefetching:E&&!I,isLoadingError:A&&!N,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&N,isStale:uR(e,t),refetch:this.refetch,promise:this.#a,isEnabled:Rr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const k=R.data!==void 0,L=R.status==="error"&&!k,q=j=>{L?j.reject(R.error):k&&j.resolve(R.data)},$=()=>{const j=this.#a=R.promise=dx();q(j)},D=this.#a;switch(D.status){case"pending":e.queryHash===n.queryHash&&q(D);break;case"fulfilled":(L||R.data!==D.value)&&$();break;case"rejected":(!L||R.error!==D.reason)&&$();break}}return R}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),zg(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 u=a;return this.#r[u]!==e[u]&&s.has(u)})};this.#E({listeners:n()})}#C(){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){bn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function eve(e,t){return Rr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Rr(t.retryOnMount,e)===!1)}function R4(e,t){return eve(e,t)||e.state.data!==void 0&&px(e,t,t.refetchOnMount)}function px(e,t,n){if(Rr(t.enabled,e)!==!1&&$i(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&uR(e,t)}return!1}function T4(e,t,n,r){return(e!==t||Rr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&uR(e,n)}function uR(e,t){return Rr(t.enabled,e)!==!1&&e.isStaleByTime($i(t.staleTime,e))}function tve(e,t){return!zg(e.getCurrentResult(),t)}var nve=class extends x9{#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||R9(),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=_9({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),bn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function R9(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var T9=class extends Cc{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 nve({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=am(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=am(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=am(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=am(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){bn.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=>E4(t,n))}findAll(e={}){return this.getAll().filter(t=>E4(e,t))}notify(e){bn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return bn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Wn))))}};function am(e){return e.options.scope?.id}var rve=class extends Cc{#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),zg(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&el(n.mutationKey)!==el(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??R9();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){bn.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)})})}},O9=class extends Cc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??iR(r,t);let s=this.get(o);return s||(s=new Xge({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(){bn.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=>C4(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>C4(e,n)):t}notify(e){bn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){bn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){bn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ove=class{#e;#t;#n;#r;#s;#o;#a;#i;constructor(e={}){this.#e=e.queryCache||new O9,this.#t=e.mutationCache||new T9,this.#n=e.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=sR.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=jg.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($i(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=jge(t,s);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return bn.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;bn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return bn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=bn.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Wn).catch(Wn)}invalidateQueries(e,t={}){return bn.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=bn.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(Wn)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Wn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime($i(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Wn).catch(Wn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Wn).catch(Wn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return jg.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(el(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Tf(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#s.set(el(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{Tf(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=iR(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===aR&&(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()}},M9=_.createContext(void 0),hl=e=>{const t=_.useContext(M9);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},sve=({client:e,children:t})=>(_.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),O.jsx(M9.Provider,{value:e,children:t})),P9=_.createContext(!1),ive=()=>_.useContext(P9);P9.Provider;function ave(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var lve=_.createContext(ave()),uve=()=>_.useContext(lve),cve=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?lR(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},dve=e=>{_.useEffect(()=>{e.clearReset()},[e])},fve=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||lR(n,[e.error,r])),hve=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))}},pve=(e,t)=>e.isLoading&&e.isFetching&&!t,mve=(e,t)=>e?.suspense&&t.isPending,O4=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function gve(e,t,n){const r=ive(),o=uve(),s=hl(),a=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const u=s.getQueryCache().get(a.queryHash),c=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,hve(a),cve(a,o,u),dve(o);const f=!s.getQueryCache().get(a.queryHash),[h]=_.useState(()=>new t(s,a)),m=h.getOptimisticResult(a),g=!r&&c;if(_.useSyncExternalStore(_.useCallback(v=>{const w=g?h.subscribe(bn.batchCalls(v)):Wn;return h.updateResult(),w},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),_.useEffect(()=>{h.setOptions(a)},[a,h]),mve(a,m))throw O4(a,h,o);if(fve({result:m,errorResetBoundary:o,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw m.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(a,m),a.experimental_prefetchInRender&&!Of.isServer()&&pve(m,r)&&(f?O4(a,h,o):u?.promise)?.catch(Wn).finally(()=>{h.updateResult()}),a.notifyOnChangeProps?m:h.trackResult(m)}function tl(e,t){return gve(e,Jge)}function cR(e,t){const n=hl(),[r]=_.useState(()=>new rve(n,e));_.useEffect(()=>{r.setOptions(e)},[r,e]);const o=_.useSyncExternalStore(_.useCallback(a=>r.subscribe(bn.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=_.useCallback((a,u)=>{r.mutate(a,u).catch(Wn)},[r]);if(o.error&&lR(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const vve="modulepreload",yve=function(e){return"/"+e},M4={},xe=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let c=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]"),u=a?.nonce||a?.getAttribute("nonce");o=c(n.map(f=>{if(f=yve(f),f in M4)return;M4[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":vve,h||(g.as="script"),g.crossOrigin="",g.href=f,u&&g.setAttribute("nonce",u),document.head.appendChild(g),h)return new Promise((v,w)=>{g.addEventListener("load",v),g.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${f}`)))})}))}function s(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return o.then(a=>{for(const u of a||[])u.status==="rejected"&&s(u.reason);return t().catch(s)})};var P4=_.use,Iu=typeof window<"u"?_.useLayoutEffect:_.useEffect;function xE(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 bve(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 Sve(e){const t=_.useRef(null);return _.useImperativeHandle(e,()=>t.current,[]),t}const N9=!1;function Mf(e){return e[e.length-1]}function wve(e){return typeof e=="function"}function Oa(e,t){return wve(e)?e(t):e}const k9=Object.prototype.hasOwnProperty,N4=Object.prototype.propertyIsEnumerable;function D9(e){for(const t in e)if(k9.call(e,t))return!0;return!1}const Cve=()=>Object.create(null),_a=(e,t)=>Ma(e,t,Cve);function Ma(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const o=t,s=L4(e)&&L4(o);if(!s&&!(Bg(e)&&Bg(o)))return o;const a=s?e:k4(e);if(!a)return o;const u=s?o:k4(o);if(!u)return o;const c=a.length,f=u.length,h=s?new Array(f):n();let m=0;for(let g=0;g<f;g++){const v=s?g:u[g],w=e[v],S=o[v];if(w===S){h[v]=w,(s?g<c:k9.call(e,v))&&m++;continue}if(w===null||S===null||typeof w!="object"||typeof S!="object"){h[v]=S;continue}const C=Ma(w,S,n,r+1);h[v]=C,C===w&&m++}return c===f&&m===c?e:h}function k4(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!N4.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(!N4.call(e,o))return!1;r.push(o)}return r}function Bg(e){if(!D4(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!D4(n)||!n.hasOwnProperty("isPrototypeOf"))}function D4(e){return Object.prototype.toString.call(e)==="[object Object]"}function L4(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function $a(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(!$a(e[r],t[r],n))return!1;return!0}if(Bg(e)&&Bg(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in t)if((!r||t[a]!==void 0)&&!$a(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||!$a(e[a],t[a],n)))return!1;return o===s}return!1}function Ku(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 Eve(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 Pf(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}const _ve=/[\x00-\x1f\x7f"<>`{}]/g;function xve(e){return e.replace(_ve,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function U4(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 xve(t)}const Ive=["http:","https:","mailto:","tel:"];function Hg(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function kd(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+=U4(e.slice(n,o.index))+o[0],n=t.lastIndex;r=r+U4(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function Ave(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Rve(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 Ts(){throw new Error("Invariant failed")}function Nf(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 c=n;t.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const u=t.get(s);if(u)u.value=a,o(u);else{const c={key:s,value:a,prev:r};r&&(r.next=c),r=c,n||(n=c),t.set(s,c)}},clear(){t.clear(),n=void 0,r=void 0}}}const ki=4,L9=5;function Tve(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 U9(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 u=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=u,n[4]=u,n[5]=u,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=Tve(s);if(a){const[u,c]=a,f=s.charCodeAt(u+1);if(f===45){if(u+2<s.length&&s.charCodeAt(u+2)===36){const h=u+3,m=c;if(h<m)return n[0]=3,n[1]=t+u,n[2]=t+h,n[3]=t+m,n[4]=t+c+1,n[5]=o,n}}else if(f===36){const h=u+1,m=u+2;return m===c?(n[0]=2,n[1]=t+u,n[2]=t+h,n[3]=t+m,n[4]=t+c+1,n[5]=e.length,n):(n[0]=1,n[1]=t+u,n[2]=t+m,n[3]=t+c,n[4]=t+c+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 Py(e,t,n,r,o,s,a){a?.(n);let u=r;{const c=n.fullPath??n.from,f=c.length,h=n.options?.caseSensitive??e,m=n.options?.params?.parse??n.options?.parseParams;for(;u<f;){const v=U9(c,u,t);let w;const S=u,C=v[5];switch(u=C+1,s++,v[0]){case 0:{const E=c.substring(v[2],v[3]);if(h){const I=o.static?.get(E);if(I)w=I;else{o.static??=new Map;const A=Pa(n.fullPath??n.from);A.parent=o,A.depth=s,w=A,o.static.set(E,A)}}else{const I=E.toLowerCase(),A=o.staticInsensitive?.get(I);if(A)w=A;else{o.staticInsensitive??=new Map;const T=Pa(n.fullPath??n.from);T.parent=o,T.depth=s,w=T,o.staticInsensitive.set(I,T)}}break}case 1:{const E=c.substring(S,v[1]),I=c.substring(v[4],C),A=h&&!!(E||I),T=E?A?E:E.toLowerCase():void 0,N=I?A?I:I.toLowerCase():void 0,M=!m&&o.dynamic?.find(R=>!R.parse&&R.caseSensitive===A&&R.prefix===T&&R.suffix===N);if(M)w=M;else{const R=AE(1,n.fullPath??n.from,A,T,N);w=R,R.depth=s,R.parent=o,o.dynamic??=[],o.dynamic.push(R)}break}case 3:{const E=c.substring(S,v[1]),I=c.substring(v[4],C),A=h&&!!(E||I),T=E?A?E:E.toLowerCase():void 0,N=I?A?I:I.toLowerCase():void 0,M=!m&&o.optional?.find(R=>!R.parse&&R.caseSensitive===A&&R.prefix===T&&R.suffix===N);if(M)w=M;else{const R=AE(3,n.fullPath??n.from,A,T,N);w=R,R.parent=o,R.depth=s,o.optional??=[],o.optional.push(R)}break}case 2:{const E=c.substring(S,v[1]),I=c.substring(v[4],C),A=h&&!!(E||I),T=E?A?E:E.toLowerCase():void 0,N=I?A?I:I.toLowerCase():void 0,M=AE(2,n.fullPath??n.from,A,T,N);w=M,M.parent=o,M.depth=s,o.wildcard??=[],o.wildcard.push(M)}}o=w}if(m&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const v=Pa(n.fullPath??n.from);v.kind=L9,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&&c.endsWith("/")){const v=Pa(n.fullPath??n.from);v.kind=ki,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 c of n.children)Py(e,t,c,u,o,s,a)}function IE(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 Ri(e){if(e.pathless)for(const t of e.pathless)Ri(t);if(e.static)for(const t of e.static.values())Ri(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Ri(t);if(e.dynamic?.length){e.dynamic.sort(IE);for(const t of e.dynamic)Ri(t)}if(e.optional?.length){e.optional.sort(IE);for(const t of e.optional)Ri(t)}if(e.wildcard?.length){e.wildcard.sort(IE);for(const t of e.wildcard)Ri(t)}}function Pa(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 AE(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 Ove(e,t){const n=Pa("/"),r=new Uint16Array(6);for(const o of e)Py(!1,r,o,1,n,0);Ri(n),t.masksTree=n,t.flatCache=Nf(1e3)}function Mve(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=dR(e,t.masksTree);return t.flatCache.set(e,r),r}function Pve(e,t,n,r,o){e||="/",r||="/";const s=t?`case\0${e}`:e;let a=o.singleCache.get(s);return a||(a=Pa("/"),Py(t,new Uint16Array(6),{from:e},1,a,0),o.singleCache.set(s,a)),dR(r,a,n)}function Nve(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=dR(e,t.segmentTree,n)}catch(a){if(a instanceof URIError)s=null;else throw a}return s&&(s.branch=F9(s.route)),t.matchCache.set(r,s),s}function kve(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Dve(e,t=!1,n){const r=Pa(e.fullPath),o=new Uint16Array(6),s={},a={};let u=0;return Py(t,o,e,1,r,0,c=>{if(n?.(c,u),c.id in s&&Ts(),s[c.id]=c,u!==0&&c.path){const f=kve(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),Ri(r),{processedTree:{segmentTree:r,singleCache:Nf(1e3),matchCache:Nf(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:a}}function dR(e,t,n=!1){const r=e.split("/"),o=Uve(e,r,t,n);if(!o)return null;const[s]=$9(e,r,o);return{route:o.node.route,rawParams:s}}function $9(e,t,n){const r=Lve(n.node);let o=null;const s=Object.create(null);let a=n.extract?.part??0,u=n.extract?.node??0,c=n.extract?.path??0,f=n.extract?.segment??0;for(;u<r.length;a++,u++,c++,f++){const h=r[u];if(h.kind===ki)break;if(h.kind===L9){f--,a--,c--;continue}const m=t[a],g=c;if(m&&(c+=m.length),h.kind===1){o??=n.node.fullPath.split("/");const v=o[f],w=h.prefix?.length??0;if(v.charCodeAt(w)===123){const S=h.suffix?.length??0,C=v.substring(w+2,v.length-S-1),E=m.substring(w,m.length-S);s[C]=decodeURIComponent(E)}else{const S=v.substring(1);s[S]=decodeURIComponent(m)}}else if(h.kind===3){if(n.skipped&1<<u){a--,c=g-1;continue}o??=n.node.fullPath.split("/");const v=o[f],w=h.prefix?.length??0,S=h.suffix?.length??0,C=v.substring(w+3,v.length-S-1),E=h.suffix||h.prefix?m.substring(w,m.length-S):m;E&&(s[C]=decodeURIComponent(E))}else if(h.kind===2){const v=h,w=e.substring(g+(v.prefix?.length??0),e.length-(v.suffix?.length??0)),S=decodeURIComponent(w);s["*"]=S,s._splat=S;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:a,node:u,path:c,segment:f}]}function F9(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Lve(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Uve(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!Mf(t),s=o&&e!=="/",a=t.length-(o?1:0),u=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let c=null,f=null;for(;u.length;){const h=u.pop(),{node:m,index:g,skipped:v,depth:w,statics:S,dynamics:C,optionals:E}=h;let{extract:I,rawParams:A}=h;if(m.kind===2&&m.route&&!um(f,h))continue;if(m.parse){if(!$4(e,t,h))continue;A=h.rawParams,I=h.extract}r&&m.route&&m.kind!==ki&&um(c,h)&&(c=h);const T=g===a;if(T&&(m.route&&(!s||m.kind===ki||m.kind===2)&&um(f,h)&&(f=h),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const N=T?void 0:t[g];let M;if(T&&m.index){const R={node:m.index,index:g,skipped:v,depth:w+1,statics:S,dynamics:C,optionals:E,extract:I,rawParams:A};let k=!0;if(m.index.parse&&($4(e,t,R)||(k=!1)),k){if(!C&&!E&&!v&&$ve(S,a))return R;um(f,R)&&(f=R)}}if(m.wildcard)for(let R=m.wildcard.length-1;R>=0;R--){const k=m.wildcard[R],{prefix:L,suffix:q}=k;if(!(L&&(T||!(k.caseSensitive?N:M??=N.toLowerCase()).startsWith(L)))){if(q){if(T)continue;const $=t.slice(g).join("/").slice(-q.length);if((k.caseSensitive?$:$.toLowerCase())!==q)continue}u.push({node:k,index:a,skipped:v,depth:w+1,statics:S,dynamics:C,optionals:E,extract:I,rawParams:A})}}if(m.optional){const R=v|1<<w,k=w+1;for(let L=m.optional.length-1;L>=0;L--){const q=m.optional[L];u.push({node:q,index:g,skipped:R,depth:k,statics:S,dynamics:C,optionals:E,extract:I,rawParams:A})}if(!T)for(let L=m.optional.length-1;L>=0;L--){const q=m.optional[L],{prefix:$,suffix:D}=q;if($||D){const j=q.caseSensitive?N:M??=N.toLowerCase();if($&&!j.startsWith($)||D&&!j.endsWith(D))continue}u.push({node:q,index:g+1,skipped:v,depth:k,statics:S,dynamics:C,optionals:E+lm(a,g),extract:I,rawParams:A})}}if(!T&&m.dynamic&&N)for(let R=m.dynamic.length-1;R>=0;R--){const k=m.dynamic[R],{prefix:L,suffix:q}=k;if(L||q){const $=k.caseSensitive?N:M??=N.toLowerCase();if(L&&!$.startsWith(L)||q&&!$.endsWith(q))continue}u.push({node:k,index:g+1,skipped:v,depth:w+1,statics:S,dynamics:C+lm(a,g),optionals:E,extract:I,rawParams:A})}if(!T&&m.staticInsensitive){const R=m.staticInsensitive.get(M??=N.toLowerCase());R&&u.push({node:R,index:g+1,skipped:v,depth:w+1,statics:S+lm(a,g),dynamics:C,optionals:E,extract:I,rawParams:A})}if(!T&&m.static){const R=m.static.get(N);R&&u.push({node:R,index:g+1,skipped:v,depth:w+1,statics:S+lm(a,g),dynamics:C,optionals:E,extract:I,rawParams:A})}if(m.pathless){const R=w+1;for(let k=m.pathless.length-1;k>=0;k--){const L=m.pathless[k];u.push({node:L,index:g,skipped:v,depth:R,statics:S,dynamics:C,optionals:E,extract:I,rawParams:A})}}}if(f)return f;if(r&&c){let h=c.index;for(let g=0;g<c.index;g++)h+=t[g].length;const m=h===e.length?"/":e.slice(h);return c.rawParams??=Object.create(null),c.rawParams["**"]=decodeURIComponent(m),c}return null}function lm(e,t){return 2**(e-t-1)}function $ve(e,t){return e===2**(t-1)-1}function $4(e,t,n){let r,o;try{[r,o]=$9(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 um(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===ki)>(e.node.kind===ki)||t.node.kind===ki==(e.node.kind===ki)&&t.depth>e.depth))):!0}function dg(e){return fR(e.filter(t=>t!==void 0).join("/"))}function fR(e){return e.replace(/\/{2,}/g,"/")}function z9(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function As(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function j9(e){return As(z9(e))}function qg(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Fve(e,t,n){return qg(e,n)===qg(t,n)}function zve({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 u;if(s)u=e.split("/");else if(o)u=t.split("/");else{for(u=e.split("/");u.length>1&&Mf(u)==="";)u.pop();const f=t.split("/");for(let h=0,m=f.length;h<m;h++){const g=f[h];g===""?h?h===m-1&&u.push(g):u=[g]:g===".."?u.pop():g==="."||u.push(g)}}u.length>1&&(Mf(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));const c=fR(u.join("/"))||"/";return a&&r&&r.set(a,c),c}function jve(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 RE(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=>z4(o,n)).join("/"):z4(r,n)}function F4({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 u=0,c,f="";for(;u<a;){const h=u;c=U9(e,h,c);const m=c[5];if(u=m+1,h===m)continue;const g=c[0];if(g===0){f+="/"+e.substring(h,m);continue}if(g===2){const v=t._splat;s._splat=v,s["*"]=v;const w=e.substring(h,c[1]),S=e.substring(c[4],m);if(!v){o=!0,(w||S)&&(f+="/"+w+S);continue}const C=RE("_splat",t,n);f+="/"+w+C+S;continue}if(g===1){const v=e.substring(c[2],c[3]);!o&&!(v in t)&&(o=!0),s[v]=t[v];const w=e.substring(h,c[1]),S=e.substring(c[4],m),C=RE(v,t,n)??"undefined";f+="/"+w+C+S;continue}if(g===3){const v=e.substring(c[2],c[3]),w=t[v];if(w==null)continue;s[v]=w;const S=e.substring(h,c[1]),C=e.substring(c[4],m),E=RE(v,t,n)??"";f+="/"+S+E+C;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:s,interpolatedPath:f||"/",isMissingParams:o}}function z4(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function Bn(e){return e?.isNotFound===!0}function Bve(){try{return sessionStorage}catch{return}}const Hve="tsr-scroll-restoration-v1_3",B9=Bve();function qve(){try{return JSON.parse(B9?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function Vve(){try{B9?.setItem(Hve,JSON.stringify(Su))}catch{}}const Su=qve(),j4="data-scroll-restoration-id",Wve=e=>e.state.__TSR_key||e.href;function Gve(e){const t=e.getAttribute(j4);if(t)return`[${j4}="${t}"]`;let n="",r=e,o;for(;o=r.parentNode;){let s=1,a=r;for(;a=a.previousElementSibling;)s++;const u=`${r.localName}:nth-child(${s})`;n=n?`${u} > ${n}`:u,r=o}return n}let cm=!1;const fg="window";function mx(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function B4(e){const t=new Set;for(const n of e){if(n===fg)continue;const r=mx(n);r&&t.add(r)}return t}function Kve(e,t){const n=e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);const o=e.options.getScrollRestorationKey||Wve,s=new Set,a=u=>{const c=Su[u]||={};for(const f of s)f===document?c[fg]={scrollX,scrollY}:f.isConnected&&(c[Gve(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,cm=!1,history.scrollRestoration="manual",document.addEventListener("scroll",u=>{cm||s.add(u.target)},!0),e.subscribe("onBeforeLoad",u=>{u.fromLocation&&a(o(u.fromLocation)),s.clear()}),addEventListener("pagehide",()=>{a(o(e.stores.resolvedLocation.get()??e.stores.location.get())),Vve()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",u=>{const c=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(u.toLocation),w=u.fromLocation&&o(u.fromLocation);if(r.restoring&&w&&w!==v){const S=Su[w];if(S){let C=Su[v];for(const E in S){if(E===fg){if(h)continue}else{const I=mx(E);if(!I||h&&f&&(g??=B4(f),g.has(I)))continue}C||(C=Su[v]={}),C[E]??=S[E]}}}cm=!0;try{const S=u.toLocation.hash,C=u.toLocation.state.__hashScrollIntoViewOptions??!0;let E=!1;if(h){!S&&f&&(g??=B4(f));const I=S&&C&&m,A=r.restoring?Su[v]:void 0;if(A)for(const T in A){const{scrollX:N,scrollY:M}=A[T];if(T===fg){if(I)continue;scrollTo({top:M,left:N,behavior:c}),E=!0}else{const R=mx(T);R&&(R.scrollLeft=N,R.scrollTop=M,g?.delete(R))}}if(!S){const T={top:0,left:0,behavior:c};if(E||scrollTo(T),g)for(const N of g)N.scrollTo(T)}}!E&&S&&C&&document.getElementById(S)?.scrollIntoView(C)}finally{cm=!1}}))}function Zve(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 TE(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Yve(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]=TE(o):Array.isArray(s)?s.push(TE(o)):n[r]=[s,TE(o)]}return n}const Qve=Jve(JSON.parse),Xve=eye(JSON.stringify,JSON.parse);function Jve(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=Yve(t);for(const r in n){const o=n[r];if(typeof o=="string")try{n[r]=e(o)}catch{}}return n}}function eye(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=Zve(o,r);return s?`?${s}`:""}}const Fa="__root__";function pl(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 lr(e){return e instanceof Response&&!!e.options}function tye(e){return{input:({url:t})=>{for(const n of e)t=gx(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=H9(e[n],t);return t}}}function nye(e){const t=j9(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=dg(["/",t,s.pathname]),s)}}function gx(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 H9(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 rye(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:o,init:s}=t,a=new Map,u=new Map,c=new Map,f=n(e.status),h=n(e.loadedAt),m=n(e.isLoading),g=n(e.isTransitioning),v=n(e.location),w=n(e.resolvedLocation),S=n(e.statusCode),C=n(e.redirect),E=n([]),I=n([]),A=n([]),T=r(()=>OE(a,E.get())),N=r(()=>OE(u,I.get())),M=r(()=>OE(c,A.get())),R=r(()=>E.get()[0]),k=r(()=>E.get().some(Q=>a.get(Q)?.get().status==="pending")),L=r(()=>({locationHref:v.get().href,resolvedLocationHref:w.get()?.href,status:f.get()})),q=r(()=>({status:f.get(),loadedAt:h.get(),isLoading:m.get(),isTransitioning:g.get(),matches:T.get(),location:v.get(),resolvedLocation:w.get(),statusCode:S.get(),redirect:C.get()})),$=Nf(64);function D(Q){let ae=$.get(Q);return ae||(ae=r(()=>{const ue=E.get();for(const Ce of ue){const U=a.get(Ce);if(U&&U.routeId===Q)return U.get()}}),$.set(Q,ae)),ae}const j={status:f,loadedAt:h,isLoading:m,isTransitioning:g,location:v,resolvedLocation:w,statusCode:S,redirect:C,matchesId:E,pendingIds:I,cachedIds:A,matches:T,pendingMatches:N,cachedMatches:M,firstId:R,hasPending:k,matchRouteDeps:L,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:q,getRouteMatchStore:D,setMatches:Z,setPending:he,setCached:B};Z(e.matches),s?.(j);function Z(Q){ME(Q,a,E,n,o)}function he(Q){ME(Q,u,I,n,o)}function B(Q){ME(Q,c,A,n,o)}return j}function OE(e,t){const n=[];for(const r of t){const o=e.get(r);o&&n.push(o.get())}return n}function ME(e,t,n,r,o){const s=e.map(u=>u.id),a=new Set(s);o(()=>{for(const u of t.keys())a.has(u)||t.delete(u);for(const u of e){const c=t.get(u.id);if(!c){const f=r(u);f.routeId=u.routeId,t.set(u.id,f);continue}c.routeId=u.routeId,c.get()!==u&&c.set(u)}Rve(n.get(),s)||n.set(s)})}const vx=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},oye=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Ny=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),za=(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 u=e.router.getMatch(a.id);u&&Object.assign(r,u.__routeContext,u.__beforeLoadContext)}return r},H4=(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 u=e.matches[a];if(e.router.looseRoutesById[u.routeId].options.notFoundComponent)return a}return n?s:o},Di=(e,t,n)=>{if(!(!lr(n)&&!Bn(n)))throw lr(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:lr(n)?"redirected":Bn(n)?"notFound":r.status==="pending"?"success":r.status,context:za(e,t.index),isFetching:!1,error:n})),Bn(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),lr(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},q9=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},q4=(e,t,n)=>{const r=za(e,n);e.updateMatch(t,o=>({...o,context:r}))},Dd=(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,Di(e,e.router.getMatch(r),n);try{s.options.onError?.(n)}catch(a){n=a,Di(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&&!lr(n)&&!Bn(n)&&(e.serialError??=n)},V9=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Ny(e,t)&&(n.options.loader||n.options.beforeLoad||G9(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){const s=setTimeout(()=>{vx(e)},o);r._nonReactive.pendingTimeout=s}},sye=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;V9(e,t,n,r);const o=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&Di(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},iye=(e,t,n,r)=>{const o=e.router.getMatch(t);let s=o._nonReactive.loadPromise;o._nonReactive.loadPromise=Ku(()=>{s?.resolve(),s=void 0});const{paramsError:a,searchError:u}=o;a&&Dd(e,n,a),u&&Dd(e,n,u),V9(e,t,r,o);const c=new AbortController;let f=!1;const h=()=>{f||(f=!0,e.updateMatch(t,T=>({...T,isFetching:"beforeLoad",fetchCount:T.fetchCount+1,abortController:c})))},m=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,T=>({...T,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{h(),m()});return}o._nonReactive.beforeLoadPromise=Ku();const g={...za(e,n,!1),...o.__routeContext},{search:v,params:w,cause:S}=o,C=Ny(e,t),E={search:v,abortController:c,params:w,preload:C,context:g,location:e.location,navigate:T=>e.router.navigate({...T,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:C?"preload":S,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},I=T=>{if(T===void 0){e.router.batch(()=>{h(),m()});return}(lr(T)||Bn(T))&&(h(),Dd(e,n,T)),e.router.batch(()=>{h(),e.updateMatch(t,N=>({...N,__beforeLoadContext:T})),m()})};let A;try{if(A=r.options.beforeLoad(E),Pf(A))return h(),A.catch(T=>{Dd(e,n,T)}).then(I)}catch(T){h(),Dd(e,n,T)}I(A)},aye=(e,t)=>{const{id:n,routeId:r}=e.matches[t],o=e.router.looseRoutesById[r],s=()=>u(),a=()=>iye(e,n,t,o),u=()=>{if(q9(e,n))return;const c=sye(e,n,o);return Pf(c)?c.then(a):a()};return s()},lye=(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,u])=>({meta:s?.meta,links:s?.links,headScripts:s?.scripts,headers:u,scripts:a,styles:s?.styles}))},W9=(e,t,n,r,o)=>{const s=t[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=e.router.getMatch(n),h=za(e,r),m=Ny(e,n);return{params:a,deps:u,preload:!!m,parentMatchPromise:s,abortController:c,context:h,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:m?"preload":f,route:o,...e.router.options.additionalContext}},V4=async(e,t,n,r,o)=>{try{const s=e.router.getMatch(n);try{(!(N9??e.router.isServer)||s.ssr===!0)&&kf(o);const a=o.options.loader,u=typeof a=="function"?a:a?.handler,c=u?.(W9(e,t,n,r,o)),f=!!u&&Pf(c);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"})),u){const m=f?await c:c;Di(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:za(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let u=a;if(u?.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:za(e,r)}));return}const c=s._nonReactive.minPendingPromise;c&&await c,Bn(a)&&await o.options.notFoundComponent?.preload?.(),Di(e,e.router.getMatch(n),a);try{o.options.onError?.(a)}catch(f){u=f,Di(e,e.router.getMatch(n),f)}!lr(u)&&!Bn(u)&&await kf(o,["errorComponent"]),e.updateMatch(n,f=>({...f,error:u,context:za(e,r),status:"error",isFetching:!1}))}}catch(s){const a=e.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),Di(e,a,s)}},uye=async(e,t,n)=>{async function r(v,w,S,C,E){const I=Date.now()-w.updatedAt,A=v?E.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:E.options.staleTime??e.router.options.defaultStaleTime??0,T=E.options.shouldReload,N=typeof T=="function"?T(W9(e,t,o,n,E)):T,{status:M,invalid:R}=C,k=I>=A&&(!!e.forceStaleReload||C.cause==="enter"||S!==void 0&&S!==C.id);a=M==="success"&&(R||(N??k)),v&&E.options.preload===!1||(a&&!e.sync&&h?(u=!0,(async()=>{try{await V4(e,t,o,n,E);const L=e.router.getMatch(o);L._nonReactive.loaderPromise?.resolve(),L._nonReactive.loadPromise?.resolve(),L._nonReactive.loaderPromise=void 0,L._nonReactive.loadPromise=void 0}catch(L){lr(L)&&await e.router.navigate(L.options)}})()):M!=="success"||a?await V4(e,t,o,n,E):q4(e,o,n))}const{id:o,routeId:s}=e.matches[n];let a=!1,u=!1;const c=e.router.looseRoutesById[s],f=c.options.loader,h=((typeof f=="function"?void 0:f?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(q9(e,o)){if(!e.router.getMatch(o))return e.matches[n];q4(e,o,n)}else{const v=e.router.getMatch(o),w=e.router.stores.matchesId.get()[n],S=(w&&e.router.stores.matchStores.get(w)||null)?.routeId===s?w:e.router.stores.matches.get().find(E=>E.routeId===s)?.id,C=Ny(e,o);if(v._nonReactive.loaderPromise){if(v.status==="success"&&!e.sync&&!v.preload&&h)return v;await v._nonReactive.loaderPromise;const E=e.router.getMatch(o),I=E._nonReactive.error||E.error;I&&Di(e,E,I),E.status==="pending"&&await r(C,v,S,E,c)}else{const E=C&&!e.router.stores.matchStores.has(o),I=e.router.getMatch(o);I._nonReactive.loaderPromise=Ku(),E!==I.preload&&e.updateMatch(o,A=>({...A,preload:E})),await r(C,v,S,I,c)}}const m=e.router.getMatch(o);u||(m._nonReactive.loaderPromise?.resolve(),m._nonReactive.loadPromise?.resolve(),m._nonReactive.loadPromise=void 0),clearTimeout(m._nonReactive.pendingTimeout),m._nonReactive.pendingTimeout=void 0,u||(m._nonReactive.loaderPromise=void 0),m._nonReactive.dehydrated=void 0;const g=u?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 W4(e){const t=e,n=[];oye(t.router)&&vx(t);let r;for(let g=0;g<t.matches.length;g++){try{const v=aye(t,g);Pf(v)&&await v}catch(v){if(lr(v))throw v;if(Bn(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?H4(t,r):void 0,a=r&&t.preload?0:s!==void 0?Math.min(s+1,o):o;let u,c;for(let g=0;g<a;g++)n.push(uye(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 w=v.reason;if(lr(w))throw w;Bn(w)?u??=w:c??=w}if(c!==void 0)throw c}const f=u??(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=H4(t,f);g===void 0&&Ts();const v=t.matches[g],w=t.router.looseRoutesById[v.routeId],S=t.router.options?.defaultNotFoundComponent;!w.options.notFoundComponent&&S&&(w.options.notFoundComponent=S),f.routeId=v.routeId;const C=v.routeId===t.router.routeTree.id;t.updateMatch(v.id,E=>({...E,...C?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),h=g,await kf(w,["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 kf(g,["errorComponent"])}for(let g=0;g<=h;g++){const{id:v,routeId:w}=t.matches[g],S=t.router.looseRoutesById[w];try{const C=lye(t,v,S);if(C){const E=await C;t.updateMatch(v,I=>({...I,...E}))}}catch(C){console.error(`Error executing head for route ${w}:`,C)}}const m=vx(t);if(Pf(m)&&await m,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function G4(e,t){const n=t.map(r=>e.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function kf(e,t=hg){!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===hg?(()=>{if(e._componentsPromise===void 0){const r=G4(e,hg);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():G4(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function G9(e){for(const t of hg)if(e.options[t]?.preload)return!0;return!1}const hg=["component","errorComponent","pendingComponent","notFoundComponent"];var Fi="__TSR_index",K4="popstate",Z4="beforeunload";function cye(e){let t=e.getLocation();const n=new Set,r=a=>{t=e.getLocation(),n.forEach(u=>u({location:t,action:a}))},o=a=>{e.notifyOnIndexChange??!0?r(a):t=e.getLocation()},s=async({task:a,navigateOpts:u,...c})=>{if(u?.ignoreBlocker??!1){a();return}const f=e.getBlockers?.()??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&h)for(const m of f){const g=Vg(c.path,c.state);if(await m.blockerFn({currentLocation:t,nextLocation:g,action:c.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,u,c)=>{const f=t.state[Fi];u=Y4(f+1,u),s({task:()=>{e.pushState(a,u),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:u})},replace:(a,u,c)=>{const f=t.state[Fi];u=Y4(f,u),s({task:()=>{e.replaceState(a,u),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:u})},go:(a,u)=>{s({task:()=>{e.go(a),o({type:"GO",index:a})},navigateOpts:u,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[Fi]!==0,createHref:a=>e.createHref(a),block:a=>{if(!e.setBlockers)return()=>{};const u=e.getBlockers?.()??[];return e.setBlockers([...u,a]),()=>{const c=e.getBlockers?.()??[];e.setBlockers?.(c.filter(f=>f!==a))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function Y4(e,t){t||(t={});const n=hR();return{...t,key:n,__TSR_key:n,[Fi]:e}}function dye(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let o=[];const s=()=>o,a=k=>o=k,u=(k=>k),c=(()=>Vg(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const k=hR();t.history.replaceState({[Fi]:0,key:k,__TSR_key:k},"")}let f=c(),h,m=!1,g=!1,v=!1,w=!1;const S=()=>f;let C,E;const I=()=>{C&&(R._ignoreSubscribers=!0,(C.isPush?t.history.pushState:t.history.replaceState)(C.state,"",C.href),R._ignoreSubscribers=!1,C=void 0,E=void 0,h=void 0)},A=(k,L,q)=>{const $=u(L);E||(h=f),f=Vg(L,q),C={href:$,state:q,isPush:C?.isPush||k==="push"},E||(E=Promise.resolve().then(()=>I()))},T=k=>{f=c(),R.notify({type:k})},N=async()=>{if(g){g=!1;return}const k=c(),L=k.state[Fi]-f.state[Fi],q=L===1,$=L===-1,D=!q&&!$||m;m=!1;const j=D?"GO":$?"BACK":"FORWARD",Z=D?{type:"GO",index:L}:{type:$?"BACK":"FORWARD"};if(v)v=!1;else{const he=s();if(typeof document<"u"&&he.length){for(const B of he)if(await B.blockerFn({currentLocation:f,nextLocation:k,action:j})){g=!0,t.history.go(1),R.notify(Z);return}}}f=c(),R.notify(Z)},M=k=>{if(w){w=!1;return}let L=!1;const q=s();if(typeof document<"u"&&q.length)for(const $ of q){const D=$.enableBeforeUnload??!0;if(D===!0){L=!0;break}if(typeof D=="function"&&D()===!0){L=!0;break}}if(L)return k.preventDefault(),k.returnValue=""},R=cye({getLocation:S,getLength:()=>t.history.length,pushState:(k,L)=>A("push",k,L),replaceState:(k,L)=>A("replace",k,L),back:k=>(k&&(v=!0),w=!0,t.history.back()),forward:k=>{k&&(v=!0),w=!0,t.history.forward()},go:k=>{m=!0,t.history.go(k)},createHref:k=>u(k),flush:I,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Z4,M,{capture:!0}),t.removeEventListener(K4,N)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:s,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(Z4,M,{capture:!0}),t.addEventListener(K4,N),t.history.pushState=function(...k){const L=n.apply(t.history,k);return R._ignoreSubscribers||T("PUSH"),L},t.history.replaceState=function(...k){const L=r.apply(t.history,k);return R._ignoreSubscribers||T("REPLACE"),L},R}function fye(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Vg(e,t){const n=fye(e),r=n.indexOf("#"),o=n.indexOf("?"),s=hR();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||{[Fi]:0,key:s,__TSR_key:s}}}function hR(){return(Math.random()+1).toString(36).substring(7)}function Uu(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 hye=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=jve(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=dye()),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=Nf(1e3),h=this.buildRouteTree(),this.setRoutes(h)}if(!this.stores&&this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=rye(mye(this.latestLocation),h),Kve(this)}let u=!1;const c=this.options.basepath??"/",f=this.options.rewrite;if(s||o!==c||a!==f){this.basepath=c;const h=[],m=j9(c);m&&m!=="/"&&h.push(nye({basepath:c})),f&&h.push(f),this.rewrite=h.length===0?void 0:h.length===1?h[0]:tye(h),this.history&&this.updateLatestLocation(),u=!0}u&&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=Dve(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&Ove(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:c,search:f,hash:h,href:m,state:g})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const E=this.options.parseSearch(f),I=this.options.stringifySearch(E);return{href:c+I+h,publicHref:c+I+h,pathname:kd(c).path,external:!1,searchStr:I,search:_a(r?.search,E),hash:kd(h.slice(1)).path,state:Ma(r?.state,g)}}const v=new URL(m,this.origin),w=gx(this.rewrite,v),S=this.options.parseSearch(w.search),C=this.options.stringifySearch(S);return w.search=C,{href:w.href.replace(w.origin,""),publicHref:m,pathname:kd(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:C,search:_a(r?.search,S),hash:kd(w.hash.slice(1)).path,state:Ma(r?.state,g)}},s=o(n),{__tempLocation:a,__tempKey:u}=s.state;if(a&&(!u||u===this.tempLocationKey)){const c=o(a);return c.state.key=s.state.key,c.state.__TSR_key=s.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:s}}return s},this.resolvePathWithBase=(n,r)=>zve({base:n,to:r.includes("//")?fR(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=>gye({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,u=this.matchRoutesLightweight(a);s.from;const c=s.unsafeRelative==="path"?a.pathname:s.from??u.fullPath,f=s.to?`${s.to}`:void 0,h=u.search,m=Object.assign(Object.create(null),u.params),g=f?.charCodeAt(0)===47?"/":this.resolvePathWithBase(c,"."),v=f?this.resolvePathWithBase(g,f):g,w=s.params===!1||s.params===null?Object.create(null):(s.params??!0)===!0?m:Object.assign(m,Oa(s.params,m)),S=this.routesByPath[As(v)];let C;if(S)C=this.getRouteBranch(S);else if(v.includes("$"))C=[];else{const $=this.getMatchedRoutes(v);C=$.matchedRoutes,this.options.notFoundRoute&&(!$.foundRoute||$.foundRoute.path!=="/"&&$.routeParams["**"])&&(C=[...C,this.options.notFoundRoute])}if(C.length&&D9(w))for(const $ of C){const D=$.options.params?.stringify??$.options.stringifyParams;if(D)try{Object.assign(w,D(w))}catch{}}const E=n.leaveParams?v:kd(F4({path:v,params:w,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let I=h;if(n._includeValidateSearch&&this.options.search?.strict){const $={};C.forEach(D=>{if(D.options.validateSearch)try{Object.assign($,pg(D.options.validateSearch,{...$,...I}))}catch{}}),I=$}I=vye({search:I,dest:s,destRoutes:C,_includeValidateSearch:n._includeValidateSearch}),I=_a(h,I);const A=this.options.stringifySearch(I),T=s.hash===!0?a.hash:s.hash?Oa(s.hash,a.hash):void 0,N=T?`#${T}`:"";let M=s.state===!0?a.state:s.state?Oa(s.state,a.state):{};M=Ma(a.state,M);const R=`${E}${A}${N}`;let k,L,q=!1;if(this.rewrite){const $=new URL(R,this.origin),D=H9(this.rewrite,$);k=$.href.replace($.origin,""),D.origin!==this.origin?(L=D.href,q=!0):L=D.pathname+D.search+D.hash}else k=Ave(R),L=k;return{publicHref:L,href:k,pathname:E,search:I,searchStr:A,state:M,hash:T??"",external:q,unmaskOnReload:s.unmaskOnReload}},o=(s={},a)=>{const u=r(s);let c=a?r(a):void 0;if(!c){const f=Object.create(null);if(this.options.routeMasks){const h=Mve(u.pathname,this.processedTree);if(h){Object.assign(f,h.rawParams);const{from:m,params:g,...v}=h.route,w=g===!1||g===null?Object.create(null):(g??!0)===!0?f:Object.assign(f,Oa(g,f));a={from:n.from,...v,params:w},c=r(a)}}}return c&&(u.maskedLocation=c),u};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=$a(o.state,this.latestLocation.state);return f.forEach(m=>{delete o.state[m]}),h},u=As(this.latestLocation.href)===As(o.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Ku(()=>{c?.resolve(),c=void 0}),u&&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:u,...c}={})=>{if(u){const m=this.history.location.state.__TSR_index,g=Vg(u,{__TSR_index:n?m:m+1}),v=new URL(g.pathname,this.origin);c.to=gx(this.rewrite,v).pathname,c.search=this.options.parseSearch(g.search),c.hash=g.hash.slice(1)}const f=this.buildLocation({...c,_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 u=!1;if(o)try{new URL(`${o}`),u=!0}catch{}if(u&&!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 c=!u&&s?s:o;if(Hg(c,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(c):window.location.href=c;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 u=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=Uu(h,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...m}),this.emit({type:"onBeforeLoad",...m}),await W4({router:this,sync:n?.sync,forceStaleReload:u.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,w=null,S=null;this.batch(()=>{const C=this.stores.pendingMatches.get(),E=C.length,I=this.stores.matches.get();g=E?I.filter(N=>!this.stores.pendingMatchStores.has(N.id)):null;const A=new Set;for(const N of this.stores.pendingMatchStores.values())N.routeId&&A.add(N.routeId);const T=new Set;for(const N of this.stores.matchStores.values())N.routeId&&T.add(N.routeId);v=E?I.filter(N=>!A.has(N.routeId)):null,w=E?C.filter(N=>!T.has(N.routeId)):null,S=E?C.filter(N=>T.has(N.routeId)):I,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),E&&(this.stores.setMatches(C),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...g.filter(N=>N.status!=="error"&&N.status!=="notFound"&&N.status!=="redirected")]),this.clearExpiredCache())});for(const[C,E]of[[v,"onLeave"],[w,"onEnter"],[S,"onStay"]])if(C)for(const I of C)this.looseRoutesById[I.routeId].options[E]?.(I)})})}})}catch(h){lr(h)?(o=h,this.navigate({...o.options,replace:!0,ignoreBlocker:!0})):Bn(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 c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(f=>f.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},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(),u=typeof r.types=="function"?r.types(Uu(s,a)):r.types;if(u===!1){n();return}o={update:n,types:u}}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 u=r(a.get());u.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(c=>c.filter(f=>f!==n)):a.set(u)}})},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&&Hg(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=kf,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()]),u=o.filter(c=>!a.has(c.id));if(u.length){const c=this.stores.cachedMatches.get();this.stores.setCached([...c,...u])}try{return o=await W4({router:this,matches:o,location:r,preload:!0,updateMatch:(c,f)=>{s.has(c)?o=o.map(h=>h.id===c?f(h):h):this.updateMatch(c,f)}}),o}catch(c){if(lr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});Bn(c)||console.error(c);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(),u=Pve(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!u||n.params&&!$a(u.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?$a(a.search,s.search,{partial:!0})?u.rawParams:!1:u.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??Xve,parseSearch:e.parseSearch??Qve,protocolAllowlist:e.protocolAllowlist??Ive}),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=F9(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["**"]:As(e.pathname))&&(this.options.notFoundRoute?s=[...s,this.options.notFoundRoute]:a=!0);const u=a?bye(this.options.notFoundMode,s):void 0,c=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=c[h-1];let v,w,S;{const D=g?.search??e.search,j=g?._strictSearch??void 0;try{const Z=pg(m.options.validateSearch,{...D})??void 0;v={...D,...Z},w={...j,...Z},S=void 0}catch(Z){let he=Z;if(Z instanceof Wg||(he=new Wg(Z.message,{cause:Z})),t?.throwOnError)throw he;v=D,w={},S=he}}const C=m.options.loaderDeps?.({search:v})??"",E=C?JSON.stringify(C):"",{interpolatedPath:I,usedParams:A}=F4({path:m.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),T=m.id+I+E,N=this.getMatch(T),M=f.get(m.id),R=N?._strictParams??A;let k;if(!N)try{Q4(m,R)}catch(D){if(Bn(D)||lr(D)?k=D:k=new pye(D.message,{cause:D}),t?.throwOnError)throw k}Object.assign(o,R);const L=M?"stay":"enter";let q;if(N)q={...N,cause:L,params:M?.params??o,_strictParams:R,search:_a(M?M.search:N.search,v),_strictSearch:w};else{const D=m.options.loader||m.options.beforeLoad||m.lazyFn||G9(m)?"pending":"success";q={id:T,ssr:m.options.ssr,index:h,routeId:m.id,params:M?.params??o,_strictParams:R,pathname:I,updatedAt:Date.now(),search:M?_a(M.search,v):v,_strictSearch:w,searchError:void 0,status:D,isFetching:!1,error:void 0,paramsError:k,__routeContext:void 0,_nonReactive:{loadPromise:Ku()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:M?Ma(M.loaderDeps,C):C,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||(q.globalNotFound=u===m.id),q.searchError=S;const $=this.getParentContext(g);q.context={...$,...q.__routeContext,...q.__beforeLoadContext},c[h]=q}for(let h=0;h<c.length;h++){const m=c[h],g=this.looseRoutesById[m.routeId],v=this.getMatch(m.id),w=f.get(m.routeId);if(m.params=w?_a(w.params,o):o,!v){const S=c[h-1],C=this.getParentContext(S);if(g.options.context){const E={deps:m.loaderDeps,params:m.params,context:C??{},location:e,navigate:I=>this.navigate({...I,_fromLocation:e}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:c,routeId:g.id};m.__routeContext=g.options.context(E)??void 0}m.context={...C,...m.__routeContext,...m.__beforeLoadContext}}}return c}matchRoutesLightweight(e){const t=Mf(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=Mf(r),a={...e.search};for(const m of r)try{Object.assign(a,pg(m.options.validateSearch,a))}catch{}const u=t&&this.stores.matchStores.get(t)?.get(),c=u&&u.routeId===s.id&&u.pathname===e.pathname;let f;if(c)f=u.params;else{const m=Object.assign(Object.create(null),o);for(const g of r)try{Q4(g,m)}catch{}f=m}const h={matchedRoutes:r,fullPath:s.fullPath,search:a,params:f};return this.lightweightCache.set(e,[t,h]),h}},Wg=class extends Error{},pye=class extends Error{};function mye(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function pg(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Wg("Async validation not supported");if(n.issues)throw new Wg(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 gye({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),o=As(e);let s;const a=Nve(o,n,!0);return a&&(s=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[t.__root__],routeParams:r,foundRoute:s}}function vye({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return yye(n)(e,t,r??!1)}function yye(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 c=({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(c)}const u=a.validateSearch;if(u){const c=({search:f,next:h,meta:m})=>{const g=h(f);if(n)try{const v=pg(u,g);if(m&&v)for(const w in v)w in g||(m.defaulted||=new Map).set(w,v[w]);return{...g,...v}}catch{}return g};r.push(c)}}const o=(s,a,u)=>{if(s>=r.length){if(!t.search)return{};if(t.search===!0)return a;const f=Oa(t.search,a);return u&&(u.explicit=f),f}const c=(f,h)=>{if(h){const m=u||{};return{search:o(s+1,f,m),meta:m}}return o(s+1,f,u)};return r[s]({search:a,next:c,meta:u})};return function(a,u,c){return t=u,n=c,o(0,a)}}function bye(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 Fa}function Q4(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 Sye="Error preloading route! ☝️";var K9=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=Fa:this.parentRoute||Ts();let o=r?Fa:n?.path;o&&o!=="/"&&(o=z9(o));const s=n?.id||o;let a=r?Fa:dg([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);o==="__root__"&&(o="/"),a!=="__root__"&&(a=dg(["/",a]));const u=a==="__root__"?"/":dg([this.parentRoute.fullPath,o]);this._path=o,this._id=a,this._fullPath=u,this._to=As(u)},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=>pl({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.")}},wye=class extends K9{constructor(e){super(e)}};function pR(e){const t=e.errorComponent??mR;return O.jsx(Cye,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?_.createElement(t,{error:n,reset:r}):e.children})}var Cye=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 mR({error:e}){const[t,n]=_.useState(!1);return O.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[O.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[O.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),O.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"})]}),O.jsx("div",{style:{height:".25rem"}}),t?O.jsx("div",{children:O.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?O.jsx("code",{children:e.message}):null})}):null]})}function Eye({children:e,fallback:t=null}){return Z9()?O.jsx(F.Fragment,{children:e}):O.jsx(F.Fragment,{children:t})}function Z9(){return F.useSyncExternalStore(_ye,()=>!0,()=>!1)}function _ye(){return()=>{}}var Y9=_.createContext(null);function gr(e){return _.useContext(Y9)}var ky=_.createContext(void 0),xye=_.createContext(void 0),Bt=(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))(Bt||{});function Iye({update:e,notify:t,unwatched:n}){return{link:r,unlink:o,propagate:s,checkDirty:a,shallowPropagate:u};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 w=f.subsTail;if(w!==void 0&&w.version===m&&w.sub===h)return;const S=h.depsTail=f.subsTail={version:m,dep:f,sub:h,prevDep:g,nextDep:v,prevSub:w,nextSub:void 0};v!==void 0&&(v.prevDep=S),g!==void 0?g.nextDep=S:h.deps=S,w!==void 0?w.nextSub=S:f.subs=S}function o(f,h=f.sub){const m=f.dep,g=f.prevDep,v=f.nextDep,w=f.nextSub,S=f.prevSub;return v!==void 0?v.prevDep=g:h.depsTail=g,g!==void 0?g.nextDep=v:h.deps=v,w!==void 0?w.prevSub=S:m.subsTail=S,S!==void 0?S.nextSub=w:(m.subs=w)===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)&&c(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 w=g.subs;if(w!==void 0){const S=(f=w).nextSub;S!==void 0&&(m={value:h,prev:m},h=S);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 w=f.dep,S=w.flags;if(h.flags&16)v=!0;else if((S&17)===17){if(e(w)){const C=w.subs;C.nextSub!==void 0&&u(C),v=!0}}else if((S&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(m={value:f,prev:m}),f=w.deps,h=w,++g;continue}if(!v){const C=f.nextDep;if(C!==void 0){f=C;continue}}for(;g--;){const C=h.subs,E=C.nextSub!==void 0;if(E?(f=m.value,m=m.prev):f=C,v){if(e(h)){E&&u(C),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 u(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 c(f,h){let m=h.depsTail;for(;m!==void 0;){if(m===f)return!0;m=m.prevDep}return!1}}function Aye(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 yx=[];let mg=0;const{link:X4,unlink:Rye,propagate:Tye,checkDirty:Q9,shallowPropagate:J4}=Iye({update(e){return e._update()},notify(e){yx[bx++]=e,e.flags&=~Bt.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Bt.Mutable|Bt.Dirty,Gg(e))}});let dm=0,bx=0,ko,Sx=0;function X9(e){try{++Sx,e()}finally{--Sx||J9()}}function Gg(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=Rye(n,e)}function J9(){if(!(Sx>0)){for(;dm<bx;){const e=yx[dm];yx[dm++]=void 0,e.notify()}dm=0,bx=0}}function eU(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?Bt.None:Bt.Mutable,get(){return ko!==void 0&&X4(o,ko,mg),o._snapshot},subscribe(s){const a=Aye(s),u={current:!1},c=Oye(()=>{o.get(),u.current?a.next?.(o._snapshot):u.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(s){const a=ko,u=t?.compare??Object.is;if(n)ko=o,++mg,o.depsTail=void 0;else if(s===void 0)return!1;n&&(o.flags=Bt.Mutable|Bt.RecursedCheck);try{const c=o._snapshot,f=typeof s=="function"?s(c):s===void 0&&n?r(c):s;return c===void 0||!u(c,f)?(o._snapshot=f,!0):!1}finally{ko=a,n&&(o.flags&=~Bt.RecursedCheck),Gg(o)}}};return n?(o.flags=Bt.Mutable|Bt.Dirty,o.get=function(){const s=o.flags;if(s&Bt.Dirty||s&Bt.Pending&&Q9(o.deps,o)){if(o._update()){const a=o.subs;a!==void 0&&J4(a)}}else s&Bt.Pending&&(o.flags=s&~Bt.Pending);return ko!==void 0&&X4(o,ko,mg),o._snapshot}):o.set=function(s){if(o._update(s)){const a=o.subs;a!==void 0&&(Tye(a),J4(a),J9())}},o}function Oye(e){const t=()=>{const r=ko;ko=n,++mg,n.depsTail=void 0,n.flags=Bt.Watching|Bt.RecursedCheck;try{return e()}finally{ko=r,n.flags&=~Bt.RecursedCheck,Gg(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Bt.Watching|Bt.RecursedCheck,notify(){const r=this.flags;r&Bt.Dirty||r&Bt.Pending&&Q9(this.deps,this)?t():this.flags=Bt.Watching},stop(){this.flags=Bt.None,this.depsTail=void 0,Gg(this)}};return t(),n}function Mye(e,t){return e===t}function pr(e,t,n=Mye){const r=_.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:u}=e.subscribe(a);return u},[e]),o=_.useCallback(()=>e?.get(),[e]);return QF.useSyncExternalStoreWithSelector(r,o,o,t,n)}var PE={get(){},subscribe(){return{unsubscribe(){}}}};function Pye(e,t){const n=_.useRef();return r=>{const o=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=Ma(n.current,o):o}}function ml(e){const t=gr(),n=_.useContext(e.from?xye:ky),r=e.from?t.stores.getRouteMatchStore(e.from):t.stores.matchStores.get(n),o=Pye(e,t),s=pr(r??PE,a=>a?o(a):PE);if(s!==PE)return s;(e.shouldThrow??!0)&&Ts()}function e7(e){return ml({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function t7(e){const{select:t,...n}=e;return ml({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function n7(e){return ml({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 Dy(e){return ml({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function hh(e){const t=gr();return _.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function y5e(e){const t=gr(),n=hh(),r=_.useRef(null);return Iu(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function r7(e){return ml({...e,select:t=>e.select?e.select(t.context):t.context})}function Nye(e,t){const n=gr(),r=Sve(t),{activeProps:o,inactiveProps:s,activeOptions:a,to:u,preload:c,preloadDelay:f,preloadIntentProximity:h,hashScrollIntoView:m,replace:g,startTransition:v,resetScroll:w,viewTransition:S,children:C,target:E,disabled:I,style:A,className:T,onClick:N,onBlur:M,onFocus:R,onMouseEnter:k,onMouseLeave:L,onTouchStart:q,ignoreBlocker:$,params:D,search:j,hash:Z,state:he,mask:B,reloadDocument:Q,unsafeRelative:ae,from:ue,_fromLocation:Ce,...U}=e,X=Z9(),ie=_.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),oe=pr(n.stores.location,Pt=>Pt,(Pt,Tn)=>Pt.href===Tn.href),fe=_.useMemo(()=>{const Pt={_fromLocation:oe,...ie};return n.buildLocation(Pt)},[n,oe,ie]),Me=fe.maskedLocation?fe.maskedLocation.publicHref:fe.publicHref,Ae=fe.maskedLocation?fe.maskedLocation.external:fe.external,se=_.useMemo(()=>Fye(Me,Ae,n.history,I),[I,Ae,Me,n.history]),we=_.useMemo(()=>{if(se?.external)return Hg(se.href,n.protocolAllowlist)?void 0:se.href;if(!zye(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),Hg(u,n.protocolAllowlist)?void 0:u}catch{}},[u,se,n.protocolAllowlist]),Ze=_.useMemo(()=>{if(we)return!1;if(a?.exact){if(!Fve(oe.pathname,fe.pathname,n.basepath))return!1}else{const Pt=qg(oe.pathname,n.basepath),Tn=qg(fe.pathname,n.basepath);if(!(Pt.startsWith(Tn)&&(Pt.length===Tn.length||Pt[Tn.length]==="/")))return!1}return(a?.includeSearch??!0)&&!$a(oe.search,fe.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?X&&oe.hash===fe.hash:!0},[a?.exact,a?.explicitUndefined,a?.includeHash,a?.includeSearch,oe,we,X,fe.hash,fe.pathname,fe.search,n.basepath]),ve=Ze?Oa(o,{})??kye:NE,pt=Ze?NE:Oa(s,{})??NE,mt=[T,ve.className,pt.className].filter(Boolean).join(" "),Ye=(A||ve.style||pt.style)&&{...A,...ve.style,...pt.style},[mn,Qe]=_.useState(!1),Ks=_.useRef(!1),Yo=e.reloadDocument||we?!1:c??n.options.defaultPreload,ra=f??n.options.defaultPreloadDelay??0,oo=_.useCallback(()=>{n.preloadRoute({...ie,_builtLocation:fe}).catch(Pt=>{console.warn(Pt),console.warn(Sye)})},[n,ie,fe]);bve(r,_.useCallback(Pt=>{Pt?.isIntersecting&&oo()},[oo]),$ye,{disabled:!!I||Yo!=="viewport"}),_.useEffect(()=>{Ks.current||!I&&Yo==="render"&&(oo(),Ks.current=!0)},[I,oo,Yo]);const Ac=Pt=>{const Tn=Pt.currentTarget.getAttribute("target"),_o=E!==void 0?E:Tn;if(!I&&!jye(Pt)&&!Pt.defaultPrevented&&(!_o||_o==="_self")&&Pt.button===0){Pt.preventDefault(),sne.flushSync(()=>{Qe(!0)});const Sl=n.subscribe("onResolved",()=>{Sl(),Qe(!1)});n.navigate({...ie,replace:g,resetScroll:w,hashScrollIntoView:m,startTransition:v,viewTransition:S,ignoreBlocker:$})}};if(we)return{...U,ref:r,href:we,...C&&{children:C},...E&&{target:E},...I&&{disabled:I},...A&&{style:A},...T&&{className:T},...N&&{onClick:N},...M&&{onBlur:M},...R&&{onFocus:R},...k&&{onMouseEnter:k},...L&&{onMouseLeave:L},...q&&{onTouchStart:q}};const wh=Pt=>{if(I||Yo!=="intent")return;if(!ra){oo();return}const Tn=Pt.currentTarget;if(Ld.has(Tn))return;const _o=setTimeout(()=>{Ld.delete(Tn),oo()},ra);Ld.set(Tn,_o)},gb=Pt=>{I||Yo!=="intent"||oo()},Fn=Pt=>{if(I||!Yo||!ra)return;const Tn=Pt.currentTarget,_o=Ld.get(Tn);_o&&(clearTimeout(_o),Ld.delete(Tn))};return{...U,...ve,...pt,href:se?.href,ref:r,onClick:du([N,Ac]),onBlur:du([M,Fn]),onFocus:du([R,wh]),onMouseEnter:du([k,wh]),onMouseLeave:du([L,Fn]),onTouchStart:du([q,gb]),disabled:!!I,target:E,...Ye&&{style:Ye},...mt&&{className:mt},...I&&Dye,...Ze&&Lye,...X&&mn&&Uye}}var NE={},kye={className:"active"},Dye={role:"link","aria-disabled":!0},Lye={"data-status":"active","aria-current":"page"},Uye={"data-transitioning":"transitioning"},Ld=new WeakMap,$ye={rootMargin:"100px"},du=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Fye(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function zye(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}function b5e(e){return _.forwardRef(function(n,r){return O.jsx(gR,{...n,_asChild:e,ref:r})})}var gR=_.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,...s}=Nye(r,t),a=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:u,...c}=s;return _.createElement("a",c,a)}return _.createElement(n,s,a)});function jye(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Bye=class extends K9{constructor(t){super(t),this.useMatch=n=>ml({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>r7({...n,from:this.id}),this.useSearch=n=>Dy({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>n7({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>t7({...n,from:this.id}),this.useLoaderData=n=>e7({...n,from:this.id}),this.useNavigate=()=>hh({from:this.fullPath}),this.Link=F.forwardRef((n,r)=>O.jsx(gR,{ref:r,from:this.fullPath,...n}))}};function Hye(e){return new Bye(e)}function qye(){return e=>Wye(e)}var Vye=class extends wye{constructor(e){super(e),this.useMatch=t=>ml({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>r7({...t,from:this.id}),this.useSearch=t=>Dy({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>n7({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>t7({...t,from:this.id}),this.useLoaderData=t=>e7({...t,from:this.id}),this.useNavigate=()=>hh({from:this.fullPath}),this.Link=F.forwardRef((t,n)=>O.jsx(gR,{ref:n,from:this.fullPath,...t}))}};function Wye(e){return new Vye(e)}function ye(e){return new Gye(e,{silent:!0}).createRoute}var Gye=class{constructor(e,t){this.path=e,this.createRoute=n=>{const r=Hye(n);return r.isRoot=!1,r},this.silent=t?.silent}};function _e(e,t){let n,r,o,s;const a=()=>(n||(n=e().then(c=>{n=void 0,r=c[t??"default"]}).catch(c=>{if(o=c,Eve(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),u=function(f){if(s)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!r)if(P4)P4(a());else throw a();return _.createElement(r,f)};return u.preload=a,u}function Kye(e){const t=gr(),n=`not-found-${pr(t.stores.location,r=>r.pathname)}-${pr(t.stores.status,r=>r)}`;return O.jsx(pR,{getResetKey:()=>n,onCatch:(r,o)=>{if(Bn(r))e.onCatch?.(r,o);else throw r},errorComponent:({error:r})=>{if(Bn(r))return e.fallback?.(r);throw r},children:e.children})}function Zye(){return O.jsx("p",{children:"Not Found"})}function wu(e){return O.jsx(O.Fragment,{children:e.children})}function o7(e,t,n){return t.options.notFoundComponent?O.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?O.jsx(e.options.defaultNotFoundComponent,{...n}):O.jsx(Zye,{})}function Yye(e){return null}function Qye(){return Yye(gr()),null}var Xye=(e,t)=>e.routeId===t.routeId&&e._displayPending===t._displayPending,Jye=(e,t)=>e[0]===t[0]&&e[1]===t[1],s7=_.memo(function({matchId:t}){const n=gr(),r=n.stores.matchStores.get(t);r||Ts();const o=pr(n.stores.loadedAt,a=>a),s=pr(r,a=>a,Xye);return O.jsx(ebe,{router:n,matchId:t,resetKey:o,matchState:_.useMemo(()=>{const a=s.routeId,u=n.routesById[a].parentRoute?.id;return{routeId:a,ssr:s.ssr,_displayPending:s._displayPending,parentRouteId:u}},[s._displayPending,s.routeId,s.ssr,n.routesById])})});function ebe({router:e,matchId:t,resetKey:n,matchState:r}){const o=e.routesById[r.routeId],s=o.options.pendingComponent??e.options.defaultPendingComponent,a=s?O.jsx(s,{}):null,u=o.options.errorComponent??e.options.defaultErrorComponent,c=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:wu,g=u?pR:wu,v=f?Kye:wu;return O.jsxs(o.isRoot?o.options.shellComponent??wu:wu,{children:[O.jsx(ky.Provider,{value:t,children:O.jsx(m,{fallback:a,children:O.jsx(g,{getResetKey:()=>n,errorComponent:u||mR,onCatch:(w,S)=>{if(Bn(w))throw w.routeId??=r.routeId,w;c?.(w,S)},children:O.jsx(v,{fallback:w=>{if(w.routeId??=r.routeId,!f||w.routeId&&w.routeId!==r.routeId||!w.routeId&&!o.isRoot)throw w;return _.createElement(f,w)},children:h||r._displayPending?O.jsx(Eye,{fallback:a,children:O.jsx(tU,{matchId:t})}):O.jsx(tU,{matchId:t})})})})}),r.parentRouteId===Fa?O.jsxs(O.Fragment,{children:[O.jsx(tbe,{}),e.options.scrollRestoration&&N9?O.jsx(Qye,{}):null]}):null]})}function tbe(){const e=gr(),t=_.useRef();return Iu(()=>{const n=e.stores.resolvedLocation.get(),r=t.current;n&&(!r||r.href!==n.href)&&e.emit({type:"onRendered",...Uu(e.stores.location.get(),r??n)}),t.current=n},[pr(e.stores.resolvedLocation,n=>n?.state.__TSR_key),e]),null}var tU=_.memo(function({matchId:t}){const n=gr(),r=(h,m)=>n.getMatch(h.id)?._nonReactive[m]??h._nonReactive[m],o=n.stores.matchStores.get(t);o||Ts();const s=pr(o,h=>h),a=s.routeId,u=n.routesById[a],c=_.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=u.options.component??n.options.defaultComponent;return h?O.jsx(h,{},c):O.jsx(i7,{})},[c,u.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=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(h){const m=n.getMatch(s.id);if(m&&!m._nonReactive.minPendingPromise){const g=Ku();m._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),m._nonReactive.minPendingPromise=void 0},h)}}throw r(s,"loadPromise")}if(s.status==="notFound")return Bn(s.error)||Ts(),o7(n,u,s.error);if(s.status==="redirected")throw lr(s.error)||Ts(),r(s,"loadPromise");if(s.status==="error")throw s.error;return f}),i7=_.memo(function(){const t=gr(),n=_.useContext(ky);let r,o=!1,s;{const f=n?t.stores.matchStores.get(n):void 0;[r,o]=pr(f,h=>[h?.routeId,h?.globalNotFound??!1],Jye),s=pr(t.stores.matchesId,h=>h[h.findIndex(m=>m===n)+1])}const a=r?t.routesById[r]:void 0,u=t.options.defaultPendingComponent?O.jsx(t.options.defaultPendingComponent,{}):null;if(o)return a||Ts(),o7(t,a,void 0);if(!s)return null;const c=O.jsx(s7,{matchId:s});return r===Fa?O.jsx(_.Suspense,{fallback:u,children:c}):c});function nbe(){const e=gr(),t=_.useRef({router:e,mounted:!1}),[n,r]=_.useState(!1),o=pr(e.stores.isLoading,m=>m),s=pr(e.stores.hasPending,m=>m),a=xE(o),u=o||n||s,c=xE(u),f=o||s,h=xE(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 As(e.latestLocation.publicHref)!==As(g.publicHref)&&e.commitLocation({...g,replace:!0}),()=>{m()}},[e,e.history]),Iu(()=>{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]),Iu(()=>{a&&!o&&e.emit({type:"onLoad",...Uu(e.stores.location.get(),e.stores.resolvedLocation.get())})},[a,e,o]),Iu(()=>{h&&!f&&e.emit({type:"onBeforeRouteMount",...Uu(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,h,e]),Iu(()=>{if(c&&!u){const m=Uu(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...m}),X9(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())})}},[u,c,e]),null}function rbe(){const e=gr(),t=e.routesById[Fa].options.pendingComponent??e.options.defaultPendingComponent,n=t?O.jsx(t,{}):null,r=O.jsxs(typeof document<"u"&&e.ssr?wu:_.Suspense,{fallback:n,children:[O.jsx(nbe,{}),O.jsx(obe,{})]});return e.options.InnerWrap?O.jsx(e.options.InnerWrap,{children:r}):r}function obe(){const e=gr(),t=pr(e.stores.firstId,o=>o),n=pr(e.stores.loadedAt,o=>o),r=t?O.jsx(s7,{matchId:t}):null;return O.jsx(ky.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:O.jsx(pR,{getResetKey:()=>n,errorComponent:mR,onCatch:void 0,children:r})})}var sbe=e=>({createMutableStore:eU,createReadonlyStore:eU,batch:X9}),ibe=e=>new abe(e),abe=class extends hye{constructor(e){super(e,sbe)}};function lbe({router:e,children:t,...n}){D9(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=O.jsx(Y9.Provider,{value:e,children:t});return e.options.Wrap?O.jsx(e.options.Wrap,{children:r}):r}function ube({router:e,...t}){return O.jsx(lbe,{router:e,...t,children:O.jsx(rbe,{})})}var kE={exports:{}},Ud={},DE={exports:{}},LE={};var nU;function cbe(){return nU||(nU=1,(function(e){function t(B,Q){var ae=B.length;B.push(Q);e:for(;0<ae;){var ue=ae-1>>>1,Ce=B[ue];if(0<o(Ce,Q))B[ue]=Q,B[ae]=Ce,ae=ue;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var Q=B[0],ae=B.pop();if(ae!==Q){B[0]=ae;e:for(var ue=0,Ce=B.length,U=Ce>>>1;ue<U;){var X=2*(ue+1)-1,ie=B[X],oe=X+1,fe=B[oe];if(0>o(ie,ae))oe<Ce&&0>o(fe,ie)?(B[ue]=fe,B[oe]=ae,ue=oe):(B[ue]=ie,B[X]=ae,ue=X);else if(oe<Ce&&0>o(fe,ae))B[ue]=fe,B[oe]=ae,ue=oe;else break e}}return Q}function o(B,Q){var ae=B.sortIndex-Q.sortIndex;return ae!==0?ae:B.id-Q.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,u=a.now();e.unstable_now=function(){return a.now()-u}}var c=[],f=[],h=1,m=null,g=3,v=!1,w=!1,S=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function T(B){for(var Q=n(f);Q!==null;){if(Q.callback===null)r(f);else if(Q.startTime<=B)r(f),Q.sortIndex=Q.expirationTime,t(c,Q);else break;Q=n(f)}}function N(B){if(S=!1,T(B),!w)if(n(c)!==null)w=!0,M||(M=!0,D());else{var Q=n(f);Q!==null&&he(N,Q.startTime-B)}}var M=!1,R=-1,k=5,L=-1;function q(){return C?!0:!(e.unstable_now()-L<k)}function $(){if(C=!1,M){var B=e.unstable_now();L=B;var Q=!0;try{e:{w=!1,S&&(S=!1,I(R),R=-1),v=!0;var ae=g;try{t:{for(T(B),m=n(c);m!==null&&!(m.expirationTime>B&&q());){var ue=m.callback;if(typeof ue=="function"){m.callback=null,g=m.priorityLevel;var Ce=ue(m.expirationTime<=B);if(B=e.unstable_now(),typeof Ce=="function"){m.callback=Ce,T(B),Q=!0;break t}m===n(c)&&r(c),T(B)}else r(c);m=n(c)}if(m!==null)Q=!0;else{var U=n(f);U!==null&&he(N,U.startTime-B),Q=!1}}break e}finally{m=null,g=ae,v=!1}Q=void 0}}finally{Q?D():M=!1}}}var D;if(typeof A=="function")D=function(){A($)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,Z=j.port2;j.port1.onmessage=$,D=function(){Z.postMessage(null)}}else D=function(){E($,0)};function he(B,Q){R=E(function(){B(e.unstable_now())},Q)}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(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(B){switch(g){case 1:case 2:case 3:var Q=3;break;default:Q=g}var ae=g;g=Q;try{return B()}finally{g=ae}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(B,Q){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ae=g;g=B;try{return Q()}finally{g=ae}},e.unstable_scheduleCallback=function(B,Q,ae){var ue=e.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?ue+ae:ue):ae=ue,B){case 1:var Ce=-1;break;case 2:Ce=250;break;case 5:Ce=1073741823;break;case 4:Ce=1e4;break;default:Ce=5e3}return Ce=ae+Ce,B={id:h++,callback:Q,priorityLevel:B,startTime:ae,expirationTime:Ce,sortIndex:-1},ae>ue?(B.sortIndex=ae,t(f,B),n(c)===null&&B===n(f)&&(S?(I(R),R=-1):S=!0,he(N,ae-ue))):(B.sortIndex=Ce,t(c,B),w||v||(w=!0,M||(M=!0,D()))),B},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(B){var Q=g;return function(){var ae=g;g=Q;try{return B.apply(this,arguments)}finally{g=ae}}}})(LE)),LE}var rU;function dbe(){return rU||(rU=1,DE.exports=cbe()),DE.exports}var oU;function fbe(){if(oU)return Ud;oU=1;var e=dbe(),t=sh(),n=lF();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 u(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 c(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 b=y.alternate;if(b===null){if(p=y.return,p!==null){d=p;continue}break}if(y.child===b.child){for(b=y.child;b;){if(b===d)return c(y),i;if(b===p)return c(y),l;b=b.sibling}throw Error(r(188))}if(d.return!==p.return)d=y,p=b;else{for(var x=!1,P=y.child;P;){if(P===d){x=!0,d=y,p=b;break}if(P===p){x=!0,p=y,d=b;break}P=P.sibling}if(!x){for(P=b.child;P;){if(P===d){x=!0,d=b,p=y;break}if(P===p){x=!0,p=b,d=y;break}P=P.sibling}if(!x)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"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),A=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),$=Symbol.iterator;function D(i){return i===null||typeof i!="object"?null:(i=$&&i[$]||i["@@iterator"],typeof i=="function"?i:null)}var j=Symbol.for("react.client.reference");function Z(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===j?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case S:return"Fragment";case E:return"Profiler";case C:return"StrictMode";case N:return"Suspense";case M:return"SuspenseList";case L:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case w:return"Portal";case A:return i.displayName||"Context";case I:return(i._context.displayName||"Context")+".Consumer";case T:var l=i.render;return i=i.displayName,i||(i=l.displayName||l.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case R:return l=i.displayName||null,l!==null?l:Z(i.type)||"Memo";case k:l=i._payload,i=i._init;try{return Z(i(l))}catch{}}return null}var he=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},ue=[],Ce=-1;function U(i){return{current:i}}function X(i){0>Ce||(i.current=ue[Ce],ue[Ce]=null,Ce--)}function ie(i,l){Ce++,ue[Ce]=i.current,i.current=l}var oe=U(null),fe=U(null),Me=U(null),Ae=U(null);function se(i,l){switch(ie(Me,l),ie(fe,i),ie(oe,null),l.nodeType){case 9:case 11:i=(i=l.documentElement)&&(i=i.namespaceURI)?rP(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=rP(l),i=oP(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}X(oe),ie(oe,i)}function we(){X(oe),X(fe),X(Me)}function Ze(i){i.memoizedState!==null&&ie(Ae,i);var l=oe.current,d=oP(l,i.type);l!==d&&(ie(fe,i),ie(oe,d))}function ve(i){fe.current===i&&(X(oe),X(fe)),Ae.current===i&&(X(Ae),gd._currentValue=ae)}var pt,mt;function Ye(i){if(pt===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);pt=l&&l[1]||"",mt=-1<d.stack.indexOf(`
|
|
81
|
-
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
82
|
-
`+pt+i+mt}var mn=!1;function Qe(i,l){if(!i||mn)return"";mn=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(l){var ne=function(){throw Error()};if(Object.defineProperty(ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ne,[])}catch(Y){var K=Y}Reflect.construct(i,[],ne)}else{try{ne.call()}catch(Y){K=Y}i.call(ne.prototype)}}else{try{throw Error()}catch(Y){K=Y}(ne=i())&&typeof ne.catch=="function"&&ne.catch(function(){})}}catch(Y){if(Y&&K&&typeof Y.stack=="string")return[Y.stack,K.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 b=p.DetermineComponentFrameRoot(),x=b[0],P=b[1];if(x&&P){var z=x.split(`
|
|
83
|
-
`),G=P.split(`
|
|
84
|
-
`);for(y=p=0;p<z.length&&!z[p].includes("DetermineComponentFrameRoot");)p++;for(;y<G.length&&!G[y].includes("DetermineComponentFrameRoot");)y++;if(p===z.length||y===G.length)for(p=z.length-1,y=G.length-1;1<=p&&0<=y&&z[p]!==G[y];)y--;for(;1<=p&&0<=y;p--,y--)if(z[p]!==G[y]){if(p!==1||y!==1)do if(p--,y--,0>y||z[p]!==G[y]){var J=`
|
|
85
|
-
`+z[p].replace(" at new "," at ");return i.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",i.displayName)),J}while(1<=p&&0<=y);break}}}finally{mn=!1,Error.prepareStackTrace=d}return(d=i?i.displayName||i.name:"")?Ye(d):""}function Ks(i,l){switch(i.tag){case 26:case 27:case 5:return Ye(i.type);case 16:return Ye("Lazy");case 13:return i.child!==l&&l!==null?Ye("Suspense Fallback"):Ye("Suspense");case 19:return Ye("SuspenseList");case 0:case 15:return Qe(i.type,!1);case 11:return Qe(i.type.render,!1);case 1:return Qe(i.type,!0);case 31:return Ye("Activity");default:return""}}function Yo(i){try{var l="",d=null;do l+=Ks(i,d),d=i,i=i.return;while(i);return l}catch(p){return`
|
|
86
|
-
Error generating stack: `+p.message+`
|
|
87
|
-
`+p.stack}}var ra=Object.prototype.hasOwnProperty,oo=e.unstable_scheduleCallback,Ac=e.unstable_cancelCallback,wh=e.unstable_shouldYield,gb=e.unstable_requestPaint,Fn=e.unstable_now,Pt=e.unstable_getCurrentPriorityLevel,Tn=e.unstable_ImmediatePriority,_o=e.unstable_UserBlockingPriority,Sl=e.unstable_NormalPriority,Qq=e.unstable_LowPriority,UT=e.unstable_IdlePriority,Xq=e.log,Jq=e.unstable_setDisableYieldValue,Rc=null,yr=null;function Zs(i){if(typeof Xq=="function"&&Jq(i),yr&&typeof yr.setStrictMode=="function")try{yr.setStrictMode(Rc,i)}catch{}}var br=Math.clz32?Math.clz32:nV,eV=Math.log,tV=Math.LN2;function nV(i){return i>>>=0,i===0?32:31-(eV(i)/tV|0)|0}var Ch=256,Eh=262144,_h=4194304;function oa(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 xh(i,l,d){var p=i.pendingLanes;if(p===0)return 0;var y=0,b=i.suspendedLanes,x=i.pingedLanes;i=i.warmLanes;var P=p&134217727;return P!==0?(p=P&~b,p!==0?y=oa(p):(x&=P,x!==0?y=oa(x):d||(d=P&~i,d!==0&&(y=oa(d))))):(P=p&~b,P!==0?y=oa(P):x!==0?y=oa(x):d||(d=p&~i,d!==0&&(y=oa(d)))),y===0?0:l!==0&&l!==y&&(l&b)===0&&(b=y&-y,d=l&-l,b>=d||b===32&&(d&4194048)!==0)?l:y}function Tc(i,l){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&l)===0}function rV(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 $T(){var i=_h;return _h<<=1,(_h&62914560)===0&&(_h=4194304),i}function vb(i){for(var l=[],d=0;31>d;d++)l.push(i);return l}function Oc(i,l){i.pendingLanes|=l,l!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function oV(i,l,d,p,y,b){var x=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 P=i.entanglements,z=i.expirationTimes,G=i.hiddenUpdates;for(d=x&~d;0<d;){var J=31-br(d),ne=1<<J;P[J]=0,z[J]=-1;var K=G[J];if(K!==null)for(G[J]=null,J=0;J<K.length;J++){var Y=K[J];Y!==null&&(Y.lane&=-536870913)}d&=~ne}p!==0&&FT(i,p,0),b!==0&&y===0&&i.tag!==0&&(i.suspendedLanes|=b&~(x&~l))}function FT(i,l,d){i.pendingLanes|=l,i.suspendedLanes&=~l;var p=31-br(l);i.entangledLanes|=l,i.entanglements[p]=i.entanglements[p]|1073741824|d&261930}function zT(i,l){var d=i.entangledLanes|=l;for(i=i.entanglements;d;){var p=31-br(d),y=1<<p;y&l|i[p]&l&&(i[p]|=l),d&=~y}}function jT(i,l){var d=l&-l;return d=(d&42)!==0?1:yb(d),(d&(i.suspendedLanes|l))!==0?0:d}function yb(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 bb(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function BT(){var i=Q.p;return i!==0?i:(i=window.event,i===void 0?32:AP(i.type))}function HT(i,l){var d=Q.p;try{return Q.p=i,l()}finally{Q.p=d}}var Ys=Math.random().toString(36).slice(2),On="__reactFiber$"+Ys,Jn="__reactProps$"+Ys,wl="__reactContainer$"+Ys,Sb="__reactEvents$"+Ys,sV="__reactListeners$"+Ys,iV="__reactHandles$"+Ys,qT="__reactResources$"+Ys,Mc="__reactMarker$"+Ys;function wb(i){delete i[On],delete i[Jn],delete i[Sb],delete i[sV],delete i[iV]}function Cl(i){var l=i[On];if(l)return l;for(var d=i.parentNode;d;){if(l=d[wl]||d[On]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(i=dP(i);i!==null;){if(d=i[On])return d;i=dP(i)}return l}i=d,d=i.parentNode}return null}function El(i){if(i=i[On]||i[wl]){var l=i.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return i}return null}function Pc(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i.stateNode;throw Error(r(33))}function _l(i){var l=i[qT];return l||(l=i[qT]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function wn(i){i[Mc]=!0}var VT=new Set,WT={};function sa(i,l){xl(i,l),xl(i+"Capture",l)}function xl(i,l){for(WT[i]=l,i=0;i<l.length;i++)VT.add(l[i])}var aV=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]*$"),GT={},KT={};function lV(i){return ra.call(KT,i)?!0:ra.call(GT,i)?!1:aV.test(i)?KT[i]=!0:(GT[i]=!0,!1)}function Ih(i,l,d){if(lV(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 Ah(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 Qo(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 Dr(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function ZT(i){var l=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function uV(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,b=p.set;return Object.defineProperty(i,l,{configurable:!0,get:function(){return y.call(this)},set:function(x){d=""+x,b.call(this,x)}}),Object.defineProperty(i,l,{enumerable:p.enumerable}),{getValue:function(){return d},setValue:function(x){d=""+x},stopTracking:function(){i._valueTracker=null,delete i[l]}}}}function Cb(i){if(!i._valueTracker){var l=ZT(i)?"checked":"value";i._valueTracker=uV(i,l,""+i[l])}}function YT(i){if(!i)return!1;var l=i._valueTracker;if(!l)return!0;var d=l.getValue(),p="";return i&&(p=ZT(i)?i.checked?"true":"false":i.value),i=p,i!==d?(l.setValue(i),!0):!1}function Rh(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 cV=/[\n"\\]/g;function Lr(i){return i.replace(cV,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Eb(i,l,d,p,y,b,x,P){i.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?i.type=x:i.removeAttribute("type"),l!=null?x==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+Dr(l)):i.value!==""+Dr(l)&&(i.value=""+Dr(l)):x!=="submit"&&x!=="reset"||i.removeAttribute("value"),l!=null?_b(i,x,Dr(l)):d!=null?_b(i,x,Dr(d)):p!=null&&i.removeAttribute("value"),y==null&&b!=null&&(i.defaultChecked=!!b),y!=null&&(i.checked=y&&typeof y!="function"&&typeof y!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?i.name=""+Dr(P):i.removeAttribute("name")}function QT(i,l,d,p,y,b,x,P){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(i.type=b),l!=null||d!=null){if(!(b!=="submit"&&b!=="reset"||l!=null)){Cb(i);return}d=d!=null?""+Dr(d):"",l=l!=null?""+Dr(l):d,P||l===i.value||(i.value=l),i.defaultValue=l}p=p??y,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=P?i.checked:!!p,i.defaultChecked=!!p,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(i.name=x),Cb(i)}function _b(i,l,d){l==="number"&&Rh(i.ownerDocument)===i||i.defaultValue===""+d||(i.defaultValue=""+d)}function Il(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=""+Dr(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 XT(i,l,d){if(l!=null&&(l=""+Dr(l),l!==i.value&&(i.value=l),d==null)){i.defaultValue!==l&&(i.defaultValue=l);return}i.defaultValue=d!=null?""+Dr(d):""}function JT(i,l,d,p){if(l==null){if(p!=null){if(d!=null)throw Error(r(92));if(he(p)){if(1<p.length)throw Error(r(93));p=p[0]}d=p}d==null&&(d=""),l=d}d=Dr(l),i.defaultValue=d,p=i.textContent,p===d&&p!==""&&p!==null&&(i.value=p),Cb(i)}function Al(i,l){if(l){var d=i.firstChild;if(d&&d===i.lastChild&&d.nodeType===3){d.nodeValue=l;return}}i.textContent=l}var dV=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 eO(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||dV.has(l)?l==="float"?i.cssFloat=d:i[l]=(""+d).trim():i[l]=d+"px"}function tO(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&&eO(i,y,p)}else for(var b in l)l.hasOwnProperty(b)&&eO(i,b,l[b])}function xb(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 fV=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"]]),hV=/^[\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 Th(i){return hV.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Xo(){}var Ib=null;function Ab(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Rl=null,Tl=null;function nO(i){var l=El(i);if(l&&(i=l.stateNode)){var d=i[Jn]||null;e:switch(i=l.stateNode,l.type){case"input":if(Eb(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="'+Lr(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var p=d[l];if(p!==i&&p.form===i.form){var y=p[Jn]||null;if(!y)throw Error(r(90));Eb(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&&YT(p)}break e;case"textarea":XT(i,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&Il(i,!!d.multiple,l,!1)}}}var Rb=!1;function rO(i,l,d){if(Rb)return i(l,d);Rb=!0;try{var p=i(l);return p}finally{if(Rb=!1,(Rl!==null||Tl!==null)&&(gp(),Rl&&(l=Rl,i=Tl,Tl=Rl=null,nO(l),i)))for(l=0;l<i.length;l++)nO(i[l])}}function Nc(i,l){var d=i.stateNode;if(d===null)return null;var p=d[Jn]||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 Jo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tb=!1;if(Jo)try{var kc={};Object.defineProperty(kc,"passive",{get:function(){Tb=!0}}),window.addEventListener("test",kc,kc),window.removeEventListener("test",kc,kc)}catch{Tb=!1}var Qs=null,Ob=null,Oh=null;function oO(){if(Oh)return Oh;var i,l=Ob,d=l.length,p,y="value"in Qs?Qs.value:Qs.textContent,b=y.length;for(i=0;i<d&&l[i]===y[i];i++);var x=d-i;for(p=1;p<=x&&l[d-p]===y[b-p];p++);return Oh=y.slice(i,1<p?1-p:void 0)}function Mh(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 Ph(){return!0}function sO(){return!1}function er(i){function l(d,p,y,b,x){this._reactName=d,this._targetInst=y,this.type=p,this.nativeEvent=b,this.target=x,this.currentTarget=null;for(var P in i)i.hasOwnProperty(P)&&(d=i[P],this[P]=d?d(b):b[P]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Ph:sO,this.isPropagationStopped=sO,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=Ph)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Ph)},persist:function(){},isPersistent:Ph}),l}var ia={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nh=er(ia),Dc=m({},ia,{view:0,detail:0}),pV=er(Dc),Mb,Pb,Lc,kh=m({},Dc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kb,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!==Lc&&(Lc&&i.type==="mousemove"?(Mb=i.screenX-Lc.screenX,Pb=i.screenY-Lc.screenY):Pb=Mb=0,Lc=i),Mb)},movementY:function(i){return"movementY"in i?i.movementY:Pb}}),iO=er(kh),mV=m({},kh,{dataTransfer:0}),gV=er(mV),vV=m({},Dc,{relatedTarget:0}),Nb=er(vV),yV=m({},ia,{animationName:0,elapsedTime:0,pseudoElement:0}),bV=er(yV),SV=m({},ia,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),wV=er(SV),CV=m({},ia,{data:0}),aO=er(CV),EV={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_V={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"},xV={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function IV(i){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(i):(i=xV[i])?!!l[i]:!1}function kb(){return IV}var AV=m({},Dc,{key:function(i){if(i.key){var l=EV[i.key]||i.key;if(l!=="Unidentified")return l}return i.type==="keypress"?(i=Mh(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?_V[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kb,charCode:function(i){return i.type==="keypress"?Mh(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Mh(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),RV=er(AV),TV=m({},kh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lO=er(TV),OV=m({},Dc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kb}),MV=er(OV),PV=m({},ia,{propertyName:0,elapsedTime:0,pseudoElement:0}),NV=er(PV),kV=m({},kh,{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}),DV=er(kV),LV=m({},ia,{newState:0,oldState:0}),UV=er(LV),$V=[9,13,27,32],Db=Jo&&"CompositionEvent"in window,Uc=null;Jo&&"documentMode"in document&&(Uc=document.documentMode);var FV=Jo&&"TextEvent"in window&&!Uc,uO=Jo&&(!Db||Uc&&8<Uc&&11>=Uc),cO=" ",dO=!1;function fO(i,l){switch(i){case"keyup":return $V.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hO(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ol=!1;function zV(i,l){switch(i){case"compositionend":return hO(l);case"keypress":return l.which!==32?null:(dO=!0,cO);case"textInput":return i=l.data,i===cO&&dO?null:i;default:return null}}function jV(i,l){if(Ol)return i==="compositionend"||!Db&&fO(i,l)?(i=oO(),Oh=Ob=Qs=null,Ol=!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 uO&&l.locale!=="ko"?null:l.data;default:return null}}var BV={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 pO(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l==="input"?!!BV[i.type]:l==="textarea"}function mO(i,l,d,p){Rl?Tl?Tl.push(p):Tl=[p]:Rl=p,l=Ep(l,"onChange"),0<l.length&&(d=new Nh("onChange","change",null,d,p),i.push({event:d,listeners:l}))}var $c=null,Fc=null;function HV(i){QM(i,0)}function Dh(i){var l=Pc(i);if(YT(l))return i}function gO(i,l){if(i==="change")return l}var vO=!1;if(Jo){var Lb;if(Jo){var Ub="oninput"in document;if(!Ub){var yO=document.createElement("div");yO.setAttribute("oninput","return;"),Ub=typeof yO.oninput=="function"}Lb=Ub}else Lb=!1;vO=Lb&&(!document.documentMode||9<document.documentMode)}function bO(){$c&&($c.detachEvent("onpropertychange",SO),Fc=$c=null)}function SO(i){if(i.propertyName==="value"&&Dh(Fc)){var l=[];mO(l,Fc,i,Ab(i)),rO(HV,l)}}function qV(i,l,d){i==="focusin"?(bO(),$c=l,Fc=d,$c.attachEvent("onpropertychange",SO)):i==="focusout"&&bO()}function VV(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Dh(Fc)}function WV(i,l){if(i==="click")return Dh(l)}function GV(i,l){if(i==="input"||i==="change")return Dh(l)}function KV(i,l){return i===l&&(i!==0||1/i===1/l)||i!==i&&l!==l}var Sr=typeof Object.is=="function"?Object.is:KV;function zc(i,l){if(Sr(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(!ra.call(l,y)||!Sr(i[y],l[y]))return!1}return!0}function wO(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function CO(i,l){var d=wO(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=wO(d)}}function EO(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?EO(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function _O(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var l=Rh(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=Rh(i.document)}return l}function $b(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 ZV=Jo&&"documentMode"in document&&11>=document.documentMode,Ml=null,Fb=null,jc=null,zb=!1;function xO(i,l,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;zb||Ml==null||Ml!==Rh(p)||(p=Ml,"selectionStart"in p&&$b(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}),jc&&zc(jc,p)||(jc=p,p=Ep(Fb,"onSelect"),0<p.length&&(l=new Nh("onSelect","select",null,l,d),i.push({event:l,listeners:p}),l.target=Ml)))}function aa(i,l){var d={};return d[i.toLowerCase()]=l.toLowerCase(),d["Webkit"+i]="webkit"+l,d["Moz"+i]="moz"+l,d}var Pl={animationend:aa("Animation","AnimationEnd"),animationiteration:aa("Animation","AnimationIteration"),animationstart:aa("Animation","AnimationStart"),transitionrun:aa("Transition","TransitionRun"),transitionstart:aa("Transition","TransitionStart"),transitioncancel:aa("Transition","TransitionCancel"),transitionend:aa("Transition","TransitionEnd")},jb={},IO={};Jo&&(IO=document.createElement("div").style,"AnimationEvent"in window||(delete Pl.animationend.animation,delete Pl.animationiteration.animation,delete Pl.animationstart.animation),"TransitionEvent"in window||delete Pl.transitionend.transition);function la(i){if(jb[i])return jb[i];if(!Pl[i])return i;var l=Pl[i],d;for(d in l)if(l.hasOwnProperty(d)&&d in IO)return jb[i]=l[d];return i}var AO=la("animationend"),RO=la("animationiteration"),TO=la("animationstart"),YV=la("transitionrun"),QV=la("transitionstart"),XV=la("transitioncancel"),OO=la("transitionend"),MO=new Map,Bb="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(" ");Bb.push("scrollEnd");function so(i,l){MO.set(i,l),sa(l,[i])}var Lh=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)},Ur=[],Nl=0,Hb=0;function Uh(){for(var i=Nl,l=Hb=Nl=0;l<i;){var d=Ur[l];Ur[l++]=null;var p=Ur[l];Ur[l++]=null;var y=Ur[l];Ur[l++]=null;var b=Ur[l];if(Ur[l++]=null,p!==null&&y!==null){var x=p.pending;x===null?y.next=y:(y.next=x.next,x.next=y),p.pending=y}b!==0&&PO(d,y,b)}}function $h(i,l,d,p){Ur[Nl++]=i,Ur[Nl++]=l,Ur[Nl++]=d,Ur[Nl++]=p,Hb|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function qb(i,l,d,p){return $h(i,l,d,p),Fh(i)}function ua(i,l){return $h(i,null,null,l),Fh(i)}function PO(i,l,d){i.lanes|=d;var p=i.alternate;p!==null&&(p.lanes|=d);for(var y=!1,b=i.return;b!==null;)b.childLanes|=d,p=b.alternate,p!==null&&(p.childLanes|=d),b.tag===22&&(i=b.stateNode,i===null||i._visibility&1||(y=!0)),i=b,b=b.return;return i.tag===3?(b=i.stateNode,y&&l!==null&&(y=31-br(d),i=b.hiddenUpdates,p=i[y],p===null?i[y]=[l]:p.push(l),l.lane=d|536870912),b):null}function Fh(i){if(50<ud)throw ud=0,J0=null,Error(r(185));for(var l=i.return;l!==null;)i=l,l=i.return;return i.tag===3?i.stateNode:null}var kl={};function JV(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 wr(i,l,d,p){return new JV(i,l,d,p)}function Vb(i){return i=i.prototype,!(!i||!i.isReactComponent)}function es(i,l){var d=i.alternate;return d===null?(d=wr(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 NO(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 zh(i,l,d,p,y,b){var x=0;if(p=i,typeof i=="function")Vb(i)&&(x=1);else if(typeof i=="string")x=oG(i,d,oe.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case L:return i=wr(31,d,l,y),i.elementType=L,i.lanes=b,i;case S:return ca(d.children,y,b,l);case C:x=8,y|=24;break;case E:return i=wr(12,d,l,y|2),i.elementType=E,i.lanes=b,i;case N:return i=wr(13,d,l,y),i.elementType=N,i.lanes=b,i;case M:return i=wr(19,d,l,y),i.elementType=M,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case A:x=10;break e;case I:x=9;break e;case T:x=11;break e;case R:x=14;break e;case k:x=16,p=null;break e}x=29,d=Error(r(130,i===null?"null":typeof i,"")),p=null}return l=wr(x,d,l,y),l.elementType=i,l.type=p,l.lanes=b,l}function ca(i,l,d,p){return i=wr(7,i,p,l),i.lanes=d,i}function Wb(i,l,d){return i=wr(6,i,null,l),i.lanes=d,i}function kO(i){var l=wr(18,null,null,0);return l.stateNode=i,l}function Gb(i,l,d){return l=wr(4,i.children!==null?i.children:[],i.key,l),l.lanes=d,l.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},l}var DO=new WeakMap;function $r(i,l){if(typeof i=="object"&&i!==null){var d=DO.get(i);return d!==void 0?d:(l={value:i,source:l,stack:Yo(l)},DO.set(i,l),l)}return{value:i,source:l,stack:Yo(l)}}var Dl=[],Ll=0,jh=null,Bc=0,Fr=[],zr=0,Xs=null,xo=1,Io="";function ts(i,l){Dl[Ll++]=Bc,Dl[Ll++]=jh,jh=i,Bc=l}function LO(i,l,d){Fr[zr++]=xo,Fr[zr++]=Io,Fr[zr++]=Xs,Xs=i;var p=xo;i=Io;var y=32-br(p)-1;p&=~(1<<y),d+=1;var b=32-br(l)+y;if(30<b){var x=y-y%5;b=(p&(1<<x)-1).toString(32),p>>=x,y-=x,xo=1<<32-br(l)+y|d<<y|p,Io=b+i}else xo=1<<b|d<<y|p,Io=i}function Kb(i){i.return!==null&&(ts(i,1),LO(i,1,0))}function Zb(i){for(;i===jh;)jh=Dl[--Ll],Dl[Ll]=null,Bc=Dl[--Ll],Dl[Ll]=null;for(;i===Xs;)Xs=Fr[--zr],Fr[zr]=null,Io=Fr[--zr],Fr[zr]=null,xo=Fr[--zr],Fr[zr]=null}function UO(i,l){Fr[zr++]=xo,Fr[zr++]=Io,Fr[zr++]=Xs,xo=l.id,Io=l.overflow,Xs=i}var Mn=null,kt=null,Xe=!1,Js=null,jr=!1,Yb=Error(r(519));function ei(i){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Hc($r(l,i)),Yb}function $O(i){var l=i.stateNode,d=i.type,p=i.memoizedProps;switch(l[On]=i,l[Jn]=p,d){case"dialog":Ve("cancel",l),Ve("close",l);break;case"iframe":case"object":case"embed":Ve("load",l);break;case"video":case"audio":for(d=0;d<dd.length;d++)Ve(dd[d],l);break;case"source":Ve("error",l);break;case"img":case"image":case"link":Ve("error",l),Ve("load",l);break;case"details":Ve("toggle",l);break;case"input":Ve("invalid",l),QT(l,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Ve("invalid",l);break;case"textarea":Ve("invalid",l),JT(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||tP(l.textContent,d)?(p.popover!=null&&(Ve("beforetoggle",l),Ve("toggle",l)),p.onScroll!=null&&Ve("scroll",l),p.onScrollEnd!=null&&Ve("scrollend",l),p.onClick!=null&&(l.onclick=Xo),l=!0):l=!1,l||ei(i,!0)}function FO(i){for(Mn=i.return;Mn;)switch(Mn.tag){case 5:case 31:case 13:jr=!1;return;case 27:case 3:jr=!0;return;default:Mn=Mn.return}}function Ul(i){if(i!==Mn)return!1;if(!Xe)return FO(i),Xe=!0,!1;var l=i.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=i.type,d=!(d!=="form"&&d!=="button")||p1(i.type,i.memoizedProps)),d=!d),d&&kt&&ei(i),FO(i),l===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));kt=cP(i)}else if(l===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));kt=cP(i)}else l===27?(l=kt,pi(i.type)?(i=b1,b1=null,kt=i):kt=l):kt=Mn?Hr(i.stateNode.nextSibling):null;return!0}function da(){kt=Mn=null,Xe=!1}function Qb(){var i=Js;return i!==null&&(or===null?or=i:or.push.apply(or,i),Js=null),i}function Hc(i){Js===null?Js=[i]:Js.push(i)}var Xb=U(null),fa=null,ns=null;function ti(i,l,d){ie(Xb,l._currentValue),l._currentValue=d}function rs(i){i._currentValue=Xb.current,X(Xb)}function Jb(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 e0(i,l,d,p){var y=i.child;for(y!==null&&(y.return=i);y!==null;){var b=y.dependencies;if(b!==null){var x=y.child;b=b.firstContext;e:for(;b!==null;){var P=b;b=y;for(var z=0;z<l.length;z++)if(P.context===l[z]){b.lanes|=d,P=b.alternate,P!==null&&(P.lanes|=d),Jb(b.return,d,i),p||(x=null);break e}b=P.next}}else if(y.tag===18){if(x=y.return,x===null)throw Error(r(341));x.lanes|=d,b=x.alternate,b!==null&&(b.lanes|=d),Jb(x,d,i),x=null}else x=y.child;if(x!==null)x.return=y;else for(x=y;x!==null;){if(x===i){x=null;break}if(y=x.sibling,y!==null){y.return=x.return,x=y;break}x=x.return}y=x}}function $l(i,l,d,p){i=null;for(var y=l,b=!1;y!==null;){if(!b){if((y.flags&524288)!==0)b=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var x=y.alternate;if(x===null)throw Error(r(387));if(x=x.memoizedProps,x!==null){var P=y.type;Sr(y.pendingProps.value,x.value)||(i!==null?i.push(P):i=[P])}}else if(y===Ae.current){if(x=y.alternate,x===null)throw Error(r(387));x.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(i!==null?i.push(gd):i=[gd])}y=y.return}i!==null&&e0(l,i,d,p),l.flags|=262144}function Bh(i){for(i=i.firstContext;i!==null;){if(!Sr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function ha(i){fa=i,ns=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Pn(i){return zO(fa,i)}function Hh(i,l){return fa===null&&ha(i),zO(i,l)}function zO(i,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},ns===null){if(i===null)throw Error(r(308));ns=l,i.dependencies={lanes:0,firstContext:l},i.flags|=524288}else ns=ns.next=l;return d}var eW=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()})}},tW=e.unstable_scheduleCallback,nW=e.unstable_NormalPriority,on={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function t0(){return{controller:new eW,data:new Map,refCount:0}}function qc(i){i.refCount--,i.refCount===0&&tW(nW,function(){i.controller.abort()})}var Vc=null,n0=0,Fl=0,zl=null;function rW(i,l){if(Vc===null){var d=Vc=[];n0=0,Fl=s1(),zl={status:"pending",value:void 0,then:function(p){d.push(p)}}}return n0++,l.then(jO,jO),l}function jO(){if(--n0===0&&Vc!==null){zl!==null&&(zl.status="fulfilled");var i=Vc;Vc=null,Fl=0,zl=null;for(var l=0;l<i.length;l++)(0,i[l])()}}function oW(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 BO=B.S;B.S=function(i,l){xM=Fn(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&rW(i,l),BO!==null&&BO(i,l)};var pa=U(null);function r0(){var i=pa.current;return i!==null?i:Mt.pooledCache}function qh(i,l){l===null?ie(pa,pa.current):ie(pa,l.pool)}function HO(){var i=r0();return i===null?null:{parent:on._currentValue,pool:i}}var jl=Error(r(460)),o0=Error(r(474)),Vh=Error(r(542)),Wh={then:function(){}};function qO(i){return i=i.status,i==="fulfilled"||i==="rejected"}function VO(i,l,d){switch(d=i[d],d===void 0?i.push(l):d!==l&&(l.then(Xo,Xo),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,GO(i),i;default:if(typeof l.status=="string")l.then(Xo,Xo);else{if(i=Mt,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,GO(i),i}throw ga=l,jl}}function ma(i){try{var l=i._init;return l(i._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(ga=d,jl):d}}var ga=null;function WO(){if(ga===null)throw Error(r(459));var i=ga;return ga=null,i}function GO(i){if(i===jl||i===Vh)throw Error(r(483))}var Bl=null,Wc=0;function Gh(i){var l=Wc;return Wc+=1,Bl===null&&(Bl=[]),VO(Bl,i,l)}function Gc(i,l){l=l.props.ref,i.ref=l!==void 0?l:null}function Kh(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 KO(i){function l(V,H){if(i){var W=V.deletions;W===null?(V.deletions=[H],V.flags|=16):W.push(H)}}function d(V,H){if(!i)return null;for(;H!==null;)l(V,H),H=H.sibling;return null}function p(V){for(var H=new Map;V!==null;)V.key!==null?H.set(V.key,V):H.set(V.index,V),V=V.sibling;return H}function y(V,H){return V=es(V,H),V.index=0,V.sibling=null,V}function b(V,H,W){return V.index=W,i?(W=V.alternate,W!==null?(W=W.index,W<H?(V.flags|=67108866,H):W):(V.flags|=67108866,H)):(V.flags|=1048576,H)}function x(V){return i&&V.alternate===null&&(V.flags|=67108866),V}function P(V,H,W,ee){return H===null||H.tag!==6?(H=Wb(W,V.mode,ee),H.return=V,H):(H=y(H,W),H.return=V,H)}function z(V,H,W,ee){var Re=W.type;return Re===S?J(V,H,W.props.children,ee,W.key):H!==null&&(H.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===k&&ma(Re)===H.type)?(H=y(H,W.props),Gc(H,W),H.return=V,H):(H=zh(W.type,W.key,W.props,null,V.mode,ee),Gc(H,W),H.return=V,H)}function G(V,H,W,ee){return H===null||H.tag!==4||H.stateNode.containerInfo!==W.containerInfo||H.stateNode.implementation!==W.implementation?(H=Gb(W,V.mode,ee),H.return=V,H):(H=y(H,W.children||[]),H.return=V,H)}function J(V,H,W,ee,Re){return H===null||H.tag!==7?(H=ca(W,V.mode,ee,Re),H.return=V,H):(H=y(H,W),H.return=V,H)}function ne(V,H,W){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=Wb(""+H,V.mode,W),H.return=V,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case v:return W=zh(H.type,H.key,H.props,null,V.mode,W),Gc(W,H),W.return=V,W;case w:return H=Gb(H,V.mode,W),H.return=V,H;case k:return H=ma(H),ne(V,H,W)}if(he(H)||D(H))return H=ca(H,V.mode,W,null),H.return=V,H;if(typeof H.then=="function")return ne(V,Gh(H),W);if(H.$$typeof===A)return ne(V,Hh(V,H),W);Kh(V,H)}return null}function K(V,H,W,ee){var Re=H!==null?H.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Re!==null?null:P(V,H,""+W,ee);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case v:return W.key===Re?z(V,H,W,ee):null;case w:return W.key===Re?G(V,H,W,ee):null;case k:return W=ma(W),K(V,H,W,ee)}if(he(W)||D(W))return Re!==null?null:J(V,H,W,ee,null);if(typeof W.then=="function")return K(V,H,Gh(W),ee);if(W.$$typeof===A)return K(V,H,Hh(V,W),ee);Kh(V,W)}return null}function Y(V,H,W,ee,Re){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return V=V.get(W)||null,P(H,V,""+ee,Re);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case v:return V=V.get(ee.key===null?W:ee.key)||null,z(H,V,ee,Re);case w:return V=V.get(ee.key===null?W:ee.key)||null,G(H,V,ee,Re);case k:return ee=ma(ee),Y(V,H,W,ee,Re)}if(he(ee)||D(ee))return V=V.get(W)||null,J(H,V,ee,Re,null);if(typeof ee.then=="function")return Y(V,H,W,Gh(ee),Re);if(ee.$$typeof===A)return Y(V,H,W,Hh(H,ee),Re);Kh(H,ee)}return null}function be(V,H,W,ee){for(var Re=null,it=null,Ee=H,ze=H=0,Ke=null;Ee!==null&&ze<W.length;ze++){Ee.index>ze?(Ke=Ee,Ee=null):Ke=Ee.sibling;var at=K(V,Ee,W[ze],ee);if(at===null){Ee===null&&(Ee=Ke);break}i&&Ee&&at.alternate===null&&l(V,Ee),H=b(at,H,ze),it===null?Re=at:it.sibling=at,it=at,Ee=Ke}if(ze===W.length)return d(V,Ee),Xe&&ts(V,ze),Re;if(Ee===null){for(;ze<W.length;ze++)Ee=ne(V,W[ze],ee),Ee!==null&&(H=b(Ee,H,ze),it===null?Re=Ee:it.sibling=Ee,it=Ee);return Xe&&ts(V,ze),Re}for(Ee=p(Ee);ze<W.length;ze++)Ke=Y(Ee,V,ze,W[ze],ee),Ke!==null&&(i&&Ke.alternate!==null&&Ee.delete(Ke.key===null?ze:Ke.key),H=b(Ke,H,ze),it===null?Re=Ke:it.sibling=Ke,it=Ke);return i&&Ee.forEach(function(bi){return l(V,bi)}),Xe&&ts(V,ze),Re}function Te(V,H,W,ee){if(W==null)throw Error(r(151));for(var Re=null,it=null,Ee=H,ze=H=0,Ke=null,at=W.next();Ee!==null&&!at.done;ze++,at=W.next()){Ee.index>ze?(Ke=Ee,Ee=null):Ke=Ee.sibling;var bi=K(V,Ee,at.value,ee);if(bi===null){Ee===null&&(Ee=Ke);break}i&&Ee&&bi.alternate===null&&l(V,Ee),H=b(bi,H,ze),it===null?Re=bi:it.sibling=bi,it=bi,Ee=Ke}if(at.done)return d(V,Ee),Xe&&ts(V,ze),Re;if(Ee===null){for(;!at.done;ze++,at=W.next())at=ne(V,at.value,ee),at!==null&&(H=b(at,H,ze),it===null?Re=at:it.sibling=at,it=at);return Xe&&ts(V,ze),Re}for(Ee=p(Ee);!at.done;ze++,at=W.next())at=Y(Ee,V,ze,at.value,ee),at!==null&&(i&&at.alternate!==null&&Ee.delete(at.key===null?ze:at.key),H=b(at,H,ze),it===null?Re=at:it.sibling=at,it=at);return i&&Ee.forEach(function(mG){return l(V,mG)}),Xe&&ts(V,ze),Re}function It(V,H,W,ee){if(typeof W=="object"&&W!==null&&W.type===S&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case v:e:{for(var Re=W.key;H!==null;){if(H.key===Re){if(Re=W.type,Re===S){if(H.tag===7){d(V,H.sibling),ee=y(H,W.props.children),ee.return=V,V=ee;break e}}else if(H.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===k&&ma(Re)===H.type){d(V,H.sibling),ee=y(H,W.props),Gc(ee,W),ee.return=V,V=ee;break e}d(V,H);break}else l(V,H);H=H.sibling}W.type===S?(ee=ca(W.props.children,V.mode,ee,W.key),ee.return=V,V=ee):(ee=zh(W.type,W.key,W.props,null,V.mode,ee),Gc(ee,W),ee.return=V,V=ee)}return x(V);case w:e:{for(Re=W.key;H!==null;){if(H.key===Re)if(H.tag===4&&H.stateNode.containerInfo===W.containerInfo&&H.stateNode.implementation===W.implementation){d(V,H.sibling),ee=y(H,W.children||[]),ee.return=V,V=ee;break e}else{d(V,H);break}else l(V,H);H=H.sibling}ee=Gb(W,V.mode,ee),ee.return=V,V=ee}return x(V);case k:return W=ma(W),It(V,H,W,ee)}if(he(W))return be(V,H,W,ee);if(D(W)){if(Re=D(W),typeof Re!="function")throw Error(r(150));return W=Re.call(W),Te(V,H,W,ee)}if(typeof W.then=="function")return It(V,H,Gh(W),ee);if(W.$$typeof===A)return It(V,H,Hh(V,W),ee);Kh(V,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,H!==null&&H.tag===6?(d(V,H.sibling),ee=y(H,W),ee.return=V,V=ee):(d(V,H),ee=Wb(W,V.mode,ee),ee.return=V,V=ee),x(V)):d(V,H)}return function(V,H,W,ee){try{Wc=0;var Re=It(V,H,W,ee);return Bl=null,Re}catch(Ee){if(Ee===jl||Ee===Vh)throw Ee;var it=wr(29,Ee,null,V.mode);return it.lanes=ee,it.return=V,it}}}var va=KO(!0),ZO=KO(!1),ni=!1;function s0(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function i0(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 ri(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function oi(i,l,d){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(ut&2)!==0){var y=p.pending;return y===null?l.next=l:(l.next=y.next,y.next=l),p.pending=l,l=Fh(i),PO(i,null,d),l}return $h(i,p,l,d),Fh(i)}function Kc(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,zT(i,d)}}function a0(i,l){var d=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,d===p)){var y=null,b=null;if(d=d.firstBaseUpdate,d!==null){do{var x={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};b===null?y=b=x:b=b.next=x,d=d.next}while(d!==null);b===null?y=b=l:b=b.next=l}else y=b=l;d={baseState:p.baseState,firstBaseUpdate:y,lastBaseUpdate:b,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 l0=!1;function Zc(){if(l0){var i=zl;if(i!==null)throw i}}function Yc(i,l,d,p){l0=!1;var y=i.updateQueue;ni=!1;var b=y.firstBaseUpdate,x=y.lastBaseUpdate,P=y.shared.pending;if(P!==null){y.shared.pending=null;var z=P,G=z.next;z.next=null,x===null?b=G:x.next=G,x=z;var J=i.alternate;J!==null&&(J=J.updateQueue,P=J.lastBaseUpdate,P!==x&&(P===null?J.firstBaseUpdate=G:P.next=G,J.lastBaseUpdate=z))}if(b!==null){var ne=y.baseState;x=0,J=G=z=null,P=b;do{var K=P.lane&-536870913,Y=K!==P.lane;if(Y?(Ge&K)===K:(p&K)===K){K!==0&&K===Fl&&(l0=!0),J!==null&&(J=J.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var be=i,Te=P;K=l;var It=d;switch(Te.tag){case 1:if(be=Te.payload,typeof be=="function"){ne=be.call(It,ne,K);break e}ne=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=Te.payload,K=typeof be=="function"?be.call(It,ne,K):be,K==null)break e;ne=m({},ne,K);break e;case 2:ni=!0}}K=P.callback,K!==null&&(i.flags|=64,Y&&(i.flags|=8192),Y=y.callbacks,Y===null?y.callbacks=[K]:Y.push(K))}else Y={lane:K,tag:P.tag,payload:P.payload,callback:P.callback,next:null},J===null?(G=J=Y,z=ne):J=J.next=Y,x|=K;if(P=P.next,P===null){if(P=y.shared.pending,P===null)break;Y=P,P=Y.next,Y.next=null,y.lastBaseUpdate=Y,y.shared.pending=null}}while(!0);J===null&&(z=ne),y.baseState=z,y.firstBaseUpdate=G,y.lastBaseUpdate=J,b===null&&(y.shared.lanes=0),ui|=x,i.lanes=x,i.memoizedState=ne}}function YO(i,l){if(typeof i!="function")throw Error(r(191,i));i.call(l)}function QO(i,l){var d=i.callbacks;if(d!==null)for(i.callbacks=null,i=0;i<d.length;i++)YO(d[i],l)}var Hl=U(null),Zh=U(0);function XO(i,l){i=fs,ie(Zh,i),ie(Hl,l),fs=i|l.baseLanes}function u0(){ie(Zh,fs),ie(Hl,Hl.current)}function c0(){fs=Zh.current,X(Hl),X(Zh)}var Cr=U(null),Br=null;function si(i){var l=i.alternate;ie(tn,tn.current&1),ie(Cr,i),Br===null&&(l===null||Hl.current!==null||l.memoizedState!==null)&&(Br=i)}function d0(i){ie(tn,tn.current),ie(Cr,i),Br===null&&(Br=i)}function JO(i){i.tag===22?(ie(tn,tn.current),ie(Cr,i),Br===null&&(Br=i)):ii()}function ii(){ie(tn,tn.current),ie(Cr,Cr.current)}function Er(i){X(Cr),Br===i&&(Br=null),X(tn)}var tn=U(0);function Yh(i){for(var l=i;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||v1(d)||y1(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 os=0,Fe=null,_t=null,sn=null,Qh=!1,ql=!1,ya=!1,Xh=0,Qc=0,Vl=null,sW=0;function Xt(){throw Error(r(321))}function f0(i,l){if(l===null)return!1;for(var d=0;d<l.length&&d<i.length;d++)if(!Sr(i[d],l[d]))return!1;return!0}function h0(i,l,d,p,y,b){return os=b,Fe=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,B.H=i===null||i.memoizedState===null?L2:R0,ya=!1,b=d(p,y),ya=!1,ql&&(b=t2(l,d,p,y)),e2(i),b}function e2(i){B.H=ed;var l=_t!==null&&_t.next!==null;if(os=0,sn=_t=Fe=null,Qh=!1,Qc=0,Vl=null,l)throw Error(r(300));i===null||an||(i=i.dependencies,i!==null&&Bh(i)&&(an=!0))}function t2(i,l,d,p){Fe=i;var y=0;do{if(ql&&(Vl=null),Qc=0,ql=!1,25<=y)throw Error(r(301));if(y+=1,sn=_t=null,i.updateQueue!=null){var b=i.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}B.H=U2,b=l(d,p)}while(ql);return b}function iW(){var i=B.H,l=i.useState()[0];return l=typeof l.then=="function"?Xc(l):l,i=i.useState()[0],(_t!==null?_t.memoizedState:null)!==i&&(Fe.flags|=1024),l}function p0(){var i=Xh!==0;return Xh=0,i}function m0(i,l,d){l.updateQueue=i.updateQueue,l.flags&=-2053,i.lanes&=~d}function g0(i){if(Qh){for(i=i.memoizedState;i!==null;){var l=i.queue;l!==null&&(l.pending=null),i=i.next}Qh=!1}os=0,sn=_t=Fe=null,ql=!1,Qc=Xh=0,Vl=null}function qn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return sn===null?Fe.memoizedState=sn=i:sn=sn.next=i,sn}function nn(){if(_t===null){var i=Fe.alternate;i=i!==null?i.memoizedState:null}else i=_t.next;var l=sn===null?Fe.memoizedState:sn.next;if(l!==null)sn=l,_t=i;else{if(i===null)throw Fe.alternate===null?Error(r(467)):Error(r(310));_t=i,i={memoizedState:_t.memoizedState,baseState:_t.baseState,baseQueue:_t.baseQueue,queue:_t.queue,next:null},sn===null?Fe.memoizedState=sn=i:sn=sn.next=i}return sn}function Jh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xc(i){var l=Qc;return Qc+=1,Vl===null&&(Vl=[]),i=VO(Vl,i,l),l=Fe,(sn===null?l.memoizedState:sn.next)===null&&(l=l.alternate,B.H=l===null||l.memoizedState===null?L2:R0),i}function ep(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Xc(i);if(i.$$typeof===A)return Pn(i)}throw Error(r(438,String(i)))}function v0(i){var l=null,d=Fe.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var p=Fe.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=Jh(),Fe.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]=q;return l.index++,d}function ss(i,l){return typeof l=="function"?l(i):l}function tp(i){var l=nn();return y0(l,_t,i)}function y0(i,l,d){var p=i.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=d;var y=i.baseQueue,b=p.pending;if(b!==null){if(y!==null){var x=y.next;y.next=b.next,b.next=x}l.baseQueue=y=b,p.pending=null}if(b=i.baseState,y===null)i.memoizedState=b;else{l=y.next;var P=x=null,z=null,G=l,J=!1;do{var ne=G.lane&-536870913;if(ne!==G.lane?(Ge&ne)===ne:(os&ne)===ne){var K=G.revertLane;if(K===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),ne===Fl&&(J=!0);else if((os&K)===K){G=G.next,K===Fl&&(J=!0);continue}else ne={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},z===null?(P=z=ne,x=b):z=z.next=ne,Fe.lanes|=K,ui|=K;ne=G.action,ya&&d(b,ne),b=G.hasEagerState?G.eagerState:d(b,ne)}else K={lane:ne,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},z===null?(P=z=K,x=b):z=z.next=K,Fe.lanes|=ne,ui|=ne;G=G.next}while(G!==null&&G!==l);if(z===null?x=b:z.next=P,!Sr(b,i.memoizedState)&&(an=!0,J&&(d=zl,d!==null)))throw d;i.memoizedState=b,i.baseState=x,i.baseQueue=z,p.lastRenderedState=b}return y===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function b0(i){var l=nn(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var p=d.dispatch,y=d.pending,b=l.memoizedState;if(y!==null){d.pending=null;var x=y=y.next;do b=i(b,x.action),x=x.next;while(x!==y);Sr(b,l.memoizedState)||(an=!0),l.memoizedState=b,l.baseQueue===null&&(l.baseState=b),d.lastRenderedState=b}return[b,p]}function n2(i,l,d){var p=Fe,y=nn(),b=Xe;if(b){if(d===void 0)throw Error(r(407));d=d()}else d=l();var x=!Sr((_t||y).memoizedState,d);if(x&&(y.memoizedState=d,an=!0),y=y.queue,C0(s2.bind(null,p,y,i),[i]),y.getSnapshot!==l||x||sn!==null&&sn.memoizedState.tag&1){if(p.flags|=2048,Wl(9,{destroy:void 0},o2.bind(null,p,y,d,l),null),Mt===null)throw Error(r(349));b||(os&127)!==0||r2(p,l,d)}return d}function r2(i,l,d){i.flags|=16384,i={getSnapshot:l,value:d},l=Fe.updateQueue,l===null?(l=Jh(),Fe.updateQueue=l,l.stores=[i]):(d=l.stores,d===null?l.stores=[i]:d.push(i))}function o2(i,l,d,p){l.value=d,l.getSnapshot=p,i2(l)&&a2(i)}function s2(i,l,d){return d(function(){i2(l)&&a2(i)})}function i2(i){var l=i.getSnapshot;i=i.value;try{var d=l();return!Sr(i,d)}catch{return!0}}function a2(i){var l=ua(i,2);l!==null&&sr(l,i,2)}function S0(i){var l=qn();if(typeof i=="function"){var d=i;if(i=d(),ya){Zs(!0);try{d()}finally{Zs(!1)}}}return l.memoizedState=l.baseState=i,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:i},l}function l2(i,l,d,p){return i.baseState=d,y0(i,_t,typeof p=="function"?p:ss)}function aW(i,l,d,p,y){if(op(i))throw Error(r(485));if(i=l.action,i!==null){var b={payload:y,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){b.listeners.push(x)}};B.T!==null?d(!0):b.isTransition=!1,p(b),d=l.pending,d===null?(b.next=l.pending=b,u2(l,b)):(b.next=d.next,l.pending=d.next=b)}}function u2(i,l){var d=l.action,p=l.payload,y=i.state;if(l.isTransition){var b=B.T,x={};B.T=x;try{var P=d(y,p),z=B.S;z!==null&&z(x,P),c2(i,l,P)}catch(G){w0(i,l,G)}finally{b!==null&&x.types!==null&&(b.types=x.types),B.T=b}}else try{b=d(y,p),c2(i,l,b)}catch(G){w0(i,l,G)}}function c2(i,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(p){d2(i,l,p)},function(p){return w0(i,l,p)}):d2(i,l,d)}function d2(i,l,d){l.status="fulfilled",l.value=d,f2(l),i.state=d,l=i.pending,l!==null&&(d=l.next,d===l?i.pending=null:(d=d.next,l.next=d,u2(i,d)))}function w0(i,l,d){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do l.status="rejected",l.reason=d,f2(l),l=l.next;while(l!==p)}i.action=null}function f2(i){i=i.listeners;for(var l=0;l<i.length;l++)(0,i[l])()}function h2(i,l){return l}function p2(i,l){if(Xe){var d=Mt.formState;if(d!==null){e:{var p=Fe;if(Xe){if(kt){t:{for(var y=kt,b=jr;y.nodeType!==8;){if(!b){y=null;break t}if(y=Hr(y.nextSibling),y===null){y=null;break t}}b=y.data,y=b==="F!"||b==="F"?y:null}if(y){kt=Hr(y.nextSibling),p=y.data==="F!";break e}}ei(p)}p=!1}p&&(l=d[0])}}return d=qn(),d.memoizedState=d.baseState=l,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:h2,lastRenderedState:l},d.queue=p,d=N2.bind(null,Fe,p),p.dispatch=d,p=S0(!1),b=A0.bind(null,Fe,!1,p.queue),p=qn(),y={state:l,dispatch:null,action:i,pending:null},p.queue=y,d=aW.bind(null,Fe,y,b,d),y.dispatch=d,p.memoizedState=i,[l,d,!1]}function m2(i){var l=nn();return g2(l,_t,i)}function g2(i,l,d){if(l=y0(i,l,h2)[0],i=tp(ss)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var p=Xc(l)}catch(x){throw x===jl?Vh:x}else p=l;l=nn();var y=l.queue,b=y.dispatch;return d!==l.memoizedState&&(Fe.flags|=2048,Wl(9,{destroy:void 0},lW.bind(null,y,d),null)),[p,b,i]}function lW(i,l){i.action=l}function v2(i){var l=nn(),d=_t;if(d!==null)return g2(l,d,i);nn(),l=l.memoizedState,d=nn();var p=d.queue.dispatch;return d.memoizedState=i,[l,p,!1]}function Wl(i,l,d,p){return i={tag:i,create:d,deps:p,inst:l,next:null},l=Fe.updateQueue,l===null&&(l=Jh(),Fe.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 y2(){return nn().memoizedState}function np(i,l,d,p){var y=qn();Fe.flags|=i,y.memoizedState=Wl(1|l,{destroy:void 0},d,p===void 0?null:p)}function rp(i,l,d,p){var y=nn();p=p===void 0?null:p;var b=y.memoizedState.inst;_t!==null&&p!==null&&f0(p,_t.memoizedState.deps)?y.memoizedState=Wl(l,b,d,p):(Fe.flags|=i,y.memoizedState=Wl(1|l,b,d,p))}function b2(i,l){np(8390656,8,i,l)}function C0(i,l){rp(2048,8,i,l)}function uW(i){Fe.flags|=4;var l=Fe.updateQueue;if(l===null)l=Jh(),Fe.updateQueue=l,l.events=[i];else{var d=l.events;d===null?l.events=[i]:d.push(i)}}function S2(i){var l=nn().memoizedState;return uW({ref:l,nextImpl:i}),function(){if((ut&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function w2(i,l){return rp(4,2,i,l)}function C2(i,l){return rp(4,4,i,l)}function E2(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 _2(i,l,d){d=d!=null?d.concat([i]):null,rp(4,4,E2.bind(null,l,i),d)}function E0(){}function x2(i,l){var d=nn();l=l===void 0?null:l;var p=d.memoizedState;return l!==null&&f0(l,p[1])?p[0]:(d.memoizedState=[i,l],i)}function I2(i,l){var d=nn();l=l===void 0?null:l;var p=d.memoizedState;if(l!==null&&f0(l,p[1]))return p[0];if(p=i(),ya){Zs(!0);try{i()}finally{Zs(!1)}}return d.memoizedState=[p,l],p}function _0(i,l,d){return d===void 0||(os&1073741824)!==0&&(Ge&261930)===0?i.memoizedState=l:(i.memoizedState=d,i=AM(),Fe.lanes|=i,ui|=i,d)}function A2(i,l,d,p){return Sr(d,l)?d:Hl.current!==null?(i=_0(i,d,p),Sr(i,l)||(an=!0),i):(os&42)===0||(os&1073741824)!==0&&(Ge&261930)===0?(an=!0,i.memoizedState=d):(i=AM(),Fe.lanes|=i,ui|=i,l)}function R2(i,l,d,p,y){var b=Q.p;Q.p=b!==0&&8>b?b:8;var x=B.T,P={};B.T=P,A0(i,!1,l,d);try{var z=y(),G=B.S;if(G!==null&&G(P,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var J=oW(z,p);Jc(i,l,J,Ir(i))}else Jc(i,l,p,Ir(i))}catch(ne){Jc(i,l,{then:function(){},status:"rejected",reason:ne},Ir())}finally{Q.p=b,x!==null&&P.types!==null&&(x.types=P.types),B.T=x}}function cW(){}function x0(i,l,d,p){if(i.tag!==5)throw Error(r(476));var y=T2(i).queue;R2(i,y,l,ae,d===null?cW:function(){return O2(i),d(p)})}function T2(i){var l=i.memoizedState;if(l!==null)return l;l={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:ae},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:d},next:null},i.memoizedState=l,i=i.alternate,i!==null&&(i.memoizedState=l),l}function O2(i){var l=T2(i);l.next===null&&(l=i.alternate.memoizedState),Jc(i,l.next.queue,{},Ir())}function I0(){return Pn(gd)}function M2(){return nn().memoizedState}function P2(){return nn().memoizedState}function dW(i){for(var l=i.return;l!==null;){switch(l.tag){case 24:case 3:var d=Ir();i=ri(d);var p=oi(l,i,d);p!==null&&(sr(p,l,d),Kc(p,l,d)),l={cache:t0()},i.payload=l;return}l=l.return}}function fW(i,l,d){var p=Ir();d={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},op(i)?k2(l,d):(d=qb(i,l,d,p),d!==null&&(sr(d,i,p),D2(d,l,p)))}function N2(i,l,d){var p=Ir();Jc(i,l,d,p)}function Jc(i,l,d,p){var y={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(op(i))k2(l,y);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=l.lastRenderedReducer,b!==null))try{var x=l.lastRenderedState,P=b(x,d);if(y.hasEagerState=!0,y.eagerState=P,Sr(P,x))return $h(i,l,y,0),Mt===null&&Uh(),!1}catch{}if(d=qb(i,l,y,p),d!==null)return sr(d,i,p),D2(d,l,p),!0}return!1}function A0(i,l,d,p){if(p={lane:2,revertLane:s1(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},op(i)){if(l)throw Error(r(479))}else l=qb(i,d,p,2),l!==null&&sr(l,i,2)}function op(i){var l=i.alternate;return i===Fe||l!==null&&l===Fe}function k2(i,l){ql=Qh=!0;var d=i.pending;d===null?l.next=l:(l.next=d.next,d.next=l),i.pending=l}function D2(i,l,d){if((d&4194048)!==0){var p=l.lanes;p&=i.pendingLanes,d|=p,l.lanes=d,zT(i,d)}}var ed={readContext:Pn,use:ep,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};ed.useEffectEvent=Xt;var L2={readContext:Pn,use:ep,useCallback:function(i,l){return qn().memoizedState=[i,l===void 0?null:l],i},useContext:Pn,useEffect:b2,useImperativeHandle:function(i,l,d){d=d!=null?d.concat([i]):null,np(4194308,4,E2.bind(null,l,i),d)},useLayoutEffect:function(i,l){return np(4194308,4,i,l)},useInsertionEffect:function(i,l){np(4,2,i,l)},useMemo:function(i,l){var d=qn();l=l===void 0?null:l;var p=i();if(ya){Zs(!0);try{i()}finally{Zs(!1)}}return d.memoizedState=[p,l],p},useReducer:function(i,l,d){var p=qn();if(d!==void 0){var y=d(l);if(ya){Zs(!0);try{d(l)}finally{Zs(!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=fW.bind(null,Fe,i),[p.memoizedState,i]},useRef:function(i){var l=qn();return i={current:i},l.memoizedState=i},useState:function(i){i=S0(i);var l=i.queue,d=N2.bind(null,Fe,l);return l.dispatch=d,[i.memoizedState,d]},useDebugValue:E0,useDeferredValue:function(i,l){var d=qn();return _0(d,i,l)},useTransition:function(){var i=S0(!1);return i=R2.bind(null,Fe,i.queue,!0,!1),qn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,l,d){var p=Fe,y=qn();if(Xe){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),Mt===null)throw Error(r(349));(Ge&127)!==0||r2(p,l,d)}y.memoizedState=d;var b={value:d,getSnapshot:l};return y.queue=b,b2(s2.bind(null,p,b,i),[i]),p.flags|=2048,Wl(9,{destroy:void 0},o2.bind(null,p,b,d,l),null),d},useId:function(){var i=qn(),l=Mt.identifierPrefix;if(Xe){var d=Io,p=xo;d=(p&~(1<<32-br(p)-1)).toString(32)+d,l="_"+l+"R_"+d,d=Xh++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=sW++,l="_"+l+"r_"+d.toString(32)+"_";return i.memoizedState=l},useHostTransitionStatus:I0,useFormState:p2,useActionState:p2,useOptimistic:function(i){var l=qn();l.memoizedState=l.baseState=i;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=A0.bind(null,Fe,!0,d),d.dispatch=l,[i,l]},useMemoCache:v0,useCacheRefresh:function(){return qn().memoizedState=dW.bind(null,Fe)},useEffectEvent:function(i){var l=qn(),d={impl:i};return l.memoizedState=d,function(){if((ut&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},R0={readContext:Pn,use:ep,useCallback:x2,useContext:Pn,useEffect:C0,useImperativeHandle:_2,useInsertionEffect:w2,useLayoutEffect:C2,useMemo:I2,useReducer:tp,useRef:y2,useState:function(){return tp(ss)},useDebugValue:E0,useDeferredValue:function(i,l){var d=nn();return A2(d,_t.memoizedState,i,l)},useTransition:function(){var i=tp(ss)[0],l=nn().memoizedState;return[typeof i=="boolean"?i:Xc(i),l]},useSyncExternalStore:n2,useId:M2,useHostTransitionStatus:I0,useFormState:m2,useActionState:m2,useOptimistic:function(i,l){var d=nn();return l2(d,_t,i,l)},useMemoCache:v0,useCacheRefresh:P2};R0.useEffectEvent=S2;var U2={readContext:Pn,use:ep,useCallback:x2,useContext:Pn,useEffect:C0,useImperativeHandle:_2,useInsertionEffect:w2,useLayoutEffect:C2,useMemo:I2,useReducer:b0,useRef:y2,useState:function(){return b0(ss)},useDebugValue:E0,useDeferredValue:function(i,l){var d=nn();return _t===null?_0(d,i,l):A2(d,_t.memoizedState,i,l)},useTransition:function(){var i=b0(ss)[0],l=nn().memoizedState;return[typeof i=="boolean"?i:Xc(i),l]},useSyncExternalStore:n2,useId:M2,useHostTransitionStatus:I0,useFormState:v2,useActionState:v2,useOptimistic:function(i,l){var d=nn();return _t!==null?l2(d,_t,i,l):(d.baseState=i,[i,d.queue.dispatch])},useMemoCache:v0,useCacheRefresh:P2};U2.useEffectEvent=S2;function T0(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 O0={enqueueSetState:function(i,l,d){i=i._reactInternals;var p=Ir(),y=ri(p);y.payload=l,d!=null&&(y.callback=d),l=oi(i,y,p),l!==null&&(sr(l,i,p),Kc(l,i,p))},enqueueReplaceState:function(i,l,d){i=i._reactInternals;var p=Ir(),y=ri(p);y.tag=1,y.payload=l,d!=null&&(y.callback=d),l=oi(i,y,p),l!==null&&(sr(l,i,p),Kc(l,i,p))},enqueueForceUpdate:function(i,l){i=i._reactInternals;var d=Ir(),p=ri(d);p.tag=2,l!=null&&(p.callback=l),l=oi(i,p,d),l!==null&&(sr(l,i,d),Kc(l,i,d))}};function $2(i,l,d,p,y,b,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,b,x):l.prototype&&l.prototype.isPureReactComponent?!zc(d,p)||!zc(y,b):!0}function F2(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&&O0.enqueueReplaceState(l,l.state,null)}function ba(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 z2(i){Lh(i)}function j2(i){console.error(i)}function B2(i){Lh(i)}function sp(i,l){try{var d=i.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(p){setTimeout(function(){throw p})}}function H2(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 M0(i,l,d){return d=ri(d),d.tag=3,d.payload={element:null},d.callback=function(){sp(i,l)},d}function q2(i){return i=ri(i),i.tag=3,i}function V2(i,l,d,p){var y=d.type.getDerivedStateFromError;if(typeof y=="function"){var b=p.value;i.payload=function(){return y(b)},i.callback=function(){H2(l,d,p)}}var x=d.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(i.callback=function(){H2(l,d,p),typeof y!="function"&&(ci===null?ci=new Set([this]):ci.add(this));var P=p.stack;this.componentDidCatch(p.value,{componentStack:P!==null?P:""})})}function hW(i,l,d,p,y){if(d.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(l=d.alternate,l!==null&&$l(l,d,y,!0),d=Cr.current,d!==null){switch(d.tag){case 31:case 13:return Br===null?vp():d.alternate===null&&Jt===0&&(Jt=3),d.flags&=-257,d.flags|=65536,d.lanes=y,p===Wh?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([p]):l.add(p),n1(i,p,y)),!1;case 22:return d.flags|=65536,p===Wh?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)),n1(i,p,y)),!1}throw Error(r(435,d.tag))}return n1(i,p,y),vp(),!1}if(Xe)return l=Cr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=y,p!==Yb&&(i=Error(r(422),{cause:p}),Hc($r(i,d)))):(p!==Yb&&(l=Error(r(423),{cause:p}),Hc($r(l,d))),i=i.current.alternate,i.flags|=65536,y&=-y,i.lanes|=y,p=$r(p,d),y=M0(i.stateNode,p,y),a0(i,y),Jt!==4&&(Jt=2)),!1;var b=Error(r(520),{cause:p});if(b=$r(b,d),ld===null?ld=[b]:ld.push(b),Jt!==4&&(Jt=2),l===null)return!0;p=$r(p,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,i=y&-y,d.lanes|=i,i=M0(d.stateNode,p,i),a0(d,i),!1;case 1:if(l=d.type,b=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(ci===null||!ci.has(b))))return d.flags|=65536,y&=-y,d.lanes|=y,y=q2(y),V2(y,i,d,p),a0(d,y),!1}d=d.return}while(d!==null);return!1}var P0=Error(r(461)),an=!1;function Nn(i,l,d,p){l.child=i===null?ZO(l,null,d,p):va(l,i.child,d,p)}function W2(i,l,d,p,y){d=d.render;var b=l.ref;if("ref"in p){var x={};for(var P in p)P!=="ref"&&(x[P]=p[P])}else x=p;return ha(l),p=h0(i,l,d,x,b,y),P=p0(),i!==null&&!an?(m0(i,l,y),is(i,l,y)):(Xe&&P&&Kb(l),l.flags|=1,Nn(i,l,p,y),l.child)}function G2(i,l,d,p,y){if(i===null){var b=d.type;return typeof b=="function"&&!Vb(b)&&b.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=b,K2(i,l,b,p,y)):(i=zh(d.type,null,p,l,l.mode,y),i.ref=l.ref,i.return=l,l.child=i)}if(b=i.child,!z0(i,y)){var x=b.memoizedProps;if(d=d.compare,d=d!==null?d:zc,d(x,p)&&i.ref===l.ref)return is(i,l,y)}return l.flags|=1,i=es(b,p),i.ref=l.ref,i.return=l,l.child=i}function K2(i,l,d,p,y){if(i!==null){var b=i.memoizedProps;if(zc(b,p)&&i.ref===l.ref)if(an=!1,l.pendingProps=p=b,z0(i,y))(i.flags&131072)!==0&&(an=!0);else return l.lanes=i.lanes,is(i,l,y)}return N0(i,l,d,p,y)}function Z2(i,l,d,p){var y=p.children,b=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(b=b!==null?b.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&~b}else p=0,l.child=null;return Y2(i,l,b,d,p)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},i!==null&&qh(l,b!==null?b.cachePool:null),b!==null?XO(l,b):u0(),JO(l);else return p=l.lanes=536870912,Y2(i,l,b!==null?b.baseLanes|d:d,d,p)}else b!==null?(qh(l,b.cachePool),XO(l,b),ii(),l.memoizedState=null):(i!==null&&qh(l,null),u0(),ii());return Nn(i,l,y,d),l.child}function td(i,l){return i!==null&&i.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function Y2(i,l,d,p,y){var b=r0();return b=b===null?null:{parent:on._currentValue,pool:b},l.memoizedState={baseLanes:d,cachePool:b},i!==null&&qh(l,null),u0(),JO(l),i!==null&&$l(i,l,p,!0),l.childLanes=y,null}function ip(i,l){return l=lp({mode:l.mode,children:l.children},i.mode),l.ref=i.ref,i.child=l,l.return=i,l}function Q2(i,l,d){return va(l,i.child,null,d),i=ip(l,l.pendingProps),i.flags|=2,Er(l),l.memoizedState=null,i}function pW(i,l,d){var p=l.pendingProps,y=(l.flags&128)!==0;if(l.flags&=-129,i===null){if(Xe){if(p.mode==="hidden")return i=ip(l,p),l.lanes=536870912,td(null,i);if(d0(l),(i=kt)?(i=uP(i,jr),i=i!==null&&i.data==="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:Xs!==null?{id:xo,overflow:Io}:null,retryLane:536870912,hydrationErrors:null},d=kO(i),d.return=l,l.child=d,Mn=l,kt=null)):i=null,i===null)throw ei(l);return l.lanes=536870912,null}return ip(l,p)}var b=i.memoizedState;if(b!==null){var x=b.dehydrated;if(d0(l),y)if(l.flags&256)l.flags&=-257,l=Q2(i,l,d);else if(l.memoizedState!==null)l.child=i.child,l.flags|=128,l=null;else throw Error(r(558));else if(an||$l(i,l,d,!1),y=(d&i.childLanes)!==0,an||y){if(p=Mt,p!==null&&(x=jT(p,d),x!==0&&x!==b.retryLane))throw b.retryLane=x,ua(i,x),sr(p,i,x),P0;vp(),l=Q2(i,l,d)}else i=b.treeContext,kt=Hr(x.nextSibling),Mn=l,Xe=!0,Js=null,jr=!1,i!==null&&UO(l,i),l=ip(l,p),l.flags|=4096;return l}return i=es(i.child,{mode:p.mode,children:p.children}),i.ref=l.ref,l.child=i,i.return=l,i}function ap(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 N0(i,l,d,p,y){return ha(l),d=h0(i,l,d,p,void 0,y),p=p0(),i!==null&&!an?(m0(i,l,y),is(i,l,y)):(Xe&&p&&Kb(l),l.flags|=1,Nn(i,l,d,y),l.child)}function X2(i,l,d,p,y,b){return ha(l),l.updateQueue=null,d=t2(l,p,d,y),e2(i),p=p0(),i!==null&&!an?(m0(i,l,b),is(i,l,b)):(Xe&&p&&Kb(l),l.flags|=1,Nn(i,l,d,b),l.child)}function J2(i,l,d,p,y){if(ha(l),l.stateNode===null){var b=kl,x=d.contextType;typeof x=="object"&&x!==null&&(b=Pn(x)),b=new d(p,b),l.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=O0,l.stateNode=b,b._reactInternals=l,b=l.stateNode,b.props=p,b.state=l.memoizedState,b.refs={},s0(l),x=d.contextType,b.context=typeof x=="object"&&x!==null?Pn(x):kl,b.state=l.memoizedState,x=d.getDerivedStateFromProps,typeof x=="function"&&(T0(l,d,x,p),b.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(x=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),x!==b.state&&O0.enqueueReplaceState(b,b.state,null),Yc(l,p,b,y),Zc(),b.state=l.memoizedState),typeof b.componentDidMount=="function"&&(l.flags|=4194308),p=!0}else if(i===null){b=l.stateNode;var P=l.memoizedProps,z=ba(d,P);b.props=z;var G=b.context,J=d.contextType;x=kl,typeof J=="object"&&J!==null&&(x=Pn(J));var ne=d.getDerivedStateFromProps;J=typeof ne=="function"||typeof b.getSnapshotBeforeUpdate=="function",P=l.pendingProps!==P,J||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(P||G!==x)&&F2(l,b,p,x),ni=!1;var K=l.memoizedState;b.state=K,Yc(l,p,b,y),Zc(),G=l.memoizedState,P||K!==G||ni?(typeof ne=="function"&&(T0(l,d,ne,p),G=l.memoizedState),(z=ni||$2(l,d,z,p,K,G,x))?(J||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(l.flags|=4194308)):(typeof b.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=p,l.memoizedState=G),b.props=p,b.state=G,b.context=x,p=z):(typeof b.componentDidMount=="function"&&(l.flags|=4194308),p=!1)}else{b=l.stateNode,i0(i,l),x=l.memoizedProps,J=ba(d,x),b.props=J,ne=l.pendingProps,K=b.context,G=d.contextType,z=kl,typeof G=="object"&&G!==null&&(z=Pn(G)),P=d.getDerivedStateFromProps,(G=typeof P=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(x!==ne||K!==z)&&F2(l,b,p,z),ni=!1,K=l.memoizedState,b.state=K,Yc(l,p,b,y),Zc();var Y=l.memoizedState;x!==ne||K!==Y||ni||i!==null&&i.dependencies!==null&&Bh(i.dependencies)?(typeof P=="function"&&(T0(l,d,P,p),Y=l.memoizedState),(J=ni||$2(l,d,J,p,K,Y,z)||i!==null&&i.dependencies!==null&&Bh(i.dependencies))?(G||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(p,Y,z),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(p,Y,z)),typeof b.componentDidUpdate=="function"&&(l.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof b.componentDidUpdate!="function"||x===i.memoizedProps&&K===i.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||x===i.memoizedProps&&K===i.memoizedState||(l.flags|=1024),l.memoizedProps=p,l.memoizedState=Y),b.props=p,b.state=Y,b.context=z,p=J):(typeof b.componentDidUpdate!="function"||x===i.memoizedProps&&K===i.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||x===i.memoizedProps&&K===i.memoizedState||(l.flags|=1024),p=!1)}return b=p,ap(i,l),p=(l.flags&128)!==0,b||p?(b=l.stateNode,d=p&&typeof d.getDerivedStateFromError!="function"?null:b.render(),l.flags|=1,i!==null&&p?(l.child=va(l,i.child,null,y),l.child=va(l,null,d,y)):Nn(i,l,d,y),l.memoizedState=b.state,i=l.child):i=is(i,l,y),i}function eM(i,l,d,p){return da(),l.flags|=256,Nn(i,l,d,p),l.child}var k0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function D0(i){return{baseLanes:i,cachePool:HO()}}function L0(i,l,d){return i=i!==null?i.childLanes&~d:0,l&&(i|=xr),i}function tM(i,l,d){var p=l.pendingProps,y=!1,b=(l.flags&128)!==0,x;if((x=b)||(x=i!==null&&i.memoizedState===null?!1:(tn.current&2)!==0),x&&(y=!0,l.flags&=-129),x=(l.flags&32)!==0,l.flags&=-33,i===null){if(Xe){if(y?si(l):ii(),(i=kt)?(i=uP(i,jr),i=i!==null&&i.data!=="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:Xs!==null?{id:xo,overflow:Io}:null,retryLane:536870912,hydrationErrors:null},d=kO(i),d.return=l,l.child=d,Mn=l,kt=null)):i=null,i===null)throw ei(l);return y1(i)?l.lanes=32:l.lanes=536870912,null}var P=p.children;return p=p.fallback,y?(ii(),y=l.mode,P=lp({mode:"hidden",children:P},y),p=ca(p,y,d,null),P.return=l,p.return=l,P.sibling=p,l.child=P,p=l.child,p.memoizedState=D0(d),p.childLanes=L0(i,x,d),l.memoizedState=k0,td(null,p)):(si(l),U0(l,P))}var z=i.memoizedState;if(z!==null&&(P=z.dehydrated,P!==null)){if(b)l.flags&256?(si(l),l.flags&=-257,l=$0(i,l,d)):l.memoizedState!==null?(ii(),l.child=i.child,l.flags|=128,l=null):(ii(),P=p.fallback,y=l.mode,p=lp({mode:"visible",children:p.children},y),P=ca(P,y,d,null),P.flags|=2,p.return=l,P.return=l,p.sibling=P,l.child=p,va(l,i.child,null,d),p=l.child,p.memoizedState=D0(d),p.childLanes=L0(i,x,d),l.memoizedState=k0,l=td(null,p));else if(si(l),y1(P)){if(x=P.nextSibling&&P.nextSibling.dataset,x)var G=x.dgst;x=G,p=Error(r(419)),p.stack="",p.digest=x,Hc({value:p,source:null,stack:null}),l=$0(i,l,d)}else if(an||$l(i,l,d,!1),x=(d&i.childLanes)!==0,an||x){if(x=Mt,x!==null&&(p=jT(x,d),p!==0&&p!==z.retryLane))throw z.retryLane=p,ua(i,p),sr(x,i,p),P0;v1(P)||vp(),l=$0(i,l,d)}else v1(P)?(l.flags|=192,l.child=i.child,l=null):(i=z.treeContext,kt=Hr(P.nextSibling),Mn=l,Xe=!0,Js=null,jr=!1,i!==null&&UO(l,i),l=U0(l,p.children),l.flags|=4096);return l}return y?(ii(),P=p.fallback,y=l.mode,z=i.child,G=z.sibling,p=es(z,{mode:"hidden",children:p.children}),p.subtreeFlags=z.subtreeFlags&65011712,G!==null?P=es(G,P):(P=ca(P,y,d,null),P.flags|=2),P.return=l,p.return=l,p.sibling=P,l.child=p,td(null,p),p=l.child,P=i.child.memoizedState,P===null?P=D0(d):(y=P.cachePool,y!==null?(z=on._currentValue,y=y.parent!==z?{parent:z,pool:z}:y):y=HO(),P={baseLanes:P.baseLanes|d,cachePool:y}),p.memoizedState=P,p.childLanes=L0(i,x,d),l.memoizedState=k0,td(i.child,p)):(si(l),d=i.child,i=d.sibling,d=es(d,{mode:"visible",children:p.children}),d.return=l,d.sibling=null,i!==null&&(x=l.deletions,x===null?(l.deletions=[i],l.flags|=16):x.push(i)),l.child=d,l.memoizedState=null,d)}function U0(i,l){return l=lp({mode:"visible",children:l},i.mode),l.return=i,i.child=l}function lp(i,l){return i=wr(22,i,null,l),i.lanes=0,i}function $0(i,l,d){return va(l,i.child,null,d),i=U0(l,l.pendingProps.children),i.flags|=2,l.memoizedState=null,i}function nM(i,l,d){i.lanes|=l;var p=i.alternate;p!==null&&(p.lanes|=l),Jb(i.return,l,d)}function F0(i,l,d,p,y,b){var x=i.memoizedState;x===null?i.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:p,tail:d,tailMode:y,treeForkCount:b}:(x.isBackwards=l,x.rendering=null,x.renderingStartTime=0,x.last=p,x.tail=d,x.tailMode=y,x.treeForkCount=b)}function rM(i,l,d){var p=l.pendingProps,y=p.revealOrder,b=p.tail;p=p.children;var x=tn.current,P=(x&2)!==0;if(P?(x=x&1|2,l.flags|=128):x&=1,ie(tn,x),Nn(i,l,p,d),p=Xe?Bc:0,!P&&i!==null&&(i.flags&128)!==0)e:for(i=l.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&nM(i,d,l);else if(i.tag===19)nM(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&&Yh(i)===null&&(y=d),d=d.sibling;d=y,d===null?(y=l.child,l.child=null):(y=d.sibling,d.sibling=null),F0(l,!1,y,d,b,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&&Yh(i)===null){l.child=y;break}i=y.sibling,y.sibling=d,d=y,y=i}F0(l,!0,d,null,b,p);break;case"together":F0(l,!1,null,null,void 0,p);break;default:l.memoizedState=null}return l.child}function is(i,l,d){if(i!==null&&(l.dependencies=i.dependencies),ui|=l.lanes,(d&l.childLanes)===0)if(i!==null){if($l(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=es(i,i.pendingProps),l.child=d,d.return=l;i.sibling!==null;)i=i.sibling,d=d.sibling=es(i,i.pendingProps),d.return=l;d.sibling=null}return l.child}function z0(i,l){return(i.lanes&l)!==0?!0:(i=i.dependencies,!!(i!==null&&Bh(i)))}function mW(i,l,d){switch(l.tag){case 3:se(l,l.stateNode.containerInfo),ti(l,on,i.memoizedState.cache),da();break;case 27:case 5:Ze(l);break;case 4:se(l,l.stateNode.containerInfo);break;case 10:ti(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,d0(l),null;break;case 13:var p=l.memoizedState;if(p!==null)return p.dehydrated!==null?(si(l),l.flags|=128,null):(d&l.child.childLanes)!==0?tM(i,l,d):(si(l),i=is(i,l,d),i!==null?i.sibling:null);si(l);break;case 19:var y=(i.flags&128)!==0;if(p=(d&l.childLanes)!==0,p||($l(i,l,d,!1),p=(d&l.childLanes)!==0),y){if(p)return rM(i,l,d);l.flags|=128}if(y=l.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),ie(tn,tn.current),p)break;return null;case 22:return l.lanes=0,Z2(i,l,d,l.pendingProps);case 24:ti(l,on,i.memoizedState.cache)}return is(i,l,d)}function oM(i,l,d){if(i!==null)if(i.memoizedProps!==l.pendingProps)an=!0;else{if(!z0(i,d)&&(l.flags&128)===0)return an=!1,mW(i,l,d);an=(i.flags&131072)!==0}else an=!1,Xe&&(l.flags&1048576)!==0&&LO(l,Bc,l.index);switch(l.lanes=0,l.tag){case 16:e:{var p=l.pendingProps;if(i=ma(l.elementType),l.type=i,typeof i=="function")Vb(i)?(p=ba(i,p),l.tag=1,l=J2(null,l,i,p,d)):(l.tag=0,l=N0(null,l,i,p,d));else{if(i!=null){var y=i.$$typeof;if(y===T){l.tag=11,l=W2(null,l,i,p,d);break e}else if(y===R){l.tag=14,l=G2(null,l,i,p,d);break e}}throw l=Z(i)||i,Error(r(306,l,""))}}return l;case 0:return N0(i,l,l.type,l.pendingProps,d);case 1:return p=l.type,y=ba(p,l.pendingProps),J2(i,l,p,y,d);case 3:e:{if(se(l,l.stateNode.containerInfo),i===null)throw Error(r(387));p=l.pendingProps;var b=l.memoizedState;y=b.element,i0(i,l),Yc(l,p,null,d);var x=l.memoizedState;if(p=x.cache,ti(l,on,p),p!==b.cache&&e0(l,[on],d,!0),Zc(),p=x.element,b.isDehydrated)if(b={element:p,isDehydrated:!1,cache:x.cache},l.updateQueue.baseState=b,l.memoizedState=b,l.flags&256){l=eM(i,l,p,d);break e}else if(p!==y){y=$r(Error(r(424)),l),Hc(y),l=eM(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,kt=Hr(i.firstChild),Mn=l,Xe=!0,Js=null,jr=!0,d=ZO(l,null,p,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(da(),p===y){l=is(i,l,d);break e}Nn(i,l,p,d)}l=l.child}return l;case 26:return ap(i,l),i===null?(d=mP(l.type,null,l.pendingProps,null))?l.memoizedState=d:Xe||(d=l.type,i=l.pendingProps,p=_p(Me.current).createElement(d),p[On]=l,p[Jn]=i,kn(p,d,i),wn(p),l.stateNode=p):l.memoizedState=mP(l.type,i.memoizedProps,l.pendingProps,i.memoizedState),null;case 27:return Ze(l),i===null&&Xe&&(p=l.stateNode=fP(l.type,l.pendingProps,Me.current),Mn=l,jr=!0,y=kt,pi(l.type)?(b1=y,kt=Hr(p.firstChild)):kt=y),Nn(i,l,l.pendingProps.children,d),ap(i,l),i===null&&(l.flags|=4194304),l.child;case 5:return i===null&&Xe&&((y=p=kt)&&(p=VW(p,l.type,l.pendingProps,jr),p!==null?(l.stateNode=p,Mn=l,kt=Hr(p.firstChild),jr=!1,y=!0):y=!1),y||ei(l)),Ze(l),y=l.type,b=l.pendingProps,x=i!==null?i.memoizedProps:null,p=b.children,p1(y,b)?p=null:x!==null&&p1(y,x)&&(l.flags|=32),l.memoizedState!==null&&(y=h0(i,l,iW,null,null,d),gd._currentValue=y),ap(i,l),Nn(i,l,p,d),l.child;case 6:return i===null&&Xe&&((i=d=kt)&&(d=WW(d,l.pendingProps,jr),d!==null?(l.stateNode=d,Mn=l,kt=null,i=!0):i=!1),i||ei(l)),null;case 13:return tM(i,l,d);case 4:return se(l,l.stateNode.containerInfo),p=l.pendingProps,i===null?l.child=va(l,null,p,d):Nn(i,l,p,d),l.child;case 11:return W2(i,l,l.type,l.pendingProps,d);case 7:return Nn(i,l,l.pendingProps,d),l.child;case 8:return Nn(i,l,l.pendingProps.children,d),l.child;case 12:return Nn(i,l,l.pendingProps.children,d),l.child;case 10:return p=l.pendingProps,ti(l,l.type,p.value),Nn(i,l,p.children,d),l.child;case 9:return y=l.type._context,p=l.pendingProps.children,ha(l),y=Pn(y),p=p(y),l.flags|=1,Nn(i,l,p,d),l.child;case 14:return G2(i,l,l.type,l.pendingProps,d);case 15:return K2(i,l,l.type,l.pendingProps,d);case 19:return rM(i,l,d);case 31:return pW(i,l,d);case 22:return Z2(i,l,d,l.pendingProps);case 24:return ha(l),p=Pn(on),i===null?(y=r0(),y===null&&(y=Mt,b=t0(),y.pooledCache=b,b.refCount++,b!==null&&(y.pooledCacheLanes|=d),y=b),l.memoizedState={parent:p,cache:y},s0(l),ti(l,on,y)):((i.lanes&d)!==0&&(i0(i,l),Yc(l,null,null,d),Zc()),y=i.memoizedState,b=l.memoizedState,y.parent!==p?(y={parent:p,cache:p},l.memoizedState=y,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=y),ti(l,on,p)):(p=b.cache,ti(l,on,p),p!==y.cache&&e0(l,[on],d,!0))),Nn(i,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function as(i){i.flags|=4}function j0(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(MM())i.flags|=8192;else throw ga=Wh,o0}else i.flags&=-16777217}function sM(i,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!SP(l))if(MM())i.flags|=8192;else throw ga=Wh,o0}function up(i,l){l!==null&&(i.flags|=4),i.flags&16384&&(l=i.tag!==22?$T():536870912,i.lanes|=l,Yl|=l)}function nd(i,l){if(!Xe)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 Dt(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 gW(i,l,d){var p=l.pendingProps;switch(Zb(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Dt(l),null;case 1:return Dt(l),null;case 3:return d=l.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),rs(on),we(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(i===null||i.child===null)&&(Ul(l)?as(l):i===null||i.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Qb())),Dt(l),null;case 26:var y=l.type,b=l.memoizedState;return i===null?(as(l),b!==null?(Dt(l),sM(l,b)):(Dt(l),j0(l,y,null,p,d))):b?b!==i.memoizedState?(as(l),Dt(l),sM(l,b)):(Dt(l),l.flags&=-16777217):(i=i.memoizedProps,i!==p&&as(l),Dt(l),j0(l,y,i,p,d)),null;case 27:if(ve(l),d=Me.current,y=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==p&&as(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return Dt(l),null}i=oe.current,Ul(l)?$O(l):(i=fP(y,p,d),l.stateNode=i,as(l))}return Dt(l),null;case 5:if(ve(l),y=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==p&&as(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return Dt(l),null}if(b=oe.current,Ul(l))$O(l);else{var x=_p(Me.current);switch(b){case 1:b=x.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:b=x.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":b=x.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":b=x.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":b=x.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof p.is=="string"?x.createElement("select",{is:p.is}):x.createElement("select"),p.multiple?b.multiple=!0:p.size&&(b.size=p.size);break;default:b=typeof p.is=="string"?x.createElement(y,{is:p.is}):x.createElement(y)}}b[On]=l,b[Jn]=p;e:for(x=l.child;x!==null;){if(x.tag===5||x.tag===6)b.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===l)break e;for(;x.sibling===null;){if(x.return===null||x.return===l)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}l.stateNode=b;e:switch(kn(b,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&&as(l)}}return Dt(l),j0(l,l.type,i===null?null:i.memoizedProps,l.pendingProps,d),null;case 6:if(i&&l.stateNode!=null)i.memoizedProps!==p&&as(l);else{if(typeof p!="string"&&l.stateNode===null)throw Error(r(166));if(i=Me.current,Ul(l)){if(i=l.stateNode,d=l.memoizedProps,p=null,y=Mn,y!==null)switch(y.tag){case 27:case 5:p=y.memoizedProps}i[On]=l,i=!!(i.nodeValue===d||p!==null&&p.suppressHydrationWarning===!0||tP(i.nodeValue,d)),i||ei(l,!0)}else i=_p(i).createTextNode(p),i[On]=l,l.stateNode=i}return Dt(l),null;case 31:if(d=l.memoizedState,i===null||i.memoizedState!==null){if(p=Ul(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[On]=l}else da(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Dt(l),i=!1}else d=Qb(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=d),i=!0;if(!i)return l.flags&256?(Er(l),l):(Er(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Dt(l),null;case 13:if(p=l.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(y=Ul(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[On]=l}else da(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Dt(l),y=!1}else y=Qb(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=y),y=!0;if(!y)return l.flags&256?(Er(l),l):(Er(l),null)}return Er(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),b=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(b=p.memoizedState.cachePool.pool),b!==y&&(p.flags|=2048)),d!==i&&d&&(l.child.flags|=8192),up(l,l.updateQueue),Dt(l),null);case 4:return we(),i===null&&u1(l.stateNode.containerInfo),Dt(l),null;case 10:return rs(l.type),Dt(l),null;case 19:if(X(tn),p=l.memoizedState,p===null)return Dt(l),null;if(y=(l.flags&128)!==0,b=p.rendering,b===null)if(y)nd(p,!1);else{if(Jt!==0||i!==null&&(i.flags&128)!==0)for(i=l.child;i!==null;){if(b=Yh(i),b!==null){for(l.flags|=128,nd(p,!1),i=b.updateQueue,l.updateQueue=i,up(l,i),l.subtreeFlags=0,i=d,d=l.child;d!==null;)NO(d,i),d=d.sibling;return ie(tn,tn.current&1|2),Xe&&ts(l,p.treeForkCount),l.child}i=i.sibling}p.tail!==null&&Fn()>pp&&(l.flags|=128,y=!0,nd(p,!1),l.lanes=4194304)}else{if(!y)if(i=Yh(b),i!==null){if(l.flags|=128,y=!0,i=i.updateQueue,l.updateQueue=i,up(l,i),nd(p,!0),p.tail===null&&p.tailMode==="hidden"&&!b.alternate&&!Xe)return Dt(l),null}else 2*Fn()-p.renderingStartTime>pp&&d!==536870912&&(l.flags|=128,y=!0,nd(p,!1),l.lanes=4194304);p.isBackwards?(b.sibling=l.child,l.child=b):(i=p.last,i!==null?i.sibling=b:l.child=b,p.last=b)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=Fn(),i.sibling=null,d=tn.current,ie(tn,y?d&1|2:d&1),Xe&&ts(l,p.treeForkCount),i):(Dt(l),null);case 22:case 23:return Er(l),c0(),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&&(Dt(l),l.subtreeFlags&6&&(l.flags|=8192)):Dt(l),d=l.updateQueue,d!==null&&up(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&&X(pa),null;case 24:return d=null,i!==null&&(d=i.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),rs(on),Dt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function vW(i,l){switch(Zb(l),l.tag){case 1:return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 3:return rs(on),we(),i=l.flags,(i&65536)!==0&&(i&128)===0?(l.flags=i&-65537|128,l):null;case 26:case 27:case 5:return ve(l),null;case 31:if(l.memoizedState!==null){if(Er(l),l.alternate===null)throw Error(r(340));da()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 13:if(Er(l),i=l.memoizedState,i!==null&&i.dehydrated!==null){if(l.alternate===null)throw Error(r(340));da()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return X(tn),null;case 4:return we(),null;case 10:return rs(l.type),null;case 22:case 23:return Er(l),c0(),i!==null&&X(pa),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 24:return rs(on),null;case 25:return null;default:return null}}function iM(i,l){switch(Zb(l),l.tag){case 3:rs(on),we();break;case 26:case 27:case 5:ve(l);break;case 4:we();break;case 31:l.memoizedState!==null&&Er(l);break;case 13:Er(l);break;case 19:X(tn);break;case 10:rs(l.type);break;case 22:case 23:Er(l),c0(),i!==null&&X(pa);break;case 24:rs(on)}}function rd(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 b=d.create,x=d.inst;p=b(),x.destroy=p}d=d.next}while(d!==y)}}catch(P){St(l,l.return,P)}}function ai(i,l,d){try{var p=l.updateQueue,y=p!==null?p.lastEffect:null;if(y!==null){var b=y.next;p=b;do{if((p.tag&i)===i){var x=p.inst,P=x.destroy;if(P!==void 0){x.destroy=void 0,y=l;var z=d,G=P;try{G()}catch(J){St(y,z,J)}}}p=p.next}while(p!==b)}}catch(J){St(l,l.return,J)}}function aM(i){var l=i.updateQueue;if(l!==null){var d=i.stateNode;try{QO(l,d)}catch(p){St(i,i.return,p)}}}function lM(i,l,d){d.props=ba(i.type,i.memoizedProps),d.state=i.memoizedState;try{d.componentWillUnmount()}catch(p){St(i,l,p)}}function od(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){St(i,l,y)}}function Ao(i,l){var d=i.ref,p=i.refCleanup;if(d!==null)if(typeof p=="function")try{p()}catch(y){St(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){St(i,l,y)}else d.current=null}function uM(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){St(i,i.return,y)}}function B0(i,l,d){try{var p=i.stateNode;FW(p,i.type,d,l),p[Jn]=l}catch(y){St(i,i.return,y)}}function cM(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&pi(i.type)||i.tag===4}function H0(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||cM(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&&pi(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 q0(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=Xo));else if(p!==4&&(p===27&&pi(i.type)&&(d=i.stateNode,l=null),i=i.child,i!==null))for(q0(i,l,d),i=i.sibling;i!==null;)q0(i,l,d),i=i.sibling}function cp(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&&pi(i.type)&&(d=i.stateNode),i=i.child,i!==null))for(cp(i,l,d),i=i.sibling;i!==null;)cp(i,l,d),i=i.sibling}function dM(i){var l=i.stateNode,d=i.memoizedProps;try{for(var p=i.type,y=l.attributes;y.length;)l.removeAttributeNode(y[0]);kn(l,p,d),l[On]=i,l[Jn]=d}catch(b){St(i,i.return,b)}}var ls=!1,ln=!1,V0=!1,fM=typeof WeakSet=="function"?WeakSet:Set,Cn=null;function yW(i,l){if(i=i.containerInfo,f1=Mp,i=_O(i),$b(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,b=p.focusNode;p=p.focusOffset;try{d.nodeType,b.nodeType}catch{d=null;break e}var x=0,P=-1,z=-1,G=0,J=0,ne=i,K=null;t:for(;;){for(var Y;ne!==d||y!==0&&ne.nodeType!==3||(P=x+y),ne!==b||p!==0&&ne.nodeType!==3||(z=x+p),ne.nodeType===3&&(x+=ne.nodeValue.length),(Y=ne.firstChild)!==null;)K=ne,ne=Y;for(;;){if(ne===i)break t;if(K===d&&++G===y&&(P=x),K===b&&++J===p&&(z=x),(Y=ne.nextSibling)!==null)break;ne=K,K=ne.parentNode}ne=Y}d=P===-1||z===-1?null:{start:P,end:z}}else d=null}d=d||{start:0,end:0}}else d=null;for(h1={focusedElem:i,selectionRange:d},Mp=!1,Cn=l;Cn!==null;)if(l=Cn,i=l.child,(l.subtreeFlags&1028)!==0&&i!==null)i.return=l,Cn=i;else for(;Cn!==null;){switch(l=Cn,b=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&&b!==null){i=void 0,d=l,y=b.memoizedProps,b=b.memoizedState,p=d.stateNode;try{var be=ba(d.type,y);i=p.getSnapshotBeforeUpdate(be,b),p.__reactInternalSnapshotBeforeUpdate=i}catch(Te){St(d,d.return,Te)}}break;case 3:if((i&1024)!==0){if(i=l.stateNode.containerInfo,d=i.nodeType,d===9)g1(i);else if(d===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":g1(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,Cn=i;break}Cn=l.return}}function hM(i,l,d){var p=d.flags;switch(d.tag){case 0:case 11:case 15:cs(i,d),p&4&&rd(5,d);break;case 1:if(cs(i,d),p&4)if(i=d.stateNode,l===null)try{i.componentDidMount()}catch(x){St(d,d.return,x)}else{var y=ba(d.type,l.memoizedProps);l=l.memoizedState;try{i.componentDidUpdate(y,l,i.__reactInternalSnapshotBeforeUpdate)}catch(x){St(d,d.return,x)}}p&64&&aM(d),p&512&&od(d,d.return);break;case 3:if(cs(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{QO(i,l)}catch(x){St(d,d.return,x)}}break;case 27:l===null&&p&4&&dM(d);case 26:case 5:cs(i,d),l===null&&p&4&&uM(d),p&512&&od(d,d.return);break;case 12:cs(i,d);break;case 31:cs(i,d),p&4&&gM(i,d);break;case 13:cs(i,d),p&4&&vM(i,d),p&64&&(i=d.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(d=AW.bind(null,d),GW(i,d))));break;case 22:if(p=d.memoizedState!==null||ls,!p){l=l!==null&&l.memoizedState!==null||ln,y=ls;var b=ln;ls=p,(ln=l)&&!b?ds(i,d,(d.subtreeFlags&8772)!==0):cs(i,d),ls=y,ln=b}break;case 30:break;default:cs(i,d)}}function pM(i){var l=i.alternate;l!==null&&(i.alternate=null,pM(l)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(l=i.stateNode,l!==null&&wb(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 jt=null,tr=!1;function us(i,l,d){for(d=d.child;d!==null;)mM(i,l,d),d=d.sibling}function mM(i,l,d){if(yr&&typeof yr.onCommitFiberUnmount=="function")try{yr.onCommitFiberUnmount(Rc,d)}catch{}switch(d.tag){case 26:ln||Ao(d,l),us(i,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:ln||Ao(d,l);var p=jt,y=tr;pi(d.type)&&(jt=d.stateNode,tr=!1),us(i,l,d),hd(d.stateNode),jt=p,tr=y;break;case 5:ln||Ao(d,l);case 6:if(p=jt,y=tr,jt=null,us(i,l,d),jt=p,tr=y,jt!==null)if(tr)try{(jt.nodeType===9?jt.body:jt.nodeName==="HTML"?jt.ownerDocument.body:jt).removeChild(d.stateNode)}catch(b){St(d,l,b)}else try{jt.removeChild(d.stateNode)}catch(b){St(d,l,b)}break;case 18:jt!==null&&(tr?(i=jt,aP(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,d.stateNode),ou(i)):aP(jt,d.stateNode));break;case 4:p=jt,y=tr,jt=d.stateNode.containerInfo,tr=!0,us(i,l,d),jt=p,tr=y;break;case 0:case 11:case 14:case 15:ai(2,d,l),ln||ai(4,d,l),us(i,l,d);break;case 1:ln||(Ao(d,l),p=d.stateNode,typeof p.componentWillUnmount=="function"&&lM(d,l,p)),us(i,l,d);break;case 21:us(i,l,d);break;case 22:ln=(p=ln)||d.memoizedState!==null,us(i,l,d),ln=p;break;default:us(i,l,d)}}function gM(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{ou(i)}catch(d){St(l,l.return,d)}}}function vM(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{ou(i)}catch(d){St(l,l.return,d)}}function bW(i){switch(i.tag){case 31:case 13:case 19:var l=i.stateNode;return l===null&&(l=i.stateNode=new fM),l;case 22:return i=i.stateNode,l=i._retryCache,l===null&&(l=i._retryCache=new fM),l;default:throw Error(r(435,i.tag))}}function dp(i,l){var d=bW(i);l.forEach(function(p){if(!d.has(p)){d.add(p);var y=RW.bind(null,i,p);p.then(y,y)}})}function nr(i,l){var d=l.deletions;if(d!==null)for(var p=0;p<d.length;p++){var y=d[p],b=i,x=l,P=x;e:for(;P!==null;){switch(P.tag){case 27:if(pi(P.type)){jt=P.stateNode,tr=!1;break e}break;case 5:jt=P.stateNode,tr=!1;break e;case 3:case 4:jt=P.stateNode.containerInfo,tr=!0;break e}P=P.return}if(jt===null)throw Error(r(160));mM(b,x,y),jt=null,tr=!1,b=y.alternate,b!==null&&(b.return=null),y.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)yM(l,i),l=l.sibling}var io=null;function yM(i,l){var d=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:nr(l,i),rr(i),p&4&&(ai(3,i,i.return),rd(3,i),ai(5,i,i.return));break;case 1:nr(l,i),rr(i),p&512&&(ln||d===null||Ao(d,d.return)),p&64&&ls&&(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=io;if(nr(l,i),rr(i),p&512&&(ln||d===null||Ao(d,d.return)),p&4){var b=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":b=y.getElementsByTagName("title")[0],(!b||b[Mc]||b[On]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=y.createElement(p),y.head.insertBefore(b,y.querySelector("head > title"))),kn(b,p,d),b[On]=i,wn(b),p=b;break e;case"link":var x=yP("link","href",y).get(p+(d.href||""));if(x){for(var P=0;P<x.length;P++)if(b=x[P],b.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&b.getAttribute("rel")===(d.rel==null?null:d.rel)&&b.getAttribute("title")===(d.title==null?null:d.title)&&b.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){x.splice(P,1);break t}}b=y.createElement(p),kn(b,p,d),y.head.appendChild(b);break;case"meta":if(x=yP("meta","content",y).get(p+(d.content||""))){for(P=0;P<x.length;P++)if(b=x[P],b.getAttribute("content")===(d.content==null?null:""+d.content)&&b.getAttribute("name")===(d.name==null?null:d.name)&&b.getAttribute("property")===(d.property==null?null:d.property)&&b.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&b.getAttribute("charset")===(d.charSet==null?null:d.charSet)){x.splice(P,1);break t}}b=y.createElement(p),kn(b,p,d),y.head.appendChild(b);break;default:throw Error(r(468,p))}b[On]=i,wn(b),p=b}i.stateNode=p}else bP(y,i.type,i.stateNode);else i.stateNode=vP(y,p,i.memoizedProps);else b!==p?(b===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):b.count--,p===null?bP(y,i.type,i.stateNode):vP(y,p,i.memoizedProps)):p===null&&i.stateNode!==null&&B0(i,i.memoizedProps,d.memoizedProps)}break;case 27:nr(l,i),rr(i),p&512&&(ln||d===null||Ao(d,d.return)),d!==null&&p&4&&B0(i,i.memoizedProps,d.memoizedProps);break;case 5:if(nr(l,i),rr(i),p&512&&(ln||d===null||Ao(d,d.return)),i.flags&32){y=i.stateNode;try{Al(y,"")}catch(be){St(i,i.return,be)}}p&4&&i.stateNode!=null&&(y=i.memoizedProps,B0(i,y,d!==null?d.memoizedProps:y)),p&1024&&(V0=!0);break;case 6:if(nr(l,i),rr(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,d=i.stateNode;try{d.nodeValue=p}catch(be){St(i,i.return,be)}}break;case 3:if(Ap=null,y=io,io=xp(l.containerInfo),nr(l,i),io=y,rr(i),p&4&&d!==null&&d.memoizedState.isDehydrated)try{ou(l.containerInfo)}catch(be){St(i,i.return,be)}V0&&(V0=!1,bM(i));break;case 4:p=io,io=xp(i.stateNode.containerInfo),nr(l,i),rr(i),io=p;break;case 12:nr(l,i),rr(i);break;case 31:nr(l,i),rr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,dp(i,p)));break;case 13:nr(l,i),rr(i),i.child.flags&8192&&i.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(hp=Fn()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,dp(i,p)));break;case 22:y=i.memoizedState!==null;var z=d!==null&&d.memoizedState!==null,G=ls,J=ln;if(ls=G||y,ln=J||z,nr(l,i),ln=J,ls=G,rr(i),p&8192)e:for(l=i.stateNode,l._visibility=y?l._visibility&-2:l._visibility|1,y&&(d===null||z||ls||ln||Sa(i)),d=null,l=i;;){if(l.tag===5||l.tag===26){if(d===null){z=d=l;try{if(b=z.stateNode,y)x=b.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{P=z.stateNode;var ne=z.memoizedProps.style,K=ne!=null&&ne.hasOwnProperty("display")?ne.display:null;P.style.display=K==null||typeof K=="boolean"?"":(""+K).trim()}}catch(be){St(z,z.return,be)}}}else if(l.tag===6){if(d===null){z=l;try{z.stateNode.nodeValue=y?"":z.memoizedProps}catch(be){St(z,z.return,be)}}}else if(l.tag===18){if(d===null){z=l;try{var Y=z.stateNode;y?lP(Y,!0):lP(z.stateNode,!1)}catch(be){St(z,z.return,be)}}}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,dp(i,d))));break;case 19:nr(l,i),rr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,dp(i,p)));break;case 30:break;case 21:break;default:nr(l,i),rr(i)}}function rr(i){var l=i.flags;if(l&2){try{for(var d,p=i.return;p!==null;){if(cM(p)){d=p;break}p=p.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var y=d.stateNode,b=H0(i);cp(i,b,y);break;case 5:var x=d.stateNode;d.flags&32&&(Al(x,""),d.flags&=-33);var P=H0(i);cp(i,P,x);break;case 3:case 4:var z=d.stateNode.containerInfo,G=H0(i);q0(i,G,z);break;default:throw Error(r(161))}}catch(J){St(i,i.return,J)}i.flags&=-3}l&4096&&(i.flags&=-4097)}function bM(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var l=i;bM(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),i=i.sibling}}function cs(i,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)hM(i,l.alternate,l),l=l.sibling}function Sa(i){for(i=i.child;i!==null;){var l=i;switch(l.tag){case 0:case 11:case 14:case 15:ai(4,l,l.return),Sa(l);break;case 1:Ao(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&lM(l,l.return,d),Sa(l);break;case 27:hd(l.stateNode);case 26:case 5:Ao(l,l.return),Sa(l);break;case 22:l.memoizedState===null&&Sa(l);break;case 30:Sa(l);break;default:Sa(l)}i=i.sibling}}function ds(i,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var p=l.alternate,y=i,b=l,x=b.flags;switch(b.tag){case 0:case 11:case 15:ds(y,b,d),rd(4,b);break;case 1:if(ds(y,b,d),p=b,y=p.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(G){St(p,p.return,G)}if(p=b,y=p.updateQueue,y!==null){var P=p.stateNode;try{var z=y.shared.hiddenCallbacks;if(z!==null)for(y.shared.hiddenCallbacks=null,y=0;y<z.length;y++)YO(z[y],P)}catch(G){St(p,p.return,G)}}d&&x&64&&aM(b),od(b,b.return);break;case 27:dM(b);case 26:case 5:ds(y,b,d),d&&p===null&&x&4&&uM(b),od(b,b.return);break;case 12:ds(y,b,d);break;case 31:ds(y,b,d),d&&x&4&&gM(y,b);break;case 13:ds(y,b,d),d&&x&4&&vM(y,b);break;case 22:b.memoizedState===null&&ds(y,b,d),od(b,b.return);break;case 30:break;default:ds(y,b,d)}l=l.sibling}}function W0(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&&qc(d))}function G0(i,l){i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&qc(i))}function ao(i,l,d,p){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)SM(i,l,d,p),l=l.sibling}function SM(i,l,d,p){var y=l.flags;switch(l.tag){case 0:case 11:case 15:ao(i,l,d,p),y&2048&&rd(9,l);break;case 1:ao(i,l,d,p);break;case 3:ao(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&&qc(i)));break;case 12:if(y&2048){ao(i,l,d,p),i=l.stateNode;try{var b=l.memoizedProps,x=b.id,P=b.onPostCommit;typeof P=="function"&&P(x,l.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(z){St(l,l.return,z)}}else ao(i,l,d,p);break;case 31:ao(i,l,d,p);break;case 13:ao(i,l,d,p);break;case 23:break;case 22:b=l.stateNode,x=l.alternate,l.memoizedState!==null?b._visibility&2?ao(i,l,d,p):sd(i,l):b._visibility&2?ao(i,l,d,p):(b._visibility|=2,Gl(i,l,d,p,(l.subtreeFlags&10256)!==0||!1)),y&2048&&W0(x,l);break;case 24:ao(i,l,d,p),y&2048&&G0(l.alternate,l);break;default:ao(i,l,d,p)}}function Gl(i,l,d,p,y){for(y=y&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var b=i,x=l,P=d,z=p,G=x.flags;switch(x.tag){case 0:case 11:case 15:Gl(b,x,P,z,y),rd(8,x);break;case 23:break;case 22:var J=x.stateNode;x.memoizedState!==null?J._visibility&2?Gl(b,x,P,z,y):sd(b,x):(J._visibility|=2,Gl(b,x,P,z,y)),y&&G&2048&&W0(x.alternate,x);break;case 24:Gl(b,x,P,z,y),y&&G&2048&&G0(x.alternate,x);break;default:Gl(b,x,P,z,y)}l=l.sibling}}function sd(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:sd(d,p),y&2048&&W0(p.alternate,p);break;case 24:sd(d,p),y&2048&&G0(p.alternate,p);break;default:sd(d,p)}l=l.sibling}}var id=8192;function Kl(i,l,d){if(i.subtreeFlags&id)for(i=i.child;i!==null;)wM(i,l,d),i=i.sibling}function wM(i,l,d){switch(i.tag){case 26:Kl(i,l,d),i.flags&id&&i.memoizedState!==null&&sG(d,io,i.memoizedState,i.memoizedProps);break;case 5:Kl(i,l,d);break;case 3:case 4:var p=io;io=xp(i.stateNode.containerInfo),Kl(i,l,d),io=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=id,id=16777216,Kl(i,l,d),id=p):Kl(i,l,d));break;default:Kl(i,l,d)}}function CM(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 ad(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];Cn=p,_M(p,i)}CM(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)EM(i),i=i.sibling}function EM(i){switch(i.tag){case 0:case 11:case 15:ad(i),i.flags&2048&&ai(9,i,i.return);break;case 3:ad(i);break;case 12:ad(i);break;case 22:var l=i.stateNode;i.memoizedState!==null&&l._visibility&2&&(i.return===null||i.return.tag!==13)?(l._visibility&=-3,fp(i)):ad(i);break;default:ad(i)}}function fp(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];Cn=p,_M(p,i)}CM(i)}for(i=i.child;i!==null;){switch(l=i,l.tag){case 0:case 11:case 15:ai(8,l,l.return),fp(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,fp(l));break;default:fp(l)}i=i.sibling}}function _M(i,l){for(;Cn!==null;){var d=Cn;switch(d.tag){case 0:case 11:case 15:ai(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:qc(d.memoizedState.cache)}if(p=d.child,p!==null)p.return=d,Cn=p;else e:for(d=i;Cn!==null;){p=Cn;var y=p.sibling,b=p.return;if(pM(p),p===d){Cn=null;break e}if(y!==null){y.return=b,Cn=y;break e}Cn=b}}}var SW={getCacheForType:function(i){var l=Pn(on),d=l.data.get(i);return d===void 0&&(d=i(),l.data.set(i,d)),d},cacheSignal:function(){return Pn(on).controller.signal}},wW=typeof WeakMap=="function"?WeakMap:Map,ut=0,Mt=null,qe=null,Ge=0,bt=0,_r=null,li=!1,Zl=!1,K0=!1,fs=0,Jt=0,ui=0,wa=0,Z0=0,xr=0,Yl=0,ld=null,or=null,Y0=!1,hp=0,xM=0,pp=1/0,mp=null,ci=null,gn=0,di=null,Ql=null,hs=0,Q0=0,X0=null,IM=null,ud=0,J0=null;function Ir(){return(ut&2)!==0&&Ge!==0?Ge&-Ge:B.T!==null?s1():BT()}function AM(){if(xr===0)if((Ge&536870912)===0||Xe){var i=Eh;Eh<<=1,(Eh&3932160)===0&&(Eh=262144),xr=i}else xr=536870912;return i=Cr.current,i!==null&&(i.flags|=32),xr}function sr(i,l,d){(i===Mt&&(bt===2||bt===9)||i.cancelPendingCommit!==null)&&(Xl(i,0),fi(i,Ge,xr,!1)),Oc(i,d),((ut&2)===0||i!==Mt)&&(i===Mt&&((ut&2)===0&&(wa|=d),Jt===4&&fi(i,Ge,xr,!1)),Ro(i))}function RM(i,l,d){if((ut&6)!==0)throw Error(r(327));var p=!d&&(l&127)===0&&(l&i.expiredLanes)===0||Tc(i,l),y=p?_W(i,l):t1(i,l,!0),b=p;do{if(y===0){Zl&&!p&&fi(i,l,0,!1);break}else{if(d=i.current.alternate,b&&!CW(d)){y=t1(i,l,!1),b=!1;continue}if(y===2){if(b=l,i.errorRecoveryDisabledLanes&b)var x=0;else x=i.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){l=x;e:{var P=i;y=ld;var z=P.current.memoizedState.isDehydrated;if(z&&(Xl(P,x).flags|=256),x=t1(P,x,!1),x!==2){if(K0&&!z){P.errorRecoveryDisabledLanes|=b,wa|=b,y=4;break e}b=or,or=y,b!==null&&(or===null?or=b:or.push.apply(or,b))}y=x}if(b=!1,y!==2)continue}}if(y===1){Xl(i,0),fi(i,l,0,!0);break}e:{switch(p=i,b=y,b){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:fi(p,l,xr,!li);break e;case 2:or=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(y=hp+300-Fn(),10<y)){if(fi(p,l,xr,!li),xh(p,0,!0)!==0)break e;hs=l,p.timeoutHandle=sP(TM.bind(null,p,d,or,mp,Y0,l,xr,wa,Yl,li,b,"Throttled",-0,0),y);break e}TM(p,d,or,mp,Y0,l,xr,wa,Yl,li,b,null,-0,0)}}break}while(!0);Ro(i)}function TM(i,l,d,p,y,b,x,P,z,G,J,ne,K,Y){if(i.timeoutHandle=-1,ne=l.subtreeFlags,ne&8192||(ne&16785408)===16785408){ne={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xo},wM(l,b,ne);var be=(b&62914560)===b?hp-Fn():(b&4194048)===b?xM-Fn():0;if(be=iG(ne,be),be!==null){hs=b,i.cancelPendingCommit=be(UM.bind(null,i,l,b,d,p,y,x,P,z,J,ne,null,K,Y)),fi(i,b,x,!G);return}}UM(i,l,b,d,p,y,x,P,z)}function CW(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],b=y.getSnapshot;y=y.value;try{if(!Sr(b(),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 fi(i,l,d,p){l&=~Z0,l&=~wa,i.suspendedLanes|=l,i.pingedLanes&=~l,p&&(i.warmLanes|=l),p=i.expirationTimes;for(var y=l;0<y;){var b=31-br(y),x=1<<b;p[b]=-1,y&=~x}d!==0&&FT(i,d,l)}function gp(){return(ut&6)===0?(cd(0),!1):!0}function e1(){if(qe!==null){if(bt===0)var i=qe.return;else i=qe,ns=fa=null,g0(i),Bl=null,Wc=0,i=qe;for(;i!==null;)iM(i.alternate,i),i=i.return;qe=null}}function Xl(i,l){var d=i.timeoutHandle;d!==-1&&(i.timeoutHandle=-1,BW(d)),d=i.cancelPendingCommit,d!==null&&(i.cancelPendingCommit=null,d()),hs=0,e1(),Mt=i,qe=d=es(i.current,null),Ge=l,bt=0,_r=null,li=!1,Zl=Tc(i,l),K0=!1,Yl=xr=Z0=wa=ui=Jt=0,or=ld=null,Y0=!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-br(p),b=1<<y;l|=i[y],p&=~b}return fs=l,Uh(),d}function OM(i,l){Fe=null,B.H=ed,l===jl||l===Vh?(l=WO(),bt=3):l===o0?(l=WO(),bt=4):bt=l===P0?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,_r=l,qe===null&&(Jt=1,sp(i,$r(l,i.current)))}function MM(){var i=Cr.current;return i===null?!0:(Ge&4194048)===Ge?Br===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?i===Br:!1}function PM(){var i=B.H;return B.H=ed,i===null?ed:i}function NM(){var i=B.A;return B.A=SW,i}function vp(){Jt=4,li||(Ge&4194048)!==Ge&&Cr.current!==null||(Zl=!0),(ui&134217727)===0&&(wa&134217727)===0||Mt===null||fi(Mt,Ge,xr,!1)}function t1(i,l,d){var p=ut;ut|=2;var y=PM(),b=NM();(Mt!==i||Ge!==l)&&(mp=null,Xl(i,l)),l=!1;var x=Jt;e:do try{if(bt!==0&&qe!==null){var P=qe,z=_r;switch(bt){case 8:e1(),x=6;break e;case 3:case 2:case 9:case 6:Cr.current===null&&(l=!0);var G=bt;if(bt=0,_r=null,Jl(i,P,z,G),d&&Zl){x=0;break e}break;default:G=bt,bt=0,_r=null,Jl(i,P,z,G)}}EW(),x=Jt;break}catch(J){OM(i,J)}while(!0);return l&&i.shellSuspendCounter++,ns=fa=null,ut=p,B.H=y,B.A=b,qe===null&&(Mt=null,Ge=0,Uh()),x}function EW(){for(;qe!==null;)kM(qe)}function _W(i,l){var d=ut;ut|=2;var p=PM(),y=NM();Mt!==i||Ge!==l?(mp=null,pp=Fn()+500,Xl(i,l)):Zl=Tc(i,l);e:do try{if(bt!==0&&qe!==null){l=qe;var b=_r;t:switch(bt){case 1:bt=0,_r=null,Jl(i,l,b,1);break;case 2:case 9:if(qO(b)){bt=0,_r=null,DM(l);break}l=function(){bt!==2&&bt!==9||Mt!==i||(bt=7),Ro(i)},b.then(l,l);break e;case 3:bt=7;break e;case 4:bt=5;break e;case 7:qO(b)?(bt=0,_r=null,DM(l)):(bt=0,_r=null,Jl(i,l,b,7));break;case 5:var x=null;switch(qe.tag){case 26:x=qe.memoizedState;case 5:case 27:var P=qe;if(x?SP(x):P.stateNode.complete){bt=0,_r=null;var z=P.sibling;if(z!==null)qe=z;else{var G=P.return;G!==null?(qe=G,yp(G)):qe=null}break t}}bt=0,_r=null,Jl(i,l,b,5);break;case 6:bt=0,_r=null,Jl(i,l,b,6);break;case 8:e1(),Jt=6;break e;default:throw Error(r(462))}}xW();break}catch(J){OM(i,J)}while(!0);return ns=fa=null,B.H=p,B.A=y,ut=d,qe!==null?0:(Mt=null,Ge=0,Uh(),Jt)}function xW(){for(;qe!==null&&!wh();)kM(qe)}function kM(i){var l=oM(i.alternate,i,fs);i.memoizedProps=i.pendingProps,l===null?yp(i):qe=l}function DM(i){var l=i,d=l.alternate;switch(l.tag){case 15:case 0:l=X2(d,l,l.pendingProps,l.type,void 0,Ge);break;case 11:l=X2(d,l,l.pendingProps,l.type.render,l.ref,Ge);break;case 5:g0(l);default:iM(d,l),l=qe=NO(l,fs),l=oM(d,l,fs)}i.memoizedProps=i.pendingProps,l===null?yp(i):qe=l}function Jl(i,l,d,p){ns=fa=null,g0(l),Bl=null,Wc=0;var y=l.return;try{if(hW(i,y,l,d,Ge)){Jt=1,sp(i,$r(d,i.current)),qe=null;return}}catch(b){if(y!==null)throw qe=y,b;Jt=1,sp(i,$r(d,i.current)),qe=null;return}l.flags&32768?(Xe||p===1?i=!0:Zl||(Ge&536870912)!==0?i=!1:(li=i=!0,(p===2||p===9||p===3||p===6)&&(p=Cr.current,p!==null&&p.tag===13&&(p.flags|=16384))),LM(l,i)):yp(l)}function yp(i){var l=i;do{if((l.flags&32768)!==0){LM(l,li);return}i=l.return;var d=gW(l.alternate,l,fs);if(d!==null){qe=d;return}if(l=l.sibling,l!==null){qe=l;return}qe=l=i}while(l!==null);Jt===0&&(Jt=5)}function LM(i,l){do{var d=vW(i.alternate,i);if(d!==null){d.flags&=32767,qe=d;return}if(d=i.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(i=i.sibling,i!==null)){qe=i;return}qe=i=d}while(i!==null);Jt=6,qe=null}function UM(i,l,d,p,y,b,x,P,z){i.cancelPendingCommit=null;do bp();while(gn!==0);if((ut&6)!==0)throw Error(r(327));if(l!==null){if(l===i.current)throw Error(r(177));if(b=l.lanes|l.childLanes,b|=Hb,oV(i,d,b,x,P,z),i===Mt&&(qe=Mt=null,Ge=0),Ql=l,di=i,hs=d,Q0=b,X0=y,IM=p,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,TW(Sl,function(){return BM(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||p){p=B.T,B.T=null,y=Q.p,Q.p=2,x=ut,ut|=4;try{yW(i,l,d)}finally{ut=x,Q.p=y,B.T=p}}gn=1,$M(),FM(),zM()}}function $M(){if(gn===1){gn=0;var i=di,l=Ql,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=B.T,B.T=null;var p=Q.p;Q.p=2;var y=ut;ut|=4;try{yM(l,i);var b=h1,x=_O(i.containerInfo),P=b.focusedElem,z=b.selectionRange;if(x!==P&&P&&P.ownerDocument&&EO(P.ownerDocument.documentElement,P)){if(z!==null&&$b(P)){var G=z.start,J=z.end;if(J===void 0&&(J=G),"selectionStart"in P)P.selectionStart=G,P.selectionEnd=Math.min(J,P.value.length);else{var ne=P.ownerDocument||document,K=ne&&ne.defaultView||window;if(K.getSelection){var Y=K.getSelection(),be=P.textContent.length,Te=Math.min(z.start,be),It=z.end===void 0?Te:Math.min(z.end,be);!Y.extend&&Te>It&&(x=It,It=Te,Te=x);var V=CO(P,Te),H=CO(P,It);if(V&&H&&(Y.rangeCount!==1||Y.anchorNode!==V.node||Y.anchorOffset!==V.offset||Y.focusNode!==H.node||Y.focusOffset!==H.offset)){var W=ne.createRange();W.setStart(V.node,V.offset),Y.removeAllRanges(),Te>It?(Y.addRange(W),Y.extend(H.node,H.offset)):(W.setEnd(H.node,H.offset),Y.addRange(W))}}}}for(ne=[],Y=P;Y=Y.parentNode;)Y.nodeType===1&&ne.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<ne.length;P++){var ee=ne[P];ee.element.scrollLeft=ee.left,ee.element.scrollTop=ee.top}}Mp=!!f1,h1=f1=null}finally{ut=y,Q.p=p,B.T=d}}i.current=l,gn=2}}function FM(){if(gn===2){gn=0;var i=di,l=Ql,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=B.T,B.T=null;var p=Q.p;Q.p=2;var y=ut;ut|=4;try{hM(i,l.alternate,l)}finally{ut=y,Q.p=p,B.T=d}}gn=3}}function zM(){if(gn===4||gn===3){gn=0,gb();var i=di,l=Ql,d=hs,p=IM;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?gn=5:(gn=0,Ql=di=null,jM(i,i.pendingLanes));var y=i.pendingLanes;if(y===0&&(ci=null),bb(d),l=l.stateNode,yr&&typeof yr.onCommitFiberRoot=="function")try{yr.onCommitFiberRoot(Rc,l,void 0,(l.current.flags&128)===128)}catch{}if(p!==null){l=B.T,y=Q.p,Q.p=2,B.T=null;try{for(var b=i.onRecoverableError,x=0;x<p.length;x++){var P=p[x];b(P.value,{componentStack:P.stack})}}finally{B.T=l,Q.p=y}}(hs&3)!==0&&bp(),Ro(i),y=i.pendingLanes,(d&261930)!==0&&(y&42)!==0?i===J0?ud++:(ud=0,J0=i):ud=0,cd(0)}}function jM(i,l){(i.pooledCacheLanes&=l)===0&&(l=i.pooledCache,l!=null&&(i.pooledCache=null,qc(l)))}function bp(){return $M(),FM(),zM(),BM()}function BM(){if(gn!==5)return!1;var i=di,l=Q0;Q0=0;var d=bb(hs),p=B.T,y=Q.p;try{Q.p=32>d?32:d,B.T=null,d=X0,X0=null;var b=di,x=hs;if(gn=0,Ql=di=null,hs=0,(ut&6)!==0)throw Error(r(331));var P=ut;if(ut|=4,EM(b.current),SM(b,b.current,x,d),ut=P,cd(0,!1),yr&&typeof yr.onPostCommitFiberRoot=="function")try{yr.onPostCommitFiberRoot(Rc,b)}catch{}return!0}finally{Q.p=y,B.T=p,jM(i,l)}}function HM(i,l,d){l=$r(d,l),l=M0(i.stateNode,l,2),i=oi(i,l,2),i!==null&&(Oc(i,2),Ro(i))}function St(i,l,d){if(i.tag===3)HM(i,i,d);else for(;l!==null;){if(l.tag===3){HM(l,i,d);break}else if(l.tag===1){var p=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(ci===null||!ci.has(p))){i=$r(d,i),d=q2(2),p=oi(l,d,2),p!==null&&(V2(d,p,l,i),Oc(p,2),Ro(p));break}}l=l.return}}function n1(i,l,d){var p=i.pingCache;if(p===null){p=i.pingCache=new wW;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)||(K0=!0,y.add(d),i=IW.bind(null,i,l,d),l.then(i,i))}function IW(i,l,d){var p=i.pingCache;p!==null&&p.delete(l),i.pingedLanes|=i.suspendedLanes&d,i.warmLanes&=~d,Mt===i&&(Ge&d)===d&&(Jt===4||Jt===3&&(Ge&62914560)===Ge&&300>Fn()-hp?(ut&2)===0&&Xl(i,0):Z0|=d,Yl===Ge&&(Yl=0)),Ro(i)}function qM(i,l){l===0&&(l=$T()),i=ua(i,l),i!==null&&(Oc(i,l),Ro(i))}function AW(i){var l=i.memoizedState,d=0;l!==null&&(d=l.retryLane),qM(i,d)}function RW(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),qM(i,d)}function TW(i,l){return oo(i,l)}var Sp=null,eu=null,r1=!1,wp=!1,o1=!1,hi=0;function Ro(i){i!==eu&&i.next===null&&(eu===null?Sp=eu=i:eu=eu.next=i),wp=!0,r1||(r1=!0,MW())}function cd(i,l){if(!o1&&wp){o1=!0;do for(var d=!1,p=Sp;p!==null;){if(i!==0){var y=p.pendingLanes;if(y===0)var b=0;else{var x=p.suspendedLanes,P=p.pingedLanes;b=(1<<31-br(42|i)+1)-1,b&=y&~(x&~P),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(d=!0,KM(p,b))}else b=Ge,b=xh(p,p===Mt?b:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(b&3)===0||Tc(p,b)||(d=!0,KM(p,b));p=p.next}while(d);o1=!1}}function OW(){VM()}function VM(){wp=r1=!1;var i=0;hi!==0&&jW()&&(i=hi);for(var l=Fn(),d=null,p=Sp;p!==null;){var y=p.next,b=WM(p,l);b===0?(p.next=null,d===null?Sp=y:d.next=y,y===null&&(eu=d)):(d=p,(i!==0||(b&3)!==0)&&(wp=!0)),p=y}gn!==0&&gn!==5||cd(i),hi!==0&&(hi=0)}function WM(i,l){for(var d=i.suspendedLanes,p=i.pingedLanes,y=i.expirationTimes,b=i.pendingLanes&-62914561;0<b;){var x=31-br(b),P=1<<x,z=y[x];z===-1?((P&d)===0||(P&p)!==0)&&(y[x]=rV(P,l)):z<=l&&(i.expiredLanes|=P),b&=~P}if(l=Mt,d=Ge,d=xh(i,i===l?d:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,d===0||i===l&&(bt===2||bt===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&Ac(p),i.callbackNode=null,i.callbackPriority=0;if((d&3)===0||Tc(i,d)){if(l=d&-d,l===i.callbackPriority)return l;switch(p!==null&&Ac(p),bb(d)){case 2:case 8:d=_o;break;case 32:d=Sl;break;case 268435456:d=UT;break;default:d=Sl}return p=GM.bind(null,i),d=oo(d,p),i.callbackPriority=l,i.callbackNode=d,l}return p!==null&&p!==null&&Ac(p),i.callbackPriority=2,i.callbackNode=null,2}function GM(i,l){if(gn!==0&&gn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var d=i.callbackNode;if(bp()&&i.callbackNode!==d)return null;var p=Ge;return p=xh(i,i===Mt?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(RM(i,p,l),WM(i,Fn()),i.callbackNode!=null&&i.callbackNode===d?GM.bind(null,i):null)}function KM(i,l){if(bp())return null;RM(i,l,!0)}function MW(){HW(function(){(ut&6)!==0?oo(Tn,OW):VM()})}function s1(){if(hi===0){var i=Fl;i===0&&(i=Ch,Ch<<=1,(Ch&261888)===0&&(Ch=256)),hi=i}return hi}function ZM(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Th(""+i)}function YM(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 PW(i,l,d,p,y){if(l==="submit"&&d&&d.stateNode===y){var b=ZM((y[Jn]||null).action),x=p.submitter;x&&(l=(l=x[Jn]||null)?ZM(l.formAction):x.getAttribute("formAction"),l!==null&&(b=l,x=null));var P=new Nh("action","action",null,p,y);i.push({event:P,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(hi!==0){var z=x?YM(y,x):new FormData(y);x0(d,{pending:!0,data:z,method:y.method,action:b},null,z)}}else typeof b=="function"&&(P.preventDefault(),z=x?YM(y,x):new FormData(y),x0(d,{pending:!0,data:z,method:y.method,action:b},b,z))},currentTarget:y}]})}}for(var i1=0;i1<Bb.length;i1++){var a1=Bb[i1],NW=a1.toLowerCase(),kW=a1[0].toUpperCase()+a1.slice(1);so(NW,"on"+kW)}so(AO,"onAnimationEnd"),so(RO,"onAnimationIteration"),so(TO,"onAnimationStart"),so("dblclick","onDoubleClick"),so("focusin","onFocus"),so("focusout","onBlur"),so(YV,"onTransitionRun"),so(QV,"onTransitionStart"),so(XV,"onTransitionCancel"),so(OO,"onTransitionEnd"),xl("onMouseEnter",["mouseout","mouseover"]),xl("onMouseLeave",["mouseout","mouseover"]),xl("onPointerEnter",["pointerout","pointerover"]),xl("onPointerLeave",["pointerout","pointerover"]),sa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),sa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),sa("onBeforeInput",["compositionend","keypress","textInput","paste"]),sa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),sa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),sa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var dd="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(" "),DW=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(dd));function QM(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 b=void 0;if(l)for(var x=p.length-1;0<=x;x--){var P=p[x],z=P.instance,G=P.currentTarget;if(P=P.listener,z!==b&&y.isPropagationStopped())break e;b=P,y.currentTarget=G;try{b(y)}catch(J){Lh(J)}y.currentTarget=null,b=z}else for(x=0;x<p.length;x++){if(P=p[x],z=P.instance,G=P.currentTarget,P=P.listener,z!==b&&y.isPropagationStopped())break e;b=P,y.currentTarget=G;try{b(y)}catch(J){Lh(J)}y.currentTarget=null,b=z}}}}function Ve(i,l){var d=l[Sb];d===void 0&&(d=l[Sb]=new Set);var p=i+"__bubble";d.has(p)||(XM(l,i,2,!1),d.add(p))}function l1(i,l,d){var p=0;l&&(p|=4),XM(d,i,p,l)}var Cp="_reactListening"+Math.random().toString(36).slice(2);function u1(i){if(!i[Cp]){i[Cp]=!0,VT.forEach(function(d){d!=="selectionchange"&&(DW.has(d)||l1(d,!1,i),l1(d,!0,i))});var l=i.nodeType===9?i:i.ownerDocument;l===null||l[Cp]||(l[Cp]=!0,l1("selectionchange",!1,l))}}function XM(i,l,d,p){switch(AP(l)){case 2:var y=uG;break;case 8:y=cG;break;default:y=_1}d=y.bind(null,l,d,i),y=void 0,!Tb||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 c1(i,l,d,p,y){var b=p;if((l&1)===0&&(l&2)===0&&p!==null)e:for(;;){if(p===null)return;var x=p.tag;if(x===3||x===4){var P=p.stateNode.containerInfo;if(P===y)break;if(x===4)for(x=p.return;x!==null;){var z=x.tag;if((z===3||z===4)&&x.stateNode.containerInfo===y)return;x=x.return}for(;P!==null;){if(x=Cl(P),x===null)return;if(z=x.tag,z===5||z===6||z===26||z===27){p=b=x;continue e}P=P.parentNode}}p=p.return}rO(function(){var G=b,J=Ab(d),ne=[];e:{var K=MO.get(i);if(K!==void 0){var Y=Nh,be=i;switch(i){case"keypress":if(Mh(d)===0)break e;case"keydown":case"keyup":Y=RV;break;case"focusin":be="focus",Y=Nb;break;case"focusout":be="blur",Y=Nb;break;case"beforeblur":case"afterblur":Y=Nb;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":Y=iO;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=gV;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=MV;break;case AO:case RO:case TO:Y=bV;break;case OO:Y=NV;break;case"scroll":case"scrollend":Y=pV;break;case"wheel":Y=DV;break;case"copy":case"cut":case"paste":Y=wV;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=lO;break;case"toggle":case"beforetoggle":Y=UV}var Te=(l&4)!==0,It=!Te&&(i==="scroll"||i==="scrollend"),V=Te?K!==null?K+"Capture":null:K;Te=[];for(var H=G,W;H!==null;){var ee=H;if(W=ee.stateNode,ee=ee.tag,ee!==5&&ee!==26&&ee!==27||W===null||V===null||(ee=Nc(H,V),ee!=null&&Te.push(fd(H,ee,W))),It)break;H=H.return}0<Te.length&&(K=new Y(K,be,null,d,J),ne.push({event:K,listeners:Te}))}}if((l&7)===0){e:{if(K=i==="mouseover"||i==="pointerover",Y=i==="mouseout"||i==="pointerout",K&&d!==Ib&&(be=d.relatedTarget||d.fromElement)&&(Cl(be)||be[wl]))break e;if((Y||K)&&(K=J.window===J?J:(K=J.ownerDocument)?K.defaultView||K.parentWindow:window,Y?(be=d.relatedTarget||d.toElement,Y=G,be=be?Cl(be):null,be!==null&&(It=s(be),Te=be.tag,be!==It||Te!==5&&Te!==27&&Te!==6)&&(be=null)):(Y=null,be=G),Y!==be)){if(Te=iO,ee="onMouseLeave",V="onMouseEnter",H="mouse",(i==="pointerout"||i==="pointerover")&&(Te=lO,ee="onPointerLeave",V="onPointerEnter",H="pointer"),It=Y==null?K:Pc(Y),W=be==null?K:Pc(be),K=new Te(ee,H+"leave",Y,d,J),K.target=It,K.relatedTarget=W,ee=null,Cl(J)===G&&(Te=new Te(V,H+"enter",be,d,J),Te.target=W,Te.relatedTarget=It,ee=Te),It=ee,Y&&be)t:{for(Te=LW,V=Y,H=be,W=0,ee=V;ee;ee=Te(ee))W++;ee=0;for(var Re=H;Re;Re=Te(Re))ee++;for(;0<W-ee;)V=Te(V),W--;for(;0<ee-W;)H=Te(H),ee--;for(;W--;){if(V===H||H!==null&&V===H.alternate){Te=V;break t}V=Te(V),H=Te(H)}Te=null}else Te=null;Y!==null&&JM(ne,K,Y,Te,!1),be!==null&&It!==null&&JM(ne,It,be,Te,!0)}}e:{if(K=G?Pc(G):window,Y=K.nodeName&&K.nodeName.toLowerCase(),Y==="select"||Y==="input"&&K.type==="file")var it=gO;else if(pO(K))if(vO)it=GV;else{it=VV;var Ee=qV}else Y=K.nodeName,!Y||Y.toLowerCase()!=="input"||K.type!=="checkbox"&&K.type!=="radio"?G&&xb(G.elementType)&&(it=gO):it=WV;if(it&&(it=it(i,G))){mO(ne,it,d,J);break e}Ee&&Ee(i,K,G),i==="focusout"&&G&&K.type==="number"&&G.memoizedProps.value!=null&&_b(K,"number",K.value)}switch(Ee=G?Pc(G):window,i){case"focusin":(pO(Ee)||Ee.contentEditable==="true")&&(Ml=Ee,Fb=G,jc=null);break;case"focusout":jc=Fb=Ml=null;break;case"mousedown":zb=!0;break;case"contextmenu":case"mouseup":case"dragend":zb=!1,xO(ne,d,J);break;case"selectionchange":if(ZV)break;case"keydown":case"keyup":xO(ne,d,J)}var ze;if(Db)e:{switch(i){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else Ol?fO(i,d)&&(Ke="onCompositionEnd"):i==="keydown"&&d.keyCode===229&&(Ke="onCompositionStart");Ke&&(uO&&d.locale!=="ko"&&(Ol||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Ol&&(ze=oO()):(Qs=J,Ob="value"in Qs?Qs.value:Qs.textContent,Ol=!0)),Ee=Ep(G,Ke),0<Ee.length&&(Ke=new aO(Ke,i,null,d,J),ne.push({event:Ke,listeners:Ee}),ze?Ke.data=ze:(ze=hO(d),ze!==null&&(Ke.data=ze)))),(ze=FV?zV(i,d):jV(i,d))&&(Ke=Ep(G,"onBeforeInput"),0<Ke.length&&(Ee=new aO("onBeforeInput","beforeinput",null,d,J),ne.push({event:Ee,listeners:Ke}),Ee.data=ze)),PW(ne,i,G,d,J)}QM(ne,l)})}function fd(i,l,d){return{instance:i,listener:l,currentTarget:d}}function Ep(i,l){for(var d=l+"Capture",p=[];i!==null;){var y=i,b=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||b===null||(y=Nc(i,d),y!=null&&p.unshift(fd(i,y,b)),y=Nc(i,l),y!=null&&p.push(fd(i,y,b))),i.tag===3)return p;i=i.return}return[]}function LW(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function JM(i,l,d,p,y){for(var b=l._reactName,x=[];d!==null&&d!==p;){var P=d,z=P.alternate,G=P.stateNode;if(P=P.tag,z!==null&&z===p)break;P!==5&&P!==26&&P!==27||G===null||(z=G,y?(G=Nc(d,b),G!=null&&x.unshift(fd(d,G,z))):y||(G=Nc(d,b),G!=null&&x.push(fd(d,G,z)))),d=d.return}x.length!==0&&i.push({event:l,listeners:x})}var UW=/\r\n?/g,$W=/\u0000|\uFFFD/g;function eP(i){return(typeof i=="string"?i:""+i).replace(UW,`
|
|
88
|
-
`).replace($W,"")}function tP(i,l){return l=eP(l),eP(i)===l}function xt(i,l,d,p,y,b){switch(d){case"children":typeof p=="string"?l==="body"||l==="textarea"&&p===""||Al(i,p):(typeof p=="number"||typeof p=="bigint")&&l!=="body"&&Al(i,""+p);break;case"className":Ah(i,"class",p);break;case"tabIndex":Ah(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Ah(i,d,p);break;case"style":tO(i,p,b);break;case"data":if(l!=="object"){Ah(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=Th(""+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 b=="function"&&(d==="formAction"?(l!=="input"&&xt(i,l,"name",y.name,y,null),xt(i,l,"formEncType",y.formEncType,y,null),xt(i,l,"formMethod",y.formMethod,y,null),xt(i,l,"formTarget",y.formTarget,y,null)):(xt(i,l,"encType",y.encType,y,null),xt(i,l,"method",y.method,y,null),xt(i,l,"target",y.target,y,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(d);break}p=Th(""+p),i.setAttribute(d,p);break;case"onClick":p!=null&&(i.onclick=Xo);break;case"onScroll":p!=null&&Ve("scroll",i);break;case"onScrollEnd":p!=null&&Ve("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=Th(""+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":Ve("beforetoggle",i),Ve("toggle",i),Ih(i,"popover",p);break;case"xlinkActuate":Qo(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":Qo(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":Qo(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":Qo(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":Qo(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":Qo(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":Qo(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":Qo(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":Qo(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":Ih(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=fV.get(d)||d,Ih(i,d,p))}}function d1(i,l,d,p,y,b){switch(d){case"style":tO(i,p,b);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"?Al(i,p):(typeof p=="number"||typeof p=="bigint")&&Al(i,""+p);break;case"onScroll":p!=null&&Ve("scroll",i);break;case"onScrollEnd":p!=null&&Ve("scrollend",i);break;case"onClick":p!=null&&(i.onclick=Xo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!WT.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(y=d.endsWith("Capture"),l=d.slice(2,y?d.length-7:void 0),b=i[Jn]||null,b=b!=null?b[d]:null,typeof b=="function"&&i.removeEventListener(l,b,y),typeof p=="function")){typeof b!="function"&&b!==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,""):Ih(i,d,p)}}}function kn(i,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",i),Ve("load",i);var p=!1,y=!1,b;for(b in d)if(d.hasOwnProperty(b)){var x=d[b];if(x!=null)switch(b){case"src":p=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:xt(i,l,b,x,d,null)}}y&&xt(i,l,"srcSet",d.srcSet,d,null),p&&xt(i,l,"src",d.src,d,null);return;case"input":Ve("invalid",i);var P=b=x=y=null,z=null,G=null;for(p in d)if(d.hasOwnProperty(p)){var J=d[p];if(J!=null)switch(p){case"name":y=J;break;case"type":x=J;break;case"checked":z=J;break;case"defaultChecked":G=J;break;case"value":b=J;break;case"defaultValue":P=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,l));break;default:xt(i,l,p,J,d,null)}}QT(i,b,P,z,G,x,y,!1);return;case"select":Ve("invalid",i),p=x=b=null;for(y in d)if(d.hasOwnProperty(y)&&(P=d[y],P!=null))switch(y){case"value":b=P;break;case"defaultValue":x=P;break;case"multiple":p=P;default:xt(i,l,y,P,d,null)}l=b,d=x,i.multiple=!!p,l!=null?Il(i,!!p,l,!1):d!=null&&Il(i,!!p,d,!0);return;case"textarea":Ve("invalid",i),b=y=p=null;for(x in d)if(d.hasOwnProperty(x)&&(P=d[x],P!=null))switch(x){case"value":p=P;break;case"defaultValue":y=P;break;case"children":b=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(91));break;default:xt(i,l,x,P,d,null)}JT(i,p,y,b);return;case"option":for(z in d)d.hasOwnProperty(z)&&(p=d[z],p!=null)&&(z==="selected"?i.selected=p&&typeof p!="function"&&typeof p!="symbol":xt(i,l,z,p,d,null));return;case"dialog":Ve("beforetoggle",i),Ve("toggle",i),Ve("cancel",i),Ve("close",i);break;case"iframe":case"object":Ve("load",i);break;case"video":case"audio":for(p=0;p<dd.length;p++)Ve(dd[p],i);break;case"image":Ve("error",i),Ve("load",i);break;case"details":Ve("toggle",i);break;case"embed":case"source":case"link":Ve("error",i),Ve("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(G in d)if(d.hasOwnProperty(G)&&(p=d[G],p!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:xt(i,l,G,p,d,null)}return;default:if(xb(l)){for(J in d)d.hasOwnProperty(J)&&(p=d[J],p!==void 0&&d1(i,l,J,p,d,void 0));return}}for(P in d)d.hasOwnProperty(P)&&(p=d[P],p!=null&&xt(i,l,P,p,d,null))}function FW(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,b=null,x=null,P=null,z=null,G=null,J=null;for(Y in d){var ne=d[Y];if(d.hasOwnProperty(Y)&&ne!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":z=ne;default:p.hasOwnProperty(Y)||xt(i,l,Y,null,p,ne)}}for(var K in p){var Y=p[K];if(ne=d[K],p.hasOwnProperty(K)&&(Y!=null||ne!=null))switch(K){case"type":b=Y;break;case"name":y=Y;break;case"checked":G=Y;break;case"defaultChecked":J=Y;break;case"value":x=Y;break;case"defaultValue":P=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(r(137,l));break;default:Y!==ne&&xt(i,l,K,Y,p,ne)}}Eb(i,x,P,z,G,J,b,y);return;case"select":Y=x=P=K=null;for(b in d)if(z=d[b],d.hasOwnProperty(b)&&z!=null)switch(b){case"value":break;case"multiple":Y=z;default:p.hasOwnProperty(b)||xt(i,l,b,null,p,z)}for(y in p)if(b=p[y],z=d[y],p.hasOwnProperty(y)&&(b!=null||z!=null))switch(y){case"value":K=b;break;case"defaultValue":P=b;break;case"multiple":x=b;default:b!==z&&xt(i,l,y,b,p,z)}l=P,d=x,p=Y,K!=null?Il(i,!!d,K,!1):!!p!=!!d&&(l!=null?Il(i,!!d,l,!0):Il(i,!!d,d?[]:"",!1));return;case"textarea":Y=K=null;for(P in d)if(y=d[P],d.hasOwnProperty(P)&&y!=null&&!p.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:xt(i,l,P,null,p,y)}for(x in p)if(y=p[x],b=d[x],p.hasOwnProperty(x)&&(y!=null||b!=null))switch(x){case"value":K=y;break;case"defaultValue":Y=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==b&&xt(i,l,x,y,p,b)}XT(i,K,Y);return;case"option":for(var be in d)K=d[be],d.hasOwnProperty(be)&&K!=null&&!p.hasOwnProperty(be)&&(be==="selected"?i.selected=!1:xt(i,l,be,null,p,K));for(z in p)K=p[z],Y=d[z],p.hasOwnProperty(z)&&K!==Y&&(K!=null||Y!=null)&&(z==="selected"?i.selected=K&&typeof K!="function"&&typeof K!="symbol":xt(i,l,z,K,p,Y));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 Te in d)K=d[Te],d.hasOwnProperty(Te)&&K!=null&&!p.hasOwnProperty(Te)&&xt(i,l,Te,null,p,K);for(G in p)if(K=p[G],Y=d[G],p.hasOwnProperty(G)&&K!==Y&&(K!=null||Y!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(r(137,l));break;default:xt(i,l,G,K,p,Y)}return;default:if(xb(l)){for(var It in d)K=d[It],d.hasOwnProperty(It)&&K!==void 0&&!p.hasOwnProperty(It)&&d1(i,l,It,void 0,p,K);for(J in p)K=p[J],Y=d[J],!p.hasOwnProperty(J)||K===Y||K===void 0&&Y===void 0||d1(i,l,J,K,p,Y);return}}for(var V in d)K=d[V],d.hasOwnProperty(V)&&K!=null&&!p.hasOwnProperty(V)&&xt(i,l,V,null,p,K);for(ne in p)K=p[ne],Y=d[ne],!p.hasOwnProperty(ne)||K===Y||K==null&&Y==null||xt(i,l,ne,K,p,Y)}function nP(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function zW(){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],b=y.transferSize,x=y.initiatorType,P=y.duration;if(b&&P&&nP(x)){for(x=0,P=y.responseEnd,p+=1;p<d.length;p++){var z=d[p],G=z.startTime;if(G>P)break;var J=z.transferSize,ne=z.initiatorType;J&&nP(ne)&&(z=z.responseEnd,x+=J*(z<P?1:(P-G)/(z-G)))}if(--p,l+=8*(b+x)/(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 f1=null,h1=null;function _p(i){return i.nodeType===9?i:i.ownerDocument}function rP(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 oP(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 p1(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 m1=null;function jW(){var i=window.event;return i&&i.type==="popstate"?i===m1?!1:(m1=i,!0):(m1=null,!1)}var sP=typeof setTimeout=="function"?setTimeout:void 0,BW=typeof clearTimeout=="function"?clearTimeout:void 0,iP=typeof Promise=="function"?Promise:void 0,HW=typeof queueMicrotask=="function"?queueMicrotask:typeof iP<"u"?function(i){return iP.resolve(null).then(i).catch(qW)}:sP;function qW(i){setTimeout(function(){throw i})}function pi(i){return i==="head"}function aP(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),ou(l);return}p--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")p++;else if(d==="html")hd(i.ownerDocument.documentElement);else if(d==="head"){d=i.ownerDocument.head,hd(d);for(var b=d.firstChild;b;){var x=b.nextSibling,P=b.nodeName;b[Mc]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&b.rel.toLowerCase()==="stylesheet"||d.removeChild(b),b=x}}else d==="body"&&hd(i.ownerDocument.body);d=y}while(d);ou(l)}function lP(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 g1(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":g1(d),wb(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}i.removeChild(d)}}function VW(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[Mc])switch(l){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(b=i.getAttribute("rel"),b==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(b!==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(b=i.getAttribute("src"),(b!==(y.src==null?null:y.src)||i.getAttribute("type")!==(y.type==null?null:y.type)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&b&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(l==="input"&&i.type==="hidden"){var b=y.name==null?null:""+y.name;if(y.type==="hidden"&&i.getAttribute("name")===b)return i}else return i;if(i=Hr(i.nextSibling),i===null)break}return null}function WW(i,l,d){if(l==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!d||(i=Hr(i.nextSibling),i===null))return null;return i}function uP(i,l){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=Hr(i.nextSibling),i===null))return null;return i}function v1(i){return i.data==="$?"||i.data==="$~"}function y1(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function GW(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 Hr(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 b1=null;function cP(i){i=i.nextSibling;for(var l=0;i;){if(i.nodeType===8){var d=i.data;if(d==="/$"||d==="/&"){if(l===0)return Hr(i.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}i=i.nextSibling}return null}function dP(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 fP(i,l,d){switch(l=_p(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 hd(i){for(var l=i.attributes;l.length;)i.removeAttributeNode(l[0]);wb(i)}var qr=new Map,hP=new Set;function xp(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ps=Q.d;Q.d={f:KW,r:ZW,D:YW,C:QW,L:XW,m:JW,X:tG,S:eG,M:nG};function KW(){var i=ps.f(),l=gp();return i||l}function ZW(i){var l=El(i);l!==null&&l.tag===5&&l.type==="form"?O2(l):ps.r(i)}var tu=typeof document>"u"?null:document;function pP(i,l,d){var p=tu;if(p&&typeof l=="string"&&l){var y=Lr(l);y='link[rel="'+i+'"][href="'+y+'"]',typeof d=="string"&&(y+='[crossorigin="'+d+'"]'),hP.has(y)||(hP.add(y),i={rel:i,crossOrigin:d,href:l},p.querySelector(y)===null&&(l=p.createElement("link"),kn(l,"link",i),wn(l),p.head.appendChild(l)))}}function YW(i){ps.D(i),pP("dns-prefetch",i,null)}function QW(i,l){ps.C(i,l),pP("preconnect",i,l)}function XW(i,l,d){ps.L(i,l,d);var p=tu;if(p&&i&&l){var y='link[rel="preload"][as="'+Lr(l)+'"]';l==="image"&&d&&d.imageSrcSet?(y+='[imagesrcset="'+Lr(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(y+='[imagesizes="'+Lr(d.imageSizes)+'"]')):y+='[href="'+Lr(i)+'"]';var b=y;switch(l){case"style":b=nu(i);break;case"script":b=ru(i)}qr.has(b)||(i=m({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:i,as:l},d),qr.set(b,i),p.querySelector(y)!==null||l==="style"&&p.querySelector(pd(b))||l==="script"&&p.querySelector(md(b))||(l=p.createElement("link"),kn(l,"link",i),wn(l),p.head.appendChild(l)))}}function JW(i,l){ps.m(i,l);var d=tu;if(d&&i){var p=l&&typeof l.as=="string"?l.as:"script",y='link[rel="modulepreload"][as="'+Lr(p)+'"][href="'+Lr(i)+'"]',b=y;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=ru(i)}if(!qr.has(b)&&(i=m({rel:"modulepreload",href:i},l),qr.set(b,i),d.querySelector(y)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(md(b)))return}p=d.createElement("link"),kn(p,"link",i),wn(p),d.head.appendChild(p)}}}function eG(i,l,d){ps.S(i,l,d);var p=tu;if(p&&i){var y=_l(p).hoistableStyles,b=nu(i);l=l||"default";var x=y.get(b);if(!x){var P={loading:0,preload:null};if(x=p.querySelector(pd(b)))P.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":l},d),(d=qr.get(b))&&S1(i,d);var z=x=p.createElement("link");wn(z),kn(z,"link",i),z._p=new Promise(function(G,J){z.onload=G,z.onerror=J}),z.addEventListener("load",function(){P.loading|=1}),z.addEventListener("error",function(){P.loading|=2}),P.loading|=4,Ip(x,l,p)}x={type:"stylesheet",instance:x,count:1,state:P},y.set(b,x)}}}function tG(i,l){ps.X(i,l);var d=tu;if(d&&i){var p=_l(d).hoistableScripts,y=ru(i),b=p.get(y);b||(b=d.querySelector(md(y)),b||(i=m({src:i,async:!0},l),(l=qr.get(y))&&w1(i,l),b=d.createElement("script"),wn(b),kn(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},p.set(y,b))}}function nG(i,l){ps.M(i,l);var d=tu;if(d&&i){var p=_l(d).hoistableScripts,y=ru(i),b=p.get(y);b||(b=d.querySelector(md(y)),b||(i=m({src:i,async:!0,type:"module"},l),(l=qr.get(y))&&w1(i,l),b=d.createElement("script"),wn(b),kn(b,"link",i),d.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},p.set(y,b))}}function mP(i,l,d,p){var y=(y=Me.current)?xp(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=nu(d.href),d=_l(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=nu(d.href);var b=_l(y).hoistableStyles,x=b.get(i);if(x||(y=y.ownerDocument||y,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(i,x),(b=y.querySelector(pd(i)))&&!b._p&&(x.instance=b,x.state.loading=5),qr.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},qr.set(i,d),b||rG(y,i,d,x.state))),l&&p===null)throw Error(r(528,""));return x}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=ru(d),d=_l(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 nu(i){return'href="'+Lr(i)+'"'}function pd(i){return'link[rel="stylesheet"]['+i+"]"}function gP(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function rG(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}),kn(l,"link",d),wn(l),i.head.appendChild(l))}function ru(i){return'[src="'+Lr(i)+'"]'}function md(i){return"script[async]"+i}function vP(i,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var p=i.querySelector('style[data-href~="'+Lr(d.href)+'"]');if(p)return l.instance=p,wn(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"),wn(p),kn(p,"style",y),Ip(p,d.precedence,i),l.instance=p;case"stylesheet":y=nu(d.href);var b=i.querySelector(pd(y));if(b)return l.state.loading|=4,l.instance=b,wn(b),b;p=gP(d),(y=qr.get(y))&&S1(p,y),b=(i.ownerDocument||i).createElement("link"),wn(b);var x=b;return x._p=new Promise(function(P,z){x.onload=P,x.onerror=z}),kn(b,"link",p),l.state.loading|=4,Ip(b,d.precedence,i),l.instance=b;case"script":return b=ru(d.src),(y=i.querySelector(md(b)))?(l.instance=y,wn(y),y):(p=d,(y=qr.get(b))&&(p=m({},d),w1(p,y)),i=i.ownerDocument||i,y=i.createElement("script"),wn(y),kn(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,Ip(p,d.precedence,i));return l.instance}function Ip(i,l,d){for(var p=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=p.length?p[p.length-1]:null,b=y,x=0;x<p.length;x++){var P=p[x];if(P.dataset.precedence===l)b=P;else if(b!==y)break}b?b.parentNode.insertBefore(i,b.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(i,l.firstChild))}function S1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.title==null&&(i.title=l.title)}function w1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.integrity==null&&(i.integrity=l.integrity)}var Ap=null;function yP(i,l,d){if(Ap===null){var p=new Map,y=Ap=new Map;y.set(d,p)}else y=Ap,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 b=d[y];if(!(b[Mc]||b[On]||i==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var x=b.getAttribute(l)||"";x=i+x;var P=p.get(x);P?P.push(b):p.set(x,[b])}}return p}function bP(i,l,d){i=i.ownerDocument||i,i.head.insertBefore(d,l==="title"?i.querySelector("head > title"):null)}function oG(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 SP(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function sG(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=nu(p.href),b=l.querySelector(pd(y));if(b){l=b._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(i.count++,i=Rp.bind(i),l.then(i,i)),d.state.loading|=4,d.instance=b,wn(b);return}b=l.ownerDocument||l,p=gP(p),(y=qr.get(y))&&S1(p,y),b=b.createElement("link"),wn(b);var x=b;x._p=new Promise(function(P,z){x.onload=P,x.onerror=z}),kn(b,"link",p),d.instance=b}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(i.count++,d=Rp.bind(i),l.addEventListener("load",d),l.addEventListener("error",d))}}var C1=0;function iG(i,l){return i.stylesheets&&i.count===0&&Op(i,i.stylesheets),0<i.count||0<i.imgCount?function(d){var p=setTimeout(function(){if(i.stylesheets&&Op(i,i.stylesheets),i.unsuspend){var b=i.unsuspend;i.unsuspend=null,b()}},6e4+l);0<i.imgBytes&&C1===0&&(C1=62500*zW());var y=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Op(i,i.stylesheets),i.unsuspend)){var b=i.unsuspend;i.unsuspend=null,b()}},(i.imgBytes>C1?50:800)+l);return i.unsuspend=d,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(y)}}:null}function Rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Op(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Tp=null;function Op(i,l){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Tp=new Map,l.forEach(aG,i),Tp=null,Rp.call(i))}function aG(i,l){if(!(l.state.loading&4)){var d=Tp.get(i);if(d)var p=d.get(null);else{d=new Map,Tp.set(i,d);for(var y=i.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<y.length;b++){var x=y[b];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(d.set(x.dataset.precedence,x),p=x)}p&&d.set(null,p)}y=l.instance,x=y.getAttribute("data-precedence"),b=d.get(x)||p,b===p&&d.set(null,y),d.set(x,y),this.count++,p=Rp.bind(this),y.addEventListener("load",p),y.addEventListener("error",p),b?b.parentNode.insertBefore(y,b.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(y,i.firstChild)),l.state.loading|=4}}var gd={$$typeof:A,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function lG(i,l,d,p,y,b,x,P,z){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=vb(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vb(0),this.hiddenUpdates=vb(null),this.identifierPrefix=p,this.onUncaughtError=y,this.onCaughtError=b,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function wP(i,l,d,p,y,b,x,P,z,G,J,ne){return i=new lG(i,l,d,x,z,G,J,ne,P),l=1,b===!0&&(l|=24),b=wr(3,null,null,l),i.current=b,b.stateNode=i,l=t0(),l.refCount++,i.pooledCache=l,l.refCount++,b.memoizedState={element:p,isDehydrated:d,cache:l},s0(b),i}function CP(i){return i?(i=kl,i):kl}function EP(i,l,d,p,y,b){y=CP(y),p.context===null?p.context=y:p.pendingContext=y,p=ri(l),p.payload={element:d},b=b===void 0?null:b,b!==null&&(p.callback=b),d=oi(i,p,l),d!==null&&(sr(d,i,l),Kc(d,i,l))}function _P(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<l?d:l}}function E1(i,l){_P(i,l),(i=i.alternate)&&_P(i,l)}function xP(i){if(i.tag===13||i.tag===31){var l=ua(i,67108864);l!==null&&sr(l,i,67108864),E1(i,67108864)}}function IP(i){if(i.tag===13||i.tag===31){var l=Ir();l=yb(l);var d=ua(i,l);d!==null&&sr(d,i,l),E1(i,l)}}var Mp=!0;function uG(i,l,d,p){var y=B.T;B.T=null;var b=Q.p;try{Q.p=2,_1(i,l,d,p)}finally{Q.p=b,B.T=y}}function cG(i,l,d,p){var y=B.T;B.T=null;var b=Q.p;try{Q.p=8,_1(i,l,d,p)}finally{Q.p=b,B.T=y}}function _1(i,l,d,p){if(Mp){var y=x1(p);if(y===null)c1(i,l,p,Pp,d),RP(i,p);else if(fG(y,i,l,d,p))p.stopPropagation();else if(RP(i,p),l&4&&-1<dG.indexOf(i)){for(;y!==null;){var b=El(y);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var x=oa(b.pendingLanes);if(x!==0){var P=b;for(P.pendingLanes|=2,P.entangledLanes|=2;x;){var z=1<<31-br(x);P.entanglements[1]|=z,x&=~z}Ro(b),(ut&6)===0&&(pp=Fn()+500,cd(0))}}break;case 31:case 13:P=ua(b,2),P!==null&&sr(P,b,2),gp(),E1(b,2)}if(b=x1(p),b===null&&c1(i,l,p,Pp,d),b===y)break;y=b}y!==null&&p.stopPropagation()}else c1(i,l,p,null,d)}}function x1(i){return i=Ab(i),I1(i)}var Pp=null;function I1(i){if(Pp=null,i=Cl(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=u(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 Pp=i,null}function AP(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(Pt()){case Tn:return 2;case _o:return 8;case Sl:case Qq:return 32;case UT:return 268435456;default:return 32}default:return 32}}var A1=!1,mi=null,gi=null,vi=null,vd=new Map,yd=new Map,yi=[],dG="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 RP(i,l){switch(i){case"focusin":case"focusout":mi=null;break;case"dragenter":case"dragleave":gi=null;break;case"mouseover":case"mouseout":vi=null;break;case"pointerover":case"pointerout":vd.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":yd.delete(l.pointerId)}}function bd(i,l,d,p,y,b){return i===null||i.nativeEvent!==b?(i={blockedOn:l,domEventName:d,eventSystemFlags:p,nativeEvent:b,targetContainers:[y]},l!==null&&(l=El(l),l!==null&&xP(l)),i):(i.eventSystemFlags|=p,l=i.targetContainers,y!==null&&l.indexOf(y)===-1&&l.push(y),i)}function fG(i,l,d,p,y){switch(l){case"focusin":return mi=bd(mi,i,l,d,p,y),!0;case"dragenter":return gi=bd(gi,i,l,d,p,y),!0;case"mouseover":return vi=bd(vi,i,l,d,p,y),!0;case"pointerover":var b=y.pointerId;return vd.set(b,bd(vd.get(b)||null,i,l,d,p,y)),!0;case"gotpointercapture":return b=y.pointerId,yd.set(b,bd(yd.get(b)||null,i,l,d,p,y)),!0}return!1}function TP(i){var l=Cl(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,HT(i.priority,function(){IP(d)});return}}else if(l===31){if(l=u(d),l!==null){i.blockedOn=l,HT(i.priority,function(){IP(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 Np(i){if(i.blockedOn!==null)return!1;for(var l=i.targetContainers;0<l.length;){var d=x1(i.nativeEvent);if(d===null){d=i.nativeEvent;var p=new d.constructor(d.type,d);Ib=p,d.target.dispatchEvent(p),Ib=null}else return l=El(d),l!==null&&xP(l),i.blockedOn=d,!1;l.shift()}return!0}function OP(i,l,d){Np(i)&&d.delete(l)}function hG(){A1=!1,mi!==null&&Np(mi)&&(mi=null),gi!==null&&Np(gi)&&(gi=null),vi!==null&&Np(vi)&&(vi=null),vd.forEach(OP),yd.forEach(OP)}function kp(i,l){i.blockedOn===l&&(i.blockedOn=null,A1||(A1=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,hG)))}var Dp=null;function MP(i){Dp!==i&&(Dp=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Dp===i&&(Dp=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(I1(p||d)===null)continue;break}var b=El(d);b!==null&&(i.splice(l,3),l-=3,x0(b,{pending:!0,data:y,method:d.method,action:p},p,y))}}))}function ou(i){function l(z){return kp(z,i)}mi!==null&&kp(mi,i),gi!==null&&kp(gi,i),vi!==null&&kp(vi,i),vd.forEach(l),yd.forEach(l);for(var d=0;d<yi.length;d++){var p=yi[d];p.blockedOn===i&&(p.blockedOn=null)}for(;0<yi.length&&(d=yi[0],d.blockedOn===null);)TP(d),d.blockedOn===null&&yi.shift();if(d=(i.ownerDocument||i).$$reactFormReplay,d!=null)for(p=0;p<d.length;p+=3){var y=d[p],b=d[p+1],x=y[Jn]||null;if(typeof b=="function")x||MP(d);else if(x){var P=null;if(b&&b.hasAttribute("formAction")){if(y=b,x=b[Jn]||null)P=x.formAction;else if(I1(y)!==null)continue}else P=x.action;typeof P=="function"?d[p+1]=P:(d.splice(p,3),p-=3),MP(d)}}}function PP(){function i(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(x){return y=x})},focusReset:"manual",scroll:"manual"})}function l(){y!==null&&(y(),y=null),p||setTimeout(d,20)}function d(){if(!p&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.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 R1(i){this._internalRoot=i}Lp.prototype.render=R1.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,p=Ir();EP(d,p,i,l,null,null)},Lp.prototype.unmount=R1.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;EP(i.current,2,null,i,null,null),gp(),l[wl]=null}};function Lp(i){this._internalRoot=i}Lp.prototype.unstable_scheduleHydration=function(i){if(i){var l=BT();i={blockedOn:null,target:i,priority:l};for(var d=0;d<yi.length&&l!==0&&l<yi[d].priority;d++);yi.splice(d,0,i),d===0&&TP(i)}};var NP=t.version;if(NP!=="19.2.7")throw Error(r(527,NP,"19.2.7"));Q.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 pG={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Up=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Up.isDisabled&&Up.supportsFiber)try{Rc=Up.inject(pG),yr=Up}catch{}}return Ud.createRoot=function(i,l){if(!o(i))throw Error(r(299));var d=!1,p="",y=z2,b=j2,x=B2;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&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),l=wP(i,1,!1,null,null,d,p,null,y,b,x,PP),i[wl]=l.current,u1(i),new R1(l)},Ud.hydrateRoot=function(i,l,d){if(!o(i))throw Error(r(299));var p=!1,y="",b=z2,x=j2,P=B2,z=null;return d!=null&&(d.unstable_strictMode===!0&&(p=!0),d.identifierPrefix!==void 0&&(y=d.identifierPrefix),d.onUncaughtError!==void 0&&(b=d.onUncaughtError),d.onCaughtError!==void 0&&(x=d.onCaughtError),d.onRecoverableError!==void 0&&(P=d.onRecoverableError),d.formState!==void 0&&(z=d.formState)),l=wP(i,1,!0,l,d??null,p,y,z,b,x,P,PP),l.context=CP(null),d=l.current,p=Ir(),p=yb(p),y=ri(p),y.callback=null,oi(d,y,p),d=p,l.current.lanes=d,Oc(l,d),Ro(l),i[wl]=l.current,u1(i),new Lp(l)},Ud.version="19.2.7",Ud}var sU;function hbe(){if(sU)return kE.exports;sU=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(),kE.exports=fbe(),kE.exports}var pbe=hbe();const mbe={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)};function gbe({onRequest:e,onSseError:t,onSseEvent:n,responseTransformer:r,responseValidator:o,sseDefaultRetryDelay:s,sseMaxRetryAttempts:a,sseMaxRetryDelay:u,sseSleepFn:c,url:f,...h}){let m;const g=c??(S=>new Promise(C=>setTimeout(C,S)));return{stream:async function*(){let S=s??3e3,C=0;const E=h.signal??new AbortController().signal;for(;!E.aborted;){C++;const I=h.headers instanceof Headers?h.headers:new Headers(h.headers);m!==void 0&&I.set("Last-Event-ID",m);try{const A={redirect:"follow",...h,body:h.serializedBody,headers:I,signal:E};let T=new Request(f,A);e&&(T=await e(f,A));const M=await(h.fetch??globalThis.fetch)(T);if(!M.ok)throw new Error(`SSE failed: ${M.status} ${M.statusText}`);if(!M.body)throw new Error("No body in SSE response");const R=M.body.pipeThrough(new TextDecoderStream).getReader();let k="";const L=()=>{try{R.cancel()}catch{}};E.addEventListener("abort",L);try{for(;;){const{done:q,value:$}=await R.read();if(q)break;k+=$,k=k.replace(/\r\n?/g,`
|
|
89
|
-
`);const D=k.split(`
|
|
90
|
-
|
|
91
|
-
`);k=D.pop()??"";for(const j of D){const Z=j.split(`
|
|
92
|
-
`),he=[];let B;for(const ue of Z)if(ue.startsWith("data:"))he.push(ue.replace(/^data:\s*/,""));else if(ue.startsWith("event:"))B=ue.replace(/^event:\s*/,"");else if(ue.startsWith("id:"))m=ue.replace(/^id:\s*/,"");else if(ue.startsWith("retry:")){const Ce=Number.parseInt(ue.replace(/^retry:\s*/,""),10);Number.isNaN(Ce)||(S=Ce)}let Q,ae=!1;if(he.length){const ue=he.join(`
|
|
93
|
-
`);try{Q=JSON.parse(ue),ae=!0}catch{Q=ue}}ae&&(o&&await o(Q),r&&(Q=await r(Q))),n?.({data:Q,event:B,id:m,retry:S}),he.length&&(yield Q)}}}finally{E.removeEventListener("abort",L),R.releaseLock()}break}catch(A){if(t?.(A),a!==void 0&&C>=a)break;const T=Math.min(S*2**(C-1),u??3e4);await g(T)}}}()}}const vbe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ybe=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},bbe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},a7=({allowReserved:e,explode:t,name:n,style:r,value:o})=>{if(!t){const u=(e?o:o.map(c=>encodeURIComponent(c))).join(ybe(r));switch(r){case"label":return`.${u}`;case"matrix":return`;${n}=${u}`;case"simple":return u;default:return`${n}=${u}`}}const s=vbe(r),a=o.map(u=>r==="label"||r==="simple"?e?u:encodeURIComponent(u):Ly({allowReserved:e,name:n,value:u})).join(s);return r==="label"||r==="matrix"?s+a:a},Ly=({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)}`},l7=({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 c=[];Object.entries(o).forEach(([h,m])=>{c=[...c,h,e?m:encodeURIComponent(m)]});const f=c.join(",");switch(r){case"form":return`${n}=${f}`;case"label":return`.${f}`;case"matrix":return`;${n}=${f}`;default:return f}}const a=bbe(r),u=Object.entries(o).map(([c,f])=>Ly({allowReserved:e,name:r==="deepObject"?`${n}[${c}]`:c,value:f})).join(a);return r==="label"||r==="matrix"?a+u:u},Sbe=/\{[^{}]+\}/g,wbe=({path:e,url:t})=>{let n=t;const r=t.match(Sbe);if(r)for(const o of r){let s=!1,a=o.substring(1,o.length-1),u="simple";a.endsWith("*")&&(s=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),u="label"):a.startsWith(";")&&(a=a.substring(1),u="matrix");const c=e[a];if(c==null)continue;if(Array.isArray(c)){n=n.replace(o,a7({explode:s,name:a,style:u,value:c}));continue}if(typeof c=="object"){n=n.replace(o,l7({explode:s,name:a,style:u,value:c,valueOnly:!0}));continue}if(u==="matrix"){n=n.replace(o,`;${Ly({name:a,value:c})}`);continue}const f=encodeURIComponent(u==="label"?`.${c}`:c);n=n.replace(o,f)}return n},Cbe=({baseUrl:e,path:t,query:n,querySerializer:r,url:o})=>{const s=o.startsWith("/")?o:`/${o}`;let a=(e??"")+s;t&&(a=wbe({path:t,url:a}));let u=n?r(n):"";return u.startsWith("?")&&(u=u.substring(1)),u&&(a+=`?${u}`),a};function iU(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 Ebe=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},u7=({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 u=e[s]||t;if(Array.isArray(a)){const c=a7({allowReserved:u.allowReserved,explode:!0,name:s,style:"form",value:a,...u.array});c&&o.push(c)}else if(typeof a=="object"){const c=l7({allowReserved:u.allowReserved,explode:!0,name:s,style:"deepObject",value:a,...u.object});c&&o.push(c)}else{const c=Ly({allowReserved:u.allowReserved,name:s,value:a});c&&o.push(c)}}return o.join("&")},_be=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"}},xbe=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)):!1;async function Ibe(e){for(const t of e.security??[]){if(xbe(e,t.name))continue;const n=await Ebe(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 aU=e=>Cbe({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:u7(e.querySerializer),url:e.url}),lU=(e,t)=>{const n={...e,...t};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=c7(e.headers,t.headers),n},Abe=e=>{const t=[];return e.forEach((n,r)=>{t.push([r,n])}),t},c7=(...e)=>{const t=new Headers;for(const n of e){if(!n)continue;const r=n instanceof Headers?Abe(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 UE{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 Rbe=()=>({error:new UE,request:new UE,response:new UE}),Tbe=u7({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Obe={"Content-Type":"application/json"},d7=(e={})=>({...mbe,headers:Obe,parseAs:"auto",querySerializer:Tbe,...e}),Mbe=(e={})=>{let t=lU(d7(),e);const n=()=>({...t}),r=h=>(t=lU(t,h),n()),o=Rbe(),s=async h=>{const m={...t,...h,fetch:h.fetch??t.fetch??globalThis.fetch,headers:c7(t.headers,h.headers),serializedBody:void 0};m.security&&await Ibe(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=aU(g);return{opts:g,url:v}},a=async h=>{const m=h.throwOnError??t.throwOnError,g=h.responseStyle??t.responseStyle;let v,w;try{const{opts:S,url:C}=await s(h),E={redirect:"follow",...S,body:iU(S)};v=new Request(C,E);for(const M of o.request.fns)M&&(v=await M(v,S));const I=S.fetch;w=await I(v);for(const M of o.response.fns)M&&(w=await M(w,v,S));const A={request:v,response:w};if(w.ok){const M=(S.parseAs==="auto"?_be(w.headers.get("Content-Type")):S.parseAs)??"json";if(w.status===204||w.headers.get("Content-Length")==="0"){let k;switch(M){case"arrayBuffer":case"blob":case"text":k=await w[M]();break;case"formData":k=new FormData;break;case"stream":k=w.body;break;default:k={};break}return S.responseStyle==="data"?k:{data:k,...A}}let R;switch(M){case"arrayBuffer":case"blob":case"formData":case"text":R=await w[M]();break;case"json":{const k=await w.text();R=k?JSON.parse(k):{};break}case"stream":return S.responseStyle==="data"?w.body:{data:w.body,...A}}return M==="json"&&(S.responseValidator&&await S.responseValidator(R),S.responseTransformer&&(R=await S.responseTransformer(R))),S.responseStyle==="data"?R:{data:R,...A}}const T=await w.text();let N;try{N=JSON.parse(T)}catch{}throw N??T}catch(S){let C=S;for(const E of o.error.fns)E&&(C=await E(C,w,v,h));if(C=C||{},m)throw C;return g==="data"?void 0:{error:C,request:v,response:w}}},u=h=>m=>a({...m,method:h}),c=h=>async m=>{const{opts:g,url:v}=await s(m);return gbe({...g,body:g.body,method:h,onRequest:async(w,S)=>{let C=new Request(w,S);for(const E of o.request.fns)E&&(C=await E(C,g));return C},serializedBody:iU(g),url:v})};return{buildUrl:h=>aU({...t,...h}),connect:u("CONNECT"),delete:u("DELETE"),get:u("GET"),getConfig:n,head:u("HEAD"),interceptors:o,options:u("OPTIONS"),patch:u("PATCH"),post:u("POST"),put:u("PUT"),request:a,setConfig:r,sse:{connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),head:c("HEAD"),options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),trace:c("TRACE")},trace:u("TRACE")}},le=Mbe(d7({baseUrl:"https://api.remit.example.com"}));let uU=!1;const Pbe=e=>{uU||(le.interceptors.request.use(async t=>{const n=await e.getToken();return n&&t.headers.set("Authorization",`Bearer ${n}`),t}),uU=!0)},Nbe=({children:e})=>O.jsx(O.Fragment,{children:e}),kbe={configure:()=>{},getToken:async()=>null,resetToken:()=>{},Shell:Nbe,Account:({fallback:e=null})=>O.jsx(O.Fragment,{children:e})},f7=_.createContext(kbe),Dbe=f7.Provider,Lbe=()=>_.useContext(f7),Kg=new Set;let Zg=!1;const vR=()=>{if(!Zg){Zg=!0;for(const e of Kg)e(!0)}},Ube=()=>Zg,$be=e=>(Kg.add(e),()=>{Kg.delete(e)}),cU=()=>{Zg=!1;for(const e of Kg)e(!1)},yR=(e,t)=>{if(ry(e)){vR();return}noe(e,t)&&qu(e)},Fbe=(e,t)=>{yR(e,t.meta)},zbe=(e,t,n,r)=>{yR(e,r.meta)},wx=e=>new TextEncoder().encode(e),h7={},Cx={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),h7[e]=t,Cx[t]=e}function jbe(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 Cx)t[n/2]=Cx[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return t}function ja(e){let t="";for(let n=0;n<e.byteLength;n++)t+=h7[e[n]];return t}const Df=e=>e instanceof Uint8Array?e:typeof e=="string"?wx(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),Bbe=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";class Us{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 Us({...t,headers:{...t.headers}});return n.query&&(n.query=Hbe(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 Us.clone(this)}}function Hbe(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{})}class Lf{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 dU=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},Ba=e=>encodeURIComponent(e).replace(/[!'()*]/g,qbe),qbe=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function bR(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=Ba(n),Array.isArray(r))for(let o=0,s=r.length;o<s;o++)t.push(`${n}=${Ba(r[o])}`);else{let o=n;(r||typeof r=="string")&&(o+=`=${Ba(r)}`),t.push(o)}}return t.join("&")}const fm="[aws-rum-web:unknown.unknown]";class pe{static configure(t){pe.debugEnabled=t}static getCallerInfo(){var t,n;try{const r=new Error().stack;if(!r)return fm;const o=r.split(`
|
|
94
|
-
`);if(o.length<4)return fm;const s=o[3];if(!s)return fm;const a=s.match(/at (?:(.+?)\s+\()?/);if(a&&a.length>=2){const u=a[1].trim(),c=u.split(".");if(c.length>=2){const f=(t=c[c.length-2])!==null&&t!==void 0?t:"unknown",h=(n=c[c.length-1])!==null&&n!==void 0?n:"unknown";return`[aws-rum-web:${f}.${h}]`}return`[aws-rum-web:${u}]`}}catch{}return fm}static info(t,...n){if(!pe.debugEnabled)return;const r=this.getCallerInfo();console.info(r,t,...n)}static debug(t,...n){if(!pe.debugEnabled)return;const r=this.getCallerInfo();console.debug(r,t,...n)}static warn(t,...n){if(!pe.debugEnabled)return;const r=this.getCallerInfo();console.warn(r,t,...n)}static error(t,...n){if(!pe.debugEnabled)return;const r=this.getCallerInfo();console.error(r,t,...n)}}pe.debugEnabled=!1;const fU=2048,hU=.2,Vbe=()=>typeof CompressionStream<"u",Wbe=async e=>{const t=new Blob([e]).stream().pipeThrough(new CompressionStream("gzip"));return new Uint8Array(await new Response(t).arrayBuffer())},Gbe=async e=>{const t=e.length;if(pe.debug(`compressIfBeneficial called, payload size: ${t}B`),!Vbe())return pe.debug("CompressionStream not supported, skipping compression"),{body:e,compressed:!1};if(t<fU)return pe.debug(`Payload size ${t}B below threshold ${fU}B, skipping compression`),{body:e,compressed:!1};const n=await Wbe(e),r=1-n.length/t;return r>=hU?(pe.debug(`Compressed ${t}B -> ${n.length}B (${(r*100).toFixed(1)}% reduction)`),{body:n,compressed:!0}):(pe.debug(`Compression ratio ${(r*100).toFixed(1)}% below threshold ${hU*100}%, skipping`),{body:e,compressed:!1})},Kbe="POST",Zbe="application/json",Ybe="text/plain;charset=UTF-8",Qbe=64e3;class Xbe{constructor(t,n){this.sendFetch=async r=>{var o,s;const a=JSON.stringify(pU(r)),u=(s=(o=this.config.compressionStrategy)===null||o===void 0?void 0:o.enabled)!==null&&s!==void 0?s:!1,{body:c,compressed:f}=u?await Gbe(a):{body:a,compressed:!1},h=await this.getHttpRequestOptions(r,c,Zbe,f);let m=new Us(h);return this.signing&&(m=await this.signing.sign(m)),this.config.fetchRequestHandler.handle(m)},this.sendBeacon=async r=>{const o=JSON.stringify(pU(r));if(o.length>Qbe)throw new Error("Payload too large for sendBeacon");const s=await this.getHttpRequestOptions(r,o,Ybe,!1);let a=new Us(s);return this.signing&&(a=await this.signing.presign(a)),this.config.beaconRequestHandler.handle(a)},this.getHttpRequestOptions=async(r,o,s,a)=>{const u=this.config.endpoint.pathname.replace(/\/$/,""),c=Object.assign({"content-type":s,host:this.config.endpoint.host},this.config.headers);a&&(c["Content-Encoding"]="gzip");const f={method:Kbe,protocol:this.config.endpoint.protocol,port:Number(this.config.endpoint.port)||void 0,headers:c,hostname:this.config.endpoint.hostname,path:`${u}/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 pU=e=>{const t=[];e.RumEvents.forEach(r=>t.push(Jbe(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},Jbe=e=>({id:e.id,timestamp:Math.round(e.timestamp.getTime()/1e3),type:e.type,metadata:e.metadata,details:e.details});class e0e{handle(t){const n=this.sendBeacon(t);return new Promise((r,o)=>{n?r({response:new Lf({statusCode:200})}):o()})}updateHttpClientConfig(t,n){}httpHandlerConfigs(){return{}}sendBeacon(t){let n=t.path;if(t.query){const s=bR(t.query);s&&(n+=`?${s}`)}const{port:r}=t,o=`${t.protocol}//${t.hostname}${r?`:${r}`:""}${n}`;return navigator.sendBeacon(o,t.body)}}const t0e=(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 n0e=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=bR(t.query);g&&(o+=`?${g}`)}const{port:s,method:a}=t,u=`${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(u,f),m=[this.fetchFunction.apply(window,[h]).then(g=>{const v=g.headers,w={};for(const C of v.entries())w[C[0]]=C[1];return g.body!==void 0?{response:new Lf({headers:w,statusCode:g.status,body:g.body})}:g.blob().then(C=>({response:new Lf({headers:w,statusCode:g.status,body:C})}))}),t0e(r)];return n&&m.push(new Promise((g,v)=>{n.onabort=()=>{const w=new Error("Request aborted");w.name="AbortError",v(w)}})),Promise.race(m)}updateHttpClientConfig(t,n){}httpHandlerConfigs(){return{}}};const SR=e=>{if(crypto)return crypto.getRandomValues(e);if(msCrypto)return msCrypto.getRandomValues(e);throw new Error("No crypto library found.")},p7=[];for(let e=0;e<256;e++)p7[e]=(e+256).toString(16).substr(1);const Uy="X-Amzn-Trace-Id",$y="traceparent",r0e=2,o0e=32,s0e=16,i0e=4,m7=(e,t)=>Array.isArray(t)?t.some(n=>n.test(e)):t,g7={logicalServiceName:"rum.aws.amazon.com",urlsToInclude:[/.*/],urlsToExclude:[/cognito\-identity\.([^\.]*\.)?amazonaws\.com/,/sts\.([^\.]*\.)?amazonaws\.com/],stackTraceLength:200,recordAllRequests:!1,addXRayTraceIdHeader:!1},a0e=e=>200<=e&&e<300,v7=e=>Math.floor(e/100)===4,wR=e=>Math.floor(e/100)===5,CR=e=>e===429,y7=(e,t)=>{const n=t.urlsToInclude.some(o=>o.test(e)),r=t.urlsToExclude.some(o=>o.test(e));return n&&!r},Au=()=>Date.now()/1e3,l0e=(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},b7=(e,t,n,r)=>({version:"1.0.0",name:e,origin:"AWS::RUM::AppMonitor",id:C7(),start_time:t,trace_id:n?p0e():h0e(),end_time:void 0,subsegments:[],in_progress:!1}),S7=(e,t,n)=>{const r={id:C7(),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},w7=e=>{try{return e.hostname?e.hostname:e.url?new URL(e.url).hostname:new URL(e.toString()).hostname}catch{return window.location.hostname}},u0e=(e,t,n,r)=>{e.headers||(e.headers={}),r?e.headers[$y]=_R(t,n):e.headers[Uy]=ER(t,n)},c0e=(e,t,n,r)=>{r?e.set($y,_R(t,n)):e.set(Uy,ER(t,n))},ER=(e,t)=>"Root="+e+";Parent="+t+";Sampled=1",_R=(e,t)=>"00-"+e+"-"+t+"-01",d0e=e=>e?.length===i0e&&e[0].length===r0e&&e[1].length===o0e&&e[2].length===s0e&&(e[3]==="00"||e[3]==="01"),f0e=(e,t)=>{var n,r;const o={};if(e)if(t){const s=(n=e.get($y))===null||n===void 0?void 0:n.split("-");s&&d0e(s)&&(o.traceId=s[1],o.segmentId=s[2])}else{const s=(r=e.get(Uy))===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(),h0e=()=>`1-${m0e()}-${g0e()}`,p0e=()=>{const e=new Uint8Array(16);return SR(e),`${xR(e)}`},C7=()=>{const e=new Uint8Array(8);return SR(e),xR(e)},m0e=()=>Math.floor(Date.now()/1e3).toString(16),g0e=()=>{const e=new Uint8Array(12);return SR(e),xR(e)},xR=e=>{let t="";for(let n=0;n<e.length;n++)t+=p7[e[n]];return t};class v0e{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(a0e(r.response.statusCode))return r;throw r.response.statusCode}catch(r){if(typeof r=="number"&&!CR(r)&&!wR(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 Zu="cwr_c",Yg="cwr_i",Qg="cwr_s",Xg="cwr_u",y0e=3e4,b0e="arw-module",mU="CWR: Cannot dispatch; no AWS credentials.";class S0e{constructor(t,n,r,o,s){this.disableCodes=["403","404"],this.shouldPurgeCredentials=!0,this.dispatchFetch=async()=>{if(this.doRequest()){const a=this.createRequest();return pe.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 pe.info(`Dispatching ${a.RumEvents.length} events via beacon`),this.rum.sendBeacon(a).catch(()=>this.rum.sendFetch(a))}},this.dispatchFetchFailSilent=async()=>this.dispatchFetch().catch(a=>{pe.error("Dispatch fetch failed silently:",a)}),this.dispatchBeaconFailSilent=async()=>this.dispatchBeacon().catch(a=>{pe.error("Dispatch beacon failed silently:",a)}),this.flushSync=()=>{if(document.visibilityState==="hidden"&&this.doRequest(!0)){let a=this.rum.sendBeacon,u=this.rum.sendFetch;this.config.useBeacon||([a,u]=[u,a]);const c=this.createRequest(!0);pe.debug(`Flushing ${c.RumEvents.length} events on page hide`),a(c).catch(()=>u(c)).catch(f=>{pe.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)&&(pe.error("Dispatch failed with status code:",a.message),this.disable())),a},this.defaultClientBuilder=(a,u,c,f)=>{const h=c&&this.signingConfigFactory?this.signingConfigFactory(c,u):void 0;return new Xbe({fetchRequestHandler:new v0e(new n0e({fetchFunction:this.config.fetchFunction}),this.config.retries),beaconRequestHandler:new e0e,endpoint:a,region:u,credentials:c,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(mU)),sendBeacon:()=>Promise.reject(new Error(mU))}:this.rum=this.buildClient(this.endpoint,this.region,void 0,this.config.compressionStrategy),this.credentialStorageKey=this.config.cookieAttributes.unique?`${Zu}_${t}`:Zu,this.identityStorageKey=this.config.cookieAttributes.unique?`${Yg}_${t}`:Yg}enable(){this.enabled=!0,this.startDispatchTimer()}disable(){this.stopDispatchTimer(),this.enabled=!1,pe.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:Nu(),AppMonitorDetails:this.eventCache.getAppMonitorDetails(),UserDetails:this.eventCache.getUserDetails(),SessionMetadata:JSON.stringify(this.eventCache.getCommonMetadata()),RumEvents:this.eventCache.getEventBatch(t),Alias:this.config.alias}}forceRebuildClient(){pe.warn("Removing credentials from local storage"),localStorage.removeItem(this.credentialStorageKey),this.identityPoolId?(pe.info("Rebuilding client with fresh cognito credentials"),localStorage.removeItem(this.identityStorageKey),this.setCognitoCredentials(this.identityPoolId,this.guestRoleArn)):this.credentialProvider&&(pe.info("Rebuilding client with most recently passed provider"),this.setAwsCredentials(this.credentialProvider))}}const E7={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),E7[e]=t}function w0e(e){let t="";for(let n=0;n<e.byteLength;n++)t+=E7[e[n]];return t}class C0e{format(t){const n=[];for(const s of Object.keys(t)){const a=wx(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?Wr.boolTrue:Wr.boolFalse]);case"byte":return Uint8Array.from([Wr.byte,t.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,Wr.short),n.setInt16(1,t.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,Wr.integer),r.setInt32(1,t.value,!1),new Uint8Array(r.buffer);case"long":const o=new Uint8Array(9);return o[0]=Wr.long,o.set(t.value.bytes,1),o;case"binary":const s=new DataView(new ArrayBuffer(3+t.value.byteLength));s.setUint8(0,Wr.byteArray),s.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(s.buffer);return a.set(t.value,3),a;case"string":const u=wx(t.value),c=new DataView(new ArrayBuffer(3+u.byteLength));c.setUint8(0,Wr.string),c.setUint16(1,u.byteLength,!1);const f=new Uint8Array(c.buffer);return f.set(u,3),f;case"timestamp":const h=new Uint8Array(9);return h[0]=Wr.timestamp,h.set(IR.fromNumber(t.value.valueOf()).bytes,1),h;case"uuid":if(!E0e.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const m=new Uint8Array(17);return m[0]=Wr.uuid,m.set(jbe(t.value.replace(/-/g,"")),1),m}}}var Wr;(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"})(Wr||(Wr={}));const E0e=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class IR{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&&gU(n),new IR(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&gU(t),parseInt(ja(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function gU(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const _0e="X-Amz-Algorithm",x0e="X-Amz-Credential",_7="X-Amz-Date",I0e="X-Amz-SignedHeaders",A0e="X-Amz-Expires",x7="X-Amz-Signature",I7="X-Amz-Security-Token",A7="authorization",R7=_7.toLowerCase(),R0e="date",T0e=[A7,R7,R0e],O0e=x7.toLowerCase(),Ex="x-amz-content-sha256",M0e=I7.toLowerCase(),P0e={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},N0e=/^proxy-/,k0e=/^sec-/,$E="AWS4-HMAC-SHA256",D0e="AWS4-HMAC-SHA256-PAYLOAD",L0e="UNSIGNED-PAYLOAD",U0e=50,T7="aws4_request",$0e=3600*24*7,F0e=({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===O0e)continue;const o=Ba(r);t.push(o);const s=e[r];typeof s=="string"?n[o]=`${o}=${Ba(s)}`:Array.isArray(s)&&(n[o]=s.slice(0).reduce((a,u)=>a.concat([`${o}=${Ba(u)}`]),[]).sort().join("&"))}return t.sort().map(r=>n[r]).filter(r=>r).join("&")},z0e=e=>j0e(e).toISOString().replace(/\.\d{3}Z$/,"Z"),j0e=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class B0e{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=dU(r),this.credentialProvider=dU(n)}createCanonicalRequest(t,n,r){const o=Object.keys(n).sort();return`${t.method}
|
|
95
|
-
${this.getCanonicalPath(t)}
|
|
96
|
-
${F0e(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(Df(r));const a=await s.digest();return`${o}
|
|
102
|
-
${t}
|
|
103
|
-
${n}
|
|
104
|
-
${ja(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 Ba(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=z0e(t).replace(/[-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}const hm={},FE=[],zE=(e,t,n)=>`${e}/${t}/${n}/${T7}`,H0e=async(e,t,n,r,o)=>{const s=await vU(e,t.secretAccessKey,t.accessKeyId),a=`${n}:${r}:${o}:${ja(s)}:${t.sessionToken}`;if(a in hm)return hm[a];for(FE.push(a);FE.length>U0e;)delete hm[FE.shift()];let u=`AWS4${t.secretAccessKey}`;for(const c of[n,r,o,T7])u=await vU(e,u,c);return hm[a]=u},vU=(e,t,n)=>{const r=new e(t);return r.update(Df(n)),r.digest()},yU=({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 P0e||t?.has(s)||N0e.test(s)||k0e.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[o].trim().replace(/\s+/g," "))}return r},jE=async({headers:e,body:t},n)=>{for(const r of Object.keys(e))if(r.toLowerCase()===Ex)return e[r];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||Bbe(t)){const r=new n;return r.update(Df(t)),ja(await r.digest())}return L0e},q0e=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},V0e=(e,t={})=>{const{headers:n,query:r={}}=Us.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}},bU=e=>{e=Us.clone(e);for(const t of Object.keys(e.headers))T0e.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e};class W0e extends B0e{headerFormatter=new C0e;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:u,hoistableHeaders:c,signingRegion:f,signingService:h}=n,m=await this.credentialProvider();this.validateResolvedCredentials(m);const g=f??await this.regionProvider(),{longDate:v,shortDate:w}=this.formatDate(r);if(o>$0e)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const S=zE(w,g,h??this.service),C=V0e(bU(t),{unhoistableHeaders:a,hoistableHeaders:c});m.sessionToken&&(C.query[I7]=m.sessionToken),C.query[_0e]=$E,C.query[x0e]=`${m.accessKeyId}/${S}`,C.query[_7]=v,C.query[A0e]=o.toString(10);const E=yU(C,s,u);return C.query[I0e]=this.getCanonicalHeaderList(E),C.query[x7]=await this.getSignature(v,S,this.getSigningKey(m,g,w,h),this.createCanonicalRequest(C,E,await jE(t,this.sha256))),C}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:u}){const c=s??await this.regionProvider(),{shortDate:f,longDate:h}=this.formatDate(r),m=zE(f,c,a??this.service),g=await jE({headers:{},body:n},this.sha256),v=new this.sha256;v.update(t);const w=ja(await v.digest()),S=[D0e,h,m,o,w,g].join(`
|
|
105
|
-
`);return this.signString(S,{signingDate:r,signingRegion:c,signingService:a,eventStreamCredentials:u})}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(u=>({message:t.message,signature:u}))}async signString(t,{signingDate:n=new Date,signingRegion:r,signingService:o,eventStreamCredentials:s}={}){const a=s??await this.credentialProvider();this.validateResolvedCredentials(a);const u=r??await this.regionProvider(),{shortDate:c}=this.formatDate(n),f=new this.sha256(await this.getSigningKey(a,u,c,o));return f.update(Df(t)),ja(await f.digest())}async signRequest(t,{signingDate:n=new Date,signableHeaders:r,unsignableHeaders:o,signingRegion:s,signingService:a}={}){const u=await this.credentialProvider();this.validateResolvedCredentials(u);const c=s??await this.regionProvider(),f=bU(t),{longDate:h,shortDate:m}=this.formatDate(n),g=zE(m,c,a??this.service);f.headers[R7]=h,u.sessionToken&&(f.headers[M0e]=u.sessionToken);const v=await jE(f,this.sha256);!q0e(Ex,f.headers)&&this.applyChecksum&&(f.headers[Ex]=v);const w=yU(f,o,r),S=await this.getSignature(h,g,this.getSigningKey(u,c,m,a),this.createCanonicalRequest(f,w,v));return f.headers[A7]=`${$E} Credential=${u.accessKeyId}/${g}, SignedHeaders=${this.getCanonicalHeaderList(w)}, Signature=${S}`,f}async getSignature(t,n,r,o){const s=await this.createStringToSign(t,n,o,$E),a=new this.sha256(await r);return a.update(Df(s)),ja(await a.digest())}getSigningKey(t,n,r,o){return H0e(this.sha256,t,r,n,o||this.service)}}const G0e="rum",K0e={expiresIn:60},Z0e=(e,t)=>{const n=new W0e({applyChecksum:!0,credentials:e,region:t,service:G0e,uriEscapePath:!0,sha256:Wa});return{sign:async r=>await n.sign(r),presign:async r=>await n.presign(r,K0e),hashAndEncode:async r=>{const o=new Wa;return o.update(r),w0e(await o.digest()).toLowerCase()}}};function SU(e,t){return new Request(e,t)}function Y0e(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 BE={supported:void 0};class Fy{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new Fy(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(n=>n||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),BE.supported===void 0&&(BE.supported=typeof Request<"u"&&"keepalive"in SU("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=wU(n);return Promise.reject(I)}let u=t.path;const c=bR(t.query||{});c&&(u+=`?${c}`),t.fragment&&(u+=`#${t.fragment}`);let f="";if(t.username!=null||t.password!=null){const I=t.username??"",A=t.password??"";f=`${I}:${A}@`}const{port:h,method:m}=t,g=`${t.protocol}//${f}${t.hostname}${h?`:${h}`:""}${u}`,v=m==="GET"||m==="HEAD"?void 0:t.body,w={body:v,headers:new Headers(t.headers),method:m,credentials:a};this.config?.cache&&(w.cache=this.config.cache),v&&(w.duplex="half"),typeof AbortController<"u"&&(w.signal=n),BE.supported&&(w.keepalive=s),typeof this.config.requestInit=="function"&&Object.assign(w,this.config.requestInit(t));let S=()=>{};const C=SU(g,w),E=[fetch(C).then(I=>{const A=I.headers,T={};for(const M of A.entries())T[M[0]]=M[1];return I.body!=null?{response:new Lf({headers:T,reason:I.statusText,statusCode:I.status,body:I.body})}:I.blob().then(M=>({response:new Lf({headers:T,reason:I.statusText,statusCode:I.status,body:M})}))}),Y0e(o)];return n&&E.push(new Promise((I,A)=>{const T=()=>{const N=wU(n);A(N)};if(typeof n.addEventListener=="function"){const N=n;N.addEventListener("abort",T,{once:!0}),S=()=>N.removeEventListener("abort",T)}else n.onabort=T})),Promise.race(E).finally(S)}updateHttpClientConfig(t,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[t]=n,r))}httpHandlerConfigs(){return this.config??{}}}function wU(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 HE=async e=>{const{value:t}=await e.body.getReader().read();return JSON.parse(String.fromCharCode.apply(null,t))},Q0e=async e=>{const{value:t}=await e.body.getReader().read();return String.fromCharCode.apply(null,t)},X0e="POST",J0e="application/x-www-form-urlencoded",e1e="https:",t1e="AssumeRoleWithWebIdentity",n1e="2011-06-15";class r1e{constructor(t){this.assumeRoleWithWebIdentity=async n=>{try{const r=Object.assign(Object.assign({},n),{Action:t1e,Version:n1e}),o=new URLSearchParams(Object.entries(r)).toString(),s=new Us({method:X0e,headers:{"content-type":J0e,host:this.hostname},protocol:e1e,hostname:this.hostname,body:o}),{response:a}=await this.fetchRequestHandler.handle(s),u=await Q0e(a);return{accessKeyId:u.split("<AccessKeyId>")[1].split("</AccessKeyId>")[0],secretAccessKey:u.split("<SecretAccessKey>")[1].split("</SecretAccessKey>")[0],sessionToken:u.split("<SessionToken>")[1].split("</SessionToken>")[0],expiration:new Date(u.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 o1e="POST",s1e="application/x-amz-json-1.1",i1e="https:",a1e="AWSCognitoIdentityService.GetId",l1e="AWSCognitoIdentityService.GetOpenIdToken",u1e="AWSCognitoIdentityService.GetCredentialsForIdentity";class c1e{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&&pe.error("Failed to parse stored identity:",a)}if(s&&s.IdentityId)return Promise.resolve(s);try{const a=JSON.stringify(r),u=this.getHttpRequest(a1e,a),c=await HE((await this.fetchRequestHandler.handle(u)).response);try{localStorage.setItem(this.identityStorageKey,JSON.stringify({IdentityId:c.IdentityId}))}catch(f){pe.error("Failed to store identity:",f)}return c}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(l1e,o),{response:a}=await this.fetchRequestHandler.handle(s);return this.validateOpenIdTokenResponse(await HE(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(u1e,o),{response:a}=await this.fetchRequestHandler.handle(s),{AccessKeyId:u,Expiration:c,SecretKey:f,SessionToken:h}=this.validateCredenentialsResponse(await HE(a));return{accessKeyId:u,secretAccessKey:f,sessionToken:h,expiration:new Date(c*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 Us({method:o1e,headers:{"content-type":s1e,"x-amz-target":r},protocol:i1e,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?`${Yg}_${t.applicationId}`:Yg}}class O7{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 c1e({fetchRequestHandler:new Fy,region:r,clientConfig:t,applicationId:n}),this.credentialStorageKey=this.config.cookieAttributes.unique?`${Zu}_${n}`:Zu}renewCredentials(){if(!this.credentials||!this.credentials.expiration)return!0;const t=new Date(this.credentials.expiration.getTime()-y0e);return new Date>t}}class d1e extends O7{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),u=await this.stsClient.assumeRoleWithWebIdentity({RoleArn:this.config.guestRoleArn,RoleSessionName:"cwr",WebIdentityToken:a.Token});this.credentials=u;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(u))}catch{}return pe.debug("AWS credentials fetched successfully"),u}catch(s){if(o)o--,pe.warn("AWS credential fetch failed, retrying");else throw pe.error("AWS credential fetch failed:",s),s}};const r=t.identityPoolId.split(":")[0];this.stsClient=new r1e({fetchRequestHandler:new Fy,region:r})}}class f1e extends O7{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 pe.debug("AWS credentials fetched successfully"),s}catch(o){if(r)r--,pe.warn("AWS credential fetch failed, retrying");else throw pe.error("AWS credential fetch failed:",o),o}}}}const kr="com.amazon.rum",h1e="com.amazonaws.rum",Jg=`${kr}.http_event`,M7=`${kr}.xray_trace_event`,p1e=`${kr}.largest_contentful_paint_event`,m1e=`${kr}.first_input_delay_event`,g1e=`${kr}.cumulative_layout_shift_event`,v1e=`${kr}.interaction_to_next_paint_event`,_x=`${kr}.performance_navigation_event`,P7=`${kr}.performance_resource_event`,y1e=`${kr}.dom_event`,b1e=`${kr}.js_error_event`,S1e=`${kr}.page_view_event`,xx=`${kr}.session_start_event`,CU=`${kr}.rrweb_event`;class no{constructor(t){this.enabled=!0,this.pluginId=no.generatePluginId(t)}static generatePluginId(t){return`${no.idPrefix}.${t}`}load(t){var n;this.context=t,(n=this.onload)===null||n===void 0||n.call(this)}getPluginId(){return this.pluginId}}no.idPrefix=h1e;class w1e{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),pe.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(no.generatePluginId(t))}}const EU=(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},C1e=(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},_U=e=>{const t=document.cookie.split("; ");for(const n of t){const r=n.split("=");if(r[0]===e)return r[1]}return""};var cf;(function(e){e.Path="PATH",e.Hash="HASH",e.PathAndHash="PATH_AND_HASH"})(cf||(cf={}));const E1e=()=>{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"}},pm="00000000-0000-0000-0000-000000000000",_1e="desktop",x1e="web";class I1e{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?`${Qg}_${this.appMonitorDetails.id}`:Qg,this.session={sessionId:pm,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===pm?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){pe.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)):pe.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(xx,{version:"1.0.0"})):(pe.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:pm}pinUserId(t){if(!t){pe.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||Nu(),this.createOrRenewUserCookie(t,this.userExpiry)):this.userId=Nu()}createOrRenewSessionCookie(t,n){btoa&&EU(this.sessionCookieName,btoa(JSON.stringify(t)),this.config.cookieAttributes,void 0,n)}createOrRenewUserCookie(t,n){EU(Xg,t,this.config.cookieAttributes,void 0,n)}getUserIdCookie(){return _U(Xg)}getSessionFromCookie(){if(this.useCookies()){const t=_U(this.sessionCookieName);if(t&&atob)try{this.session=JSON.parse(atob(t)),this.pageManager.resumeSession(this.session.page),pe.info(`Restored session: ${this.session.sessionId}`)}catch(n){pe.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:Nu(),record:this.session.sessionId===pm?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(),pe.info(`Session start: ${this.session.sessionId}`),this.session.record||pe.warn(`Session is NOT sampled. Consider increasing sessionSampleRate to avoid data loss (currently ${this.config.sessionSampleRate})`),this.config.suppressSessionStartEvent||this.recordEvent(xx,{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(),pe.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),pe.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=E1e();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:_1e,platformType:x1e,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 A1e{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,pe.debug(`recordPageView called with pageId: ${n}`),this.useCookies()&&(this.recordInteraction=!0),!this.page)this.createLandingPage(n),pe.info(`Landing page created: ${n}`);else if(this.page.pageId!==n)this.createNextPage(this.page,n),pe.debug(`Navigation to new page: ${n}`);else if(this.resumed){pe.info(`Resumed session for page: ${n}`),this.collectAttributes(this.page,typeof t=="object"?t:void 0);return}else{pe.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();pe.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(S1e,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 Uf;(function(e){e.EVENT="event"})(Uf||(Uf={}));class N7{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 R1e="3.1.0",T1e=new Set(["pageId","parentPageId","interaction","pageTags","title"]),qE=(e,t)=>{if(!e)return{};const n={};for(const[r,o]of Object.entries(e)){if(r.startsWith("aws:")){pe.warn(`Dropping ${t} metadata key "${r}": "aws:" namespace is reserved.`);continue}if((t==="event"||t==="hook")&&T1e.has(r)){pe.warn(`Dropping ${t} metadata key "${r}": owned by page state.`);continue}const s=typeof o;if(s!=="string"&&s!=="number"&&s!=="boolean"){pe.warn(`Dropping ${t} metadata key "${r}": value must be string|number|boolean.`);continue}n[r]=o}return n};class O1e{constructor(t,n,r=new N7){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!==xx&&this.sessionManager.getSession(),this.sessionManager.canRecord()?(this.sessionManager.incrementSessionEventCount(),this.addRecordToCache(o,s,a)):this.sessionLimitExceeded++)},this.recordCandidate=(o,s,a)=>{const u=this.sessionManager.getSession();if(!this.enabled||!this.isCurrentUrlAllowed()||!u.record)return;const[c]=this.createEvent(o,s,a);if(this.candidates.has(o)){this.candidates.set(o,c);return}this.candidates.size<this.config.candidatesCacheSize&&!this.sessionManager.isLimitExceeded()&&(this.candidates.set(o,c),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[u,c]=this.createEvent(o,s,a);this.eventBus.dispatch(Uf.EVENT,c),this.events.push(u)},this.createEvent=(o,s,a)=>{var u;const c=(u=this.pageManager.getAttributes())!==null&&u!==void 0?u:{},f=qE(a,"event");let h={};if(this.eventMetadataHook)try{const v=Object.freeze(Object.assign({},c)),w=this.eventMetadataHook(o,s,v);w&&(h=qE(w,"hook"))}catch(v){pe.warn(`eventMetadataHook threw for type "${o}"; dropping hook output for this event.`,v)}const m=Object.assign(Object.assign(Object.assign({},c),h),f),g={id:Nu(),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 A1e(n,this.recordEvent),this.sessionManager=new I1e(t,n,this.recordEvent,this.pageManager),this.installationMethod=n.client,this.applicationAttributes=Object.freeze(qE(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()?pe.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.`):pe.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;pe.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":R1e})}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 cn;(function(e){e.OTHER="other",e.STYLESHEET="stylesheet",e.DOCUMENT="document",e.SCRIPT="script",e.IMAGE="image",e.FONT="font"})(cn||(cn={}));var Es;(function(e){e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.FRAME="frame",e.SCRIPT="script",e.CSS="css"})(Es||(Es={}));const xU=e=>[e.startTime,e.duration].join("#"),M1e=[{name:cn.STYLESHEET,list:["css","less"]},{name:cn.DOCUMENT,list:["htm","html","ts","doc","docx","pdf","xls","xlsx"]},{name:cn.SCRIPT,list:["js"]},{name:cn.IMAGE,list:["ai","bmp","gif","ico","jpeg","jpg","png","ps","psd","svg","tif","tiff"]},{name:cn.FONT,list:["fnt","fon","otf","ttf","woff"]}],IU=(e,t)=>{let n=cn.OTHER;if(e){const r=e.substring(e.lastIndexOf("/")+1),o=r.substring(r.lastIndexOf(".")+1).split(/[?#]/)[0];M1e.forEach(s=>{s.list.indexOf(o)>-1&&(n=s.name)})}if(t&&n===cn.OTHER)switch(t){case Es.IMAGE:case Es.IMG:case Es.INPUT:n=cn.IMAGE;break;case Es.IFRAME:case Es.FRAME:n=cn.DOCUMENT;break;case Es.SCRIPT:n=cn.SCRIPT;break;case Es.CSS:n=cn.STYLESHEET;break}return n},P1e=()=>PerformanceObserver.supportedEntryTypes.includes("largest-contentful-paint"),N1e=/\/appmonitors\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,k1e=(e,t)=>{try{return new URL(e).hostname===t&&N1e.test(e)}catch{return!1}},k7="dom-event",D1e={interactionId:()=>"",enableMutationObserver:!1,events:[]};class AR extends no{constructor(t){super(k7),this.enabled=!1,this.eventListenerMap=new Map,this.config=Object.assign(Object.assign({},D1e),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=AR.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(y1e,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(u=>{o.push(u)});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 L1e=e=>{const t=typeof e;return(t==="object"||t==="function")&&!!e},U1e=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},$1e=(e,t)=>{e.type!=="unhandledrejection"&&(e.type=t.toString()),e.message=t.toString()},F1e=(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)},D7=e=>e!==Object(e)&&e!==void 0&&e!==null,RR=(e,t)=>{const n=U1e(e),r=e.error;return L1e(r)?F1e(n,r,t):D7(r)&&$1e(n,r),n},L7="js-error",z1e={stackTraceLength:1e3,ignore:()=>!1};class j1e extends no{constructor(t){super(L7),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({},z1e),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(b1e,RR(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 B1e=e=>e.entryType==="resource"&&(!/^https?:/.test(e.name)||/^(fetch|xmlhttprequest)$/.test(e.initiatorType)),TR={eventLimit:10,ignore:B1e,recordAllTypes:[cn.DOCUMENT,cn.SCRIPT,cn.STYLESHEET,cn.FONT],sampleTypes:[cn.IMAGE,cn.OTHER],reportAllLCP:!1,reportAllCLS:!1,reportAllINP:!1},H1e="navigation",fu="navigation",VE="load";class q1e extends no{constructor(t){super(H1e),this.eventListener=()=>{performance.getEntriesByType(fu).length===0?this.performanceNavigationEventHandlerTimingLevel1():new PerformanceObserver(r=>{r.getEntries().filter(o=>o.entryType===fu).filter(o=>!this.config.ignore(o)).forEach(o=>{this.performanceNavigationEventHandlerTimingLevel2(o)})}).observe({entryTypes:[fu]})},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(_x,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(_x,o)},this.config=Object.assign(Object.assign({},TR),t)}enable(){this.enabled||(this.enabled=!0,window.addEventListener(VE,this.eventListener))}disable(){this.enabled&&(this.enabled=!1,this.eventListener&&window.removeEventListener(VE,this.eventListener))}hasTheWindowLoadEventFired(){return window.performance&&window.performance.getEntriesByType(fu).length?!!window.performance.getEntriesByType(fu)[0].loadEventEnd:!1}onload(){this.enabled&&(this.hasTheWindowLoadEventFired()?window.performance.getEntriesByType(fu).filter(t=>!this.config.ignore(t)).forEach(t=>this.performanceNavigationEventHandlerTimingLevel2(t)):window.addEventListener(VE,this.eventListener))}}var WE,AU;function V1e(){if(AU)return WE;AU=1;function e(c){return typeof c=="function"}var t=console.error.bind(console);function n(c,f,h){var m=!!c[f]&&c.propertyIsEnumerable(f);Object.defineProperty(c,f,{configurable:!0,enumerable:m,writable:!0,value:h})}function r(c){c&&c.logger&&(e(c.logger)?t=c.logger:t("new logger isn't a function, not replacing"))}function o(c,f,h){if(!c||!c[f]){t("no original function "+f+" to wrap");return}if(!h){t("no wrapper function"),t(new Error().stack);return}if(!e(c[f])||!e(h)){t("original object and wrapper must be functions");return}var m=c[f],g=h(m,f);return n(g,"__original",m),n(g,"__unwrap",function(){c[f]===g&&n(c,f,m)}),n(g,"__wrapped",!0),n(c,f,g),g}function s(c,f,h){if(c)Array.isArray(c)||(c=[c]);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}c.forEach(function(m){f.forEach(function(g){o(m,g,h)})})}function a(c,f){if(!c||!c[f]){t("no function to unwrap."),t(new Error().stack);return}if(!c[f].__unwrap)t("no original to unwrap to -- has "+f+" already been unwrapped?");else return c[f].__unwrap()}function u(c,f){if(c)Array.isArray(c)||(c=[c]);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}c.forEach(function(h){f.forEach(function(m){a(h,m)})})}return r.wrap=o,r.massWrap=s,r.unwrap=a,r.massUnwrap=u,WE=r,WE}var ev=V1e();const W1e=lc(ev),RU=s8({__proto__:null,default:W1e},[ev]);class OR extends no{constructor(){super(...arguments),this.enable=this.patch.bind(this,!0),this.disable=this.patch.bind(this,!1),this.enabled=!1}patchAll(){const t=ev.wrap.bind(RU);for(const n of this.patches)t(n.nodule,n.name,n.wrapper())}unpatchAll(){const t=ev.unwrap.bind(RU);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 G1e="page-view";class K1e extends OR{constructor(){super(G1e),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 cf.PathAndHash:return t&&n?t+n:t||n||"";case cf.Hash:return n||"";case cf.Path:default:return t||""}}}const Z1e="resource",GE="resource";class Y1e extends no{constructor(t){super(Z1e),this.performanceEntryHandler=n=>{this.recordPerformanceEntries(n.getEntries())},this.recordPerformanceEntries=n=>{n.forEach(r=>{if(r.entryType!==GE||this.config.ignore(r))return;const{name:o,initiatorType:s}=r,a=IU(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 u;if(!k1e(n,this.context.config.endpointUrl.hostname)&&!((u=this.context)===null||u===void 0)&&u.record){const c={version:"1.0.0",initiatorType:o,startTime:r,duration:s,fileType:IU(n,o),transferSize:a};this.context.config.recordResourceUrl&&(c.targetUrl=n),this.context.record(P7,c)}},this.config=Object.assign(Object.assign({},TR),t),this.eventCount=0,this.resourceObserver=new PerformanceObserver(this.performanceEntryHandler)}enable(){this.enabled||(this.enabled=!0,this.resourceObserver.observe({type:GE,buffered:!0}))}disable(){this.enabled&&(this.enabled=!1,this.resourceObserver.disconnect())}onload(){this.resourceObserver.observe({type:GE,buffered:!0})}}var Ix,TU,zy=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},MR=function(e){if(document.readyState==="loading")return"loading";var t=zy();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"},Q1e=function(e){var t=e.nodeName;return e.nodeType===1?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},jy=function(e,t){var n="";try{for(;e&&e.nodeType!==9;){var r=e,o=r.id?"#"+r.id:Q1e(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},U7=-1,X1e=function(){return U7},Ec=function(e){addEventListener("pageshow",(function(t){t.persisted&&(U7=t.timeStamp,e(t))}),!0)},PR=function(){var e=zy();return e&&e.activationStart||0},Ho=function(e,t){var n=zy(),r="navigate";return X1e()>=0?r="back-forward-cache":n&&(document.prerendering||PR()>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}},gl=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{}},qo=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(u,c){return u>c[1]?"poor":u>c[0]?"needs-improvement":"good"})(t.value,n),e(t))}},NR=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},ph=function(e){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&e()}))},By=function(e){var t=!1;return function(){t||(e(),t=!0)}},Ru=-1,OU=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},tv=function(e){document.visibilityState==="hidden"&&Ru>-1&&(Ru=e.type==="visibilitychange"?e.timeStamp:0,J1e())},MU=function(){addEventListener("visibilitychange",tv,!0),addEventListener("prerenderingchange",tv,!0)},J1e=function(){removeEventListener("visibilitychange",tv,!0),removeEventListener("prerenderingchange",tv,!0)},kR=function(){return Ru<0&&(Ru=OU(),MU(),Ec((function(){setTimeout((function(){Ru=OU(),MU()}),0)}))),{get firstHiddenTime(){return Ru}}},Hy=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},PU=[1800,3e3],eSe=function(e,t){t=t||{},Hy((function(){var n,r=kR(),o=Ho("FCP"),s=gl("paint",(function(a){a.forEach((function(u){u.name==="first-contentful-paint"&&(s.disconnect(),u.startTime<r.firstHiddenTime&&(o.value=Math.max(u.startTime-PR(),0),o.entries.push(u),n(!0)))}))}));s&&(n=qo(e,o,PU,t.reportAllChanges),Ec((function(a){o=Ho("FCP"),n=qo(e,o,PU,t.reportAllChanges),NR((function(){o.value=performance.now()-a.timeStamp,n(!0)}))})))}))},NU=[.1,.25],tSe=function(e,t){(function(n,r){r=r||{},eSe(By((function(){var o,s=Ho("CLS",0),a=0,u=[],c=function(h){h.forEach((function(m){if(!m.hadRecentInput){var g=u[0],v=u[u.length-1];a&&m.startTime-v.startTime<1e3&&m.startTime-g.startTime<5e3?(a+=m.value,u.push(m)):(a=m.value,u=[m])}})),a>s.value&&(s.value=a,s.entries=u,o())},f=gl("layout-shift",c);f&&(o=qo(n,s,NU,r.reportAllChanges),ph((function(){c(f.takeRecords()),o(!0)})),Ec((function(){a=0,s=Ho("CLS",0),o=qo(n,s,NU,r.reportAllChanges),NR((function(){return o()}))})),setTimeout(o,0))})))})((function(n){var r=(function(o){var s,a={};if(o.entries.length){var u=o.entries.reduce((function(f,h){return f&&f.value>h.value?f:h}));if(u&&u.sources&&u.sources.length){var c=(s=u.sources).find((function(f){return f.node&&f.node.nodeType===1}))||s[0];c&&(a={largestShiftTarget:jy(c.node),largestShiftTime:u.startTime,largestShiftValue:u.value,largestShiftSource:c,largestShiftEntry:u,loadState:MR(u.startTime)})}}return Object.assign(o,{attribution:a})})(n);e(r)}),t)},$7=0,KE=1/0,mm=0,nSe=function(e){e.forEach((function(t){t.interactionId&&(KE=Math.min(KE,t.interactionId),mm=Math.max(mm,t.interactionId),$7=mm?(mm-KE)/7+1:0)}))},F7=function(){return Ix?$7:performance.interactionCount||0},rSe=function(){"interactionCount"in performance||Ix||(Ix=gl("event",nSe,{type:"event",buffered:!0,durationThreshold:0}))},po=[],df=new Map,z7=0,oSe=function(){var e=Math.min(po.length-1,Math.floor((F7()-z7)/50));return po[e]},j7=[],sSe=function(e){if(j7.forEach((function(o){return o(e)})),e.interactionId||e.entryType==="first-input"){var t=po[po.length-1],n=df.get(e.interactionId);if(n||po.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]};df.set(r.id,r),po.push(r)}po.sort((function(o,s){return s.latency-o.latency})),po.length>10&&po.splice(10).forEach((function(o){return df.delete(o.id)}))}}},DR=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=By(e),document.visibilityState==="hidden"?e():(n=t(e),ph(e)),n},kU=[200,500],iSe=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},Hy((function(){var n;rSe();var r,o=Ho("INP"),s=function(u){DR((function(){u.forEach(sSe);var c=oSe();c&&c.latency!==o.value&&(o.value=c.latency,o.entries=c.entries,r())}))},a=gl("event",s,{durationThreshold:(n=t.durationThreshold)!==null&&n!==void 0?n:40});r=qo(e,o,kU,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),ph((function(){s(a.takeRecords()),r(!0)})),Ec((function(){z7=F7(),po.length=0,df.clear(),o=Ho("INP"),r=qo(e,o,kU,t.reportAllChanges)})))})))},$u=[],Mi=[],Ax=0,LR=new WeakMap,Fu=new Map,Rx=-1,aSe=function(e){$u=$u.concat(e),B7()},B7=function(){Rx<0&&(Rx=DR(lSe))},lSe=function(){Fu.size>10&&Fu.forEach((function(a,u){df.has(u)||Fu.delete(u)}));var e=po.map((function(a){return LR.get(a.entries[0])})),t=Mi.length-50;Mi=Mi.filter((function(a,u){return u>=t||e.includes(a)}));for(var n=new Set,r=0;r<Mi.length;r++){var o=Mi[r];q7(o.startTime,o.processingEnd).forEach((function(a){n.add(a)}))}var s=$u.length-1-50;$u=$u.filter((function(a,u){return a.startTime>Ax&&u>s||n.has(a)})),Rx=-1};j7.push((function(e){e.interactionId&&e.target&&!Fu.has(e.interactionId)&&Fu.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;Ax=Math.max(Ax,e.processingEnd);for(var r=Mi.length-1;r>=0;r--){var o=Mi[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]},Mi.push(t)),(e.interactionId||e.entryType==="first-input")&&LR.set(e,t),B7()}));var Pi,ff,H7,nv,q7=function(e,t){for(var n,r=[],o=0;n=$u[o];o++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},uSe=function(e,t){TU||(TU=gl("long-animation-frame",aSe)),iSe((function(n){var r=(function(o){var s=o.entries[0],a=LR.get(s),u=s.processingStart,c=a.processingEnd,f=a.entries.sort((function(C,E){return C.processingStart-E.processingStart})),h=q7(s.startTime,c),m=o.entries.find((function(C){return C.target})),g=m&&m.target||Fu.get(s.interactionId),v=[s.startTime+s.duration,c].concat(h.map((function(C){return C.startTime+C.duration}))),w=Math.max.apply(Math,v),S={interactionTarget:jy(g),interactionTargetElement:g,interactionType:s.name.startsWith("key")?"keyboard":"pointer",interactionTime:s.startTime,nextPaintTime:w,processedEventEntries:f,longAnimationFrameEntries:h,inputDelay:u-s.startTime,processingDuration:c-u,presentationDelay:Math.max(w-c,0),loadState:MR(s.startTime)};return Object.assign(o,{attribution:S})})(n);e(r)}),t)},DU=[2500,4e3],ZE={},cSe=function(e,t){(function(n,r){r=r||{},Hy((function(){var o,s=kR(),a=Ho("LCP"),u=function(h){r.reportAllChanges||(h=h.slice(-1)),h.forEach((function(m){m.startTime<s.firstHiddenTime&&(a.value=Math.max(m.startTime-PR(),0),a.entries=[m],o())}))},c=gl("largest-contentful-paint",u);if(c){o=qo(n,a,DU,r.reportAllChanges);var f=By((function(){ZE[a.id]||(u(c.takeRecords()),c.disconnect(),ZE[a.id]=!0,o(!0))}));["keydown","click"].forEach((function(h){addEventListener(h,(function(){return DR(f)}),{once:!0,capture:!0})})),ph(f),Ec((function(h){a=Ho("LCP"),o=qo(n,a,DU,r.reportAllChanges),NR((function(){a.value=performance.now()-h.timeStamp,ZE[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=zy();if(a){var u=a.activationStart||0,c=o.entries[o.entries.length-1],f=c.url&&performance.getEntriesByType("resource").filter((function(w){return w.name===c.url}))[0],h=Math.max(0,a.responseStart-u),m=Math.max(h,f?(f.requestStart||f.startTime)-u:0),g=Math.max(m,f?f.responseEnd-u:0),v=Math.max(g,c.startTime-u);s={element:jy(c.element),timeToFirstByte:h,resourceLoadDelay:m-h,resourceLoadDuration:g-m,elementRenderDelay:v-g,navigationEntry:a,lcpEntry:c},c.url&&(s.url=c.url),f&&(s.lcpResourceEntry=f)}}return Object.assign(o,{attribution:s})})(n);e(r)}),t)},Jd={passive:!0,capture:!0},dSe=new Date,LU=function(e,t){Pi||(Pi=t,ff=e,H7=new Date,W7(removeEventListener),V7())},V7=function(){if(ff>=0&&ff<H7-dSe){var e={entryType:"first-input",name:Pi.type,target:Pi.target,cancelable:Pi.cancelable,startTime:Pi.timeStamp,processingStart:Pi.timeStamp+ff};nv.forEach((function(t){t(e)})),nv=[]}},fSe=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(){LU(n,r),a()},s=function(){a()},a=function(){removeEventListener("pointerup",o,Jd),removeEventListener("pointercancel",s,Jd)};addEventListener("pointerup",o,Jd),addEventListener("pointercancel",s,Jd)})(t,e):LU(t,e)}},W7=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,fSe,Jd)}))},UU=[100,300],hSe=function(e,t){t=t||{},Hy((function(){var n,r=kR(),o=Ho("FID"),s=function(c){c.startTime<r.firstHiddenTime&&(o.value=c.processingStart-c.startTime,o.entries.push(c),n(!0))},a=function(c){c.forEach(s)},u=gl("first-input",a);n=qo(e,o,UU,t.reportAllChanges),u&&(ph(By((function(){a(u.takeRecords()),u.disconnect()}))),Ec((function(){var c;o=Ho("FID"),n=qo(e,o,UU,t.reportAllChanges),nv=[],ff=-1,Pi=null,W7(addEventListener),c=s,nv.push(c),V7()})))}))},pSe=function(e,t){hSe((function(n){var r=(function(o){var s=o.entries[0],a={eventTarget:jy(s.target),eventType:s.name,eventTime:s.startTime,eventEntry:s,loadState:MR(s.startTime)};return Object.assign(o,{attribution:a})})(n);e(r)}),t)};const mSe="web-vitals";class gSe extends no{constructor(t){super(mSe),this.resourceEventIds=new Map,this.cacheLCPCandidates=P1e(),this.handleEvent=n=>{switch(n.type){case P7:const r=n.details;this.cacheLCPCandidates&&r.fileType===cn.IMAGE&&this.resourceEventIds.set(xU(n.details),n.id);break;case _x:this.navigationEventId=n.id;break}},this.config=Object.assign(Object.assign({},TR),t)}enable(){}disable(){}onload(){this.context.eventBus.subscribe(Uf.EVENT,this.handleEvent),cSe(t=>this.handleLCP(t),{reportAllChanges:this.config.reportAllLCP}),pSe(t=>this.handleFID(t)),tSe(t=>this.handleCLS(t),{reportAllChanges:!0}),uSe(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=xU(o?.lcpResourceEntry);s.lcpResourceEntry=this.resourceEventIds.get(a)}this.navigationEventId&&(s.navigationEntry=this.navigationEventId),(n=this.context)===null||n===void 0||n.record(p1e,{version:"1.0.0",value:t.value,attribution:s}),(r=this.context)===null||r===void 0||r.eventBus.unsubscribe(Uf.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)(g1e,{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(m1e,{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)(v1e,{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 vSe="fetch";class ySe extends OR{constructor(t){super(vSe),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=Au(),a=l0e(n,r,!0),u=b7(this.config.logicalServiceName,s,this.context.config.enableW3CTraceId),c=S7(w7(n),s,a);return u.subsegments.push(c),this.isTraceIdHeaderEnabled(n)&&this.addXRayTraceIdHeader(n,r,o,u),u},this.addXRayTraceIdHeader=(n,r,o,s)=>{if(n.headers)return c0e(n.headers,s.trace_id,s.subsegments[0].id,this.context.config.enableW3CTraceId);r||(r={},[].push.call(o,r)),u0e(r,s.trace_id,s.subsegments[0].id,this.context.config.enableW3CTraceId)},this.endTrace=(n,r,o)=>{if(n){const s=Au();if(n.subsegments[0].end_time=s,n.end_time=s,r){n.subsegments[0].http.response={status:r.status},CR(r.status)?(n.subsegments[0].throttle=!0,n.throttle=!0):v7(r.status)?(n.subsegments[0].error=!0,n.error=!0):wR(r.status)&&(n.subsegments[0].fault=!0,n.fault=!0);const a=r.headers.get("Content-Length"),u=a?parseInt(a,10):NaN;isNaN(u)||(n.subsegments[0].http.response.content_length=u)}o&&(n.fault=!0,n.subsegments[0].fault=!0,o instanceof Object?this.appendErrorCauseFromObject(n.subsegments[0],o):D7(o)&&this.appendErrorCauseFromPrimitive(n.subsegments[0],o.toString())),this.context.record(M7,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(Jg,n))},this.recordHttpEventWithError=(n,r)=>{n.error=RR({type:"error",error:r},this.config.stackTraceLength),this.context.record(Jg,n)},this.fetch=(n,r,o,s,a)=>{const u=this.createHttpEvent(s,a);let c;if(!y7(gg(s),this.config))return n.apply(r,o);const f=f0e(s.headers,this.context.config.enableW3CTraceId);return f.traceId&&f.segmentId?(u.trace_id=f.traceId,u.segment_id=f.segmentId):this.isTracingEnabled()&&this.isSessionRecorded()&&(c=this.beginTrace(s,a,o),u.trace_id=c.trace_id,u.segment_id=c.subsegments[0].id),n.apply(r,o).then(h=>(this.endTrace(c,h,void 0),this.recordHttpEventWithResponse(u,h),h)).catch(h=>{throw this.endTrace(c,void 0,h),this.recordHttpEventWithError(u,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({},g7),t)}get patches(){return[{nodule:window,name:"fetch",wrapper:this.fetchWrapper}]}onload(){this.enable()}isTraceIdHeaderEnabled(t){const n=gg(t);return m7(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 bSe extends Error{constructor(t){super(t),this.name="XMLHttpRequest error"}}const SSe="xhr";class wSe extends OR{constructor(t){super(SSe),this.addXRayTraceIdHeader=n=>m7(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=Au();o.trace.end_time=s,o.trace.subsegments[0].end_time=s,o.trace.subsegments[0].http.response={status:r.status},CR(r.status)?(o.trace.subsegments[0].throttle=!0,o.trace.throttle=!0):v7(r.status)?(o.trace.subsegments[0].error=!0,o.trace.error=!0):wR(r.status)&&(o.trace.subsegments[0].fault=!0,o.trace.fault=!0);const a=r.getResponseHeader("Content-Length"),u=a?parseInt(a,10):NaN;isNaN(u)||(o.trace.subsegments[0].http.response.content_length=u),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 u=Au();o.trace.fault=!0,o.trace.end_time=u,o.trace.subsegments[0].end_time=u,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 bSe(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=Au();n.trace=b7(this.config.logicalServiceName,r,this.context.config.enableW3CTraceId),n.trace.subsegments.push(S7(w7(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($y,_R(o.trace.trace_id,o.trace.subsegments[0].id)):this.setRequestHeader(Uy,ER(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 y7(s,n.config)&&n.xhrMap.set(this,{url:s,method:o,async:a}),r.apply(this,arguments)}},this.config=Object.assign(Object.assign({},g7),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=Au();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(Jg,r)}recordHttpEventWithError(t,n,r){this.xhrMap.delete(n);const o={version:"1.0.0",request:{method:t.method,url:t.url},error:RR({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(Jg,o)}recordTraceEvent(t){!this.isSyntheticsUA&&this.isTracingEnabled()&&this.isSessionRecorded()&&this.context.record(M7,t)}}var rv={},CSe=Object.defineProperty,ESe=(e,t,n)=>t in e?CSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,me=(e,t,n)=>ESe(e,typeof t!="symbol"?t+"":t,n),$U,_Se=Object.defineProperty,xSe=(e,t,n)=>t in e?_Se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,FU=(e,t,n)=>xSe(e,typeof t!="symbol"?t+"":t,n),yn=(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))(yn||{});const zU={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},jU={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},gm={},ISe=()=>!!globalThis.Zone;function UR(e){if(gm[e])return gm[e];const t=globalThis[e],n=t.prototype,r=e in zU?zU[e]:void 0,o=!!(r&&r.every(u=>{var c,f;return!!((f=(c=Object.getOwnPropertyDescriptor(n,u))==null?void 0:c.get)!=null&&f.toString().includes("[native code]"))})),s=e in jU?jU[e]:void 0,a=!!(s&&s.every(u=>{var c;return typeof n[u]=="function"&&((c=n[u])==null?void 0:c.toString().includes("[native code]"))}));if(o&&a&&!ISe())return gm[e]=t.prototype,t.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const c=u.contentWindow;if(!c)return t.prototype;const f=c[e].prototype;return document.body.removeChild(u),f?gm[e]=f:n}catch{return n}}const YE={};function Vs(e,t,n){var r;const o=`${e}.${String(n)}`;if(YE[o])return YE[o].call(t);const s=UR(e),a=(r=Object.getOwnPropertyDescriptor(s,n))==null?void 0:r.get;return a?(YE[o]=a,a.call(t)):t[n]}const QE={};function G7(e,t,n){const r=`${e}.${String(n)}`;if(QE[r])return QE[r].bind(t);const s=UR(e)[n];return typeof s!="function"?t[n]:(QE[r]=s,s.bind(t))}function ASe(e){return Vs("Node",e,"ownerDocument")}function RSe(e){return Vs("Node",e,"childNodes")}function TSe(e){return Vs("Node",e,"parentNode")}function OSe(e){return Vs("Node",e,"parentElement")}function MSe(e){return Vs("Node",e,"textContent")}function PSe(e,t){return G7("Node",e,"contains")(t)}function NSe(e){return G7("Node",e,"getRootNode")()}function kSe(e){return!e||!("host"in e)?null:Vs("ShadowRoot",e,"host")}function DSe(e){return e.styleSheets}function LSe(e){return!e||!("shadowRoot"in e)?null:Vs("Element",e,"shadowRoot")}function USe(e,t){return Vs("Element",e,"querySelector")(t)}function $Se(e,t){return Vs("Element",e,"querySelectorAll")(t)}function FSe(){return UR("MutationObserver").constructor}function zSe(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 jn={ownerDocument:ASe,childNodes:RSe,parentNode:TSe,parentElement:OSe,textContent:MSe,contains:PSe,getRootNode:NSe,host:kSe,styleSheets:DSe,shadowRoot:LSe,querySelector:USe,querySelectorAll:$Se,mutationObserver:FSe,patch:zSe};function K7(e){return e.nodeType===e.ELEMENT_NODE}function hf(e){const t=e&&"host"in e&&"mode"in e&&jn.host(e)||null;return!!(t&&"shadowRoot"in t&&jn.shadowRoot(t)===e)}function pf(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function jSe(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 BSe(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 Tx(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=>Z7(o,n)).join("");return jSe(r)}catch{return null}}function Z7(e,t){if(qSe(e)){let n;try{n=Tx(e.styleSheet)||BSe(e)}catch{n=e.cssText}return e.styleSheet.href?iv(n,e.styleSheet.href):n}else{let n=e.cssText;return VSe(e)&&e.selectorText.includes(":")&&(n=HSe(n)),t?iv(n,t):n}}function HSe(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function qSe(e){return"styleSheet"in e}function VSe(e){return"selectorText"in e}class Y7{constructor(){FU(this,"idNodeMap",new Map),FU(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 WSe(){return new Y7}function ov({element:e,maskInputOptions:t,tagName:n,type:r,value:o,maskInputFn:s}){let a=o||"";const u=r&&nl(r);return(t[n.toLowerCase()]||u&&t[u])&&(s?a=s(a,e):a="*".repeat(a.length)),a}function nl(e){return e.toLowerCase()}const BU="__rrweb_original__";function GSe(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=BU in s?s[BU]:s;if(new Uint32Array(a.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(c=>c!==0))return!1}return!0}function sv(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?nl(t):null}function Q7(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 KSe(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const ZSe=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,YSe=/^(?:[a-z+]+:)?\/\//i,QSe=/^www\..*/i,XSe=/^(data:)([^,]*),(.*)/i;function iv(e,t){return(e||"").replace(ZSe,(n,r,o,s,a,u)=>{const c=o||a||u,f=r||s||"";if(!c)return n;if(YSe.test(c)||QSe.test(c))return`url(${f}${c}${f})`;if(XSe.test(c))return`url(${f}${c}${f})`;if(c[0]==="/")return`url(${f}${KSe(t)+c}${f})`;const h=t.split("/"),m=c.split("/");h.pop();for(const g of m)g!=="."&&(g===".."?h.pop():h.push(g));return`url(${f}${h.join("/")}${f})`})}function vm(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function JSe(e,t,n=!1){const r=Array.from(t.childNodes),o=[];let s=0;if(r.length>1&&e&&typeof e=="string"){let a=vm(e,n);const u=a.length/e.length;for(let c=1;c<r.length;c++)if(r[c].textContent&&typeof r[c].textContent=="string"){const f=vm(r[c].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),w=-1;if(v.length===2)w=v[0].length;else if(v.length>2&&v[0]===""&&r[c-1].textContent!=="")w=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&&(w=a.indexOf(g));if(v.length>=2&&m>h){const S=r[c-1].textContent;if(S&&typeof S=="string"){const C=vm(S).length;w=a.indexOf(g,C)}w===-1&&(w=v[0].length)}if(w!==-1){let S=Math.floor(w/u);for(;S>0&&S<e.length;){if(s+=1,s>50*r.length)return o.push(e),o;const C=vm(e.substring(0,S),n);if(C.length===w){o.push(e.substring(0,S)),e=e.substring(S),a=a.substring(w);break}else C.length<w?S+=Math.max(1,Math.floor((w-C.length)/u)):S-=Math.max(1,Math.floor((C.length-w)*u))}break}}}}return o.push(e),o}function ewe(e,t){return JSe(e,t).join("/* rr_split */")}let twe=1;const nwe=new RegExp("[^a-z0-9-_:]"),$f=-2;function X7(){return twe++}function rwe(e){if(e instanceof HTMLFormElement)return"form";const t=nl(e.tagName);return nwe.test(t)?"div":t}let hu,HU;const owe=/^[^ \t\n\r\u000c]+/,swe=/^[, \t\n\r\u000c]+/;function iwe(e,t){if(t.trim()==="")return t;let n=0;function r(s){let a;const u=s.exec(t.substring(n));return u?(a=u[0],n+=a.length,a):""}const o=[];for(;r(swe),!(n>=t.length);){let s=r(owe);if(s.slice(-1)===",")s=Tu(e,s.substring(0,s.length-1)),o.push(s);else{let a="";s=Tu(e,s);let u=!1;for(;;){const c=t.charAt(n);if(c===""){o.push((s+a).trim());break}else if(u)c===")"&&(u=!1);else if(c===","){n+=1,o.push((s+a).trim());break}else c==="("&&(u=!0);a+=c,n+=1}}}return o.join(", ")}const qU=new WeakMap;function Tu(e,t){return!t||t.trim()===""?t:$R(e,t)}function awe(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function $R(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 J7(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)?Tu(e,r):n==="srcset"?iwe(e,r):n==="style"?iv(r,$R(e)):t==="object"&&n==="data"?Tu(e,r):r)}function ej(e,t,n){return["video","audio"].includes(e)&&t==="autoplay"}function lwe(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 av(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?av(jn.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?av(jn.parentNode(e),t,n):!1}function tj(e,t,n,r){let o;if(K7(e)){if(o=e,!jn.childNodes(o).length)return!1}else{if(jn.parentElement(e)===null)return!1;o=jn.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(av(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 uwe(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 u=setTimeout(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{clearTimeout(u),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 cwe(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 dwe(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,needsMask:a,inlineStylesheet:u,maskInputOptions:c={},maskTextFn:f,maskInputFn:h,dataURLOptions:m={},inlineImages:g,recordCanvas:v,keepIframeSrcFn:w,newlyAddedElement:S=!1,cssCaptured:C=!1}=t,E=fwe(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:yn.Document,childNodes:[],compatMode:e.compatMode}:{type:yn.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:yn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:E};case e.ELEMENT_NODE:return pwe(e,{doc:n,blockClass:o,blockSelector:s,inlineStylesheet:u,maskInputOptions:c,maskInputFn:h,dataURLOptions:m,inlineImages:g,recordCanvas:v,keepIframeSrcFn:w,newlyAddedElement:S,rootId:E});case e.TEXT_NODE:return hwe(e,{doc:n,needsMask:a,maskTextFn:f,rootId:E,cssCaptured:C});case e.CDATA_SECTION_NODE:return{type:yn.CDATA,textContent:"",rootId:E};case e.COMMENT_NODE:return{type:yn.Comment,textContent:jn.textContent(e)||"",rootId:E};default:return!1}}function fwe(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function hwe(e,t){const{needsMask:n,maskTextFn:r,rootId:o,cssCaptured:s}=t,a=jn.parentNode(e),u=a&&a.tagName;let c="";const f=u==="STYLE"?!0:void 0,h=u==="SCRIPT"?!0:void 0;return h?c="SCRIPT_PLACEHOLDER":s||(c=jn.textContent(e),f&&c&&(c=iv(c,$R(t.doc)))),!f&&!h&&c&&n&&(c=r?r(c,jn.parentElement(e)):c.replace(/[\S]/g,"*")),{type:yn.Text,textContent:c||"",rootId:o}}function pwe(e,t){const{doc:n,blockClass:r,blockSelector:o,inlineStylesheet:s,maskInputOptions:a={},maskInputFn:u,dataURLOptions:c={},inlineImages:f,recordCanvas:h,keepIframeSrcFn:m,newlyAddedElement:g=!1,rootId:v}=t,w=lwe(e,r,o),S=rwe(e);let C={};const E=e.attributes.length;for(let A=0;A<E;A++){const T=e.attributes[A];ej(S,T.name,T.value)||(C[T.name]=J7(n,S,nl(T.name),T.value))}if(S==="link"&&s){const A=Array.from(n.styleSheets).find(N=>N.href===e.href);let T=null;A&&(T=Tx(A)),T&&(delete C.rel,delete C.href,C._cssText=T)}if(S==="style"&&e.sheet){let A=Tx(e.sheet);A&&(e.childNodes.length>1&&(A=ewe(A,e)),C._cssText=A)}if(["input","textarea","select"].includes(S)){const A=e.value,T=e.checked;C.type!=="radio"&&C.type!=="checkbox"&&C.type!=="submit"&&C.type!=="button"&&A?C.value=ov({element:e,type:sv(e),tagName:S,value:A,maskInputOptions:a,maskInputFn:u}):T&&(C.checked=T)}if(S==="option"&&(e.selected&&!a.select?C.selected=!0:delete C.selected),S==="dialog"&&e.open&&(C.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),S==="canvas"&&h){if(e.__context==="2d")GSe(e)||(C.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const A=e.toDataURL(c.type,c.quality),T=n.createElement("canvas");T.width=e.width,T.height=e.height;const N=T.toDataURL(c.type,c.quality);A!==N&&(C.rr_dataURL=A)}}if(S==="img"&&f){hu||(hu=n.createElement("canvas"),HU=hu.getContext("2d"));const A=e,T=A.currentSrc||A.getAttribute("src")||"<unknown-src>",N=A.crossOrigin,M=()=>{A.removeEventListener("load",M);try{hu.width=A.naturalWidth,hu.height=A.naturalHeight,HU.drawImage(A,0,0),C.rr_dataURL=hu.toDataURL(c.type,c.quality)}catch(R){if(A.crossOrigin!=="anonymous"){A.crossOrigin="anonymous",A.complete&&A.naturalWidth!==0?M():A.addEventListener("load",M);return}else console.warn(`Cannot inline img src=${T}! Error: ${R}`)}A.crossOrigin==="anonymous"&&(N?C.crossOrigin=N:A.removeAttribute("crossorigin"))};A.complete&&A.naturalWidth!==0?M():A.addEventListener("load",M)}if(["audio","video"].includes(S)){const A=C;A.rr_mediaState=e.paused?"paused":"played",A.rr_mediaCurrentTime=e.currentTime,A.rr_mediaPlaybackRate=e.playbackRate,A.rr_mediaMuted=e.muted,A.rr_mediaLoop=e.loop,A.rr_mediaVolume=e.volume}if(g||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),w){const{width:A,height:T}=e.getBoundingClientRect();C={class:C.class,rr_width:`${A}px`,rr_height:`${T}px`}}S==="iframe"&&!m(C.src)&&(e.contentDocument||(C.rr_src=C.src),delete C.src);let I;try{customElements.get(S)&&(I=!0)}catch{}return{type:yn.Element,tagName:S,attributes:C,childNodes:[],isSVG:awe(e)||void 0,needBlock:w,rootId:v,isCustom:I}}function Nt(e){return e==null?"":e.toLowerCase()}function nj(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 mwe(e,t){if(t.comment&&e.type===yn.Comment)return!0;if(e.type===yn.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"&&Q7(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Nt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Nt(e.attributes.name)==="application-name"||Nt(e.attributes.rel)==="icon"||Nt(e.attributes.rel)==="apple-touch-icon"||Nt(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Nt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Nt(e.attributes.property).match(/^(og|twitter|fb):/)||Nt(e.attributes.name).match(/^(og|twitter):/)||Nt(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Nt(e.attributes.name)==="robots"||Nt(e.attributes.name)==="googlebot"||Nt(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Nt(e.attributes.name)==="author"||Nt(e.attributes.name)==="generator"||Nt(e.attributes.name)==="framework"||Nt(e.attributes.name)==="publisher"||Nt(e.attributes.name)==="progid"||Nt(e.attributes.property).match(/^article:/)||Nt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Nt(e.attributes.name)==="google-site-verification"||Nt(e.attributes.name)==="yandex-verification"||Nt(e.attributes.name)==="csrf-token"||Nt(e.attributes.name)==="p:domain_verify"||Nt(e.attributes.name)==="verify-v1"||Nt(e.attributes.name)==="verification"||Nt(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ou(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:u,skipChild:c=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:w={},inlineImages:S=!1,recordCanvas:C=!1,onSerialize:E,onIframeLoad:I,iframeLoadTimeout:A=5e3,onStylesheetLoad:T,stylesheetLoadTimeout:N=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:R=!1,cssCaptured:k=!1}=t;let{needsMask:L}=t,{preserveWhiteSpace:q=!0}=t;L||(L=tj(e,a,u,L===void 0));const $=dwe(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,needsMask:L,inlineStylesheet:f,maskInputOptions:h,maskTextFn:m,maskInputFn:g,dataURLOptions:w,inlineImages:S,recordCanvas:C,keepIframeSrcFn:M,newlyAddedElement:R,cssCaptured:k});if(!$)return console.warn(e,"not serialized"),null;let D;r.hasNode(e)?D=r.getId(e):mwe($,v)||!q&&$.type===yn.Text&&!$.textContent.replace(/^\s+|\s+$/gm,"").length?D=$f:D=X7();const j=Object.assign($,{id:D});if(r.add(e,j),D===$f)return null;E&&E(e);let Z=!c;if(j.type===yn.Element){Z=Z&&!j.needBlock,delete j.needBlock;const B=jn.shadowRoot(e);B&&pf(B)&&(j.isShadowHost=!0)}if((j.type===yn.Document||j.type===yn.Element)&&Z){v.headWhitespace&&j.type===yn.Element&&j.tagName==="head"&&(q=!1);const B={doc:n,mirror:r,blockClass:o,blockSelector:s,needsMask:L,maskTextClass:a,maskTextSelector:u,skipChild:c,inlineStylesheet:f,maskInputOptions:h,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:w,inlineImages:S,recordCanvas:C,preserveWhiteSpace:q,onSerialize:E,onIframeLoad:I,iframeLoadTimeout:A,onStylesheetLoad:T,stylesheetLoadTimeout:N,keepIframeSrcFn:M,cssCaptured:!1};if(!(j.type===yn.Element&&j.tagName==="textarea"&&j.attributes.value!==void 0)){j.type===yn.Element&&j.attributes._cssText!==void 0&&typeof j.attributes._cssText=="string"&&(B.cssCaptured=!0);for(const ae of Array.from(jn.childNodes(e))){const ue=Ou(ae,B);ue&&j.childNodes.push(ue)}}let Q=null;if(K7(e)&&(Q=jn.shadowRoot(e)))for(const ae of Array.from(jn.childNodes(Q))){const ue=Ou(ae,B);ue&&(pf(Q)&&(ue.isShadow=!0),j.childNodes.push(ue))}}const he=jn.parentNode(e);return he&&hf(he)&&pf(he)&&(j.isShadow=!0),j.type===yn.Element&&j.tagName==="iframe"&&uwe(e,()=>{const B=e.contentDocument;if(B&&I){const Q=Ou(B,{doc:B,mirror:r,blockClass:o,blockSelector:s,needsMask:L,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:w,inlineImages:S,recordCanvas:C,preserveWhiteSpace:q,onSerialize:E,onIframeLoad:I,iframeLoadTimeout:A,onStylesheetLoad:T,stylesheetLoadTimeout:N,keepIframeSrcFn:M});Q&&I(e,Q)}},A),j.type===yn.Element&&j.tagName==="link"&&typeof j.attributes.rel=="string"&&(j.attributes.rel==="stylesheet"||j.attributes.rel==="preload"&&typeof j.attributes.href=="string"&&Q7(j.attributes.href)==="css")&&cwe(e,()=>{if(T){const B=Ou(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,needsMask:L,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:w,inlineImages:S,recordCanvas:C,preserveWhiteSpace:q,onSerialize:E,onIframeLoad:I,iframeLoadTimeout:A,onStylesheetLoad:T,stylesheetLoadTimeout:N,keepIframeSrcFn:M});B&&T(e,B)}},N),j}function gwe(e,t){const{mirror:n=new Y7,blockClass:r="rr-block",blockSelector:o=null,maskTextClass:s="rr-mask",maskTextSelector:a=null,inlineStylesheet:u=!0,inlineImages:c=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskTextFn:m,maskInputFn:g,slimDOM:v=!1,dataURLOptions:w,preserveWhiteSpace:S,onSerialize:C,onIframeLoad:E,iframeLoadTimeout:I,onStylesheetLoad:A,stylesheetLoadTimeout:T,keepIframeSrcFn:N=()=>!1}=t||{},M=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,R=nj(v);return Ou(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:M,maskTextFn:m,maskInputFn:g,slimDOMOptions:R,dataURLOptions:w,inlineImages:c,recordCanvas:f,preserveWhiteSpace:S,onSerialize:C,onIframeLoad:E,iframeLoadTimeout:I,onStylesheetLoad:A,stylesheetLoadTimeout:T,keepIframeSrcFn:N,newlyAddedElement:!1})}function vwe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ywe(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 FR={exports:{}},Ut=String,rj=function(){return{isColorSupported:!1,reset:Ut,bold:Ut,dim:Ut,italic:Ut,underline:Ut,inverse:Ut,hidden:Ut,strikethrough:Ut,black:Ut,red:Ut,green:Ut,yellow:Ut,blue:Ut,magenta:Ut,cyan:Ut,white:Ut,gray:Ut,bgBlack:Ut,bgRed:Ut,bgGreen:Ut,bgYellow:Ut,bgBlue:Ut,bgMagenta:Ut,bgCyan:Ut,bgWhite:Ut}};FR.exports=rj();FR.exports.createColors=rj;var bwe=FR.exports;const Swe={},wwe=Object.freeze(Object.defineProperty({__proto__:null,default:Swe},Symbol.toStringTag,{value:"Module"})),Co=ywe(wwe);let VU=bwe,WU=Co,Ox=class oj 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,oj)}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=VU.isColorSupported),WU&&t&&(n=WU(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,u,c;if(t){let{bold:f,gray:h,red:m}=VU.createColors(!0);u=g=>f(m(g)),c=g=>h(g)}else u=c=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=c(g.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+c(g)+f+`
|
|
106
|
-
`+v+u("^")}return" "+c(g)+f}).join(`
|
|
107
|
-
`)}toString(){let t=this.showSourceCode();return t&&(t=`
|
|
108
|
-
|
|
109
|
-
`+t+`
|
|
110
|
-
`),this.name+": "+this.message+t}};var zR=Ox;Ox.default=Ox;var mh={};mh.isClean=Symbol("isClean");mh.my=Symbol("my");const GU={after:`
|
|
111
|
-
`,beforeClose:`
|
|
112
|
-
`,beforeComment:`
|
|
113
|
-
`,beforeDecl:`
|
|
114
|
-
`,beforeOpen:" ",beforeRule:`
|
|
115
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Cwe(e){return e[0].toUpperCase()+e.slice(1)}let Mx=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 u=0;u<s;u++)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 GU[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 u="raw"+Cwe(r);this[u]?o=this[u](a,t):a.walk(c=>{if(o=c.raws[n],typeof o<"u")return!1})}return typeof o>"u"&&(o=GU[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 sj=Mx;Mx.default=Mx;let Ewe=sj;function Px(e,t){new Ewe(t).stringify(e)}var qy=Px;Px.default=Px;let{isClean:ym,my:_we}=mh,xwe=zR,Iwe=sj,Awe=qy;function Nx(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=>Nx(a,n)):(s==="object"&&o!==null&&(o=Nx(o)),n[r]=o)}return n}let kx=class{constructor(t={}){this.raws={},this[ym]=!1,this[_we]=!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=Nx(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 xwe(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[ym]){this[ym]=!1;let t=this;for(;t=t.parent;)t[ym]=!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 Iwe().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 u=this[a];if(Array.isArray(u))r[a]=u.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,n):c);else if(typeof u=="object"&&u.toJSON)r[a]=u.toJSON(null,n);else if(a==="source"){let c=n.get(u.input);c==null&&(c=s,n.set(u.input,s),s++),r[a]={end:u.end,inputId:c,start:u.start}}else r[a]=u}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=Awe){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 Vy=kx;kx.default=kx;let Rwe=Vy,Dx=class extends Rwe{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 Wy=Dx;Dx.default=Dx;let Twe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Owe=(e=21)=>{let t="",n=e;for(;n--;)t+=Twe[Math.random()*64|0];return t};var Mwe={nanoid:Owe};let{SourceMapConsumer:KU,SourceMapGenerator:ZU}=Co,{existsSync:Pwe,readFileSync:Nwe}=Co,{dirname:XE,join:kwe}=Co;function Dwe(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let Lx=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=XE(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new KU(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 Dwe(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=XE(t),Pwe(t))return this.mapFile=t,Nwe(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 KU)return ZU.fromSourceMap(n).toString();if(n instanceof ZU)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=kwe(XE(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 ij=Lx;Lx.default=Lx;let{SourceMapConsumer:Lwe,SourceMapGenerator:Uwe}=Co,{fileURLToPath:YU,pathToFileURL:bm}=Co,{isAbsolute:Ux,resolve:$x}=Co,{nanoid:$we}=Mwe,JE=Co,QU=zR,Fwe=ij,e_=Symbol("fromOffsetCache"),zwe=!!(Lwe&&Uwe),XU=!!($x&&Ux),lv=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&&(!XU||/^\w+:\/\//.test(n.from)||Ux(n.from)?this.file=n.from:this.file=$x(n.from)),XU&&zwe){let r=new Fwe(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 "+$we(6)+">"),this.map&&(this.map.file=this.from)}error(t,n,r,o={}){let s,a,u;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,u=m.col}else a=h.line,u=h.column}else if(!r){let f=this.fromOffset(n);n=f.line,r=f.col}let c=this.origin(n,r,a,u);return c?s=new QU(t,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,o.plugin):s=new QU(t,a===void 0?n:{column:r,line:n},a===void 0?r:{column:u,line:a},this.css,this.file,o.plugin),s.input={column:r,endColumn:u,endLine:a,line:n,source:this.css},this.file&&(bm&&(s.input.url=bm(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(`
|
|
123
|
-
`);r=new Array(s.length);let a=0;for(let u=0,c=s.length;u<c;u++)r[u]=a,a+=s[u].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:$x(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 u;typeof r=="number"&&(u=s.originalPositionFor({column:o,line:r}));let c;Ux(a.source)?c=bm(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||bm(this.map.mapFile));let f={column:a.column,endColumn:u&&u.column,endLine:u&&u.line,line:a.line,url:c.toString()};if(c.protocol==="file:")if(YU)f.file=YU(c);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 Gy=lv;lv.default=lv;JE&&JE.registerInput&&JE.registerInput(lv);let{SourceMapConsumer:aj,SourceMapGenerator:vg}=Co,{dirname:yg,relative:lj,resolve:uj,sep:cj}=Co,{pathToFileURL:JU}=Co,jwe=Gy,Bwe=!!(aj&&vg),Hwe=!!(yg&&uj&&lj&&cj),qwe=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||yg(t.file),o;this.mapOpts.sourcesContent===!1?(o=new aj(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(),Hwe&&Bwe&&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=vg.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new vg({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 vg({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,(u,c,f)=>{if(this.css+=u,c&&f!=="end"&&(o.generated.line=t,o.generated.column=n-1,c.source&&c.source.start?(o.source=this.sourcePath(c),o.original.line=c.source.start.line,o.original.column=c.source.start.column-1,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,this.map.addMapping(o))),s=u.match(/\n/g),s?(t+=s.length,a=u.lastIndexOf(`
|
|
127
|
-
`),n=u.length-a):n+=u.length,c&&f!=="start"){let h=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==h.last||h.raws.semicolon)&&(c.source&&c.source.end?(o.source=this.sourcePath(c),o.original.line=c.source.end.line,o.original.column=c.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?yg(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=yg(uj(r,this.mapOpts.annotation)));let o=lj(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 jwe(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(JU){let r=JU(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;cj==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};var dj=qwe;let Vwe=Vy,Fx=class extends Vwe{constructor(t){super(t),this.type="comment"}};var Ky=Fx;Fx.default=Fx;let{isClean:fj,my:hj}=mh,pj=Wy,mj=Ky,Wwe=Vy,gj,jR,BR,vj;function yj(e){return e.map(t=>(t.nodes&&(t.nodes=yj(t.nodes)),delete t.source,t))}function bj(e){if(e[fj]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)bj(t)}let $s=class Sj extends Wwe{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 u of s)this.proxyOf.nodes.splice(r,0,u);let a;for(let u in this.indexes)a=this.indexes[u],r<=a&&(this.indexes[u]=a+s.length);return this.markDirty(),this}normalize(t,n){if(typeof t=="string")t=yj(gj(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 pj(t)]}else if(t.selector)t=[new jR(t)];else if(t.name)t=[new BR(t)];else if(t.text)t=[new mj(t)];else throw new Error("Unknown node type in node creation");return t.map(o=>(o[hj]||Sj.rebuild(o),o=o.proxyOf,o.parent&&o.parent.removeChild(o),o[fj]&&bj(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]}};$s.registerParse=e=>{gj=e};$s.registerRule=e=>{jR=e};$s.registerAtRule=e=>{BR=e};$s.registerRoot=e=>{vj=e};var vl=$s;$s.default=$s;$s.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,BR.prototype):e.type==="rule"?Object.setPrototypeOf(e,jR.prototype):e.type==="decl"?Object.setPrototypeOf(e,pj.prototype):e.type==="comment"?Object.setPrototypeOf(e,mj.prototype):e.type==="root"&&Object.setPrototypeOf(e,vj.prototype),e[hj]=!0,e.nodes&&e.nodes.forEach(t=>{$s.rebuild(t)})};let Gwe=vl,wj,Cj,Ff=class extends Gwe{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new wj(new Cj,this,t).stringify()}};Ff.registerLazyResult=e=>{wj=e};Ff.registerProcessor=e=>{Cj=e};var HR=Ff;Ff.default=Ff;let zx=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 Ej=zx;zx.default=zx;let Kwe=Ej,jx=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 Kwe(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};var qR=jx;jx.default=jx;const t_=39,e6=34,Sm=92,t6=47,wm=10,$d=32,Cm=12,Em=9,_m=13,Zwe=91,Ywe=93,Qwe=40,Xwe=41,Jwe=123,eCe=125,tCe=59,nCe=42,rCe=58,oCe=64,xm=/[\t\n\f\r "#'()/;[\\\]{}]/g,Im=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,sCe=/.[\r\n"'(/\\]/,n6=/[\da-f]/i;var iCe=function(t,n={}){let r=t.css.valueOf(),o=n.ignoreErrors,s,a,u,c,f,h,m,g,v,w,S=r.length,C=0,E=[],I=[];function A(){return C}function T(k){throw t.error("Unclosed "+k,C)}function N(){return I.length===0&&C>=S}function M(k){if(I.length)return I.pop();if(C>=S)return;let L=k?k.ignoreUnclosed:!1;switch(s=r.charCodeAt(C),s){case wm:case $d:case Em:case _m:case Cm:{a=C;do a+=1,s=r.charCodeAt(a);while(s===$d||s===wm||s===Em||s===_m||s===Cm);w=["space",r.slice(C,a)],C=a-1;break}case Zwe:case Ywe:case Jwe:case eCe:case rCe:case tCe:case Xwe:{let q=String.fromCharCode(s);w=[q,q,C];break}case Qwe:{if(g=E.length?E.pop()[1]:"",v=r.charCodeAt(C+1),g==="url"&&v!==t_&&v!==e6&&v!==$d&&v!==wm&&v!==Em&&v!==Cm&&v!==_m){a=C;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(o||L){a=C;break}else T("bracket");for(m=a;r.charCodeAt(m-1)===Sm;)m-=1,h=!h}while(h);w=["brackets",r.slice(C,a+1),C,a],C=a}else a=r.indexOf(")",C+1),c=r.slice(C,a+1),a===-1||sCe.test(c)?w=["(","(",C]:(w=["brackets",c,C,a],C=a);break}case t_:case e6:{u=s===t_?"'":'"',a=C;do{if(h=!1,a=r.indexOf(u,a+1),a===-1)if(o||L){a=C+1;break}else T("string");for(m=a;r.charCodeAt(m-1)===Sm;)m-=1,h=!h}while(h);w=["string",r.slice(C,a+1),C,a],C=a;break}case oCe:{xm.lastIndex=C+1,xm.test(r),xm.lastIndex===0?a=r.length-1:a=xm.lastIndex-2,w=["at-word",r.slice(C,a+1),C,a],C=a;break}case Sm:{for(a=C,f=!0;r.charCodeAt(a+1)===Sm;)a+=1,f=!f;if(s=r.charCodeAt(a+1),f&&s!==t6&&s!==$d&&s!==wm&&s!==Em&&s!==_m&&s!==Cm&&(a+=1,n6.test(r.charAt(a)))){for(;n6.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===$d&&(a+=1)}w=["word",r.slice(C,a+1),C,a],C=a;break}default:{s===t6&&r.charCodeAt(C+1)===nCe?(a=r.indexOf("*/",C+2)+1,a===0&&(o||L?a=r.length:T("comment")),w=["comment",r.slice(C,a+1),C,a],C=a):(Im.lastIndex=C+1,Im.test(r),Im.lastIndex===0?a=r.length-1:a=Im.lastIndex-2,w=["word",r.slice(C,a+1),C,a],E.push(w),C=a);break}}return C++,w}function R(k){I.push(k)}return{back:R,endOfFile:N,nextToken:M,position:A}};let _j=vl,uv=class extends _j{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 VR=uv;uv.default=uv;_j.registerAtRule(uv);let xj=vl,Ij,Aj,Yu=class extends xj{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 Ij(new Aj,this,t).stringify()}};Yu.registerLazyResult=e=>{Ij=e};Yu.registerProcessor=e=>{Aj=e};var gh=Yu;Yu.default=Yu;xj.registerRoot(Yu);let zf={comma(e){return zf.split(e,[","],!0)},space(e){let t=[" ",`
|
|
128
|
-
`," "];return zf.split(e,t)},split(e,t,n){let r=[],o="",s=!1,a=0,u=!1,c="",f=!1;for(let h of e)f?f=!1:h==="\\"?f=!0:u?h===c&&(u=!1):h==='"'||h==="'"?(u=!0,c=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 Rj=zf;zf.default=zf;let Tj=vl,aCe=Rj,cv=class extends Tj{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return aCe.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 WR=cv;cv.default=cv;Tj.registerRule(cv);let lCe=Wy,uCe=iCe,cCe=Ky,dCe=VR,fCe=gh,r6=WR;const o6={empty:!0,space:!0};function hCe(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}let pCe=class{constructor(t){this.input=t,this.root=new fCe,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 dCe;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let r,o,s,a=!1,u=!1,c=[],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==="{"){u=!0;break}else if(r==="}"){if(c.length>0){for(s=c.length-1,o=c[s];o&&o[0]==="space";)o=c[--s];o&&(n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++)}this.end(t);break}else c.push(t);else c.push(t);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(n.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(n,"params",c),a&&(t=c[c.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=""),u&&(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,u]of t.entries()){if(r=u,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 cCe;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=uCe(this.input)}decl(t,n){let r=new lCe;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]||hCe(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=[],u;for(;t.length&&(u=t[0][0],!(u!=="space"&&u!=="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 r6;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=[],u=t[1].startsWith("--"),c=[],f=t;for(;f;){if(r=f[0],c.push(f),r==="("||r==="[")s||(s=f),a.push(r==="("?")":"]");else if(u&&o&&r==="{")s||(s=f),a.push("}");else if(a.length===0)if(r===";")if(o){this.decl(c,u);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.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(!u)for(;c.length&&(f=c[c.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,u)}else this.unknownWord(c)}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,u=r.length,c="",f=!0,h,m;for(let g=0;g<u;g+=1)s=r[g],a=s[0],a==="space"&&g===u-1&&!o?f=!1:a==="comment"?(m=r[g-1]?r[g-1][0]:"empty",h=r[g+1]?r[g+1][0]:"empty",!o6[m]&&!o6[h]?c.slice(-1)===","?f=!1:c+=s[1]:f=!1):c+=s[1];if(!f){let g=r.reduce((v,w)=>v+w[1],"");t.raws[n]={raw:g,value:c}}t[n]=c}rule(t){t.pop();let n=new r6;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 mCe=pCe;let gCe=vl,vCe=mCe,yCe=Gy;function dv(e,t){let n=new yCe(e,t),r=new vCe(n);try{r.parse()}catch(o){throw o}return r.root}var GR=dv;dv.default=dv;gCe.registerParse(dv);let{isClean:Po,my:bCe}=mh,SCe=dj,wCe=qy,CCe=vl,ECe=HR,s6=qR,_Ce=GR,xCe=gh;const ICe={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ACe={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},RCe={Once:!0,postcssPlugin:!0,prepare:!0},Qu=0;function Fd(e){return typeof e=="object"&&typeof e.then=="function"}function Oj(e){let t=!1,n=ICe[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,Qu,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,Qu,n+"Exit"]:[n,n+"Exit"]}function i6(e){let t;return e.type==="document"?t=["Document",Qu,"DocumentExit"]:e.type==="root"?t=["Root",Qu,"RootExit"]:t=Oj(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Bx(e){return e[Po]=!1,e.nodes&&e.nodes.forEach(t=>Bx(t)),e}let Hx={},Xu=class Mj{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=Bx(n);else if(n instanceof Mj||n instanceof s6)o=Bx(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=_Ce;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[bCe]&&CCe.rebuild(o)}this.result=new s6(t,o,r),this.helpers={...Hx,postcss:Hx,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(!ACe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!RCe[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(Fd(r))try{await r}catch(o){throw this.handleError(o)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Po];){t[Po]=!0;let n=[i6(t)];for(;n.length>0;){let r=this.visitTick(n);if(Fd(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 Fd(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=wCe;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let o=new SCe(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(Fd(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Po];)t[Po]=!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(Fd(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,u]=o[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===o.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return u(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let a=n.iterator,u;for(;u=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!u[Po]){u[Po]=!0,t.push(i6(u));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===Qu){r.nodes&&r.nodes.length&&(r[Po]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[Po]=!0;let n=Oj(t);for(let r of n)if(r===Qu)t.nodes&&t.each(o=>{o[Po]||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"}};Xu.registerPostcss=e=>{Hx=e};var Pj=Xu;Xu.default=Xu;xCe.registerLazyResult(Xu);ECe.registerLazyResult(Xu);let TCe=dj,OCe=qy,MCe=GR;const PCe=qR;let qx=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=OCe;this.result=new PCe(this._processor,o,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new TCe(s,o,this._opts,n);if(u.isMap()){let[c,f]=u.generate();c&&(this.result.css=c),f&&(this.result.map=f)}else u.clearAnnotation(),this.result.css=u.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=MCe;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 NCe=qx;qx.default=qx;let kCe=NCe,DCe=Pj,LCe=HR,UCe=gh,jf=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 kCe(this,t,n):new DCe(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var $Ce=jf;jf.default=jf;UCe.registerProcessor(jf);LCe.registerProcessor(jf);let FCe=Wy,zCe=ij,jCe=Ky,BCe=VR,HCe=Gy,qCe=gh,VCe=WR;function Bf(e,t){if(Array.isArray(e))return e.map(o=>Bf(o));let{inputs:n,...r}=e;if(n){t=[];for(let o of n){let s={...o,__proto__:HCe.prototype};s.map&&(s.map={...s.map,__proto__:zCe.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(o=>Bf(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 qCe(r);if(r.type==="decl")return new FCe(r);if(r.type==="rule")return new VCe(r);if(r.type==="comment")return new jCe(r);if(r.type==="atrule")return new BCe(r);throw new Error("Unknown node type: "+e.type)}var WCe=Bf;Bf.default=Bf;let GCe=zR,Nj=Wy,KCe=Pj,ZCe=vl,KR=$Ce,YCe=qy,QCe=WCe,kj=HR,XCe=Ej,Dj=Ky,Lj=VR,JCe=qR,eEe=Gy,tEe=GR,nEe=Rj,Uj=WR,$j=gh,rEe=Vy;function Ct(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new KR(e)}Ct.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`),rv.LANG&&rv.LANG.startsWith("cn")&&console.warn(t+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
130
|
-
https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=t,u.postcssVersion=new KR().version,u}let s;return Object.defineProperty(o,"postcss",{get(){return s||(s=o()),s}}),o.process=function(a,u,c){return Ct([o(c)]).process(a,u)},o};Ct.stringify=YCe;Ct.parse=tEe;Ct.fromJSON=QCe;Ct.list=nEe;Ct.comment=e=>new Dj(e);Ct.atRule=e=>new Lj(e);Ct.decl=e=>new Nj(e);Ct.rule=e=>new Uj(e);Ct.root=e=>new $j(e);Ct.document=e=>new kj(e);Ct.CssSyntaxError=GCe;Ct.Declaration=Nj;Ct.Container=ZCe;Ct.Processor=KR;Ct.Document=kj;Ct.Comment=Dj;Ct.Warning=XCe;Ct.AtRule=Lj;Ct.Result=JCe;Ct.Input=eEe;Ct.Rule=Uj;Ct.Root=$j;Ct.Node=rEe;KCe.registerPostcss(Ct);var oEe=Ct;Ct.default=Ct;const Ht=vwe(oEe);Ht.stringify;Ht.fromJSON;Ht.plugin;Ht.parse;Ht.list;Ht.document;Ht.comment;Ht.atRule;Ht.rule;Ht.decl;Ht.root;Ht.CssSyntaxError;Ht.Declaration;Ht.Container;Ht.Processor;Ht.Document;Ht.Comment;Ht.Warning;Ht.AtRule;Ht.Result;Ht.Input;Ht.Rule;Ht.Root;Ht.Node;var sEe=Object.defineProperty,iEe=(e,t,n)=>t in e?sEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vr=(e,t,n)=>iEe(e,typeof t!="symbol"?t+"":t,n);function aEe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function lEe(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 ZR={exports:{}},$t=String,Fj=function(){return{isColorSupported:!1,reset:$t,bold:$t,dim:$t,italic:$t,underline:$t,inverse:$t,hidden:$t,strikethrough:$t,black:$t,red:$t,green:$t,yellow:$t,blue:$t,magenta:$t,cyan:$t,white:$t,gray:$t,bgBlack:$t,bgRed:$t,bgGreen:$t,bgYellow:$t,bgBlue:$t,bgMagenta:$t,bgCyan:$t,bgWhite:$t}};ZR.exports=Fj();ZR.exports.createColors=Fj;var uEe=ZR.exports;const cEe={},dEe=Object.freeze(Object.defineProperty({__proto__:null,default:cEe},Symbol.toStringTag,{value:"Module"})),Eo=lEe(dEe);let a6=uEe,l6=Eo,Vx=class zj 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,zj)}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=a6.isColorSupported),l6&&t&&(n=l6(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,u,c;if(t){let{bold:f,gray:h,red:m}=a6.createColors(!0);u=g=>f(m(g)),c=g=>h(g)}else u=c=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=c(g.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+c(g)+f+`
|
|
131
|
-
`+v+u("^")}return" "+c(g)+f}).join(`
|
|
132
|
-
`)}toString(){let t=this.showSourceCode();return t&&(t=`
|
|
133
|
-
|
|
134
|
-
`+t+`
|
|
135
|
-
`),this.name+": "+this.message+t}};var YR=Vx;Vx.default=Vx;var vh={};vh.isClean=Symbol("isClean");vh.my=Symbol("my");const u6={after:`
|
|
136
|
-
`,beforeClose:`
|
|
137
|
-
`,beforeComment:`
|
|
138
|
-
`,beforeDecl:`
|
|
139
|
-
`,beforeOpen:" ",beforeRule:`
|
|
140
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function fEe(e){return e[0].toUpperCase()+e.slice(1)}let Wx=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 u=0;u<s;u++)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 u6[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 u="raw"+fEe(r);this[u]?o=this[u](a,t):a.walk(c=>{if(o=c.raws[n],typeof o<"u")return!1})}return typeof o>"u"&&(o=u6[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 jj=Wx;Wx.default=Wx;let hEe=jj;function Gx(e,t){new hEe(t).stringify(e)}var Zy=Gx;Gx.default=Gx;let{isClean:Am,my:pEe}=vh,mEe=YR,gEe=jj,vEe=Zy;function Kx(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=>Kx(a,n)):(s==="object"&&o!==null&&(o=Kx(o)),n[r]=o)}return n}let Zx=class{constructor(t={}){this.raws={},this[Am]=!1,this[pEe]=!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=Kx(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 mEe(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[Am]){this[Am]=!1;let t=this;for(;t=t.parent;)t[Am]=!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 gEe().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 u=this[a];if(Array.isArray(u))r[a]=u.map(c=>typeof c=="object"&&c.toJSON?c.toJSON(null,n):c);else if(typeof u=="object"&&u.toJSON)r[a]=u.toJSON(null,n);else if(a==="source"){let c=n.get(u.input);c==null&&(c=s,n.set(u.input,s),s++),r[a]={end:u.end,inputId:c,start:u.start}}else r[a]=u}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=vEe){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 Yy=Zx;Zx.default=Zx;let yEe=Yy,Yx=class extends yEe{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 Qy=Yx;Yx.default=Yx;let bEe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",SEe=(e=21)=>{let t="",n=e;for(;n--;)t+=bEe[Math.random()*64|0];return t};var wEe={nanoid:SEe};let{SourceMapConsumer:c6,SourceMapGenerator:d6}=Eo,{existsSync:CEe,readFileSync:EEe}=Eo,{dirname:n_,join:_Ee}=Eo;function xEe(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let Qx=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=n_(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new c6(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 xEe(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=n_(t),CEe(t))return this.mapFile=t,EEe(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 c6)return d6.fromSourceMap(n).toString();if(n instanceof d6)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=_Ee(n_(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 Bj=Qx;Qx.default=Qx;let{SourceMapConsumer:IEe,SourceMapGenerator:AEe}=Eo,{fileURLToPath:f6,pathToFileURL:Rm}=Eo,{isAbsolute:Xx,resolve:Jx}=Eo,{nanoid:REe}=wEe,r_=Eo,h6=YR,TEe=Bj,o_=Symbol("fromOffsetCache"),OEe=!!(IEe&&AEe),p6=!!(Jx&&Xx),fv=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&&(!p6||/^\w+:\/\//.test(n.from)||Xx(n.from)?this.file=n.from:this.file=Jx(n.from)),p6&&OEe){let r=new TEe(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 "+REe(6)+">"),this.map&&(this.map.file=this.from)}error(t,n,r,o={}){let s,a,u;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,u=m.col}else a=h.line,u=h.column}else if(!r){let f=this.fromOffset(n);n=f.line,r=f.col}let c=this.origin(n,r,a,u);return c?s=new h6(t,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,o.plugin):s=new h6(t,a===void 0?n:{column:r,line:n},a===void 0?r:{column:u,line:a},this.css,this.file,o.plugin),s.input={column:r,endColumn:u,endLine:a,line:n,source:this.css},this.file&&(Rm&&(s.input.url=Rm(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let n,r;if(this[o_])r=this[o_];else{let s=this.css.split(`
|
|
148
|
-
`);r=new Array(s.length);let a=0;for(let u=0,c=s.length;u<c;u++)r[u]=a,a+=s[u].length+1;this[o_]=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:Jx(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 u;typeof r=="number"&&(u=s.originalPositionFor({column:o,line:r}));let c;Xx(a.source)?c=Rm(a.source):c=new URL(a.source,this.map.consumer().sourceRoot||Rm(this.map.mapFile));let f={column:a.column,endColumn:u&&u.column,endLine:u&&u.line,line:a.line,url:c.toString()};if(c.protocol==="file:")if(f6)f.file=f6(c);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 Xy=fv;fv.default=fv;r_&&r_.registerInput&&r_.registerInput(fv);let{SourceMapConsumer:Hj,SourceMapGenerator:bg}=Eo,{dirname:Sg,relative:qj,resolve:Vj,sep:Wj}=Eo,{pathToFileURL:m6}=Eo,MEe=Xy,PEe=!!(Hj&&bg),NEe=!!(Sg&&Vj&&qj&&Wj),kEe=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||Sg(t.file),o;this.mapOpts.sourcesContent===!1?(o=new Hj(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(),NEe&&PEe&&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=bg.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new bg({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 bg({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,(u,c,f)=>{if(this.css+=u,c&&f!=="end"&&(o.generated.line=t,o.generated.column=n-1,c.source&&c.source.start?(o.source=this.sourcePath(c),o.original.line=c.source.start.line,o.original.column=c.source.start.column-1,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,this.map.addMapping(o))),s=u.match(/\n/g),s?(t+=s.length,a=u.lastIndexOf(`
|
|
152
|
-
`),n=u.length-a):n+=u.length,c&&f!=="start"){let h=c.parent||{raws:{}};(!(c.type==="decl"||c.type==="atrule"&&!c.nodes)||c!==h.last||h.raws.semicolon)&&(c.source&&c.source.end?(o.source=this.sourcePath(c),o.original.line=c.source.end.line,o.original.column=c.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?Sg(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Sg(Vj(r,this.mapOpts.annotation)));let o=qj(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 MEe(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(m6){let r=m6(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;Wj==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};var Gj=kEe;let DEe=Yy,eI=class extends DEe{constructor(t){super(t),this.type="comment"}};var Jy=eI;eI.default=eI;let{isClean:Kj,my:Zj}=vh,Yj=Qy,Qj=Jy,LEe=Yy,Xj,QR,XR,Jj;function eB(e){return e.map(t=>(t.nodes&&(t.nodes=eB(t.nodes)),delete t.source,t))}function tB(e){if(e[Kj]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)tB(t)}let Fs=class nB extends LEe{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 u of s)this.proxyOf.nodes.splice(r,0,u);let a;for(let u in this.indexes)a=this.indexes[u],r<=a&&(this.indexes[u]=a+s.length);return this.markDirty(),this}normalize(t,n){if(typeof t=="string")t=eB(Xj(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 Yj(t)]}else if(t.selector)t=[new QR(t)];else if(t.name)t=[new XR(t)];else if(t.text)t=[new Qj(t)];else throw new Error("Unknown node type in node creation");return t.map(o=>(o[Zj]||nB.rebuild(o),o=o.proxyOf,o.parent&&o.parent.removeChild(o),o[Kj]&&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]}};Fs.registerParse=e=>{Xj=e};Fs.registerRule=e=>{QR=e};Fs.registerAtRule=e=>{XR=e};Fs.registerRoot=e=>{Jj=e};var yl=Fs;Fs.default=Fs;Fs.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,XR.prototype):e.type==="rule"?Object.setPrototypeOf(e,QR.prototype):e.type==="decl"?Object.setPrototypeOf(e,Yj.prototype):e.type==="comment"?Object.setPrototypeOf(e,Qj.prototype):e.type==="root"&&Object.setPrototypeOf(e,Jj.prototype),e[Zj]=!0,e.nodes&&e.nodes.forEach(t=>{Fs.rebuild(t)})};let UEe=yl,rB,oB,Hf=class extends UEe{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new rB(new oB,this,t).stringify()}};Hf.registerLazyResult=e=>{rB=e};Hf.registerProcessor=e=>{oB=e};var JR=Hf;Hf.default=Hf;let tI=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 sB=tI;tI.default=tI;let $Ee=sB,nI=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 $Ee(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};var eT=nI;nI.default=nI;const s_=39,g6=34,Tm=92,v6=47,Om=10,zd=32,Mm=12,Pm=9,Nm=13,FEe=91,zEe=93,jEe=40,BEe=41,HEe=123,qEe=125,VEe=59,WEe=42,GEe=58,KEe=64,km=/[\t\n\f\r "#'()/;[\\\]{}]/g,Dm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ZEe=/.[\r\n"'(/\\]/,y6=/[\da-f]/i;var YEe=function(t,n={}){let r=t.css.valueOf(),o=n.ignoreErrors,s,a,u,c,f,h,m,g,v,w,S=r.length,C=0,E=[],I=[];function A(){return C}function T(k){throw t.error("Unclosed "+k,C)}function N(){return I.length===0&&C>=S}function M(k){if(I.length)return I.pop();if(C>=S)return;let L=k?k.ignoreUnclosed:!1;switch(s=r.charCodeAt(C),s){case Om:case zd:case Pm:case Nm:case Mm:{a=C;do a+=1,s=r.charCodeAt(a);while(s===zd||s===Om||s===Pm||s===Nm||s===Mm);w=["space",r.slice(C,a)],C=a-1;break}case FEe:case zEe:case HEe:case qEe:case GEe:case VEe:case BEe:{let q=String.fromCharCode(s);w=[q,q,C];break}case jEe:{if(g=E.length?E.pop()[1]:"",v=r.charCodeAt(C+1),g==="url"&&v!==s_&&v!==g6&&v!==zd&&v!==Om&&v!==Pm&&v!==Mm&&v!==Nm){a=C;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(o||L){a=C;break}else T("bracket");for(m=a;r.charCodeAt(m-1)===Tm;)m-=1,h=!h}while(h);w=["brackets",r.slice(C,a+1),C,a],C=a}else a=r.indexOf(")",C+1),c=r.slice(C,a+1),a===-1||ZEe.test(c)?w=["(","(",C]:(w=["brackets",c,C,a],C=a);break}case s_:case g6:{u=s===s_?"'":'"',a=C;do{if(h=!1,a=r.indexOf(u,a+1),a===-1)if(o||L){a=C+1;break}else T("string");for(m=a;r.charCodeAt(m-1)===Tm;)m-=1,h=!h}while(h);w=["string",r.slice(C,a+1),C,a],C=a;break}case KEe:{km.lastIndex=C+1,km.test(r),km.lastIndex===0?a=r.length-1:a=km.lastIndex-2,w=["at-word",r.slice(C,a+1),C,a],C=a;break}case Tm:{for(a=C,f=!0;r.charCodeAt(a+1)===Tm;)a+=1,f=!f;if(s=r.charCodeAt(a+1),f&&s!==v6&&s!==zd&&s!==Om&&s!==Pm&&s!==Nm&&s!==Mm&&(a+=1,y6.test(r.charAt(a)))){for(;y6.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===zd&&(a+=1)}w=["word",r.slice(C,a+1),C,a],C=a;break}default:{s===v6&&r.charCodeAt(C+1)===WEe?(a=r.indexOf("*/",C+2)+1,a===0&&(o||L?a=r.length:T("comment")),w=["comment",r.slice(C,a+1),C,a],C=a):(Dm.lastIndex=C+1,Dm.test(r),Dm.lastIndex===0?a=r.length-1:a=Dm.lastIndex-2,w=["word",r.slice(C,a+1),C,a],E.push(w),C=a);break}}return C++,w}function R(k){I.push(k)}return{back:R,endOfFile:N,nextToken:M,position:A}};let iB=yl,hv=class extends iB{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 tT=hv;hv.default=hv;iB.registerAtRule(hv);let aB=yl,lB,uB,Ju=class extends aB{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()}};Ju.registerLazyResult=e=>{lB=e};Ju.registerProcessor=e=>{uB=e};var yh=Ju;Ju.default=Ju;aB.registerRoot(Ju);let qf={comma(e){return qf.split(e,[","],!0)},space(e){let t=[" ",`
|
|
153
|
-
`," "];return qf.split(e,t)},split(e,t,n){let r=[],o="",s=!1,a=0,u=!1,c="",f=!1;for(let h of e)f?f=!1:h==="\\"?f=!0:u?h===c&&(u=!1):h==='"'||h==="'"?(u=!0,c=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 cB=qf;qf.default=qf;let dB=yl,QEe=cB,pv=class extends dB{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return QEe.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 nT=pv;pv.default=pv;dB.registerRule(pv);let XEe=Qy,JEe=YEe,e_e=Jy,t_e=tT,n_e=yh,b6=nT;const S6={empty:!0,space:!0};function r_e(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}let o_e=class{constructor(t){this.input=t,this.root=new n_e,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 t_e;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let r,o,s,a=!1,u=!1,c=[],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==="{"){u=!0;break}else if(r==="}"){if(c.length>0){for(s=c.length-1,o=c[s];o&&o[0]==="space";)o=c[--s];o&&(n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++)}this.end(t);break}else c.push(t);else c.push(t);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(c),c.length?(n.raws.afterName=this.spacesAndCommentsFromStart(c),this.raw(n,"params",c),a&&(t=c[c.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=""),u&&(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,u]of t.entries()){if(r=u,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 e_e;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=JEe(this.input)}decl(t,n){let r=new XEe;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]||r_e(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=[],u;for(;t.length&&(u=t[0][0],!(u!=="space"&&u!=="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 b6;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=[],u=t[1].startsWith("--"),c=[],f=t;for(;f;){if(r=f[0],c.push(f),r==="("||r==="[")s||(s=f),a.push(r==="("?")":"]");else if(u&&o&&r==="{")s||(s=f),a.push("}");else if(a.length===0)if(r===";")if(o){this.decl(c,u);return}else break;else if(r==="{"){this.rule(c);return}else if(r==="}"){this.tokenizer.back(c.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(!u)for(;c.length&&(f=c[c.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(c.pop());this.decl(c,u)}else this.unknownWord(c)}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,u=r.length,c="",f=!0,h,m;for(let g=0;g<u;g+=1)s=r[g],a=s[0],a==="space"&&g===u-1&&!o?f=!1:a==="comment"?(m=r[g-1]?r[g-1][0]:"empty",h=r[g+1]?r[g+1][0]:"empty",!S6[m]&&!S6[h]?c.slice(-1)===","?f=!1:c+=s[1]:f=!1):c+=s[1];if(!f){let g=r.reduce((v,w)=>v+w[1],"");t.raws[n]={raw:g,value:c}}t[n]=c}rule(t){t.pop();let n=new b6;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 s_e=o_e;let i_e=yl,a_e=s_e,l_e=Xy;function mv(e,t){let n=new l_e(e,t),r=new a_e(n);try{r.parse()}catch(o){throw o}return r.root}var rT=mv;mv.default=mv;i_e.registerParse(mv);let{isClean:No,my:u_e}=vh,c_e=Gj,d_e=Zy,f_e=yl,h_e=JR,w6=eT,p_e=rT,m_e=yh;const g_e={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},v_e={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},y_e={Once:!0,postcssPlugin:!0,prepare:!0},ec=0;function jd(e){return typeof e=="object"&&typeof e.then=="function"}function fB(e){let t=!1,n=g_e[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,ec,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,ec,n+"Exit"]:[n,n+"Exit"]}function C6(e){let t;return e.type==="document"?t=["Document",ec,"DocumentExit"]:e.type==="root"?t=["Root",ec,"RootExit"]:t=fB(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function rI(e){return e[No]=!1,e.nodes&&e.nodes.forEach(t=>rI(t)),e}let oI={},tc=class hB{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=rI(n);else if(n instanceof hB||n instanceof w6)o=rI(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=p_e;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[u_e]&&f_e.rebuild(o)}this.result=new w6(t,o,r),this.helpers={...oI,postcss:oI,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(!v_e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!y_e[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(jd(r))try{await r}catch(o){throw this.handleError(o)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[No];){t[No]=!0;let n=[C6(t)];for(;n.length>0;){let r=this.visitTick(n);if(jd(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 jd(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=d_e;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let o=new c_e(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(jd(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[No];)t[No]=!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(jd(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,u]=o[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===o.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return u(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(n.iterator!==0){let a=n.iterator,u;for(;u=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!u[No]){u[No]=!0,t.push(C6(u));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===ec){r.nodes&&r.nodes.length&&(r[No]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[No]=!0;let n=fB(t);for(let r of n)if(r===ec)t.nodes&&t.each(o=>{o[No]||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"}};tc.registerPostcss=e=>{oI=e};var pB=tc;tc.default=tc;m_e.registerLazyResult(tc);h_e.registerLazyResult(tc);let b_e=Gj,S_e=Zy,w_e=rT;const C_e=eT;let sI=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=S_e;this.result=new C_e(this._processor,o,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new b_e(s,o,this._opts,n);if(u.isMap()){let[c,f]=u.generate();c&&(this.result.css=c),f&&(this.result.map=f)}else u.clearAnnotation(),this.result.css=u.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=w_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 E_e=sI;sI.default=sI;let __e=E_e,x_e=pB,I_e=JR,A_e=yh,Vf=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 __e(this,t,n):new x_e(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var R_e=Vf;Vf.default=Vf;A_e.registerProcessor(Vf);I_e.registerProcessor(Vf);let T_e=Qy,O_e=Bj,M_e=Jy,P_e=tT,N_e=Xy,k_e=yh,D_e=nT;function Wf(e,t){if(Array.isArray(e))return e.map(o=>Wf(o));let{inputs:n,...r}=e;if(n){t=[];for(let o of n){let s={...o,__proto__:N_e.prototype};s.map&&(s.map={...s.map,__proto__:O_e.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(o=>Wf(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 k_e(r);if(r.type==="decl")return new T_e(r);if(r.type==="rule")return new D_e(r);if(r.type==="comment")return new M_e(r);if(r.type==="atrule")return new P_e(r);throw new Error("Unknown node type: "+e.type)}var L_e=Wf;Wf.default=Wf;let U_e=YR,mB=Qy,$_e=pB,F_e=yl,oT=R_e,z_e=Zy,j_e=L_e,gB=JR,B_e=sB,vB=Jy,yB=tT,H_e=eT,q_e=Xy,V_e=rT,W_e=cB,bB=nT,SB=yh,G_e=Yy;function Et(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new oT(e)}Et.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`),rv.LANG&&rv.LANG.startsWith("cn")&&console.warn(t+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
155
|
-
https://www.w3ctech.com/topic/2226`));let u=n(...a);return u.postcssPlugin=t,u.postcssVersion=new oT().version,u}let s;return Object.defineProperty(o,"postcss",{get(){return s||(s=o()),s}}),o.process=function(a,u,c){return Et([o(c)]).process(a,u)},o};Et.stringify=z_e;Et.parse=V_e;Et.fromJSON=j_e;Et.list=W_e;Et.comment=e=>new vB(e);Et.atRule=e=>new yB(e);Et.decl=e=>new mB(e);Et.rule=e=>new bB(e);Et.root=e=>new SB(e);Et.document=e=>new gB(e);Et.CssSyntaxError=U_e;Et.Declaration=mB;Et.Container=F_e;Et.Processor=oT;Et.Document=gB;Et.Comment=vB;Et.Warning=B_e;Et.AtRule=yB;Et.Result=H_e;Et.Input=q_e;Et.Rule=bB;Et.Root=SB;Et.Node=G_e;$_e.registerPostcss(Et);var K_e=Et;Et.default=Et;const qt=aEe(K_e);qt.stringify;qt.fromJSON;qt.plugin;qt.parse;qt.list;qt.document;qt.comment;qt.atRule;qt.rule;qt.decl;qt.root;qt.CssSyntaxError;qt.Declaration;qt.Container;qt.Processor;qt.Document;qt.Comment;qt.Warning;qt.AtRule;qt.Result;qt.Input;qt.Rule;qt.Root;qt.Node;class sT{constructor(...t){Vr(this,"parentElement",null),Vr(this,"parentNode",null),Vr(this,"ownerDocument"),Vr(this,"firstChild",null),Vr(this,"lastChild",null),Vr(this,"previousSibling",null),Vr(this,"nextSibling",null),Vr(this,"ELEMENT_NODE",1),Vr(this,"TEXT_NODE",3),Vr(this,"nodeType"),Vr(this,"nodeName"),Vr(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 sT){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 E6={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},_6={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Lm={},Z_e=()=>!!globalThis.Zone;function iT(e){if(Lm[e])return Lm[e];const t=globalThis[e],n=t.prototype,r=e in E6?E6[e]:void 0,o=!!(r&&r.every(u=>{var c,f;return!!((f=(c=Object.getOwnPropertyDescriptor(n,u))==null?void 0:c.get)!=null&&f.toString().includes("[native code]"))})),s=e in _6?_6[e]:void 0,a=!!(s&&s.every(u=>{var c;return typeof n[u]=="function"&&((c=n[u])==null?void 0:c.toString().includes("[native code]"))}));if(o&&a&&!Z_e())return Lm[e]=t.prototype,t.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const c=u.contentWindow;if(!c)return t.prototype;const f=c[e].prototype;return document.body.removeChild(u),f?Lm[e]=f:n}catch{return n}}const i_={};function Ws(e,t,n){var r;const o=`${e}.${String(n)}`;if(i_[o])return i_[o].call(t);const s=iT(e),a=(r=Object.getOwnPropertyDescriptor(s,n))==null?void 0:r.get;return a?(i_[o]=a,a.call(t)):t[n]}const a_={};function wB(e,t,n){const r=`${e}.${String(n)}`;if(a_[r])return a_[r].bind(t);const s=iT(e)[n];return typeof s!="function"?t[n]:(a_[r]=s,s.bind(t))}function Y_e(e){return Ws("Node",e,"ownerDocument")}function Q_e(e){return Ws("Node",e,"childNodes")}function X_e(e){return Ws("Node",e,"parentNode")}function J_e(e){return Ws("Node",e,"parentElement")}function exe(e){return Ws("Node",e,"textContent")}function txe(e,t){return wB("Node",e,"contains")(t)}function nxe(e){return wB("Node",e,"getRootNode")()}function rxe(e){return!e||!("host"in e)?null:Ws("ShadowRoot",e,"host")}function oxe(e){return e.styleSheets}function sxe(e){return!e||!("shadowRoot"in e)?null:Ws("Element",e,"shadowRoot")}function ixe(e,t){return Ws("Element",e,"querySelector")(t)}function axe(e,t){return Ws("Element",e,"querySelectorAll")(t)}function CB(){return iT("MutationObserver").constructor}function bl(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 Be={ownerDocument:Y_e,childNodes:Q_e,parentNode:X_e,parentElement:J_e,textContent:exe,contains:txe,getRootNode:nxe,host:rxe,styleSheets:oxe,shadowRoot:sxe,querySelector:ixe,querySelectorAll:axe,mutationObserver:CB,patch:bl};function Gn(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Cu=`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 x6={map:{},getId(){return console.error(Cu),-1},getNode(){return console.error(Cu),null},removeNodeFromMap(){console.error(Cu)},has(){return console.error(Cu),!1},reset(){console.error(Cu)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(x6=new Proxy(x6,{get(e,t,n){return t==="map"&&console.error(Cu),Reflect.get(e,t,n)}}));function Gf(e,t,n={}){let r=null,o=0;return function(...s){const a=Date.now();!o&&n.leading===!1&&(o=a);const u=t-(a-o),c=this;u<=0||u>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(c,s)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,s)},u))}}function eb(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)}}),()=>eb(e,t,s||{},!0)}let gv=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(gv=()=>new Date().getTime());function EB(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=Be.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=Be.parentElement(s.body))==null?void 0:r.scrollTop)||((o=s?.body)==null?void 0:o.scrollTop)||0}}function _B(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function xB(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function IB(e){return e?e.nodeType===e.ELEMENT_NODE?e:Be.parentElement(e):null}function Kn(e,t,n,r){if(!e)return!1;const o=IB(e);if(!o)return!1;try{if(typeof t=="string"){if(o.classList.contains(t)||r&&o.closest("."+t)!==null)return!0}else if(av(o,t,r))return!0}catch{}return!!(n&&(o.matches(n)||r&&o.closest(n)!==null))}function lxe(e,t){return t.getId(e)!==-1}function l_(e,t,n){return e.tagName==="TITLE"&&n.headTitleMutations?!0:t.getId(e)===$f}function AB(e,t){if(hf(e))return!1;const n=t.getId(e);if(!t.has(n))return!0;const r=Be.parentNode(e);return r&&r.nodeType===e.DOCUMENT_NODE?!1:r?AB(r,t):!0}function iI(e){return!!e.changedTouches}function uxe(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 RB(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function TB(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function aI(e){return e?e instanceof sT&&"shadowRoot"in e?!!e.shadowRoot:!!Be.shadowRoot(e):!1}class cxe{constructor(){me(this,"id",1),me(this,"styleIDMap",new WeakMap),me(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 OB(e){var t;let n=null;return"getRootNode"in e&&((t=Be.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Be.host(Be.getRootNode(e))&&(n=Be.host(Be.getRootNode(e))),n}function dxe(e){let t=e,n;for(;n=OB(t);)t=n;return t}function fxe(e){const t=Be.ownerDocument(e);if(!t)return!1;const n=dxe(e);return Be.contains(t,n)}function MB(e){const t=Be.ownerDocument(e);return t?Be.contains(t,e)||fxe(e):!1}var st=(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))(st||{}),Je=(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))(Je||{}),ir=(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))(ir||{}),Ss=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ss||{}),nc=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(nc||{}),Eu=(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))(Eu||{}),PB=(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))(PB||{});function I6(e){return"__ln"in e}class hxe{constructor(){me(this,"length",0),me(this,"head",null),me(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&&I6(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&&I6(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 A6=(e,t)=>`${e}@${t}`;class pxe{constructor(){me(this,"frozen",!1),me(this,"locked",!1),me(this,"texts",[]),me(this,"attributes",[]),me(this,"attributeMap",new WeakMap),me(this,"removes",[]),me(this,"mapRemoves",[]),me(this,"movedMap",{}),me(this,"addedSet",new Set),me(this,"movedSet",new Set),me(this,"droppedSet",new Set),me(this,"removesSubTreeCache",new Set),me(this,"mutationCb"),me(this,"blockClass"),me(this,"blockSelector"),me(this,"maskTextClass"),me(this,"maskTextSelector"),me(this,"inlineStylesheet"),me(this,"maskInputOptions"),me(this,"maskTextFn"),me(this,"maskInputFn"),me(this,"keepIframeSrcFn"),me(this,"recordCanvas"),me(this,"inlineImages"),me(this,"slimDOMOptions"),me(this,"dataURLOptions"),me(this,"doc"),me(this,"mirror"),me(this,"iframeManager"),me(this,"stylesheetManager"),me(this,"shadowDomManager"),me(this,"canvasManager"),me(this,"processedNodeManager"),me(this,"unattachedDoc"),me(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),me(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new hxe,o=c=>{let f=c,h=$f;for(;h===$f;)f=f&&f.nextSibling,h=f&&this.mirror.getId(f);return h},s=c=>{const f=Be.parentNode(c);if(!f||!MB(c))return;let h=!1;if(c.nodeType===Node.TEXT_NODE){const w=f.tagName;if(w==="TEXTAREA")return;w==="STYLE"&&this.addedSet.has(f)&&(h=!0)}const m=hf(f)?this.mirror.getId(OB(c)):this.mirror.getId(f),g=o(c);if(m===-1||g===-1)return r.addNode(c);const v=Ou(c,{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:w=>{RB(w,this.mirror)&&this.iframeManager.addIframe(w),TB(w,this.mirror)&&this.stylesheetManager.trackLinkElement(w),aI(c)&&this.shadowDomManager.addShadowRoot(Be.shadowRoot(c),this.doc)},onIframeLoad:(w,S)=>{this.iframeManager.attachIframe(w,S),this.shadowDomManager.observeAttachShadow(w)},onStylesheetLoad:(w,S)=>{this.stylesheetManager.attachLinkElement(w,S)},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 c of this.movedSet)R6(this.removesSubTreeCache,c,this.mirror)&&!this.movedSet.has(Be.parentNode(c))||s(c);for(const c of this.addedSet)!T6(this.droppedSet,c)&&!R6(this.removesSubTreeCache,c,this.mirror)||T6(this.movedSet,c)?s(c):this.droppedSet.add(c);let a=null;for(;r.length;){let c=null;if(a){const f=this.mirror.getId(Be.parentNode(a.value)),h=o(a.value);f!==-1&&h!==-1&&(c=a)}if(!c){let f=r.tail;for(;f;){const h=f;if(f=f.previous,h){const m=this.mirror.getId(Be.parentNode(h.value));if(o(h.value)===-1)continue;if(m!==-1){c=h;break}else{const v=h.value,w=Be.parentNode(v);if(w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const S=Be.host(w);if(this.mirror.getId(S)!==-1){c=h;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}a=c.previous,r.removeNode(c.value),s(c.value)}const u={texts:this.texts.map(c=>{const f=c.node,h=Be.parentNode(f);return h&&h.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(h),{id:this.mirror.getId(f),value:c.value}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:f}=c;if(typeof f.style=="string"){const h=JSON.stringify(c.styleDiff),m=JSON.stringify(c._unchangedStyles);h.length<f.style.length&&(h+m).split("var(").length===f.style.split("var(").length&&(f.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:f}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.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(u))}),me(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(Be.childNodes(t),o=>Be.textContent(o)||"").join("");n.attributes.value=ov({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:sv(t),value:r,maskInputFn:this.maskInputFn})}),me(this,"processMutation",t=>{if(!l_(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const n=Be.textContent(t.target);!Kn(t.target,this.blockClass,this.blockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:tj(t.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,IB(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=sv(n);o=ov({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:a,value:o,maskInputFn:this.maskInputFn})}if(Kn(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"),!ej(n.tagName,r))if(s.attributes[r]=J7(this.doc,nl(n.tagName),nl(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 u of Array.from(n.style)){const c=n.style.getPropertyValue(u),f=n.style.getPropertyPriority(u);c!==a.style.getPropertyValue(u)||f!==a.style.getPropertyPriority(u)?f===""?s.styleDiff[u]=c:s.styleDiff[u]=[c,f]:s._unchangedStyles[u]=[c,f]}for(const u of Array.from(a.style))n.style.getPropertyValue(u)===""&&(s.styleDiff[u]=!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(Kn(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=hf(t.target)?this.mirror.getId(Be.host(t.target)):this.mirror.getId(t.target);Kn(t.target,this.blockClass,this.blockSelector,!1)||l_(n,this.mirror,this.slimDOMOptions)||!lxe(n,this.mirror)||(this.addedSet.has(n)?(lI(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||AB(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[A6(r,o)]?lI(this.movedSet,n):(this.removes.push({parentId:o,id:r,isShadow:hf(t.target)&&pf(t.target)?!0:void 0}),mxe(n,this.removesSubTreeCache))),this.mapRemoves.push(n))});break}}}),me(this,"genAdds",(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(l_(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[A6(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Kn(t,this.blockClass,this.blockSelector,!1)||(Be.childNodes(t).forEach(r=>this.genAdds(r)),aI(t)&&Be.childNodes(Be.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 lI(e,t){e.delete(t),Be.childNodes(t).forEach(n=>lI(e,n))}function mxe(e,t){const n=[e];for(;n.length;){const r=n.pop();t.has(r)||(t.add(r),Be.childNodes(r).forEach(o=>n.push(o)))}}function R6(e,t,n){return e.size===0?!1:gxe(e,t)}function gxe(e,t,n){const r=Be.parentNode(t);return r?e.has(r):!1}function T6(e,t){return e.size===0?!1:NB(e,t)}function NB(e,t){const n=Be.parentNode(t);return n?e.has(n)?!0:NB(e,n):!1}let mf;function vxe(e){mf=e}function yxe(){mf=void 0}const tt=e=>mf?(...n)=>{try{return e(...n)}catch(r){if(mf&&mf(r)===!0)return;throw r}}:e,Na=[];function bh(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 kB(e,t){const n=new pxe;Na.push(n),n.init(e);const r=new(CB())(tt(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function bxe({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=[],u;const c=Gf(tt(m=>{const g=Date.now()-u;e(a.map(v=>(v.timeOffset-=g,v)),m),a=[],u=null}),s),f=tt(Gf(tt(m=>{const g=bh(m),{clientX:v,clientY:w}=iI(m)?m.changedTouches[0]:m;u||(u=gv()),a.push({x:v,y:w,id:r.getId(g),timeOffset:gv()-u}),c(typeof DragEvent<"u"&&m instanceof DragEvent?Je.Drag:m instanceof MouseEvent?Je.MouseMove:Je.TouchMove)}),o,{trailing:!1})),h=[Gn("mousemove",f,n),Gn("touchmove",f,n),Gn("drag",f,n)];return tt(()=>{h.forEach(m=>m())})}function Sxe({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,u=[];let c=null;const f=h=>m=>{const g=bh(m);if(Kn(g,r,o,!0))return;let v=null,w=h;if("pointerType"in m){switch(m.pointerType){case"mouse":v=Ss.Mouse;break;case"touch":v=Ss.Touch;break;case"pen":v=Ss.Pen;break}v===Ss.Touch?ir[h]===ir.MouseDown?w="TouchStart":ir[h]===ir.MouseUp&&(w="TouchEnd"):Ss.Pen}else iI(m)&&(v=Ss.Touch);v!==null?(c=v,(w.startsWith("Touch")&&v===Ss.Touch||w.startsWith("Mouse")&&v===Ss.Mouse)&&(v=null)):ir[h]===ir.Click&&(v=c,c=null);const S=iI(m)?m.changedTouches[0]:m;if(!S)return;const C=n.getId(g),{clientX:E,clientY:I}=S;tt(e)({type:ir[w],id:C,x:E,y:I,...v!==null&&{pointerType:v}})};return Object.keys(ir).filter(h=>Number.isNaN(Number(h))&&!h.endsWith("_Departed")&&a[h]!==!1).forEach(h=>{let m=nl(h);const g=f(h);if(window.PointerEvent)switch(ir[h]){case ir.MouseDown:case ir.MouseUp:m=m.replace("mouse","pointer");break;case ir.TouchStart:case ir.TouchEnd:return}u.push(Gn(m,g,t))}),tt(()=>{u.forEach(h=>h())})}function DB({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:s}){const a=tt(Gf(tt(u=>{const c=bh(u);if(!c||Kn(c,r,o,!0))return;const f=n.getId(c);if(c===t&&t.defaultView){const h=EB(t.defaultView);e({id:f,x:h.left,y:h.top})}else e({id:f,x:c.scrollLeft,y:c.scrollTop})}),s.scroll||100));return Gn("scroll",a,t)}function wxe({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=tt(Gf(tt(()=>{const s=_B(),a=xB();(n!==s||r!==a)&&(e({width:Number(a),height:Number(s)}),n=s,r=a)}),200));return Gn("resize",o,t)}const Cxe=["INPUT","TEXTAREA","SELECT"],O6=new WeakMap;function Exe({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,ignoreClass:s,ignoreSelector:a,maskInputOptions:u,maskInputFn:c,sampling:f,userTriggeredOnInput:h}){function m(I){let A=bh(I);const T=I.isTrusted,N=A&&A.tagName;if(A&&N==="OPTION"&&(A=Be.parentElement(A)),!A||!N||Cxe.indexOf(N)<0||Kn(A,r,o,!0)||A.classList.contains(s)||a&&A.matches(a))return;let M=A.value,R=!1;const k=sv(A)||"";k==="radio"||k==="checkbox"?R=A.checked:(u[N.toLowerCase()]||u[k])&&(M=ov({element:A,maskInputOptions:u,tagName:N,type:k,value:M,maskInputFn:c})),g(A,h?{text:M,isChecked:R,userTriggered:T}:{text:M,isChecked:R});const L=A.name;k==="radio"&&L&&R&&t.querySelectorAll(`input[type="radio"][name="${L}"]`).forEach(q=>{if(q!==A){const $=q.value;g(q,h?{text:$,isChecked:!R,userTriggered:!1}:{text:$,isChecked:!R})}})}function g(I,A){const T=O6.get(I);if(!T||T.text!==A.text||T.isChecked!==A.isChecked){O6.set(I,A);const N=n.getId(I);tt(e)({...A,id:N})}}const w=(f.input==="last"?["change"]:["input","change"]).map(I=>Gn(I,tt(m),t)),S=t.defaultView;if(!S)return()=>{w.forEach(I=>I())};const C=S.Object.getOwnPropertyDescriptor(S.HTMLInputElement.prototype,"value"),E=[[S.HTMLInputElement.prototype,"value"],[S.HTMLInputElement.prototype,"checked"],[S.HTMLSelectElement.prototype,"value"],[S.HTMLTextAreaElement.prototype,"value"],[S.HTMLSelectElement.prototype,"selectedIndex"],[S.HTMLOptionElement.prototype,"selected"]];return C&&C.set&&w.push(...E.map(I=>eb(I[0],I[1],{set(){tt(m)({target:this,isTrusted:!1})}},!1,S))),tt(()=>{w.forEach(I=>I())})}function vv(e){const t=[];function n(r,o){if(Um("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Um("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Um("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Um("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 Ti(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function _xe({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:tt((h,m,g)=>{const[v,w]=g,{id:S,styleId:C}=Ti(m,t,n.styleMirror);return(S&&S!==-1||C&&C!==-1)&&e({id:S,styleId:C,adds:[{rule:v,index:w}]}),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:tt((h,m,g)=>{const[v]=g,{id:w,styleId:S}=Ti(m,t,n.styleMirror);return(w&&w!==-1||S&&S!==-1)&&e({id:w,styleId:S,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:tt((h,m,g)=>{const[v]=g,{id:w,styleId:S}=Ti(m,t,n.styleMirror);return(w&&w!==-1||S&&S!==-1)&&e({id:w,styleId:S,replace:v}),h.apply(m,g)})}));let u;r.CSSStyleSheet.prototype.replaceSync&&(u=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:tt((h,m,g)=>{const[v]=g,{id:w,styleId:S}=Ti(m,t,n.styleMirror);return(w&&w!==-1||S&&S!==-1)&&e({id:w,styleId:S,replaceSync:v}),h.apply(m,g)})}));const c={};$m("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:($m("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),$m("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),$m("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const f={};return Object.entries(c).forEach(([h,m])=>{f[h]={insertRule:m.prototype.insertRule,deleteRule:m.prototype.deleteRule},m.prototype.insertRule=new Proxy(f[h].insertRule,{apply:tt((g,v,w)=>{const[S,C]=w,{id:E,styleId:I}=Ti(v.parentStyleSheet,t,n.styleMirror);return(E&&E!==-1||I&&I!==-1)&&e({id:E,styleId:I,adds:[{rule:S,index:[...vv(v),C||0]}]}),g.apply(v,w)})}),m.prototype.deleteRule=new Proxy(f[h].deleteRule,{apply:tt((g,v,w)=>{const[S]=w,{id:C,styleId:E}=Ti(v.parentStyleSheet,t,n.styleMirror);return(C&&C!==-1||E&&E!==-1)&&e({id:C,styleId:E,removes:[{index:[...vv(v),S]}]}),g.apply(v,w)})})}),tt(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,a&&(r.CSSStyleSheet.prototype.replace=a),u&&(r.CSSStyleSheet.prototype.replaceSync=u),Object.entries(c).forEach(([h,m])=>{m.prototype.insertRule=f[h].insertRule,m.prototype.deleteRule=f[h].deleteRule})})}function LB({mirror:e,stylesheetManager:t},n){var r,o,s;let a=null;n.nodeName==="#document"?a=e.getId(n):a=e.getId(Be.host(n));const u=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,c=u?.prototype?Object.getOwnPropertyDescriptor(u?.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!u||!c?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var f;return(f=c.get)==null?void 0:f.call(this)},set(f){var h;const m=(h=c.set)==null?void 0:h.call(this,f);if(a!==null&&a!==-1)try{t.adoptStyleSheets(f,a)}catch{}return m}}),tt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function xxe({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:tt((u,c,f)=>{var h;const[m,g,v]=f;if(n.has(m))return s.apply(c,[m,g,v]);const{id:w,styleId:S}=Ti((h=c.parentRule)==null?void 0:h.parentStyleSheet,t,r.styleMirror);return(w&&w!==-1||S&&S!==-1)&&e({id:w,styleId:S,set:{property:m,value:g,priority:v},index:vv(c.parentRule)}),u.apply(c,f)})});const a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:tt((u,c,f)=>{var h;const[m]=f;if(n.has(m))return a.apply(c,[m]);const{id:g,styleId:v}=Ti((h=c.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:vv(c.parentRule)}),u.apply(c,f)})}),tt(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=a})}function Ixe({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:o,doc:s}){const a=tt(c=>Gf(tt(f=>{const h=bh(f);if(!h||Kn(h,t,n,!0))return;const{currentTime:m,volume:g,muted:v,playbackRate:w,loop:S}=h;e({type:c,id:r.getId(h),currentTime:m,volume:g,muted:v,playbackRate:w,loop:S})}),o.media||500)),u=[Gn("play",a(Eu.Play),s),Gn("pause",a(Eu.Pause),s),Gn("seeked",a(Eu.Seeked),s),Gn("volumechange",a(Eu.VolumeChange),s),Gn("ratechange",a(Eu.RateChange),s)];return tt(()=>{u.forEach(c=>c())})}function Axe({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(c,f,h){const m=new s(c,f,h);return o.set(m,{family:c,buffer:typeof f!="string",descriptors:h,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),m};const a=bl(t.fonts,"add",function(u){return function(c){return setTimeout(tt(()=>{const f=o.get(c);f&&(e(f),o.delete(c))}),0),u.apply(this,[c])}});return r.push(()=>{n.FontFace=s}),r.push(a),tt(()=>{r.forEach(u=>u())})}function Rxe(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:s}=e;let a=!0;const u=tt(()=>{const c=t.getSelection();if(!c||a&&c?.isCollapsed)return;a=c.isCollapsed||!1;const f=[],h=c.rangeCount||0;for(let m=0;m<h;m++){const g=c.getRangeAt(m),{startContainer:v,startOffset:w,endContainer:S,endOffset:C}=g;Kn(v,r,o,!0)||Kn(S,r,o,!0)||f.push({start:n.getId(v),startOffset:w,end:n.getId(S),endOffset:C})}s({ranges:f})});return u(),Gn("selectionchange",u)}function Txe({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:bl(n.customElements,"define",function(o){return function(s,a,u){try{t({define:{name:s}})}catch{console.warn(`Custom element callback failed for ${s}`)}return o.apply(this,[s,a,u])}})}function Oxe(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:s,viewportResizeCb:a,inputCb:u,mediaInteractionCb:c,styleSheetRuleCb:f,styleDeclarationCb:h,canvasMutationCb:m,fontCb:g,selectionCb:v,customElementCb:w}=e;e.mutationCb=(...S)=>{t.mutation&&t.mutation(...S),n(...S)},e.mousemoveCb=(...S)=>{t.mousemove&&t.mousemove(...S),r(...S)},e.mouseInteractionCb=(...S)=>{t.mouseInteraction&&t.mouseInteraction(...S),o(...S)},e.scrollCb=(...S)=>{t.scroll&&t.scroll(...S),s(...S)},e.viewportResizeCb=(...S)=>{t.viewportResize&&t.viewportResize(...S),a(...S)},e.inputCb=(...S)=>{t.input&&t.input(...S),u(...S)},e.mediaInteractionCb=(...S)=>{t.mediaInteaction&&t.mediaInteaction(...S),c(...S)},e.styleSheetRuleCb=(...S)=>{t.styleSheetRule&&t.styleSheetRule(...S),f(...S)},e.styleDeclarationCb=(...S)=>{t.styleDeclaration&&t.styleDeclaration(...S),h(...S)},e.canvasMutationCb=(...S)=>{t.canvasMutation&&t.canvasMutation(...S),m(...S)},e.fontCb=(...S)=>{t.font&&t.font(...S),g(...S)},e.selectionCb=(...S)=>{t.selection&&t.selection(...S),v(...S)},e.customElementCb=(...S)=>{t.customElement&&t.customElement(...S),w(...S)}}function Mxe(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};Oxe(e,t);let r;e.recordDOM&&(r=kB(e,e.doc));const o=bxe(e),s=Sxe(e),a=DB(e),u=wxe(e,{win:n}),c=Exe(e),f=Ixe(e);let h=()=>{},m=()=>{},g=()=>{},v=()=>{};e.recordDOM&&(h=_xe(e,{win:n}),m=LB(e,e.doc),g=xxe(e,{win:n}),e.collectFonts&&(v=Axe(e)));const w=Rxe(e),S=Txe(e),C=[];for(const E of e.plugins)C.push(E.observer(E.callback,n,E.options));return tt(()=>{Na.forEach(E=>E.reset()),r?.disconnect(),o(),s(),a(),u(),c(),f(),h(),m(),g(),v(),w(),S(),C.forEach(E=>E())})}function Um(e){return typeof window[e]<"u"}function $m(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class M6{constructor(t){me(this,"iframeIdToRemoteIdMap",new WeakMap),me(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,n,r,o){const s=r||this.getIdToRemoteIdMap(t),a=o||this.getRemoteIdToIdMap(t);let u=s.get(n);return u||(u=this.generateIdFn(),s.set(n,u),a.set(u,n)),u}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 Pxe{constructor(t){me(this,"iframes",new WeakMap),me(this,"crossOriginIframeMap",new WeakMap),me(this,"crossOriginIframeMirror",new M6(X7)),me(this,"crossOriginIframeStyleMirror"),me(this,"crossOriginIframeRootIdMap",new WeakMap),me(this,"mirror"),me(this,"mutationCb"),me(this,"wrappedEmit"),me(this,"loadListener"),me(this,"stylesheetManager"),me(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new M6(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 st.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:st.IncrementalSnapshot,data:{source:Je.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case st.Meta:case st.Load:case st.DomContentLoaded:return!1;case st.Plugin:return n;case st.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case st.IncrementalSnapshot:switch(n.data.source){case Je.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 Je.Drag:case Je.TouchMove:case Je.MouseMove:return n.data.positions.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case Je.ViewportResize:return!1;case Je.MediaInteraction:case Je.MouseInteraction:case Je.Scroll:case Je.CanvasMutation:case Je.Input:return this.replaceIds(n.data,t,["id"]),n;case Je.StyleSheetRule:case Je.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case Je.Font:return n;case Je.Selection:return n.data.ranges.forEach(o=>{this.replaceIds(o,t,["start","end"])}),n;case Je.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!==PB.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class Nxe{constructor(t){me(this,"shadowDoms",new WeakSet),me(this,"mutationCb"),me(this,"scrollCb"),me(this,"bypassOptions"),me(this,"mirror"),me(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(!pf(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const r=kB({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(DB({...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(Be.host(t))),this.restoreHandlers.push(LB({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(bl(t.prototype,"attachShadow",function(o){return function(s){const a=o.call(this,s),u=Be.shadowRoot(this);return u&&MB(this)&&r.addShadowRoot(u,n),a}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Mu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kxe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Fm=0;Fm<Mu.length;Fm++)kxe[Mu.charCodeAt(Fm)]=Fm;var Dxe=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=Mu[t[n]>>2],o+=Mu[(t[n]&3)<<4|t[n+1]>>4],o+=Mu[(t[n+1]&15)<<2|t[n+2]>>6],o+=Mu[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 P6=new Map;function Lxe(e,t){let n=P6.get(e);return n||(n=new Map,P6.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const UB=(e,t,n)=>{if(!e||!(FB(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=Lxe(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function wg(e,t,n){if(e instanceof Array)return e.map(r=>wg(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=Dxe(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[wg(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:[wg(e.data,t,n),e.width,e.height]};if(FB(e,t)||typeof e=="object"){const r=e.constructor.name,o=UB(e,t,n);return{rr_type:r,index:o}}}}return e}const $B=(e,t,n)=>e.map(r=>wg(r,t,n)),FB=(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 Uxe(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 u=bl(t.CanvasRenderingContext2D.prototype,a,function(c){return function(...f){return Kn(this.canvas,n,r,!0)||setTimeout(()=>{const h=$B(f,t,this);e(this.canvas,{type:nc["2D"],property:a,args:h})},0),c.apply(this,f)}});o.push(u)}catch{const u=eb(t.CanvasRenderingContext2D.prototype,a,{set(c){e(this.canvas,{type:nc["2D"],property:a,args:[c],setter:!0})}});o.push(u)}return()=>{o.forEach(a=>a())}}function $xe(e){return e==="experimental-webgl"?"webgl":e}function N6(e,t,n,r){const o=[];try{const s=bl(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...c){if(!Kn(this,t,n,!0)){const f=$xe(u);if("__context"in this||(this.__context=f),r&&["webgl","webgl2"].includes(f))if(c[0]&&typeof c[0]=="object"){const h=c[0];h.preserveDrawingBuffer||(h.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[u,...c])}});o.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(s=>s())}}function k6(e,t,n,r,o,s){const a=[],u=Object.getOwnPropertyNames(e);for(const c of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof e[c]!="function")continue;const f=bl(e,c,function(h){return function(...m){const g=h.apply(this,m);if(UB(g,s,this),"tagName"in this.canvas&&!Kn(this.canvas,r,o,!0)){const v=$B(m,s,this),w={type:t,property:c,args:v};n(this.canvas,w)}return g}});a.push(f)}catch{const f=eb(e,c,{set(h){n(this.canvas,{type:t,property:c,args:[h],setter:!0})}});a.push(f)}return a}function Fxe(e,t,n,r){const o=[];return o.push(...k6(t.WebGLRenderingContext.prototype,nc.WebGL,e,n,r,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...k6(t.WebGL2RenderingContext.prototype,nc.WebGL2,e,n,r,t)),()=>{o.forEach(s=>s())}}const zB="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",zxe=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),D6=typeof window<"u"&&window.Blob&&new Blob([zxe(zB)],{type:"text/javascript;charset=utf-8"});function jxe(e){let t;try{if(t=D6&&(window.URL||window.webkitURL).createObjectURL(D6),!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,"+zB,{name:e?.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Bxe{constructor(t){me(this,"pendingCanvasMutations",new Map),me(this,"rafStamps",{latestId:0,invokeId:null}),me(this,"mirror"),me(this,"mutationCb"),me(this,"resetObservers"),me(this,"frozen",!1),me(this,"locked",!1),me(this,"processMutation",(c,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(f)});const{sampling:n="all",win:r,blockClass:o,blockSelector:s,recordCanvas:a,dataURLOptions:u}=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:u})}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=N6(n,r,o,!0),u=new Map,c=new jxe;c.onmessage=w=>{const{id:S}=w.data;if(u.set(S,!1),!("base64"in w.data))return;const{base64:C,type:E,width:I,height:A}=w.data;this.mutationCb({id:S,type:nc["2D"],commands:[{property:"clearRect",args:[0,0,I,A]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:C}],type:E}]},0,0]}]})};const f=1e3/t;let h=0,m;const g=()=>{const w=[];return n.document.querySelectorAll("canvas").forEach(S=>{Kn(S,r,o,!0)||w.push(S)}),w},v=w=>{if(h&&w-h<f){m=requestAnimationFrame(v);return}h=w,g().forEach(async S=>{var C;const E=this.mirror.getId(S);if(u.get(E)||S.width===0||S.height===0)return;if(u.set(E,!0),["webgl","webgl2"].includes(S.__context)){const A=S.getContext(S.__context);((C=A?.getContextAttributes())==null?void 0:C.preserveDrawingBuffer)===!1&&A.clear(A.COLOR_BUFFER_BIT)}const I=await createImageBitmap(S);c.postMessage({id:E,bitmap:I,width:S.width,height:S.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=N6(t,n,r,!1),s=Uxe(this.processMutation.bind(this),t,n,r),a=Fxe(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:u,...c}=a;return c}),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}class Hxe{constructor(t){me(this,"trackedLinkElements",new WeakSet),me(this,"mutationCb"),me(this,"adoptedStyleSheetCb"),me(this,"styleMirror",new cxe),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,(u,c)=>({rule:Z7(u,s.href),index:c}))})),r.styleIds.push(a)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class qxe{constructor(){me(this,"nodeMap",new WeakMap),me(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 en,Cg,u_,yv=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(($U=e.contentWindow)==null?void 0:$U.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const uo=WSe();function Sh(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:u=null,maskTextClass:c="rr-mask",maskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:v,maskInputFn:w,maskTextFn:S,hooks:C,packFn:E,sampling:I={},dataURLOptions:A={},mousemoveWait:T,recordDOM:N=!0,recordCanvas:M=!1,recordCrossOriginIframes:R=!1,recordAfter:k=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:L=!1,collectFonts:q=!1,inlineImages:$=!1,plugins:D,keepIframeSrcFn:j=()=>!1,ignoreCSSAttributes:Z=new Set([]),errorHandler:he}=e;vxe(he);const B=R?window.parent===window:!0;let Q=!1;if(!B)try{window.parent.document&&(Q=!1)}catch{Q=!0}if(B&&!t)throw new Error("emit function is required");if(!B&&!Q)return()=>{};T!==void 0&&I.mousemove===void 0&&(I.mousemove=T),uo.reset();const ae=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},ue=nj(v);uxe();let Ce,U=0;const X=ve=>{for(const pt of D||[])pt.eventProcessor&&(ve=pt.eventProcessor(ve));return E&&!Q&&(ve=E(ve)),ve};en=(ve,pt)=>{var mt;const Ye=ve;if(Ye.timestamp=gv(),(mt=Na[0])!=null&&mt.isFrozen()&&Ye.type!==st.FullSnapshot&&!(Ye.type===st.IncrementalSnapshot&&Ye.data.source===Je.Mutation)&&Na.forEach(mn=>mn.unfreeze()),B)t?.(X(Ye),pt);else if(Q){const mn={type:"rrweb",event:X(Ye),origin:window.location.origin,isCheckout:pt};window.parent.postMessage(mn,"*")}if(Ye.type===st.FullSnapshot)Ce=Ye,U=0;else if(Ye.type===st.IncrementalSnapshot){if(Ye.data.source===Je.Mutation&&Ye.data.isAttachIframe)return;U++;const mn=r&&U>=r,Qe=n&&Ye.timestamp-Ce.timestamp>n;(mn||Qe)&&Cg(!0)}};const ie=ve=>{en({type:st.IncrementalSnapshot,data:{source:Je.Mutation,...ve}})},oe=ve=>en({type:st.IncrementalSnapshot,data:{source:Je.Scroll,...ve}}),fe=ve=>en({type:st.IncrementalSnapshot,data:{source:Je.CanvasMutation,...ve}}),Me=ve=>en({type:st.IncrementalSnapshot,data:{source:Je.AdoptedStyleSheet,...ve}}),Ae=new Hxe({mutationCb:ie,adoptedStyleSheetCb:Me}),se=new Pxe({mirror:uo,mutationCb:ie,stylesheetManager:Ae,recordCrossOriginIframes:R,wrappedEmit:en});for(const ve of D||[])ve.getMirror&&ve.getMirror({nodeMirror:uo,crossOriginIframeMirror:se.crossOriginIframeMirror,crossOriginIframeStyleMirror:se.crossOriginIframeStyleMirror});const we=new qxe;u_=new Bxe({recordCanvas:M,mutationCb:fe,win:window,blockClass:o,blockSelector:s,mirror:uo,sampling:I.canvas,dataURLOptions:A});const Ze=new Nxe({mutationCb:ie,scrollCb:oe,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:f,inlineStylesheet:h,maskInputOptions:ae,dataURLOptions:A,maskTextFn:S,maskInputFn:w,recordCanvas:M,inlineImages:$,sampling:I,slimDOMOptions:ue,iframeManager:se,stylesheetManager:Ae,canvasManager:u_,keepIframeSrcFn:j,processedNodeManager:we},mirror:uo});Cg=(ve=!1)=>{if(!N)return;en({type:st.Meta,data:{href:window.location.href,width:xB(),height:_B()}},ve),Ae.reset(),Ze.init(),Na.forEach(mt=>mt.lock());const pt=gwe(document,{mirror:uo,blockClass:o,blockSelector:s,maskTextClass:c,maskTextSelector:f,inlineStylesheet:h,maskAllInputs:ae,maskTextFn:S,maskInputFn:w,slimDOM:ue,dataURLOptions:A,recordCanvas:M,inlineImages:$,onSerialize:mt=>{RB(mt,uo)&&se.addIframe(mt),TB(mt,uo)&&Ae.trackLinkElement(mt),aI(mt)&&Ze.addShadowRoot(Be.shadowRoot(mt),document)},onIframeLoad:(mt,Ye)=>{se.attachIframe(mt,Ye),Ze.observeAttachShadow(mt)},onStylesheetLoad:(mt,Ye)=>{Ae.attachLinkElement(mt,Ye)},keepIframeSrcFn:j});if(!pt)return console.warn("Failed to snapshot the document");en({type:st.FullSnapshot,data:{node:pt,initialOffset:EB(window)}},ve),Na.forEach(mt=>mt.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ae.adoptStyleSheets(document.adoptedStyleSheets,uo.getId(document))};try{const ve=[],pt=Ye=>{var mn;return tt(Mxe)({mutationCb:ie,mousemoveCb:(Qe,Ks)=>en({type:st.IncrementalSnapshot,data:{source:Ks,positions:Qe}}),mouseInteractionCb:Qe=>en({type:st.IncrementalSnapshot,data:{source:Je.MouseInteraction,...Qe}}),scrollCb:oe,viewportResizeCb:Qe=>en({type:st.IncrementalSnapshot,data:{source:Je.ViewportResize,...Qe}}),inputCb:Qe=>en({type:st.IncrementalSnapshot,data:{source:Je.Input,...Qe}}),mediaInteractionCb:Qe=>en({type:st.IncrementalSnapshot,data:{source:Je.MediaInteraction,...Qe}}),styleSheetRuleCb:Qe=>en({type:st.IncrementalSnapshot,data:{source:Je.StyleSheetRule,...Qe}}),styleDeclarationCb:Qe=>en({type:st.IncrementalSnapshot,data:{source:Je.StyleDeclaration,...Qe}}),canvasMutationCb:fe,fontCb:Qe=>en({type:st.IncrementalSnapshot,data:{source:Je.Font,...Qe}}),selectionCb:Qe=>{en({type:st.IncrementalSnapshot,data:{source:Je.Selection,...Qe}})},customElementCb:Qe=>{en({type:st.IncrementalSnapshot,data:{source:Je.CustomElement,...Qe}})},blockClass:o,ignoreClass:a,ignoreSelector:u,maskTextClass:c,maskTextSelector:f,maskInputOptions:ae,inlineStylesheet:h,sampling:I,recordDOM:N,recordCanvas:M,inlineImages:$,userTriggeredOnInput:L,collectFonts:q,doc:Ye,maskInputFn:w,maskTextFn:S,keepIframeSrcFn:j,blockSelector:s,slimDOMOptions:ue,dataURLOptions:A,mirror:uo,iframeManager:se,stylesheetManager:Ae,shadowDomManager:Ze,processedNodeManager:we,canvasManager:u_,ignoreCSSAttributes:Z,plugins:((mn=D?.filter(Qe=>Qe.observer))==null?void 0:mn.map(Qe=>({observer:Qe.observer,options:Qe.options,callback:Ks=>en({type:st.Plugin,data:{plugin:Qe.name,payload:Ks}})})))||[]},C)};se.addLoadListener(Ye=>{try{ve.push(pt(Ye.contentDocument))}catch(mn){console.warn(mn)}});const mt=()=>{Cg(),ve.push(pt(document)),yv=!0};return["interactive","complete"].includes(document.readyState)?mt():(ve.push(Gn("DOMContentLoaded",()=>{en({type:st.DomContentLoaded,data:{}}),k==="DOMContentLoaded"&&mt()})),ve.push(Gn("load",()=>{en({type:st.Load,data:{}}),k==="load"&&mt()},window))),()=>{ve.forEach(Ye=>{try{Ye()}catch(mn){String(mn).toLowerCase().includes("cross-origin")||console.warn(mn)}}),we.destroy(),yv=!1,yxe()}}catch(ve){console.warn(ve)}}Sh.addCustomEvent=(e,t)=>{if(!yv)throw new Error("please add custom event after start recording");en({type:st.Custom,data:{tag:e,payload:t}})};Sh.freezePage=()=>{Na.forEach(e=>e.freeze())};Sh.takeFullSnapshot=e=>{if(!yv)throw new Error("please take full snapshot after start recording");Cg(e)};Sh.mirror=uo;var L6;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(L6||(L6={}));const Vxe="rrweb",Wxe={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},Gxe={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},U6=Gxe;class Kxe extends no{constructor(t){super(Vxe),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({},U6.recordOptions),t?.recordOptions),Wxe);this.config=Object.assign(Object.assign(Object.assign({},U6),t),{recordOptions:n}),pe.info("RRWebPlugin initialized",{additionalSampleRate:this.config.additionalSampleRate,batchSize:this.config.batchSize,flushInterval:this.config.flushInterval})}enable(){var t;if(this.enabled){pe.info("RRWebPlugin already enabled");return}const n=(t=this.context)===null||t===void 0?void 0:t.getSession();if(!n||!n.record){pe.warn("RRWebPlugin skipping - session not being recorded",{hasSession:!!n,sessionRecord:n?.record});return}const r=Math.random();if(r>this.config.additionalSampleRate){pe.warn("RRWebPlugin skipping - session replay additionalSampleRate",{randomValue:r,samplingRate:this.config.additionalSampleRate});return}this.enabled=!0,pe.info("RRWebPlugin enabled - starting recording"),this.startRecording()}disable(){if(!this.enabled){pe.info("RRWebPlugin already disabled");return}pe.info("RRWebPlugin disabled - stopping recording"),this.enabled=!1,this.stopCurrentRecording()}record(t){const n=t?.action;n==="start"?(pe.info("RRWebPlugin manual start recording"),this.startRecording()):n==="stop"&&(pe.info("RRWebPlugin manual stop recording"),this.stopCurrentRecording())}onload(){}startRecording(){this.recordingStartTime=Date.now(),this.recordingEvents=[],this.isRecording=!0,pe.info("RRWebPlugin starting rrweb recording",{startTime:this.recordingStartTime});const t=Sh(Object.assign(Object.assign({},this.config.recordOptions),{emit:this.handleRRWebEvent.bind(this)}));t?(this.stopRecording=t,pe.info("RRWebPlugin rrweb recording initialized successfully")):pe.warn("RRWebPlugin failed to initialize rrweb recording"),this.flushTimer=window.setInterval(()=>{this.flush()},this.config.flushInterval)}stopCurrentRecording(){if(!this.isRecording){pe.info("RRWebPlugin stopCurrentRecording called but not recording");return}pe.info("RRWebPlugin stopping current recording"),this.isRecording=!1,this.stopRecording&&(this.stopRecording(),this.stopRecording=null,pe.info("RRWebPlugin rrweb recording stopped")),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null,pe.info("RRWebPlugin flush timer cleared")),this.flush()}handleRRWebEvent(t){this.isRecording&&(this.recordingEvents.push(t),this.recordingEvents.length>=this.config.batchSize&&(pe.info("RRWebPlugin flushing events due to batch size",{eventCount:this.recordingEvents.length,batchSize:this.config.batchSize}),this.flush()))}flush(){if(this.recordingEvents.length===0){pe.info("RRWebPlugin flushEvent called but no events to flush");return}pe.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(CU,n),pe.info("RRWebPlugin events sent to RUM",{eventType:CU,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}}var Zxe=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},uI;(function(e){e.Path="PATH",e.Hash="HASH",e.PathAndHash="PATH_AND_HASH"})(uI||(uI={}));const jB="us-west-2",cI=`https://dataplane.rum.${jB}.amazonaws.com`,BB=()=>({unique:!1,domain:window.location.hostname,path:"/",sameSite:"Strict",secure:!0}),HB=e=>({allowCookies:!1,batchLimit:100,client:b0e,compressionStrategy:{enabled:!0},cookieAttributes:e,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:cI,endpointUrl:new URL(cI),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:uI.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 Yxe=class{constructor(t,n,r,o={}){var{cookieAttributes:s}=o,a=Zxe(o,["cookieAttributes"]);this.eventBus=new N7,typeof r>"u"&&(r="us-west-2"),this.applicationId=t;const u=Object.assign(Object.assign({},BB()),s);this.config=Object.assign(Object.assign({fetchFunction:fetch},HB(u)),a),this.config.sessionId&&(this.config.suppressSessionStartEvent=!0),this.config.endpoint=a.endpoint?a.endpoint:cI.replace(jB,r),this.config.endpointUrl=new URL(this.config.endpoint),pe.configure(this.config.debug),pe.info("Initialized RUM Slim"),this.eventCache=new O1e({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;[Qg,Xg,Zu,`${Qg}_${this.applicationId}`,`${Xg}_${this.applicationId}`,`${Zu}_${this.applicationId}`].forEach(r=>C1e(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 S0e(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 w1e(r);return this.config.disableAutoPageView||o.addPlugin(new K1e),this.config.eventPluginsToLoad.forEach(s=>{o.addPlugin(s)}),o}};var go;(function(e){e.Errors="errors",e.Performance="performance",e.Interaction="interaction",e.Http="http",e.Replay="replay"})(go||(go={}));var $6;(function(e){e.Path="PATH",e.Hash="HASH",e.PathAndHash="PATH_AND_HASH"})($6||($6={}));const Qxe=e=>Object.assign(Object.assign({},HB(e)),{signing:!0,telemetries:[go.Errors,go.Performance,go.Http,go.Replay]});class Xxe extends Yxe{constructor(t,n,r,o={}){super(t,n,r,Object.assign(Object.assign({},Qxe(BB())),o)),pe.info(`RUM client initialized for app: ${t}`),pe.info(`Telemetries enabled: ${this.config.telemetries.join(", ")||"none"}`)}initDispatch(t,n){const r=super.initDispatch(t,n);return r.setSigningConfigFactory(Z0e),r.setCognitoCredentialProviderFactory((o,s,a,u)=>{const c={identityPoolId:a,guestRoleArn:u,cookieAttributes:o.cookieAttributes};return a&&u?new d1e(c,s).ChainAnonymousCredentialsProvider:new f1e(c,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(L7,t)}registerDomEvents(t){this.pluginManager.updatePlugin(k7,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{[go.Errors]:t=>[new j1e(t)],[go.Performance]:t=>[new q1e(t),new Y1e(t),new gSe(t)],[go.Interaction]:t=>[new AR(t)],[go.Http]:t=>[new wSe(t),new ySe(t)],[go.Replay]:t=>[new Kxe(t)]}}}const qB={recordPageView:()=>{},recordError:()=>{},recordEvent:()=>{},recordTiming:()=>{}},Jxe=/([?&](token|access_token|id_token|authorization)=[^&]*)|\/messages\/[a-z0-9_-]+/gi,eIe=/\/reset-password\/[^/?#\s]+/gi;function VB(e){return e.replace(Jxe,"[redacted]").replace(eIe,"/reset-password/[redacted]")}function tIe(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 VB(e.slice(0,r))}function nIe(e){const t=VB(e.message);if(t===e.message)return e;const n=new Error(t);return n.name=e.name,n.stack=e.stack,n}function rIe(e){return{recordPageView(t){e.recordPageView(tIe(t))},recordError(t,n){e.recordError(nIe(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 F6(e){return e instanceof Error?e:new Error(String(e))}function oIe(e){window.addEventListener("error",t=>{e.recordError(F6(t.error??t.message))}),window.addEventListener("unhandledrejection",t=>{e.recordError(F6(t.reason))})}function sIe(){const{appMonitorId:e,identityPoolId:t,region:n}=vc().rum;if(!e)return qB;const r=new Xxe(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=rIe(r);return oIe(o),o}const iIe="remit.stale-build-reload:",aIe=({reload:e,guard:t,commit:n})=>{if(t===null)return!1;const r=`${iIe}${n}`;return t.getItem(r)!==null?!1:(t.setItem(r,String(Date.now())),e(),!0)},lIe=()=>{window.addEventListener("vite:preloadError",e=>{aIe({reload:()=>window.location.reload(),guard:tA(),commit:Xv})&&e.preventDefault()})},WB=_.createContext(qB);function t8e(){return _.useContext(WB)}const dI="remit.theme",uIe="dark";function z6(){return typeof localStorage>"u"?"system":localStorage.getItem(dI)??"system"}function fI(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(uIe,t)}function n8e(e){typeof localStorage<"u"&&(e==="system"?localStorage.removeItem(dI):localStorage.setItem(dI,e)),fI(e)}const cIe=()=>{if(typeof window>"u"||(fI(z6()),typeof window.matchMedia!="function"))return;const e=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{fI(z6())};typeof e.addEventListener=="function"?e.addEventListener("change",t):e.addListener(t)},dIe=e=>e==="true"||e==="false"||e==="null"||/^["[{]/.test(e)||e!==""&&Number.isFinite(Number(e));function j6(e){return typeof e=="object"&&e!==null?JSON.stringify(e):typeof e=="string"?dIe(e)?JSON.stringify(e):e:String(e)}function fIe(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,j6(s));continue}t.set(r,j6(o))}}const n=t.toString();return n===""?"":`?${n}`}const hIe=(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);Ha(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...o):console?.warn&&console.warn(...o)},B6={},hI=(e,t,n,r)=>{Ha(n)&&B6[n]||(Ha(n)&&(B6[n]=new Date),hIe(e,t,n,r))},GB=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},pI=(e,t,n)=>{e.loadNamespaces(t,GB(e,n))},H6=(e,t,n,r)=>{if(Ha(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return pI(e,n,r);n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,GB(e,r))},pIe=(e,t,n={})=>!t.languages||!t.languages.length?(hI(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}}),Ha=e=>typeof e=="string",mIe=e=>typeof e=="object"&&e!==null,gIe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,vIe={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},yIe=e=>vIe[e],bIe=e=>e.replace(gIe,yIe);let mI={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:bIe};const SIe=(e={})=>{mI={...mI,...e}},wIe=()=>mI;let KB;const CIe=e=>{KB=e},EIe=()=>KB,_Ie={type:"3rdParty",init(e){SIe(e.options.react),CIe(e)}},xIe=_.createContext();class IIe{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const AIe=(e,t)=>{const n=_.useRef();return _.useEffect(()=>{n.current=e},[e,t]),n.current},ZB=(e,t,n,r)=>e.getFixedT(t,n,r),RIe=(e,t,n,r)=>_.useCallback(ZB(e,t,n,r),[e,t,n,r]),YB=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:o}=_.useContext(xIe)||{},s=n||r||EIe();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new IIe),!s){hI(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const T=(M,R)=>Ha(R)?R:mIe(R)&&Ha(R.defaultValue)?R.defaultValue:Array.isArray(M)?M[M.length-1]:M,N=[T,{},!1];return N.t=T,N.i18n={},N.ready=!1,N}s.options.react?.wait&&hI(s,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...wIe(),...s.options.react,...t},{useSuspense:u,keyPrefix:c}=a;let f=e||o||s.options?.defaultNS;f=Ha(f)?[f]:f||["translation"],s.reportNamespaces.addUsedNamespaces?.(f);const h=(s.isInitialized||s.initializedStoreOnce)&&f.every(T=>pIe(T,s,a)),m=RIe(s,t.lng||null,a.nsMode==="fallback"?f:f[0],c),g=()=>m,v=()=>ZB(s,t.lng||null,a.nsMode==="fallback"?f:f[0],c),[w,S]=_.useState(g);let C=f.join();t.lng&&(C=`${t.lng}${C}`);const E=AIe(C),I=_.useRef(!0);_.useEffect(()=>{const{bindI18n:T,bindI18nStore:N}=a;I.current=!0,!h&&!u&&(t.lng?H6(s,t.lng,f,()=>{I.current&&S(v)}):pI(s,f,()=>{I.current&&S(v)})),h&&E&&E!==C&&I.current&&S(v);const M=()=>{I.current&&S(v)};return T&&s?.on(T,M),N&&s?.store.on(N,M),()=>{I.current=!1,s&&T&&T?.split(" ").forEach(R=>s.off(R,M)),N&&s&&N.split(" ").forEach(R=>s.store.off(R,M))}},[s,C]),_.useEffect(()=>{I.current&&h&&S(g)},[s,c,h]);const A=[w,s,h];if(A.t=w,A.i18n=s,A.ready=h,h||!h&&!u)return A;throw new Promise(T=>{t.lng?H6(s,t.lng,f,()=>T()):pI(s,f,()=>T())})},TIe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts",...e,headers:{"Content-Type":"application/json",...e.headers}}),OIe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/oauth/microsoft/start",...e,headers:{"Content-Type":"application/json",...e.headers}}),MIe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/test-connection",...e,headers:{"Content-Type":"application/json",...e.headers}}),PIe=e=>(e.client??le).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...e}),NIe=e=>(e.client??le).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),kIe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...e}),DIe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...e,headers:{"Content-Type":"application/json",...e.headers}}),LIe=e=>(e.client??le).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...e}),UIe=e=>(e.client??le).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),$Ie=e=>(e.client??le).put({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/folder-roles/{role}",...e,headers:{"Content-Type":"application/json",...e.headers}}),r8e=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels",...e}),FIe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels",...e,headers:{"Content-Type":"application/json",...e.headers}}),zIe=e=>(e.client??le).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels/{labelId}",...e}),jIe=e=>(e.client??le).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels/{labelId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),BIe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...e}),HIe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...e,headers:{"Content-Type":"application/json",...e.headers}}),o8e=e=>(e.client??le).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...e}),qIe=e=>(e.client??le).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),VIe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize",...e,headers:{"Content-Type":"application/json",...e.headers}}),WIe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/preview",...e,headers:{"Content-Type":"application/json",...e.headers}}),GIe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/{organizeJobId}",...e}),KIe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync",...e}),ZIe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync/status",...e}),YIe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/trash/empty",...e}),QIe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/search",...e}),XIe=e=>(e.client??le).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/{addressId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),JIe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events",...e}),eAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events",...e,headers:{"Content-Type":"application/json",...e.headers}}),tAe=e=>(e.client??le).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events/{calendarObjectId}",...e}),nAe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events/{calendarObjectId}",...e}),rAe=e=>(e.client??le).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events/{calendarObjectId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),oAe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-free-busy",...e}),sAe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions",...e}),iAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions/{suggestionId}/accept",...e,headers:{"Content-Type":"application/json",...e.headers}}),aAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions/{suggestionId}/decline",...e}),lAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions/{suggestionId}/dismiss",...e,headers:{"Content-Type":"application/json",...e.headers}}),uAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions/{suggestionId}/reopen",...e}),cAe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks",...e}),dAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks",...e,headers:{"Content-Type":"application/json",...e.headers}}),fAe=e=>(e.client??le).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks/{calendarTaskId}",...e}),hAe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks/{calendarTaskId}",...e}),pAe=e=>(e.client??le).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks/{calendarTaskId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),mAe=e=>(e?.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars",...e}),gAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars",...e,headers:{"Content-Type":"application/json",...e.headers}}),vAe=e=>(e.client??le).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}",...e}),yAe=e=>(e.client??le).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),bAe=e=>(e.client??le).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}/feed",...e}),SAe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}/feed",...e}),wAe=e=>(e.client??le).put({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}/feed",...e}),CAe=e=>(e?.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config",...e}),EAe=e=>(e?.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config/export",...e}),_Ae=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/config/import",...e,headers:{"Content-Type":"application/json",...e.headers}}),s8e=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads",...e}),xAe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads/search",...e}),IAe=e=>(e.client??le).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/me",...e,headers:{"Content-Type":"application/json",...e.headers}}),AAe=e=>(e?.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/me/export",...e}),RAe=e=>(e?.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/quarantine",...e}),TAe=e=>(e?.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/vip-suggestions",...e}),OAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/delete",...e,headers:{"Content-Type":"application/json",...e.headers}}),MAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/flags",...e,headers:{"Content-Type":"application/json",...e.headers}}),PAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/labels",...e,headers:{"Content-Type":"application/json",...e.headers}}),NAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/move",...e,headers:{"Content-Type":"application/json",...e.headers}}),i8e=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/not-spam",...e,headers:{"Content-Type":"application/json",...e.headers}}),a8e=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/report-spam",...e,headers:{"Content-Type":"application/json",...e.headers}}),kAe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}",...e}),DAe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/calendar-suggestions",...e}),LAe=e=>(e.client??le).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/flags",...e,headers:{"Content-Type":"application/json",...e.headers}}),UAe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/raw",...e}),$Ae=e=>(e?.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...e}),FAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...e,headers:{"Content-Type":"application/json",...e.headers}}),zAe=e=>(e.client??le).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...e}),jAe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...e}),BAe=e=>(e.client??le).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),HAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/attachments",...e,headers:{"Content-Type":"application/json",...e.headers}}),qAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/attachments/{outboxAttachmentId}/complete",...e}),VAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/send",...e}),WAe=e=>(e?.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/people",...e}),l8e=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/people/step-up",...e,headers:{"Content-Type":"application/json",...e.headers}}),u8e=e=>(e.client??le).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/people/{userId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),c8e=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/people/{userId}/password-reset",...e,headers:{"Content-Type":"application/json",...e.headers}}),d8e=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/people/{userId}/sign-out",...e,headers:{"Content-Type":"application/json",...e.headers}}),GAe=e=>(e?.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/settings",...e}),KAe=e=>(e.client??le).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/settings",...e,headers:{"Content-Type":"application/json",...e.headers}}),ZAe=e=>(e?.client??le).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/settings/classification-provider",...e}),YAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/settings/classification-test",...e,headers:{"Content-Type":"application/json",...e.headers}}),QB=e=>(e?.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/system/update",...e}),QAe=e=>(e.client??le).post({security:[{name:"Authorization",type:"apiKey"}],url:"/system/update",...e,headers:{"Content-Type":"application/json",...e.headers}}),XAe=e=>(e?.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads",...e}),JAe=e=>(e.client??le).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads/{threadId}/messages",...e}),f8e=e=>({mutationFn:async n=>{const{data:r}=await TIe({...e,...n,throwOnError:!0});return r}}),ht=(e,t,n,r)=>{const o={_id:e,baseUrl:t?.baseUrl||(t?.client??le).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]},h8e=e=>({mutationFn:async n=>{const{data:r}=await OIe({...e,...n,throwOnError:!0});return r}}),p8e=e=>({mutationFn:async n=>{const{data:r}=await MIe({...e,...n,throwOnError:!0});return r}}),m8e=e=>({mutationFn:async n=>{const{data:r}=await PIe({...e,...n,throwOnError:!0});return r}}),g8e=e=>({mutationFn:async n=>{const{data:r}=await NIe({...e,...n,throwOnError:!0});return r}}),eRe=e=>ht("filterOperationsListFilters",e),v8e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await kIe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:eRe(e)}),y8e=e=>({mutationFn:async n=>{const{data:r}=await DIe({...e,...n,throwOnError:!0});return r}}),b8e=e=>({mutationFn:async n=>{const{data:r}=await LIe({...e,...n,throwOnError:!0});return r}}),S8e=e=>ht("filterDetailOperationsGetFilter",e),w8e=e=>({mutationFn:async n=>{const{data:r}=await UIe({...e,...n,throwOnError:!0});return r}}),tRe=e=>({mutationFn:async n=>{const{data:r}=await $Ie({...e,...n,throwOnError:!0});return r}}),C8e=e=>ht("labelOperationsListLabels",e),E8e=e=>({mutationFn:async n=>{const{data:r}=await FIe({...e,...n,throwOnError:!0});return r}}),_8e=e=>({mutationFn:async n=>{const{data:r}=await zIe({...e,...n,throwOnError:!0});return r}}),x8e=e=>({mutationFn:async n=>{const{data:r}=await jIe({...e,...n,throwOnError:!0});return r}}),aT=e=>ht("mailboxOperationsListMailboxes",e),gI=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await BIe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:aT(e)}),nRe=e=>({mutationFn:async n=>{const{data:r}=await HIe({...e,...n,throwOnError:!0});return r}}),I8e=e=>({mutationFn:async n=>{const{data:r}=await qIe({...e,...n,throwOnError:!0});return r}}),A8e=e=>({mutationFn:async n=>{const{data:r}=await VIe({...e,...n,throwOnError:!0});return r}}),R8e=e=>({mutationFn:async n=>{const{data:r}=await WIe({...e,...n,throwOnError:!0});return r}}),rRe=e=>ht("organizeJobDetailOperationsGetOrganizeJob",e),T8e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await GIe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:rRe(e)}),O8e=e=>({mutationFn:async n=>{const{data:r}=await KIe({...e,...n,throwOnError:!0});return r}}),oRe=e=>ht("syncOperationsGetSyncStatus",e),M8e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await ZIe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:oRe(e)}),P8e=e=>({mutationFn:async n=>{const{data:r}=await YIe({...e,...n,throwOnError:!0});return r}}),sRe=e=>ht("addressOperationsSearchAddresses",e),N8e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await QIe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:sRe(e)}),k8e=e=>({mutationFn:async n=>{const{data:r}=await XIe({...e,...n,throwOnError:!0});return r}}),iRe=e=>ht("calendarEventOperationsListCalendarEvents",e),D8e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await JIe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:iRe(e)}),L8e=e=>({mutationFn:async n=>{const{data:r}=await eAe({...e,...n,throwOnError:!0});return r}}),U8e=e=>({mutationFn:async n=>{const{data:r}=await tAe({...e,...n,throwOnError:!0});return r}}),aRe=e=>ht("calendarEventDetailOperationsGetCalendarEvent",e),$8e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await nAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:aRe(e)}),F8e=e=>({mutationFn:async n=>{const{data:r}=await rAe({...e,...n,throwOnError:!0});return r}}),lRe=e=>ht("calendarFreeBusyOperationsListCalendarFreeBusy",e),z8e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await oAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:lRe(e)}),uRe=e=>ht("calendarSuggestionOperationsListCalendarSuggestions",e),j8e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await sAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:uRe(e)}),B8e=e=>({mutationFn:async n=>{const{data:r}=await iAe({...e,...n,throwOnError:!0});return r}}),H8e=e=>({mutationFn:async n=>{const{data:r}=await aAe({...e,...n,throwOnError:!0});return r}}),q8e=e=>({mutationFn:async n=>{const{data:r}=await lAe({...e,...n,throwOnError:!0});return r}}),V8e=e=>({mutationFn:async n=>{const{data:r}=await uAe({...e,...n,throwOnError:!0});return r}}),cRe=e=>ht("calendarTaskOperationsListCalendarTasks",e),W8e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await cAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:cRe(e)}),G8e=e=>({mutationFn:async n=>{const{data:r}=await dAe({...e,...n,throwOnError:!0});return r}}),K8e=e=>({mutationFn:async n=>{const{data:r}=await fAe({...e,...n,throwOnError:!0});return r}}),dRe=e=>ht("calendarTaskDetailOperationsGetCalendarTask",e),Z8e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await hAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:dRe(e)}),Y8e=e=>({mutationFn:async n=>{const{data:r}=await pAe({...e,...n,throwOnError:!0});return r}}),fRe=e=>ht("calendarOperationsListCalendars",e),Q8e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await mAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:fRe(e)}),X8e=e=>({mutationFn:async n=>{const{data:r}=await gAe({...e,...n,throwOnError:!0});return r}}),J8e=e=>({mutationFn:async n=>{const{data:r}=await vAe({...e,...n,throwOnError:!0});return r}}),e$e=e=>({mutationFn:async n=>{const{data:r}=await yAe({...e,...n,throwOnError:!0});return r}}),t$e=e=>({mutationFn:async n=>{const{data:r}=await bAe({...e,...n,throwOnError:!0});return r}}),hRe=e=>ht("calendarDetailOperationsGetCalendarFeed",e),n$e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await SAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:hRe(e)}),r$e=e=>({mutationFn:async n=>{const{data:r}=await wAe({...e,...n,throwOnError:!0});return r}}),XB=e=>ht("configOperationsGetConfig",e),lT=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await CAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:XB(e)}),pRe=e=>ht("configOperationsExportConfig",e),o$e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await EAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:pRe(e)}),s$e=e=>({mutationFn:async n=>{const{data:r}=await _Ae({...e,...n,throwOnError:!0});return r}}),mRe=e=>ht("threadOperationsListThreads",e),JB=e=>ht("threadOperationsSearchThreads",e),i$e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await xAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:JB(e)}),a$e=e=>({mutationFn:async n=>{const{data:r}=await IAe({...e,...n,throwOnError:!0});return r}}),l$e=e=>({mutationFn:async n=>{const{data:r}=await AAe({...e,...n,throwOnError:!0});return r}}),gRe=e=>ht("meOperationsListQuarantine",e),vRe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await RAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:gRe(e)}),yRe=e=>ht("meOperationsListVipSuggestions",e),u$e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await TAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:yRe(e)}),c$e=e=>({mutationFn:async n=>{const{data:r}=await OAe({...e,...n,throwOnError:!0});return r}}),d$e=e=>({mutationFn:async n=>{const{data:r}=await MAe({...e,...n,throwOnError:!0});return r}}),f$e=e=>({mutationFn:async n=>{const{data:r}=await PAe({...e,...n,throwOnError:!0});return r}}),h$e=e=>({mutationFn:async n=>{const{data:r}=await NAe({...e,...n,throwOnError:!0});return r}}),bRe=e=>ht("messageOperationsDescribeMessage",e),p$e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await kAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:bRe(e)}),SRe=e=>ht("messageCalendarSuggestionOperationsListMessageCalendarSuggestions",e),m$e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await DAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:SRe(e)}),g$e=e=>({mutationFn:async n=>{const{data:r}=await LAe({...e,...n,throwOnError:!0});return r}}),wRe=e=>ht("messageOperationsGetRawMessage",e),v$e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await UAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:wRe(e)}),eH=e=>ht("outboxOperationsListOutboxMessages",e),y$e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await $Ae({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:eH(e)}),b$e=e=>({mutationFn:async n=>{const{data:r}=await FAe({...e,...n,throwOnError:!0});return r}}),S$e=e=>({mutationFn:async n=>{const{data:r}=await zAe({...e,...n,throwOnError:!0});return r}}),CRe=e=>ht("outboxDetailOperationsGetOutboxMessage",e),ERe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await jAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:CRe(e)}),w$e=e=>({mutationFn:async n=>{const{data:r}=await BAe({...e,...n,throwOnError:!0});return r}}),C$e=e=>({mutationFn:async n=>{const{data:r}=await HAe({...e,...n,throwOnError:!0});return r}}),E$e=e=>({mutationFn:async n=>{const{data:r}=await qAe({...e,...n,throwOnError:!0});return r}}),_$e=e=>({mutationFn:async n=>{const{data:r}=await VAe({...e,...n,throwOnError:!0});return r}}),_Re=e=>ht("peopleOperationsListPeople",e),xRe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await WAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:_Re(e)}),IRe=e=>ht("userSettingsOperationsGetUserSettings",e),x$e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await GAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:IRe(e)}),I$e=e=>({mutationFn:async n=>{const{data:r}=await KAe({...e,...n,throwOnError:!0});return r}}),A$e=e=>({mutationFn:async n=>{const{data:r}=await ZAe({...e,...n,throwOnError:!0});return r}}),R$e=e=>({mutationFn:async n=>{const{data:r}=await YAe({...e,...n,throwOnError:!0});return r}}),vI=e=>ht("systemOperationsGetSystemUpdate",e),ARe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await QB({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:vI(e)}),RRe=e=>({mutationFn:async n=>{const{data:r}=await QAe({...e,...n,throwOnError:!0});return r}}),tH=e=>ht("unifiedThreadOperationsListAllThreads",e),TRe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await XAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:tH(e)}),ORe=e=>ht("threadDetailOperationsListThreadMessages",e),T$e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await JAe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:ORe(e)}),nH=_.createContext(void 0),MRe=2e3,PRe=6e4,NRe=e=>e==="unfiled"||e==="failed"||e==="blocked",kRe=oy(404),q6=(e,t)=>NRe(e)||t!=null,DRe=({children:e})=>{const[t,n]=_.useState(),r=hl(),{data:o,error:s}=tl({...ERe({path:{outboxMessageId:t??""}}),enabled:!!t,meta:kRe,retry:(g,v)=>!OF(v)&&g<1,refetchInterval:g=>q6(g.state.data?.status,g.state.error)?!1:MRe}),a=_.useCallback(()=>{n(void 0),r.invalidateQueries({queryKey:eH()})},[r]);_.useEffect(()=>{t&&q6(o?.status,s)&&a()},[o,s,t,a]),_.useEffect(()=>{if(!t)return;const g=setTimeout(a,PRe);return()=>clearTimeout(g)},[t,a]);const u=_.useCallback(g=>{n(g)},[]),c=_.useRef(new Map),f=_.useCallback((g,v)=>{const w=c.current.get(g);return w?(w(v),!0):!1},[]),h=_.useCallback((g,v)=>(c.current.set(g,v),()=>{c.current.get(g)===v&&c.current.delete(g)}),[]),m=_.useMemo(()=>({startSendPolling:u,insertIntoOpenReply:f,registerOpenReply:h}),[u,f,h]);return O.jsx(nH.Provider,{value:m,children:e})},O$e=()=>{const e=_.useContext(nH);if(!e)throw new Error("useCompose must be used within a ComposeProvider");return e};function yI(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 V6(e,t="|"){return e.map(n=>lH(n)).join(t)}function bI(e,t){return typeof t=="bigint"?t.toString():t}class LRe{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 uT(e){return new LRe(e)}function URe(e){return e==null}function cT(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function $Re(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}function Ji(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function rH(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function zs(e){return rH(e._zod.def)??e._zod.def.shape}function oH(e,t,n){Object.defineProperty(e,t,{get(){const r=n();return Ji(this,t,r),r},enumerable:!0,configurable:!0})}function sH(e,t,n){t in e?Ji(e,t,n):e[t]=n}function rl(e,t,n,r){const o=zs(t);for(const s of n){const a=Object.getOwnPropertyDescriptor(o,s);a.enumerable&&(a.get?oH(e,s,()=>{const u=t._zod.def.shape[s];return r?r(u,s):u}):sH(e,s,r?r(a.value,s):a.value))}}function FRe(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?oH(e,n,()=>t[n]):sH(e,n,r.value))}}function Tr(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function zRe(e){return JSON.stringify(e)}function jRe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const iH="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function bv(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const BRe=uT(()=>{if(wo.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function rc(e){if(bv(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(bv(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function aH(e){return rc(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const HRe=new Set(["string","number","symbol"]);function oc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ea(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Ie(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 lH(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function qRe(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const uH={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]},VRe={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function WRe(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 rl(s,e,tb(e,t)),ea(e,Tr(n,{shape:s,checks:[]}))}function tb(e,t){const n=zs(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 GRe(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(tb(e,t)),a={};return rl(a,e,Reflect.ownKeys(zs(e)).filter(u=>!s.has(u))),ea(e,Tr(n,{shape:a,checks:[]}))}function KRe(e,t){if(!rc(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=zs(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 ea(e,Tr(e._zod.def,{shape:cH(e,t)}))}function cH(e,t){const n={};return rl(n,e,Reflect.ownKeys(zs(e))),FRe(n,t),n}function ZRe(e,t){if(!rc(t))throw new Error("Invalid input to safeExtend: expected a plain object");return ea(e,Tr(e._zod.def,{shape:cH(e,t)}))}function YRe(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={};rl(n,e,Reflect.ownKeys(zs(e))),rl(n,t,Reflect.ownKeys(zs(t)));const r=Tr(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ea(e,r)}function W6(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 u=n?new Set(tb(t,n)):void 0,c={};return rl(c,t,Reflect.ownKeys(zs(t)),e&&((f,h)=>u&&!u.has(h)?f:new e({type:"optional",innerType:f}))),ea(t,Tr(t._zod.def,{shape:c,checks:[]}))}function QRe(e,t,n){const r=n?new Set(tb(t,n)):void 0,o={};return rl(o,t,Reflect.ownKeys(zs(t)),(s,a)=>r&&!r.has(a)?s:new e({type:"nonoptional",innerType:s})),ea(t,Tr(t._zod.def,{shape:o}))}function Rs(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 XRe(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 Pu(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Bd(e){return typeof e=="string"?e:e?.message}function G6(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 SI(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function Ki(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:Bd(e.inst?._zod.def?.error?.(e))??Bd(s?.(e))??Bd(t?.error?.(e))??Bd(n.customError?.(e))??Bd(n.localeError?.(e))??"Invalid input",u={};for(const c of Object.keys(e))c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__"||(u[c]=e[c]);return u.path??(u.path=[]),u.message=a,t?.reportInput&&(u.input=e.input),u}const JRe=/[\uD800-\uDBFF]/;function dT(e){const t=e.length;if(!JRe.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 fT(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function eTe(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 Kf(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function tTe(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):nTe(e,n,r.value)}}function Zi(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function dH(e,t,n){return Zi(e,t,n,!1)}function fH(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Zi(this,n,r(this))},set(o){Zi(this,n,o)}})}return t}function nTe(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Zi(this,t,n.bind(this))},set(r){Zi(this,t,r)}})}function rTe(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let c_,Ii=!1;const oTe={configurable:!0,get(){Ii=!0}};function gt(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&c_!==e._zod){c_=void 0;return}c_=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,oTe);const o=Ii;Ii=!1;try{const s=n(this);return Ii?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:s}),Ii=Ii||o,s}catch(s){throw delete this[t],Ii=Ii||o,s}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function sTe(e,t,n,r){const o=rTe(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 iTe="~constantCatch";function aTe(e){const t=()=>e;return t[iTe]=!0,t}var K6;const d_={value:void 0,enumerable:!1};let Z6="captureStackTrace"in Error?Error:null;function lTe(e){const t=Z6;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return Z6=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function te(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,u=a&&new WeakSet;function c(g,v){if(g._zod){if(g._zod.traits.has(e))return}else{d_.value=new s(v);try{Object.defineProperty(g,"_zod",d_)}finally{d_.value=void 0}}if(g._zod.traits.add(e),t(g,v),u){const S=Object.getPrototypeOf(g),C=g._zod.constr.prototype;let E=S;for(;E&&E!==C;)E=Object.getPrototypeOf(E);const I=E??S;u.has(I)||(u.add(I),tTe(I,a))}const w=m.prototype;for(const S in w)Object.prototype.hasOwnProperty.call(w,S)&&(S in g||(g[S]=w[S].bind(g)))}const f=r?.Parent??Object;class h extends f{}Object.defineProperty(h,"name",{value:e});function m(g){const v=r?.Parent?lTe(h):this;c(v,g);const w=v._zod.deferred;if(w){for(const C of w)C();v._zod.deferred=void 0}const S=globalThis.__zod_globalConfig?.postProcessor;return S&&S(v),v}return Object.defineProperty(m,"init",{value:c}),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 qa extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class hH extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(K6=globalThis).__zod_globalConfig??(K6.__zod_globalConfig={});const wo=globalThis.__zod_globalConfig;function Vo(e){return e&&Object.assign(wo,e),wo}function uTe(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,bI,2)),e.message}function cTe(e){this._zod.message=e}const dTe={get:uTe,set:cTe,enumerable:!0,configurable:!0},f_={value:void 0,enumerable:!1},Y6=new WeakSet([Object.prototype,Error.prototype]),pH=(e,t)=>{e.name="$ZodError",f_.value=t,Object.defineProperty(e,"issues",f_),f_.value=void 0,Object.defineProperty(e,"message",dTe);const n=Object.getPrototypeOf(e);Y6.has(n)||(Y6.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})}}))},fTe=te("$ZodError",pH),mH=te("$ZodError",pH,void 0,{Parent:Error});function hTe(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 pTe(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?hTe(n,o.path[0],()=>[]).push(t(o)):r.push(t(o));return{formErrors:r,fieldErrors:n}}function mTe(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(u=>r({issues:u},[...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 u=[...s,...a.path];if(u.length===0)n._errors.push(t(a));else{let c=n,f=0;for(;f<u.length;){const h=u[f],m=f===u.length-1;if(h==="_errors"){m&&c._errors.push(t(a)),f++;continue}Object.prototype.hasOwnProperty.call(c,h)||Object.defineProperty(c,h,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const g=c[h];m&&g._errors.push(t(a)),c=g,f++}}}};return r(e),n}function nb(e,t){return{callee:t?.callee??e,Err:t?.Err}}const rb=e=>{const t=(n,r,o,s)=>{const a=o?{...o,async:!1}:{async:!1},u=n._zod.run({value:r,issues:[]},a);if(u instanceof Promise)throw new qa;if(u.issues.length){const c=new(s?.Err??e)(u.issues.map(f=>Ki(f,a,Vo())));throw iH(c,s?.callee??t),c}return u.value};return t},M$e=rb(mH),ob=e=>{const t=async(n,r,o,s)=>{const a=o?{...o,async:!0}:{async:!0};let u=n._zod.run({value:r,issues:[]},a);if(u instanceof Promise&&(u=await u),u.issues.length){const c=new(s?.Err??e)(u.issues.map(f=>Ki(f,a,Vo())));throw iH(c,s?.callee??t),c}return u.value};return t},P$e=ob(mH),hT=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 qa;return s.issues.length?gH(e,s.issues,o):{success:!0,data:s.value}};function gH(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(o=>Ki(o,n,Vo()))),t=void 0,n=void 0),r},set error(o){r=o,t=void 0,n=void 0}}}const pT=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?gH(e,s.issues,o):{success:!0,data:s.value}},gTe=Symbol.for("zod.compile.invalid"),vTe=Symbol.for("zod.compile.fallback"),yTe=((e,t,n)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==gTe)return!0;if(r.definite===!0&&n===void 0)return!1}return bTe(e,t,n)});function bTe(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[vTe]=!0,s=o({value:t,issues:[]},r)):s=e._zod.run({value:t,issues:[]},r),s instanceof Promise)throw new qa;return s.issues.length===0}const STe=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},wTe=e=>{const t=rb(e),n=(r,o,s,a)=>{const u=s?{...s,direction:"backward"}:{direction:"backward"};return t(r,o,u,nb(n,a))};return n},CTe=e=>{const t=rb(e),n=(r,o,s,a)=>t(r,o,s,nb(n,a));return n},ETe=e=>{const t=ob(e),n=async(r,o,s,a)=>{const u=s?{...s,direction:"backward"}:{direction:"backward"};return await t(r,o,u,nb(n,a))};return n},_Te=e=>{const t=ob(e),n=async(r,o,s,a)=>await t(r,o,s,nb(n,a));return n},xTe=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return hT(e)(t,n,o)},ITe=e=>(t,n,r)=>hT(e)(t,n,r),ATe=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return pT(e)(t,n,o)},RTe=e=>async(t,n,r)=>pT(e)(t,n,r),TTe=/^[cC][0-9a-z]{6,}$/,OTe=/^[0-9a-z]+$/,MTe=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,PTe=/^[0-9a-vA-V]{20}$/,NTe=/^[A-Za-z0-9]{27}$/,kTe=/^[a-zA-Z0-9_-]{21}$/;function DTe(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const LTe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,UTe=/^([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})$/,Q6=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)$/,$Te=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,FTe="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function zTe(){return new RegExp(FTe,"u")}const jTe=/^(?:(?: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])$/,BTe=/^(([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}|:))$/,HTe=/^((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])$/,qTe=/^(([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])$/,VTe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,WTe=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,GTe=/^https?$/,KTe=/^\+[1-9]\d{6,14}$/,vH="(?:(?:\\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 ZTe(e){return new RegExp(`^${e}$`)}const YTe=ZTe(vH);function wI(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 QTe(e){return new RegExp(`^${wI(e)}$`)}function XTe(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${wI({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${wI({precision:e.precision})}`:n;return new RegExp(`^${vH}T(?:${r})$`)}const JTe=/^[\s\S]{0,}$/,eOe=/^-?\d+$/,mT=/^-?\d+(?:\.\d+)?$/,tOe=/^(?:true|false)$/i,nOe=/^[^A-Z]*$/,rOe=/^[^a-z]*$/,vr=te("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),gT=e=>{const t=e.value;return!URe(t)&&t.length!==void 0},Sv={number:"number",bigint:"bigint",object:"date"},yH=te("$ZodCheckLessThan",(e,t)=>{vr.init(e,t);const n=Sv[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Sv[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})}}),bH=te("$ZodCheckGreaterThan",(e,t)=>{vr.init(e,t);const n=Sv[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Sv[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})}}),oOe=te("$ZodCheckMultipleOf",(e,t)=>{vr.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):$Re(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})}}),sOe=te("$ZodCheckNumberFormat",(e,t)=>{vr.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=uH[t.format];e._zod.check=a=>{const u=a.value;if(n){if(!Number.isInteger(u)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?a.issues.push({input:u,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:u,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}}u<o&&a.issues.push({origin:"number",input:u,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),u>s&&a.issues.push({origin:"number",input:u,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),iOe=te("$ZodCheckMaxLength",(e,t)=>{var n;vr.init(e,t),(n=e._zod.def).when??(n.when=gT),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>t.maximum?dT(o):s)<=t.maximum)return;const u=fT(o);r.issues.push({origin:u,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),aOe=te("$ZodCheckMinLength",(e,t)=>{var n;vr.init(e,t),(n=e._zod.def).when??(n.when=gT),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>=t.minimum&&s<t.minimum*2?dT(o):s)>=t.minimum)return;const u=fT(o);r.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),lOe=te("$ZodCheckLengthEquals",(e,t)=>{var n;vr.init(e,t),(n=e._zod.def).when??(n.when=gT),e._zod.check=r=>{const o=r.value,s=o.length,a=typeof o=="string"&&s>=t.length&&s<=t.length*2?dT(o):s;if(a===t.length)return;const u=fT(o),c=a>t.length;r.issues.push({origin:u,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),sb=te("$ZodCheckStringFormat",(e,t)=>{var n,r;vr.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=()=>{})}),uOe=te("$ZodCheckRegex",(e,t)=>{sb.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})}}),cOe=te("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=nOe),sb.init(e,t)}),dOe=te("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=rOe),sb.init(e,t)}),fOe=te("$ZodCheckIncludes",(e,t)=>{vr.init(e,t);const n=oc(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})}}),hOe=te("$ZodCheckStartsWith",(e,t)=>{vr.init(e,t);const n=new RegExp(`^${oc(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})}}),pOe=te("$ZodCheckEndsWith",(e,t)=>{vr.init(e,t);const n=new RegExp(`.*${oc(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})}}),mOe=te("$ZodCheckOverwrite",(e,t)=>{vr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class gOe{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 vOe={major:4,minor:6,patch:7},Zt=te("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=vOe;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=(u,c,f)=>{if(u.memo)return u;let h=Rs(u),m;for(const g of c){if(g._zod.def.when){if(XRe(u)||!g._zod.def.when(u))continue}else if(h)continue;const v=u.issues.length,w=g._zod.check(u);if(w instanceof Promise&&f?.async===!1)throw new qa;if(m||w instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await w,u.issues.length!==v&&(SI(u.issues,v,e),h||(h=Rs(u,v)))});else{if(u.issues.length===v)continue;SI(u.issues,v,e),h||(h=Rs(u,v))}}return m?m.then(()=>u):u},a=(u,c,f)=>{if(Rs(u))return u.aborted=!0,u;const h=s(c,o,f);if(h instanceof Promise){if(f.async===!1)throw new qa;return h.then(m=>e._zod.parse(m,f))}return e._zod.parse(h,f)};e._zod.run=(u,c)=>{if(c.skipChecks)return e._zod.parse(u,c);if(c.direction==="backward"){const h=e._zod.parse({value:u.value,issues:[]},{...c,skipChecks:!0});return h instanceof Promise?h.then(m=>a(m,u,c)):a(h,u,c)}const f=e._zod.parse(u,c);if(f instanceof Promise){if(c.async===!1)throw new qa;return f.then(h=>s(h,o,c))}return s(f,o,c)}}},{get"~standard"(){return dH(this,"~standard",wH(this))},set"~standard"(e){Zi(this,"~standard",e)}}),SH=(e,t)=>e.issues.length?{issues:e.issues.map(n=>Ki(n,t,Vo()))}:{value:e.value};async function yOe(e,t){const n={async:!0};return SH(await e._zod.run({value:t,issues:[]},n),n)}function wH(e){return{validate:t=>{const n={async:!1};try{const r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return SH(r,n)}catch{}return yOe(e,t)},vendor:"zod",version:1}}const vT=te("$ZodString",(e,t)=>{Zt.init(e,t),e._zod.pattern=t.pattern??JTe,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}}),Vt=te("$ZodStringFormat",(e,t)=>{sb.init(e,t),vT.init(e,t)}),bOe=te("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=UTe),Vt.init(e,t)}),SOe=te("$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=Q6(r))}else t.pattern??(t.pattern=Q6());Vt.init(e,t)}),wOe=te("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=$Te),Vt.init(e,t)}),CH=1,wv=2;function EH(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function COe(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?EH(e)||wv:EOe(e,t)}function EOe(e,t){if(!t.normalize&&t.protocol?.source===GTe.source&&!/^https?:\/\//i.test(e))return CH;try{if(typeof URL<"u"){const n=URL;if(typeof n.parse=="function")return n.parse(e)??wv}return new URL(e)}catch{return wv}}const _Oe=/[\t\n\r]/g;function X6(e){return e.replace(_Oe,"")}function xOe(e,t){return t.lastIndex=0,t.test(e.hostname)}function IOe(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const AOe=te("$ZodURL",(e,t)=>{Vt.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=COe(r,t);if(o===CH){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}if(o===wv){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});return}if(o===!0){n.value=X6(r);return}t.hostname&&!xOe(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&&!IOe(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:X6(r);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),ROe=te("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=zTe()),Vt.init(e,t)}),TOe=te("$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?kTe:DTe(t.length)),Vt.init(e,t)}),OOe=te("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=TTe),Vt.init(e,t)}),MOe=te("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=OTe),Vt.init(e,t)}),POe=te("$ZodULID",(e,t)=>{t.pattern??(t.pattern=MTe),Vt.init(e,t)}),NOe=te("$ZodXID",(e,t)=>{t.pattern??(t.pattern=PTe),Vt.init(e,t)}),kOe=te("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=NTe),Vt.init(e,t)}),DOe=te("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=XTe(t)),Vt.init(e,t)}),LOe=te("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=YTe),Vt.init(e,t)}),UOe=te("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=QTe(t)),Vt.init(e,t)}),$Oe=te("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=LTe),Vt.init(e,t)}),FOe=te("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=jTe),Vt.init(e,t)}),zOe=/^[0-9a-fA-F:.]+$/;function _H(e){return zOe.test(e)?EH(`http://[${e}]`):!1}const jOe=te("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=BTe),Vt.init(e,t),e._zod.check=n=>{_H(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),BOe=te("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=HTe),Vt.init(e,t)});function HOe(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:_H(n)}const qOe=te("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=qTe),Vt.init(e,t),e._zod.check=n=>{HOe(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function xH(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const IH=/^[0-9a-zA-Z+/]*={0,2}$/,VOe=te("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=IH),Vt.init(e,t),e._zod.check=n=>{xH(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),yT=/^[A-Za-z0-9_-]*$/;function WOe(e){if(!yT.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return xH(n)}const GOe=te("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=yT),Vt.init(e,t),e._zod.check=n=>{WOe(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),KOe=te("$ZodE164",(e,t)=>{t.pattern??(t.pattern=KTe),Vt.init(e,t)});function ZOe(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 YOe=te("$ZodJWT",(e,t)=>{Vt.init(e,t),e._zod.check=n=>{ZOe(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),AH=te("$ZodNumber",(e,t)=>{Zt.init(e,t),e._zod.pattern=mT,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}}),QOe=te("$ZodNumberFormat",(e,t)=>{sOe.init(e,t),AH.init(e,t)}),XOe=te("$ZodBoolean",(e,t)=>{Zt.init(e,t),e._zod.pattern=tOe,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}}),JOe=te("$ZodUnknown",(e,t)=>{Zt.init(e,t),e._zod.parse=n=>n}),e2e=te("$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 t2e(e,t){const n=G6(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 u=t(s.value);if(u>r&&!a?.skipChecks&&a?.direction!=="backward"){for(const[c,f]of G6(e._zod.def.checks))if(u>c&&f._zod.def.when(s)){const h=s.issues.length;return f._zod.check(s),s.issues[h].continue=!1,SI(s.issues,h,e),s}}return o(s,a)}}const n2e=e=>Array.isArray(e)?e.length:-1;function J6(e,t,n){e.issues.length&&t.issues.push(...Pu(n,e.issues)),t.value[n]=e.value}const r2e=te("$ZodArray",(e,t)=>{Zt.init(e,t);const n=wo.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=[],u=o?.abortEarly;for(let c=0;c<s.length;c++){const f=s[c],h=t.element._zod.run({value:f,issues:[]},o);if(h instanceof Promise)a.push(h.then(m=>J6(m,r,c)));else if(J6(h,r,c),u&&h.issues.length!==0&&Rs(h))break}return a.length?Promise.all(a).then(()=>r):r},t2e(e,n2e)});function Cv(e,t,n,r,o,s){const a=n in r,u=s==="optional";if(!(!a&&u&&o==="optional")){if(e.issues.length){if(o!==void 0&&u&&!a)return;t.issues.push(...Pu(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"&&!u)&&(t.value[n]=void 0):t.value[n]=e.value}}const o2e=[];function RH(e){const t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:o2e,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=qRe(e.shape);return{...e,allKeys:o,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(s)}}function TH(e,t,n,r,o,s,a){const u=[],c=o.keySet,f=o.catchall._zod,h=f.def.type,m=f.optin,g=f.optout;let v=0;for(const w in t){if(a&&n.issues.length!==v){if(Rs(n,v))break;v=n.issues.length}if(c.has(w))continue;if(w==="__proto__"){h==="never"&&u.push(w);continue}if(h==="never"){u.push(w);continue}const S=f.run({value:t[w],issues:[]},r);S instanceof Promise?e.push(S.then(C=>Cv(C,n,w,t,m,g))):Cv(S,n,w,t,m,g)}return u.length&&n.issues.push({code:"unrecognized_keys",keys:u,input:t,inst:s,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const s2e=te("$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=uT(()=>RH(t));gt(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)||Ji(m,g,new Set);for(const w of v.values)m[g].add(w);v.optin!==void 0&&m[g].add(void 0)}}return m});const s=bv,a=t.catchall;let u;const c=wo.memoizer;c?.attach(e),e._zod.parse=(f,h)=>{u??(u=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=c?c.alloc(e,f,{},h):{};const g=[],v=u.shape,w=h?.abortEarly;let S=f.issues.length;for(const C of u.allKeys){if(w&&f.issues.length!==S){if(Rs(f,S))break;S=f.issues.length}if(C==="__proto__")continue;const E=v[C],I=E._zod.optin,A=E._zod.optout,T=E._zod.run({value:m[C],issues:[]},h);T instanceof Promise?g.push(T.then(N=>Cv(N,f,C,m,I,A))):Cv(T,f,C,m,I,A)}return a?TH(g,m,f,h,o.value,e,w===!0):g.length?Promise.all(g).then(()=>f):f}}),i2e=te("$ZodObjectJIT",(e,t)=>{s2e.init(e,t);const n=e._zod.parse,r=uT(()=>RH(t)),o=wo.memoizer,s=v=>{const w=r.value,S=w.symbolKeys,C=new gOe(["payload","ctx"],{shape:v,inst:e,memo:o,syms:S}),E=N=>`shape[${N}]._zod.run({ value: input[${N}], issues: [] }, ctx)`,I=(N,M)=>`
|
|
162
|
-
let ${N}_ab = false;
|
|
163
|
-
for (let i = 0; i < ${N}.issues.length; i++) {
|
|
164
|
-
const iss = ${N}.issues[i];
|
|
165
|
-
iss.path = iss.path ? [${M}, ...iss.path] : [${M}];
|
|
166
|
-
payload.issues.push(iss);
|
|
167
|
-
if (iss.continue !== true) ${N}_ab = true;
|
|
168
|
-
}
|
|
169
|
-
if (${N}_ab && ctx && ctx.abortEarly) {
|
|
170
|
-
payload.value = newResult;
|
|
171
|
-
return payload;
|
|
172
|
-
}`;C.write("const input = payload.value;");const A=Object.create(null);let T=0;for(const N of w.allKeys)A[N]=`key_${T++}`;C.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const N of w.allKeys){if(N==="__proto__")continue;const M=A[N],R=typeof N=="symbol"?`syms[${S.indexOf(N)}]`:zRe(N),k=`${R} in input`,L=v[N],q=L?._zod?.optin,$=q!==void 0,D=L?._zod?.optout==="optional";if(C.write(`const ${M} = ${E(R)};`),$&&D){const j=q==="optional"?`${M}_present`:`${M}.value !== undefined || ${M}_present`;C.write(`
|
|
173
|
-
const ${M}_present = ${k};
|
|
174
|
-
if (!${M}.issues.length || ${M}_present) {
|
|
175
|
-
if (${M}.issues.length) {${I(M,R)}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
if (${j}) {
|
|
179
|
-
newResult[${R}] = ${M}.value;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
`)}else $?(C.write(`
|
|
184
|
-
if (${M}.issues.length) {${I(M,R)}
|
|
185
|
-
}
|
|
186
|
-
`),q==="defaulted"?C.write(`newResult[${R}] = ${M}.value;`):C.write(`
|
|
187
|
-
if (${M}.value !== undefined || ${k}) {
|
|
188
|
-
newResult[${R}] = ${M}.value;
|
|
189
|
-
}
|
|
190
|
-
`)):C.write(`
|
|
191
|
-
const ${M}_present = ${k};
|
|
192
|
-
if (${M}.issues.length) {${I(M,R)}
|
|
193
|
-
}
|
|
194
|
-
if (!${M}_present && !${M}.issues.length) {
|
|
195
|
-
payload.issues.push({
|
|
196
|
-
code: "invalid_type",
|
|
197
|
-
expected: "nonoptional",
|
|
198
|
-
input: undefined,
|
|
199
|
-
path: [${R}]
|
|
200
|
-
});
|
|
201
|
-
if (ctx && ctx.abortEarly) {
|
|
202
|
-
payload.value = newResult;
|
|
203
|
-
return payload;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
if (${M}_present) {
|
|
208
|
-
newResult[${R}] = ${M}.value;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
`)}return C.write("payload.value = newResult;"),C.write("return payload;"),C.compile()};let a;const u=bv,c=!wo.jitless,h=c&&BRe.value,m=t.catchall;let g;e._zod.parse=(v,w)=>{g??(g=r.value);const S=v.value;return u(S)?c&&h&&w?.async===!1&&w.jitless!==!0?(a||(a=s(t.shape)),v=a(v,w),m?TH([],S,v,w,g,e,w?.abortEarly===!0):v):n(v,w):(v.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),v)}});function e5(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=>!Rs(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=>Ki(a,r,Vo())))}),t)}const a2e=te("$ZodUnion",(e,t)=>{Zt.init(e,t),gt(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),gt(e,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),gt(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)))}),gt(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=>cT(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 u of t.options){const c=u._zod.run({value:r.value,issues:[]},o);if(c instanceof Promise)a.push(c),s=!0;else{if(c.issues.length===0)return c;a.push(c)}}return s?Promise.all(a).then(u=>e5(u,r,e,o)):e5(a,r,e,o)}}),l2e=te("$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(([c,f])=>t5(n,c,f)):t5(n,s,a)}});function CI(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(rc(e)&&rc(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=CI(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=CI(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 t5(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 u=[...r].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(u.length){const f=o?u.filter(h=>o.keys.includes(h)):[];f.length&&e.issues.push({...o,keys:f});for(const h of u)!f.includes(h)&&s.has(h)&&e.issues.push(s.get(h))}const c=CI(t.value,n.value);if(!c.valid){if(Rs(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}const u2e=te("$ZodRecord",(e,t)=>{Zt.init(e,t);const n=wo.memoizer;n?.attach(e),e._zod.parse=(r,o)=>{const s=r.value;if(!rc(s))return r.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),r;const a=[],u=t.keyType._zod.values;if(u&&!t.partial){r.value=n?n.alloc(e,r,{},o):{};const c=new Set;for(const h of u)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){if(c.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(w=>Ki(w,o,Vo())),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(w=>{w.issues.length&&r.issues.push(...Pu(h,w.issues)),r.value[g]=w.value})):(v.issues.length&&r.issues.push(...Pu(h,v.issues)),r.value[g]=v.value)}let f;for(const h in s)if(!c.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 c;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"&&mT.test(f)&&h.issues.length){const w=t.keyType._zod.run({value:Number(f),issues:[]},o);if(w instanceof Promise)throw new Error("Async schemas not supported in object keys currently");w.issues.length===0&&(h=w)}if(h.issues.length){t.mode==="loose"?r.value[f]=s[f]:u?(c=c??[],c.push(f)):r.issues.push({code:"invalid_key",origin:"record",issues:h.issues.map(w=>Ki(w,o,Vo())),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(w=>{w.issues.length&&r.issues.push(...Pu(f,w.issues)),r.value[g]=w.value})):(v.issues.length&&r.issues.push(...Pu(f,v.issues)),r.value[g]=v.value)}c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:c,continue:!0})}return a.length?Promise.all(a).then(()=>r):r}}),c2e=te("$ZodEnum",(e,t)=>{Zt.init(e,t);const n=yI(t.entries),r=new Set(n);e._zod.values=r,gt(e,"pattern",o=>{const s=yI(o.def.entries).filter(a=>HRe.has(typeof a));return new RegExp(s.length?`^(${s.map(a=>oc(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}}),d2e=te("$ZodLiteral",(e,t)=>{Zt.init(e,t);const n=new Set(t.values);e._zod.values=n,gt(e,"pattern",r=>{const o=r.def.values;return new RegExp(o.length?`^(${o.map(s=>typeof s=="string"?oc(s):s?oc(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}}),f2e=te("$ZodTransform",(e,t)=>{Zt.init(e,t),e._zod.optin="optional",wo.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new hH(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 qa;return n.value=o,n}});function n5(e,t){return e.value=t.issues.length?void 0:t.value,e}const OH=te("$ZodOptional",(e,t)=>{Zt.init(e,t),gt(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",gt(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),gt(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${cT(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=>n5(n,s)):n5(n,o)}return t.innerType._zod.run(n,r)}}),h2e=te("$ZodExactOptional",(e,t)=>{OH.init(e,t),gt(e,"values",n=>n.def.innerType._zod.values),gt(e,"pattern",n=>n.def.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),p2e=te("$ZodNullable",(e,t)=>{Zt.init(e,t),gt(e,"optin",n=>n.def.innerType._zod.optin),gt(e,"optout",n=>n.def.innerType._zod.optout),gt(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${cT(r.source)}|null)$`):void 0}),gt(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)}),m2e=te("$ZodDefault",(e,t)=>{Zt.init(e,t),e._zod.optin="defaulted",gt(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=>r5(s,t)):r5(o,t)}});function r5(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const g2e=te("$ZodPrefault",(e,t)=>{Zt.init(e,t),e._zod.optin="defaulted",gt(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))}),v2e=te("$ZodNonOptional",(e,t)=>{Zt.init(e,t),gt(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=>o5(s,e)):o5(o,e)}});function o5(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 s5(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>Ki(o,r,Vo()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const y2e=te("$ZodCatch",(e,t)=>{Zt.init(e,t),gt(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),gt(e,"optout",n=>n.def.innerType._zod.optout),gt(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=>s5(n,s,t,r)):s5(n,o,t,r)}}),b2e=te("$ZodPipe",(e,t)=>{Zt.init(e,t),gt(e,"values",n=>n.def.in._zod.values),gt(e,"optin",n=>n.def.in._zod.optin),gt(e,"optout",n=>n.def.out._zod.optout),gt(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=>zm(a,t.in,r)):zm(s,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>zm(s,t.out,r)):zm(o,t.out,r)}});function zm(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 S2e=te("$ZodReadonly",(e,t)=>{Zt.init(e,t),gt(e,"propValues",n=>n.def.innerType._zod.propValues),gt(e,"values",n=>n.def.innerType._zod.values),gt(e,"optin",n=>n.def.innerType?._zod?.optin),gt(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(i5):i5(o)}});function i5(e){return e.memo||(e.value=Object.freeze(e.value)),e}const w2e=te("$ZodCustom",(e,t)=>{vr.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=>a5(s,n,r,e));a5(o,n,r,e)}});function a5(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(Kf(o))}}class C2e extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const EI="~memo",l5=[];function MH(e){return e!==null&&typeof e=="object"}function h_(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}const PH=new WeakMap,ef=0,Eg=1,gf=2;function _g(e,t,n){const r=PH.get(e);if(r!==void 0)return r?gf:ef;if(t.has(e))return gf;t.add(e);let o=ef;const s=h=>{if(o!==gf&&h?._zod){const m=_g(h,t);m>o&&(o=m)}},a=(h,m)=>{let g=ef;for(const v of Reflect.ownKeys(h)){const w=Object.getOwnPropertyDescriptor(h,v);if(!w.enumerable)continue;const S=w.get?Eg:w.value?._zod?_g(w.value,t):ef;S>g&&(g=S)}return g},u=h=>{h>o&&(o=h)},c=e._zod.def;switch(c.type){case"object":{const h=rH(c);u(h?a(h):Eg),s(c.catchall);break}case"array":s(c.element);break;case"tuple":for(const h of c.items)s(h);s(c.rest);break;case"record":case"map":s(c.keyType),s(c.valueType);break;case"set":s(c.valueType);break;case"union":for(const h of c.options)s(h);break;case"intersection":s(c.left),s(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":s(c.innerType);break;case"pipe":s(c.in),s(c.out);break;case"function":s(c.input),s(c.output);break;case"lazy":{const h=c._cachedInner??void 0;u(h?_g(h,t):Eg);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 c){const m=Object.getOwnPropertyDescriptor(c,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),E2e(e,o)}function E2e(e,t){return t!==Eg&&PH.set(e,t===gf),t}function _2e(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}let jm;const Bm=[],x2e={alloc(e,t,n){const r=jm;if(!r)return n;jm=void 0;const o={value:n,issues:null};return r.set(t.value,o),Bm.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"&&A2e(s,o.value))throw new C2e;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,u=(c,f)=>{if(n===void 0){const E=_g(e,new Set);if(E===ef)return e._zod.parse=a,e._zod.run===u&&(e._zod.run=a),a(c,f);E===gf||r?n=!0:r=!0}const h=c.value;if(!MH(h))return a(c,f);let m=f[EI];m||(m={buckets:new WeakMap,backEdges:void 0},f[EI]=m);let g;o===f?g=s:(g=_2e(m,e),o=f,s=g);const v=g.get(h);if(v)return c.value=v.value,v.issues?v.issues.length&&c.issues.push(...h_(v.issues)):(c.memo=!0,m.backEdges??(m.backEdges=new WeakSet),m.backEdges.add(v.value)),c;jm=g;const w=Bm.length,S=a(c,f);jm=void 0;const C=Bm.length>w?Bm.pop():void 0;return S instanceof Promise?S.then(E=>(C&&(C.issues=E.issues.length?h_(E.issues):l5),E)):(C&&(C.issues=S.issues.length?h_(S.issues):l5),S)};e._zod.parse=u,e._zod.run===a&&(e._zod.run=u)})}};function I2e(){return x2e}function A2e(e,t){const n=e[EI]?.backEdges;return n!==void 0&&MH(t)&&n.has(t)}const R2e=()=>{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),u=eTe(s.input),c=o(u,s.input);return`Invalid input: expected ${a}, received ${c}`}case"invalid_value":return s.values.length===1?`Invalid input: expected ${lH(s.values[0])}`:`Invalid option: expected one of ${V6(s.values,"|")}`;case"too_big":{const a=s.exact?"exactly ":s.inclusive?"<=":"<",u=t(s.origin);return u?`Too big: expected ${s.origin??"value"} to have ${a}${s.maximum.toString()} ${u.unit??"elements"}`:`Too big: expected ${s.origin??"value"} to be ${a}${s.maximum.toString()}`}case"too_small":{const a=s.exact?"exactly ":s.inclusive?">=":">",u=t(s.origin);return u?`Too small: expected ${s.origin} to have ${a}${s.minimum.toString()} ${u.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":""}: ${V6(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(u=>`'${u}'`).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 T2e(){return{localeError:R2e()}}var u5;class O2e{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 M2e(){return new O2e}(u5=globalThis).__zod_globalRegistry??(u5.__zod_globalRegistry=M2e());const tf=globalThis.__zod_globalRegistry;function bT(e){return e.checks&&(e.checks=[...e.checks]),e}function P2e(e,t){return new e(bT({type:"string",...Ie(t)}))}function NH(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ie(t)})}function N2e(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ie(t)})}function k2e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ie(t)})}function D2e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ie(t)})}function L2e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ie(t)})}function U2e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ie(t)})}function $2e(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ie(t)})}function F2e(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ie(t)})}function z2e(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ie(t)})}function j2e(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ie(t)})}function B2e(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ie(t)})}function H2e(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ie(t)})}function q2e(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ie(t)})}function V2e(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ie(t)})}function W2e(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ie(t)})}function G2e(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ie(t)})}function K2e(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ie(t)})}function Z2e(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ie(t)})}function Y2e(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ie(t)})}function Q2e(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ie(t)})}function X2e(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ie(t)})}function J2e(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ie(t)})}function kH(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ie(t)})}function DH(e,t){return new e({type:"string",format:"date",check:"string_format",...Ie(t)})}function eMe(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ie(t)})}function tMe(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ie(t)})}function nMe(e,t){return new e(bT({type:"number",checks:[],...Ie(t)}))}function N$e(e,t){return new e(bT({type:"number",coerce:!0,checks:[],...Ie(t)}))}function rMe(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ie(t)})}function oMe(e,t){return new e({type:"boolean",...Ie(t)})}function sMe(e){return new e({type:"unknown"})}function iMe(e,t){return new e({type:"never",...Ie(t)})}function c5(e,t){return new yH({check:"less_than",...Ie(t),value:e,inclusive:!1})}function p_(e,t){return new yH({check:"less_than",...Ie(t),value:e,inclusive:!0})}function d5(e,t){return new bH({check:"greater_than",...Ie(t),value:e,inclusive:!1})}function m_(e,t){return new bH({check:"greater_than",...Ie(t),value:e,inclusive:!0})}function f5(e,t){return new oOe({check:"multiple_of",...Ie(t),value:e})}function LH(e,t){return new iOe({check:"max_length",...Ie(t),maximum:e})}function Ev(e,t){return new aOe({check:"min_length",...Ie(t),minimum:e})}function UH(e,t){return new lOe({check:"length_equals",...Ie(t),length:e})}function aMe(e,t){return new uOe({check:"string_format",format:"regex",...Ie(t),pattern:e})}function lMe(e){return new cOe({check:"string_format",format:"lowercase",...Ie(e)})}function uMe(e){return new dOe({check:"string_format",format:"uppercase",...Ie(e)})}function cMe(e,t){return new fOe({check:"string_format",format:"includes",...Ie(t),includes:e})}function dMe(e,t){return new hOe({check:"string_format",format:"starts_with",...Ie(t),prefix:e})}function fMe(e,t){return new pOe({check:"string_format",format:"ends_with",...Ie(t),suffix:e})}function _c(e){return new mOe({check:"overwrite",tx:e})}function hMe(e){return _c(t=>t.normalize(e))}function pMe(){return _c(e=>e.trim())}function mMe(){return _c(e=>e.toLowerCase())}function gMe(){return _c(e=>e.toUpperCase())}function vMe(){return _c(e=>jRe(e))}function yMe(e,t,n){return new e({type:"array",element:t,...Ie(n)})}function bMe(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ie(n)})}function SMe(e,t){const n=wMe(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(Kf(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(Kf(s))}},e(r.value,r)),t);return n}function wMe(e,t){const n=new vr({check:"custom",...Ie(t)});return n._zod.check=e,n}function vf(e,...t){for(const n of t)for(const r of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,r)&&Ji(e,r,n[r]);return e}function $H(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??tf,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 Yi(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 fn(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 u=e._zod.toJSONSchema?.();if(u)a.schema=u;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),fn(m,t,h),t.seen.get(m).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&vf(a.schema,c),t.io==="input"&&Vn(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 h5(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function FH(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 u=e.metadataRegistry.get(a[0])?.id;if(u){const c=r.get(u);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(u,a[0])}}const o=a=>{const u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const m=e.external.registry.get(a[0])?.id,g=e.external.uri??(w=>w);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")}#/${u}/${h5(v)}`}}const c="#",f=`${c}/${u}/`;if(a[1]===n&&!a[1].schema.id)return{ref:c};const h=a[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:f+h5(h)}},s=a=>{if(a[1].schema.$ref)return;const u=a[1],{ref:c,defId:f}=o(a);u.def={...u.schema},f&&(u.defId=f);const h=u.schema;for(const m in h)delete h[m];h.$ref=c};if(e.cycles==="throw")for(const a of e.seen.entries()){const u=a[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.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 u=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(u.cycle){s(a);continue}u.count>1&&e.reused==="ref"&&s(a)}e.external&&(e.sharedDefsExtractedFor=e.external)}function zH(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;zH(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 jH=new Set(["type","properties","required","additionalProperties"]),p5=["oneOf","anyOf"];function m5(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function _I(e){const t=[];for(const s of e){if(typeof s!="object"||s.type!=="object")return null;for(const a in s)if(!jH.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 u=[];for(const f of t){const h=f.properties?.[a]??m5(f);h!=null&&(u.some(m=>JSON.stringify(m)===JSON.stringify(h))||u.push(h))}const c=u.length===1?u[0]:_I(u)??{allOf:u};Ji(n,a,c)}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 u=m5(a);u&&!s.some(c=>JSON.stringify(c)===JSON.stringify(u))&&s.push(u)}s.length===1?o.additionalProperties=s[0]:s.length>1&&(o.additionalProperties={allOf:s})}return o}function CMe(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const o of jH)if(o in e)return;const n=t.filter(o=>p5.some(s=>Array.isArray(o[s])));let r=null;if(!n.length)r=_I(t);else{const o=n[0],s=p5.find(c=>Array.isArray(o[c]));if(Object.keys(o).length!==1)return;const a=t.filter(c=>c!==o),u=o[s].map(c=>_I([...a,c]));if(u.some(c=>!c))return;r={[s]:u}}r&&(delete e.allOf,vf(e,r))}function BH(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=u=>{const c=e.seen.get(u);if(c.ref===null)return;const f=c.def??c.schema,h={...f},m=c.ref;if(c.ref=null,m){r(m);const v=e.seen.get(m),w=v.schema;if(w.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(w)):vf(f,w),vf(f,h),u._zod.parent===m)for(const C in f)C==="$ref"||C==="allOf"||C in h||delete f[C];if(w.$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]}const g=u._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 w in f)w==="$ref"||w==="allOf"||w in v.def&&JSON.stringify(f[w])===JSON.stringify(v.def[w])&&delete f[w]}e.override({zodSchema:u,jsonSchema:f,path:c.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const u of[...e.seen.entries()].reverse())r(u[0]);if(e.target!=="openapi-3.0")for(const u of e.seen.entries())zH(u[1].def??u[1].schema);for(const u of e.deferred)u();if(e.intersections.length){const u=new Map;for(const c of e.seen.values())for(const f of[c.schema,c.def]){const h=f?.allOf;if(!Array.isArray(h))continue;const m=u.get(h);m?m.push(f):u.set(h,[f])}for(const c of e.intersections)for(const f of u.get(c)??[])CMe(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 u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(u)}vf(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 u of e.seen.entries()){const c=u[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,Ji(a,c.defId,c.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 u=JSON.parse(JSON.stringify(o));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:_v(t,"input",e.processors),output:_v(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function Vn(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 Vn(r.element,n);if(r.type==="set")return Vn(r.valueType,n);if(r.type==="lazy")return Vn(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 Vn(r.innerType,n);if(r.type==="intersection")return Vn(r.left,n)||Vn(r.right,n);if(r.type==="record"||r.type==="map")return Vn(r.keyType,n)||Vn(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Vn(r.in,n)||Vn(r.out,n);if(r.type==="object"){for(const o in r.shape)if(Vn(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(Vn(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(Vn(o,n))return!0;return!!(r.rest&&Vn(r.rest,n))}return!1}const EMe=(e,t={})=>n=>{const r=$H({...n,processors:t});return fn(e,r),FH(r,e),BH(r,e)},_v=(e,t,n={})=>r=>{const{libraryOptions:o,target:s}=r??{},a=$H({...o??{},target:s,io:t,processors:n});return fn(e,a),FH(a,e),BH(a,e)},sc=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},ic=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},g5=(e,t)=>{sc(e,"minimum",t),ic(e,"maximum",t)},HH=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},qH=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},VH=(e,t)=>{e.mime=e.mime?e.mime.filter(n=>t.includes(n)):[...t]},WH=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},v5=(e,t)=>sc(e,"minimum",t.minimum),y5=(e,t)=>ic(e,"maximum",t.maximum),b5=e=>(t,n)=>{WH(t,n.format);const[r,o]=e[n.format];sc(t,"minimum",r),ic(t,"maximum",o)},_Me={greater_than:(e,t)=>sc(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>ic(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>HH(e,t.value),number_format:b5(uH),bigint_format:b5(VRe),min_length:v5,max_length:y5,length_equals:(e,t)=>g5(e,t.length),min_size:v5,max_size:y5,size_equals:(e,t)=>g5(e,t.size),string_format:(e,t)=>{WH(e,t.format),t.pattern&&qH(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)=>VH(e,t.mime)};function vo(e){const t={},n=e._zod.def,r=e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[];for(const s of r)_Me[s._zod.def.check]?.(t,s._zod.def);const o=e._zod.bag;o.minimum!==void 0&&sc(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&sc(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&ic(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&ic(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&HH(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&VH(t,o.mime);for(const s of o.patterns??[])qH(t,s);return t}const xMe={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},IMe=new Map([[IH,VTe],[yT,WTe]]),GH=e=>IMe.get(e)??e,AMe=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:s,maximum:a,format:u,patterns:c,contentEncoding:f,laxFormat:h}=vo(e);if(typeof s=="number"&&(o.minLength=s),typeof a=="number"&&(o.maxLength=a),u&&(o.format=xMe[u]??u,o.format===""&&delete o.format,(u==="time"||h)&&delete o.format),f&&(o.contentEncoding=f),c&&c.size>0){const m=[...c].map(GH);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}))])}},RMe=(e,t,n,r)=>{const o=n,{minimum:s,maximum:a,multipleOf:u,exclusiveMaximum:c,exclusiveMinimum:f,isInt:h}=vo(e);o.type=h?"integer":"number";const m=typeof f=="number"&&f>=(s??Number.NEGATIVE_INFINITY),g=typeof c=="number"&&c<=(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=c,o.exclusiveMaximum=!0):o.exclusiveMaximum=c:typeof a=="number"&&(o.maximum=a),u){const w=new Set;for(const E of u)Number.isFinite(E)&&E!==0?w.add(Math.abs(E)):Yi(e,t,o,r,`A multipleOf divisor of ${E} cannot be represented in JSON Schema`);const[S,...C]=w;S!==void 0&&(o.multipleOf=S),C.length&&(o.allOf=[...o.allOf??[],...C.map(E=>({multipleOf:E}))])}},TMe=(e,t,n,r)=>{n.type="boolean"},OMe=(e,t,n,r)=>{n.not={}},MMe=(e,t,n,r)=>{},PMe=(e,t,n,r)=>{const o=e._zod.def,s=yI(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},NMe=(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(Yi(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(Yi(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},kMe=(e,t,n,r)=>{Yi(e,t,n,r,"Custom types cannot be represented in JSON Schema")},DMe=(e,t,n,r)=>{Yi(e,t,n,r,"Transforms cannot be represented in JSON Schema")},LMe=(e,t,n,r)=>{const o=n,s=e._zod.def,{minimum:a,maximum:u}=vo(e);typeof a=="number"&&(o.minItems=a),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=fn(s.element,t,{...r,path:[...r.path,"items"]})};function xv(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?xv(t.out):t.type==="catch"?xv(t.innerType):e._zod.optin}const UMe=(e,t,n,r)=>{const o=n,s=e._zod.def,a=s.shape;if(Object.getOwnPropertySymbols(a).length&&Yi(e,t,o,r,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const f in a)Ji(o.properties,f,fn(a[f],t,{...r,path:[...r.path,"properties",f]}));const c=[];for(const f of Object.keys(a)){const h=s.shape[f];(t.io==="input"?xv(h)===void 0:h._zod.optout===void 0)&&c.push(f)}c.length>0&&(o.required=c),s.catchall?._zod.def.type==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=fn(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},$Me=(e,t,n,r)=>{const o=e._zod.def,s=o.inclusive===!1,a=o.options.map((u,c)=>fn(u,t,{...r,path:[...r.path,s?"oneOf":"anyOf",c]}));s?n.oneOf=a:n.anyOf=a},FMe=(e,t,n,r)=>{const o=e._zod.def,s=fn(o.left,t,{...r,path:[...r.path,"allOf",0]}),a=fn(o.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,c=[...u(s)?s.allOf:[s],...u(a)?a.allOf:[a]];n.allOf=c,t.intersections.push(c)};function xI(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);const w=e.get(t)?.def;if(!w)return t;const S=xI(e,w,n);return S===w?t:S}for(const w of["anyOf","oneOf"]){const S=t[w];if(!Array.isArray(S))continue;const C=S.map(E=>xI(e,E,n));C.some((E,I)=>E!==S[I])&&(t={...t,[w]:C})}const r=Array.isArray(t.type)?t.type:[t.type],o=!r.includes("string")&&r.some(w=>w==="number"||w==="integer"),s=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!s?.some(w=>typeof w=="number"))return t;const{minimum:a,maximum:u,exclusiveMinimum:c,exclusiveMaximum:f,multipleOf:h,format:m,id:g,...v}=t;return v.enum?v.enum=v.enum.map(w=>typeof w=="number"?String(w):w):typeof v.const=="number"&&(v.const=String(v.const)),o&&(v.type="string",s||(v.pattern=(r.includes("number")?mT:eOe).source)),v}const II=new WeakMap;function zMe(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 II.get(e)??[]){const o=e.seen.get(r),s=(o?.def??o?.schema)?.propertyNames;if(!s||s===!0||n.has(s))continue;const a=xI(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 jMe=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object";const a=s.keyType,u=vo(a).patterns;if(s.mode==="loose"&&u&&u.size>0){const h=fn(s.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const m of u)Ji(o.patternProperties,GH(m).source,h)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=fn(s.keyType,t,{...r,path:[...r.path,"propertyNames"]});let h=II.get(t);h||(h=[],II.set(t,h),t.deferred.push(()=>zMe(t))),h.push(e)}o.additionalProperties=fn(s.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}const c=a._zod.values,f=t.io==="input"&&xv(s.valueType)!==void 0;if(c&&!s.partial&&!f){const h=[...c].filter(m=>typeof m=="string"||typeof m=="number");h.length>0&&(o.required=h.map(String))}},BMe=(e,t,n,r)=>{const o=e._zod.def,s=fn(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"}]},HMe=(e,t,n,r)=>{const o=e._zod.def;fn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},ST=Symbol();function KH(e,t,n,r,o){let s=!1;const a=JSON.stringify(e,(u,c)=>typeof c!="bigint"?c:(s=!0,null));return s?(Yi(t,n,r,o,"BigInt defaults cannot be represented in JSON Schema"),ST):JSON.parse(a)}const qMe=(e,t,n,r)=>{const o=e._zod.def;fn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;const a=KH(o.defaultValue,e,t,n,r);a!==ST&&(n.default=a)},VMe=(e,t,n,r)=>{const o=e._zod.def;fn(o.innerType,t,r);const s=t.seen.get(e);if(s.ref=o.innerType,t.io!=="input")return;const a=KH(o.defaultValue,e,t,n,r);a!==ST&&(n._prefault=a)},WMe=(e,t,n,r)=>{const o=e._zod.def;fn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{Yi(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=a},GMe=(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;fn(a,t,r);const u=t.seen.get(e);u.ref=a},KMe=(e,t,n,r)=>{const o=e._zod.def;fn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.readOnly=!0},ZH=(e,t,n,r)=>{const o=e._zod.def;fn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},S5=new WeakSet([Object.prototype,Error.prototype]);function Hm(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 ZMe=(e,t)=>{fTe.init(e,t),e.name="ZodError";const n=Object.getPrototypeOf(e);S5.has(n)||(S5.add(n),Hm(n,"format",r=>o=>mTe(r,o)),Hm(n,"flatten",r=>o=>pTe(r,o)),Hm(n,"addIssue",r=>o=>{r.issues.push(o),r.message=JSON.stringify(r.issues,bI,2)}),Hm(n,"addIssues",r=>o=>{r.issues.push(...o),r.message=JSON.stringify(r.issues,bI,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},ro=te("ZodError",ZMe,void 0,{Parent:Error}),YMe=rb(ro),QMe=ob(ro),XMe=hT(ro),JMe=pT(ro),ePe=wTe(ro),tPe=CTe(ro),nPe=ETe(ro),rPe=_Te(ro),oPe=xTe(ro),sPe=ITe(ro),iPe=ATe(ro),aPe=RTe(ro);function lPe(){wo.localeError||Vo(T2e())}function ib(){wo.memoizer||Vo({memoizer:I2e()})}const Yt=te("ZodType",(e,t)=>(lPe(),Zt.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(Tr(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 ea(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(nNe(e,t))},superRefine(e,t){return this.check(rNe(e,t))},overwrite(e){return this.check(_c(e))},optional(){return E5(this)},exactOptional(){return HPe(this)},nullable(){return _5(this)},nullish(){return E5(_5(this))},nonoptional(e){return ZPe(this,e)},array(){return tq(this)},or(e){return nq([this,e])},and(e){return $Pe(this,e)},transform(e){return x5(this,BPe(e))},default(e){return WPe(this,e)},prefault(e){return KPe(this,e)},catch(e){return QPe(this,e)},pipe(e){return x5(this,e)},readonly(){return eNe(this)},describe(e){const t=this.clone();return tf.add(t,{description:e}),t},meta(...e){if(e.length===0)return tf.get(this);const t=this.clone();return tf.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 dH(this,"~standard",{...wH(this),jsonSchema:{input:_v(this,"input"),output:_v(this,"output")}})},set"~standard"(e){Zi(this,"~standard",e)},parse:function e(t,n){return YMe(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await QMe(this,t,n,{callee:e})},safeParse(e,t){return XMe(this,e,t)},async safeParseAsync(e,t){return JMe(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Zi(this,"spa",e)},validate(e,t){return yTe(this,e,t)},validateAsync(e,t){return STe(this,e,t)},encode:function e(t,n){return ePe(this,t,n,{callee:e})},decode:function e(t,n){return tPe(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await nPe(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await rPe(this,t,n,{callee:e})},safeEncode(e,t){return oPe(this,e,t)},safeDecode(e,t){return sPe(this,e,t)},async safeEncodeAsync(e,t){return iPe(this,e,t)},async safeDecodeAsync(e,t){return aPe(this,e,t)},toJSONSchema(e){return EMe(this,{})(e)},get description(){return tf.get(this)?.description},get _def(){return this._zod.def}}),YH=te("_ZodString",(e,t)=>{vT.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>AMe(e,n,r)},fH({format:e=>vo(e).format??null,minLength:e=>vo(e).minimum??null,maxLength:e=>vo(e).maximum??null},{regex(...e){return this.check(aMe(...e))},includes(...e){return this.check(cMe(...e))},startsWith(...e){return this.check(dMe(...e))},endsWith(...e){return this.check(fMe(...e))},min(...e){return this.check(Ev(...e))},max(...e){return this.check(LH(...e))},length(...e){return this.check(UH(...e))},nonempty(...e){return this.check(Ev(1,...e))},lowercase(e){return this.check(lMe(e))},uppercase(e){return this.check(uMe(e))},trim(){return this.check(pMe())},normalize(...e){return this.check(hMe(...e))},toLowerCase(){return this.check(mMe())},toUpperCase(){return this.check(gMe())},slugify(){return this.check(vMe())}})),uPe=te("ZodString",(e,t)=>{vT.init(e,t),YH.init(e,t)},{email(e){return this.check(NH(JH,e))},url(e){return this.check($2e(hPe,e))},jwt(e){return this.check(J2e(RPe,e))},emoji(e){return this.check(F2e(pPe,e))},guid(e){return this.check(N2e(fPe,e))},uuid(e){return this.check(k2e(qm,e))},uuidv4(e){return this.check(D2e(qm,e))},uuidv6(e){return this.check(L2e(qm,e))},uuidv7(e){return this.check(U2e(qm,e))},nanoid(e){return this.check(z2e(mPe,e))},cuid(e){return this.check(j2e(gPe,e))},cuid2(e){return this.check(B2e(vPe,e))},ulid(e){return this.check(H2e(yPe,e))},base64(e){return this.check(Y2e(xPe,e))},base64url(e){return this.check(Q2e(IPe,e))},xid(e){return this.check(q2e(bPe,e))},ksuid(e){return this.check(V2e(SPe,e))},ipv4(e){return this.check(W2e(wPe,e))},ipv6(e){return this.check(G2e(CPe,e))},cidrv4(e){return this.check(K2e(EPe,e))},cidrv6(e){return this.check(Z2e(_Pe,e))},e164(e){return this.check(X2e(APe,e))},datetime(e){return this.check(kH(QH,e))},date(e){return this.check(DH(XH,e))},time(e){return this.check(eMe(cPe,e))},duration(e){return this.check(tMe(dPe,e))}});function dn(e){return P2e(uPe,e)}const Qt=te("ZodStringFormat",(e,t)=>{Vt.init(e,t),YH.init(e,t)}),QH=te("ZodISODateTime",(e,t)=>{DOe.init(e,t),Qt.init(e,t)}),XH=te("ZodISODate",(e,t)=>{LOe.init(e,t),Qt.init(e,t)}),cPe=te("ZodISOTime",(e,t)=>{UOe.init(e,t),Qt.init(e,t)}),dPe=te("ZodISODuration",(e,t)=>{$Oe.init(e,t),Qt.init(e,t)}),JH=te("ZodEmail",(e,t)=>{wOe.init(e,t),Qt.init(e,t)});function k$e(e){return NH(JH,e)}const fPe=te("ZodGUID",(e,t)=>{bOe.init(e,t),Qt.init(e,t)}),qm=te("ZodUUID",(e,t)=>{SOe.init(e,t),Qt.init(e,t)}),hPe=te("ZodURL",(e,t)=>{AOe.init(e,t),Qt.init(e,t)}),pPe=te("ZodEmoji",(e,t)=>{ROe.init(e,t),Qt.init(e,t)}),mPe=te("ZodNanoID",(e,t)=>{TOe.init(e,t),Qt.init(e,t)}),gPe=te("ZodCUID",(e,t)=>{OOe.init(e,t),Qt.init(e,t)}),vPe=te("ZodCUID2",(e,t)=>{MOe.init(e,t),Qt.init(e,t)}),yPe=te("ZodULID",(e,t)=>{POe.init(e,t),Qt.init(e,t)}),bPe=te("ZodXID",(e,t)=>{NOe.init(e,t),Qt.init(e,t)}),SPe=te("ZodKSUID",(e,t)=>{kOe.init(e,t),Qt.init(e,t)}),wPe=te("ZodIPv4",(e,t)=>{FOe.init(e,t),Qt.init(e,t)}),CPe=te("ZodIPv6",(e,t)=>{jOe.init(e,t),Qt.init(e,t)}),EPe=te("ZodCIDRv4",(e,t)=>{BOe.init(e,t),Qt.init(e,t)}),_Pe=te("ZodCIDRv6",(e,t)=>{qOe.init(e,t),Qt.init(e,t)}),xPe=te("ZodBase64",(e,t)=>{VOe.init(e,t),Qt.init(e,t)}),IPe=te("ZodBase64URL",(e,t)=>{GOe.init(e,t),Qt.init(e,t)}),APe=te("ZodE164",(e,t)=>{KOe.init(e,t),Qt.init(e,t)}),RPe=te("ZodJWT",(e,t)=>{YOe.init(e,t),Qt.init(e,t)}),eq=te("ZodNumber",(e,t)=>{AH.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>RMe(e,n,r,o),e.isFinite=!0},fH({minValue:e=>{const{minimum:t,exclusiveMinimum:n}=vo(e);return Math.max(t??Number.NEGATIVE_INFINITY,n??Number.NEGATIVE_INFINITY)},maxValue:e=>{const{maximum:t,exclusiveMaximum:n}=vo(e);return Math.min(t??Number.POSITIVE_INFINITY,n??Number.POSITIVE_INFINITY)},isInt:e=>{const{isInt:t,multipleOf:n}=vo(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>vo(e).format??null},{gt(e,t){return this.check(d5(e,t))},gte(e,t){return this.check(m_(e,t))},min(e,t){return this.check(m_(e,t))},lt(e,t){return this.check(c5(e,t))},lte(e,t){return this.check(p_(e,t))},max(e,t){return this.check(p_(e,t))},int(e){return this.check(w5(e))},safe(e){return this.check(w5(e))},positive(e){return this.check(d5(0,e))},nonnegative(e){return this.check(m_(0,e))},negative(e){return this.check(c5(0,e))},nonpositive(e){return this.check(p_(0,e))},multipleOf(e,t){return this.check(f5(e,t))},step(e,t){return this.check(f5(e,t))},finite(){return this}}));function Iv(e){return nMe(eq,e)}const TPe=te("ZodNumberFormat",(e,t)=>{QOe.init(e,t),eq.init(e,t)});function w5(e){return rMe(TPe,e)}const OPe=te("ZodBoolean",(e,t)=>{XOe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>TMe(e,n,r)});function wT(e){return oMe(OPe,e)}const MPe=te("ZodUnknown",(e,t)=>{JOe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>MMe()});function Av(){return sMe(MPe)}const PPe=te("ZodNever",(e,t)=>{e2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>OMe(e,n,r)});function NPe(e){return iMe(PPe,e)}const kPe=te("ZodArray",(e,t)=>{ib(),r2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>LMe(e,n,r,o),e.element=t.element},{min(e,t){return this.check(Ev(e,t))},nonempty(e){return this.check(Ev(1,e))},max(e,t){return this.check(LH(e,t))},length(e,t){return this.check(UH(e,t))},unwrap(){return this.element}});function tq(e,t){return yMe(kPe,e,t)}const DPe=te("ZodObject",(e,t)=>{ib(),i2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>UMe(e,n,r,o),sTe(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return CT(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Tr(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Tr(this._zod.def,{catchall:Av()}))},loose(){return this.clone(Tr(this._zod.def,{catchall:Av()}))},strict(){return this.clone(Tr(this._zod.def,{catchall:NPe()}))},strip(){return this.clone(Tr(this._zod.def,{catchall:void 0}))},extend(e){return KRe(this,e)},safeExtend(e){return ZRe(this,e)},merge(e){return YRe(this,e)},pick(e){return WRe(this,e)},omit(e){return GRe(this,e)},partial(...e){return W6(rq,this,e[0])},exactPartial(...e){return W6(oq,this,e[0],"exactPartial")},required(...e){return QRe(sq,this,e[0])}});function Qn(e,t){const n={type:"object",shape:e??{},...Ie(t)};return new DPe(n)}const LPe=te("ZodUnion",(e,t)=>{a2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$Me(e,n,r,o),e.options=t.options});function nq(e,t){return new LPe({type:"union",options:e,...Ie(t)})}const UPe=te("ZodIntersection",(e,t)=>{l2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>FMe(e,n,r,o)});function $Pe(e,t){return new UPe({type:"intersection",left:e,right:t})}const C5=te("ZodRecord",(e,t)=>{ib(),u2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jMe(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function FPe(e,t,n){return!t||!t._zod?new C5({type:"record",keyType:dn(),valueType:e,...Ie(t)}):new C5({type:"record",keyType:e,valueType:t,...Ie(n)})}const AI=te("ZodEnum",(e,t)=>{c2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>PMe(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 AI({...t,checks:[],...Ie(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 AI({...t,checks:[],...Ie(o),entries:s})}});function CT(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new AI({type:"enum",entries:n,...Ie(t)})}const zPe=te("ZodLiteral",(e,t)=>{d2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>NMe(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 Gs(e,t){return new zPe({type:"literal",values:Array.isArray(e)?e:[e],...Ie(t)})}const jPe=te("ZodTransform",(e,t)=>{ib(),f2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>DMe(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new hH(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(Kf(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(Kf(a))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n)):(n.value=o,n)}});function BPe(e){return new jPe({type:"transform",transform:e})}const rq=te("ZodOptional",(e,t)=>{OH.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ZH(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function E5(e){return new rq({type:"optional",innerType:e})}const oq=te("ZodExactOptional",(e,t)=>{h2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ZH(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function HPe(e){return new oq({type:"optional",innerType:e})}const qPe=te("ZodNullable",(e,t)=>{p2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>BMe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function _5(e){return new qPe({type:"nullable",innerType:e})}const VPe=te("ZodDefault",(e,t)=>{m2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qMe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function WPe(e,t){return new VPe({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():aH(t)}})}const GPe=te("ZodPrefault",(e,t)=>{g2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>VMe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function KPe(e,t){return new GPe({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():aH(t)}})}const sq=te("ZodNonOptional",(e,t)=>{v2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>HMe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function ZPe(e,t){return new sq({type:"nonoptional",innerType:e,...Ie(t)})}const YPe=te("ZodCatch",(e,t)=>{y2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>WMe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function QPe(e,t){return new YPe({type:"catch",innerType:e,catchValue:typeof t=="function"?t:aTe(t)})}const XPe=te("ZodPipe",(e,t)=>{b2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>GMe(e,n,r,o),e.in=t.in,e.out=t.out});function x5(e,t){return new XPe({type:"pipe",in:e,out:t})}const JPe=te("ZodReadonly",(e,t)=>{S2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>KMe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function eNe(e){return new JPe({type:"readonly",innerType:e})}const tNe=te("ZodCustom",(e,t)=>{w2e.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>kMe(e,n,r,o)});function nNe(e,t={}){return bMe(tNe,e,t)}function rNe(e,t){return SMe(e,t)}function oNe(e){return kH(QH,e)}function sNe(e){return DH(XH,e)}Qn({kind:Gs("Boolean"),value:wT()});Qn({kind:Gs("String"),value:dn()});Qn({kind:Gs("Number"),value:Iv()});Qn({kind:Gs("StringList"),value:tq(dn())});Qn({kind:Gs("Map"),value:FPe(dn(),dn())});Qn({kind:Gs("Map"),value:Qn({encryptedDek:dn(),encryptedData:dn(),iv:dn(),authTag:dn()})});Qn({kind:Gs("DailyCount"),value:Qn({date:dn(),calls:Iv().int()})});Qn({kind:Gs("MutedFlag"),value:Qn({value:wT(),setAt:Iv(),setBy:dn().optional(),expiresAt:Iv().optional(),reason:dn().optional()})});const iNe=e=>e.hierarchyDelimiter.length===0?[e.fullPath]:e.fullPath.split(e.hierarchyDelimiter),Zf=e=>{const t=iNe(e);return t[t.length-1]||e.fullPath},aNe=(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"}}},lNe=(e,t)=>aNe(e,t).allowed,uNe={[su.Appointed]:{kind:"appointed",mailbox:null},[su.Flagged]:{kind:"flagged",mailbox:null},[su.Reserved]:{kind:"reserved",mailbox:null},[su.Proposed]:{kind:"proposed",mailbox:null},[su.Stale]:{kind:"appointment_stale",appointedMailboxId:"",fallback:{kind:"none"}},[su.None]:{kind:"none"}},cNe=(e,t)=>lNe(uNe[e],t),ET=()=>typeof navigator<"u"&&(navigator.language||navigator.languages?.[0])||"en-US",Wo=(e,t)=>new Intl.NumberFormat(ET(),t).format(e),dNe=/^-?\d+$/,_T=e=>{if(e instanceof Date)return e;if(typeof e=="number")return new Date(e);if(typeof e=="string"){const t=e.trim();return dNe.test(t)?new Date(Number(t)):new Date(t)}return new Date(Number.NaN)},xT=e=>Number.isFinite(e.getTime()),nf=(e,t)=>{const n=_T(e);return xT(n)?new Intl.DateTimeFormat(ET(),t).format(n):""},iq=(e,t)=>nf(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]),D$e=e=>{const t=_T(e);if(!xT(t))return"";const n=new Intl.RelativeTimeFormat(ET(),{numeric:"auto"}),r=Date.now(),o=t.getTime()-r,s=Math.round(o/1e3),a=Math.round(o/(1e3*60)),u=Math.round(o/(1e3*60*60)),c=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(u)<24?n.format(u,"hour"):Math.abs(c)<7?n.format(c,"day"):Math.abs(f)<4?n.format(f,"week"):iq(t,"medium")},L$e=e=>{const t=_T(e);if(!xT(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 u=t>=a&&t<n,c=t.getFullYear()===n.getFullYear();return r?nf(t,{hour:"numeric",minute:"numeric"}):s?"Yesterday":u?nf(t,{weekday:"long"}):c?nf(t,{month:"short",day:"numeric"}):nf(t,{month:"short",day:"numeric",year:"numeric"})},fNe=e=>`Move ${e===1?"1":Wo(e)} ${e===1?"message":"messages"} to Trash?`,U$e=({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 u=t.get(a.accountId);if(u===void 0)return"unknown";if(u.source==="Stale")return"staleTrash";if(u.mailboxId===void 0)return"noTrash";u.mailboxId===a.mailboxId&&(o=!0,cNe(u.source,"confirmed")||(s=!0))}return s?"unconfirmed":o?"permanent":"trash"},hNe=e=>e==="permanent"||e==="unconfirmed",$$e=(e,t,n={})=>{const r=e===1?"1":Wo(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 u=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?`${u} Deleting ${r} ${o} there erases them from the mail server, and that cannot be restored. Nothing has been deleted.`:`${u} 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:fNe(e),description:"You can restore them from Trash later.",confirmLabel:"Move to Trash"}},pNe={delete:(e,t)=>`Deleting ${e} of ${t}…`,move:(e,t)=>`Moving ${e} of ${t}…`,markRead:(e,t)=>`Marking ${e} of ${t} as read…`},mNe={delete:"moved to Trash",move:"moved",markRead:"marked as read"},aq=(e,t)=>e==="delete"&&hNe(t)?"permanently deleted":mNe[e],gNe={delete:"couldn't be deleted",move:"couldn't be moved",markRead:"couldn't be marked as read"},vNe={delete:"Couldn't delete these messages",move:"Couldn't move these messages",markRead:"Couldn't mark these messages as read"},yNe={delete:"The delete didn't finish.",move:"The move didn't finish.",markRead:"The update didn't finish."},F$e=(e,t,n)=>pNe[e](Wo(t),Wo(n)),bNe=(e,t,n="trash")=>`${Wo(t)} ${aq(e,n)}. Your mail server is still catching up.`,SNe=e=>`Stopped after ${Wo(e)}`,wNe=(e,t,n,r="trash")=>`${Wo(t)} of ${Wo(n)} ${aq(e,r)}. The rest were not sent, apart from the ones already on their way when you stopped — those may still have gone through.`,I5=(e,t)=>t>0?`Stopped after ${Wo(t)} — some messages ${gNe[e]}`:vNe[e],CNe=e=>yNe[e],ENe={delete:e=>`A delete of ${e} messages`,move:e=>`A move of ${e} messages`,markRead:e=>`Marking ${e} messages as read`},_Ne=(e,t,n)=>`${ENe[e](Wo(t))}${n?` in ${n}`:""} is still running — stop it first.`,z$e=e=>e==="delete"?"danger":"info",j$e=(e,t,n,r)=>n.error!==void 0?null:n.cancelled?{severity:"warning",title:SNe(n.done),detail:wNe(e,n.done,t,r)}:{severity:"info",title:bNe(e,n.done,r)},lq=100,xNe=(e,t)=>e.kind==="move"?[t,e.destinationMailboxId]:[t],INe=new AbortController().signal,RI=async e=>e.then(t=>({ok:!0,value:t}),t=>({ok:!1,error:t})),ANe=(e,t=lq)=>{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},RNe=(e,t=lq)=>{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=>ANe(r,t))},uq=async(e,t,n,r)=>{const o=RNe(e),s=e.length;let a=0,u=0;const c=[];for(let f=0;f<o.length;f++){if(r.aborted)return c.push(...o.slice(f).flat()),{done:a,failedIds:c,refused:u,cancelled:!0};const h=o[f],m=await RI(t(h,r));if(!m.ok)return c.push(...o.slice(f).flat()),r.aborted?{done:a,failedIds:c,refused:u,cancelled:!0}:(n({done:a,total:s}),{done:a,failedIds:c,refused:u,cancelled:!1,error:m.error});u+=m.value?.failureCount??0,a+=h.length,n({done:a,total:s})}return{done:a,failedIds:c,refused:u,cancelled:!1}},B$e=async(e,t)=>{await uq(e.map(n=>({id:n,accountId:void 0})),async n=>(await t(n),{successCount:n.length,failureCount:0}),()=>{},INe)},TNe=async(e,t,n,r,o)=>{let s=0,a=0;const u=[];let c;do{if(o.aborted)return{done:s,failedIds:u,refused:a,cancelled:!0};const f=await RI(e(c,o));if(!f.ok)return o.aborted?{done:s,failedIds:u,refused:a,cancelled:!0}:{done:s,failedIds:u,refused:a,cancelled:!1,error:f.error};const h=f.value;if(h.ids.length>0){const m=await RI(n(h.ids,o));if(!m.ok)return o.aborted?{done:s,failedIds:u,refused:a,cancelled:!0}:{done:s,failedIds:u,refused:a,cancelled:!1,error:m.error};a+=m.value?.failureCount??0,s+=h.ids.length,r({done:s,total:t})}c=h.continuationToken}while(c);return{done:s,failedIds:u,refused:a,cancelled:!1}},ONe=e=>({done:e.done,total:Math.max(e.total,e.done)}),MNe=e=>typeof e=="object"&&e!==null&&Array.isArray(e.pages),PNe=e=>typeof e=="object"&&e!==null&&Array.isArray(e.items),NNe=(e,t)=>e===void 0?e:MNe(e)?{...e,pages:e.pages.map(n=>({...n,items:t(n.items)}))}:PNe(e)?{...e,items:t(e.items)}:e,kNe=e=>{const t=[];for(const n of new Set(e))t.push(mRe({path:{mailboxId:n}})),t.push(JB({path:{mailboxId:n}}));return t.push(tH()),t},H$e=(e,t)=>Promise.all(t.map(n=>e.cancelQueries({queryKey:n}))),q$e=(e,t)=>t.flatMap(n=>e.getQueriesData({queryKey:n})).filter(n=>n[1]!==void 0).map(([n,r])=>({queryKey:n,data:r})),V$e=(e,t,n)=>{const r=o=>NNe(o,n);for(const o of t)e.setQueriesData({queryKey:o},r)},W$e=(e,t)=>{for(const n of t)e.setQueryData(n.queryKey,n.data)},DNe=(e,t)=>{for(const n of t)e.invalidateQueries({queryKey:n})},cq=_.createContext(void 0),LNe=e=>{if(e.action)return e.action;if((e.severity??"error")==="error")return{label:"Report an issue",href:ih(Vu({title:`Bug: ${e.title}`,errorMessage:e.detail?`${e.title} — ${e.detail}`:e.title,stack:e.error instanceof Error?e.error.stack:void 0}))}},UNe=()=>{const e=_.useContext(cq);if(!e)throw new Error("useErrorBanners must be used within an ErrorBannerProvider");return e},A5=5,$Ne=(e,t,n)=>({title:e,detail:dq(n)??t,error:n}),dq=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}},G$e=e=>ll(e)?.code==="message_gone_from_server",K$e=e=>{const t=dq(e);return t?t.startsWith("Message not found"):!1},FNe=(e,t,n)=>e.severity===n&&e.title===t.title&&e.detail===t.detail,zNe=(e,t)=>{const r=[...e.filter(o=>!FNe(o,{title:t.title,detail:t.detail,severity:t.severity},t.severity)),t];return r.length<=A5?r:r.slice(r.length-A5)},jNe=(e,t)=>e.filter(n=>n.id!==t),BNe=(e,t,n)=>({id:t,severity:e.severity??"error",title:e.title,detail:e.detail,action:e.action,createdAt:n}),HNe=new Set(["none","stale","unconfirmed"]),qNe=new Set(Object.values(pre)),g_=(e,t)=>{const n=e?.[t];return typeof n=="string"?n:void 0},VNe=e=>{const t=ll(e);if(t?.code!=="folder_role_unresolved")return;const{details:n}=t;if(!n)return;const r=g_(n,"reason"),o=g_(n,"role"),s=g_(n,"accountId");if(!(!r||!HNe.has(r))&&!(!o||!qNe.has(o)||!s))return{reason:r,role:o,accountId:s}},WNe=e=>ll(e)?.code==="mailbox_not_settled",GNe=3e4,KNe=1e3,ZNe="The folder couldn't be created on the mail server. Please try again.",YNe="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.",QNe=(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 XNe({fetchMailboxes:e,mailboxId:t,signal:n,timeoutMs:r=GNe,pollIntervalMs:o=KNe,delay:s=QNe,now:a=Date.now}){const u=a()+r;for(;;){n?.throwIfAborted();const f=(await e()).find(h=>h.mailboxId===t);if(f?.syncStatus===fk.synced)return f;if(f?.syncStatus===fk.failed)throw new Error(ZNe);if(a()>=u)throw new Error(YNe);await s(o,n)}}function fq(e,t){const n=e.trim();return t?`${t.fullPath}${t.hierarchyDelimiter}${n}`:n}const R5=(e,t)=>{const n=t.length===0?[e]:e.split(t);return n[0]?.toLowerCase()==="inbox"&&(n[0]="INBOX"),n.join(t)};function JNe({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=R5(fq(o,n),t);if(r.some(u=>R5(u,t)===s))return"A folder with that name already exists."}function eke(e){const t=hl(),{data:n}=tl({...gI({path:{accountId:e??""}}),enabled:!!e}),r=cR({...nRe(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:aT({path:{accountId:e}})})}}),o=_.useRef(new Map),s=_.useCallback(async(u,c,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=c?h.find(C=>C.fullPath===c):void 0;if(c&&!m)throw new Error(`Couldn't find the folder "${c}" to create this one inside.`);const g=m?{fullPath:m.fullPath,hierarchyDelimiter:m.hierarchyDelimiter}:void 0,v=fq(u,g);let w=o.current.get(v);if(!w){const C=g?.hierarchyDelimiter??h[0]?.hierarchyDelimiter??"/",E=JNe({name:u,delimiter:C,parent:g,existingPaths:h.map(A=>A.fullPath)});if(E)throw new Error(E);w=(await r.mutateAsync({path:{accountId:e},body:{fullPath:v,namespaceType:"personal"}})).mailboxId,o.current.set(v,w)}const S=await XNe({mailboxId:w,signal:f,fetchMailboxes:async()=>(await t.fetchQuery({...gI({path:{accountId:e}}),staleTime:0})).items??[]});return o.current.delete(v),{id:S.mailboxId,label:Zf(S),path:S.fullPath}},[r,e,n,t]);return{createFolder:_.useCallback((u,c)=>s(u,"",c),[s]),createFolderIn:s,mutation:r}}const tke=()=>{const{t:e}=YB("mail",{useSuspense:!1});return _.useCallback((t,n)=>e(t,{defaultValue:n}),[e])},v_={Inbox:"inbox",Drafts:"drafts",Sent:"sent",Archive:"archive",Junk:"junk",Trash:"trash",All:"all",Flagged:"flagged"},Z$e={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Junk",trash:"Trash",all:"All",flagged:"Flagged"},Yf=["inbox","flagged","drafts","sent","archive","all","junk","trash"];function ab(e){const t=new Map,n=[...e].sort((r,o)=>Yf.indexOf(v_[r.role])-Yf.indexOf(v_[o.role]));for(const r of n){if(!r.mailboxId||t.has(r.mailboxId))continue;const o=v_[r.role];o&&t.set(r.mailboxId,o)}return t}function hq(e,t,n){const r=e.displayNameOverride?.trim();if(r)return r;const o=Zf(e);return!t||!n?o:n(`sidebar.${t}`,o)}const nke=new Set(["sent","drafts","trash"]),Y$e=e=>e===void 0||!nke.has(e),Q$e=100,rke=e=>e.trim().toLowerCase()==="inbox",oke=(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))},ske=["Appointed","Flagged","Reserved"],ike=(e,t)=>e.mailboxId!==t.mailboxId?!1:e.source==="Stale"?t.specialUse?.includes(e.role)??!1:ske.includes(e.source),ake=(e,t)=>t.find(n=>ike(n,e))?.role;function X$e(e,t,n){if(rke(e.fullPath))return{deletable:!1,reason:"inbox",message:"The inbox can't be deleted."};const r=ake(e,n);return r?{deletable:!1,reason:"role",message:`This folder is your ${r} folder. Reassign that role before deleting it.`}:oke(e,t)?{deletable:!1,reason:"children",message:"This folder has subfolders. Delete them first."}:{deletable:!0}}function lke(e,t){return e.filter(n=>n.mailboxId!==t)}function J$e(e){return{total:e,moved:0,phase:e===0?"moved":"moving"}}function eFe(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 tFe(e,t){return{...e,phase:"failed",error:t}}function nFe(e){return`Moved ${e.moved} of ${e.total}`}function rFe(e){const t=Math.max(0,Math.floor(e/1e3));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function oFe(e){return e>0?"choose-fate":"confirm-empty"}const uke=new Set(["outbox","postvak uit","boîte d'envoi","postausgang","buzón de salida","posta in uscita","送信トレイ","送件匣","发件箱","skrzynka nadawcza"]),cke=e=>{const t=Zf(e).trim().toLowerCase();return uke.has(t)},T5=Yf.length,dke=(e,t)=>{const n=ab(t);return[...e.filter(o=>{const s=n.get(o.mailboxId);return s==="drafts"||s==="sent"?!1:!cke(o)})].sort((o,s)=>{const a=n.has(o.mailboxId)?Yf.indexOf(n.get(o.mailboxId)??"inbox"):T5,u=n.has(s.mailboxId)?Yf.indexOf(n.get(s.mailboxId)??"inbox"):T5;return a!==u?a-u:Zf(o).localeCompare(Zf(s),void 0,{sensitivity:"base",numeric:!0})})},fke=e=>e[0]?.hierarchyDelimiter??"/",hke=({mailboxes:e,folderAppointments:t,currentMailboxId:n,excludeMailboxId:r,translator:o})=>{const s=dke(e,t),a=ab(t);return(r?lke(s,r):s).map(c=>({id:c.mailboxId,label:hq(c,a.get(c.mailboxId),o),path:c.fullPath,isCurrent:c.mailboxId===n,messageCount:c.messageCount}))},pq=_.createContext(void 0),O5=Symbol("appoint-failed"),pke=({children:e})=>{const t=hl(),n=tke(),[r,o]=_.useState(null),[s,a]=_.useState(),[u,c]=_.useState({kind:"choosing"}),f=r?.accountId,{data:h}=tl({...lT(),staleTime:1/0,enabled:!!f}),{data:m}=tl({...gI({path:{accountId:f??""}}),enabled:!!f}),{createFolderIn:g}=eke(f),v=cR({...tRe(),meta:oy(409)}),w=h?.accounts.find(D=>D.accountId===f),S=_.useMemo(()=>m?.items??[],[m]),C=_.useMemo(()=>w?.folderAppointments??[],[w]),E=_.useMemo(()=>hke({mailboxes:S,folderAppointments:C,translator:n}),[S,C,n]),I=C.find(D=>D.role===r?.role),A=r?.guessedMailboxId??I?.mailboxId,T=S.find(D=>D.mailboxId===A),N=r?.trashFolderLabel??(T?hq(T,ab(C).get(T.mailboxId),n):void 0),M=_.useRef(null),R=_.useCallback(()=>{M.current=null,o(null),a(void 0),c({kind:"choosing"})},[]),k=_.useCallback(D=>{M.current=D,o(D),c({kind:"choosing"}),a(D.reason==="unconfirmed"?D.guessedMailboxId:void 0)},[]),L=_.useCallback(D=>{M.current===D&&R()},[R]),q=_.useCallback(D=>{r&&(c({kind:"appointing"}),v.mutateAsync({path:{accountId:r.accountId,role:r.role},body:{mailboxId:D}}).catch(j=>(c({kind:"appoint-failed",cause:WNe(j)?"mailbox-pending":"generic"}),O5)).then(async j=>{j!==O5&&(await t.invalidateQueries({queryKey:XB()}),c({kind:"acting"}),await r.onAppointed(),L(r))}).catch(()=>L(r)))},[r,v,t,L]),$=_.useMemo(()=>({requestAppointment:k}),[k]);return O.jsxs(pq.Provider,{value:$,children:[e,r&&O.jsx(Sre,{open:!0,reason:r.reason,action:r.action,folders:E,delimiter:fke(S),trashFolderLabel:N,guessedMailboxId:A,staleFolderLabel:r.staleFolderLabel??I?.staleAppointmentPath,accountEmail:(h?.accounts.length??0)>1?w?.email:void 0,phase:u,selectedId:s,onSelect:a,onCreateFolder:g,onConfirm:q,onCancel:R})]})},mke=()=>{const e=_.useContext(pq);if(!e)throw new Error("useRoleAppointmentPrompt must be used within a RoleAppointmentPromptProvider");return e},mq=_.createContext(void 0),gke=({children:e})=>{const[t,n]=_.useState(void 0),r=_.useRef(void 0),o=_.useRef(void 0),s=_.useRef(void 0),a=_.useRef(new Set),u=hl(),{pushError:c}=UNe(),{requestAppointment:f}=mke(),h=_.useRef(async()=>({kind:"ran",outcome:{done:0,failedIds:[],refused:0,cancelled:!1}})),m=_.useCallback(S=>{DNe(u,kNe(xNe(S.action,S.mailboxId)));const C=new Set;if(S.accountId&&C.add(S.accountId),S.source.kind==="targets")for(const E of S.source.targets)E.accountId&&C.add(E.accountId);for(const E of C)u.invalidateQueries({queryKey:aT({path:{accountId:E}})})},[u]),g=_.useCallback(async S=>{const C=s.current;if(C)return{kind:"refused",reason:_Ne(C.action.kind,C.matched,C.mailboxLabel)};const E=Symbol("bulk-run"),I=new AbortController;r.current=I,o.current=E,s.current=S,S.claimEnding&&(a.current.add(E),S.claimEnding(()=>a.current.delete(E))),n({action:S.action,mailboxId:S.mailboxId,progress:{done:0,total:S.matched}});const A=R=>{o.current===E&&n(k=>k&&{...k,progress:ONe(R)})},T=S.source.kind==="targets"?await uq(S.source.targets,S.applyBatch,A,I.signal):await TNe(S.source.fetchPage,S.matched,S.applyBatch,A,I.signal),N=a.current.delete(E);o.current===E&&(o.current=void 0,s.current=void 0,n(void 0));const M=T.error?VNe(T.error):void 0;return M?f({accountId:M.accountId,role:M.role,reason:M.reason,action:{kind:"delete",count:S.matched},onAppointed:async()=>{const R=await h.current({...S,claimEnding:void 0});R.kind==="refused"&&c({title:I5(S.action.kind,0),detail:R.reason})}}):T.error?c($Ne(I5(S.action.kind,T.done),CNe(S.action.kind),T.error)):T.refused>0&&c({severity:"warning",title:T.refused>1?`Couldn't delete ${T.refused} of ${S.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."}),N||S.reportEnding?.(S.action.kind,S.matched,T),T.done>0&&m(S),{kind:"ran",outcome:T}},[m,c,f]);h.current=g;const v=_.useCallback(S=>{s.current?.mailboxId===S&&r.current?.abort()},[]);_.useEffect(()=>{const S=a.current;return()=>{r.current?.abort(),r.current=void 0,o.current=void 0,s.current=void 0,S.clear()}},[]);const w=_.useMemo(()=>({run:t,start:g,stop:v}),[t,g,v]);return O.jsx(mq.Provider,{value:w,children:e})},sFe=()=>{const e=_.useContext(mq);if(!e)throw new Error("useBulkRun must be used within a BulkRunProvider");return e},vke=600,yke=300,gq="remit logs",bke="https://github.com/remit-mail/reader/releases/tag/";function vq(e,t){const n=t?.check.lastCheckedAt;return n!==void 0&&n!==e.since}function Ske(e){const t=pn(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 wke={checking:"preparing",pulling:"preparing",snapshotting:"preparing",stopping:"restarting",starting:"restarting",verifying:"reconnecting",committing:"reconnecting",rollingBack:"reconnecting",recovering:"reconnecting"};function IT(e){return wke[e]??"reconnecting"}function yq(e){const t=pn(e);return t===404||t===403||t===401}function TI(e,t){const n=e?.run??null;return n===null||n.outcome!==null||n.runId===t?null:n}function bq(e,t){const n=e?.check;if(n?.status==="ok"&&!(!n.updateAvailable||!n.latestVersion))return{version:n.latestVersion,releasedAt:Rv(n.publishedAt)??t,releaseNotesUrl:n.releaseNotesUrl??Sq(n.latestVersion),summary:n.summary??""}}function Cke(e){const t=e?.check.schemaVersion,n=e?.currentSchemaVersion;return t===void 0||n===void 0?!1:t>n}function OI(){return vke+yke}function MI(e,t){return Math.max(0,Math.floor((t-e)/1e3))}function Rv(e){if(!e)return;const t=Date.parse(e);return Number.isNaN(t)?void 0:t}function Sq(e){return`${bke}${e}`}function Qf(e,t,n,r,o){return{status:"applying",runId:e,version:t,target:n,phase:r,elapsedSeconds:o}}function Eke(e,t,n){switch(n){case"succeeded":return{status:"succeeded",runId:t.runId,version:t.targetVersion,previousVersion:t.fromVersion,releaseNotesUrl:e.check.releaseNotesUrl??Sq(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 _ke(e,t,n,r){const o=e.check,s=Rv(o.lastCheckedAt);if(n!==null)return{status:"checkFailed",version:e.currentVersion,reason:n,lastCheckedAt:s};if(t!==null&&!vq(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=bq(e,r);return a?{status:"available",version:e.currentVersion,release:a}:{status:"upToDate",version:e.currentVersion,checkedAt:Rv(o.lastCheckedAt)??r}}function M5(e,t,n){return{surface:{status:"ready",section:e,overlay:t},releaseHeld:n}}function wq(e,t,n,r){return{status:"ready",section:Qf(e,t,n,"reconnecting",r),overlay:{kind:"applying",target:n,phase:"reconnecting",elapsedSeconds:r}}}function Cq(e,t,n,r,o){return{status:"ready",section:Qf(e,t,n,"reconnecting",r),overlay:{kind:"neverCameBack",attemptedVersion:n,previousVersion:t,elapsedSeconds:r,logsCommand:o}}}function xke(e,t){return{surface:Cq(e.runId,e.previousVersion,e.attemptedVersion,t,gq),releaseHeld:!1}}function Ike(e,t,n,r,o){const s=MI(e.startedAt,o),a=t?.currentVersion??e.previousVersion,u=!r&&n!==null&&n.runId===e.runId;if(u&&n!==null&&n.outcome!==null)return null;if(u&&n!==null){const c=IT(n.phase);return M5(Qf(n.runId,a,n.targetVersion,c,s),{kind:"applying",target:n.targetVersion,phase:c,elapsedSeconds:s},!1)}return r?s>OI()?xke(e,s):{surface:wq(e.runId,e.previousVersion,e.attemptedVersion,s),releaseHeld:!1}:t===void 0?{surface:{status:"loading"},releaseHeld:!1}:s>OI()?{surface:{status:"ready",section:{status:"unreachable",runId:e.runId,previousVersion:e.previousVersion,attemptedVersion:e.attemptedVersion,elapsedSeconds:s,logsCommand:n?.logCommand??gq},overlay:{kind:"none"}},releaseHeld:!0}:M5(Qf(e.runId,a,e.attemptedVersion,e.phase,s),{kind:"applying",target:e.attemptedVersion,phase:e.phase,elapsedSeconds:s},!1)}function P5(e){const{data:t,isError:n,dismissedRunId:r,checkPress:o,checkFailure:s,sighting:a,now:u}=e;if(n){const h=TI(t,r);if(h!==null){const m=a!==null&&a.runId===h.runId?a.observedAt:u,g=MI(m,u);return g>OI()?Cq(h.runId,h.fromVersion,h.targetVersion,g,h.logCommand):wq(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 c=t.run,f=c!==null&&r!==null&&c.runId===r;if(c!==null&&!f&&c.outcome!==null)return{status:"ready",section:Eke(t,c,c.outcome),overlay:{kind:"none"}};if(c!==null&&!f&&c.outcome===null){const h=MI(Rv(c.startedAt)??u,u),m=IT(c.phase);return{status:"ready",section:Qf(c.runId,c.fromVersion,c.targetVersion,m,h),overlay:{kind:"applying",target:c.targetVersion,phase:m,elapsedSeconds:h}}}return{status:"ready",section:_ke(t,o,s,u),overlay:{kind:"none"}}}function Ake(e){const{data:t,isError:n,error:r,held:o,now:s}=e,a=t?.run??null;if(yq(r)&&!o)return{surface:{status:"absent"},releaseHeld:!0};if(o){const u=Ike(o,t,a,n,s);return u||{surface:P5(e),releaseHeld:!0}}return{surface:P5(e),releaseHeld:!1}}const Rke=3e4,Tke=5e3,Oke=lA,Mke={...lA,...roe},Pke=3e4,Nke="The updater did not answer. Run `remit logs updater` to see why.";function kke(e,t,n,r){if(yq(e)&&!n)return!1;const o=t!==null&&t.outcome===null;return n||o||r?Tke:Rke}function Dke(){const e=hl(),[t,n]=_.useState(null),[r,o]=_.useState(null),[s,a]=_.useState(null),[u,c]=_.useState(null),[f,h]=_.useState(null),m=_.useRef(t);m.current=t;const g=_.useRef(s);g.current=s;const v=e.getQueryData(vI()),w=t!==null||TI(v,r)!==null,S=tl({...ARe(),retry:!1,meta:w?Mke:Oke,refetchInterval:D=>kke(D.state.error,D.state.data?.run??null,m.current!==null,g.current!==null)}),C=_.useRef(S.data);C.current=S.data;const E=Ake({data:S.data,isError:S.isError,error:S.error,held:t,dismissedRunId:r,checkPress:s,checkFailure:u,sighting:f,now:Date.now()}),I=TI(S.data,r);_.useEffect(()=>{if(I===null){h(D=>D===null?D:null);return}h(D=>D!==null&&D.runId===I.runId?D:{runId:I.runId,observedAt:Date.now()})},[I]);const A=_.useRef(null);A.current=E.surface.status==="ready"&&"runId"in E.surface.section?E.surface.section.runId:null;const{releaseHeld:T}=E;_.useEffect(()=>{T&&n(D=>D===null?D:null)},[T]),_.useEffect(()=>{s!==null&&vq(s,S.data)&&a(null)},[s,S.data]),_.useEffect(()=>{if(s===null)return;const D=s.pressedAt+Pke-Date.now(),j=setTimeout(()=>{a(null),c(Nke)},Math.max(0,D));return()=>clearTimeout(j)},[s]);const{refetch:N}=S,M=_.useCallback(()=>{c(null),a({pressedAt:Date.now(),since:C.current?.check.lastCheckedAt}),QB({query:{refresh:!0},throwOnError:!0}).then(()=>{N()}).catch(D=>{yR(D,lA),a(null),c(Ske(D))})},[N]),R=_.useCallback(()=>{N()},[N]),k=cR({...RRe(),meta:{softError:!0},onSuccess:D=>{const j=D.run;j!==null&&(n({runId:j.runId,attemptedVersion:j.targetVersion,previousVersion:j.fromVersion,phase:IT(j.phase),startedAt:Date.now()}),o(null)),e.setQueryData(vI(),D)},onError:()=>{N()}}),{mutate:L}=k,q=_.useCallback(D=>{L({body:{targetVersion:D}})},[L]),$=_.useCallback(()=>{A.current!==null&&o(A.current),n(null),a(null),c(null)},[]);return{surface:E.surface,appliesSchemaMigration:Cke(S.data),currentVersion:S.data?.currentVersion,release:bq(S.data,Date.now()),onCheck:M,install:q,onDismissResult:$,onRetryConnection:R}}const AT=_.createContext(null);function Lke({children:e}){const t=Dke();return _.createElement(AT.Provider,{value:t},e)}function Uke(){const e=_.useContext(AT);if(e===null)throw new Error("useSelfUpdate must be used within a SelfUpdateProvider");return e}function $ke(){return _.useContext(AT)}function Fke(){const{surface:e,onRetryConnection:t}=Uke();if(e.status!=="ready")return null;const{overlay:n}=e;return n.kind==="applying"?O.jsx(zre,{target:n.target,phase:n.phase,elapsedSeconds:n.elapsedSeconds}):n.kind==="neverCameBack"?O.jsx(jre,{attemptedVersion:n.attemptedVersion,previousVersion:n.previousVersion,elapsedSeconds:n.elapsedSeconds,logsCommand:n.logsCommand,onRetryConnection:t}):null}const zke=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`banner-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,jke=({children:e})=>{const[t,n]=_.useState([]),r=_.useCallback(u=>{if(u.error!=null&&TF(u.error))return qu(u.error).correlationId;const c=BNe({...u,action:LNe(u)},zke(),Date.now());return n(f=>zNe(f,c)),c.id},[]),o=_.useCallback(u=>{n(c=>jNe(c,u))},[]),s=_.useCallback(()=>{n([])},[]),a=_.useMemo(()=>({errors:t,pushError:r,dismissError:o,clearAll:s}),[t,r,o,s]);return O.jsxs(cq.Provider,{value:a,children:[e,O.jsx($ne,{errors:t,onDismiss:o})]})},N5="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 Eq(){const[e,t]=_.useState(Ube),{Account:n}=Lbe(),r=_.useRef(null);return _.useEffect(()=>$be(t),[]),Gv({id:"signed-out",open:e}),Kv(r,e),e?O.jsx("div",{className:"fixed inset-0 z-[70] flex items-center justify-center bg-canvas/80 p-4 backdrop-blur-sm",children:O.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:[O.jsx("h2",{id:"signed-out-title",className:"text-lg font-semibold text-fg",children:"You're signed out"}),O.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."}),O.jsx(n,{fallback:O.jsxs("button",{type:"button",onClick:()=>{cU(),window.location.reload()},className:N5,children:[O.jsx(tk,{className:"size-4","aria-hidden":"true"}),"Sign in"]}),children:({signOut:o})=>O.jsxs("button",{type:"button",onClick:()=>{cU(),o()},className:N5,children:[O.jsx(tk,{className:"size-4","aria-hidden":"true"}),"Sign in"]})})]})}):null}const Bke=({error:e,reset:t,info:n})=>{if(ry(e))return vR(),O.jsx(Eq,{});const r=ey(e),o=qu(e,{recoverable:r,componentStack:n?.componentStack});return O.jsx(UF,{fatal:o,onRetry:r?t:void 0})},ta=qye()({component:Vke,errorComponent:Bke}),Hke=()=>{const{t:e}=YB("common",{useSuspense:!1});return O.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")})},qke=({children:e})=>vc().updateMode==="managed"?e:O.jsxs(Lke,{children:[e,O.jsx(Fke,{})]});function Vke(){return O.jsxs(jke,{children:[O.jsx(pke,{children:O.jsx(gke,{children:O.jsx(qke,{children:O.jsxs(DRe,{children:[O.jsx(Hke,{}),O.jsx("main",{id:"main-content",className:"h-dvh overflow-hidden",children:O.jsx(_.Suspense,{fallback:O.jsx(Qv,{}),children:O.jsx(i7,{})})})]})})})}),O.jsx(LF,{}),O.jsx(Eq,{})]})}const Wke=ye("/")({beforeLoad:()=>{throw pl({to:"/mail/brief"})}}),Gke=vc().apiUrl;le.setConfig({baseUrl:Gke,fetch:S$});le.interceptors.error.use((e,t)=>e instanceof Jv||!t?e:Zre(e,t.status));const Kke=()=>xe(()=>import("./calendar-D_6yFuPu.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])),Zke=ye("/calendar")({loader:({context:{queryClient:e}})=>{e.prefetchQuery(lT())},component:_e(Kke,"component")}),Yke=()=>xe(()=>import("./import-BFpbM0fn.js"),__vite__mapDeps([14,15,16,17,18,19,20,21,22])),Qke=ye("/import")({component:_e(Yke,"component")}),Xke=CT(["match","properties","folder","rule","name","review","run"]),Jke=Gs("search"),e3e=Jke.optional().catch(void 0),t3e=()=>Dy({from:"/mail",select:e=>e.wizardFrom}),n3e=Xke.optional().catch(void 0),r3e=(e,t)=>EF(e,t)+1,_q=()=>Dy({from:"/mail",select:e=>e.wizard}),o3e=()=>{const e=hh();return _.useCallback((t,n)=>{e({to:".",search:r=>({...r,wizard:t,wizardFrom:n})})},[e])},iFe=()=>{const e=_q(),t=o3e(),[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}},aFe=e=>{const t=gr(),n=hh(),r=_q(),o=t3e(),s=_.useRef(r!==void 0),a=_.useRef(o),u=_.useRef(void 0);_.useEffect(()=>{u.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 c=_.useCallback(m=>{m===r||u.current===m||(u.current=m,n({to:".",search:g=>({...g,wizard:m})}))},[n,r]),f=_.useCallback(()=>{t.history.back()},[t]),h=_.useCallback((m,g)=>{t.history.go(-r3e(m,g))},[t]);return{step:r,goToStep:c,goBack:f,closeWizard:h}},xc=Qn({q:dn().optional()}),RT=xc.extend({}),xq=xc.extend({}),Iq=xc.extend({}),s3e=xc.extend({}),Aq=xc.extend({}),Rq=RT,i3e=xc.extend({wizard:n3e,wizardFrom:e3e}),Vm=Qn({body:dn().optional()}),lFe=e=>{const{body:t,...n}=e;return n},lb={brief:RT.extend(Vm.shape),flagged:xq.extend(Vm.shape),mailbox:Aq.extend(Vm.shape),label:Iq.extend(Vm.shape)},a3e=new Map;function uFe(e){const t=new Map;for(const n of e){const r=ab(n.folderAppointments);for(const[o,s]of r)t.set(o,{role:s});for(const o of n.mailboxes){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 cFe(e){const t=[];for(const[n,r]of e)r.role==="junk"&&t.push(n);return t}function dFe(e,t){const n=t[0];if(!e)return n?{mailboxId:n}:{};for(const o of t){const s=e.get(o);if(s&&hre(s)!==void 0)return{mailboxId:o,folder:s}}if(!n)return{};const r=e.get(n);return{mailboxId:n,...r?{folder:r}:{}}}const l3e=_.createContext(null),fFe=()=>_.useContext(l3e)??{accounts:[],mailboxNameIndex:new Map,accountNameIndex:new Map,resultFolderIndex:a3e,searchQuery:"",searchInput:"",searchViewKey:"",onSearchChange:()=>{},onSearchClear:()=>{},onSearchClearQuery:()=>{},intelligenceOpen:!1,onToggleIntelligence:()=>{},onRaiseIntelligence:()=>{}},u3e=()=>xe(()=>import("./mail-DZQ29OS_.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])),c3e=ye("/mail")({loader:({context:{queryClient:e}})=>{e.prefetchQuery(lT()),e.prefetchQuery({...TRe(),staleTime:6e4})},component:_e(u3e,"component"),validateSearch:i3e}),d3e=()=>xe(()=>import("./onboarding-CJFUg80G.js"),__vite__mapDeps([47,48,15,16,17,18,19,30,10,21,46,49,22])),f3e=ye("/onboarding")({component:_e(d3e,"component")});function h3e(){const e=$ke(),t=e?.surface.status==="ready"&&e.surface.section.status==="available";return O.jsx(hF,{label:t?"Update available":void 0,children:O.jsx(_te,{className:"size-4"})})}function p3e(){return tl({...vRe()})}const y_={listed:"Sync warnings",unread:"Warnings could not be read",signedOut:"Session ended"};function m3e(e,t){if(ry(t))return y_.signedOut;if(t)return y_.unread;if(e&&((e.entries?.length??0)>0||(e.warnings?.length??0)>0))return y_.listed}function g3e(){const e=p3e();return m3e(e.data,e.error)}function v3e(){const e=g3e();return O.jsx(hF,{label:e,children:O.jsx(oA,{className:"size-4"})})}const y3e=oy(403,404),hFe={...oy(403,404,409,429),...ooe},b3e=new Set([Da.SignInDisabled,Da.CallerDisabled]),Tq=e=>{if(pn(e)!==403)return!1;const t=ll(e)?.code;return t!==void 0&&b3e.has(t)},S3e=e=>{if(ny(e))return"The server could not be reached. Nothing changed. Try again.";const t=ll(e)?.code;return t===Da.CannotDisableSelf?"You cannot disable your own account, so one account always stays on.":t===Da.StepUpRequired?"The password check did not carry over to the action. Nothing changed. Try again.":t===Da.ForeignOrigin?"The server refused a request from this address. Nothing changed. Open this page from the server's own address.":pn(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."},pFe=e=>ny(e)?"The server could not be reached. Check your connection and try again.":"The server did not answer as expected. Try again.",mFe=e=>{if(pn(e)===401||Tq(e))return{kind:"signedOut"};const t=ll(e)?.code;return t===Da.WrongPassword?{kind:"wrongPassword"}:t===Da.StepUpLocked?{kind:"locked"}:{kind:"failed",reason:S3e(e)}},gFe=(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},vFe=(e,t)=>{const n=pn(t),r=ll(t)?.code,o=t instanceof Error?t.message:String(t),s=[n??"no response",r,o].filter(a=>a!==void 0&&a!=="").join(" ");return ih(Vu({title:`People: ${e}`,errorMessage:`${e}. The server answered: ${s}`}))},w3e=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),yFe=(e,t)=>w3e(new Date(e),t)?"Today":iq(e,"medium"),bFe=(e,t)=>e.map(n=>n.userId===t.userId?t:n),C3e=()=>({...xRe(),meta:y3e,retry:!1}),E3e=()=>{const e=tl(C3e()),t=e.isError&&Tq(e.error);return _.useEffect(()=>{t&&vR()},[t]),{...e,unavailable:e.isError&&OF(e.error)}},Oq=_.createContext([]),_3e=Oq.Provider,x3e=()=>_.useContext(Oq),I3e=()=>xe(()=>import("./settings-BIc36rPe.js"),[]),A3e=[{id:"accounts",label:"Accounts",icon:O.jsx(U$,{className:"size-4"})},{id:"senders",label:"Senders & Rules",icon:O.jsx(Ete,{className:"size-4"})},{id:"folders",label:"Folder roles",icon:O.jsx(dte,{className:"size-4"})},{id:"filters",label:"Filters",icon:O.jsx(fte,{className:"size-4"})},{id:"labels",label:"Labels",icon:O.jsx(Ste,{className:"size-4"})},{id:"classification",label:"Mail classification",icon:O.jsx(yte,{className:"size-4"})},{id:"calendars",label:"Calendars",icon:O.jsx(ote,{className:"size-4"})},{id:"appearance",label:"Appearance",icon:O.jsx(mte,{className:"size-4"})},{id:"warnings",label:"Warnings",icon:O.jsx(v3e,{})},{id:"advanced",label:"Advanced",icon:O.jsx(h3e,{})}],R3e={id:"people",label:"People",icon:O.jsx(Cte,{className:"size-4"})},SFe=()=>{const e=E3e(),t=x3e(),n=[...A3e];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),R3e,...n.slice(r)]},T3e=ye("/settings")({component:_e(I3e,"component")}),O3e=["year","month","week","day","agenda"],M3e=CT(O3e),Mq="week",wFe=e=>e==="agenda";function P3e(e){const t=M3e.safeParse(e);return t.success?t.data:void 0}const N3e=/^\d{4}-\d{2}-\d{2}$/;function k3e(e){if(!N3e.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 ac=e=>String(e).padStart(2,"0");function Pq(e){return`${e.getFullYear()}-${ac(e.getMonth()+1)}-${ac(e.getDate())}`}function D3e(e,t){return{view:P3e(e.view)??Mq,date:k3e(e.date)??t}}function CFe(e,t,n){const[r,o,s]=e.split("-").map(Number);if(t==="year")return k5(r+n,o,s);if(t==="month")return k5(r,o+n,s);const a=t==="day"?1:7,u=new Date(Date.UTC(r,o-1,s+a*n));return L3e(u)}const L3e=e=>`${e.getUTCFullYear()}-${ac(e.getUTCMonth()+1)}-${ac(e.getUTCDate())}`;function k5(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}-${ac(o)}-${ac(Math.min(n,s))}`}const U3e=dn().min(1);function $3e(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=U3e.safeParse(String(r));o.success&&n.add(o.data)}return[...n].sort()}const TT=Qn({calendarId:Av().transform($3e).transform(e=>e.length===0?void 0:e).optional()});function EFe(e,t){return t?e==="week"?"day":e==="year"?"month":e:e}const F3e=ye("/calendar/")({validateSearch:TT,beforeLoad:({search:e,location:t})=>{throw pl({to:"/calendar/$view/$date",params:{view:Mq,date:Pq(new Date)},search:e,hash:t.hash,replace:!0})}}),z3e=ye("/mail/")({validateSearch:Rq,beforeLoad:({search:e,location:t})=>{throw pl({to:"/mail/brief",search:e,hash:t.hash,replace:!0})}}),j3e=()=>xe(()=>import("./_mailboxId-BRoS8Mwj.js"),__vite__mapDeps([50,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,51,52,39,38,40,9,53,54,46,18,55,56,8,10,57,7,58,59,60,61,62,63,12,64,49,65,66,67,2,41,68,16,69,70,37,35,36,71,72,73,74,75,76])),B3e=ye("/mail/$mailboxId")({component:_e(j3e,"component"),validateSearch:Aq}),H3e=()=>xe(()=>import("./brief-xjy0DnZr.js"),__vite__mapDeps([77,13])),q3e=()=>xe(()=>import("./brief-B2lB0FJy.js"),__vite__mapDeps([78,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,79,53,54,46,9,39,38,40,18,55,56,8,10,57,7,58,59,60,61,62,63,12,64,49,65,66,67,2,41,68,16,69,70,71,35,36,37,80,76])),V3e=ye("/mail/brief")({component:_e(q3e,"component"),validateSearch:RT,errorComponent:_e(H3e,"errorComponent")}),W3e=()=>xe(()=>import("./flagged-BIfTM0zc.js"),__vite__mapDeps([81,13])),G3e=()=>xe(()=>import("./flagged-BH8Kawij.js"),__vite__mapDeps([82,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,83,52,39,38,40,9,53,54,46,18,55,56,8,10,57,7,58,59,60,61,62,63,12,64,49,65,66,67,2,41,68,16,69,70,37,80,76])),K3e=ye("/mail/flagged")({component:_e(G3e,"component"),validateSearch:xq,errorComponent:_e(W3e,"errorComponent")}),Z3e=()=>xe(()=>import("./outbox-D-d3HzZr.js"),__vite__mapDeps([84,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,85,54,46,44,72,41,9,36,65,86,87,76])),Y3e=ye("/mail/outbox")({component:_e(Z3e,"component"),validateSearch:s3e}),Q3e=ye("/reset-password/$token")({beforeLoad:()=>{throw pl({to:"/"})}}),X3e=()=>xe(()=>import("./index-muoe1j5g.js"),[]),J3e=ye("/settings/")({component:_e(X3e,"component")}),eDe=()=>xe(()=>import("./_slotId-F8i3-z-s.js"),__vite__mapDeps([88,4,3,6,89,7,18,90,41,74])),tDe=ye("/settings/$slotId")({component:_e(eDe,"component")}),nDe=()=>xe(()=>import("./accounts-BKuizqtY.js"),__vite__mapDeps([91,48,15,16,17,18,19,30,10,21,46,49,29,92,33,13,57,6,93,89,7,90,41,74,62,86])),rDe=Qn({editAccountId:dn().optional(),focusSmtp:wT().optional(),connected:dn().optional(),oauthError:dn().optional(),oauthEmail:dn().optional(),missingServices:dn().optional()}),oDe=ye("/settings/accounts")({component:_e(nDe,"component"),validateSearch:rDe}),sDe=()=>xe(()=>import("./advanced-DJpNc3kM.js"),__vite__mapDeps([94,20,4,3,5,6,19,57,18,21,87,75,95,67,65,93,46,89,7,90,41,74])),iDe=ye("/settings/advanced")({component:_e(sDe,"component")}),aDe=()=>xe(()=>import("./appearance-N8-8YrHT.js"),__vite__mapDeps([96,6,93,46,89,7,18,90,41,74,66])),lDe=ye("/settings/appearance")({component:_e(aDe,"component")}),uDe=()=>xe(()=>import("./calendars-Zl5qFuho.js"),__vite__mapDeps([97,60,13,38,16,17,19,62,98,31,99,100,25,74,33,18,37,101,6,89,7,90,41])),cDe=ye("/settings/calendars")({component:_e(uDe,"component")}),dDe=()=>xe(()=>import("./classification-B4oAmRL8.js"),__vite__mapDeps([102,103,13,16,17,33,92,18,6,89,7,90,41,74])),fDe=ye("/settings/classification")({component:_e(dDe,"component")}),hDe=()=>xe(()=>import("./filters-BdDuzTmL.js"),__vite__mapDeps([104,13,3,40,68,32,16,17,62,70,66,75,73,18,6,89,7,90,41,74])),pDe=ye("/settings/filters")({component:_e(hDe,"component")}),mDe=()=>xe(()=>import("./folders-DQc8V606.js"),__vite__mapDeps([105,69,43,6,89,7,18,90,41,74,13,16,17,25])),gDe=ye("/settings/folders")({component:_e(mDe,"component")}),vDe=()=>xe(()=>import("./labels-ra9ROlwe.js"),__vite__mapDeps([106,70,40,16,17,6,89,7,18,90,41,74,13,33])),yDe=ye("/settings/labels")({component:_e(vDe,"component")}),bDe=()=>xe(()=>import("./people-Dj45Sj6w.js"),__vite__mapDeps([107,103,101,56,6,89,7,18,90,41,74])),SDe=ye("/settings/people")({component:_e(bDe,"component")}),wDe=()=>xe(()=>import("./senders-Bb7Q_eFp.js"),__vite__mapDeps([108,31,6,93,46,13,89,7,18,90,41,74])),CDe=ye("/settings/senders")({component:_e(wDe,"component")}),EDe=()=>xe(()=>import("./suggested-vips-D-q4Ski_.js"),[]),_De=ye("/settings/suggested-vips")({component:_e(EDe,"component")}),xDe=()=>xe(()=>import("./warnings-CyUEYIiz.js"),__vite__mapDeps([109,42,38,18,75,101,95,13,6,93,46,89,7,90,41,74])),IDe=ye("/settings/warnings")({component:_e(xDe,"component")}),ADe=()=>xe(()=>import("./_view._date-BEWywi53.js"),__vite__mapDeps([110,60,13,38,98,31,111,112,4,3,5,12,59,61,10,62,63,65,113,45,17,90,114,115,99,100,25,74,116,64,16,41,2,117])),RDe=ye("/calendar/$view/$date")({validateSearch:TT,beforeLoad:({params:e,search:t,location:n})=>{const r=D3e(e,Pq(new Date));if(!(r.view===e.view&&r.date===e.date))throw pl({to:"/calendar/$view/$date",params:r,search:t,hash:n.hash,replace:!0})},component:_e(ADe,"component")}),TDe=()=>xe(()=>import("./index-cDwHPIf0.js"),__vite__mapDeps([118,51,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,18,55,56,8,13,10,57,7,58,59,60,61,62,63,12,64,49,65,66,67,2,41,68,16,69,33,70,37,35,36,71,72,73,74,75])),ODe=ye("/mail/$mailboxId/")({component:_e(TDe,"component")}),MDe=()=>xe(()=>import("./_threadId-Dtgsuh5z.js"),[]),PDe=ye("/mail/$mailboxId/$threadId")({component:_e(MDe,"component")}),NDe=()=>xe(()=>import("./index-BHkrM-Kn.js"),__vite__mapDeps([119,79,53,54,46,34,11,4,3,5,24,9,17,39,38,40,28,29,30,31,32,6,18,55,56,8,13,10,57,7,58,59,60,61,62,63,12,64,49,65,66,67,2,41,68,16,69,33,70,71,35,36,37,80])),kDe=ye("/mail/brief/")({component:_e(NDe,"component")}),DDe=()=>xe(()=>import("./_threadId-DClgthvx.js"),[]),LDe=ye("/mail/brief/$threadId")({component:_e(DDe,"component")}),UDe=()=>xe(()=>import("./index-DdvMNVJS.js"),__vite__mapDeps([120,83,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,18,55,56,8,13,10,57,7,58,59,60,61,62,63,12,64,49,65,66,67,2,41,68,16,69,33,70,37,80])),$De=ye("/mail/flagged/")({component:_e(UDe,"component")}),FDe=()=>xe(()=>import("./_threadId-CiXEbmEZ.js"),[]),zDe=ye("/mail/flagged/$threadId")({component:_e(FDe,"component")}),jDe=ye("/mail/label/")({validateSearch:Rq,beforeLoad:({search:e,location:t})=>{throw pl({to:"/mail/brief",search:e,hash:t.hash,replace:!0})}}),BDe=()=>xe(()=>import("./_labelId-DABFD4PZ.js"),__vite__mapDeps([121,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,83,52,39,38,40,9,53,54,46,18,55,56,8,10,57,7,58,59,60,61,62,63,12,64,49,65,66,67,2,41,68,16,69,70,37,80,76])),HDe=ye("/mail/label/$labelId")({component:_e(BDe,"component"),validateSearch:Iq}),qDe=()=>xe(()=>import("./index-BG0V0va3.js"),__vite__mapDeps([122,85,54,46,34,11,4,3,5,24,44,72,41,9,36,65,86,87])),VDe=ye("/mail/outbox/")({component:_e(qDe,"component")}),WDe=()=>xe(()=>import("./index-DtqBFgK5.js"),[]),GDe=ye("/calendar/$view/$date/")({component:_e(WDe,"component")}),KDe=()=>xe(()=>import("./_calendarObjectId-CEpV_AQA.js"),[]),ZDe=ye("/calendar/$view/$date/$calendarObjectId")({component:_e(KDe,"component")}),Os=e=>String(e).padStart(2,"0"),Nq=e=>`${e.getUTCFullYear()}-${Os(e.getUTCMonth()+1)}-${Os(e.getUTCDate())}`,OT=e=>{const t=e<0?"-":"+",n=Math.abs(e);return`${t}${Os(Math.floor(n/60))}:${Os(n%60)}`};function kq(e,t){const n=new Date(`${e}T${t}:00`);return`${e}T${t}:00${OT(-n.getTimezoneOffset())}`}const b_=new Map;function YDe(e){if(b_.has(e))return b_.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 b_.set(e,t),t}function PI(e,t){const n=YDe(e);if(!n)return Number.NaN;const r=n.formatToParts(new Date(t)),o=u=>Number(r.find(c=>c.type===u)?.value),s=o("hour")%24;return(Date.UTC(o("year"),o("month")-1,o("day"),s,o("minute"),o("second"))-t)/6e4}function D5(e,t,n){if(n==="")return`${e}T${t}:00+00:00`;const r=Date.parse(`${e}T${t}:00Z`),o=PI(n,r);if(Number.isNaN(o))return kq(e,t);const s=PI(n,r-o*6e4);return`${e}T${t}:00${OT(Number.isNaN(s)?o:s)}`}function L5(e,t){const n=Date.parse(e),r=PI(t,n),o=Number.isNaN(r)?-new Date(n).getTimezoneOffset():r,s=new Date(n+o*6e4);return`${Nq(s)}T${Os(s.getUTCHours())}:${Os(s.getUTCMinutes())}:${Os(s.getUTCSeconds())}${OT(o)}`}const Tv=e=>kq(e,"00:00");function Li(e,t){const[n,r,o]=e.split("-").map(Number);return Nq(new Date(Date.UTC(n,r-1,o+t)))}function S_(e){const[t,n,r]=e.split("-").map(Number),o=new Date(Date.UTC(t,n-1,r));return Li(e,-((o.getUTCDay()+6)%7))}function QDe(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}-${Os(r)}-01`,a=r===12?`${n+1}-01-01`:`${n}-${Os(r+1)}-01`;return[S_(s),Li(S_(Li(a,-1)),7)]}if(e==="day")return[t,Li(t,1)];const o=S_(t);return[o,Li(o,7)]}function _Fe(e,t){const[n,r]=QDe(e,t);return{from:Tv(n),to:Tv(r)}}function xFe(e,t){return{from:Tv(e),to:Tv(Li(e,t))}}const XDe=oNe({offset:!0,local:!1}),Dq=sNe(),U5=Av().transform(e=>{const t=nq([XDe,Dq]).safeParse(e);return t.success?t.data:void 0}).optional(),JDe=TT.extend({start:U5,end:U5}),Wm=e=>Dq.safeParse(e).success;function Gm(e){return{date:e,endDate:e,startTime:"09:00",endTime:"10:00",allDay:!1}}function IFe(e,t,n,r){if(e===void 0||t===void 0)return Gm(n);if(Wm(e)&&Wm(t)){const a=Li(t,-1);return a<e?Gm(n):{date:e,endDate:a,startTime:"",endTime:"",allDay:!0}}if(Wm(e)||Wm(t)||Date.parse(t)<=Date.parse(e))return Gm(n);const o=L5(e,r),s=L5(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 AFe(e,t){return e.allDay?{start:e.date,end:Li(e.endDate,1)}:{start:D5(e.date,e.startTime,t),end:D5(e.endDate,e.endTime,t)}}const eLe=()=>xe(()=>import("./new-CcqLVf2J.js"),__vite__mapDeps([123,124,115,61,99,100,60,13,38,25,74,112,111,98,31,63,4,3,12,5,114,116,125,16,17,33])),tLe=ye("/calendar/$view/$date/new")({validateSearch:JDe,component:_e(eLe,"component")}),nLe=()=>xe(()=>import("./index-BTtnQ0o_.js"),__vite__mapDeps([126,51,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,18,55,56,8,13,10,57,7,58,59,60,61,62,63,12,64,49,65,66,67,2,41,68,16,69,33,70,37,35,36,71,72,73,74,75])),rLe=ye("/mail/$mailboxId/$threadId/")({component:_e(nLe,"component")}),oLe=()=>xe(()=>import("./_messageId-BTtnQ0o_.js"),__vite__mapDeps([127,51,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,18,55,56,8,13,10,57,7,58,59,60,61,62,63,12,64,49,65,66,67,2,41,68,16,69,33,70,37,35,36,71,72,73,74,75])),sLe=ye("/mail/$mailboxId/$threadId/$messageId")({component:_e(oLe,"component")}),iLe=()=>xe(()=>import("./compose._-_outboxMessageId_-B_bwVs79.js"),__vite__mapDeps([128,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),aLe=ye("/mail/$mailboxId/compose/{-$outboxMessageId}")({component:_e(iLe,"component")}),lLe=()=>xe(()=>import("./index-UxNdXfkW.js"),__vite__mapDeps([129,79,53,54,46,34,11,4,3,5,24,9,17,39,38,40,28,29,30,31,32,6,18,55,56,8,13,10,57,7,58,59,60,61,62,63,12,64,49,65,66,67,2,41,68,16,69,33,70,71,35,36,37,80])),uLe=ye("/mail/brief/$threadId/")({component:_e(lLe,"component")}),cLe=()=>xe(()=>import("./_messageId-UxNdXfkW.js"),__vite__mapDeps([130,79,53,54,46,34,11,4,3,5,24,9,17,39,38,40,28,29,30,31,32,6,18,55,56,8,13,10,57,7,58,59,60,61,62,63,12,64,49,65,66,67,2,41,68,16,69,33,70,71,35,36,37,80])),dLe=ye("/mail/brief/$threadId/$messageId")({component:_e(cLe,"component")}),fLe=()=>xe(()=>import("./compose._-_outboxMessageId_-HahCa7sA.js"),__vite__mapDeps([131,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),hLe=ye("/mail/brief/compose/{-$outboxMessageId}")({component:_e(fLe,"component")}),pLe=()=>xe(()=>import("./index-DU8baGSk.js"),__vite__mapDeps([132,83,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,18,55,56,8,13,10,57,7,58,59,60,61,62,63,12,64,49,65,66,67,2,41,68,16,69,33,70,37,80])),mLe=ye("/mail/flagged/$threadId/")({component:_e(pLe,"component")}),gLe=()=>xe(()=>import("./_messageId-DxeGB2Ak.js"),__vite__mapDeps([133,83,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,18,55,56,8,13,10,57,7,58,59,60,61,62,63,12,64,49,65,66,67,2,41,68,16,69,33,70,37,80])),vLe=ye("/mail/flagged/$threadId/$messageId")({component:_e(gLe,"component")}),yLe=()=>xe(()=>import("./compose._-_outboxMessageId_-BXrZc_aU.js"),__vite__mapDeps([134,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),bLe=ye("/mail/flagged/compose/{-$outboxMessageId}")({component:_e(yLe,"component")}),SLe=()=>xe(()=>import("./index-C3cMdadO.js"),__vite__mapDeps([135,83,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,18,55,56,8,13,10,57,7,58,59,60,61,62,63,12,64,49,65,66,67,2,41,68,16,69,33,70,37,80])),wLe=ye("/mail/label/$labelId/")({component:_e(SLe,"component")}),CLe=()=>xe(()=>import("./_threadId-BxgdFrfy.js"),[]),ELe=ye("/mail/label/$labelId/$threadId")({component:_e(CLe,"component")}),_Le=()=>xe(()=>import("./compose._-_outboxMessageId_-CZX2i0CY.js"),__vite__mapDeps([136,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),xLe=ye("/mail/outbox/compose/{-$outboxMessageId}")({component:_e(_Le,"component")}),ILe=()=>xe(()=>import("./_outboxMessageId-buKygU4B.js"),__vite__mapDeps([137,85,54,46,34,11,4,3,5,24,44,72,41,9,36,65,86,87])),ALe=ye("/mail/outbox/draft/$outboxMessageId")({component:_e(ILe,"component")}),RLe=()=>xe(()=>import("./index-BUGqdwU9.js"),__vite__mapDeps([138,139,60,13,38,112,111,63,4,3,12,5,116,100,25,99,74,33])),TLe=ye("/calendar/$view/$date/$calendarObjectId/")({component:_e(RLe,"component")}),OLe=()=>xe(()=>import("./_recurrenceId-6oeOt-u4.js"),[]),MLe=ye("/calendar/$view/$date/$calendarObjectId/$recurrenceId")({component:_e(OLe,"component")}),PLe=()=>xe(()=>import("./edit-BRJX6z-q.js"),__vite__mapDeps([140,124,115,61,99,100,60,13,38,25,74,112,111,98,31,63,4,3,12,5,114,116,125,16,17,33])),NLe=ye("/calendar/$view/$date/$calendarObjectId/edit")({component:_e(PLe,"component")}),kLe=()=>xe(()=>import("./suggestion._suggestionId-B5pkmBKQ.js"),__vite__mapDeps([141,60,13,38,115,61,99,100,25,74,63,116,64,58,125,16,17,4,3,12,5])),DLe=ye("/calendar/$view/$date/suggestion/$suggestionId")({component:_e(kLe,"component")}),LLe=()=>xe(()=>import("./task._calendarTaskId-BDTL-x3M.js"),__vite__mapDeps([142,60,13,38,111,4,3,12,5,113,100,25])),ULe=ye("/calendar/$view/$date/task/$calendarTaskId")({component:_e(LLe,"component")}),$Le=()=>xe(()=>import("./index-hxyTtlVC.js"),__vite__mapDeps([143,83,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,18,55,56,8,13,10,57,7,58,59,60,61,62,63,12,64,49,65,66,67,2,41,68,16,69,33,70,37,80])),FLe=ye("/mail/label/$labelId/$threadId/")({component:_e($Le,"component")}),zLe=()=>xe(()=>import("./_messageId-C0UBmFqw.js"),__vite__mapDeps([144,83,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,18,55,56,8,13,10,57,7,58,59,60,61,62,63,12,64,49,65,66,67,2,41,68,16,69,33,70,37,80])),jLe=ye("/mail/label/$labelId/$threadId/$messageId")({component:_e(zLe,"component")}),BLe=()=>xe(()=>import("./compose._-_outboxMessageId_-BBirD1SC.js"),__vite__mapDeps([145,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),HLe=ye("/mail/label/$labelId/compose/{-$outboxMessageId}")({component:_e(BLe,"component")}),qLe=()=>xe(()=>import("./index-Cu349H81.js"),__vite__mapDeps([146,139,60,13,38,112,111,63,4,3,12,5,116,100,25,99,74,33])),VLe=ye("/calendar/$view/$date/$calendarObjectId/$recurrenceId/")({component:_e(qLe,"component")}),WLe=()=>xe(()=>import("./edit-C3-Hl_Ov.js"),__vite__mapDeps([147,124,115,61,99,100,60,13,38,25,74,112,111,98,31,63,4,3,12,5,114,116,125,16,17,33])),GLe=ye("/calendar/$view/$date/$calendarObjectId/$recurrenceId/edit")({component:_e(WLe,"component")}),KLe=ye("/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}")({validateSearch:lb.mailbox}),ZLe=ye("/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}")({validateSearch:lb.brief}),YLe=ye("/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}")({validateSearch:lb.flagged}),QLe=ye("/mail/label/$labelId/$threadId/$messageId/$mode/{-$outboxMessageId}")({validateSearch:lb.label}),XLe=Wke.update({id:"/",path:"/",getParentRoute:()=>ta}),MT=Zke.update({id:"/calendar",path:"/calendar",getParentRoute:()=>ta}),JLe=Qke.update({id:"/import",path:"/import",getParentRoute:()=>ta}),na=c3e.update({id:"/mail",path:"/mail",getParentRoute:()=>ta}),e4e=f3e.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>ta}),Xn=T3e.update({id:"/settings",path:"/settings",getParentRoute:()=>ta}),t4e=F3e.update({id:"/",path:"/",getParentRoute:()=>MT}),n4e=z3e.update({id:"/",path:"/",getParentRoute:()=>na}),ub=B3e.update({id:"/$mailboxId",path:"/$mailboxId",getParentRoute:()=>na}),cb=V3e.update({id:"/brief",path:"/brief",getParentRoute:()=>na}),db=K3e.update({id:"/flagged",path:"/flagged",getParentRoute:()=>na}),fb=Y3e.update({id:"/outbox",path:"/outbox",getParentRoute:()=>na}),r4e=Q3e.update({id:"/reset-password/$token",path:"/reset-password/$token",getParentRoute:()=>ta}),o4e=J3e.update({id:"/",path:"/",getParentRoute:()=>Xn}),s4e=tDe.update({id:"/$slotId",path:"/$slotId",getParentRoute:()=>Xn}),i4e=oDe.update({id:"/accounts",path:"/accounts",getParentRoute:()=>Xn}),a4e=iDe.update({id:"/advanced",path:"/advanced",getParentRoute:()=>Xn}),l4e=lDe.update({id:"/appearance",path:"/appearance",getParentRoute:()=>Xn}),u4e=cDe.update({id:"/calendars",path:"/calendars",getParentRoute:()=>Xn}),c4e=fDe.update({id:"/classification",path:"/classification",getParentRoute:()=>Xn}),d4e=pDe.update({id:"/filters",path:"/filters",getParentRoute:()=>Xn}),f4e=gDe.update({id:"/folders",path:"/folders",getParentRoute:()=>Xn}),h4e=yDe.update({id:"/labels",path:"/labels",getParentRoute:()=>Xn}),p4e=SDe.update({id:"/people",path:"/people",getParentRoute:()=>Xn}),m4e=CDe.update({id:"/senders",path:"/senders",getParentRoute:()=>Xn}),g4e=_De.update({id:"/suggested-vips",path:"/suggested-vips",getParentRoute:()=>Xn}),v4e=IDe.update({id:"/warnings",path:"/warnings",getParentRoute:()=>Xn}),Ic=RDe.update({id:"/$view/$date",path:"/$view/$date",getParentRoute:()=>MT}),y4e=ODe.update({id:"/",path:"/",getParentRoute:()=>ub}),PT=PDe.update({id:"/$threadId",path:"/$threadId",getParentRoute:()=>ub}),b4e=kDe.update({id:"/",path:"/",getParentRoute:()=>cb}),NT=LDe.update({id:"/$threadId",path:"/$threadId",getParentRoute:()=>cb}),S4e=$De.update({id:"/",path:"/",getParentRoute:()=>db}),kT=zDe.update({id:"/$threadId",path:"/$threadId",getParentRoute:()=>db}),w4e=jDe.update({id:"/label/",path:"/label/",getParentRoute:()=>na}),hb=HDe.update({id:"/label/$labelId",path:"/label/$labelId",getParentRoute:()=>na}),C4e=VDe.update({id:"/",path:"/",getParentRoute:()=>fb}),E4e=GDe.update({id:"/",path:"/",getParentRoute:()=>Ic}),pb=ZDe.update({id:"/$calendarObjectId",path:"/$calendarObjectId",getParentRoute:()=>Ic}),_4e=tLe.update({id:"/new",path:"/new",getParentRoute:()=>Ic}),x4e=rLe.update({id:"/",path:"/",getParentRoute:()=>PT}),Lq=sLe.update({id:"/$messageId",path:"/$messageId",getParentRoute:()=>PT}),I4e=aLe.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>ub}),A4e=uLe.update({id:"/",path:"/",getParentRoute:()=>NT}),Uq=dLe.update({id:"/$messageId",path:"/$messageId",getParentRoute:()=>NT}),R4e=hLe.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>cb}),T4e=mLe.update({id:"/",path:"/",getParentRoute:()=>kT}),$q=vLe.update({id:"/$messageId",path:"/$messageId",getParentRoute:()=>kT}),O4e=bLe.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>db}),M4e=wLe.update({id:"/",path:"/",getParentRoute:()=>hb}),DT=ELe.update({id:"/$threadId",path:"/$threadId",getParentRoute:()=>hb}),P4e=xLe.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>fb}),N4e=ALe.update({id:"/draft/$outboxMessageId",path:"/draft/$outboxMessageId",getParentRoute:()=>fb}),k4e=TLe.update({id:"/",path:"/",getParentRoute:()=>pb}),LT=MLe.update({id:"/$recurrenceId",path:"/$recurrenceId",getParentRoute:()=>pb}),D4e=NLe.update({id:"/edit",path:"/edit",getParentRoute:()=>pb}),L4e=DLe.update({id:"/suggestion/$suggestionId",path:"/suggestion/$suggestionId",getParentRoute:()=>Ic}),U4e=ULe.update({id:"/task/$calendarTaskId",path:"/task/$calendarTaskId",getParentRoute:()=>Ic}),$4e=FLe.update({id:"/",path:"/",getParentRoute:()=>DT}),Fq=jLe.update({id:"/$messageId",path:"/$messageId",getParentRoute:()=>DT}),F4e=HLe.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>hb}),z4e=VLe.update({id:"/",path:"/",getParentRoute:()=>LT}),j4e=GLe.update({id:"/edit",path:"/edit",getParentRoute:()=>LT}),B4e=KLe.update({id:"/$mode/{-$outboxMessageId}",path:"/$mode/{-$outboxMessageId}",getParentRoute:()=>Lq}),H4e=ZLe.update({id:"/$mode/{-$outboxMessageId}",path:"/$mode/{-$outboxMessageId}",getParentRoute:()=>Uq}),q4e=YLe.update({id:"/$mode/{-$outboxMessageId}",path:"/$mode/{-$outboxMessageId}",getParentRoute:()=>$q}),V4e=QLe.update({id:"/$mode/{-$outboxMessageId}",path:"/$mode/{-$outboxMessageId}",getParentRoute:()=>Fq}),W4e={CalendarViewDateCalendarObjectIdRecurrenceIdEditRoute:j4e,CalendarViewDateCalendarObjectIdRecurrenceIdIndexRoute:z4e},G4e=LT._addFileChildren(W4e),K4e={CalendarViewDateCalendarObjectIdRecurrenceIdRoute:G4e,CalendarViewDateCalendarObjectIdEditRoute:D4e,CalendarViewDateCalendarObjectIdIndexRoute:k4e},Z4e=pb._addFileChildren(K4e),Y4e={CalendarViewDateCalendarObjectIdRoute:Z4e,CalendarViewDateNewRoute:_4e,CalendarViewDateIndexRoute:E4e,CalendarViewDateSuggestionSuggestionIdRoute:L4e,CalendarViewDateTaskCalendarTaskIdRoute:U4e},Q4e=Ic._addFileChildren(Y4e),X4e={CalendarIndexRoute:t4e,CalendarViewDateRoute:Q4e},J4e=MT._addFileChildren(X4e),eUe={MailMailboxIdThreadIdMessageIdModeChar123OutboxMessageIdChar125Route:B4e},tUe=Lq._addFileChildren(eUe),nUe={MailMailboxIdThreadIdMessageIdRoute:tUe,MailMailboxIdThreadIdIndexRoute:x4e},rUe=PT._addFileChildren(nUe),oUe={MailMailboxIdThreadIdRoute:rUe,MailMailboxIdIndexRoute:y4e,MailMailboxIdComposeChar123OutboxMessageIdChar125Route:I4e},sUe=ub._addFileChildren(oUe),iUe={MailBriefThreadIdMessageIdModeChar123OutboxMessageIdChar125Route:H4e},aUe=Uq._addFileChildren(iUe),lUe={MailBriefThreadIdMessageIdRoute:aUe,MailBriefThreadIdIndexRoute:A4e},uUe=NT._addFileChildren(lUe),cUe={MailBriefThreadIdRoute:uUe,MailBriefIndexRoute:b4e,MailBriefComposeChar123OutboxMessageIdChar125Route:R4e},dUe=cb._addFileChildren(cUe),fUe={MailFlaggedThreadIdMessageIdModeChar123OutboxMessageIdChar125Route:q4e},hUe=$q._addFileChildren(fUe),pUe={MailFlaggedThreadIdMessageIdRoute:hUe,MailFlaggedThreadIdIndexRoute:T4e},mUe=kT._addFileChildren(pUe),gUe={MailFlaggedThreadIdRoute:mUe,MailFlaggedIndexRoute:S4e,MailFlaggedComposeChar123OutboxMessageIdChar125Route:O4e},vUe=db._addFileChildren(gUe),yUe={MailOutboxIndexRoute:C4e,MailOutboxComposeChar123OutboxMessageIdChar125Route:P4e,MailOutboxDraftOutboxMessageIdRoute:N4e},bUe=fb._addFileChildren(yUe),SUe={MailLabelLabelIdThreadIdMessageIdModeChar123OutboxMessageIdChar125Route:V4e},wUe=Fq._addFileChildren(SUe),CUe={MailLabelLabelIdThreadIdMessageIdRoute:wUe,MailLabelLabelIdThreadIdIndexRoute:$4e},EUe=DT._addFileChildren(CUe),_Ue={MailLabelLabelIdThreadIdRoute:EUe,MailLabelLabelIdIndexRoute:M4e,MailLabelLabelIdComposeChar123OutboxMessageIdChar125Route:F4e},xUe=hb._addFileChildren(_Ue),IUe={MailMailboxIdRoute:sUe,MailBriefRoute:dUe,MailFlaggedRoute:vUe,MailOutboxRoute:bUe,MailIndexRoute:n4e,MailLabelLabelIdRoute:xUe,MailLabelIndexRoute:w4e},AUe=na._addFileChildren(IUe),RUe={SettingsSlotIdRoute:s4e,SettingsAccountsRoute:i4e,SettingsAdvancedRoute:a4e,SettingsAppearanceRoute:l4e,SettingsCalendarsRoute:u4e,SettingsClassificationRoute:c4e,SettingsFiltersRoute:d4e,SettingsFoldersRoute:f4e,SettingsLabelsRoute:h4e,SettingsPeopleRoute:p4e,SettingsSendersRoute:m4e,SettingsSuggestedVipsRoute:g4e,SettingsWarningsRoute:v4e,SettingsIndexRoute:o4e},TUe=Xn._addFileChildren(RUe),OUe={IndexRoute:XLe,CalendarRoute:J4e,ImportRoute:JLe,MailRoute:AUe,OnboardingRoute:e4e,SettingsRoute:TUe,ResetPasswordTokenRoute:r4e},MUe=ta._addFileChildren(OUe)._addFileTypes(),PUe=(e,t,n)=>{const r=ibe({routeTree:MUe,context:{queryClient:e},history:n,stringifySearch:fIe,defaultPreload:"intent",defaultPendingComponent:Qv,defaultPendingMs:200,defaultPendingMinMs:300});return r.subscribe("onResolved",o=>{t.recordPageView(o.toLocation.pathname),boe(o.toLocation.pathname)}),r},De=e=>typeof e=="string",Hd=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},$5=e=>e==null?"":""+e,NUe=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},kUe=/###/g,F5=e=>e&&e.indexOf("###")>-1?e.replace(kUe,"."):e,z5=e=>!e||De(e),yf=(e,t,n)=>{const r=De(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(z5(e))return{};const s=F5(r[o]);!e[s]&&n&&(e[s]=new n),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={},++o}return z5(e)?{}:{obj:e,k:F5(r[o])}},j5=(e,t,n)=>{const{obj:r,k:o}=yf(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),u=yf(e,a,Object);for(;u.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),u=yf(e,a,Object),u?.obj&&typeof u.obj[`${u.k}.${s}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${s}`]=n},DUe=(e,t,n,r)=>{const{obj:o,k:s}=yf(e,t,Object);o[s]=o[s]||[],o[s].push(n)},Ov=(e,t)=>{const{obj:n,k:r}=yf(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},LUe=(e,t,n)=>{const r=Ov(e,n);return r!==void 0?r:Ov(t,n)},zq=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?De(e[r])||e[r]instanceof String||De(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):zq(e[r],t[r],n):e[r]=t[r]);return e},pu=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var UUe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const $Ue=e=>De(e)?e.replace(/[&<>"'\/]/g,t=>UUe[t]):e;class FUe{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 zUe=[" ",",","?","!",";"],jUe=new FUe(20),BUe=(e,t,n)=>{t=t||"",n=n||"";const r=zUe.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=jUe.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},NI=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,u="";for(let c=s;c<r.length;++c)if(c!==s&&(u+=n),u+=r[c],a=o[u],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&c<r.length-1)continue;s+=c-s+1;break}o=a}return o},Mv=e=>e?.replace("_","-"),HUe={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 Pv{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||HUe,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:(De(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Pv(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Pv(this.logger,t)}}var $o=new Pv;class mb{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[u,c]=a;for(let f=0;f<c;f++)u(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[u,c]=a;for(let f=0;f<c;f++)u.apply(u,[t,...r])})}}class B5 extends mb{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 u;t.indexOf(".")>-1?u=t.split("."):(u=[t,n],r&&(Array.isArray(r)?u.push(...r):De(r)&&s?u.push(...r.split(s)):u.push(r)));const c=Ov(this.data,u);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=u[0],n=u[1],r=u.slice(2).join(".")),c||!a||!De(r)?c:NI(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 u=[t,n];r&&(u=u.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(u=t.split("."),o=n,n=u[1]),this.addNamespaces(n),j5(this.data,u,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)(De(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},u=[t,n];t.indexOf(".")>-1&&(u=t.split("."),o=r,r=n,n=u[1]),this.addNamespaces(n);let c=Ov(this.data,u)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?zq(c,r,s):c={...c,...r},j5(this.data,u,c),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 jq={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 H5={},q5=e=>!De(e)&&typeof e!="boolean"&&typeof e!="number";class Nv extends mb{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),NUe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=$o.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,u=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!BUe(t,r,o);if(a&&!u){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:De(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:De(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:u}=this.extractFromKey(t[t.length-1],n),c=u[u.length-1],f=n.lng||this.language,h=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode"){if(h){const $=n.nsSeparator||this.options.nsSeparator;return o?{res:`${c}${$}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${$}${a}`}return o?{res:a,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a}const m=this.resolve(t,n);let g=m?.res;const v=m?.usedKey||a,w=m?.exactUsedKey||a,S=["[object Number]","[object Function]","[object RegExp]"],C=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,I=n.count!==void 0&&!De(n.count),A=Nv.hasDefaultValue(n),T=I?this.pluralResolver.getSuffix(f,n.count,n):"",N=n.ordinal&&I?this.pluralResolver.getSuffix(f,n.count,{ordinal:!1}):"",M=I&&!n.ordinal&&n.count===0,R=M&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${T}`]||n[`defaultValue${N}`]||n.defaultValue;let k=g;E&&!g&&A&&(k=R);const L=q5(k),q=Object.prototype.toString.apply(k);if(E&&k&&L&&S.indexOf(q)<0&&!(De(C)&&Array.isArray(k))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const $=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,k,{...n,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(m.res=$,m.usedParams=this.getUsedParamsDetails(n),m):$}if(s){const $=Array.isArray(k),D=$?[]:{},j=$?w:v;for(const Z in k)if(Object.prototype.hasOwnProperty.call(k,Z)){const he=`${j}${s}${Z}`;A&&!g?D[Z]=this.translate(he,{...n,defaultValue:q5(R)?R[Z]:void 0,joinArrays:!1,ns:u}):D[Z]=this.translate(he,{...n,joinArrays:!1,ns:u}),D[Z]===he&&(D[Z]=k[Z])}g=D}}else if(E&&De(C)&&Array.isArray(g))g=g.join(C),g&&(g=this.extendTranslation(g,t,n,r));else{let $=!1,D=!1;!this.isValidLookup(g)&&A&&($=!0,g=R),this.isValidLookup(g)||(D=!0,g=a);const Z=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&D?void 0:g,he=A&&R!==g&&this.options.updateMissing;if(D||$||he){if(this.logger.log(he?"updateKey":"missingKey",f,c,a,he?R:g),s){const ue=this.resolve(a,{...n,keySeparator:!1});ue&&ue.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 B=[];const Q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Q&&Q[0])for(let ue=0;ue<Q.length;ue++)B.push(Q[ue]);else this.options.saveMissingTo==="all"?B=this.languageUtils.toResolveHierarchy(n.lng||this.language):B.push(n.lng||this.language);const ae=(ue,Ce,U)=>{const X=A&&U!==g?U:Z;this.options.missingKeyHandler?this.options.missingKeyHandler(ue,c,Ce,X,he,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ue,c,Ce,X,he,n),this.emit("missingKey",ue,c,Ce,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?B.forEach(ue=>{const Ce=this.pluralResolver.getSuffixes(ue,n);M&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Ce.indexOf(`${this.options.pluralSeparator}zero`)<0&&Ce.push(`${this.options.pluralSeparator}zero`),Ce.forEach(U=>{ae([ue],a+U,n[`defaultValue${U}`]||R)})}):ae(B,a,R))}g=this.extendTranslation(g,t,n,m,r),D&&g===a&&this.options.appendNamespaceToMissingKey&&(g=`${c}:${a}`),(D||$)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${a}`:a,$?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=De(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&&!De(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),w=0;w<g;w++)v[w]=arguments[w];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 u=r.postProcess||this.options.postProcess,c=De(u)?[u]:u;return t!=null&&c?.length&&r.applyPostProcessor!==!1&&(t=jq.handle(c,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,u;return De(t)&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const f=this.extractFromKey(c,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&&!De(n.count),v=g&&!n.ordinal&&n.count===0,w=n.context!==void 0&&(De(n.context)||typeof n.context=="number")&&n.context!=="",S=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);m.forEach(C=>{this.isValidLookup(r)||(u=C,!H5[`${S[0]}-${C}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(u)&&(H5[`${S[0]}-${C}`]=!0,this.logger.warn(`key "${o}" for languages "${S.join(", ")}" won't get resolved as namespace "${u}" 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!!!")),S.forEach(E=>{if(this.isValidLookup(r))return;a=E;const I=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(I,h,E,C,n);else{let T;g&&(T=this.pluralResolver.getSuffix(E,n.count,n));const N=`${this.options.pluralSeparator}zero`,M=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(I.push(h+T),n.ordinal&&T.indexOf(M)===0&&I.push(h+T.replace(M,this.options.pluralSeparator)),v&&I.push(h+N)),w){const R=`${h}${this.options.contextSeparator}${n.context}`;I.push(R),g&&(I.push(R+T),n.ordinal&&T.indexOf(M)===0&&I.push(R+T.replace(M,this.options.pluralSeparator)),v&&I.push(R+N))}}let A;for(;A=I.pop();)this.isValidLookup(r)||(s=A,r=this.getResource(E,C,A,n))}))})}),{res:r,usedKey:o,exactUsedKey:s,usedLng:a,usedNS:u}}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&&!De(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 V5{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$o.create("languageUtils")}getScriptPartFromCode(t){if(t=Mv(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=Mv(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(De(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)),De(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 De(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))):De(t)&&s(this.formatLanguageCode(t)),r.forEach(a=>{o.indexOf(a)<0&&s(this.formatLanguageCode(a))}),o}}const W5={zero:0,one:1,two:2,few:3,many:4,other:5},G5={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class qUe{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=$o.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=Mv(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!"),G5;if(!t.match(/-|_/))return G5;const c=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(c,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)=>W5[o]-W5[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 K5=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=LUe(e,t,n);return!s&&o&&De(n)&&(s=NI(e,n,r),s===void 0&&(s=NI(t,n,r))),s},w_=e=>e.replace(/\$/g,"$$$$");class VUe{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=$o.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:u,suffixEscaped:c,formatSeparator:f,unescapeSuffix:h,unescapePrefix:m,nestingPrefix:g,nestingPrefixEscaped:v,nestingSuffix:w,nestingSuffixEscaped:S,nestingOptionsSeparator:C,maxReplaces:E,alwaysFormat:I}=t.interpolation;this.escape=n!==void 0?n:$Ue,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=s?pu(s):a||"{{",this.suffix=u?pu(u):c||"}}",this.formatSeparator=f||",",this.unescapePrefix=h?"":m||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=g?pu(g):v||pu("$t("),this.nestingSuffix=w?pu(w):S||pu(")"),this.nestingOptionsSeparator=C||",",this.maxReplaces=E||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,u;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},f=v=>{if(v.indexOf(this.formatSeparator)<0){const E=K5(n,c,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(E,void 0,r,{...o,...n,interpolationkey:v}):E}const w=v.split(this.formatSeparator),S=w.shift().trim(),C=w.join(this.formatSeparator).trim();return this.format(K5(n,c,S,this.options.keySeparator,this.options.ignoreJSONStructure),C,r,{...o,...n,interpolationkey:S})};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=>w_(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?w_(this.escape(v)):w_(v)}].forEach(v=>{for(u=0;s=v.regex.exec(t);){const w=s[1].trim();if(a=f(w),a===void 0)if(typeof h=="function"){const C=h(t,s,o);a=De(C)?C:""}else if(o&&Object.prototype.hasOwnProperty.call(o,w))a="";else if(m){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${t}`),a="";else!De(a)&&!this.useRawValueToEscape&&(a=$5(a));const S=v.safeValue(a);if(t=t.replace(s[0],S),m?(v.regex.lastIndex+=a.length,v.regex.lastIndex-=s[0].length):v.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,s,a;const u=(c,f)=>{const h=this.nestingOptionsSeparator;if(c.indexOf(h)<0)return c;const m=c.split(new RegExp(`${h}[ ]*{`));let g=`{${m[1]}`;c=m[0],g=this.interpolate(g,a);const v=g.match(/'/g),w=g.match(/"/g);((v?.length??0)%2===0&&!w||w.length%2!==0)&&(g=g.replace(/'/g,'"'));try{a=JSON.parse(g),f&&(a={...f,...a})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,S),`${c}${h}${g}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,c};for(;o=this.nestingRegexp.exec(t);){let c=[];a={...r},a=a.replace&&!De(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(),c=h,f=!0}if(s=n(u.call(this,o[1].trim(),a),a),s&&o[0]===t&&!De(s))return s;De(s)||(s=$5(s)),s||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),s=""),f&&(s=c.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 WUe=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[u,...c]=a.split(":"),f=c.join(":").trim().replace(/^'+|'+$/g,""),h=u.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}},mu=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 u=t[a];return u||(u=e(Mv(r),o),t[a]=u),u(n)}};class GUe{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=$o.create("formatter"),this.options=t,this.formats={number:mu((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return s=>o.format(s)}),currency:mu((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return s=>o.format(s)}),datetime:mu((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return s=>o.format(s)}),relativetime:mu((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return s=>o.format(s,r.range||"day")}),list:mu((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()]=mu(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(u=>u.indexOf(")")>-1)){const u=s.findIndex(c=>c.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,u)].join(this.formatSeparator)}return s.reduce((u,c)=>{const{formatName:f,formatOptions:h}=WUe(c);if(this.formats[f]){let m=u;try{const g=o?.formatParams?.[o.interpolationkey]||{},v=g.locale||g.lng||o.locale||o.lng||r;m=this.formats[f](u,v,{...h,...o,...g})}catch(g){this.logger.warn(g)}return m}else this.logger.warn(`there was no format function for ${f}`);return u},t)}}const KUe=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class ZUe extends mb{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=$o.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={},u={},c={};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),c[m]===void 0&&(c[m]=!0)))}),h||(u[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(u),toLoadNamespaces:Object.keys(c)}}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 u={};this.queue.forEach(c=>{DUe(c.loaded,[s],a),KUe(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(f=>{u[f]||(u[f]={});const h=c.loaded[f];h.length&&h.forEach(m=>{u[f][m]===void 0&&(u[f][m]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(c=>!c.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 u=(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)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const f=c(t,n);f&&typeof f.then=="function"?f.then(h=>u(null,h)).catch(u):u(null,f)}catch(f){u(f)}return}return c(t,n,u)}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();De(t)&&(t=this.languageUtils.toResolveHierarchy(t)),De(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,u)=>{a&&this.logger.warn(`${n}loading namespace ${s} for language ${o} failed`,a),!a&&u&&this.logger.log(`${n}loaded namespace ${s} for language ${o}`,u),this.loaded(t,a,u)})}saveMissing(t,n,r,o,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=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 c={...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,c):h=f(t,n,r,o),h&&typeof h.then=="function"?h.then(m=>u(null,m)).catch(u):u(null,h)}catch(h){u(h)}else f(t,n,r,o,u,c)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const Z5=()=>({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]),De(e[1])&&(t.defaultValue=e[1]),De(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}}),Y5=e=>(De(e.ns)&&(e.ns=[e.ns]),De(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),De(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),Km=()=>{},YUe=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Xf extends mb{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Y5(t),this.services={},this.logger=$o,this.modules={external:[]},YUe(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&&(De(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=Z5();this.options={...o,...this.options,...Y5(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?$o.init(s(this.modules.logger),this.options):$o.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=GUe;const m=new V5(this.options);this.store=new B5(this.options.resources,this.options);const g=this.services;g.logger=$o,g.resourceStore=this.store,g.languageUtils=m,g.pluralResolver=new qUe(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 VUe(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new ZUe(s(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",function(v){for(var w=arguments.length,S=new Array(w>1?w-1:0),C=1;C<w;C++)S[C-1]=arguments[C];t.emit(v,...S)}),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 Nv(this.services,this.options),this.translator.on("*",function(v){for(var w=arguments.length,S=new Array(w>1?w-1:0),C=1;C<w;C++)S[C-1]=arguments[C];t.emit(v,...S)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Km),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 c=Hd(),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),c.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),c}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Km;const o=De(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=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(f=>{f!=="cimode"&&s.indexOf(f)<0&&s.push(f)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),this.options.preload?.forEach?.(u=>a(u)),this.services.backendConnector.load(s,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const o=Hd();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=Km),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"&&jq.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=Hd();this.emit("languageChanging",t);const s=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},a=(c,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(c,function(){return r.t(...arguments)})},u=c=>{!t&&!c&&this.services.languageDetector&&(c=[]);const f=De(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);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?u(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(t),o}getFixedT(t,n,r){var o=this;const s=function(a,u){let c;if(typeof u!="object"){for(var f=arguments.length,h=new Array(f>2?f-2:0),m=2;m<f;m++)h[m-2]=arguments[m];c=o.options.overloadTranslationOptionHandler([a,u].concat(h))}else c={...u};c.lng=c.lng||s.lng,c.lngs=c.lngs||s.lngs,c.ns=c.ns||s.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||s.keyPrefix);const g=o.options.keySeparator||".";let v;return c.keyPrefix&&Array.isArray(a)?v=a.map(w=>`${c.keyPrefix}${g}${w}`):v=c.keyPrefix?`${c.keyPrefix}${g}${a}`:a,o.t(v,c)};return De(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=(u,c)=>{const f=this.services.backendConnector.state[`${u}|${c}`];return f===-1||f===0||f===2};if(n.precheck){const u=n.precheck(this,a);if(u!==void 0)return u}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=Hd();return this.options.ns?(De(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=Hd();De(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 V5(Z5());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 Xf(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Km;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},s=new Xf(o);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(u=>{s[u]=this[u]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r){const u=Object.keys(this.store.data).reduce((c,f)=>(c[f]={...this.store.data[f]},Object.keys(c[f]).reduce((h,m)=>(h[m]={...c[f][m]},h),{})),{});s.store=new B5(u,o),s.services.resourceStore=s.store}return s.translator=new Nv(s.services,o),s.translator.on("*",function(u){for(var c=arguments.length,f=new Array(c>1?c-1:0),h=1;h<c;h++)f[h-1]=arguments[h];s.emit(u,...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 Hn=Xf.createInstance();Hn.createInstance=Xf.createInstance;Hn.createInstance;Hn.dir;Hn.init;Hn.loadResources;Hn.reloadResources;Hn.use;Hn.changeLanguage;Hn.getFixedT;Hn.t;Hn.exists;Hn.setDefaultNamespace;Hn.hasLoadedNamespace;Hn.loadNamespaces;Hn.loadLanguages;const{slice:QUe,forEach:XUe}=[];function JUe(e){return XUe.call(QUe.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function e6e(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 Q5=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,t6e=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(!Q5.test(r.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${r.domain}`}if(r.path){if(!Q5.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},X5={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=t6e(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 n6e={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return X5.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:s}=t;n&&typeof document<"u"&&X5.create(n,e,r,o,s)}},r6e={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 u=s[a].indexOf("=");u>0&&s[a].substring(0,u)===t&&(n=s[a].substring(u+1))}}return n}},o6e={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 u=0;u<a.length;u++){const c=a[u].indexOf("=");c>0&&a[u].substring(0,c)===t&&(r=a[u].substring(c+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 gu=null;const J5=()=>{if(gu!==null)return gu;try{if(gu=typeof window<"u"&&window.localStorage!==null,!gu)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{gu=!1}return gu};var s6e={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&J5())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&J5()&&window.localStorage.setItem(n,e)}};let vu=null;const e8=()=>{if(vu!==null)return vu;try{if(vu=typeof window<"u"&&window.sessionStorage!==null,!vu)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{vu=!1}return vu};var i6e={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&e8())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&e8()&&window.sessionStorage.setItem(n,e)}},a6e={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}},l6e={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}},u6e={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}},c6e={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 Bq=!1;try{document.cookie,Bq=!0}catch{}const Hq=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Bq||Hq.splice(1,1);const d6e=()=>({order:Hq,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class qq{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=JUe(n,this.options||{},d6e()),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(n6e),this.addDetector(r6e),this.addDetector(s6e),this.addDetector(i6e),this.addDetector(a6e),this.addDetector(l6e),this.addDetector(u6e),this.addDetector(c6e),this.addDetector(o6e)}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&&!e6e(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)}))}}qq.type="languageDetector";const Vq=["__proto__","constructor","prototype"];function Wq(e){return!(typeof e!="string"||e.length===0||e.length>128||Vq.indexOf(e)>-1||e.indexOf("..")>-1||e.indexOf("\\")>-1||/[?#%:&=;\s]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function Gq(e){return!(!Wq(e)||e.indexOf("/")>-1||e.indexOf("@")>-1)}function f6e(e){return!(!Wq(e)||e.indexOf("//")>-1)}const h6e={lng:Gq,ns:f6e};function Zm(e){return typeof e!="string"?e:e.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function p6e(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 Kq(){return typeof XMLHttpRequest=="function"||typeof XMLHttpRequest=="object"}function m6e(e){return!!e&&typeof e.then=="function"}function g6e(e){return m6e(e)?e:Promise.resolve(e)}const v6e=/\{\{(.+?)\}\}/g,t8=/^[/\\]{2}/;function n8(e,t){let n=!1;const r=e.replace(v6e,(o,s)=>{const a=s.trim();if(Vq.indexOf(a)>-1)return o;const u=t[a];if(u==null)return o;const c=h6e[a]||Gq,f=String(u).split("+");for(const h of f)if(!c(h))return n=!0,o;return f.join("+")});return n||t8.test(r)&&!t8.test(e)?null:r}const Va=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof window<"u"?window:void 0;let kv;typeof fetch=="function"?kv=fetch:Va&&typeof Va.fetch=="function"&&(kv=Va.fetch);const r8=Kq()&&Va?Va.XMLHttpRequest:void 0,y6e=typeof ActiveXObject=="function"&&Va?Va.ActiveXObject:void 0,Zq=["__proto__","constructor","prototype"],kI=(e,t)=>{if(t&&typeof t=="object"){let n="";for(const r of Object.keys(t))Zq.indexOf(r)>-1||(n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r]));if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},o8=(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):kv(e,t).then(o).catch(n)},b6e=(e,t,n,r)=>{e.queryStringParams&&(t=kI(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},u=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{o8(t,a,r,u)}catch(c){if(!s||Object.keys(s).length===0||!c.message||c.message.indexOf("not implemented")<0)return r(c);try{Object.keys(s).forEach(f=>{delete a[f]}),o8(t,a,r,u),e._omitFetchOptions=!0}catch(f){r(f)}}},S6e=(e,t,n,r)=>{n&&typeof n=="object"&&(n=kI("",n).slice(1)),e.queryStringParams&&(t=kI(t,e.queryStringParams));try{const o=r8?new r8:new y6e("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))Zq.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)}},w6e=(e,t,n,r)=>{if(typeof n=="function"&&(r=n,n=void 0),r=r||(()=>{}),kv&&t.indexOf("file:")!==0)return b6e(e,t,n,r);if(Kq()||typeof ActiveXObject=="function")return S6e(e,t,n,r);r(new Error("No fetch and no xhr implementation found!"))},C6e=()=>({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:w6e,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}});var Yq=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={...C6e(),...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=g6e(s),s.then(a=>{if(!a)return o(null,{});const u=n8(a,{lng:e.join("+"),ns:n.join("+")});if(u==null){const c=e.map(Zm).join(", "),f=n.map(Zm).join(", ");return o(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+c+"] namespaces=["+f+"]"),!1)}this.loadUrl(u,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),u=Zm(p6e(e));this.options.request(this.options,e,a,(c,f)=>{if(f&&(f.status>=500&&f.status<600||!f.status))return t("failed loading "+u+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return t("failed loading "+u+"; status code: "+f.status,!1);if(!f&&c&&c.message){const g=c.message.toLowerCase();if(["failed","fetch","network","load"].find(v=>g.indexOf(v)>-1))return t("failed loading "+u+": "+Zm(c.message),!0)}if(c)return t(c,!1);let h,m;try{typeof f.data=="string"?h=this.options.parse(f.data,n,r):h=f.data}catch{m="failed parsing "+u+" 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 u=[],c=[];e.forEach(f=>{let h=this.options.addPath;typeof this.options.addPath=="function"&&(h=this.options.addPath(f,t));const m=n8(h,{lng:f,ns:t});if(m==null){a+=1,o&&a===e.length&&o(u,c);return}this.options.request(this.options,m,s,(g,v)=>{a+=1,u.push(g),c.push(v),a===e.length&&typeof o=="function"&&o(u,c)})})}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(u=>{o.indexOf(u)<0&&o.push(u)})};s(r),this.allOptions.preload&&this.allOptions.preload.forEach(a=>s(a)),o.forEach(a=>{this.allOptions.ns.forEach(u=>{e.read(a,u,"read",null,null,(c,f)=>{c&&n.warn(`loading namespace ${u} for language ${a} failed`,c),!c&&f&&n.log(`loaded namespace ${u} for language ${a}`,f),e.loaded(`${a}|${u}`,c,f)})})})}};Yq.type="backend";Hn.use(Yq).use(qq).use(_Ie).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 E6e=({authProvider:e,settingsSlots:t=[],rootElementId:n="root"})=>{goe(),cIe(),e.configure(),Pbe(e);const r=sIe();ioe(r);const o=new ove({queryCache:new O9({onError:Fbe}),mutationCache:new T9({onError:zbe}),defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1}}});lIe();const s=PUe(o,r);for(const c of t)if(Object.hasOwn(s.routesByPath,`/settings/${c.id}`))throw new Error(`Settings slot "${c.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:u}=e;pbe.createRoot(a).render(O.jsx(_.StrictMode,{children:O.jsx(WB.Provider,{value:r,children:O.jsxs(sve,{client:o,children:[O.jsx(Dbe,{value:e,children:O.jsx(_3e,{value:t,children:O.jsx(u,{children:O.jsx(ube,{router:s})})})}),!1]})})}))};E6e({authProvider:Dge});export{lc as $,Qv as A,Jr as B,ote as C,Ane as D,hF as E,ute as F,n7 as G,gr as H,U$ as I,fFe as J,g3e as K,z$ as L,pte as M,Aoe as N,i7 as O,DNe as P,kNe as Q,YB as R,yte as S,wte as T,gI as U,y$e as V,ab as W,F_ as X,hq as Y,Y$e as Z,mRe as _,tl as a,fRe as a$,KIe as a0,aT as a1,ry as a2,noe as a3,yR as a4,vc as a5,l3e as a6,Lbe as a7,x3e as a8,B3e as a9,l$e as aA,uk as aB,oDe as aC,m8e as aD,D$e as aE,M8e as aF,Fne as aG,p5e as aH,R6e as aI,h5e as aJ,o$e as aK,Uke as aL,Gre as aM,Vre as aN,qre as aO,pn as aP,Jv as aQ,z6 as aR,n8e as aS,hRe as aT,n$e as aU,t$e as aV,r$e as aW,OF as aX,iq as aY,X8e as aZ,e$e as a_,y5e as aa,tDe as ab,SFe as ac,oA as ad,N$e as ae,eq as af,F as ag,M$e as ah,P$e as ai,fTe as aj,UNe as ak,$Ne as al,p8e as am,f8e as an,wf as ao,wF as ap,x$ as aq,Qn as ar,wT as as,dn as at,k$e as au,F6e as av,ih as aw,Vu as ax,lA as ay,a$e as az,yt as b,$6e as b$,ooe as b0,z6e as b1,nf as b2,ll as b3,x$e as b4,vR as b5,I$e as b6,A$e as b7,R$e as b8,j6e as b9,nFe as bA,rFe as bB,tRe as bC,I8e as bD,X$e as bE,v_ as bF,WNe as bG,Z$e as bH,hFe as bI,_Re as bJ,bFe as bK,l8e as bL,d8e as bM,c8e as bN,u8e as bO,gFe as bP,mFe as bQ,E3e as bR,pFe as bS,vFe as bT,yFe as bU,N8e as bV,k8e as bW,gte as bX,u$e as bY,yRe as bZ,Q6e as b_,P6e as ba,Wne as bb,L6e as bc,k6e as bd,M6e as be,are as bf,aA as bg,S8e as bh,w8e as bi,eke as bj,tke as bk,hke as bl,fke as bm,Kne as bn,U6e as bo,ure as bp,QNe as bq,o8e as br,BIe as bs,J$e as bt,tFe as bu,NAe as bv,eFe as bw,s8e as bx,Q$e as by,oFe as bz,lT as c,JB as c$,p3e as c0,uFe as c1,Ete as c2,sne as c3,$8e as c4,Pq as c5,D5 as c6,AFe as c7,wFe as c8,CFe as c9,fne as cA,une as cB,Sne as cC,Zf as cD,bRe as cE,Cc as cF,bn as cG,zg as cH,w9 as cI,Jge as cJ,ive as cK,uve as cL,hve as cM,cve as cN,dve as cO,Wn as cP,mve as cQ,O4 as cR,fve as cS,C8e as cT,E8e as cU,x8e as cV,_8e as cW,r8e as cX,mke as cY,VNe as cZ,P8e as c_,EFe as ca,pr as cb,Pye as cc,CT as cd,b5e as ce,Dy as cf,D3e as cg,lFe as ch,wee as ci,zP as cj,_6e as ck,x6e as cl,A6e as cm,dq as cn,C$e as co,E$e as cp,w$e as cq,S$ as cr,b$e as cs,xe as ct,O$e as cu,ERe as cv,_$e as cw,S$e as cx,kRe as cy,lne as cz,Yr as d,i8e as d$,xAe as d0,L$e as d1,eH as d2,$$e as d3,Wo as d4,iFe as d5,_q as d6,j$e as d7,bNe as d8,F$e as d9,d5e as dA,i5e as dB,o5e as dC,IF as dD,d$e as dE,B$e as dF,W$e as dG,ORe as dH,H$e as dI,q$e as dJ,V$e as dK,c$e as dL,ey as dM,q6e as dN,H6e as dO,h$e as dP,T$e as dQ,NNe as dR,g$e as dS,sRe as dT,qu as dU,B6e as dV,dFe as dW,W6e as dX,V6e as dY,p$e as dZ,a8e as d_,z$e as da,g5e as db,m5e as dc,gve as dd,K6e as de,G6e as df,hte as dg,cne as dh,hre as di,fte as dj,Cre as dk,EF as dl,e5e as dm,X6e as dn,a5e as dp,Ure as dq,u5e as dr,t5e as ds,l5e as dt,Lre as du,_re as dv,Kr as dw,N6e as dx,f5e as dy,c5e as dz,hl as e,NLe as e$,Z6e as e0,v$e as e1,G$e as e2,K$e as e3,xFe as e4,Y6e as e5,o3e as e6,U$e as e7,sFe as e8,MAe as e9,q8e as eA,V8e as eB,j8e as eC,sAe as eD,Bne as eE,T6e as eF,O6e as eG,A8e as eH,T8e as eI,R8e as eJ,D6e as eK,y8e as eL,eRe as eM,v8e as eN,b8e as eO,XAe as eP,cFe as eQ,TRe as eR,_T as eS,G8e as eT,Y8e as eU,K8e as eV,W8e as eW,Z8e as eX,HDe as eY,IFe as eZ,TLe as e_,OAe as ea,i$e as eb,tH as ec,MNe as ed,PNe as ee,t3e as ef,aFe as eg,J6e as eh,r5e as ei,n5e as ej,s5e as ek,f$e as el,Ste as em,Li as en,_Fe as eo,L5 as ep,Q8e as eq,L8e as er,F8e as es,U8e as et,J8e as eu,D8e as ev,z8e as ew,m$e as ex,B8e as ey,H8e as ez,cR as f,ULe as f0,VLe as f1,GLe as f2,ate as f3,s$e as g,g8e as h,O8e as i,O as j,XB as k,t8e as l,h8e as m,Gv as n,Kv as o,rn as p,bte as q,_ as r,oy as s,ste as t,hh as u,R$ as v,vte as w,rA as x,rte as y,lte as z};
|