@zeniai/web-cockpit-ui 1.14.19-qa → 1.14.20-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/dist/assets/{ACHDetailsPage-BahbefPk-J5el9V8C.js → ACHDetailsPage-CVBRtacz-BEkwx2cM.js} +3 -3
  2. package/dist/assets/{AIPerformancePage-BuQApbEf-GygwxWAV.js → AIPerformancePage-DnOjd2BF-CRXsdl24.js} +32 -32
  3. package/dist/assets/{AccountInfoPage-TD30edES-ayWa9vvt.js → AccountInfoPage-Bt-jShgf-CCHYq--w.js} +2 -2
  4. package/dist/assets/{AccountInfoPageContent-DQJFmREl-DJbEuy4H.js → AccountInfoPageContent-Cc80eQeo-579rUIpL.js} +6 -6
  5. package/dist/assets/AccountLockedInfoModal-B-Hn6_hG-B-4Dg7na.js +59 -0
  6. package/dist/assets/{AccountReconDetailsDrawerPage-D2B9Na3--BOg6bkeN.js → AccountReconDetailsDrawerPage-Bz1Sk2du-CwztkqDE.js} +7 -7
  7. package/dist/assets/{AccountRow-ZcS_RTJN-BR9_rLoN.js → AccountRow-D01C0A0f-QA2NRq7R.js} +20 -20
  8. package/dist/assets/{AccountsPromoCardStack-Bh2D-mXh-Bs4EYM2a.js → AccountsPromoCardStack-DsjFJ8gZ-DjW6RsEa.js} +1 -1
  9. package/dist/assets/{AddAddressForCardDrawer-Ds2V5DyG-DVXVjy6o.js → AddAddressForCardDrawer-DnoYIvUp-DRozqjCP.js} +2 -2
  10. package/dist/assets/{AddToWalletPage-DQ_gwAcu-BJUo6mYt.js → AddToWalletPage-BIiW9JxG-D9CD9wND.js} +1 -1
  11. package/dist/assets/{AgingReportsPage-BU_tqV13-BsnkvpaT.js → AgingReportsPage-WazD_3Z7-CoFeaJHD.js} +7 -7
  12. package/dist/assets/{AllUserItems-DBXzXO61-BTwofn85.js → AllUserItems-CTSy4oBh-COmuQZqb.js} +7 -7
  13. package/dist/assets/{ApAgingDetailPage-Crv9EDe5-PAcPKxo5.js → ApAgingDetailPage--NGBXWsy-C8HiqI6Z.js} +3 -3
  14. package/dist/assets/{AppBasePage-BK_b0fFf-CHlalUjf.js → AppBasePage-B5br9UXD-BXEvz6Z3.js} +1 -1
  15. package/dist/assets/{AppDrawerContent-rw39Hn3s-DGkZVDxv.js → AppDrawerContent-vFeMNL3B-anFPhgeB.js} +59 -46
  16. package/dist/assets/{ApprovalRulesSettingsPage-C6jxuvhu-D5ZeFfm2.js → ApprovalRulesSettingsPage-6j7VBBZ6-D1yZE3mH.js} +2 -2
  17. package/dist/assets/{ArAgingChart-DVMlvNTF-ni7r1vai.js → ArAgingChart-BYWN3_Nl-CYX1U_rU.js} +1 -1
  18. package/dist/assets/{ArAgingDetailPage-CbmOL5tx-DQdpeuHC.js → ArAgingDetailPage-B-hHa8A6-BrQATxNB.js} +1 -1
  19. package/dist/assets/{AttachmentView-BTAMhgXU-BhSl8K4J.js → AttachmentView-C2kWA5X5-XqMuBHHe.js} +2 -2
  20. package/dist/assets/{BankAccountSection-DVO3xzgl-CCZx3rs7.js → BankAccountSection-B20IwpOn-dEqA-3oX.js} +7 -7
  21. package/dist/assets/{BankAccountWarningSection-CQsqUFKg-05XikjyA.js → BankAccountWarningSection-GHO0P0IZ-jfpI3pUb.js} +3 -3
  22. package/dist/assets/{BankConnectionsSettingsPage-CEyhk8v--WB0uUoLR.js → BankConnectionsSettingsPage-Cpg1ObB6-DR3nDiYc.js} +30 -30
  23. package/dist/assets/{BillDetailPage-CP6QCrla-vmmuF3oo.js → BillDetailPage-DOF5ibT6-Bat6GtFx.js} +6 -6
  24. package/dist/assets/{BillPayApprovalRuleDetailPage-Bem5LvtY-mygah7A2.js → BillPayApprovalRuleDetailPage-BI1R1zT_-D9iKVE5j.js} +1 -1
  25. package/dist/assets/{BillPayApprovalRulesPage-DhDaCfQa-DAxnPtHS.js → BillPayApprovalRulesPage-B3x4So_i-B5TxdAS5.js} +7 -7
  26. package/dist/assets/{BillPayPromoPage-BjH9lvnR-DfHFrxb-.js → BillPayPromoPage-BqzH5AIp-Bcp4yJP9.js} +1 -1
  27. package/dist/assets/{BillPaySetUpPage-X8X9gq1a-Oap0vh__.js → BillPaySetUpPage-DqiNMnRE-abIQ9Tkf.js} +2 -2
  28. package/dist/assets/{BillingSettingsPage-CyyR8GW1-k3cgjV3v.js → BillingSettingsPage-BOAAGOLs-CdPqd8Hl.js} +3 -3
  29. package/dist/assets/{BillsBulkReviewDrawerPage-D_xxZjcU-DTZsZg8z.js → BillsBulkReviewDrawerPage-B76xXQJ9-CbXzjgOR.js} +1 -1
  30. package/dist/assets/{BoxItem-BL-UVx2X-Chlftilo.js → BoxItem-DCsIK5bA-DrkhsCS_.js} +1 -1
  31. package/dist/assets/{BusinessVerificationPage-Tr-N_rHo-B5h3rNqu.js → BusinessVerificationPage-hSVDM_Bi-eN7TBacX.js} +7 -7
  32. package/dist/assets/{CardNumberSubText-CNMNL0y--C35fqYUk.js → CardNumberSubText-B_ZdgYVm-CRvH-CRy.js} +1 -1
  33. package/dist/assets/{CashbackDetailPage-Cj26I5CB-BotQ-1hR.js → CashbackDetailPage-CNeEt6aE-CsctITKU.js} +16 -16
  34. package/dist/assets/{ChargeCardDetailPage-herJK06r-BTMIHWV-.js → ChargeCardDetailPage-C0a8jqCD-CUfhgRr0.js} +1 -1
  35. package/dist/assets/{ChargeCardListPage-LYVKm-0u-bxw-Libg.js → ChargeCardListPage-_3lJqIYP-iewbQ3J2.js} +55 -55
  36. package/dist/assets/{ChargeCardListTable-DxE-nRR4-BZ_zecYA.js → ChargeCardListTable-Kx-_ZAZu-BvnPLhgK.js} +23 -23
  37. package/dist/assets/{ChargeCardPromoPage-LVuaSVsQ-DLq8eZoX.js → ChargeCardPromoPage-CKTkcQdI-B3wD2hqP.js} +5 -5
  38. package/dist/assets/{ChargeCardSetupPage-CWoHclOr-DyydyXV2.js → ChargeCardSetupPage-CGRMFERy-BQ8k2roy.js} +1 -1
  39. package/dist/assets/{ChargeCardStatementsPage-DkCHd5c6-cX5JlZ7W.js → ChargeCardStatementsPage-B_7CdyKP-CMTrFXHN.js} +6 -6
  40. package/dist/assets/{ChargeCardUtils-6kq_92Ri-Dli-fqCF.js → ChargeCardUtils-BcwLwgz7-DrE0N0EF.js} +1 -1
  41. package/dist/assets/{ChaseOverlay-N7gGQaMQ-DQdim44v.js → ChaseOverlay-ClcKUdpT-Buerorcp.js} +3 -3
  42. package/dist/assets/{CheckDepositDrawerPage-w7IziUHI-DVFTIQZX.js → CheckDepositDrawerPage-I3siSP2H-BrRdb26D.js} +15 -15
  43. package/dist/assets/{CollapsableReportTable-NSlKGCNZ-DKKIVw3S.js → CollapsableReportTable-ULd7PQST-DRS_mwem.js} +46 -46
  44. package/dist/assets/{CompanyOfficerDetailsSection-C1IpMsWw-D1LJtTPO.js → CompanyOfficerDetailsSection-DLaAmVLG-9U29EMpY.js} +30 -30
  45. package/dist/assets/{CompanyPassportCard-D5gkzDNU-YrDg6jQC.js → CompanyPassportCard-CZQuAyI2-Du4zK6a2.js} +1 -1
  46. package/dist/assets/{CompanyPassportPage-6_6yWHxX-CF_r79l3.js → CompanyPassportPage-DqoVJfO--BezYa4q3.js} +1 -1
  47. package/dist/assets/{CompleteProfile-1xeOWkGT-FRaqVJXW.js → CompleteProfile-BJV-xUlM-DoWTiT1k.js} +1 -1
  48. package/dist/assets/ConfettiBurst-D4ga9TRN-DITQey3L.js +1 -0
  49. package/dist/assets/{CreateOrEditVendorPage-DQW4Wobx-Dvll5UZ6.js → CreateOrEditVendorPage-C6efUMJu-BO_oyqIH.js} +9 -9
  50. package/dist/assets/{CreditCardPaymentDrawerPage-BEpQXn9g-ChE1dvw6.js → CreditCardPaymentDrawerPage-26ysDTts-B2nPMyDO.js} +1 -1
  51. package/dist/assets/{CreditCardPaymentPlgSection-BGh2TJeK-iEMZXSJH.js → CreditCardPaymentPlgSection-8NQI5gcx-CtF_TfUM.js} +3 -3
  52. package/dist/assets/{CurrencySelectField-C2if0NUa-5itJjf-l.js → CurrencySelectField-CVNn0XCq-DT36t2lI.js} +4 -4
  53. package/dist/assets/{CustomerOnboardingActivationPage-_zjv9RZY-mJqfERvY.js → CustomerOnboardingActivationPage-D0-sOxDl-Bm2kAKIU.js} +1 -1
  54. package/dist/assets/CustomerOnboardingContainerPage-DoibuhLN-8rsNTWNZ.js +1 -0
  55. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-CXApNm6A-nctUkt8D.js → CustomerOnboardingDetailPageSkeleton-B7hkzgkV-BXEF9ppx.js} +8 -8
  56. package/dist/assets/{CustomerOnboardingNoStepsPage-BaBxG1Yn-DVZXklmj.js → CustomerOnboardingNoStepsPage-CD1QldcG-CzeAfya1.js} +2 -2
  57. package/dist/assets/{CustomerOnboardingPage-CWpmMXrh-BXodyMV2.js → CustomerOnboardingPage-DB1gXgdD-CUHFehdd.js} +8 -8
  58. package/dist/assets/{CustomerOnboardingProductSuitePage-CGYRoz3v-DUKyEfgU.js → CustomerOnboardingProductSuitePage-DGMmLmq8-Cbgji3lL.js} +5 -5
  59. package/dist/assets/{Dashboard-Dyt4nvyG-QlqN1FnF.js → Dashboard-CU3UQhxj-VVHJwggZ.js} +230 -230
  60. package/dist/assets/{DashboardReportPage-BSbTlRwW-B1vbOEGw.js → DashboardReportPage-DMdKWPtx-DkAIriFg.js} +1 -1
  61. package/dist/assets/DashboardSidebarBackgroundAnimation-BMEqBAyh-vfJQWz_r.js +12 -0
  62. package/dist/assets/{DepositAccTransactionItem-CuTp6qxI-83UpC9RP.js → DepositAccTransactionItem-C1-JGWD1-BMvGw-zQ.js} +1 -1
  63. package/dist/assets/{DepositAccTransactionListPage-CrQrOyrm-SWt9-LCs.js → DepositAccTransactionListPage-CfwhQ7mC-B3prPdix.js} +2 -2
  64. package/dist/assets/{DomesticWireDetailsPage-C5hxxGsr-BGI0Q6wD.js → DomesticWireDetailsPage-D6fDbjcO-DHXj9Zdn.js} +1 -1
  65. package/dist/assets/{DownloadOverlay-B9O7jf-4-DcPl1K2L.js → DownloadOverlay-CsX54puJ-DeWJ_bTZ.js} +6 -6
  66. package/dist/assets/{DrawerPage-Dpd6lRf7-XU_mVF4h.js → DrawerPage-xYwGDHR6-Ch0S05SG.js} +4 -4
  67. package/dist/assets/{EditPeoplePage-C7uOWg9F-XHgvFx-q.js → EditPeoplePage-9SmQtrJz-Cw0-GcjG.js} +6 -6
  68. package/dist/assets/{EditReimbursementDetailPage-BL-W1hPs-Cvem5pvL.js → EditReimbursementDetailPage-EUO0BoRp-EVPPjvHX.js} +57 -57
  69. package/dist/assets/EntityDetailPage-CF6LS35a-CeBa6jKf.js +18 -0
  70. package/dist/assets/{EntitySummarySection-eNxIwvHt-VuusTU29.js → EntitySummarySection-C0gR6pkr-AtoRf1sI.js} +6 -6
  71. package/dist/assets/{ExpenseAutomationOverviewPage-CKBACgsI-CHNuBdnj.js → ExpenseAutomationOverviewPage-B0I8v21w-C1ihD57y.js} +18 -18
  72. package/dist/assets/{ExpenseAutomationPage-LPWPrpwm-dGXlp7Wn.js → ExpenseAutomationPage-BorzJM7G-DFmLOpV0.js} +69 -69
  73. package/dist/assets/{ExpressPayPage-COQrt-KL-C3Su3pc-.js → ExpressPayPage-D0YWItIv-Bvps2LX7.js} +7 -7
  74. package/dist/assets/FeaturePreviewPage-yu8G5cHk-BxkuThqr.js +11 -0
  75. package/dist/assets/{FollowStepsSection-BJFJzQrz-BPLmYjf1.js → FollowStepsSection-DRDFxA8H-Dg1nQMTR.js} +6 -6
  76. package/dist/assets/{GlobalReviewListPage-DDQb-plt-GWioPE-8.js → GlobalReviewListPage-D80yv7U2-CfvcgDlu.js} +13 -13
  77. package/dist/assets/{HelpButton-BT_HyQ5k-L583ynk6.js → HelpButton-D9ONg6cm-CuNxHNm2.js} +2 -2
  78. package/dist/assets/{InformationCardStack-B9E29_zj-oBDdQQV7.js → InformationCardStack-CbKQwtHm-B7yYvAdF.js} +1 -1
  79. package/dist/assets/{InsightsCardStack-7XbkZ-A3-DAJvX00p.js → InsightsCardStack-BWsN9_G2-DemEieR0.js} +1 -1
  80. package/dist/assets/{InsightsSection-DtBq9eII-Dpm_kPOF.js → InsightsSection-WZo-AWJt-DohBwSi_.js} +1 -1
  81. package/dist/assets/{IntegrationsSettingsPage-TjdF0ahh-CLiKNfVQ.js → IntegrationsSettingsPage-BLjSJt9r-6t6Ass9f.js} +6 -6
  82. package/dist/assets/{InternationalWireSwiftDetailsPage-BeSYu2Dm-CzOgaF0W.js → InternationalWireSwiftDetailsPage-BXNDZ1Mk-BO2f4UVV.js} +13 -13
  83. package/dist/assets/{InternationalWireVerificationPage-Ctcaggen-B6mWLRZN.js → InternationalWireVerificationPage-BLgPJ1NJ-CMky3KEh.js} +9 -9
  84. package/dist/assets/{InviteFormPage-DEDBu0OO-CbRBG8oQ.js → InviteFormPage-DPQ4vL9--DIhY9xxd.js} +1 -1
  85. package/dist/assets/{InvitePageListView-BMMOpM9O-CiVYjuPy.js → InvitePageListView-YUKxUGBn-CGJ_yirg.js} +41 -41
  86. package/dist/assets/{InvitePeoplePage-BzPRCgA6-CQ1Opb3h.js → InvitePeoplePage-C3vECRns-DBtYnb-4.js} +4 -4
  87. package/dist/assets/{InvoiceUploadSection-C6Dx8Web-BBk4Ja4L.js → InvoiceUploadSection-Cx6pXJiN-CgRQkeV5.js} +5 -5
  88. package/dist/assets/{IssueChargeCardPage-DWRhiOzj-CcGeSv03.js → IssueChargeCardPage-DZVtocCO-B49QpSq-.js} +33 -33
  89. package/dist/assets/{LabeledAddressValue-CSb0EGEx-CwfHtDm0.js → LabeledAddressValue-BrB2xQYz-B09yXjLA.js} +1 -1
  90. package/dist/assets/LabeledAddressValueField-_35LG3OI-C2eHerzm.js +45 -0
  91. package/dist/assets/{LabeledControlledCheckBoxField-rRmtlmRJ-C45YSN-M.js → LabeledControlledCheckBoxField-o0K1dba0-BZipP4yv.js} +1 -1
  92. package/dist/assets/{LabeledCreatableSingleSelectField-CTwToXIo-BL-7qWpY.js → LabeledCreatableSingleSelectField-DQwGH21a-D1Rth7u2.js} +7 -7
  93. package/dist/assets/{LabeledDocumentField-sIz4Fhet-BCtWDAeF.js → LabeledDocumentField-CfgzkjDY-CbC276Lv.js} +2 -2
  94. package/dist/assets/{LabeledDropDownFormattedTextField-mOxkCT-G-97yk9rN2.js → LabeledDropDownFormattedTextField-DdaTvUbM-C4uCaUJ3.js} +10 -10
  95. package/dist/assets/{LabeledText-CExeogkg-B87qiJpD.js → LabeledText-Hi4MixDN-n_lfAbe7.js} +1 -1
  96. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-DrloYoze-ChdXh6tK.js → LabeledUserSingleSelectWithSubtitlesField-BlVebvR7-CKRRo1Fi.js} +14 -14
  97. package/dist/assets/{LabeledZeniRolesDropDownField-BZKMSlzI-BfxjXxW8.js → LabeledZeniRolesDropDownField-Bm7Emr_n-JLIDvMIU.js} +6 -6
  98. package/dist/assets/{LinkJETransactionPage-D9Kae7Qd-CNnC6I7f.js → LinkJETransactionPage-ittEPbhi-BCWKpHna.js} +1 -1
  99. package/dist/assets/{LowBalancePopup-DqY0lHvk-CVgmCk0Z.js → LowBalancePopup-ChA83eFW-dErt1yuL.js} +6 -6
  100. package/dist/assets/{MagicLinkACHDetailsPage-BctRnNGY-DsQ_Vr0G.js → MagicLinkACHDetailsPage-B4PPI06n-DFF50HiV.js} +1 -1
  101. package/dist/assets/{MagicLinkDomesticWireDetailsPage-UjO7TGNI-DqUtPIYq.js → MagicLinkDomesticWireDetailsPage-DRK5ytSb-CTgdy9NG.js} +1 -1
  102. package/dist/assets/{MagicLinkInternationalWireDetailsPage-ex7nPlxc-CynZ72OJ.js → MagicLinkInternationalWireDetailsPage-C2pn5xtm-DTn743zM.js} +1 -1
  103. package/dist/assets/{MagicLinkSuccessPage-D3ORpbmL-D1tcTprK.js → MagicLinkSuccessPage-Bag5TE2J-DCGiU-tX.js} +1 -1
  104. package/dist/assets/{MagicLinkTitleSection-Di20DmsJ-U44nhhts.js → MagicLinkTitleSection-Ch72cLUN-CsTRlAex.js} +3 -3
  105. package/dist/assets/{MailingDetailsSection-D7d7fV5j-Cp7uqL5j.js → MailingDetailsSection-CrHHLtQN-loRqi7di.js} +1 -1
  106. package/dist/assets/{MeetingCalenderPopup-C-Ca0puH-CE3GtRxz.js → MeetingCalenderPopup-B_KRQLwc-CemZcgIl.js} +1 -1
  107. package/dist/assets/{Menu-FcKyIIWS-CsxddkDK.js → Menu-Czq7AdhP-C-oEbm2f.js} +1 -1
  108. package/dist/assets/{MyBankConnectionsSettingsPage-B4NuqJVI-tpOCMOiD.js → MyBankConnectionsSettingsPage-y3YOYnQr-BDn2GzBg.js} +6 -6
  109. package/dist/assets/{MyPendingActivationChargeCardListPage-C4eMpxAr-D90MmLrN.js → MyPendingActivationChargeCardListPage-DJeYzaPj-Dm2kAILW.js} +2 -2
  110. package/dist/assets/{MyProfileSettingsPage-D0ALOEls-sjgoMLjt.js → MyProfileSettingsPage-hQvoACAQ-DxTxhxW-.js} +4 -4
  111. package/dist/assets/{NavBarWithPicker-Bu03gVw7-CXCT1AQF.js → NavBarWithPicker-DUaSGf4d-hMIZgUnq.js} +4 -4
  112. package/dist/assets/{NavigationArrow-D7Eb-FlF-CIlViwE5.js → NavigationArrow-ClEBtns--CBhi3Wa5.js} +5 -5
  113. package/dist/assets/{NavigationDots-CFjUchuX-CCsCkY6f.js → NavigationDots-BsJyQWOZ-DQaJD5qn.js} +1 -1
  114. package/dist/assets/{NewGlobalMerchantPage-rhhm0o-f-Tif0VAaZ.js → NewGlobalMerchantPage-BKZGSrDk-Bj0fLOGG.js} +9 -9
  115. package/dist/assets/{NoDataChart-D5DKMqIS-yU_mZZgB.js → NoDataChart-Bk9eWo52-DbkTpf0E.js} +1 -1
  116. package/dist/assets/{NoDataTable-CPEKYH-4-DCggOQ1X.js → NoDataTable-DCQbtvPN-DkrWdcTk.js} +1 -1
  117. package/dist/assets/{NotFoundPage-Cfk62GPw-BF5rP4O6.js → NotFoundPage-CGx7FoiU-CZaJl2_e.js} +2 -2
  118. package/dist/assets/{NotificationSettingsPage-BZtsKPBO-DZmsk2cw.js → NotificationSettingsPage-CoD8eTUS-8OIZSyCr.js} +5 -5
  119. package/dist/assets/{NotificationsListConfig-DiJLl-YW-BOy_2Fl2.js → NotificationsListConfig-hyqVBWDA-BxI8wBvU.js} +1 -1
  120. package/dist/assets/{NotificationsPage-CgABP7O1-D8bdKO5u.js → NotificationsPage-BavPSx1H-CVEnlnNl.js} +1 -1
  121. package/dist/assets/{OpExByVendorPage-CMEokGbw-D-EhSgr7.js → OpExByVendorPage-DD8tCc8E-DObB3ZyW.js} +4 -4
  122. package/dist/assets/{OverlayContainerPage-9K5jaX8Z-CmMmKd0q.js → OverlayContainerPage-Dg-aOJQU-XdQCUH0G.js} +1 -1
  123. package/dist/assets/{PandLWithForecastPage-IizA8WJN-Debywzdm.js → PandLWithForecastPage-bSkidYRR-D-Y5VMs1.js} +1 -1
  124. package/dist/assets/{PaymentAccountSetupBillingAddressSection-D6cW0hFS-B6jN0swI.js → PaymentAccountSetupBillingAddressSection-CGIC_vLw-BIusm93k.js} +12 -12
  125. package/dist/assets/{PeoplePage-lD4QPAkF-BTkfD7Qn.js → PeoplePage-C-2NZJpQ-BbdMKhWr.js} +1 -1
  126. package/dist/assets/{PortfolioAllocationFormPage-pynkIQMX-D6bUfHMz.js → PortfolioAllocationFormPage-B6JOvEvW-BSgeoBob.js} +3 -3
  127. package/dist/assets/{PortfolioDetails-Cs8o8xzm-BZnvJKYS.js → PortfolioDetails-Cpv5bi4_-C3K7fsrr.js} +4 -4
  128. package/dist/assets/{ProductsCarousel-vPy7zk53-0jqchxQE.js → ProductsCarousel-WDd37Mjn-NLHTDL58.js} +7 -7
  129. package/dist/assets/{PromoBaseCards-CWGpTa57-CDWNrCuH.js → PromoBaseCards-BaFkKGkm-Bw-1QrdI.js} +1 -1
  130. package/dist/assets/{QBOConnectionDialog-66XnPKaW-DPJc3mi2.js → QBOConnectionDialog-l3ThoJCI-BaUAxpz_.js} +1 -1
  131. package/dist/assets/{QBOSetupSection-T0b8qjoq-CRwxhuhU.js → QBOSetupSection-DSrxcrXI-CnwGvTKQ.js} +3 -3
  132. package/dist/assets/{ReimbursementApprovalRuleDetailPage-BSI9Lg6a-0RZNihPF.js → ReimbursementApprovalRuleDetailPage-hb8mPFw0-iXwT5wDy.js} +1 -1
  133. package/dist/assets/{ReimbursementApprovalRulesPage-XxC6pXqt-Djs5LyQt.js → ReimbursementApprovalRulesPage-fs4WqNUv-BvFXhzka.js} +4 -4
  134. package/dist/assets/{ReimbursementDetailPage-BwtY21D5-CNiYkb_F.js → ReimbursementDetailPage-BYw6Mc2u-ZOQaZirb.js} +4 -4
  135. package/dist/assets/{ReimbursementPromoPage-CmO1DP-8-jueUg_Jg.js → ReimbursementPromoPage-DzDuwRxU-DEtJqrhv.js} +1 -1
  136. package/dist/assets/{ReimbursementSetUpPage-CrCsRxAy-DR7TDPIb.js → ReimbursementSetUpPage-DdT6uu1--I31J4BAO.js} +5 -5
  137. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-Ct-lvcR1-B7C3iSy7.js → ReimbursementsBulkReviewDrawerPage-CXvng56s-BxlZIO2c.js} +1 -1
  138. package/dist/assets/{ReloadCard-CJfjUA_Q-CSIpRTGt.js → ReloadCard-BPoOhxrs-D8lPs5qf.js} +1 -1
  139. package/dist/assets/{ReportTableViewSelector-CkuvvlJm-DviIVV1k.js → ReportTableViewSelector-CkZW5TtX-I9C4FHDc.js} +5 -5
  140. package/dist/assets/{ReportsPage-BJqldqjR-BiXbtcBq.js → ReportsPage-C-ARKbIQ-CCoiMwuP.js} +1 -1
  141. package/dist/assets/{RevenueChart-BUnSkoUN-OaNNpl8v.js → RevenueChart-CuqZW-Jr-B_s8E_iU.js} +1 -1
  142. package/dist/assets/{ReviewDetailsPage-8I09Puca-kSqQFBGv.js → ReviewDetailsPage-BVN_Uym2-d0L-TTpG.js} +11 -11
  143. package/dist/assets/{ReviewOverlay-Czmj4HG0-DGEdohoE.js → ReviewOverlay-CIgtaUn1-wggYVp0Q.js} +1 -1
  144. package/dist/assets/{RoleWithToolTip-CNQZHC7h-BWCgIab_.js → RoleWithToolTip-Dm4yIm31-3pGQtzkX.js} +2 -2
  145. package/dist/assets/{ScheduleDetailsFixedAssetsPage-1Y1ZylI7-TF-lQK6Q.js → ScheduleDetailsFixedAssetsPage-Ce3z1VPg-SvqdKcr4.js} +3 -3
  146. package/dist/assets/{ScheduleDetailsPage-BcRuA_7y-DKC9xpZ-.js → ScheduleDetailsPage-O69iLj4h-CXnxPezp.js} +3 -3
  147. package/dist/assets/{ScheduleSequenceTable-DC75D2Dx-BlixJonK.js → ScheduleSequenceTable-DMIzc2zC-3WngbgQC.js} +15 -15
  148. package/dist/assets/{ScreenRoutes-Vxn_VgUc.js → ScreenRoutes-D3pC7BH7.js} +1 -1
  149. package/dist/assets/{SetUpAccountSection-CaLxl4l3-Hr6lKchX.js → SetUpAccountSection-C1_QjMwF-C_2yznzy.js} +11 -11
  150. package/dist/assets/{SetUpDefaultSection-a6NTauck-DWk4cHNK.js → SetUpDefaultSection-B-ZEHQUb-iLzGQnWH.js} +3 -3
  151. package/dist/assets/SignIn-CXQyYEJI-BbNAmrjc.js +408 -0
  152. package/dist/assets/{SignInScreen-BnDKcAsx.js → SignInScreen-DtWV87E_.js} +1 -1
  153. package/dist/assets/{SpendManagementListViewPage-Cvev9izU-CywIXocV.js → SpendManagementListViewPage-DEMLoStE-C1nPAYM8.js} +6 -6
  154. package/dist/assets/{SpendManagementPerTabPage-CbjC0IBF-BZmzopW1.js → SpendManagementPerTabPage-CLf-7YyR-60GdYb7a.js} +11 -11
  155. package/dist/assets/{SpendManagementSection-BKTkeRK6-BpVoD6ml.js → SpendManagementSection-DIVgOKWy-D35voP2u.js} +6 -6
  156. package/dist/assets/{SpendMgmtSetupAccountSection-D8Yv-Jng-DLg3IqDb.js → SpendMgmtSetupAccountSection-DFyUBsg3-DRIU7IWr.js} +10 -10
  157. package/dist/assets/{StatementItem-DSJvKpAv-CgQXd1HG.js → StatementItem-CSyEn4Pz-CIQDSk8U.js} +6 -6
  158. package/dist/assets/StatementsPage-D34J2aZa-9jSr3LU8.js +58 -0
  159. package/dist/assets/{StatusSwitcher-CTDNbKqC-BufOI7Uk.js → StatusSwitcher-B77NoO6o-CLTHQ9CP.js} +1 -1
  160. package/dist/assets/{SubTabSwitcher-D33kV-tw-BQGDLH02.js → SubTabSwitcher-baJGHUgJ-BPKK4q6_.js} +1 -1
  161. package/dist/assets/{SummaryCard-tsJZnge3-CDogfl9X.js → SummaryCard-BvuRZj8f-DCeFdYs2.js} +1 -1
  162. package/dist/assets/{TaskManagementPage-BW9M6AQs-o0la5nop.js → TaskManagementPage-vG8GXEJA-DX4VWYkl.js} +25 -25
  163. package/dist/assets/{TimeRangeSwitcher-CkXysnFa-BziXH9A-.js → TimeRangeSwitcher-CnoZ9Rqp-QTEqL6la.js} +2 -2
  164. package/dist/assets/{TimeframeSwitcher-B-S09J4A-DXzIdqPI.js → TimeframeSwitcher-W5kHnuHI-B5U_sUAn.js} +1 -1
  165. package/dist/assets/{TimeframeSwitcherWithToggle-B9Lo2-pD-E9Q-Xl1O.js → TimeframeSwitcherWithToggle-yLA5y4zJ-CFlsdObg.js} +1 -1
  166. package/dist/assets/{TopExCard-DwP8Cppq-BiAUZiUo.js → TopExCard-oyXmygm8-DV87vjZL.js} +1 -1
  167. package/dist/assets/{TopExDetailPage-CIMSDSxd-C3es4f9G.js → TopExDetailPage-4HMIURzm-ulBg6b5V.js} +1 -1
  168. package/dist/assets/{TransactionDetailPage-rwzAZT-Q-BNzn0dfK.js → TransactionDetailPage-CIw_7B72-CcQHWkUG.js} +15 -15
  169. package/dist/assets/TransactionList-B9M4ftBY-9Xoftl5l.js +147 -0
  170. package/dist/assets/{TransactionListBig-BidYBgz3-5Yl91ZX2.js → TransactionListBig-D5SRFdH7-CUrzZcWs.js} +1 -1
  171. package/dist/assets/TransactionListPage-DCiIH4ES-DulMTWBW.js +35 -0
  172. package/dist/assets/{TransactionVendorDetailPage-LzIzQGZ1-DhRVTfh8.js → TransactionVendorDetailPage-BNY3vBm0-Cw6AkzlK.js} +5 -5
  173. package/dist/assets/{TransferDrawerPage-CztFCYxm-A_gVbaFq.js → TransferDrawerPage-DdgfrrRM-BBEomNnq.js} +43 -43
  174. package/dist/assets/{TreasuryOverviewPage-E5E5Gr3g-BXlIIBea.js → TreasuryOverviewPage-COFbWN48-DSaB6zFu.js} +19 -19
  175. package/dist/assets/{TreasuryPromoPage-D2F4Y8gV-D4r4OVpG.js → TreasuryPromoPage-EYqV98OG-CvFj_oTJ.js} +18 -18
  176. package/dist/assets/{TreasurySetupPage-Dxa4l6Ec-C98zHjAP.js → TreasurySetupPage-DEz3fabz-BopnXkx6.js} +2 -2
  177. package/dist/assets/{TreasuryStatementsPage-DEhWu0S0-Cq8llxzq.js → TreasuryStatementsPage-JSf4JXXI-CSff_RYi.js} +2 -2
  178. package/dist/assets/{TreasuryTaxLetterPage-CEMU2CI9-CaMBHbid.js → TreasuryTaxLetterPage-Id6od0WY-D3YHLWYb.js} +3 -3
  179. package/dist/assets/{TreasuryTransferOrReviewPage-BfReLw_V-DlzqxUSw.js → TreasuryTransferOrReviewPage-D25tiep8-CregJCyC.js} +46 -46
  180. package/dist/assets/{TrendChart-D1gtjDe3-DgecHpjD.js → TrendChart-xBdkrxjQ-BHwV7FvD.js} +1 -1
  181. package/dist/assets/{TrendWithTransactions-BslpnJTN-DM_bUa3k.js → TrendWithTransactions-CQdqelNB-BxApJhmm.js} +7 -7
  182. package/dist/assets/{UncategorizedAccountsMappingPage-Brm7fcuy-Lq1gPvO_.js → UncategorizedAccountsMappingPage-DaSjSoeK-2h_6-Ko4.js} +10 -10
  183. package/dist/assets/{UnitIntegrationPage-DhiEmm9g-DvJDyLPM.js → UnitIntegrationPage-zM4qGyLV-CinH_PeY.js} +3 -3
  184. package/dist/assets/{UploadAdditionalDocumentOverlay-Dq1ToFCn-BIAvqiTV.js → UploadAdditionalDocumentOverlay-Y64l7Rho-BebTHNkT.js} +2 -2
  185. package/dist/assets/{Vendor2FAPopup-Brg14-Cw-D6yUhffP.js → Vendor2FAPopup-DO-eL5Ot-DjhAlKT-.js} +1 -1
  186. package/dist/assets/{VendorACHDetailsPage-mk0vAyqE-BXjAbyW1.js → VendorACHDetailsPage-BDROr_dC-CAZxPDsT.js} +1 -1
  187. package/dist/assets/{VendorDetailPage-CRhCXEsq-ByCD1QlC.js → VendorDetailPage-B8S-gV53-DaZx1eZP.js} +18 -18
  188. package/dist/assets/{VendorDomesticWireDetailsPage-DhWkYV9N-DytBbPSU.js → VendorDomesticWireDetailsPage-BrxQuXus-DYcgNh9D.js} +1 -1
  189. package/dist/assets/{VendorFiling1099EditablePage-Bp5FgSiJ-CQgouOQ1.js → VendorFiling1099EditablePage-BK-XGzxl-CVlxfcrS.js} +32 -32
  190. package/dist/assets/{VendorFirstReviewPage-XHOyQIOp-BcDyJnSm.js → VendorFirstReviewPage-CrSdEY-q-DsAt-Zva.js} +31 -31
  191. package/dist/assets/{VendorInternationalWireDetailsPage-B13qu8u3-Cr7Rw8Vd.js → VendorInternationalWireDetailsPage-DuE2n00d-C0HY8jsi.js} +9 -9
  192. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-Dtgusj3r-DSS2WNka.js → VendorInternationalWireSwiftDetailsPage-_0douojx-uTqjQvZ8.js} +1 -1
  193. package/dist/assets/{VendorsAccountsSection-B-qorJ8x-BDTocsmP.js → VendorsAccountsSection-C2McA3-C-CAGlOz8b.js} +4 -4
  194. package/dist/assets/VerifyDevice-BOb4uKLq-B9iw9cGN.js +96 -0
  195. package/dist/assets/{WarningsDrawerPage-B4Nic3gX-D_tDlIsb.js → WarningsDrawerPage-f9lS8sCp-Yx0s05ZC.js} +7 -7
  196. package/dist/assets/{ZeniAccountDetailPage-IDGYSZVs-DHzL4YW_.js → ZeniAccountDetailPage-BnWDpR9g-BpHh2OhY.js} +17 -17
  197. package/dist/assets/{ZeniAccountListViewPage-IlPP8Yit-e7XViZS5.js → ZeniAccountListViewPage-D9ORn0_O-BQPutSAN.js} +16 -16
  198. package/dist/assets/{ZeniAccountNavBarPieces-2j-ZQRIF-C9FaUYbe.js → ZeniAccountNavBarPieces-4jG3uNmW-B7nBCOPn.js} +2 -2
  199. package/dist/assets/{ZeniAccountPromoPage-BhFf42Fz-CCcGWwVA.js → ZeniAccountPromoPage-CswETXvx-DfER_hgz.js} +1 -1
  200. package/dist/assets/{ZeniAccountSetupPage-DcYDO3x8-1dxj4hNi.js → ZeniAccountSetupPage-7B6Vgmg6-DsByA6Pf.js} +3 -3
  201. package/dist/assets/{ZeniCopyright-C4Ze2E8o-BF7Y_OhF.js → ZeniCopyright-DrkcGEYL-D8qMh6Rn.js} +1 -1
  202. package/dist/assets/{ZeniTransferAmountSlider-DFB0ntiR-DEw2G9RV.js → ZeniTransferAmountSlider-Bw5S2HTx-CfuKg8UT.js} +1 -1
  203. package/dist/assets/{add-to-wallet-DgdBD8_G-DcfyMc0W.js → add-to-wallet-DgdBD8_G-y8nGTHEa.js} +1 -1
  204. package/dist/assets/{analyticsHelper-Cfbkdlur.js → analyticsHelper-B46gu6zH.js} +1 -1
  205. package/dist/assets/{analyticsHelper-CsfdC0kT-CkpNzA-i.js → analyticsHelper-C37dCyKv-Ci3W403B.js} +1 -1
  206. package/dist/assets/{arrow-south-east-round-PEovUgvH-DBLhwZXJ.js → arrow-south-east-round-PEovUgvH-D6oVD1ix.js} +1 -1
  207. package/dist/assets/{auto-transfer-rule-mbafm5D3-D6YoufI_.js → auto-transfer-rule-mbafm5D3-DsDlaCxy.js} +1 -1
  208. package/dist/assets/{chartTypes-CPj7oOMJ-BdHmGEgv.js → chartTypes-Cknnnhq_-BKEap-MQ.js} +1 -1
  209. package/dist/assets/{commonDimensions-CKs-7p-V-2mIh0uhQ.js → commonDimensions-D0ovCC4N-B0G2UdHm.js} +1 -1
  210. package/dist/assets/{crypto-BURQLTgV.js → crypto-BDNqpTKX.js} +1 -1
  211. package/dist/assets/{detailCommon-BJ8iCchG-D9ueUtlf.js → detailCommon-CKa5_aP2-CTgqAfFe.js} +2 -2
  212. package/dist/assets/{downloadPdf-hPck-AA1-BRfoLwQe.js → downloadPdf-BJozh7zE-M2Rp1JlQ.js} +1 -1
  213. package/dist/assets/{gift-box-Cmt9OgIZ-DKWN92w0.js → gift-box-Cmt9OgIZ-BqWjP_Ex.js} +1 -1
  214. package/dist/assets/{graphic-no-data-l-DU4J8fDt-BalbEtqQ.js → graphic-no-data-l-DU4J8fDt-BBc6l6Au.js} +1 -1
  215. package/dist/assets/{graphic-no-data-net-burn-l-CzmycA0m-DR-LfIWY.js → graphic-no-data-net-burn-l-CzmycA0m-DANomItj.js} +1 -1
  216. package/dist/assets/handshake-BPg58FML-CVKh3Eii.js +1 -0
  217. package/dist/assets/{index-DjfQ_8_G.js → index-Cnh9fv8f.js} +481 -473
  218. package/dist/assets/{liveblocks-DZpRS25q.js → liveblocks-CP09Cz-7.js} +1 -1
  219. package/dist/assets/{lodash-Dq_mKlGB.js → lodash-BWJmwMit.js} +1 -1
  220. package/dist/assets/{mapLoadingInProgressToTreeNode-R394S2in-yG54fD0k.js → mapLoadingInProgressToTreeNode-DttwbPj7-BWaq84fe.js} +1 -1
  221. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-B20NECa8-BFYhaGC6.js → mapSectionWithAcOnlyToTreeNode-CKUACdvT-96C16ahX.js} +1 -1
  222. package/dist/assets/{mapSpacerToTreeNode-CLYF1Foh-BjdisaSl.js → mapSpacerToTreeNode-CeH4tptC-BD7Zb85P.js} +1 -1
  223. package/dist/assets/{mapTimeframeBalancesToTreeNode-B-iRb2_j-DquYgMDw.js → mapTimeframeBalancesToTreeNode-CElz2Cb0-CuxVDYys.js} +1 -1
  224. package/dist/assets/{mapTimeframeBalancesToTreeNode-fLAswzPX-sXx3Rgkk.js → mapTimeframeBalancesToTreeNode-TLHaVbTv-OZW2z0IX.js} +1 -1
  225. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-CTmIxkdn-Tzb1GX6L.js → mapTimeframeHeaderLoadingInProgressToTreeNode-D96sl236-Da50HxFS.js} +1 -1
  226. package/dist/assets/{mui-Bi8r7UDG.js → mui-C42whWwM.js} +1 -1
  227. package/dist/assets/{page-detail-CWX5S47F-B6DjZ3Gi.js → page-detail-CWX5S47F-BBa5wfAm.js} +1 -1
  228. package/dist/assets/{play-icon-BZYr9mDs-BdQoiOuZ.js → play-icon-XWt7iQeF-7dWJ4Dkg.js} +1 -1
  229. package/dist/assets/{radio-default-CiSgisfh-ub7QGXr8.js → radio-default-CiSgisfh-Z5w0WcFM.js} +1 -1
  230. package/dist/assets/{redux-CC-tnuv1.js → redux-2gfZRks6.js} +1 -1
  231. package/dist/assets/{routing-CxYXTKiv.js → routing-VwiwPky5.js} +1 -1
  232. package/dist/assets/{sentry-HDxG13yk.js → sentry-osuhWjvS.js} +1 -1
  233. package/dist/assets/{shield-DOlUxcFf-BCUrujod.js → shield-DOlUxcFf-bFVWRY1X.js} +1 -1
  234. package/dist/assets/{toCOABalancesWithID-Dsa-tGTi-sDqqdfBL.js → toCOABalancesWithID-DACfD5ZE-BgoTIDec.js} +1 -1
  235. package/dist/assets/{toChartData-Cp_80Bi6-DNhfaq63.js → toChartData-C6ap15NT-ByCawuJX.js} +1 -1
  236. package/dist/assets/{transaction-placeholder-CpOwZAMG-CJJQqrcA.js → transaction-placeholder-CpOwZAMG-DYG2_sCF.js} +1 -1
  237. package/dist/assets/{treasuryColorHelper-CnKoJBRW-C1sO9xUo.js → treasuryColorHelper-DmVCoHv9-Cx3TVoRp.js} +1 -1
  238. package/dist/assets/{uploadAttachment-Cx3LGzsg-BLoeW5Lc.js → uploadAttachment-D1XtO8---B9AANbCr.js} +23 -23
  239. package/dist/assets/{uploadReceipts-CwjPukNh-D57dKxMS.js → uploadReceipts-Cl7e8jci-C-56lzXC.js} +1 -1
  240. package/dist/assets/{useLongPress-GCK2COYQ-gxLtL5O4.js → useLongPress-GCK2COYQ-BoJXFS3o.js} +1 -1
  241. package/dist/assets/{usp-line-BBd1wKwW-CgKq8-Xn.js → usp-line-BBd1wKwW-u-VMxix8.js} +1 -1
  242. package/dist/assets/{vendor-CnQcJ2Lu.js → vendor-rkTZJa59.js} +7 -7
  243. package/dist/assets/{verification-CW6uEyev-DdkqedMU.js → verification-CW6uEyev-BVrJsi0i.js} +1 -1
  244. package/dist/index.html +1 -1
  245. package/package.json +3 -3
  246. package/dist/assets/ConfettiBurst-b1-NNKbl-CRZv8suA.js +0 -1
  247. package/dist/assets/CustomerOnboardingContainerPage-BXSxGbv8-yPFLkaH4.js +0 -1
  248. package/dist/assets/EntityDetailPage-BsQ9bSpC-Ccfh9SD-.js +0 -18
  249. package/dist/assets/FeaturePreviewPage-Coe53hoK-GblH5291.js +0 -11
  250. package/dist/assets/LabeledAddressValueField-DJHY_wPN-C8cLNKuC.js +0 -45
  251. package/dist/assets/SignIn-_ZPdER_K-iNnyyU-5.js +0 -408
  252. package/dist/assets/StatementsPage-Bhk6u845-DupKw2VZ.js +0 -58
  253. package/dist/assets/TransactionList-CFYj7bYL-CzoueHti.js +0 -147
  254. package/dist/assets/TransactionListPage-CImIYabg-nUJGuSyl.js +0 -35
  255. package/dist/assets/VerifyDevice-CBO1Uzra-BYrx8Dkz.js +0 -67
@@ -1,4 +1,4 @@
1
- import{j as p,r as Ls,R as qd}from"./mui-Bi8r7UDG.js";import{c as Lo,b as f,d as yi,g as cu,f as me,R as C0}from"./vendor-CnQcJ2Lu.js";var Aa,jc;function b0(){if(jc)return Aa;jc=1;var e=typeof Lo=="object"&&Lo&&Lo.Object===Object&&Lo;return Aa=e,Aa}var xa,Mc;function Gd(){if(Mc)return xa;Mc=1;var e=b0(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return xa=n,xa}var Oa,_c;function Yd(){if(_c)return Oa;_c=1;var e=Gd(),t=e.Symbol;return Oa=t,Oa}var Sa,Lc;function y0(){if(Lc)return Sa;Lc=1;var e=Yd(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function s(a){var i=n.call(a,o),u=a[o];try{a[o]=void 0;var c=!0}catch{}var l=r.call(a);return c&&(i?a[o]=u:delete a[o]),l}return Sa=s,Sa}var Ta,$c;function E0(){if($c)return Ta;$c=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Ta=n,Ta}var Ra,Uc;function D0(){if(Uc)return Ra;Uc=1;var e=Yd(),t=y0(),n=E0(),r="[object Null]",o="[object Undefined]",s=e?e.toStringTag:void 0;function a(i){return i==null?i===void 0?o:r:s&&s in Object(i)?t(i):n(i)}return Ra=a,Ra}var Ia,Hc;function lu(){if(Hc)return Ia;Hc=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Ia=e,Ia}var Ba,Wc;function w0(){if(Wc)return Ba;Wc=1;function e(t){return t!=null&&typeof t=="object"}return Ba=e,Ba}var Fa,zc;function A0(){if(zc)return Fa;zc=1;var e=D0(),t=w0(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return Fa=r,Fa}var Pa,Vc;function x0(){if(Vc)return Pa;Vc=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Pa=t,Pa}var Na,Kc;function O0(){if(Kc)return Na;Kc=1;var e=x0(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Na=n,Na}var ka,qc;function S0(){if(qc)return ka;qc=1;var e=O0(),t=lu(),n=A0(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt;function u(c){if(typeof c=="number")return c;if(n(c))return r;if(t(c)){var l=typeof c.valueOf=="function"?c.valueOf():c;c=t(l)?l+"":l}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=s.test(c);return d||a.test(c)?i(c.slice(2),d?2:8):o.test(c)?r:+c}return ka=u,ka}var T0="@liveblocks/react",R0="2.23.0",I0="esm";function dP(e){const[t,n]=f.useState(!1);return f.useEffect(()=>{n(!0)},[]),p.jsx(f.Suspense,{fallback:e.fallback,children:t?typeof e.children=="function"?e.children():e.children:e.fallback})}var B0=Object.defineProperty,F0=(e,t)=>{for(var n in t)B0(e,n,{get:t[n],enumerable:!0})},P0="@liveblocks/core",fu="2.23.0",N0="esm",$o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof yi<"u"?yi:{},k0="https://liveblocks.io/docs/errors/dupes",j0=" ";function M0(e){console.error(e)}function du(e,t,n){const r=Symbol.for(e),o=`${t} (${n})`;if(!$o[r])$o[r]=o;else if($o[r]!==o){const s=[`Multiple copies of Liveblocks are being loaded in your project. This will cause issues! See ${k0+j0}`,"","Conflicts:",`- ${e} ${$o[r]} (already loaded)`,`- ${e} ${o} (trying to load this now)`].join(`
1
+ import{j as p,r as Ls,R as qd}from"./mui-C42whWwM.js";import{c as Lo,b as f,d as yi,g as cu,f as me,R as C0}from"./vendor-rkTZJa59.js";var Aa,jc;function b0(){if(jc)return Aa;jc=1;var e=typeof Lo=="object"&&Lo&&Lo.Object===Object&&Lo;return Aa=e,Aa}var xa,Mc;function Gd(){if(Mc)return xa;Mc=1;var e=b0(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return xa=n,xa}var Oa,_c;function Yd(){if(_c)return Oa;_c=1;var e=Gd(),t=e.Symbol;return Oa=t,Oa}var Sa,Lc;function y0(){if(Lc)return Sa;Lc=1;var e=Yd(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function s(a){var i=n.call(a,o),u=a[o];try{a[o]=void 0;var c=!0}catch{}var l=r.call(a);return c&&(i?a[o]=u:delete a[o]),l}return Sa=s,Sa}var Ta,$c;function E0(){if($c)return Ta;$c=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Ta=n,Ta}var Ra,Uc;function D0(){if(Uc)return Ra;Uc=1;var e=Yd(),t=y0(),n=E0(),r="[object Null]",o="[object Undefined]",s=e?e.toStringTag:void 0;function a(i){return i==null?i===void 0?o:r:s&&s in Object(i)?t(i):n(i)}return Ra=a,Ra}var Ia,Hc;function lu(){if(Hc)return Ia;Hc=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Ia=e,Ia}var Ba,Wc;function w0(){if(Wc)return Ba;Wc=1;function e(t){return t!=null&&typeof t=="object"}return Ba=e,Ba}var Fa,zc;function A0(){if(zc)return Fa;zc=1;var e=D0(),t=w0(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return Fa=r,Fa}var Pa,Vc;function x0(){if(Vc)return Pa;Vc=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Pa=t,Pa}var Na,Kc;function O0(){if(Kc)return Na;Kc=1;var e=x0(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Na=n,Na}var ka,qc;function S0(){if(qc)return ka;qc=1;var e=O0(),t=lu(),n=A0(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt;function u(c){if(typeof c=="number")return c;if(n(c))return r;if(t(c)){var l=typeof c.valueOf=="function"?c.valueOf():c;c=t(l)?l+"":l}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=s.test(c);return d||a.test(c)?i(c.slice(2),d?2:8):o.test(c)?r:+c}return ka=u,ka}var T0="@liveblocks/react",R0="2.23.0",I0="esm";function dP(e){const[t,n]=f.useState(!1);return f.useEffect(()=>{n(!0)},[]),p.jsx(f.Suspense,{fallback:e.fallback,children:t?typeof e.children=="function"?e.children():e.children:e.fallback})}var B0=Object.defineProperty,F0=(e,t)=>{for(var n in t)B0(e,n,{get:t[n],enumerable:!0})},P0="@liveblocks/core",fu="2.23.0",N0="esm",$o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof yi<"u"?yi:{},k0="https://liveblocks.io/docs/errors/dupes",j0=" ";function M0(e){console.error(e)}function du(e,t,n){const r=Symbol.for(e),o=`${t} (${n})`;if(!$o[r])$o[r]=o;else if($o[r]!==o){const s=[`Multiple copies of Liveblocks are being loaded in your project. This will cause issues! See ${k0+j0}`,"","Conflicts:",`- ${e} ${$o[r]} (already loaded)`,`- ${e} ${o} (trying to load this now)`].join(`
2
2
  `);M0(s)}}function Ei(e){const t=e.editedAt?new Date(e.editedAt):void 0,n=new Date(e.createdAt),r=e.reactions.map(o=>({...o,createdAt:new Date(o.createdAt)}));if(e.body)return{...e,reactions:r,createdAt:n,editedAt:t};{const o=new Date(e.deletedAt);return{...e,reactions:r,createdAt:n,editedAt:t,deletedAt:o}}}function fn(e){const t=new Date(e.createdAt),n=new Date(e.updatedAt),r=e.comments.map(o=>Ei(o));return{...e,createdAt:t,updatedAt:n,comments:r}}function _0(e){return{...e,createdAt:new Date(e.createdAt)}}function In(e){const t=new Date(e.notifiedAt),n=e.readAt?new Date(e.readAt):null;if("activities"in e){const r=e.activities.map(o=>({...o,createdAt:new Date(o.createdAt)}));return{...e,notifiedAt:t,readAt:n,activities:r}}return{...e,notifiedAt:t,readAt:n}}function ja(e){const t=new Date(e.deletedAt);return{...e,deletedAt:t}}function Ma(e){const t=new Date(e.deletedAt);return{...e,deletedAt:t}}var Cn={};F0(Cn,{error:()=>wo,errorWithTitle:()=>Qd,warn:()=>ft,warnWithTitle:()=>$0});var Xd="background:#0e0d12;border-radius:9999px;color:#fff;padding:3px 7px;font-family:sans-serif;font-weight:600;",L0="font-weight:600";function Zd(e){return typeof window>"u"?console[e]:(t,...n)=>console[e]("%cLiveblocks",Xd,t,...n)}var ft=Zd("warn"),wo=Zd("error");function Jd(e){return typeof window>"u"?console[e]:(t,n,...r)=>console[e](`%cLiveblocks%c ${t}`,Xd,L0,n,...r)}var $0=Jd("warn"),Qd=Jd("error");function nn(e){return e!==null&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"}function Di(e){return nn(e)&&typeof e.startsWith=="string"}function wt(e){throw new Error(e)}function hu(e){return Object.entries(e)}function U0(e){return Object.keys(e)}function H0(e,t){return typeof t<"u"?Object.create(e,t):Object.create(e)}function $s(e){try{return JSON.parse(e)}catch{return}}function ro(e){return JSON.parse(JSON.stringify(e))}function W0(e){try{const t=e.replace(/-/g,"+").replace(/_/g,"/");return decodeURIComponent(atob(t).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""))}catch{return atob(e)}}function wi(e){return e.filter(t=>t!=null)}function Ao(e){const t={...e};return Object.keys(e).forEach(n=>{const r=n;t[r]===void 0&&delete t[r]}),t}function z0(e){return new Promise(t=>setTimeout(t,e))}async function Gc(e,t,n){let r;const o=new Promise((s,a)=>{r=setTimeout(()=>{a(new Error(n))},t)});return Promise.race([e,o]).finally(()=>clearTimeout(r))}function Yc(e){let t=null;return()=>(t===null&&(t=e().catch(n=>{throw setTimeout(()=>{t=null},5e3),n})),t)}var Ar=class eh extends Error{response;details;constructor(t,n,r){super(t),this.name="HttpError",this.response=n,this.details=r}static async fromResponse(t){let n;try{n=await t.text()}catch{}const r=n?$s(n):void 0;let o;nn(r)&&(o=r);let s="";s||=typeof o?.message=="string"?o.message:"",s||=typeof o?.error=="string"?o.error:"",r===void 0&&(s||=n||""),s||=t.statusText;let a;try{a=new URL(t.url).pathname}catch{}s+=a!==void 0?` (got status ${t.status} from ${a})`:` (got status ${t.status})`;const i=o;return new eh(s,t,i)}get status(){return this.response.status}},V0=e=>e instanceof Ar&&e.status>=400&&e.status<500;async function Yr(e,t,n,r=V0){const o=n.length>0?n[n.length-1]:0;let s=0;for(;;){s++;try{return await e()}catch(i){if(r(i))throw i;if(s>=t)throw new Error(`Failed after ${t} attempts: ${String(i)}`)}const a=n[s-1]??o;ft(`Attempt ${s} was unsuccessful. Retrying in ${a} milliseconds.`),await z0(a)}}function th(){let e,t;return[new Promise((r,o)=>{e=r,t=o}),e,t]}function nh(){const[e,t,n]=th();return{promise:e,resolve:t,reject:n}}function Ie(){const e=new Set;function t(a){return e.add(a),()=>e.delete(a)}function n(a){const i=t(u=>(i(),a(u)));return i}async function r(a){let i;return new Promise(u=>{i=t(c=>{(a===void 0||a(c))&&u(c)})}).finally(()=>i?.())}function o(a){let i=!1;for(const u of e)u(a),i=!0;return i}function s(){return e.size}return{notify:o,subscribe:t,subscribeOnce:n,count:s,waitUntil:r,[Symbol.dispose]:()=>{e.clear()},observable:{subscribe:t,subscribeOnce:n,waitUntil:r}}}function K0(){const e=Ie();let t=null;function n(){t=[]}function r(){if(t!==null){for(const s of t)e.notify(s);t=null}}function o(s){return t!==null?(t.push(s),!1):e.notify(s)}return{...e,notify:o,pause:n,unpause:r,[Symbol.dispose]:()=>{e[Symbol.dispose](),t!==null&&(t.length=0)}}}var En=e=>e,Bn=Symbol("kSinks"),gs=Symbol("kTrigger"),fr=null,Mn=null;function ct(e){if(fr!==null){e();return}fr=new Set;try{e()}finally{for(const t of fr)t[gs]();fr=null}}function pu(e){fr||wt("Expected to be in an active batch"),fr.add(e)}function rh(e,t){let n=!1;const r={...e};return Object.keys(t).forEach(o=>{const s=o,a=t[s];r[s]!==a&&(a===void 0?delete r[s]:r[s]=a,n=!0)}),n?r:e}var mu=class{equals;#e;[Bn];constructor(e){this.equals=e??Object.is,this.#e=Ie(),this[Bn]=new Set,this.get=this.get.bind(this),this.subscribe=this.subscribe.bind(this),this.subscribeOnce=this.subscribeOnce.bind(this)}[Symbol.dispose](){this.#e[Symbol.dispose](),this.#e="(disposed)",this.equals="(disposed)"}get hasWatchers(){if(this.#e.count()>0)return!0;for(const e of this[Bn])if(e.hasWatchers)return!0;return!1}[gs](){this.#e.notify();for(const e of this[Bn])pu(e)}subscribe(e){return this.#e.count()===0&&this.get(),this.#e.subscribe(e)}subscribeOnce(e){const t=this.subscribe(()=>(t(),e()));return t}waitUntil(){throw new Error("waitUntil not supported on Signals")}markSinksDirty(){for(const e of this[Bn])e.markDirty()}addSink(e){this[Bn].add(e)}removeSink(e){this[Bn].delete(e)}asReadonly(){return this}},zt=class extends mu{#e;constructor(e,t){super(t),this.#e=En(e)}[Symbol.dispose](){super[Symbol.dispose](),this.#e="(disposed)"}get(){return Mn?.add(this),this.#e}set(e){ct(()=>{typeof e=="function"&&(e=e(this.#e)),this.equals(this.#e,e)||(this.#e=En(e),this.markSinksDirty(),pu(this))})}},q0=class extends zt{constructor(e){super(En(Ao(e)))}set(){throw new Error("Don't call .set() directly, use .patch()")}patch(e){super.set(t=>rh(t,e))}},G0=Symbol(),Xe=class Ai extends mu{#e;#t;#n;#r;#s;static from(...t){const n=t.pop();if(typeof n!="function"&&wt("Invalid .from() call, last argument expected to be a function"),typeof t[t.length-1]=="function"){const r=n,o=t.pop();return new Ai(t,o,r)}else{const r=n;return new Ai(t,r)}}constructor(t,n,r){super(r),this.#t=!0,this.#e=G0,this.#r=t,this.#n=new Set,this.#s=n}[Symbol.dispose](){for(const t of this.#n)t.removeSink(this);this.#e="(disposed)",this.#n="(disposed)",this.#r="(disposed)",this.#s="(disposed)"}get isDirty(){return this.#t}#o(){const t=Mn;let n;Mn=new Set;try{n=this.#s(...this.#r.map(r=>r.get()))}finally{const r=this.#n;this.#n=new Set;for(const o of Mn)this.#n.add(o),r.delete(o);for(const o of r)o.removeSink(this);for(const o of this.#n)o.addSink(this);Mn=t}return this.#t=!1,this.equals(this.#e,n)?!1:(this.#e=n,!0)}markDirty(){this.#t||(this.#t=!0,this.markSinksDirty())}get(){return this.#t&&this.#o(),Mn?.add(this),this.#e}[gs](){if(!this.hasWatchers)return;this.#o()&&super[gs]()}},Xn=class extends mu{#e;constructor(e){super(),this.#e=e}[Symbol.dispose](){super[Symbol.dispose](),this.#e="(disposed)"}get(){return Mn?.add(this),this.#e}mutate(e){ct(()=>{const t=e?e(this.#e):!0;t!==null&&typeof t=="object"&&"then"in t&&wt("MutableSignal.mutate() does not support async callbacks"),t!==!1&&(this.markSinksDirty(),pu(this))})}};function Y0(e,t){return t!==null&&typeof t=="object"&&!Array.isArray(t)?Object.keys(t).sort().reduce((n,r)=>(n[r]=t[r],n),{}):t}function zn(e){return JSON.stringify(e,Y0)}function tn(e){try{return JSON.stringify(e)}catch(t){throw console.error(`Could not stringify: ${t.message}`),console.error(e),t}}var X0=50,Z0=class{input;resolve;reject;promise;constructor(e){this.input=e;const{promise:t,resolve:n,reject:r}=nh();this.promise=t,this.resolve=n,this.reject=r}},Xr=class{#e=[];#t;#n;#r;#s;error=!1;constructor(e,t){this.#t=e,this.#n=t.size??X0,this.#r=t.delay}#o(){this.#s!==void 0&&(clearTimeout(this.#s),this.#s=void 0)}#i(){this.#e.length===this.#n?this.#a():this.#e.length===1&&(this.#o(),this.#s=setTimeout(()=>void this.#a(),this.#r))}async#a(){if(this.#e.length===0)return;const e=this.#e.splice(0),t=e.map(n=>n.input);try{const n=await this.#t(t);this.error=!1,e.forEach((r,o)=>{const s=n?.[o];Array.isArray(n)?e.length!==n.length?r.reject(new Error(`Callback must return an array of the same length as the number of provided items. Expected ${e.length}, but got ${n.length}.`)):s instanceof Error?r.reject(s):r.resolve(s):r.reject(new Error("Callback must return an array."))})}catch(n){this.error=!0,e.forEach(r=>{r.reject(n)})}}get(e){const t=this.#e.find(r=>zn(r.input)===zn(e));if(t)return t.promise;const n=new Z0(e);return this.#e.push(n),this.#i(),n.promise}clear(){this.#e=[],this.error=!1,this.#o()}};function xi(e){const t=new Xn(new Map);function n(u){return zn(u)}function r(u,c){t.mutate(l=>{l.set(u,c)})}function o(u){t.mutate(c=>{if(Array.isArray(u))for(const l of u)c.delete(n(l));else c.clear()})}async function s(u){const c=n(u);if(!t.get().has(c))try{r(c,{isLoading:!0});const d=await e.get(u);r(c,{isLoading:!1,data:d})}catch(d){r(c,{isLoading:!1,error:d})}}function a(u){const c=n(u);return t.get().get(c)}function i(){return[...t.get().keys()]}return{subscribe:t.subscribe,enqueue:s,getItemState:a,invalidate:o,batch:e,_cacheKeys:i}}function J0(e,t){const n=[];for(let r=0,o=e.length;r<o;r+=t)n.push(e.slice(r,r+t));return n}var Pr=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>t+=(n&=63)<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-",""),Q0="th",eC="cm",tC="at";function vu(e){return`${e}_${Pr()}`}function oh(){return vu(Q0)}function Cs(){return vu(eC)}function sh(){return vu(tC)}var It=class extends Map{#e;constructor(e,t){super(t),this.#e=e}getOrCreate(e,t){if(super.has(e))return super.get(e);{const r=(t??this.#e??wt("DefaultMap used without a factory function"))(e);return this.set(e,r),r}}},nC=/^[a-zA-Z_][a-zA-Z0-9_]*$/;function Xc(e){let t=[];const n=Object.entries(e),r=[],o=[],s=[];return n.forEach(([a,i])=>{if(!nC.test(a))throw new Error("Key must only contain letters, numbers, _");Qc(i)?r.push([a,i]):nn(i)&&(Di(i)?o.push([a,i]):s.push([a,i]))}),t=[...Zc(r),...Jc(o)],s.forEach(([a,i])=>{const u=Object.entries(i),c=[],l=[];u.forEach(([d,m])=>{if(rC(d))throw new Error("Key cannot be empty");Qc(m)?c.push([el(a,d),m]):Di(m)&&l.push([el(a,d),m])}),t=[...t,...Zc(c),...Jc(l)]}),t.map(({key:a,operator:i,value:u})=>`${a}${i}${ah(u)}`).join(" ")}var Zc=e=>{const t=[];return e.forEach(([n,r])=>{t.push({key:n,operator:":",value:r})}),t},Jc=e=>{const t=[];return e.forEach(([n,r])=>{"startsWith"in r&&typeof r.startsWith=="string"&&t.push({key:n,operator:"^",value:r.startsWith})}),t},Qc=e=>typeof e=="string"||typeof e=="number"||typeof e=="boolean"||e===null,el=(e,t)=>t?`${e}[${ah(t)}]`:e,rC=e=>!e||e.toString().trim()==="";function ah(e){const t=JSON.stringify(e);return typeof e!="string"||t.includes("'")?t:`'${t.slice(1,-1).replace(/\\"/g,'"')}'`}function oC(e){const t=new URLSearchParams;for(const[n,r]of Object.entries(e))r!=null&&t.set(n,r.toString());return t}function sC(e,t,n){const r=new URL(t,e);return n!==void 0&&(r.search=(n instanceof URLSearchParams?n:oC(n)).toString()),r.toString()}function ye(e,...t){return e.reduce((n,r,o)=>n+encodeURIComponent(t[o-1]??"")+r)}function aC({baseUrl:e,authManager:t,fetchPolyfill:n}){const r=new iC(e,n);async function o(T){const q=await r.get(ye`/v2/c/rooms/${T.roomId}/threads/delta`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}),{since:T.since.toISOString()},{signal:T.signal});return{threads:{updated:q.data.map(fn),deleted:q.deletedThreads.map(ja)},inboxNotifications:{updated:q.inboxNotifications.map(In),deleted:q.deletedInboxNotifications.map(Ma)},requestedAt:new Date(q.meta.requestedAt),permissionHints:q.meta.permissionHints}}async function s(T){let q;T.query&&(q=Xc(T.query));const ne=50;try{const ie=await r.get(ye`/v2/c/rooms/${T.roomId}/threads`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}),{cursor:T.cursor,query:q,limit:ne});return{threads:ie.data.map(fn),inboxNotifications:ie.inboxNotifications.map(In),nextCursor:ie.meta.nextCursor,requestedAt:new Date(ie.meta.requestedAt),permissionHints:ie.meta.permissionHints}}catch(ie){if(ie instanceof Ar&&ie.status===404)return{threads:[],inboxNotifications:[],nextCursor:null,requestedAt:new Date(Date.now()-6*60*60*1e3),permissionHints:{}};throw ie}}async function a(T){const q=T.commentId??Cs(),ne=T.threadId??oh(),ie=await r.post(ye`/v2/c/rooms/${T.roomId}/threads`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}),{id:ne,comment:{id:q,body:T.body,attachmentIds:T.attachmentIds},metadata:T.metadata});return fn(ie)}async function i(T){await r.delete(ye`/v2/c/rooms/${T.roomId}/threads/${T.threadId}`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}))}async function u(T){const q=await r.rawGet(ye`/v2/c/rooms/${T.roomId}/thread-with-notification/${T.threadId}`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}));if(q.ok){const ne=await q.json();return{thread:fn(ne.thread),inboxNotification:ne.inboxNotification?In(ne.inboxNotification):void 0}}else{if(q.status===404)return{thread:void 0,inboxNotification:void 0};throw new Error(`There was an error while getting thread ${T.threadId}.`)}}async function c(T){return await r.post(ye`/v2/c/rooms/${T.roomId}/threads/${T.threadId}/metadata`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}),T.metadata)}async function l(T){const q=T.commentId??Cs(),ne=await r.post(ye`/v2/c/rooms/${T.roomId}/threads/${T.threadId}/comments`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}),{id:q,body:T.body,attachmentIds:T.attachmentIds});return Ei(ne)}async function d(T){const q=await r.post(ye`/v2/c/rooms/${T.roomId}/threads/${T.threadId}/comments/${T.commentId}`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}),{body:T.body,attachmentIds:T.attachmentIds});return Ei(q)}async function m(T){await r.delete(ye`/v2/c/rooms/${T.roomId}/threads/${T.threadId}/comments/${T.commentId}`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}))}async function g(T){const q=await r.post(ye`/v2/c/rooms/${T.roomId}/threads/${T.threadId}/comments/${T.commentId}/reactions`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}),{emoji:T.emoji});return _0(q)}async function C(T){await r.delete(ye`/v2/c/rooms/${T.roomId}/threads/${T.threadId}/comments/${T.commentId}/reactions/${T.emoji}`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}))}async function v(T){await r.post(ye`/v2/c/rooms/${T.roomId}/threads/${T.threadId}/mark-as-resolved`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}))}async function h(T){await r.post(ye`/v2/c/rooms/${T.roomId}/threads/${T.threadId}/mark-as-unresolved`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}))}async function E(T){const q=T.roomId,ne=T.signal,ie=T.attachment,we=ne?new DOMException(`Upload of attachment ${T.attachment.id} was aborted.`,"AbortError"):void 0;if(ne?.aborted)throw we;const xe=Ce=>{if(ne?.aborted)throw we;if(Ce instanceof Ar&&Ce.status===413)throw Ce;return!1},ae=5*1024*1024,Te=10,_e=[2e3,2e3,2e3,2e3,2e3,2e3,2e3,2e3,2e3,2e3];function he(Ce){const ke=[];let Pe=0;for(;Pe<Ce.size;){const be=Math.min(Pe+ae,Ce.size);ke.push({partNumber:ke.length+1,part:Ce.slice(Pe,be)}),Pe=be}return ke}if(ie.size<=ae)return Yr(async()=>r.putBlob(ye`/v2/c/rooms/${q}/attachments/${ie.id}/upload/${encodeURIComponent(ie.name)}`,await t.getAuthValue({requestedScope:"comments:read",roomId:q}),ie.file,{fileSize:ie.size},{signal:ne}),Te,_e,xe);{let Ce;const ke=[],Pe=await Yr(async()=>r.post(ye`/v2/c/rooms/${q}/attachments/${ie.id}/multipart/${encodeURIComponent(ie.name)}`,await t.getAuthValue({requestedScope:"comments:read",roomId:q}),void 0,{signal:ne},{fileSize:ie.size}),Te,_e,xe);try{Ce=Pe.uploadId;const be=he(ie.file);if(ne?.aborted)throw we;const Ee=J0(be,5);for(const $e of Ee){const qe=[];for(const{part:bt,partNumber:Je}of $e)qe.push(Yr(async()=>r.putBlob(ye`/v2/c/rooms/${q}/attachments/${ie.id}/multipart/${Pe.uploadId}/${String(Je)}`,await t.getAuthValue({requestedScope:"comments:read",roomId:q}),bt,void 0,{signal:ne}),Te,_e,xe));ke.push(...await Promise.all(qe))}if(ne?.aborted)throw we;const Ct=ke.sort(($e,qe)=>$e.partNumber-qe.partNumber);return r.post(ye`/v2/c/rooms/${q}/attachments/${ie.id}/multipart/${Ce}/complete`,await t.getAuthValue({requestedScope:"comments:read",roomId:q}),{parts:Ct},{signal:ne})}catch(be){if(Ce&&be?.name&&(be.name==="AbortError"||be.name==="TimeoutError"))try{await r.rawDelete(ye`/v2/c/rooms/${q}/attachments/${ie.id}/multipart/${Ce}`,await t.getAuthValue({requestedScope:"comments:read",roomId:q}))}catch{}throw be}}}const y=new It(T=>{const q=new Xr(async ne=>{const ie=ne.flat(),{urls:we}=await r.post(ye`/v2/c/rooms/${T}/attachments/presigned-urls`,await t.getAuthValue({requestedScope:"comments:read",roomId:T}),{attachmentIds:ie});return we.map(xe=>xe??new Error("There was an error while getting this attachment's URL"))},{delay:50});return xi(q)});function w(T){return y.getOrCreate(T)}function D(T){return w(T.roomId).batch.get(T.attachmentId)}async function x(T){return r.get(ye`/v2/c/rooms/${T.roomId}/notification-settings`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}),void 0,{signal:T.signal})}async function I(T){return r.post(ye`/v2/c/rooms/${T.roomId}/notification-settings`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}),T.settings)}const S=new It(T=>new Xr(async q=>{const ne=q.flat();return await r.post(ye`/v2/c/rooms/${T}/inbox-notifications/read`,await t.getAuthValue({requestedScope:"comments:read",roomId:T}),{inboxNotificationIds:ne}),ne},{delay:50}));async function k(T){return S.getOrCreate(T.roomId).get(T.inboxNotificationId)}async function W(T){await r.rawPost(ye`/v2/c/rooms/${T.roomId}/text-mentions`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}),{userId:T.userId,mentionId:T.mentionId})}async function P(T){await r.rawDelete(ye`/v2/c/rooms/${T.roomId}/text-mentions/${T.mentionId}`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}))}async function M(T){return r.rawGet(ye`/v2/c/rooms/${T.roomId}/y-version/${T.versionId}`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}))}async function F(T){await r.rawPost(ye`/v2/c/rooms/${T.roomId}/version`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}))}async function B(T){await r.rawPost(ye`/v2/c/rooms/${T.roomId}/text-metadata`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}),{type:T.type,rootKey:T.rootKey})}async function j(T){const q=await r.post(ye`/v2/c/rooms/${T.roomId}/ai/contextual-prompt`,await t.getAuthValue({requestedScope:"room:read",roomId:T.roomId}),{prompt:T.prompt,context:{beforeSelection:T.context.beforeSelection,selection:T.context.selection,afterSelection:T.context.afterSelection},previous:T.previous},{signal:T.signal});if(!q||q.content.length===0)throw new Error("No content returned from server");return q.content[0].text}async function $(T){const q=await r.get(ye`/v2/c/rooms/${T.roomId}/versions`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}));return{versions:q.versions.map(({createdAt:ne,...ie})=>({createdAt:new Date(ne),...ie})),requestedAt:new Date(q.meta.requestedAt)}}async function re(T){const q=await r.get(ye`/v2/c/rooms/${T.roomId}/versions/delta`,await t.getAuthValue({requestedScope:"comments:read",roomId:T.roomId}),{since:T.since.toISOString()},{signal:T.signal});return{versions:q.versions.map(({createdAt:ne,...ie})=>({createdAt:new Date(ne),...ie})),requestedAt:new Date(q.meta.requestedAt)}}async function Y(T){return await(await r.rawGet(ye`/v2/c/rooms/${T.roomId}/storage`,await t.getAuthValue({requestedScope:"room:read",roomId:T.roomId}))).json()}async function ee(T){return r.rawPost(ye`/v2/c/rooms/${T.roomId}/send-message`,await t.getAuthValue({requestedScope:"room:read",roomId:T.roomId}),{nonce:T.nonce,messages:T.messages})}async function L(T){const ne=await r.get(ye`/v2/c/inbox-notifications`,await t.getAuthValue({requestedScope:"comments:read"}),{cursor:T?.cursor,limit:50});return{inboxNotifications:ne.inboxNotifications.map(In),threads:ne.threads.map(fn),nextCursor:ne.meta.nextCursor,requestedAt:new Date(ne.meta.requestedAt)}}async function Q(T){const q=await r.get(ye`/v2/c/inbox-notifications/delta`,await t.getAuthValue({requestedScope:"comments:read"}),{since:T.since.toISOString()},{signal:T.signal});return{inboxNotifications:{updated:q.inboxNotifications.map(In),deleted:q.deletedInboxNotifications.map(Ma)},threads:{updated:q.threads.map(fn),deleted:q.deletedThreads.map(ja)},requestedAt:new Date(q.meta.requestedAt)}}async function V(){const{count:T}=await r.get(ye`/v2/c/inbox-notifications/count`,await t.getAuthValue({requestedScope:"comments:read"}));return T}async function te(){await r.post(ye`/v2/c/inbox-notifications/read`,await t.getAuthValue({requestedScope:"comments:read"}),{inboxNotificationIds:"all"})}async function se(T){await r.post(ye`/v2/c/inbox-notifications/read`,await t.getAuthValue({requestedScope:"comments:read"}),{inboxNotificationIds:T})}const de=new Xr(async T=>{const q=T.flat();return await se(q),q},{delay:50});async function G(T){await de.get(T)}async function R(){await r.delete(ye`/v2/c/inbox-notifications`,await t.getAuthValue({requestedScope:"comments:read"}))}async function _(T){await r.delete(ye`/v2/c/inbox-notifications/${T}`,await t.getAuthValue({requestedScope:"comments:read"}))}async function H(T){return r.get(ye`/v2/c/notification-settings`,await t.getAuthValue({requestedScope:"comments:read"}),void 0,{signal:T?.signal})}async function X(T){return r.post(ye`/v2/c/notification-settings`,await t.getAuthValue({requestedScope:"comments:read"}),T)}async function fe(T){let q;T?.query&&(q=Xc(T.query));const ie=await r.get(ye`/v2/c/threads`,await t.getAuthValue({requestedScope:"comments:read"}),{cursor:T?.cursor,query:q,limit:50});return{threads:ie.threads.map(fn),inboxNotifications:ie.inboxNotifications.map(In),nextCursor:ie.meta.nextCursor,requestedAt:new Date(ie.meta.requestedAt),permissionHints:ie.meta.permissionHints}}async function le(T){const q=await r.get(ye`/v2/c/threads/delta`,await t.getAuthValue({requestedScope:"comments:read"}),{since:T.since.toISOString()},{signal:T.signal});return{threads:{updated:q.threads.map(fn),deleted:q.deletedThreads.map(ja)},inboxNotifications:{updated:q.inboxNotifications.map(In),deleted:q.deletedInboxNotifications.map(Ma)},requestedAt:new Date(q.meta.requestedAt),permissionHints:q.meta.permissionHints}}return{getThreads:s,getThreadsSince:o,createThread:a,getThread:u,deleteThread:i,editThreadMetadata:c,createComment:l,editComment:d,deleteComment:m,addReaction:g,removeReaction:C,markThreadAsResolved:v,markThreadAsUnresolved:h,markRoomInboxNotificationAsRead:k,getNotificationSettings:x,updateNotificationSettings:I,createTextMention:W,deleteTextMention:P,getTextVersion:M,createTextVersion:F,reportTextEditor:B,listTextVersions:$,listTextVersionsSince:re,getAttachmentUrl:D,uploadAttachment:E,getOrCreateAttachmentUrlsStore:w,streamStorage:Y,sendMessages:ee,getInboxNotifications:L,getInboxNotificationsSince:Q,getUnreadInboxNotificationsCount:V,markAllInboxNotificationsAsRead:te,markInboxNotificationAsRead:G,deleteAllInboxNotifications:R,deleteInboxNotification:_,getUserNotificationSettings:H,updateUserNotificationSettings:X,getUserThreads_experimental:fe,getUserThreadsSince_experimental:le,executeContextualPrompt:j}}function ih(e){return e.type==="public"?e.publicApiKey:e.token.raw}var iC=class{#e;#t;constructor(e,t){this.#e=e,this.#t=t}async#n(e,t,n,r){e.startsWith("/v2/c/")||wt("This client can only be used to make /v2/c/* requests");const o=sC(this.#e,e,r);return await this.#t(o,{...n,headers:{"Content-Type":"application/json; charset=utf-8",...n?.headers,Authorization:`Bearer ${ih(t)}`,"X-LB-Client":fu}})}async#r(e,t,n,r){const o=await this.#n(e,t,n,r);if(!o.ok)throw await Ar.fromResponse(o);let s;try{s=await o.json()}catch{s={}}return s}async rawGet(e,t,n,r){return await this.#n(e,t,r,n)}async rawPost(e,t,n){return await this.#n(e,t,{method:"POST",body:tn(n)})}async rawDelete(e,t){return await this.#n(e,t,{method:"DELETE"})}async get(e,t,n,r){return await this.#r(e,t,r,n)}async post(e,t,n,r,o){return await this.#r(e,t,{...r,method:"POST",body:tn(n)},o)}async delete(e,t){return await this.#r(e,t,{method:"DELETE"})}async putBlob(e,t,n,r,o){return await this.#r(e,t,{...o,method:"PUT",headers:{"Content-Type":"application/octet-stream"},body:n},r)}};function lt(e,t){throw new Error(t)}function pe(e,t="Expected value to be non-nullable"){return e}function uC(e,t){if(e===t)return[0,0];const n=e.split("."),r=t.split("."),o=Math.min(n.length,r.length);let s=0;for(;s<o&&n[s]===r[s];s++);const a=n.length-s,i=r.length-s;return[a,i]}function cC(e,t){const n=e.split(".");if(t<1||t>n.length+1)throw new Error("Invalid number of levels");const r=[];t>n.length&&r.push("*");for(let o=n.length-t+1;o<n.length;o++){const s=n.slice(0,o);s.length>0&&r.push(s.join(".")+".*")}return r.push(e),r}var lC=class{#e;constructor(e){this.#e=e}get current(){return this.#e}allowPatching(e){const t=this;let n=!0;const r={...this.#e,patch(o){if(n){t.#e=Object.assign({},t.#e,o);for(const s of Object.entries(o)){const[a,i]=s;a!=="patch"&&(this[a]=i)}}else throw new Error("Can no longer patch stale context")}};e(r),n=!1}},fC=1,uh=class{id;#e;#t;#n;#r;#s;#o;events;#i;#a;#l;get#d(){const e=this.#n.values()[Symbol.iterator]().next();if(e.done)throw new Error("No states defined yet");return e.value}get currentState(){if(this.#r===null)throw this.#e===0?new Error("Not started yet"):new Error("Already stopped");return this.#r}start(){if(this.#e!==0)throw new Error("State machine has already started");return this.#e=1,this.#r=this.#d,this.#c(null),this}stop(){if(this.#e!==1)throw new Error("Cannot stop a state machine that hasn't started yet");this.#f(null),this.#e=2,this.#r=null}constructor(e){this.id=fC++,this.#e=0,this.#r=null,this.#n=new Set,this.#a=new Map,this.#i=[],this.#l=new Set,this.#s=new Map,this.#t=new lC(e),this.#o={didReceiveEvent:Ie(),willTransition:Ie(),didIgnoreEvent:Ie(),willExitState:Ie(),didEnterState:Ie()},this.events={didReceiveEvent:this.#o.didReceiveEvent.observable,willTransition:this.#o.willTransition.observable,didIgnoreEvent:this.#o.didIgnoreEvent.observable,willExitState:this.#o.willExitState.observable,didEnterState:this.#o.didEnterState.observable}}get context(){return this.#t.current}addState(e){if(this.#e!==0)throw new Error("Already started");return this.#n.add(e),this}onEnter(e,t){if(this.#e!==0)throw new Error("Already started");if(this.#a.has(e))throw new Error(`enter/exit function for ${e} already exists`);return this.#a.set(e,t),this}onEnterAsync(e,t,n,r,o){return this.onEnter(e,()=>{const s=new AbortController,a=s.signal,i=o?setTimeout(()=>{const c=new Error("Timed out");this.#u({type:"ASYNC_ERROR",reason:c},r)},o):void 0;let u=!1;return t(this.#t.current,a).then(c=>{a.aborted||(u=!0,this.#u({type:"ASYNC_OK",data:c},n))},c=>{a.aborted||(u=!0,this.#u({type:"ASYNC_ERROR",reason:c},r))}),()=>{clearTimeout(i),u||s.abort()}})}#h(e){const t=[];if(e==="*")for(const n of this.#n)t.push(n);else if(e.endsWith(".*")){const n=e.slice(0,-1);for(const r of this.#n)r.startsWith(n)&&t.push(r)}else{const n=e;this.#n.has(n)&&t.push(n)}if(t.length===0)throw new Error(`No states match ${JSON.stringify(e)}`);return t}addTransitions(e,t){if(this.#e!==0)throw new Error("Already started");for(const n of this.#h(e)){let r=this.#s.get(n);r===void 0&&(r=new Map,this.#s.set(n,r));for(const[o,s]of Object.entries(t)){if(r.has(o))throw new Error(`Trying to set transition "${o}" on "${n}" (via "${e}"), but a transition already exists there.`);const a=s;if(this.#l.add(o),a!==void 0){const i=typeof a=="function"?a:()=>a;r.set(o,i)}}}return this}addTimedTransition(e,t,n){return this.onEnter(e,()=>{const r=typeof t=="function"?t(this.#t.current):t,o=setTimeout(()=>{this.#u({type:"TIMER"},n)},r);return()=>{clearTimeout(o)}})}#p(e){return this.#s.get(this.currentState)?.get(e)}#f(e){this.#o.willExitState.notify(this.currentState),this.#t.allowPatching(t=>{e=e??this.#i.length;for(let n=0;n<e;n++)this.#i.pop()?.(t)})}#c(e){const t=cC(this.currentState,e??this.currentState.split(".").length+1);this.#t.allowPatching(n=>{for(const r of t){const s=this.#a.get(r)?.(n);typeof s=="function"?this.#i.push(s):this.#i.push(null)}}),this.#o.didEnterState.notify(this.currentState)}send(e){if(!this.#l.has(e.type))throw new Error(`Invalid event ${JSON.stringify(e.type)}`);if(this.#e===2)return;const t=this.#p(e.type);if(t!==void 0)return this.#u(e,t);this.#o.didIgnoreEvent.notify(e)}#u(e,t){this.#o.didReceiveEvent.notify(e);const n=this.currentState,o=(typeof t=="function"?t:()=>t)(e,this.#t.current);let s,a;if(o===null){this.#o.didIgnoreEvent.notify(e);return}if(typeof o=="string"?s=o:(s=o.target,a=Array.isArray(o.effect)?o.effect:[o.effect]),!this.#n.has(s))throw new Error(`Invalid next state name: ${JSON.stringify(s)}`);this.#o.willTransition.notify({from:n,to:s});const[i,u]=uC(this.currentState,s);if(i>0&&this.#f(i),this.#r=s,a!==void 0){const c=a;this.#t.allowPatching(l=>{for(const d of c)typeof d=="function"?d(l,e):l.patch(d)})}u>0&&this.#c(u)}},Zt=(e=>(e[e.UPDATE_PRESENCE=100]="UPDATE_PRESENCE",e[e.USER_JOINED=101]="USER_JOINED",e[e.USER_LEFT=102]="USER_LEFT",e[e.BROADCASTED_EVENT=103]="BROADCASTED_EVENT",e[e.ROOM_STATE=104]="ROOM_STATE",e[e.INITIAL_STORAGE_STATE=200]="INITIAL_STORAGE_STATE",e[e.UPDATE_STORAGE=201]="UPDATE_STORAGE",e[e.REJECT_STORAGE_OP=299]="REJECT_STORAGE_OP",e[e.UPDATE_YDOC=300]="UPDATE_YDOC",e[e.THREAD_CREATED=400]="THREAD_CREATED",e[e.THREAD_DELETED=407]="THREAD_DELETED",e[e.THREAD_METADATA_UPDATED=401]="THREAD_METADATA_UPDATED",e[e.THREAD_UPDATED=408]="THREAD_UPDATED",e[e.COMMENT_CREATED=402]="COMMENT_CREATED",e[e.COMMENT_EDITED=403]="COMMENT_EDITED",e[e.COMMENT_DELETED=404]="COMMENT_DELETED",e[e.COMMENT_REACTION_ADDED=405]="COMMENT_REACTION_ADDED",e[e.COMMENT_REACTION_REMOVED=406]="COMMENT_REACTION_REMOVED",e))(Zt||{});function tl(e){return e===4999||e>=4e3&&e<4100}function dC(e){return e>=4100&&e<4200}function nl(e){return e===1013||e>=4200&&e<4300}function hC(e){return e==="initial"||e==="disconnected"}function ch(e){const t=e.currentState;switch(t){case"@ok.connected":case"@ok.awaiting-pong":return"connected";case"@idle.initial":return"initial";case"@auth.busy":case"@auth.backoff":case"@connecting.busy":case"@connecting.backoff":case"@idle.zombie":return e.context.successCount>0?"reconnecting":"connecting";case"@idle.failed":return"disconnected";default:return lt(t,"Unknown state")}}var lh=[250,500,1e3,2e3,4e3,8e3,1e4],Uo=lh[0]-1,pC=[2e3,3e4,6e4,3e5],mC=3e4,vC=2e3,gC=1e4,CC=1e4,Ln=class extends Error{constructor(e){super(e)}};function fh(e,t){return t.find(n=>n>e)??t[t.length-1]}function rr(e){e.patch({backoffDelay:fh(e.backoffDelay,lh)})}function rl(e){e.patch({backoffDelay:fh(e.backoffDelay,pC)})}function ol(e){e.patch({successCount:0})}function cr(e,t){const n=e===2?wo:e===1?ft:()=>{};return()=>{n(t)}}function sl(e){const t="Connection to Liveblocks websocket server";return n=>{e instanceof Error?ft(`${t} could not be established. ${String(e)}`):ft(dh(e)?`${t} closed prematurely (code: ${e.code}). Retrying in ${n.backoffDelay}ms.`:`${t} could not be established.`)}}function _a(e){const t=[`code: ${e.code}`];return e.reason&&t.push(`reason: ${e.reason}`),n=>{ft(`Connection to Liveblocks websocket server closed (${t.join(", ")}). Retrying in ${n.backoffDelay}ms.`)}}var bC=cr(1,"Connection to WebSocket closed permanently. Won't retry.");function dh(e){return!(e instanceof Error)&&e.type==="close"}function yC(e){const t=new Date().getTime();function n(...o){ft(`${((new Date().getTime()-t)/1e3).toFixed(2)} [FSM #${e.id}]`,...o)}const r=[e.events.didReceiveEvent.subscribe(o=>n(`Event ${o.type}`)),e.events.willTransition.subscribe(({from:o,to:s})=>n("Transitioning",o,"→",s)),e.events.didIgnoreEvent.subscribe(o=>n("Ignored event",o.type,o,"(current state won't handle it)"))];return()=>{for(const o of r)o()}}function EC(e){const t=Ie(),n=Ie(),r=Ie();let o=null;const s=e.events.didEnterState.subscribe(()=>{const a=ch(e);a!==o&&t.notify(a),o==="connected"&&a!=="connected"?r.notify():o!=="connected"&&a==="connected"&&n.notify(),o=a});return{statusDidChange:t.observable,didConnect:n.observable,didDisconnect:r.observable,unsubscribe:s}}var Ho=e=>t=>t.patch(e);function DC(e,t){const n=K0();n.pause();const r=Ie();function o(y,w){return()=>{r.notify({message:y,code:w})}}const s={successCount:0,authValue:null,socket:null,backoffDelay:Uo},a=new uh(s).addState("@idle.initial").addState("@idle.failed").addState("@idle.zombie").addState("@auth.busy").addState("@auth.backoff").addState("@connecting.busy").addState("@connecting.backoff").addState("@ok.connected").addState("@ok.awaiting-pong");a.addTransitions("*",{RECONNECT:{target:"@auth.backoff",effect:[rr,ol]},DISCONNECT:"@idle.initial"}),a.onEnter("@idle.*",ol).addTransitions("@idle.*",{CONNECT:(y,w)=>w.authValue!==null?"@connecting.busy":"@auth.busy"}),a.addTransitions("@auth.backoff",{NAVIGATOR_ONLINE:{target:"@auth.busy",effect:Ho({backoffDelay:Uo})}}).addTimedTransition("@auth.backoff",y=>y.backoffDelay,"@auth.busy").onEnterAsync("@auth.busy",()=>Gc(e.authenticate(),gC,"Timed out during auth"),y=>({target:"@connecting.busy",effect:Ho({authValue:y.data})}),y=>y.reason instanceof Ln?{target:"@idle.failed",effect:[cr(2,y.reason.message),o(y.reason.message,-1)]}:{target:"@auth.backoff",effect:[rr,cr(2,`Authentication failed: ${y.reason instanceof Error?y.reason.message:String(y.reason)}`)]});const i=y=>a.send({type:"EXPLICIT_SOCKET_ERROR",event:y}),u=y=>a.send({type:"EXPLICIT_SOCKET_CLOSE",event:y}),c=y=>y.data==="pong"?a.send({type:"PONG"}):n.notify(y);function l(y){y&&(y.removeEventListener("error",i),y.removeEventListener("close",u),y.removeEventListener("message",c),y.close())}a.addTransitions("@connecting.backoff",{NAVIGATOR_ONLINE:{target:"@connecting.busy",effect:Ho({backoffDelay:Uo})}}).addTimedTransition("@connecting.backoff",y=>y.backoffDelay,"@connecting.busy").onEnterAsync("@connecting.busy",async(y,w)=>{let D=null,x=null;const I=new Promise((S,k)=>{if(y.authValue===null)throw new Error("No auth authValue");const W=e.createSocket(y.authValue);x=W;function P(j){D=j,W.removeEventListener("message",c),k(j)}const[M,F]=th();t.waitForActorId||F();function B(j){$s(j.data)?.type===104&&F()}W.addEventListener("message",c),t.waitForActorId&&W.addEventListener("message",B),W.addEventListener("error",P),W.addEventListener("close",P),W.addEventListener("open",()=>{W.addEventListener("error",i),W.addEventListener("close",u);const j=()=>{W.removeEventListener("error",P),W.removeEventListener("close",P),W.removeEventListener("message",B)};M.then(()=>{S([W,j])})})});return Gc(I,CC,"Timed out during websocket connection").then(([S,k])=>{if(k(),w.aborted)throw new Error("Aborted");if(D)throw D;return S}).catch(S=>{throw l(x),S})},y=>({target:"@ok.connected",effect:Ho({socket:y.data,backoffDelay:Uo})}),y=>{const w=y.reason;if(w instanceof Ln)return{target:"@idle.failed",effect:[cr(2,w.message),o(w.message,-1)]};if(dh(w)){if(w.code===4109)return"@auth.busy";if(nl(w.code))return{target:"@connecting.backoff",effect:[rl,sl(w)]};if(tl(w.code))return{target:"@idle.failed",effect:[cr(2,w.reason),o(w.reason,w.code)]}}return{target:"@auth.backoff",effect:[rr,sl(w)]}});const d={target:"@ok.awaiting-pong",effect:y=>{y.socket?.send("ping")}},m=()=>(typeof document<"u"?document:void 0)?.visibilityState==="hidden"&&e.canZombie()?"@idle.zombie":d;if(a.addTimedTransition("@ok.connected",mC,m).addTransitions("@ok.connected",{NAVIGATOR_OFFLINE:m,WINDOW_GOT_FOCUS:d}),a.addTransitions("@idle.zombie",{WINDOW_GOT_FOCUS:"@connecting.backoff"}),a.onEnter("@ok.*",y=>{y.patch({successCount:y.successCount+1});const w=setTimeout(n.unpause,0);return D=>{l(D.socket),D.patch({socket:null}),clearTimeout(w),n.pause()}}).addTransitions("@ok.awaiting-pong",{PONG:"@ok.connected"}).addTimedTransition("@ok.awaiting-pong",vC,{target:"@connecting.busy",effect:cr(1,"Received no pong from server, assume implicit connection loss.")}).addTransitions("@ok.*",{EXPLICIT_SOCKET_ERROR:(y,w)=>w.socket?.readyState===1?null:{target:"@connecting.backoff",effect:rr},EXPLICIT_SOCKET_CLOSE:y=>tl(y.event.code)?{target:"@idle.failed",effect:[bC,o(y.event.reason,y.event.code)]}:dC(y.event.code)?y.event.code===4109?"@auth.busy":{target:"@auth.backoff",effect:[rr,_a(y.event)]}:nl(y.event.code)?{target:"@connecting.backoff",effect:[rl,_a(y.event)]}:{target:"@connecting.backoff",effect:[rr,_a(y.event)]}}),typeof document<"u"){const y=typeof document<"u"?document:void 0,w=typeof window<"u"?window:void 0,D=w??y;a.onEnter("*",x=>{function I(){a.send({type:"NAVIGATOR_OFFLINE"})}function S(){a.send({type:"NAVIGATOR_ONLINE"})}function k(){y?.visibilityState==="visible"&&a.send({type:"WINDOW_GOT_FOCUS"})}return w?.addEventListener("online",S),w?.addEventListener("offline",I),D?.addEventListener("visibilitychange",k),()=>{D?.removeEventListener("visibilitychange",k),w?.removeEventListener("online",S),w?.removeEventListener("offline",I),l(x.socket)}})}const g=[],{statusDidChange:C,didConnect:v,didDisconnect:h,unsubscribe:E}=EC(a);return g.push(E),t.enableDebugLogging&&g.push(yC(a)),a.start(),{machine:a,cleanups:g,events:{statusDidChange:C,didConnect:v,didDisconnect:h,onMessage:n.observable,onConnectionError:r.observable}}}var wC=class{#e;#t;events;constructor(e,t=!1,n=!0){const{machine:r,events:o,cleanups:s}=DC(e,{waitForActorId:n,enableDebugLogging:t});this.#e=r,this.events=o,this.#t=s}getStatus(){try{return ch(this.#e)}catch{return"initial"}}get authValue(){return this.#e.context.authValue}connect(){this.#e.send({type:"CONNECT"})}reconnect(){this.#e.send({type:"RECONNECT"})}disconnect(){this.#e.send({type:"DISCONNECT"})}destroy(){this.#e.stop();let e;for(;e=this.#t.pop();)e()}send(e){const t=this.#e.context?.socket;t===null?ft("Cannot send: not connected yet",e):t.readyState!==1?ft("Cannot send: WebSocket no longer open",e):t.send(e)}_privateSendMachineEvent(e){this.#e.send(e)}},Oi=(e=>(e.Read="room:read",e.Write="room:write",e.PresenceWrite="room:presence:write",e.CommentsWrite="comments:write",e.CommentsRead="comments:read",e))(Oi||{});function Si(e){return e.includes("room:write")}function hh(e){return e.includes("comments:write")||e.includes("room:write")}function AC(e){return nn(e)&&(e.k==="acc"||e.k==="id"||e.k==="sec-legacy")}function al(e){const t=e.split(".");if(t.length!==3)throw new Error("Authentication error: invalid JWT token");const n=$s(W0(t[1]));if(!(n&&AC(n)))throw new Error("Authentication error: expected a valid token but did not get one. Hint: if you are using a callback, ensure the room is passed when creating the token. For more information: https://liveblocks.io/docs/api-reference/liveblocks-client#createClientCallback");return{raw:e,parsed:n}}function xC(e,t){const n=OC(e),r=new Set,o=[],s=[],a=new Map;function i(){r.clear(),o.length=0,s.length=0,a.clear()}function u(m,g){return m==="comments:read"?g.includes("comments:read")||g.includes("comments:write")||g.includes("room:read")||g.includes("room:write"):m==="room:read"?g.includes("room:read")||g.includes("room:write"):!1}function c(m){const g=Math.ceil(Date.now()/1e3);for(let C=o.length-1;C>=0;C--){const v=o[C];if(s[C]<=g){o.splice(C,1),s.splice(C,1);continue}if(v.parsed.k==="id")return v;if(v.parsed.k==="acc"){if(!m.roomId&&Object.entries(v.parsed.perms).length===0)return v;for(const[E,y]of Object.entries(v.parsed.perms))if(m.roomId){if(E.includes("*")&&m.roomId.startsWith(E.replace("*",""))||m.roomId===E&&u(m.requestedScope,y))return v}else if(E.includes("*")&&u(m.requestedScope,y))return v}}}async function l(m){const g=e.polyfills?.fetch??(typeof window>"u"?void 0:window.fetch);if(n.type==="private"){if(g===void 0)throw new Ln("To use Liveblocks client in a non-DOM environment with a url as auth endpoint, you need to provide a fetch polyfill.");const C=await SC(g,n.url,{room:m.roomId}),v=al(C.token);if(r.has(v.raw))throw new Ln("The same Liveblocks auth token was issued from the backend before. Caching Liveblocks tokens is not supported.");return t?.(v.parsed),v}if(n.type==="custom"){const C=await n.callback(m.roomId);if(C&&typeof C=="object"){if(typeof C.token=="string"){const v=al(C.token);return t?.(v.parsed),v}else if(typeof C.error=="string"){const v=`Authentication failed: ${"reason"in C&&typeof C.reason=="string"?C.reason:"Forbidden"}`;throw C.error==="forbidden"?new Ln(v):new Error(v)}}throw new Error('Your authentication callback function should return a token, but it did not. Hint: the return value should look like: { token: "..." }')}throw new Error("Unexpected authentication type. Must be private or custom.")}async function d(m){if(n.type==="public")return{type:"public",publicApiKey:n.publicApiKey};const g=c(m);if(g!==void 0)return{type:"secret",token:g};let C;m.roomId?(C=a.get(m.roomId),C===void 0&&(C=l(m),a.set(m.roomId,C))):(C=a.get("liveblocks-user-token"),C===void 0&&(C=l(m),a.set("liveblocks-user-token",C)));try{const v=await C,E=Math.floor(Date.now()/1e3)+(v.parsed.exp-v.parsed.iat)-30;return r.add(v.raw),v.parsed.k!=="sec-legacy"&&(o.push(v),s.push(E)),{type:"secret",token:v}}finally{m.roomId?a.delete(m.roomId):a.delete("liveblocks-user-token")}}return{reset:i,getAuthValue:d}}function OC(e){const{publicApiKey:t,authEndpoint:n}=e;if(n!==void 0&&t!==void 0)throw new Error("You cannot simultaneously use `publicApiKey` and `authEndpoint` options. Please pick one and leave the other option unspecified. For more information: https://liveblocks.io/docs/api-reference/liveblocks-client#createClient");if(typeof t=="string"){if(t.startsWith("sk_"))throw new Error("Invalid `publicApiKey` option. The value you passed is a secret key, which should not be used from the client. Please only ever pass a public key here. For more information: https://liveblocks.io/docs/api-reference/liveblocks-client#createClientPublicKey");if(!t.startsWith("pk_"))throw new Error("Invalid key. Please use the public key format: pk_<public key>. For more information: https://liveblocks.io/docs/api-reference/liveblocks-client#createClientPublicKey");return{type:"public",publicApiKey:t}}if(typeof n=="string")return{type:"private",url:n};if(typeof n=="function")return{type:"custom",callback:n};throw n!==void 0?new Error("The `authEndpoint` option must be a string or a function. For more information: https://liveblocks.io/docs/api-reference/liveblocks-client#createClientAuthEndpoint"):new Error("Invalid Liveblocks client options. Please provide either a `publicApiKey` or `authEndpoint` option. They cannot both be empty. For more information: https://liveblocks.io/docs/api-reference/liveblocks-client#createClient")}async function SC(e,t,n){const r=await e(t,{method:"POST",headers:{"Content-Type":"application/json"},body:tn(n)});if(!r.ok){const a=`${(await r.text()).trim()||"reason not provided in auth response"} (${r.status} returned by POST ${t})`;throw r.status===401||r.status===403?new Ln(`Unauthorized: ${a}`):new Error(`Failed to authenticate: ${a}`)}let o;try{o=await r.json()}catch(a){throw new Error(`Expected a JSON response when doing a POST request on "${t}". ${String(a)}`)}if(!nn(o)||typeof o.token!="string")throw new Error(`Expected a JSON response of the form \`{ token: "..." }\` when doing a POST request on "${t}", but got ${tn(o)}`);const{token:s}=o;return{token:s}}var TC="https://api.liveblocks.io",Oe=Symbol(),RC=Ie();RC.observable;var Zr=Symbol("user-notification-settings-plain");function bs(e){const t=["email","slack","teams","webPush"],n={[Zr]:{value:e,enumerable:!1}};for(const r of t)n[r]={enumerable:!0,get(){const o=this[Zr][r];return typeof o>"u"?(wo(`In order to use the '${r}' channel, please set up your project first. For more information: https://liveblocks.io/docs/errors/enable-a-notification-channel`),null):o}};return H0(null,n)}function IC(e,t){const n=bs({...e[Zr]});for(const r of U0(t)){const o=t[r];if(o!==void 0){const s=Object.fromEntries(hu(o).filter(([,a])=>a!==void 0));n[Zr][r]={...n[Zr][r],...s}}}return n}var Pt=32,Dn=126,BC=Dn-Pt+1,gu=Cu(0),Us=Cu(1),FC=gu+Cu(-1);function Cu(e){const t=Pt+(e<0?BC+e:e);if(t<Pt||t>Dn)throw new Error(`Invalid n value: ${e}`);return String.fromCharCode(t)}function Yt(e,t){return e!==void 0&&t!==void 0?kC(e,t):e!==void 0?NC(e):t!==void 0?PC(t):Us}function PC(e){const t=e.length-1;for(let n=0;n<=t;n++){const r=e.charCodeAt(n);if(!(r<=Pt))return n===t?r===Pt+1?e.substring(0,n)+FC:e.substring(0,n)+String.fromCharCode(r-1):e.substring(0,n+1)}return Us}function NC(e){for(let t=0;t<=e.length-1;t++){const n=e.charCodeAt(t);if(!(n>=Dn))return e.substring(0,t)+String.fromCharCode(n+1)}return e+Us}function kC(e,t){if(e<t)return Ti(e,t);if(e>t)return Ti(t,e);throw new Error("Cannot compute value between two equal positions")}function Ti(e,t){let n=0;const r=e.length,o=t.length;for(;;){const s=n<r?e.charCodeAt(n):Pt,a=n<o?t.charCodeAt(n):Dn;if(s===a){n++;continue}if(a-s===1){const i=n+1;let u=e.substring(0,i);u.length<i&&(u+=gu.repeat(i-u.length));const c=e.substring(i);return u+Ti(c,"")}else return jC(e,n)+String.fromCharCode(a+s>>1)}}function jC(e,t){return t<e.length?e.substring(0,t):e+gu.repeat(t-e.length)}var MC=Pt+1;function _C(e){if(e==="")return!1;const t=e.length-1,n=e.charCodeAt(t);if(n<MC||n>Dn)return!1;for(let r=0;r<t;r++){const o=e.charCodeAt(r);if(o<Pt||o>Dn)return!1}return!0}function LC(e){const t=[];for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t.push(r<Pt?Pt:r>Dn?Dn:r)}for(;t.length>0&&t[t.length-1]===Pt;)t.length--;return t.length>0?String.fromCharCode(...t):Us}function oo(e){return _C(e)?e:LC(e)}function $C(e){return e.type===5&&e.id==="ACK"}function UC(e,t){const{getCurrentConnectionId:n,onDispatch:r,isStorageWritable:o=()=>!0}=t;let s=0,a=0;const i=new Map;return{roomId:e,nodes:i,getNode:u=>i.get(u),addNode:(u,c)=>void i.set(u,c),deleteNode:u=>void i.delete(u),generateId:()=>`${n()}:${s++}`,generateOpId:()=>`${n()}:${a++}`,dispatch(u,c,l){r?.(u,c,l)},assertStorageIsWritable:()=>{if(!o())throw new Error("Cannot write to storage with a read only user, please ensure the user has write permissions")}}}function il(e,t,n=oo(t)){return Object.freeze({type:"HasParent",node:e,key:t,pos:n})}var ul=Object.freeze({type:"NoParent"});function HC(e,t=oo(e)){return Object.freeze({type:"Orphaned",oldKey:e,oldPos:t})}var Hs=class{#e;#t;#n=ul;_getParentKeyOrThrow(){switch(this.parent.type){case"HasParent":return this.parent.key;case"NoParent":throw new Error("Parent key is missing");case"Orphaned":return this.parent.oldKey;default:return lt(this.parent,"Unknown state")}}get _parentPos(){switch(this.parent.type){case"HasParent":return this.parent.pos;case"NoParent":throw new Error("Parent key is missing");case"Orphaned":return this.parent.oldPos;default:return lt(this.parent,"Unknown state")}}get _pool(){return this.#e}get roomId(){return this.#e?this.#e.roomId:null}get _id(){return this.#t}get parent(){return this.#n}get _parentKey(){switch(this.parent.type){case"HasParent":return this.parent.key;case"NoParent":return null;case"Orphaned":return this.parent.oldKey;default:return lt(this.parent,"Unknown state")}}_apply(e,t){switch(e.type){case 5:return this.parent.type==="HasParent"?this.parent.node._detachChild(this):{modified:!1}}return{modified:!1}}_setParentLink(e,t){switch(this.parent.type){case"HasParent":if(this.parent.node!==e)throw new Error("Cannot set parent: node already has a parent");this.#n=il(e,t);return;case"Orphaned":case"NoParent":{this.#n=il(e,t);return}default:return lt(this.parent,"Unknown state")}}_attach(e,t){if(this.#t||this.#e)throw new Error("Cannot attach node: already attached");t.addNode(e,this),this.#t=e,this.#e=t}_detach(){switch(this.#e&&this.#t&&this.#e.deleteNode(this.#t),this.parent.type){case"HasParent":{this.#n=HC(this.parent.key,this.parent.pos);break}case"NoParent":{this.#n=ul;break}case"Orphaned":break;default:lt(this.parent,"Unknown state")}this.#e=void 0}#r;#s;#o;invalidate(){(this.#r!==void 0||this.#o!==void 0)&&(this.#r=void 0,this.#o=void 0,this.parent.type==="HasParent"&&this.parent.node.invalidate())}toTreeNode(e){return(this.#o===void 0||this.#s!==e)&&(this.#s=e,this.#o=this._toTreeNode(e)),this.#o}toImmutable(){return this.#r===void 0&&(this.#r=this._toImmutable()),this.#r}};function WC(e){return e.type===0&&!zC(e)}function zC(e){return e.parentId!==void 0&&e.parentKey!==void 0}var Sn=class ph extends Hs{#e;constructor(t){super(),this.#e=t}get data(){return this.#e}static _deserialize([t,n],r,o){const s=new ph(n.data);return s._attach(t,o),s}_toOps(t,n,r){if(this._id===void 0)throw new Error("Cannot serialize register if parentId or parentKey is undefined");return[{type:8,opId:r?.generateOpId(),id:this._id,parentId:t,parentKey:n,data:this.data}]}_serialize(){if(this.parent.type!=="HasParent")throw new Error("Cannot serialize LiveRegister if parent is missing");return{type:3,parentId:pe(this.parent.node._id,"Parent node expected to have ID"),parentKey:this.parent.key,data:this.data}}_attachChild(t){throw new Error("Method not implemented.")}_detachChild(t){throw new Error("Method not implemented.")}_apply(t,n){return super._apply(t,n)}_toTreeNode(t){return{type:"Json",id:this._id??Pr(),key:t,payload:this.#e}}_toImmutable(){return this.#e}clone(){return ro(this.data)}};function VC(e,t){const n=e._parentPos,r=t._parentPos;return n===r?0:n<r?-1:1}var Nr=class Ri extends Hs{#e;#t;#n;constructor(t){super(),this.#e=[],this.#t=new WeakSet,this.#n=new Map;let n;for(const r of t){const o=Yt(n),s=mr(r);s._setParentLink(this,o),this.#e.push(s),n=o}}static _deserialize([t],n,r){const o=new Ri([]);o._attach(t,r);const s=n.get(t);if(s===void 0)return o;for(const[a,i]of s){const u=gh([a,i],n,r);u._setParentLink(o,i.parentKey),o._insertAndSort(u)}return o}_toOps(t,n,r){if(this._id===void 0)throw new Error("Cannot serialize item is not attached");const o=[],s={id:this._id,opId:r?.generateOpId(),type:2,parentId:t,parentKey:n};o.push(s);for(const a of this.#e){const i=a._getParentKeyOrThrow(),u=zo(a._toOps(this._id,i,r),void 0),c=u[0].opId;c!==void 0&&this.#n.set(i,c),o.push(...u)}return o}_insertAndSort(t){this.#e.push(t),this._sortItems()}_sortItems(){this.#e.sort(VC),this.invalidate()}_indexOfPosition(t){return this.#e.findIndex(n=>n._getParentKeyOrThrow()===t)}_attach(t,n){super._attach(t,n);for(const r of this.#e)r._attach(n.generateId(),n)}_detach(){super._detach();for(const t of this.#e)t._detach()}#r(t){if(this._pool===void 0)throw new Error("Can't attach child if managed pool is not present");const{id:n,parentKey:r}=t,o=zr(t);o._attach(n,this._pool),o._setParentLink(this,r);const s=t.deletedId,a=this._indexOfPosition(r);if(a!==-1){const i=this.#e[a];if(i._id===s)return i._detach(),this.#e[a]=o,{modified:Fe(this,[or(a,o)]),reverse:[]};{this.#t.add(i),this.#e[a]=o;const u=[or(a,o)],c=this.#o(t.deletedId);return c&&u.push(c),{modified:Fe(this,u),reverse:[]}}}else{const i=[],u=this.#o(t.deletedId);return u&&i.push(u),this._insertAndSort(o),i.push(Mt(this._indexOfPosition(r),o)),{reverse:[],modified:Fe(this,i)}}}#s(t){if(this._pool===void 0)throw new Error("Can't attach child if managed pool is not present");const n=[],r=this.#o(t.deletedId);r&&n.push(r);const o=this.#n.get(t.parentKey);if(o!==void 0){if(o!==t.opId)return n.length===0?{modified:!1}:{modified:Fe(this,n),reverse:[]};this.#n.delete(t.parentKey)}const s=this._indexOfPosition(t.parentKey),a=this.#e.find(i=>i._id===t.id);if(a!==void 0){if(a._parentKey===t.parentKey)return{modified:n.length>0?Fe(this,n):!1,reverse:[]};if(s!==-1){this.#t.add(this.#e[s]);const[c]=this.#e.splice(s,1);n.push(Wo(s,c))}const i=this.#e.indexOf(a);a._setParentLink(this,t.parentKey),this._sortItems();const u=this.#e.indexOf(a);return u!==i&&n.push(Fn(i,u,a)),{modified:n.length>0?Fe(this,n):!1,reverse:[]}}else{const i=this._pool.getNode(t.id);if(i&&this.#t.has(i)){i._setParentLink(this,t.parentKey),this.#t.delete(i),this._insertAndSort(i);const u=this.#e.indexOf(i);return{modified:Fe(this,[s===-1?Mt(u,i):or(u,i),...n]),reverse:[]}}else{s!==-1&&this.#e.splice(s,1);const{newItem:u,newIndex:c}=this.#c(t,t.parentKey);return{modified:Fe(this,[s===-1?Mt(c,u):or(c,u),...n]),reverse:[]}}}}#o(t){if(t===void 0||this._pool===void 0)return null;const n=this._pool.getNode(t);if(n===void 0)return null;const r=this._detachChild(n);return r.modified===!1?null:r.modified.updates[0]}#i(t){if(this._pool===void 0)throw new Error("Can't attach child if managed pool is not present");const n=oo(t.parentKey),r=this._indexOfPosition(n);r!==-1&&this.#u(r,n);const{newItem:o,newIndex:s}=this.#c(t,n);return{modified:Fe(this,[Mt(s,o)]),reverse:[]}}#a(t){const n=this.#e.find(s=>s._id===t.id),r=oo(t.parentKey),o=this._indexOfPosition(r);if(n){if(n._parentKey===r)return{modified:!1};{const s=this.#e.indexOf(n);o!==-1&&this.#u(o,r),n._setParentLink(this,r),this._sortItems();const a=this._indexOfPosition(r);return a===s?{modified:!1}:{modified:Fe(this,[Fn(s,a,n)]),reverse:[]}}}else{const s=pe(this._pool).getNode(t.id);if(s&&this.#t.has(s)){s._setParentLink(this,r),this.#t.delete(s),this._insertAndSort(s);const a=this._indexOfPosition(r);return{modified:Fe(this,[Mt(a,s)]),reverse:[]}}else{o!==-1&&this.#u(o,r);const{newItem:a,newIndex:i}=this.#c(t,r);return{modified:Fe(this,[Mt(i,a)]),reverse:[]}}}}#l(t){const{id:n,parentKey:r}=t,o=zr(t);if(this._pool?.getNode(n)!==void 0)return{modified:!1};o._attach(n,pe(this._pool)),o._setParentLink(this,r);const s=this._indexOfPosition(r);let a=r;if(s!==-1){const u=this.#e[s]?._parentPos,c=this.#e[s+1]?._parentPos;a=Yt(u,c),o._setParentLink(this,a)}this._insertAndSort(o);const i=this._indexOfPosition(a);return{modified:Fe(this,[Mt(i,o)]),reverse:[{type:5,id:n}]}}#d(t){const{id:n,parentKey:r}=t,o=zr(t);if(this._pool?.getNode(n)!==void 0)return{modified:!1};this.#n.set(r,pe(t.opId));const s=this._indexOfPosition(r);o._attach(n,pe(this._pool)),o._setParentLink(this,r);const a=r;if(s!==-1){const i=this.#e[s];i._detach(),this.#e[s]=o;const u=zo(i._toOps(pe(this._id),r,this._pool),t.id),c=[or(s,o)],l=this.#o(t.deletedId);return l&&c.push(l),{modified:Fe(this,c),reverse:u}}else{this._insertAndSort(o),this.#o(t.deletedId);const i=this._indexOfPosition(a);return{reverse:[{type:5,id:n}],modified:Fe(this,[Mt(i,o)])}}}_attachChild(t,n){if(this._pool===void 0)throw new Error("Can't attach child if managed pool is not present");let r;return t.intent==="set"?n===1?r=this.#r(t):n===2?r=this.#s(t):r=this.#d(t):n===1?r=this.#i(t):n===2?r=this.#a(t):r=this.#l(t),r.modified!==!1&&this.invalidate(),r}_detachChild(t){if(t){const n=pe(t._parentKey),r=t._toOps(pe(this._id),n,this._pool),o=this.#e.indexOf(t);if(o===-1)return{modified:!1};const[s]=this.#e.splice(o,1);return this.invalidate(),t._detach(),{modified:Fe(this,[Wo(o,s)]),reverse:r}}return{modified:!1}}#h(t,n){if(this.#t.has(n)){this.#t.delete(n),n._setParentLink(this,t),this._insertAndSort(n);const s=this.#e.indexOf(n);return{modified:Fe(this,[Mt(s,n)]),reverse:[]}}const r=n._parentKey;if(t===r)return{modified:!1};const o=this._indexOfPosition(t);if(o===-1){const s=this.#e.indexOf(n);n._setParentLink(this,t),this._sortItems();const a=this.#e.indexOf(n);return a===s?{modified:!1}:{modified:Fe(this,[Fn(s,a,n)]),reverse:[]}}else{this.#e[o]._setParentLink(this,Yt(t,this.#e[o+1]?._parentPos));const s=this.#e.indexOf(n);n._setParentLink(this,t),this._sortItems();const a=this.#e.indexOf(n);return a===s?{modified:!1}:{modified:Fe(this,[Fn(s,a,n)]),reverse:[]}}}#p(t,n){const r=pe(n._parentKey);if(this.#t.has(n)){const o=this._indexOfPosition(t);return this.#t.delete(n),o!==-1&&this.#e[o]._setParentLink(this,Yt(t,this.#e[o+1]?._parentPos)),n._setParentLink(this,t),this._insertAndSort(n),{modified:!1}}else{if(t===r)return{modified:!1};const o=this.#e.indexOf(n),s=this._indexOfPosition(t);s!==-1&&this.#e[s]._setParentLink(this,Yt(t,this.#e[s+1]?._parentPos)),n._setParentLink(this,t),this._sortItems();const a=this.#e.indexOf(n);return o===a?{modified:!1}:{modified:Fe(this,[Fn(o,a,n)]),reverse:[]}}}#f(t,n){const r=pe(n._parentKey),o=this.#e.indexOf(n),s=this._indexOfPosition(t);s!==-1&&this.#e[s]._setParentLink(this,Yt(t,this.#e[s+1]?._parentPos)),n._setParentLink(this,t),this._sortItems();const a=this.#e.indexOf(n);return o===a?{modified:!1}:{modified:Fe(this,[Fn(o,a,n)]),reverse:[{type:1,id:pe(n._id),parentKey:r}]}}_setChildKey(t,n,r){return r===1?this.#h(t,n):r===2?this.#p(t,n):this.#f(t,n)}_apply(t,n){return super._apply(t,n)}_serialize(){if(this.parent.type!=="HasParent")throw new Error("Cannot serialize LiveList if parent is missing");return{type:1,parentId:pe(this.parent.node._id,"Parent node expected to have ID"),parentKey:this.parent.key}}get length(){return this.#e.length}push(t){return this._pool?.assertStorageIsWritable(),this.insert(t,this.length)}insert(t,n){if(this._pool?.assertStorageIsWritable(),n<0||n>this.#e.length)throw new Error(`Cannot insert list item at index "${n}". index should be between 0 and ${this.#e.length}`);const r=this.#e[n-1]?this.#e[n-1]._parentPos:void 0,o=this.#e[n]?this.#e[n]._parentPos:void 0,s=Yt(r,o),a=mr(t);if(a._setParentLink(this,s),this._insertAndSort(a),this._pool&&this._id){const i=this._pool.generateId();a._attach(i,this._pool),this._pool.dispatch(a._toOps(this._id,s,this._pool),[{type:5,id:i}],new Map([[this._id,Fe(this,[Mt(n,a)])]]))}}move(t,n){if(this._pool?.assertStorageIsWritable(),n<0)throw new Error("targetIndex cannot be less than 0");if(n>=this.#e.length)throw new Error("targetIndex cannot be greater or equal than the list length");if(t<0)throw new Error("index cannot be less than 0");if(t>=this.#e.length)throw new Error("index cannot be greater or equal than the list length");let r=null,o=null;t<n?(o=n===this.#e.length-1?void 0:this.#e[n+1]._parentPos,r=this.#e[n]._parentPos):(o=this.#e[n]._parentPos,r=n===0?void 0:this.#e[n-1]._parentPos);const s=Yt(r,o),a=this.#e[t],i=a._getParentKeyOrThrow();if(a._setParentLink(this,s),this._sortItems(),this._pool&&this._id){const u=new Map([[this._id,Fe(this,[Fn(t,n,a)])]]);this._pool.dispatch([{type:1,id:pe(a._id),opId:this._pool.generateOpId(),parentKey:s}],[{type:1,id:pe(a._id),parentKey:i}],u)}}delete(t){if(this._pool?.assertStorageIsWritable(),t<0||t>=this.#e.length)throw new Error(`Cannot delete list item at index "${t}". index should be between 0 and ${this.#e.length-1}`);const n=this.#e[t];n._detach();const[r]=this.#e.splice(t,1);if(this.invalidate(),this._pool){const o=n._id;if(o){const s=new Map;s.set(pe(this._id),Fe(this,[Wo(t,r)])),this._pool.dispatch([{id:o,opId:this._pool.generateOpId(),type:5}],n._toOps(pe(this._id),n._getParentKeyOrThrow()),s)}}}clear(){if(this._pool?.assertStorageIsWritable(),this._pool){const t=[],n=[],r=[];for(const s of this.#e){s._detach();const a=s._id;a&&(t.push({type:5,id:a,opId:this._pool.generateOpId()}),n.push(...s._toOps(pe(this._id),s._getParentKeyOrThrow())),r.push(Wo(0,s)))}this.#e=[],this.invalidate();const o=new Map;o.set(pe(this._id),Fe(this,r)),this._pool.dispatch(t,n,o)}else{for(const t of this.#e)t._detach();this.#e=[],this.invalidate()}}set(t,n){if(this._pool?.assertStorageIsWritable(),t<0||t>=this.#e.length)throw new Error(`Cannot set list item at index "${t}". index should be between 0 and ${this.#e.length-1}`);const r=this.#e[t],o=r._getParentKeyOrThrow(),s=r._id;r._detach();const a=mr(n);if(a._setParentLink(this,o),this.#e[t]=a,this.invalidate(),this._pool&&this._id){const i=this._pool.generateId();a._attach(i,this._pool);const u=new Map;u.set(this._id,Fe(this,[or(t,a)]));const c=zo(a._toOps(this._id,o,this._pool),s);this.#n.set(o,pe(c[0].opId));const l=zo(r._toOps(this._id,o,void 0),i);this._pool.dispatch(c,l,u)}}toArray(){return this.#e.map(t=>$n(t))}every(t){return this.toArray().every(t)}filter(t){return this.toArray().filter(t)}find(t){return this.toArray().find(t)}findIndex(t){return this.toArray().findIndex(t)}forEach(t){return this.toArray().forEach(t)}get(t){if(!(t<0||t>=this.#e.length))return $n(this.#e[t])}indexOf(t,n){return this.toArray().indexOf(t,n)}lastIndexOf(t,n){return this.toArray().lastIndexOf(t,n)}map(t){return this.#e.map((n,r)=>t($n(n),r))}some(t){return this.toArray().some(t)}[Symbol.iterator](){return new KC(this.#e)}#c(t,n){const r=zr(t);r._attach(t.id,pe(this._pool)),r._setParentLink(this,n),this._insertAndSort(r);const o=this._indexOfPosition(n);return{newItem:r,newIndex:o}}#u(t,n){const r=Yt(n,this.#e.length>t+1?this.#e[t+1]?._parentPos:void 0);this.#e[t]._setParentLink(this,r)}_toTreeNode(t){return{type:"LiveList",id:this._id??Pr(),key:t,payload:this.#e.map((n,r)=>n.toTreeNode(r.toString()))}}toImmutable(){return super.toImmutable()}_toImmutable(){return this.#e.map(n=>n.toImmutable())}clone(){return new Ri(this.#e.map(t=>t.clone()))}},KC=class{#e;constructor(e){this.#e=e[Symbol.iterator]()}[Symbol.iterator](){return this}next(){const e=this.#e.next();return e.done?{done:!0,value:void 0}:{value:$n(e.value)}}};function Fe(e,t){return{node:e,type:"LiveList",updates:t}}function or(e,t){return{index:e,type:"set",item:t instanceof Sn?t.data:t}}function Wo(e,t){return{type:"delete",index:e,deletedItem:t instanceof Sn?t.data:t}}function Mt(e,t){return{index:e,type:"insert",item:t instanceof Sn?t.data:t}}function Fn(e,t,n){return{type:"move",index:t,item:n instanceof Sn?n.data:n,previousIndex:e}}function zo(e,t){return e.map((n,r)=>r===0?{...n,intent:"set",deletedId:t}:n)}var kr=class Ii extends Hs{#e;#t;constructor(t){if(super(),this.#t=new Map,t){const n=[];for(const[r,o]of t){const s=mr(o);s._setParentLink(this,r),n.push([r,s])}this.#e=new Map(n)}else this.#e=new Map}_toOps(t,n,r){if(this._id===void 0)throw new Error("Cannot serialize item is not attached");const o=[],s={id:this._id,opId:r?.generateOpId(),type:7,parentId:t,parentKey:n};o.push(s);for(const[a,i]of this.#e)o.push(...i._toOps(this._id,a,r));return o}static _deserialize([t,n],r,o){const s=new Ii;s._attach(t,o);const a=r.get(t);if(a===void 0)return s;for(const[i,u]of a){const c=gh([i,u],r,o);c._setParentLink(s,u.parentKey),s.#e.set(u.parentKey,c),s.invalidate()}return s}_attach(t,n){super._attach(t,n);for(const[r,o]of this.#e)We(o)&&o._attach(n.generateId(),n)}_attachChild(t,n){if(this._pool===void 0)throw new Error("Can't attach child if managed pool is not present");const{id:r,parentKey:o,opId:s}=t,a=o,i=zr(t);if(this._pool.getNode(r)!==void 0)return{modified:!1};if(n===2){const l=this.#t.get(a);if(l===s)return this.#t.delete(a),{modified:!1};if(l!==void 0)return{modified:!1}}else n===1&&this.#t.delete(a);const u=this.#e.get(a);let c;if(u){const l=pe(this._id);c=u._toOps(l,a),u._detach()}else c=[{type:5,id:r}];return i._setParentLink(this,a),i._attach(r,this._pool),this.#e.set(a,i),this.invalidate(),{modified:{node:this,type:"LiveMap",updates:{[a]:{type:"update"}}},reverse:c}}_detach(){super._detach();for(const t of this.#e.values())t._detach()}_detachChild(t){const n=pe(this._id),r=pe(t._parentKey),o=t._toOps(n,r,this._pool);for(const[a,i]of this.#e)i===t&&(this.#e.delete(a),this.invalidate());return t._detach(),{modified:{node:this,type:"LiveMap",updates:{[r]:{type:"delete"}}},reverse:o}}_serialize(){if(this.parent.type!=="HasParent")throw new Error("Cannot serialize LiveMap if parent is missing");return{type:2,parentId:pe(this.parent.node._id,"Parent node expected to have ID"),parentKey:this.parent.key}}get(t){const n=this.#e.get(t);if(n!==void 0)return $n(n)}set(t,n){this._pool?.assertStorageIsWritable();const r=this.#e.get(t);r&&r._detach();const o=mr(n);if(o._setParentLink(this,t),this.#e.set(t,o),this.invalidate(),this._pool&&this._id){const s=this._pool.generateId();o._attach(s,this._pool);const a=new Map;a.set(this._id,{node:this,type:"LiveMap",updates:{[t]:{type:"update"}}});const i=o._toOps(this._id,t,this._pool);this.#t.set(t,pe(i[0].opId)),this._pool.dispatch(o._toOps(this._id,t,this._pool),r?r._toOps(this._id,t):[{type:5,id:s}],a)}}get size(){return this.#e.size}has(t){return this.#e.has(t)}delete(t){this._pool?.assertStorageIsWritable();const n=this.#e.get(t);if(n===void 0)return!1;if(n._detach(),this.#e.delete(t),this.invalidate(),this._pool&&n._id){const r=pe(this._id),o=new Map;o.set(r,{node:this,type:"LiveMap",updates:{[t]:{type:"delete"}}}),this._pool.dispatch([{type:5,id:n._id,opId:this._pool.generateOpId()}],n._toOps(r,t),o)}return!0}entries(){const t=this.#e.entries();return{[Symbol.iterator](){return this},next(){const n=t.next();if(n.done)return{done:!0,value:void 0};const o=n.value[0],s=$n(n.value[1]);return{value:[o,s]}}}}[Symbol.iterator](){return this.entries()}keys(){return this.#e.keys()}values(){const t=this.#e.values();return{[Symbol.iterator](){return this},next(){const n=t.next();return n.done?{done:!0,value:void 0}:{value:$n(n.value)}}}}forEach(t){for(const n of this)t(n[1],n[0],this)}_toTreeNode(t){return{type:"LiveMap",id:this._id??Pr(),key:t,payload:Array.from(this.#e.entries()).map(([n,r])=>r.toTreeNode(n))}}toImmutable(){return super.toImmutable()}_toImmutable(){const t=new Map;for(const[n,r]of this.#e)t.set(n,r.toImmutable());return En(t)}clone(){return new Ii(Array.from(this.#e).map(([t,n])=>[t,n.clone()]))}},Zn=class Wr extends Hs{#e;#t;static#n(t){const n=new Map;let r=null;for(const[o,s]of t)if(WC(s))r=[o,s];else{const a=[o,s],i=n.get(s.parentId);i!==void 0?i.push(a):n.set(s.parentId,[a])}if(r===null)throw new Error("Root can't be null");return[r,n]}static _fromItems(t,n){const[r,o]=Wr.#n(t);return Wr._deserialize(r,o,n)}constructor(t={}){super(),this.#t=new Map;const n=Ao(t);for(const r of Object.keys(n)){const o=n[r];We(o)&&o._setParentLink(this,r)}this.#e=new Map(Object.entries(n))}_toOps(t,n,r){if(this._id===void 0)throw new Error("Cannot serialize item is not attached");const o=r?.generateOpId(),s=[],a={type:4,id:this._id,opId:o,parentId:t,parentKey:n,data:{}};s.push(a);for(const[i,u]of this.#e)We(u)?s.push(...u._toOps(this._id,i,r)):a.data[i]=u;return s}static _deserialize([t,n],r,o){const s=new Wr(n.data);return s._attach(t,o),this._deserializeChildren(s,r,o)}static _deserializeChildren(t,n,r){const o=n.get(pe(t._id));if(o===void 0)return t;for(const[s,a]of o){const i=qC([s,a],n,r);dr(i)&&i._setParentLink(t,a.parentKey),t.#e.set(a.parentKey,i),t.invalidate()}return t}_attach(t,n){super._attach(t,n);for(const[r,o]of this.#e)We(o)&&o._attach(n.generateId(),n)}_attachChild(t,n){if(this._pool===void 0)throw new Error("Can't attach child if managed pool is not present");const{id:r,opId:o,parentKey:s}=t,a=mh(t);if(this._pool.getNode(r)!==void 0)return this.#t.get(s)===o&&this.#t.delete(s),{modified:!1};if(n===0)this.#t.set(s,pe(o));else if(this.#t.get(s)!==void 0)return this.#t.get(s)===o?(this.#t.delete(s),{modified:!1}):{modified:!1};const i=pe(this._id),u=this.#e.get(s);let c;return We(u)?(c=u._toOps(i,s),u._detach()):u===void 0?c=[{type:6,id:i,key:s}]:c=[{type:3,id:i,data:{[s]:u}}],this.#e.set(s,a),this.invalidate(),dr(a)&&(a._setParentLink(this,s),a._attach(r,this._pool)),{reverse:c,modified:{node:this,type:"LiveObject",updates:{[s]:{type:"update"}}}}}_detachChild(t){if(t){const n=pe(this._id),r=pe(t._parentKey),o=t._toOps(n,r,this._pool);for(const[a,i]of this.#e)i===t&&(this.#e.delete(a),this.invalidate());return t._detach(),{modified:{node:this,type:"LiveObject",updates:{[r]:{type:"delete"}}},reverse:o}}return{modified:!1}}_detach(){super._detach();for(const t of this.#e.values())We(t)&&t._detach()}_apply(t,n){return t.type===3?this.#r(t,n):t.type===6?this.#s(t,n):super._apply(t,n)}_serialize(){const t={};for(const[n,r]of this.#e)We(r)||(t[n]=r);return this.parent.type==="HasParent"&&this.parent.node._id?{type:0,parentId:this.parent.node._id,parentKey:this.parent.key,data:t}:{type:0,data:t}}#r(t,n){let r=!1;const o=pe(this._id),s=[],a={type:3,id:o,data:{}};for(const u in t.data){const c=this.#e.get(u);We(c)?(s.push(...c._toOps(o,u)),c._detach()):c!==void 0?a.data[u]=c:c===void 0&&s.push({type:6,id:o,key:u})}const i={};for(const u in t.data){const c=t.data[u];if(c===void 0)continue;if(n)this.#t.set(u,pe(t.opId));else if(this.#t.get(u)===void 0)r=!0;else if(this.#t.get(u)===t.opId){this.#t.delete(u);continue}else continue;const l=this.#e.get(u);We(l)&&l._detach(),r=!0,i[u]={type:"update"},this.#e.set(u,c),this.invalidate()}return Object.keys(a.data).length!==0&&s.unshift(a),r?{modified:{node:this,type:"LiveObject",updates:i},reverse:s}:{modified:!1}}#s(t,n){const r=t.key;if(this.#e.has(r)===!1)return{modified:!1};if(!n&&this.#t.get(r)!==void 0)return{modified:!1};const o=this.#e.get(r),s=pe(this._id);let a=[];return We(o)?(a=o._toOps(s,t.key),o._detach()):o!==void 0&&(a=[{type:3,id:s,data:{[r]:o}}]),this.#e.delete(r),this.invalidate(),{modified:{node:this,type:"LiveObject",updates:{[t.key]:{type:"delete"}}},reverse:a}}toObject(){return Object.fromEntries(this.#e)}set(t,n){this._pool?.assertStorageIsWritable(),this.update({[t]:n})}get(t){return this.#e.get(t)}delete(t){this._pool?.assertStorageIsWritable();const n=t,r=this.#e.get(n);if(r===void 0)return;if(this._pool===void 0||this._id===void 0){We(r)&&r._detach(),this.#e.delete(n),this.invalidate();return}let o;We(r)?(r._detach(),o=r._toOps(this._id,n)):o=[{type:3,data:{[n]:r},id:this._id}],this.#e.delete(n),this.invalidate();const s=new Map;s.set(this._id,{node:this,type:"LiveObject",updates:{[t]:{type:"delete"}}}),this._pool.dispatch([{type:6,key:n,id:this._id,opId:this._pool.generateOpId()}],o,s)}update(t){if(this._pool?.assertStorageIsWritable(),this._pool===void 0||this._id===void 0){for(const c in t){const l=t[c];if(l===void 0)continue;const d=this.#e.get(c);We(d)&&d._detach(),We(l)&&l._setParentLink(this,c),this.#e.set(c,l),this.invalidate()}return}const n=[],r=[],o=this._pool.generateOpId(),s={},a={id:this._id,type:3,data:{}},i={};for(const c in t){const l=t[c];if(l===void 0)continue;const d=this.#e.get(c);if(We(d)?(r.push(...d._toOps(this._id,c)),d._detach()):d===void 0?r.push({type:6,id:this._id,key:c}):a.data[c]=d,We(l)){l._setParentLink(this,c),l._attach(this._pool.generateId(),this._pool);const m=l._toOps(this._id,c,this._pool),g=m.find(C=>C.parentId===this._id);g&&this.#t.set(c,pe(g.opId)),n.push(...m)}else s[c]=l,this.#t.set(c,o);this.#e.set(c,l),this.invalidate(),i[c]={type:"update"}}Object.keys(a.data).length!==0&&r.unshift(a),Object.keys(s).length!==0&&n.unshift({opId:o,id:this._id,type:3,data:s});const u=new Map;u.set(this._id,{node:this,type:"LiveObject",updates:i}),this._pool.dispatch(n,r,u)}toImmutable(){return super.toImmutable()}toTreeNode(t){return super.toTreeNode(t)}_toTreeNode(t){const n=this._id??Pr();return{type:"LiveObject",id:n,key:t,payload:Array.from(this.#e.entries()).map(([r,o])=>We(o)?o.toTreeNode(r):{type:"Json",id:`${n}:${r}`,key:r,payload:o})}}_toImmutable(){const t={};for(const[n,r]of this.#e)t[n]=dr(r)?r.toImmutable():r;return t}clone(){return new Wr(Object.fromEntries(Array.from(this.#e).map(([t,n])=>[t,dr(n)?n.clone():ro(n)])))}};function zr(e){return mr(mh(e))}function mh(e){switch(e.type){case 8:return e.data;case 4:return new Zn(e.data);case 7:return new kr;case 2:return new Nr([]);default:return lt(e,"Unknown creation Op")}}function vh(e,t){return e===t?!0:e.parent.type==="HasParent"?vh(e.parent.node,t):!1}function gh([e,t],n,r){switch(t.type){case 0:return Zn._deserialize([e,t],n,r);case 1:return Nr._deserialize([e,t],n,r);case 2:return kr._deserialize([e,t],n,r);case 3:return Sn._deserialize([e,t],n,r);default:throw new Error("Unexpected CRDT type")}}function qC([e,t],n,r){switch(t.type){case 0:return Zn._deserialize([e,t],n,r);case 1:return Nr._deserialize([e,t],n,r);case 2:return kr._deserialize([e,t],n,r);case 3:return t.data;default:throw new Error("Unexpected CRDT type")}}function dr(e){return Ch(e)||GC(e)||YC(e)}function We(e){return dr(e)||XC(e)}function Ch(e){return e instanceof Nr}function GC(e){return e instanceof kr}function YC(e){return e instanceof Zn}function XC(e){return e instanceof Sn}function ZC(e){return e===void 0?void 0:dr(e)?e.clone():ro(e)}function $n(e){return e instanceof Sn?e.data:e instanceof Nr||e instanceof kr||e instanceof Zn?e:lt(e,"Unknown AbstractCrdt")}function mr(e){return e instanceof Zn||e instanceof kr||e instanceof Nr?e:new Sn(e)}function JC(e,t){const n=[];return e.forEach((r,o)=>{t.get(o)||n.push({type:5,id:o})}),t.forEach((r,o)=>{const s=e.get(o);if(s)r.type===0&&(s.type!==0||tn(r.data)!==tn(s.data))&&n.push({type:3,id:o,data:r.data}),r.parentKey!==s.parentKey&&n.push({type:1,id:o,parentKey:pe(r.parentKey,"Parent key must not be missing")});else switch(r.type){case 3:n.push({type:8,id:o,parentId:r.parentId,parentKey:r.parentKey,data:r.data});break;case 1:n.push({type:2,id:o,parentId:r.parentId,parentKey:r.parentKey});break;case 0:if(r.parentId===void 0||r.parentKey===void 0)throw new Error("Internal error. Cannot serialize storage root into an operation");n.push({type:4,id:o,parentId:r.parentId,parentKey:r.parentKey,data:r.data});break;case 2:n.push({type:7,id:o,parentId:r.parentId,parentKey:r.parentKey});break}}),n}function QC(e,t){const n=e.updates;for(const[r,o]of hu(t.updates))n[r]=o;return{...t,updates:n}}function eb(e,t){const n=e.updates;for(const[r,o]of hu(t.updates))n[r]=o;return{...t,updates:n}}function tb(e,t){const n=e.updates;return{...t,updates:n.concat(t.updates)}}function La(e,t){return e===void 0?t:e.type==="LiveObject"&&t.type==="LiveObject"?QC(e,t):e.type==="LiveMap"&&t.type==="LiveMap"?eb(e,t):e.type==="LiveList"&&t.type==="LiveList"?tb(e,t):t}var $a=class{#e;#t;#n;#r;constructor(){this.#e={},this.#t=0,this.#n=1,this.#r=0}get length(){return this.#r}*[Symbol.iterator](){const e=this.#r,t=this.#t;for(let n=0;n<e;n++)yield this.#e[t+n]}push(e){const t=Array.isArray(e)?e:[e];this.#n>Number.MAX_SAFE_INTEGER-t.length-1&&wt("Deque full");for(const n of t)this.#e[this.#n++-1]=n;this.#r+=t.length}pop(){if(this.#r<1)return;this.#n--;const e=this.#e[this.#n-1];return delete this.#e[this.#n-1],this.#r--,e}pushLeft(e){const t=Array.isArray(e)?e:[e];this.#t<Number.MIN_SAFE_INTEGER+t.length&&wt("Deque full");for(let n=t.length-1;n>=0;n--)this.#e[--this.#t]=t[n];this.#r+=t.length}popLeft(){if(this.#r<1)return;const e=this.#e[this.#t];return delete this.#e[this.#t],this.#t++,this.#r--,e}};function nb(e){return e===null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function bh(e){return Array.isArray(e)}function rb(e){return!nb(e)&&!bh(e)}function ob(e,t){const{connectionId:n,id:r,info:o}=e,s=Si(e.scopes);return En(Ao({connectionId:n,id:r,info:o,canWrite:s,canComment:hh(e.scopes),isReadOnly:!s,presence:t}))}var sb=class{#e;#t;signal;constructor(){this.#e=new Xn({connections:new Map,presences:new Map}),this.signal=Xe.from(this.#e,e=>wi(Array.from(this.#e.get().presences.keys()).map(t=>this.getUser(Number(t))))),this.#t=new Map}get(){return this.signal.get()}connectionIds(){return this.#e.get().connections.keys()}clearOthers(){this.#e.mutate(e=>{e.connections.clear(),e.presences.clear(),this.#t.clear()})}#n(e){const t=this.#e.get(),n=t.connections.get(e),r=t.presences.get(e);if(n!==void 0&&r!==void 0)return ob(n,r)}getUser(e){const t=this.#t.get(e);if(t)return t;const n=this.#n(e);if(n)return this.#t.set(e,n),n}#r(e){this.#t.delete(e)}setConnection(e,t,n,r){this.#e.mutate(o=>(o.connections.set(e,En({connectionId:e,id:t,info:n,scopes:r})),o.presences.has(e)?this.#r(e):!1))}removeConnection(e){this.#e.mutate(t=>{t.connections.delete(e),t.presences.delete(e),this.#r(e)})}setOther(e,t){this.#e.mutate(n=>(n.presences.set(e,En(Ao(t))),n.connections.has(e)?this.#r(e):!1))}patchOther(e,t){this.#e.mutate(n=>{const r=n.presences.get(e);if(r===void 0)return!1;const o=rh(r,t);return r===o?!1:(n.presences.set(e,En(o)),this.#r(e))})}},yh=class Eh extends Error{context;constructor(t,n,r){super(t,{cause:r}),this.context=n,this.name="LiveblocksError"}get roomId(){return this.context.roomId}get code(){return this.context.code}static from(t,n){return new Eh(ab(t),t,n)}};function ab(e){switch(e.type){case"ROOM_CONNECTION_ERROR":switch(e.code){case 4001:return"Not allowed to connect to the room";case 4005:return"Room is already full";case 4006:return"Kicked out of the room, because the room ID changed";default:return"Could not connect to the room"}case"CREATE_THREAD_ERROR":return"Could not create new thread";case"DELETE_THREAD_ERROR":return"Could not delete thread";case"EDIT_THREAD_METADATA_ERROR":return"Could not edit thread metadata";case"MARK_THREAD_AS_RESOLVED_ERROR":return"Could not mark thread as resolved";case"MARK_THREAD_AS_UNRESOLVED_ERROR":return"Could not mark thread as unresolved";case"CREATE_COMMENT_ERROR":return"Could not create new comment";case"EDIT_COMMENT_ERROR":return"Could not edit comment";case"DELETE_COMMENT_ERROR":return"Could not delete comment";case"ADD_REACTION_ERROR":return"Could not add reaction";case"REMOVE_REACTION_ERROR":return"Could not remove reaction";case"MARK_INBOX_NOTIFICATION_AS_READ_ERROR":return"Could not mark inbox notification as read";case"DELETE_INBOX_NOTIFICATION_ERROR":return"Could not delete inbox notification";case"MARK_ALL_INBOX_NOTIFICATIONS_AS_READ_ERROR":return"Could not mark all inbox notifications as read";case"DELETE_ALL_INBOX_NOTIFICATIONS_ERROR":return"Could not delete all inbox notifications";case"UPDATE_NOTIFICATION_SETTINGS_ERROR":return"Could not update notification settings";case"UPDATE_USER_NOTIFICATION_SETTINGS_ERROR":return"Could not update user notification settings";default:return lt(e,"Unhandled case")}}var cl=1024*1024-512;function ib(e){let t=0;return()=>`${e}:${t++}`}function ll(e,t){return{type:"User",id:`${t.connectionId}`,key:e,payload:{connectionId:t.connectionId,id:t.id,info:t.info,presence:t.presence,isReadOnly:!t.canWrite}}}function ub(){const e=typeof document<"u"?document:void 0,t={current:null};function n(){e?.visibilityState==="hidden"?t.current=t.current??Date.now():t.current=null}return e?.addEventListener("visibilitychange",n),[t,()=>{e?.removeEventListener("visibilitychange",n)}]}function cb(e,t){const n=t.roomId,r=e.initialPresence,o=e.initialStorage,s=t.roomHttpClient,[a,i]=ub(),u={...t.delegates,canZombie(){return t.backgroundKeepAliveTimeout!==void 0&&a.current!==null&&Date.now()>a.current+t.backgroundKeepAliveTimeout&&jo()!=="synchronizing"}},c=new wC(u,t.enableDebugLogging),l={buffer:{flushTimerID:void 0,lastFlushedAt:0,presenceUpdates:{type:"full",data:r},messages:[],storageOperations:[]},staticSessionInfoSig:new zt(null),dynamicSessionInfoSig:new zt(null),myPresence:new q0(r),others:new sb,initialStorage:o,idFactory:null,yjsProvider:void 0,yjsProviderDidChange:Ie(),pool:UC(n,{getCurrentConnectionId:R,onDispatch:y,isStorageWritable:w}),root:void 0,undoStack:[],redoStack:[],pausedHistory:null,activeBatch:null,unacknowledgedOps:new Map};let d;function m(A){const K=c.authValue;if(K!==null){const Z=ih(K);if(Z!==d)if(d=Z,K.type==="secret"){const oe=K.token.parsed;l.staticSessionInfoSig.set({userId:oe.k==="sec-legacy"?oe.id:oe.uid,userInfo:oe.k==="sec-legacy"?oe.info:oe.ui})}else l.staticSessionInfoSig.set({userId:void 0,userInfo:void 0})}D.status.notify(A),L()}let g,C=!1;function v(A){A==="reconnecting"?g=setTimeout(()=>{D.lostConnection.notify("lost"),C=!0,l.others.clearOthers(),G({others:[{type:"reset"}]})},t.lostConnectionTimeout):(clearTimeout(g),C&&(A==="disconnected"?D.lostConnection.notify("failed"):D.lostConnection.notify("restored"),C=!1))}function h(){l.buffer.presenceUpdates={type:"full",data:{...l.myPresence.get()}},Ee!==null&&bt({flush:!1}),he()}function E(){clearTimeout(l.buffer.flushTimerID)}c.events.onMessage.subscribe(_e),c.events.statusDidChange.subscribe(m),c.events.statusDidChange.subscribe(v),c.events.didConnect.subscribe(h),c.events.didDisconnect.subscribe(E),c.events.onConnectionError.subscribe(({message:A,code:K})=>{const Z="ROOM_CONNECTION_ERROR",oe=new yh(A,{type:Z,code:K,roomId:n});t.errorEventSource.notify(oe)});function y(A,K,Z){if(l.activeBatch){for(const oe of A)l.activeBatch.ops.push(oe);for(const[oe,Se]of Z)l.activeBatch.updates.storageUpdates.set(oe,La(l.activeBatch.updates.storageUpdates.get(oe),Se));l.activeBatch.reverseOps.pushLeft(K)}else de(K),l.redoStack.length=0,be(A),G({storageUpdates:Z})}function w(){const A=l.dynamicSessionInfoSig.get()?.scopes;return A!==void 0?Si(A):!0}const D={status:Ie(),lostConnection:Ie(),customEvent:Ie(),self:Ie(),myPresence:Ie(),others:Ie(),storageBatch:Ie(),history:Ie(),storageDidLoad:Ie(),storageStatus:Ie(),ydoc:Ie(),comments:Ie(),roomWillDestroy:Ie()};async function x(A,K){return s.createTextMention({roomId:n,userId:A,mentionId:K})}async function I(A){return s.deleteTextMention({roomId:n,mentionId:A})}async function S(A,K){await s.reportTextEditor({roomId:n,type:A,rootKey:K})}async function k(){return s.listTextVersions({roomId:n})}async function W(A){return s.listTextVersionsSince({roomId:n,since:A.since,signal:A.signal})}async function P(A){return s.getTextVersion({roomId:n,versionId:A})}async function M(){return s.createTextVersion({roomId:n})}async function F(A){return s.executeContextualPrompt({roomId:n,...A})}function*B(A){const{ops:K,...Z}=A;if(K.length<2)throw new Error("Cannot split ops into smaller chunks");const oe=Math.floor(K.length/2),Se=K.slice(0,oe),Re=K.slice(oe);for(const jt of[Se,Re]){const Qe={ops:jt,...Z},Rn=tn([Qe]);$(Rn)?yield*B(Qe):yield Rn}}function*j(A){if(A.length<2)if(A[0].type===201){yield*B(A[0]);return}else throw new Error("Cannot split into chunks smaller than the allowed message size");const K=Math.floor(A.length/2),Z=A.slice(0,K),oe=A.slice(K);for(const Se of[Z,oe]){const Re=tn(Se);$(Re)?yield*j(Se):yield Re}}function $(A){return A.length*4<cl?!1:new TextEncoder().encode(A).length>=cl}function re(A){const K=t.largeMessageStrategy??"default",Z=tn(A);if(!$(Z))return c.send(Z);switch(K){case"default":{wo("Message is too large for websockets, not sending. Configure largeMessageStrategy option to deal with this.");return}case"split":{ft("Message is too large for websockets, splitting into smaller chunks");for(const oe of j(A))c.send(oe);return}case"experimental-fallback-to-http":{ft("Message is too large for websockets, so sending over HTTP instead");const oe=l.dynamicSessionInfoSig.get()?.nonce??wt("Session is not authorized to send message over HTTP");s.sendMessages({roomId:n,nonce:oe,messages:A}).then(Se=>{!Se.ok&&Se.status===403&&c.reconnect()});return}}}const Y=Xe.from(l.staticSessionInfoSig,l.dynamicSessionInfoSig,l.myPresence,(A,K,Z)=>{if(A===null||K===null)return null;{const oe=Si(K.scopes);return{connectionId:K.actor,id:A.userId,info:A.userInfo,presence:Z,canWrite:oe,canComment:hh(K.scopes)}}});let ee;function L(){const A=Y.get();A!==null&&A!==ee&&(D.self.notify(A),ee=A)}const Q=Xe.from(Y,A=>A!==null?ll("Me",A):null);function V(A){if(A.items.length===0)throw new Error("Internal error: cannot load storage without items");l.root!==void 0?te(A.items):l.root=Zn._fromItems(A.items,l.pool);const K=Y.get()?.canWrite??!0,Z=l.undoStack.length;for(const oe in l.initialStorage)l.root.get(oe)===void 0&&(K?l.root.set(oe,ZC(l.initialStorage[oe])):ft(`Attempted to populate missing storage key '${oe}', but current user has no write access`));l.undoStack.length=Z}function te(A){if(l.root===void 0)return;const K=new Map;for(const[Se,Re]of l.pool.nodes)K.set(Se,Re._serialize());const Z=JC(K,new Map(A)),oe=_(Z,!1);G(oe.updates)}function se(A){l.undoStack.length>=50&&l.undoStack.shift(),l.undoStack.push(A),ie()}function de(A){l.pausedHistory!==null?l.pausedHistory.pushLeft(A):se(A)}function G(A){const K=A.storageUpdates,Z=A.others;if(Z!==void 0&&Z.length>0){const oe=l.others.get();for(const Se of Z)D.others.notify({...Se,others:oe})}if((A.presence??!1)&&(L(),D.myPresence.notify(l.myPresence.get())),K!==void 0&&K.size>0){const oe=Array.from(K.values());D.storageBatch.notify(oe)}Mo()}function R(){const A=l.dynamicSessionInfoSig.get();if(A)return A.actor;throw new Error("Internal. Tried to get connection id but connection was never open")}function _(A,K){const Z={reverse:new $a,storageUpdates:new Map,presence:!1},oe=new Set,Se=A.map(Re=>Re.type!=="presence"&&!Re.opId?{...Re,opId:l.pool.generateOpId()}:Re);for(const Re of Se)if(Re.type==="presence"){const jt={type:"presence",data:{}};for(const Qe in Re.data)jt.data[Qe]=l.myPresence.get()[Qe];if(l.myPresence.patch(Re.data),l.buffer.presenceUpdates===null)l.buffer.presenceUpdates={type:"partial",data:Re.data};else for(const Qe in Re.data)l.buffer.presenceUpdates.data[Qe]=Re.data[Qe];Z.reverse.pushLeft(jt),Z.presence=!0}else{let jt;if(K)jt=0;else{const Rn=pe(Re.opId);jt=l.unacknowledgedOps.delete(Rn)?2:1}const Qe=H(Re,jt);if(Qe.modified){const Rn=Qe.modified.node._id;Rn&&oe.has(Rn)||(Z.storageUpdates.set(pe(Qe.modified.node._id),La(Z.storageUpdates.get(pe(Qe.modified.node._id)),Qe.modified)),Z.reverse.pushLeft(Qe.reverse)),(Re.type===2||Re.type===7||Re.type===4)&&oe.add(pe(Re.id))}}return{ops:Se,reverse:Array.from(Z.reverse),updates:{storageUpdates:Z.storageUpdates,presence:Z.presence}}}function H(A,K){if($C(A))return{modified:!1};switch(A.type){case 6:case 3:case 5:{const Z=l.pool.nodes.get(A.id);return Z===void 0?{modified:!1}:Z._apply(A,K===0)}case 1:{const Z=l.pool.nodes.get(A.id);return Z===void 0?{modified:!1}:Z.parent.type==="HasParent"&&Ch(Z.parent.node)?Z.parent.node._setChildKey(oo(A.parentKey),Z,K):{modified:!1}}case 4:case 2:case 7:case 8:{if(A.parentId===void 0)return{modified:!1};const Z=l.pool.nodes.get(A.parentId);return Z===void 0?{modified:!1}:Z._attachChild(A,K)}}}function X(A,K){const Z={};l.buffer.presenceUpdates===null&&(l.buffer.presenceUpdates={type:"partial",data:{}});for(const oe in A){const Se=A[oe];Se!==void 0&&(l.buffer.presenceUpdates.data[oe]=Se,Z[oe]=l.myPresence.get()[oe])}l.myPresence.patch(A),l.activeBatch?(K?.addToHistory&&l.activeBatch.reverseOps.pushLeft({type:"presence",data:Z}),l.activeBatch.updates.presence=!0):(he(),K?.addToHistory&&de([{type:"presence",data:Z}]),G({presence:!0}))}function fe(A){if(A.targetActor!==void 0){const Z=l.others.getUser(A.actor);l.others.setOther(A.actor,A.data);const oe=l.others.getUser(A.actor);if(Z===void 0&&oe!==void 0)return{type:"enter",user:oe}}else l.others.patchOther(A.actor,A.data);const K=l.others.getUser(A.actor);if(K)return{type:"update",updates:A.data,user:K}}function le(A){const K=l.others.getUser(A.actor);return K?(l.others.removeConnection(A.actor),{type:"leave",user:K}):null}function T(A){l.dynamicSessionInfoSig.set({actor:A.actor,nonce:A.nonce,scopes:A.scopes}),l.idFactory=ib(A.actor),L();for(const K of l.others.connectionIds())A.users[K]===void 0&&l.others.removeConnection(K);for(const K in A.users){const Z=A.users[K],oe=Number(K);l.others.setConnection(oe,Z.id,Z.info,Z.scopes)}return{type:"reset"}}function q(){return l.undoStack.length>0}function ne(){return l.redoStack.length>0}function ie(){D.history.notify({canUndo:q(),canRedo:ne()})}function we(A){l.others.setConnection(A.actor,A.id,A.info,A.scopes),l.buffer.messages.push({type:100,data:l.myPresence.get(),targetActor:A.actor}),he();const K=l.others.getUser(A.actor);return K?{type:"enter",user:K}:void 0}function xe(A){return rb(A)?A:null}function ae(A){const K=$s(A);return K===void 0?null:bh(K)?wi(K.map(Z=>xe(Z))):wi([xe(K)])}function Te(A){if(A.size===0)return;const K=[],Z=Array.from(A.values()),oe=_(Z,!0);K.push({type:201,ops:oe.ops}),G(oe.updates),re(K)}function _e(A){if(typeof A.data!="string")return;const K=ae(A.data);if(K===null||K.length===0)return;const Z={storageUpdates:new Map,others:[]};for(const oe of K)switch(oe.type){case 101:{const Se=we(oe);Se&&Z.others.push(Se);break}case 100:{const Se=fe(oe);Se&&Z.others.push(Se);break}case 103:{const Se=l.others.get();D.customEvent.notify({connectionId:oe.actor,user:oe.actor<0?null:Se.find(Re=>Re.connectionId===oe.actor)??null,event:oe.event});break}case 102:{const Se=le(oe);Se&&Z.others.push(Se);break}case 300:{D.ydoc.notify(oe);break}case 104:{Z.others.push(T(oe));break}case 200:{$e(oe);break}case 201:{const Se=_(oe.ops,!1);for(const[Re,jt]of Se.updates.storageUpdates)Z.storageUpdates.set(Re,La(Z.storageUpdates.get(Re),jt));break}case 299:{Qd("Storage mutation rejection error",oe.reason);break}case 400:case 407:case 401:case 408:case 405:case 406:case 402:case 403:case 404:{D.comments.notify(oe);break}}G(Z)}function he(){const A=l.buffer.storageOperations;if(A.length>0){for(const oe of A)l.unacknowledgedOps.set(pe(oe.opId),oe);Mo()}if(c.getStatus()!=="connected"){l.buffer.storageOperations=[];return}const K=Date.now(),Z=K-l.buffer.lastFlushedAt;if(Z>=t.throttleDelay){const oe=Ce();if(oe.length===0)return;re(oe),l.buffer={flushTimerID:void 0,lastFlushedAt:K,messages:[],storageOperations:[],presenceUpdates:null}}else clearTimeout(l.buffer.flushTimerID),l.buffer.flushTimerID=setTimeout(he,t.throttleDelay-Z)}function Ce(){const A=[];l.buffer.presenceUpdates&&A.push(l.buffer.presenceUpdates.type==="full"?{type:100,targetActor:-1,data:l.buffer.presenceUpdates.data}:{type:100,data:l.buffer.presenceUpdates.data});for(const K of l.buffer.messages)A.push(K);return l.buffer.storageOperations.length>0&&A.push({type:201,ops:l.buffer.storageOperations}),A}function ke(A,K,Z){const oe={type:301,update:A,guid:K,v2:Z};l.buffer.messages.push(oe),D.ydoc.notify(oe),he()}function Pe(A,K={shouldQueueEventIfNotReady:!1}){c.getStatus()!=="connected"&&!K.shouldQueueEventIfNotReady||(l.buffer.messages.push({type:103,event:A}),he())}function be(A){const{storageOperations:K}=l.buffer;for(const Z of A)K.push(Z);he()}let Ee=null,Ct=null;function $e(A){const K=new Map(l.unacknowledgedOps);V(A),Te(K),Ct?.(),Mo(),D.storageDidLoad.notify()}async function qe(){if(!c.authValue)return;const A=await s.streamStorage({roomId:n});$e({items:A})}function bt(A){const K=l.buffer.messages;t.unstable_streamData?qe():K.some(Z=>Z.type===200)||K.push({type:200}),A.flush&&he()}function Je(){return Ee===null&&(bt({flush:!0}),Ee=new Promise(A=>{Ct=A}),Mo()),Ee}function nr(){const A=l.root;return A!==void 0?A:(Je(),null)}async function cn(){return l.root!==void 0?Promise.resolve({root:l.root}):(await Je(),{root:pe(l.root)})}function ln(A,K,Z){l.buffer.messages.find(oe=>oe.type===300&&oe.vector===A&&oe.guid===K&&oe.v2===Z)||l.buffer.messages.push({type:300,vector:A,guid:K,v2:Z}),he()}function ga(){if(l.activeBatch)throw new Error("undo is not allowed during a batch");const A=l.undoStack.pop();if(A===void 0)return;l.pausedHistory=null;const K=_(A,!0);G(K.updates),l.redoStack.push(K.reverse),ie();for(const Z of K.ops)Z.type!=="presence"&&l.buffer.storageOperations.push(Z);he()}function Ca(){if(l.activeBatch)throw new Error("redo is not allowed during a batch");const A=l.redoStack.pop();if(A===void 0)return;l.pausedHistory=null;const K=_(A,!0);G(K.updates),l.undoStack.push(K.reverse),ie();for(const Z of K.ops)Z.type!=="presence"&&l.buffer.storageOperations.push(Z);he()}function ba(){l.undoStack.length=0,l.redoStack.length=0}function ya(A){if(l.activeBatch)return A();let K;l.activeBatch={ops:[],updates:{storageUpdates:new Map,presence:!1,others:[]},reverseOps:new $a};try{K=A()}finally{const Z=l.activeBatch;l.activeBatch=null,Z.reverseOps.length>0&&de(Array.from(Z.reverseOps)),Z.ops.length>0&&(l.redoStack.length=0),Z.ops.length>0&&be(Z.ops),G(Z.updates),he()}return K}function Ea(){l.pausedHistory===null&&(l.pausedHistory=new $a)}function Da(){const A=l.pausedHistory;l.pausedHistory=null,A!==null&&A.length>0&&se(Array.from(A))}const Bc=t.createSyncSource();function jo(){return l.root===void 0?Ee===null?"not-loaded":"loading":l.unacknowledgedOps.size===0?"synchronized":"synchronizing"}let Fc=jo();function Mo(){const A=jo();Fc!==A&&(Fc=A,D.storageStatus.notify(A)),Bc.setSyncStatus(A==="synchronizing"?"synchronizing":"synchronized")}function Pc(){return Y.get()!==null}async function Xg(){for(;!Pc();){const{promise:A,resolve:K}=nh(),Z=_o.self.subscribeOnce(K),oe=_o.status.subscribeOnce(K);await A,Z(),oe()}}function Nc(){return nr()!==null}async function Zg(){for(;!Nc();)await cn()}const Jg=Xe.from(l.others.signal,A=>A.map((K,Z)=>ll(`Other ${Z}`,K))),_o={status:D.status.observable,lostConnection:D.lostConnection.observable,customEvent:D.customEvent.observable,others:D.others.observable,self:D.self.observable,myPresence:D.myPresence.observable,storage:D.storageBatch.observable,storageBatch:D.storageBatch.observable,history:D.history.observable,storageDidLoad:D.storageDidLoad.observable,storageStatus:D.storageStatus.observable,ydoc:D.ydoc.observable,comments:D.comments.observable,roomWillDestroy:D.roomWillDestroy.observable};async function Qg(A){return s.getThreadsSince({roomId:n,since:A.since,signal:A.signal})}async function e0(A){return s.getThreads({roomId:n,query:A?.query,cursor:A?.cursor})}async function t0(A){return s.getThread({roomId:n,threadId:A})}async function n0(A){return s.createThread({roomId:n,threadId:A.threadId,commentId:A.commentId,metadata:A.metadata,body:A.body,attachmentIds:A.attachmentIds})}async function r0(A){return s.deleteThread({roomId:n,threadId:A})}async function o0({metadata:A,threadId:K}){return s.editThreadMetadata({roomId:n,threadId:K,metadata:A})}async function s0(A){return s.markThreadAsResolved({roomId:n,threadId:A})}async function a0(A){return s.markThreadAsUnresolved({roomId:n,threadId:A})}async function i0(A){return s.createComment({roomId:n,threadId:A.threadId,commentId:A.commentId,body:A.body,attachmentIds:A.attachmentIds})}async function u0(A){return s.editComment({roomId:n,threadId:A.threadId,commentId:A.commentId,body:A.body,attachmentIds:A.attachmentIds})}async function c0({threadId:A,commentId:K}){return s.deleteComment({roomId:n,threadId:A,commentId:K})}async function l0({threadId:A,commentId:K,emoji:Z}){return s.addReaction({roomId:n,threadId:A,commentId:K,emoji:Z})}async function f0({threadId:A,commentId:K,emoji:Z}){return await s.removeReaction({roomId:n,threadId:A,commentId:K,emoji:Z})}function d0(A){return{type:"localAttachment",status:"idle",id:sh(),name:A.name,size:A.size,mimeType:A.type,file:A}}async function h0(A,K={}){return s.uploadAttachment({roomId:n,attachment:A,signal:K.signal})}function p0(A){return s.getAttachmentUrl({roomId:n,attachmentId:A})}function m0(A){return s.getNotificationSettings({roomId:n,signal:A?.signal})}function v0(A){return s.updateNotificationSettings({roomId:n,settings:A})}async function g0(A){await s.markRoomInboxNotificationAsRead({roomId:n,inboxNotificationId:A})}const kc=t.createSyncSource();function wa(A){return kc.setSyncStatus(A==="synchronizing"?"synchronizing":"synchronized")}return Object.defineProperty({[Oe]:{get presenceBuffer(){return ro(l.buffer.presenceUpdates?.data??null)},get undoStack(){return ro(l.undoStack)},get nodeCount(){return l.pool.nodes.size},getYjsProvider(){return l.yjsProvider},setYjsProvider(A){l.yjsProvider?.off("status",wa),l.yjsProvider=A,A?.on("status",wa),l.yjsProviderDidChange.notify()},yjsProviderDidChange:l.yjsProviderDidChange.observable,reportTextEditor:S,createTextMention:x,deleteTextMention:I,listTextVersions:k,listTextVersionsSince:W,getTextVersion:P,createTextVersion:M,executeContextualPrompt:F,getSelf_forDevTools:()=>Q.get(),getOthers_forDevTools:()=>Jg.get(),simulate:{explicitClose:A=>c._privateSendMachineEvent({type:"EXPLICIT_SOCKET_CLOSE",event:A}),rawSend:A=>c.send(A)},attachmentUrlsStore:s.getOrCreateAttachmentUrlsStore(n)},id:n,subscribe:lb(n,_o,t.errorEventSource),connect:()=>c.connect(),reconnect:()=>c.reconnect(),disconnect:()=>c.disconnect(),destroy:()=>{const{roomWillDestroy:A,...K}=D;for(const Z of Object.values(K))Z[Symbol.dispose]();D.roomWillDestroy.notify(),l.yjsProvider?.off("status",wa),Bc.destroy(),kc.destroy(),i(),c.destroy(),A[Symbol.dispose]()},updatePresence:X,updateYDoc:ke,broadcastEvent:Pe,batch:ya,history:{undo:ga,redo:Ca,canUndo:q,canRedo:ne,clear:ba,pause:Ea,resume:Da},fetchYDoc:ln,getStorage:cn,getStorageSnapshot:nr,getStorageStatus:jo,isPresenceReady:Pc,isStorageReady:Nc,waitUntilPresenceReady:Yc(Xg),waitUntilStorageReady:Yc(Zg),events:_o,getStatus:()=>c.getStatus(),getSelf:()=>Y.get(),getPresence:()=>l.myPresence.get(),getOthers:()=>l.others.get(),getThreads:e0,getThreadsSince:Qg,getThread:t0,createThread:n0,deleteThread:r0,editThreadMetadata:o0,markThreadAsResolved:s0,markThreadAsUnresolved:a0,createComment:i0,editComment:u0,deleteComment:c0,addReaction:l0,removeReaction:f0,prepareAttachment:d0,uploadAttachment:h0,getAttachmentUrl:p0,getNotificationSettings:m0,updateNotificationSettings:v0,markInboxNotificationAsRead:g0},Oe,{enumerable:!1})}function lb(e,t,n){function r(a,i){return t.storageBatch.subscribe(u=>{const c=u.filter(l=>vh(l.node,a));c.length>0&&i(c)})}function o(a,i){return t.storageBatch.subscribe(u=>{for(const c of u)c.node._id===a._id&&i(c.node)})}function s(a,i,u){if(typeof a=="string"&&fb(a)){if(typeof i!="function")throw new Error("Second argument must be a callback function");const c=i;switch(a){case"event":return t.customEvent.subscribe(c);case"my-presence":return t.myPresence.subscribe(c);case"others":{const l=c;return t.others.subscribe(d=>{const{others:m,...g}=d;return l(m,g)})}case"error":return n.subscribe(l=>{if(l.roomId===e)return c(l)});case"status":return t.status.subscribe(c);case"lost-connection":return t.lostConnection.subscribe(c);case"history":return t.history.subscribe(c);case"storage-status":return t.storageStatus.subscribe(c);case"comments":return t.comments.subscribe(c);default:return lt(a,`"${String(a)}" is not a valid event name`)}}if(i===void 0||typeof a=="function")if(typeof a=="function"){const c=a;return t.storageBatch.subscribe(c)}else throw new Error("Please specify a listener callback");if(We(a)){const c=a;return u?.isDeep?r(c,i):o(c,i)}throw new Error(`${String(a)} is not a value that can be subscribed to.`)}return s}function fb(e){return e==="my-presence"||e==="others"||e==="event"||e==="error"||e==="history"||e==="status"||e==="storage-status"||e==="lost-connection"||e==="connection"||e==="comments"}function db(e,t){return async()=>t.getAuthValue({requestedScope:"room:read",roomId:e})}function hb(e,t,n){return r=>{const o=n??(typeof WebSocket>"u"?void 0:WebSocket);if(o===void 0)throw new Ln("To use Liveblocks client in a non-DOM environment, you need to provide a WebSocket polyfill.");const s=new URL(t);if(s.protocol=s.protocol==="http:"?"ws":"wss",s.pathname="/v7",s.searchParams.set("roomId",e),r.type==="secret")s.searchParams.set("tok",r.token.raw);else if(r.type==="public")s.searchParams.set("pubkey",r.publicApiKey);else return lt(r,"Unhandled case");return s.searchParams.set("version",fu),new o(s.toString())}}var pb=16,mb=1e3,vb=100,gb=15e3,Cb=200,bb=1e3,yb=3e4,Eb=5e3,Db=50,wb=50;function Ab(e){return typeof e=="string"&&e.startsWith("http")?e:TC}function xb(e){const t=e,n=Sb(t.throttle??vb),r=Tb(t.lostConnectionTimeout??Eb),o=Ob(t.backgroundKeepAliveTimeout),s=Ab(t.baseUrl),a=new zt(void 0),i=xC(e,V=>{const te=V.k==="sec-legacy"?V.id:V.uid;a.set(()=>te)}),u=t.polyfills?.fetch||globalThis.fetch?.bind(globalThis),c=aC({baseUrl:s,fetchPolyfill:u,authManager:i}),l=new Map;function d(V){V.id,l.delete(V.id),V.destroy()}function m(V){const te=()=>{const se=te;V.unsubs.delete(se)?V.unsubs.size===0&&d(V.room):ft("This leave function was already called. Calling it more than once has no effect.")};return V.unsubs.add(te),{room:V.room,leave:te}}function g(V,...te){const se=l.get(V);if(se!==void 0)return m(se);const de=te[0]??{},G=(typeof de.initialPresence=="function"?de.initialPresence(V):de.initialPresence)??{},R=(typeof de.initialStorage=="function"?de.initialStorage(V):de.initialStorage)??{},_=cb({initialPresence:G,initialStorage:R},{roomId:V,throttleDelay:n,lostConnectionTimeout:r,backgroundKeepAliveTimeout:o,polyfills:t.polyfills,delegates:t.mockedDelegates??{createSocket:hb(V,s,t.polyfills?.WebSocket),authenticate:db(V,i)},enableDebugLogging:t.enableDebugLogging,baseUrl:s,errorEventSource:j,largeMessageStrategy:t.largeMessageStrategy??(t.unstable_fallbackToHTTP?"experimental-fallback-to-http":void 0),unstable_streamData:!!t.unstable_streamData,roomHttpClient:c,createSyncSource:Y}),H={room:_,unsubs:new Set};if(l.set(V,H),de.autoConnect??!0){if(typeof atob>"u"){if(t.polyfills?.atob===void 0)throw new Error("You need to polyfill atob to use the client in your environment. Please follow the instructions at https://liveblocks.io/docs/errors/liveblocks-client/atob-polyfill");yi.atob=t.polyfills.atob}_.connect()}return m(H)}function C(V){const te=l.get(V)?.room;return te||null}function v(){i.reset(),a.set(()=>{});for(const{room:V}of l.values())hC(V.getStatus())||V.reconnect()}const h=t.resolveUsers,E=fl(()=>!h,"Set the resolveUsers option in createClient to specify user info."),y=new Xr(async V=>{const te=V.flat(),se=await h?.({userIds:te});return E(),se??te.map(()=>{})},{delay:Db}),w=xi(y);function D(V){w.invalidate(V)}const x=t.resolveRoomsInfo,I=fl(()=>!x,"Set the resolveRoomsInfo option in createClient to specify room info."),S=new Xr(async V=>{const te=V.flat(),se=await x?.({roomIds:te});return I(),se??te.map(()=>{})},{delay:wb}),k=xi(S);function W(V){k.invalidate(V)}const P=new Map;function M(){P.clear()}const F=[],B=new zt("synchronized"),j=Ie();function $(){const V=B.get();return V==="synchronizing"?V:"synchronized"}function re(){B.set(F.some(V=>V.get()==="synchronizing")?"synchronizing":F.some(V=>V.get()==="has-local-changes")?"has-local-changes":"synchronized")}function Y(){const V=new zt("synchronized");F.push(V);const te=V.subscribe(()=>re());function se(G){V.set(G)}function de(){te();const G=F.findIndex(R=>R===V);if(G>-1){const[R]=F.splice(G,1);R.get()!=="synchronized"&&re()}}return{setSyncStatus:se,destroy:de}}{const V=se=>{t.preventUnsavedChanges&&B.get()!=="synchronized"&&se.preventDefault()};(typeof window<"u"?window:void 0)?.addEventListener("beforeunload",V)}async function ee(V){const te=await c.getUserNotificationSettings(V);return bs(te)}async function L(V){const te=await c.updateUserNotificationSettings(V);return bs(te)}const Q=Object.defineProperty({enterRoom:g,getRoom:C,logout:v,getInboxNotifications:c.getInboxNotifications,getInboxNotificationsSince:c.getInboxNotificationsSince,getUnreadInboxNotificationsCount:c.getUnreadInboxNotificationsCount,markAllInboxNotificationsAsRead:c.markAllInboxNotificationsAsRead,markInboxNotificationAsRead:c.markInboxNotificationAsRead,deleteAllInboxNotifications:c.deleteAllInboxNotifications,deleteInboxNotification:c.deleteInboxNotification,getNotificationSettings:ee,updateNotificationSettings:L,resolvers:{invalidateUsers:D,invalidateRoomsInfo:W,invalidateMentionSuggestions:M},getSyncStatus:$,events:{error:j,syncStatus:B},[Oe]:{currentUserId:a,mentionSuggestionsCache:P,resolveMentionSuggestions:t.resolveMentionSuggestions,usersStore:w,roomsInfoStore:k,getRoomIds(){return Array.from(l.keys())},httpClient:c,as:()=>Q,createSyncSource:Y,emitError:(V,te)=>{const se=yh.from(V,te);j.notify(se)||wo(se.message)}}},Oe,{enumerable:!1});return Q}function bu(e,t,n,r,o){if(typeof t!="number"||t<n||r!==void 0&&t>r)throw new Error(r!==void 0?`${e} should be between ${o??n} and ${r}.`:`${e} should be at least ${o??n}.`);return t}function Ob(e){if(e!==void 0)return bu("backgroundKeepAliveTimeout",e,gb)}function Sb(e){return bu("throttle",e,pb,mb)}function Tb(e){return bu("lostConnectionTimeout",e,Cb,yb,bb)}function fl(e,...t){return()=>{}}function Rb(e){return"type"in e&&e.type==="paragraph"}function Ib(e){return!("type"in e)&&"text"in e&&typeof e.text=="string"}function Bb(e){return"type"in e&&e.type==="mention"}function Fb(e){return"type"in e&&e.type==="link"}var Pb={paragraph:Rb,text:Ib,link:Fb,mention:Bb};function Nb(e,t,n){if(!e||!e?.content)return;const o=Pb[t],s=n;for(const a of e.content)for(const i of a.children)o(i)&&s?.(i)}function kb(e){const t=new Set;return Nb(e,"mention",n=>t.add(n.id)),Array.from(t)}var jb={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};new RegExp(Object.keys(jb).map(e=>`\\${e}`).join("|"),"g");var Mb={_:"\\_","*":"\\*","#":"\\#","`":"\\`","~":"\\~","!":"\\!","|":"\\|","(":"\\(",")":"\\)","{":"\\{","}":"\\}","[":"\\[","]":"\\]"};new RegExp(Object.keys(Mb).map(e=>`\\${e}`).join("|"),"g");var Ua=[1e3,2e3,4e3,8e3,1e4];function vr(e,t,n){const r=performance.now(),o=typeof document<"u"?document:void 0,s=typeof window<"u"?window:void 0,a=n?.maxStaleTimeMs??Number.POSITIVE_INFINITY,i={inForeground:o?.visibilityState!=="hidden",lastSuccessfulPollAt:r,count:0,backoff:0};function u(){return i.count>0&&i.inForeground}const c=new uh({}).addState("@idle").addState("@enabled").addState("@polling");c.addTransitions("@idle",{START:"@enabled"}),c.addTransitions("@enabled",{STOP:"@idle",POLL:"@polling"}),c.addTimedTransition("@enabled",()=>{const E=i.lastSuccessfulPollAt+t;return Math.max(0,E-performance.now())+i.backoff},"@polling"),c.onEnterAsync("@polling",async(h,E)=>{await e(E),E.aborted||(i.lastSuccessfulPollAt=performance.now())},()=>({target:u()?"@enabled":"@idle",effect:()=>{i.backoff=0}}),()=>({target:u()?"@enabled":"@idle",effect:()=>{i.backoff=Ua.find(h=>h>i.backoff)??Ua[Ua.length-1]}}),3e4);function l(){u()?c.send({type:"START"}):c.send({type:"STOP"})}function d(){i.count++,l()}function m(){i.count--,i.count<0&&(i.count=0),l()}function g(){performance.now()-i.lastSuccessfulPollAt>a&&c.send({type:"POLL"})}function C(h){i.inForeground=h,l(),g()}function v(){C(o?.visibilityState!=="hidden")}return o?.addEventListener("visibilitychange",v),s?.addEventListener("online",v),s?.addEventListener("focus",g),c.start(),{inc:d,dec:m,pollNowIfStale:g,setInForeground:C}}function _b(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function Lb(e,t){if(!nn(e)||!nn(t))return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Object.prototype.hasOwnProperty.call(t,r)&&Object.is(e[r],t[r]))}function Bt(e,t){if(Object.is(e,t))return!0;const n=Array.isArray(e),r=Array.isArray(t);return n||r?!n||!r?!1:_b(e,t):Lb(e,t)}function $b(e,t,n){let r=0,o=e.length;for(;r<o;){const s=r+(o-r>>1);n(t,e[s])?o=s:r=s+1}return r}var dl=class as{#e;#t;constructor(t,n){this.#t=n,this.#e=t}static from(t,n){const r=new as([],n);for(const o of t)r.add(o);return r}static fromAlreadySorted(t,n){return new as(t,n)}clone(){return new as(this.#e.slice(),this.#t)}add(t){const n=$b(this.#e,t,this.#t);this.#e.splice(n,0,t)}remove(t){const n=this.#e.indexOf(t);return n>=0?(this.#e.splice(n,1),!0):!1}get length(){return this.#e.length}*filter(t){for(const n of this.#e)t(n)&&(yield n)}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};du(P0,fu,N0);var Ub="@liveblocks/client",Hb="2.23.0",Wb="esm";du(Ub,Hb,Wb);var Dh=f.createContext(null);function zb(){return f.useContext(Dh)}function Vb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}function Ws(e,t,n,r,o){const s=f.useRef(null);let a;s.current===null?(a={hasValue:!1,value:null},s.current=a):a=s.current;const[i,u]=f.useMemo(()=>{let l=!1,d,m;const g=E=>{if(!l){l=!0,d=E;const x=r(E);if(o!==void 0&&a.hasValue){const I=a.value;if(o(I,x))return m=I,I}return m=x,x}const y=d,w=m;if(Vb(y,E))return w;const D=r(E);return o!==void 0&&o(w,D)?(d=E,w):(d=E,m=D,D)},C=n===void 0?null:n;return[()=>g(t()),C===null?void 0:()=>g(C())]},[t,n,r,o]),c=f.useSyncExternalStore(e,i,u);return f.useEffect(()=>{a.hasValue=!0,a.value=c},[c]),f.useDebugValue(c),c}var Kb=e=>e;function Jn(e,t,n){return Ws(e.subscribe,e.get,e.get,t??Kb,n)}var lr=1e3,Pn=60*lr,yt={NOTIFICATIONS_POLL_INTERVAL:1*Pn,NOTIFICATIONS_MAX_STALE_TIME:5*lr,ROOM_THREADS_POLL_INTERVAL:5*Pn,ROOM_THREADS_MAX_STALE_TIME:5*lr,USER_THREADS_POLL_INTERVAL:1*Pn,USER_THREADS_MAX_STALE_TIME:30*lr,HISTORY_VERSIONS_POLL_INTERVAL:1*Pn,HISTORY_VERSIONS_MAX_STALE_TIME:5*lr,NOTIFICATION_SETTINGS_POLL_INTERVAL:1*Pn,NOTIFICATION_SETTINGS_MAX_STALE_TIME:5*lr,USER_NOTIFICATION_SETTINGS_INTERVAL:5*Pn,USER_NOTIFICATION_SETTINGS_MAX_STALE_TIME:1*Pn},ys=Object.freeze({isLoading:!0}),wh=e=>Object.freeze({isLoading:!1,error:e});function gr(e,t){return arguments.length===1?Object.freeze({isLoading:!1,data:e}):Object.freeze({isLoading:!1,[e]:t})}function qb(e,t){for(const n of e)if(t(n))return n}function Gb(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e},[e]),t}var Yb=e=>e;function ut(e){return f.useReducer(Yb,e)[0]}function Vo(e){const t=ut(e);if(typeof t=="function"){const n=Gb(e);return f.useCallback((...r)=>n.current(...r),[n])}else return t}function yu(e){const t=new Set;t.add("constructor");let n=e.constructor.prototype;do for(const r of Reflect.ownKeys(n)){if(t.has(r))continue;typeof Reflect.getOwnPropertyDescriptor(n,r)?.value=="function"&&(t.add(r),e[r]=e[r].bind(e))}while((n=Reflect.getPrototypeOf(n))&&n!==Object.prototype)}function hl(e,t){if(!nn(e)||!nn(t))return Bt(e,t);const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Object.prototype.hasOwnProperty.call(t,r)&&Bt(e[r],t[r]))}function Xb(e){return t=>Zb(t,e)&&Jb(t,e)}function Zb(e,t){return t.resolved===void 0||e.resolved===t.resolved}function Jb(e,t){const n=e.metadata;return t.metadata===void 0||Object.entries(t.metadata).every(([r,o])=>o===void 0||Qb(n[r],o))}function Qb(e,t){return t===null?e===void 0:Di(t)?typeof e=="string"&&e.startsWith(t.startsWith):e===t}function ey(e){return e.deletedAt&&e.comments.length>0?{...e,comments:[]}:e.comments.some(n=>!n.deletedAt)?e:{...e,deletedAt:new Date,comments:[]}}var ty=class Ah{#e;#t;#n;signal;constructor(){this.#t=dl.from([],(t,n)=>{const r=t.createdAt,o=n.createdAt;return r<o?!0:r===o?t.id<n.id:!1}),this.#n=dl.from([],(t,n)=>{const r=n.updatedAt,o=t.updatedAt;return r<o?!0:r===o?n.id<t.id:!1}),this.#e=new Map,this.signal=new Xn(this)}clone(){const t=new Ah;return t.#e=new Map(this.#e),t.#t=this.#t.clone(),t.#n=this.#n.clone(),t}get(t){const n=this.getEvenIfDeleted(t);return n?.deletedAt?void 0:n}getEvenIfDeleted(t){return this.#e.get(t)}upsert(t){this.signal.mutate(()=>{t=ey(t);const n=t.id,r=this.#e.get(n);if(r){if(r.deletedAt)return!1;this.#t.remove(r),this.#n.remove(r)}return t.deletedAt||(this.#t.add(t),this.#n.add(t)),this.#e.set(n,t),!0})}upsertIfNewer(t){const n=this.get(t.id);(!n||t.updatedAt>=n.updatedAt)&&this.upsert(t)}applyDelta(t,n){ct(()=>{for(const r of t)this.upsertIfNewer(r);for(const{id:r,deletedAt:o}of n)this.getEvenIfDeleted(r)&&this.delete(r,o)})}delete(t,n){const r=this.#e.get(t);r&&!r.deletedAt&&this.upsert({...r,deletedAt:n,updatedAt:n})}findMany(t,n,r){const o=r==="desc"?this.#n:this.#t,s=[];return t!==void 0&&s.push(a=>a.roomId===t),s.push(Xb(n)),Array.from(o.filter(a=>s.every(i=>i(a))))}};function ny(e,t){return zn([e,t??{}])}function ry(e){return zn(e??{})}function xh(e){if("status"in e)return e;const t=e;return t.status="pending",t.then(n=>{t.status="fulfilled",t.value=n},n=>{t.status="rejected",t.reason=n}),t}var oy=Promise.resolve(),Ha=class{#e;signal;#t;#n;constructor(e){this.#e=new zt(ys),this.#t=e,this.#n=null,this.signal=this.#e.asReadonly(),yu(this)}get(){return this.#e.get()}#r(e){const t=this.#e.get();t.data!==void 0&&this.#e.set(gr({...t.data,...e}))}async#s(){const e=this.#e.get();if(!(!e.data?.cursor||e.data.isFetchingMore)){this.#r({isFetchingMore:!0});try{const t=await this.#t(e.data.cursor);this.#r({cursor:t,hasFetchedAll:t===null,fetchMoreError:void 0,isFetchingMore:!1})}catch(t){this.#r({isFetchingMore:!1,fetchMoreError:t})}}}fetchMore(){return this.#e.get().data?.cursor?(this.#n||(this.#n=this.#s().finally(()=>{this.#n=null})),this.#n):oy}#o=null;waitUntilLoaded(){if(this.#o)return this.#o;const e=Yr(()=>this.#t(void 0),5,[5e3,5e3,1e4,15e3]),t=xh(e);return t.then(n=>{this.#e.set(gr({cursor:n,hasFetchedAll:n===null,isFetchingMore:!1,fetchMoreError:void 0,fetchMore:this.fetchMore}))},n=>{this.#e.set(wh(n)),setTimeout(()=>{this.#o=null,this.#e.set(ys)},5e3)}),this.#o=t,this.#o}},Wa=class{#e;signal;#t;constructor(e){this.#e=new zt(ys),this.signal=this.#e.asReadonly(),this.#t=e,yu(this)}get(){return this.#e.get()}#n=null;waitUntilLoaded(){if(this.#n)return this.#n;const e=Yr(()=>this.#t(),5,[5e3,5e3,1e4,15e3]),t=xh(e);return t.then(()=>{this.#e.set(gr(void 0))},n=>{this.#e.set(wh(n)),setTimeout(()=>{this.#n=null,this.#e.set(ys)},5e3)}),this.#n=t,t}};function sy(){const e=new Xn(new Map);function t(u,c){e.mutate(l=>{const d=l.get(u);return d?(l.set(u,{...d,readAt:c}),!0):!1})}function n(u){e.mutate(c=>{for(const l of c.values())l.readAt=u})}function r(u){e.mutate(c=>c.delete(u))}function o(){e.mutate(u=>u.clear())}function s(u,c){e.mutate(l=>{let d=!1;for(const m of u){const g=l.get(m.id);g&&my(g,m)===1||(l.set(m.id,m),d=!0)}for(const m of c)l.delete(m.id),d=!0;return d})}function a(u){e.mutate(c=>{const l=qb(c.values(),d=>d.kind==="thread"&&d.threadId===u.threadId);return l?(c.set(l.id,{...l,notifiedAt:u.createdAt,readAt:u.createdAt}),!0):!1})}function i(u){e.mutate(c=>{c.set(u.id,u)})}return{signal:e.asReadonly(),markAllRead:n,markRead:t,delete:r,applyDelta:s,clear:o,updateAssociatedNotification:a,upsert:i}}function ay(e){const t=new Xn(new Map);function n(r,o){t.mutate(s=>{s.set(r,o)})}return{signal:Xe.from(t,e,(r,o)=>hy(r,o)),update:n}}function iy(){const e=new Xn(new It(()=>new Map));function t(n,r){e.mutate(o=>{const s=o.getOrCreate(n);for(const a of r)s.set(a.id,a)})}return{signal:Xe.from(e,n=>Object.fromEntries([...n].map(([r,o])=>[r,Object.fromEntries(o)]))),update:t}}function uy(){const e=new Xn(new It(()=>new Set));function t(n){e.mutate(r=>{for(const[o,s]of Object.entries(n)){const a=r.getOrCreate(o);for(const i of s)a.add(i)}})}return{signal:e.asReadonly(),update:t}}function cy(e){const t=new zt(bs({}));function n(r){t.set(r)}return{signal:Xe.from(t,e,(r,o)=>py(r,o)),update:n}}function ly(e){const t=new zt([]),n=e[Oe].createSyncSource();t.subscribe(()=>n.setSyncStatus(t.get().length>0?"synchronizing":"synchronized"));function r(s){const a=Pr(),i={...s,id:a};return t.set(u=>[...u,i]),a}function o(s){t.set(a=>a.filter(i=>i.id!==s))}return{signal:t.asReadonly(),add:r,remove:o}}var fy=class{#e;threads;notifications;roomNotificationSettings;historyVersions;permissionHints;userNotificationSettings;optimisticUpdates;outputs;#t=null;#n;#r=new Map;#s=null;#o=new Map;#i;constructor(e){this.#e=e[Oe].as(),this.optimisticUpdates=ly(this.#e),this.permissionHints=uy(),this.#n=new Ha(async d=>{const m=await this.#e.getInboxNotifications({cursor:d});return this.updateThreadifications(m.threads,m.inboxNotifications),this.#t===null&&(this.#t=m.requestedAt),m.nextCursor});const t=async()=>{const d=await this.#e.getNotificationSettings();this.userNotificationSettings.update(d)};this.userNotificationSettings=cy(this.optimisticUpdates.signal),this.#i=new Wa(t),this.threads=new ty,this.notifications=sy(),this.roomNotificationSettings=ay(this.optimisticUpdates.signal),this.historyVersions=iy();const n=Xe.from(this.threads.signal,this.notifications.signal,this.optimisticUpdates.signal,(d,m,g)=>dy(d,m,g)),r=Xe.from(n,d=>d.threadsDB),o=Xe.from(n,d=>({sortedNotifications:d.sortedNotifications,notificationsById:d.notificationsById}),Bt),s=new It(d=>{const m=JSON.parse(d),g=new Ha(async v=>{const h=await this.#e[Oe].httpClient.getUserThreads_experimental({cursor:v,query:m});return this.updateThreadifications(h.threads,h.inboxNotifications),this.permissionHints.update(h.permissionHints),this.#s===null&&(this.#s=h.requestedAt),h.nextCursor});return{signal:Xe.from(()=>{const v=g.get();if(v.isLoading||v.error)return v;const h=this.outputs.threads.get().findMany(void 0,m??{},"desc"),E=v.data;return{isLoading:!1,threads:h,hasFetchedAll:E.hasFetchedAll,isFetchingMore:E.isFetchingMore,fetchMoreError:E.fetchMoreError,fetchMore:E.fetchMore}},hl),waitUntilLoaded:g.waitUntilLoaded}}),a=new It(d=>{const[m,g]=JSON.parse(d),C=new Ha(async h=>{const E=await this.#e[Oe].httpClient.getThreads({roomId:m,cursor:h,query:g});this.updateThreadifications(E.threads,E.inboxNotifications),this.permissionHints.update(E.permissionHints);const y=this.#r.get(m);return(y===void 0||y>E.requestedAt)&&this.#r.set(m,E.requestedAt),E.nextCursor});return{signal:Xe.from(()=>{const h=C.get();if(h.isLoading||h.error)return h;const E=this.outputs.threads.get().findMany(m,g??{},"asc"),y=h.data;return{isLoading:!1,threads:E,hasFetchedAll:y.hasFetchedAll,isFetchingMore:y.isFetchingMore,fetchMoreError:y.fetchMoreError,fetchMore:y.fetchMore}},hl),waitUntilLoaded:C.waitUntilLoaded}}),i={signal:Xe.from(()=>{const m=this.#n.get();if(m.isLoading||m.error)return m;const g=m.data;return{isLoading:!1,inboxNotifications:this.outputs.notifications.get().sortedNotifications,hasFetchedAll:g.hasFetchedAll,isFetchingMore:g.isFetchingMore,fetchMoreError:g.fetchMoreError,fetchMore:g.fetchMore}}),waitUntilLoaded:this.#n.waitUntilLoaded},u=new It(d=>{const m=new Wa(async()=>{const C=this.#e.getRoom(d);if(C===null)throw new Error(`Room '${d}' is not available on client`);const v=await C.getNotificationSettings();this.roomNotificationSettings.update(d,v)});return{signal:Xe.from(()=>{const C=m.get();return C.isLoading||C.error?C:gr("settings",pe(this.roomNotificationSettings.signal.get()[d]))},Bt),waitUntilLoaded:m.waitUntilLoaded}}),c=new It(d=>{const m=new Wa(async()=>{const C=this.#e.getRoom(d);if(C===null)throw new Error(`Room '${d}' is not available on client`);const v=await C[Oe].listTextVersions();this.historyVersions.update(d,v.versions);const h=this.#o.get(d);(h===void 0||h>v.requestedAt)&&this.#o.set(d,v.requestedAt)});return{signal:Xe.from(()=>{const C=m.get();return C.isLoading||C.error?C:gr("versions",Object.values(this.historyVersions.signal.get()[d]??{}))},Bt),waitUntilLoaded:m.waitUntilLoaded}}),l={signal:Xe.from(()=>{const d=this.#i.get();return d.isLoading||d.error?d:gr("settings",pe(this.userNotificationSettings.signal.get()))},Bt),waitUntilLoaded:this.#i.waitUntilLoaded};this.outputs={threadifications:n,threads:r,loadingRoomThreads:a,loadingUserThreads:s,notifications:o,loadingNotifications:i,settingsByRoomId:u,versionsByRoomId:c,userNotificationSettings:l},yu(this)}markInboxNotificationRead(e,t,n){ct(()=>{this.optimisticUpdates.remove(n),this.notifications.markRead(e,t)})}markAllInboxNotificationsRead(e,t){ct(()=>{this.optimisticUpdates.remove(e),this.notifications.markAllRead(t)})}deleteInboxNotification(e,t){ct(()=>{this.optimisticUpdates.remove(t),this.notifications.delete(e)})}deleteAllInboxNotifications(e){ct(()=>{this.optimisticUpdates.remove(e),this.notifications.clear()})}createThread(e,t){ct(()=>{this.optimisticUpdates.remove(e),this.threads.upsert(t)})}#a(e,t,n,r){ct(()=>{t!==null&&this.optimisticUpdates.remove(t);const o=this.threads,s=o.get(e);s&&(r&&s.updatedAt>r||o.upsert(n(s)))})}patchThread(e,t,n,r){return this.#a(e,t,o=>({...o,...Ao(n)}),r)}addReaction(e,t,n,r,o){this.#a(e,t,s=>Sh(s,n,r),o)}removeReaction(e,t,n,r,o,s){this.#a(e,t,a=>Th(a,n,r,o,s),s)}deleteThread(e,t){return this.#a(e,t,n=>({...n,updatedAt:new Date,deletedAt:new Date}))}createComment(e,t){ct(()=>{this.optimisticUpdates.remove(t);const n=this.threads.get(e.threadId);n&&(this.threads.upsert(Es(n,e)),this.notifications.updateAssociatedNotification(e))})}editComment(e,t,n){return this.#a(e,t,r=>Es(r,n))}deleteComment(e,t,n,r){return this.#a(e,t,o=>Oh(o,n,r),r)}updateThreadifications(e,t,n=[],r=[]){ct(()=>{this.threads.applyDelta(e,n),this.notifications.applyDelta(t,r)})}updateRoomNotificationSettings(e,t,n){ct(()=>{this.optimisticUpdates.remove(t),this.roomNotificationSettings.update(e,n)})}async fetchNotificationsDeltaUpdate(e){const t=this.#t;if(t===null)return;const n=await this.#e.getInboxNotificationsSince({since:t,signal:e});t<n.requestedAt&&(this.#t=n.requestedAt),this.updateThreadifications(n.threads.updated,n.inboxNotifications.updated,n.threads.deleted,n.inboxNotifications.deleted)}async fetchRoomThreadsDeltaUpdate(e,t){const n=this.#r.get(e);if(n===void 0)return;const r=await this.#e[Oe].httpClient.getThreadsSince({roomId:e,since:n,signal:t});this.updateThreadifications(r.threads.updated,r.inboxNotifications.updated,r.threads.deleted,r.inboxNotifications.deleted),this.permissionHints.update(r.permissionHints),n<r.requestedAt&&this.#r.set(e,r.requestedAt)}async fetchUserThreadsDeltaUpdate(e){const t=this.#s;if(t===null)return;const n=await this.#e[Oe].httpClient.getUserThreadsSince_experimental({since:t,signal:e});t<n.requestedAt&&(this.#t=n.requestedAt),this.updateThreadifications(n.threads.updated,n.inboxNotifications.updated,n.threads.deleted,n.inboxNotifications.deleted),this.permissionHints.update(n.permissionHints)}async fetchRoomVersionsDeltaUpdate(e,t){const n=this.#o.get(e);if(n===void 0)return;const o=await pe(this.#e.getRoom(e),`Room with id ${e} is not available on client`)[Oe].listTextVersionsSince({since:n,signal:t});this.historyVersions.update(e,o.versions),n<o.requestedAt&&this.#o.set(e,o.requestedAt)}async refreshRoomNotificationSettings(e,t){const r=await pe(this.#e.getRoom(e),`Room with id ${e} is not available on client`).getNotificationSettings({signal:t});this.roomNotificationSettings.update(e,r)}async refreshUserNotificationSettings(e){const t=await this.#e.getNotificationSettings({signal:e});this.userNotificationSettings.update(t)}updateUserNotificationSettings_confirmOptimisticUpdate(e,t){ct(()=>{this.optimisticUpdates.remove(t),this.userNotificationSettings.update(e)})}};function dy(e,t,n){const r=e.clone();let o=Object.fromEntries(t);for(const a of n)switch(a.type){case"create-thread":{r.upsert(a.thread);break}case"edit-thread-metadata":{const i=r.get(a.threadId);if(i===void 0||i.updatedAt>a.updatedAt)break;r.upsert({...i,updatedAt:a.updatedAt,metadata:{...i.metadata,...a.metadata}});break}case"mark-thread-as-resolved":{const i=r.get(a.threadId);if(i===void 0)break;r.upsert({...i,resolved:!0});break}case"mark-thread-as-unresolved":{const i=r.get(a.threadId);if(i===void 0)break;r.upsert({...i,resolved:!1});break}case"create-comment":{const i=r.get(a.comment.threadId);if(i===void 0)break;r.upsert(Es(i,a.comment));const u=Object.values(o).find(c=>c.kind==="thread"&&c.threadId===i.id);if(u===void 0)break;o[u.id]={...u,notifiedAt:a.comment.createdAt,readAt:a.comment.createdAt};break}case"edit-comment":{const i=r.get(a.comment.threadId);if(i===void 0)break;r.upsert(Es(i,a.comment));break}case"delete-comment":{const i=r.get(a.threadId);if(i===void 0)break;r.upsert(Oh(i,a.commentId,a.deletedAt));break}case"delete-thread":{const i=r.get(a.threadId);if(i===void 0)break;r.upsert({...i,deletedAt:a.deletedAt,updatedAt:a.deletedAt,comments:[]});break}case"add-reaction":{const i=r.get(a.threadId);if(i===void 0)break;r.upsert(Sh(i,a.commentId,a.reaction));break}case"remove-reaction":{const i=r.get(a.threadId);if(i===void 0)break;r.upsert(Th(i,a.commentId,a.emoji,a.userId,a.removedAt));break}case"mark-inbox-notification-as-read":{const i=o[a.inboxNotificationId];if(i===void 0)break;o[a.inboxNotificationId]={...i,readAt:a.readAt};break}case"mark-all-inbox-notifications-as-read":{for(const i in o){const u=o[i];if(u===void 0)break;o[i]={...u,readAt:a.readAt}}break}case"delete-inbox-notification":{delete o[a.inboxNotificationId];break}case"delete-all-inbox-notifications":{o={};break}}return{sortedNotifications:Object.values(o).filter(a=>a.kind==="thread"?r.get(a.threadId)!==void 0:!0).sort((a,i)=>i.notifiedAt.getTime()-a.notifiedAt.getTime()),notificationsById:o,threadsDB:r}}function hy(e,t){const n=Object.fromEntries(e);for(const r of t)switch(r.type){case"update-notification-settings":{const o=n[r.roomId];if(o===void 0)break;n[r.roomId]={...o,...r.settings}}}return n}function py(e,t){let n=e;for(const r of t)r.type==="update-user-notification-settings"&&(n=IC(n,r.settings));return n}function my(e,t){return e.notifiedAt>t.notifiedAt?1:e.notifiedAt<t.notifiedAt?-1:e.readAt&&t.readAt?e.readAt>t.readAt?1:e.readAt<t.readAt?-1:0:e.readAt||t.readAt?e.readAt?1:-1:0}function Es(e,t){if(e.deletedAt!==void 0)return e;if(t.threadId!==e.id)return Cn.warn(`Comment ${t.id} does not belong to thread ${e.id}`),e;const n=e.comments.find(r=>r.id===t.id);if(n===void 0){const r=new Date(Math.max(e.updatedAt.getTime(),t.createdAt.getTime()));return{...e,updatedAt:r,comments:[...e.comments,t]}}if(n.deletedAt!==void 0)return e;if(n.editedAt===void 0||t.editedAt===void 0||n.editedAt<=t.editedAt){const r=e.comments.map(s=>s.id===t.id?t:s);return{...e,updatedAt:new Date(Math.max(e.updatedAt.getTime(),t.editedAt?.getTime()||t.createdAt.getTime())),comments:r}}return e}function Oh(e,t,n){if(e.deletedAt!==void 0)return e;const r=e.comments.find(s=>s.id===t);if(r===void 0||r.deletedAt!==void 0)return e;const o=e.comments.map(s=>s.id===t?{...s,deletedAt:n,body:void 0,attachments:[]}:s);return o.every(s=>s.deletedAt!==void 0)?{...e,deletedAt:n,updatedAt:n}:{...e,updatedAt:n,comments:o}}function Sh(e,t,n){if(e.deletedAt!==void 0)return e;const r=e.comments.find(s=>s.id===t);if(r===void 0||r.deletedAt!==void 0)return e;const o=e.comments.map(s=>s.id===t?{...s,reactions:vy(s.reactions,n)}:s);return{...e,updatedAt:new Date(Math.max(n.createdAt.getTime(),e.updatedAt.getTime())),comments:o}}function Th(e,t,n,r,o){if(e.deletedAt!==void 0)return e;const s=e.comments.find(i=>i.id===t);if(s===void 0||s.deletedAt!==void 0)return e;const a=e.comments.map(i=>i.id===t?{...i,reactions:i.reactions.map(u=>u.emoji===n?{...u,users:u.users.filter(c=>c.id!==r)}:u).filter(u=>u.users.length>0)}:i);return{...e,updatedAt:new Date(Math.max(o.getTime(),e.updatedAt.getTime())),comments:a}}function vy(e,t){const n=e.find(r=>r.emoji===t.emoji);return n===void 0?[...e,{emoji:t.emoji,createdAt:t.createdAt,users:[{id:t.userId}]}]:n.users.some(r=>r.id===t.userId)===!1?e.map(r=>r.emoji===t.emoji?{...r,users:[...r.users,{id:t.userId}]}:r):e}var Rh=f.createContext(null);function Ih(e){return new Error(`resolveUsers didn't return anything for user '${e}'`)}function gy(e){return new Error(`resolveRoomsInfo didn't return anything for room '${e}'`)}function Cy(e){return e}var pl=new WeakMap,ml=new WeakMap;function by(e,t){return e===void 0||e?.isLoading?e??{isLoading:!0}:e.error?e:e.data?{isLoading:!1,user:e.data}:{isLoading:!1,error:Ih(t)}}function yy(e,t){return e===void 0||e?.isLoading?e??{isLoading:!0}:e.error?e:e.data?{isLoading:!1,info:e.data}:{isLoading:!1,error:gy(t)}}function Bh(e){let t=pl.get(e);return t||(t=new fy(e),pl.set(e,t)),t}function xo(e){let t=ml.get(e);return t||(t=Ey(e),ml.set(e,t)),t}function Ey(e){const t=Bh(e),n=vr(async s=>{try{return await t.fetchNotificationsDeltaUpdate(s)}catch(a){throw console.warn(`Polling new inbox notifications failed: ${String(a)}`),a}},yt.NOTIFICATIONS_POLL_INTERVAL,{maxStaleTimeMs:yt.NOTIFICATIONS_MAX_STALE_TIME}),r=vr(async s=>{try{return await t.fetchUserThreadsDeltaUpdate(s)}catch(a){throw console.warn(`Polling new user threads failed: ${String(a)}`),a}},yt.USER_THREADS_POLL_INTERVAL,{maxStaleTimeMs:yt.USER_THREADS_MAX_STALE_TIME}),o=vr(async s=>{try{return await t.refreshUserNotificationSettings(s)}catch(a){throw console.warn(`Polling new user notification settings failed: ${String(a)}`),a}},yt.USER_NOTIFICATION_SETTINGS_INTERVAL,{maxStaleTimeMs:yt.USER_NOTIFICATION_SETTINGS_MAX_STALE_TIME});return{store:t,notificationsPoller:n,userThreadsPoller:r,userNotificationSettingsPoller:o}}function Dy(e,t,n){const{store:r,notificationsPoller:o}=xo(e);return f.useEffect(()=>void r.outputs.loadingNotifications.waitUntilLoaded()),f.useEffect(()=>(o.inc(),o.pollNowIfStale(),()=>{o.dec()}),[o]),Jn(r.outputs.loadingNotifications.signal,t,n)}function wy(e){return f.useCallback(t=>{const{store:n}=xo(e),r=new Date,o=n.optimisticUpdates.add({type:"mark-inbox-notification-as-read",inboxNotificationId:t,readAt:r});e.markInboxNotificationAsRead(t).then(()=>{n.markInboxNotificationRead(t,r,o)},s=>{n.optimisticUpdates.remove(o),e[Oe].emitError({type:"MARK_INBOX_NOTIFICATION_AS_READ_ERROR",inboxNotificationId:t},s)})},[e])}function Ay(e){return f.useCallback(t=>{const{store:n}=xo(e),r=new Date,o=n.optimisticUpdates.add({type:"delete-inbox-notification",inboxNotificationId:t,deletedAt:r});e.deleteInboxNotification(t).then(()=>{n.deleteInboxNotification(t,o)},s=>{n.optimisticUpdates.remove(o),e[Oe].emitError({type:"DELETE_INBOX_NOTIFICATION_ERROR",inboxNotificationId:t},s)})},[e])}function xy(e,t){const{store:n}=xo(e);return Jn(n.outputs.threadifications,f.useCallback(r=>{const o=r.notificationsById[t]??wt(`Inbox notification with ID "${t}" not found`);return o.kind!=="thread"&&wt(`Inbox notification with ID "${t}" is not of kind "thread"`),r.threadsDB.get(o.threadId)??wt(`Thread with ID "${o.threadId}" not found, this inbox notification might not be of kind "thread"`)},[t]))}function Oy(e,t){const n=e[Oe].usersStore,r=f.useCallback(()=>n.getItemState(t),[n,t]),o=f.useCallback(a=>by(a,t),[t]),s=Ws(n.subscribe,r,r,o,Bt);return f.useEffect(()=>void n.enqueue(t)),s}function Sy(e,t){const n=e[Oe].usersStore,r=f.useCallback(()=>n.getItemState(t),[n,t]),o=r();if(!o||o.isLoading)throw n.enqueue(t);if(o.error)throw o.error;if(!o.data)throw Ih(t);const s=f.useSyncExternalStore(n.subscribe,r,r);return s.isLoading,s.error,{isLoading:!1,user:s.data,error:void 0}}function Ty(e,t){const n=e[Oe].roomsInfoStore,r=f.useCallback(()=>n.getItemState(t),[n,t]),o=f.useCallback(a=>yy(a,t),[t]),s=Ws(n.subscribe,r,r,o,Bt);return f.useEffect(()=>void n.enqueue(t)),s}function Ry(e){const t=Eu();if(!e?.allowNesting&&t!==null)throw new Error("You cannot nest multiple LiveblocksProvider instances in the same React tree.")}function Eu(){return f.useContext(Rh)}function Be(){return Eu()??wt("LiveblocksProvider is missing from the React tree.")}function Iy(e){return Ry(e),p.jsx(Rh.Provider,{value:e.client,children:e.children})}function hP(e){const{children:t,...n}=e,r={publicApiKey:ut(n.publicApiKey),throttle:ut(n.throttle),lostConnectionTimeout:ut(n.lostConnectionTimeout),backgroundKeepAliveTimeout:ut(n.backgroundKeepAliveTimeout),polyfills:ut(n.polyfills),largeMessageStrategy:ut(n.largeMessageStrategy),unstable_fallbackToHTTP:ut(n.unstable_fallbackToHTTP),unstable_streamData:ut(n.unstable_streamData),preventUnsavedChanges:ut(n.preventUnsavedChanges),authEndpoint:Vo(n.authEndpoint),resolveMentionSuggestions:Vo(n.resolveMentionSuggestions),resolveUsers:Vo(n.resolveUsers),resolveRoomsInfo:Vo(n.resolveRoomsInfo),baseUrl:ut(n.baseUrl),enableDebugLogging:ut(n.enableDebugLogging)},o=f.useMemo(()=>xb(r),[]);return p.jsx(Iy,{client:o,children:t})}function By(e={}){const t=Be(),{store:n,userThreadsPoller:r}=xo(t),o=ry(e.query);return f.useEffect(()=>void n.outputs.loadingUserThreads.getOrCreate(o).waitUntilLoaded()),f.useEffect(()=>(r.inc(),r.pollNowIfStale(),()=>{r.dec()}),[r]),Jn(n.outputs.loadingUserThreads.getOrCreate(o).signal)}function pP(){return Dy(Be(),Cy,Bt)}function Fy(e){return xy(Be(),e)}function Py(){return wy(Be())}function Ny(){return Ay(Be())}function ky(e){const t=Be();return Oy(t,e)}function jy(e){const t=Be();return Sy(t,e)}function Du(e){return Ty(Be(),e)}var My=Fy,Fh=ky,mP=jy,vP=By;function _y(e,t){if(e===!1||!t.threads||!(typeof window<"u"))return;const o=window.location.hash.slice(1);if(!o.startsWith("cm_"))return;const s=document.getElementById(o);s===null||!t.threads.flatMap(u=>u.comments).some(u=>u.id===o)||s.scrollIntoView()}function Ly(e,t){f.useEffect(()=>{_y(e,t)},[t.isLoading])}function zs(e){const t=e[Oe].currentUserId.get();return t===void 0?"anonymous":t}var vl=new WeakMap;function vt(e){let t=vl.get(e);return t||(t=$y(e),vl.set(e,t)),t}function $y(e){const t=Bh(e);function n(a,i,u){if(t.optimisticUpdates.remove(a),u instanceof Ar){if(u.status===403){const c=[u.message,u.details?.suggestion,u.details?.docs].filter(Boolean).join(`
3
3
  `);Cn.error(c)}e[Oe].emitError(i,u)}else throw u}const r=new It(a=>vr(async i=>{try{return await t.fetchRoomThreadsDeltaUpdate(a,i)}catch(u){throw Cn.warn(`Polling new threads for '${a}' failed: ${String(u)}`),u}},yt.ROOM_THREADS_POLL_INTERVAL,{maxStaleTimeMs:yt.ROOM_THREADS_MAX_STALE_TIME})),o=new It(a=>vr(async i=>{try{return await t.fetchRoomVersionsDeltaUpdate(a,i)}catch(u){throw Cn.warn(`Polling new history versions for '${a}' failed: ${String(u)}`),u}},yt.HISTORY_VERSIONS_POLL_INTERVAL,{maxStaleTimeMs:yt.HISTORY_VERSIONS_MAX_STALE_TIME})),s=new It(a=>vr(async i=>{try{return await t.refreshRoomNotificationSettings(a,i)}catch(u){throw Cn.warn(`Polling notification settings for '${a}' failed: ${String(u)}`),u}},yt.NOTIFICATION_SETTINGS_POLL_INTERVAL,{maxStaleTimeMs:yt.NOTIFICATION_SETTINGS_MAX_STALE_TIME}));return{store:t,onMutationFailure:n,getOrCreateThreadsPollerForRoomId:r.getOrCreate.bind(r),getOrCreateVersionsPollerForRoomId:o.getOrCreate.bind(o),getOrCreateNotificationsSettingsPollerForRoomId:s.getOrCreate.bind(s)}}function Uy(e){const t=Be(),[n]=f.useState(()=>new Map),r=f.useCallback((o,s)=>{const a=n.get(o);if(a)return a;const i=t.enterRoom(o,s),u=i.leave;return i.leave=()=>{u(),n.delete(o)},n.set(o,i),i},[t,n]);return p.jsx(Hy,{...e,stableEnterRoom:r})}function Hy(e){const t=Be(),{id:n,stableEnterRoom:r}=e,o=ut({initialPresence:e.initialPresence,initialStorage:e.initialStorage,autoConnect:e.autoConnect??typeof window<"u"}),[{room:s},a]=f.useState(()=>r(n,{...o,autoConnect:!1}));return f.useEffect(()=>{const{store:i}=vt(t);async function u(c){if(c.type===Zt.THREAD_DELETED){i.deleteThread(c.threadId,null);return}const l=await s.getThread(c.threadId);if(!l.thread){i.deleteThread(c.threadId,null);return}const{thread:d,inboxNotification:m}=l,g=i.outputs.threads.get().getEvenIfDeleted(c.threadId);switch(c.type){case Zt.COMMENT_EDITED:case Zt.THREAD_METADATA_UPDATED:case Zt.THREAD_UPDATED:case Zt.COMMENT_REACTION_ADDED:case Zt.COMMENT_REACTION_REMOVED:case Zt.COMMENT_DELETED:if(!g)break;i.updateThreadifications([d],m?[m]:[]);break;case Zt.COMMENT_CREATED:i.updateThreadifications([d],m?[m]:[]);break}}return s.events.comments.subscribe(c=>void u(c))},[t,s]),f.useEffect(()=>{const i=r(n,o);a(i);const{room:u,leave:c}=i;return o.autoConnect&&u.connect(),()=>{c()}},[n,o,r]),p.jsx(Dh.Provider,{value:s,children:e.children})}function wu(e){const t=zb();if(t===null&&!e?.allowOutsideRoom)throw new Error("RoomProvider is missing from the React tree.");return t}function Au(){return Be()[Oe].resolveMentionSuggestions}function Wy(){return Be()[Oe].mentionSuggestionsCache}function zy(e={}){const{scrollOnLoad:t=!0}=e,n=Be(),r=wu(),{store:o,getOrCreateThreadsPollerForRoomId:s}=vt(n),a=ny(r.id,e.query),i=s(r.id);f.useEffect(()=>void o.outputs.loadingRoomThreads.getOrCreate(a).waitUntilLoaded()),f.useEffect(()=>(i.inc(),i.pollNowIfStale(),()=>i.dec()),[i]);const u=Jn(o.outputs.loadingRoomThreads.getOrCreate(a).signal);return Ly(t,u),u}function Vy(){return Ph(wu().id)}function Ph(e){const t=Be();return f.useCallback(n=>{const r=n.body,o=n.metadata??{},s=n.attachments,a=oh(),i=Cs(),u=new Date,c={id:i,threadId:a,roomId:e,createdAt:u,type:"comment",userId:zs(t),body:r,reactions:[],attachments:s??[]},l={id:a,type:"thread",createdAt:u,updatedAt:u,roomId:e,metadata:o,comments:[c],resolved:!1},{store:d,onMutationFailure:m}=vt(t),g=d.optimisticUpdates.add({type:"create-thread",thread:l,roomId:e}),C=s?.map(v=>v.id);return t[Oe].httpClient.createThread({roomId:e,threadId:a,commentId:i,body:r,metadata:o,attachmentIds:C}).then(v=>{d.createThread(g,v)},v=>m(g,{type:"CREATE_THREAD_ERROR",roomId:e,threadId:a,commentId:i,body:r,metadata:o},v)),l},[t,e])}function Ky(e){const t=Be();return f.useCallback(({threadId:n,body:r,attachments:o})=>{const s=Cs(),i={id:s,threadId:n,roomId:e,type:"comment",createdAt:new Date,userId:zs(t),body:r,reactions:[],attachments:o??[]},{store:u,onMutationFailure:c}=vt(t),l=u.optimisticUpdates.add({type:"create-comment",comment:i}),d=o?.map(m=>m.id);return t[Oe].httpClient.createComment({roomId:e,threadId:n,commentId:s,body:r,attachmentIds:d}).then(m=>{u.createComment(m,l)},m=>c(l,{type:"CREATE_COMMENT_ERROR",roomId:e,threadId:n,commentId:s,body:r},m)),i},[t,e])}function Nh(e){const t=Be();return f.useCallback(({threadId:n,commentId:r,body:o,attachments:s})=>{const a=new Date,{store:i,onMutationFailure:u}=vt(t),c=i.outputs.threads.get().getEvenIfDeleted(n);if(c===void 0){Cn.warn(`Internal unexpected behavior. Cannot edit comment in thread "${n}" because the thread does not exist in the cache.`);return}const l=c.comments.find(g=>g.id===r);if(l===void 0||l.deletedAt!==void 0){Cn.warn(`Internal unexpected behavior. Cannot edit comment "${r}" in thread "${n}" because the comment does not exist in the cache.`);return}const d=i.optimisticUpdates.add({type:"edit-comment",comment:{...l,editedAt:a,body:o,attachments:s??[]}}),m=s?.map(g=>g.id);t[Oe].httpClient.editComment({roomId:e,threadId:n,commentId:r,body:o,attachmentIds:m}).then(g=>{i.editComment(n,d,g)},g=>u(d,{type:"EDIT_COMMENT_ERROR",roomId:e,threadId:n,commentId:r,body:o},g))},[t,e])}function qy(e){const t=Be();return f.useCallback(({threadId:n,commentId:r})=>{const o=new Date,{store:s,onMutationFailure:a}=vt(t),i=s.optimisticUpdates.add({type:"delete-comment",threadId:n,commentId:r,deletedAt:o,roomId:e});t[Oe].httpClient.deleteComment({roomId:e,threadId:n,commentId:r}).then(()=>{s.deleteComment(n,i,r,o)},u=>a(i,{type:"DELETE_COMMENT_ERROR",roomId:e,threadId:n,commentId:r},u))},[t,e])}function kh(e){const t=Be();return f.useCallback(({threadId:n,commentId:r,emoji:o})=>{const s=new Date,a=zs(t),{store:i,onMutationFailure:u}=vt(t),c=i.optimisticUpdates.add({type:"add-reaction",threadId:n,commentId:r,reaction:{emoji:o,userId:a,createdAt:s}});t[Oe].httpClient.addReaction({roomId:e,threadId:n,commentId:r,emoji:o}).then(l=>{i.addReaction(n,c,r,l,s)},l=>u(c,{type:"ADD_REACTION_ERROR",roomId:e,threadId:n,commentId:r,emoji:o},l))},[t,e])}function jh(e){const t=Be();return f.useCallback(({threadId:n,commentId:r,emoji:o})=>{const s=zs(t),a=new Date,{store:i,onMutationFailure:u}=vt(t),c=i.optimisticUpdates.add({type:"remove-reaction",threadId:n,commentId:r,emoji:o,userId:s,removedAt:a});t[Oe].httpClient.removeReaction({roomId:e,threadId:n,commentId:r,emoji:o}).then(()=>{i.removeReaction(n,c,r,o,s,a)},l=>u(c,{type:"REMOVE_REACTION_ERROR",roomId:e,threadId:n,commentId:r,emoji:o},l))},[t,e])}function Gy(e){const t=Be();return f.useCallback(n=>{const{store:r,onMutationFailure:o}=vt(t),s=Object.values(r.outputs.notifications.get().notificationsById).find(u=>u.kind==="thread"&&u.threadId===n);if(!s)return;const a=new Date,i=r.optimisticUpdates.add({type:"mark-inbox-notification-as-read",inboxNotificationId:s.id,readAt:a});t[Oe].httpClient.markRoomInboxNotificationAsRead({roomId:e,inboxNotificationId:s.id}).then(()=>{r.markInboxNotificationRead(s.id,a,i)},u=>{o(i,{type:"MARK_INBOX_NOTIFICATION_AS_READ_ERROR",roomId:e,inboxNotificationId:s.id},u)})},[t,e])}function Yy(e){const t=Be();return f.useCallback(n=>{const r=new Date,{store:o,onMutationFailure:s}=vt(t),a=o.optimisticUpdates.add({type:"mark-thread-as-resolved",threadId:n,updatedAt:r});t[Oe].httpClient.markThreadAsResolved({roomId:e,threadId:n}).then(()=>{o.patchThread(n,a,{resolved:!0},r)},i=>s(a,{type:"MARK_THREAD_AS_RESOLVED_ERROR",roomId:e,threadId:n},i))},[t,e])}function Xy(e){const t=Be();return f.useCallback(n=>{const r=new Date,{store:o,onMutationFailure:s}=vt(t),a=o.optimisticUpdates.add({type:"mark-thread-as-unresolved",threadId:n,updatedAt:r});t[Oe].httpClient.markThreadAsUnresolved({roomId:e,threadId:n}).then(()=>{o.patchThread(n,a,{resolved:!1},r)},i=>s(a,{type:"MARK_THREAD_AS_UNRESOLVED_ERROR",roomId:e,threadId:n},i))},[t,e])}function Zy(e){const t=Be(),{store:n}=vt(t),r=n.outputs.threadifications,o=f.useCallback(s=>{const a=s.sortedNotifications.find(u=>u.kind==="thread"&&u.threadId===e),i=s.threadsDB.get(e);return a===void 0||i===void 0?{status:"not-subscribed"}:{status:"subscribed",unreadSince:a.readAt}},[e]);return Jn(r,o,Bt)}function Jy(e){return e===void 0||e?.isLoading?e??{isLoading:!0}:e.error?e:(e.data,{isLoading:!1,url:e.data})}function Vs(e,t){const r=Be()[Oe].httpClient.getOrCreateAttachmentUrlsStore(t),o=f.useCallback(()=>r.getItemState(e),[r,e]);return f.useEffect(()=>{r.enqueue(e)},[r,e]),Ws(r.subscribe,o,o,Jy,Bt)}var Qy=new Set;function eE(e){const t=Be(),n=vt(t).store;return Jn(n.permissionHints.signal,r=>r.get(e)??Qy)}var gP=Uy,Mh=wu,CP=Vy,bP=zy;du(T0,R0,I0);var Vt=typeof window<"u"?f.useLayoutEffect:f.useEffect,gl=500;function tE(e,t){const[n,r]=f.useState(),o=f.useRef(),s=Au(),a=Wy();return f.useEffect(()=>{if(t===void 0||!s)return;const i={text:t,roomId:e},u=zn(i);let c,l=!1;const d=async()=>{try{o.current=performance.now();const m=await s(i);l||(r(m),a.set(u,m))}catch(m){console.error(m?.message)}};return a.has(u)?r(a.get(u)):!o.current||Math.abs(performance.now()-o.current)>gl?d():c=window.setTimeout(()=>{d()},gl),()=>{l=!0,window.clearTimeout(c)}},[t,e,s,a]),n}function nE(){const t=Be()[Oe].createSyncSource,[n,r]=f.useState();return f.useEffect(()=>{const o=t();return r(o),()=>o.destroy()},[t]),n}function ve(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function kt(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>t.current?.(...n),[])}function Oo({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=rE({defaultProp:t,onChange:n}),s=e!==void 0,a=s?e:r,i=kt(n),u=f.useCallback(c=>{if(s){const d=typeof c=="function"?c(e):c;d!==e&&i(d)}else o(c)},[s,e,o,i]);return[a,u]}function rE({defaultProp:e,onChange:t}){const n=f.useState(e),[r]=n,o=f.useRef(r),s=kt(t);return f.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}function oE(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ks(...e){return t=>e.forEach(n=>oE(n,t))}function Ke(...e){return f.useCallback(Ks(...e),e)}var Ne=f.forwardRef((e,t)=>{const{children:n,...r}=e,o=f.Children.toArray(n),s=o.find(sE);if(s){const a=s.props.children,i=o.map(u=>u===s?f.Children.count(a)>1?f.Children.only(null):f.isValidElement(a)?a.props.children:null:u);return p.jsx(Bi,{...r,ref:t,children:f.isValidElement(a)?f.cloneElement(a,void 0,i):null})}return p.jsx(Bi,{...r,ref:t,children:n})});Ne.displayName="Slot";var Bi=f.forwardRef((e,t)=>{const{children:n,...r}=e;if(f.isValidElement(n)){const o=iE(n);return f.cloneElement(n,{...aE(r,n.props),ref:t?Ks(t,o):o})}return f.Children.count(n)>1?f.Children.only(null):null});Bi.displayName="SlotClone";var xu=({children:e})=>p.jsx(p.Fragment,{children:e});function sE(e){return f.isValidElement(e)&&e.type===xu}function aE(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{s(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function iE(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var uE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],He=uE.reduce((e,t)=>{const n=f.forwardRef((r,o)=>{const{asChild:s,...a}=r,i=s?Ne:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(i,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function _h(e,t){e&&Ls.flushSync(()=>e.dispatchEvent(t))}var cE="Toggle",Lh=f.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...s}=e,[a=!1,i]=Oo({prop:n,onChange:o,defaultProp:r});return p.jsx(He.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:ve(e.onClick,()=>{e.disabled||i(!a)})})});Lh.displayName=cE;var Ou=Lh;function Ae(...e){return e.filter(t=>typeof t=="string"||typeof t=="number").join(" ")}const Cl=20,bl=20;function Ue({children:e,className:t,...n}){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:Cl,height:bl,viewBox:`0 0 ${Cl} ${bl}`,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",role:"presentation",className:Ae("lb-icon",t),...n,children:e})}function $h(e){return p.jsx(Ue,{...e,children:p.jsx("path",{d:"M16 6L8 14L4 10"})})}function Su(e){return p.jsxs(Ue,{...e,children:[p.jsx("path",{d:"M15 5L5 15"}),p.jsx("path",{d:"M5 5L15 15"})]})}function Uh(e){return p.jsx(Ue,{...e,children:p.jsx("path",{d:"M4.5 6.5h11M14 6.5V14a1.5 1.5 0 0 1-1.5 1.5h-5A1.5 1.5 0 0 1 6 14V6.5M7.5 6.5V5a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1.5"})})}function lE(e){return p.jsx(Ue,{...e,children:p.jsx("path",{d:"m11.784 5.797-6.13 6.138a4 4 0 0 0-1.03 1.775L4 16l2.285-.624a4 4 0 0 0 1.776-1.032l6.145-6.152m-2.422-2.395 1.244-1.246c.608-.608 1.826-.81 2.53-.104.7.7.499 1.893-.122 2.515l-1.23 1.23m-2.422-2.395 2.422 2.395"})})}function Hh(e){return p.jsxs(Ue,{fill:"currentColor",...e,children:[p.jsx("circle",{cx:5,cy:10,r:.75}),p.jsx("circle",{cx:10,cy:10,r:.75}),p.jsx("circle",{cx:15,cy:10,r:.75})]})}function yl(e){return p.jsxs(Ue,{...e,children:[p.jsx("path",{d:"M11 3.07A7 7 0 1 0 16.93 9"}),p.jsx("path",{d:"M7.5 11.5S8.25 13 10 13s2.5-1.5 2.5-1.5M8 8h0"}),p.jsx("path",{d:"M12 8h0"}),p.jsx("path",{d:"M13 5h4m-2-2v4"}),p.jsx("circle",{cx:"8",cy:"8",r:".25"}),p.jsx("circle",{cx:"12",cy:"8",r:".25"})]})}const So=6,qs=10,fE="'Apple Color Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', 'Android Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', EmojiSymbols, sans-serif",dE=f.forwardRef(({emoji:e,style:t,asChild:n,...r},o)=>{const s=n?Ne:"span";return p.jsx(s,{role:"img","aria-label":e,"data-emoji":e,style:{...t,fontFamily:fE,display:"inline-flex",alignItems:"center",justifyContent:"center",width:"1em",whiteSpace:"nowrap"},...r,ref:o,children:e})}),Tu=f.forwardRef(({className:e,...t},n)=>p.jsx(dE,{className:Ae("lb-emoji",e),...t,ref:n}));function za(e,t,n){return e===1?t:n??`${t}s`}const hE={locale:"en",dir:"ltr",USER_SELF:"you",USER_UNKNOWN:"Anonymous",LIST_REMAINING:e=>`${e} more`,LIST_REMAINING_USERS:e=>`${e} ${za(e,"other")}`,LIST_REMAINING_COMMENTS:e=>`${e} more ${za(e,"comment")}`,EMOJI_PICKER_SEARCH_PLACEHOLDER:"Search…",EMOJI_PICKER_EMPTY:"No emoji found.",EMOJI_PICKER_ERROR:()=>"There was an error while getting the list of emoji.",EMOJI_PICKER_CHANGE_SKIN_TONE:"Change skin tone",ATTACHMENT_TOO_LARGE:e=>e?`The file is larger than ${e}`:"The file is too large",ATTACHMENT_ERROR:()=>"The file couldn’t be uploaded.",COMPOSER_INSERT_MENTION:"Mention someone",COMPOSER_INSERT_EMOJI:"Add emoji",COMPOSER_ATTACH_FILES:"Attach files",COMPOSER_REMOVE_ATTACHMENT:"Remove attachment",COMPOSER_PLACEHOLDER:"Write a comment…",COMPOSER_SEND:"Send",COMPOSER_TOGGLE_MARK:e=>{switch(e){case"bold":return"Bold";case"italic":return"Italic";case"strikethrough":return"Strikethrough";case"code":return"Inline code";default:return lt(e,"Unexpected mark")}},COMMENT_EDITED:"(edited)",COMMENT_DELETED:"This comment has been deleted.",COMMENT_MORE:"More",COMMENT_EDIT:"Edit comment",COMMENT_EDIT_COMPOSER_PLACEHOLDER:"Edit comment…",COMMENT_EDIT_COMPOSER_CANCEL:"Cancel",COMMENT_EDIT_COMPOSER_SAVE:"Save",COMMENT_DELETE:"Delete comment",COMMENT_DELETE_ATTACHMENT:"Delete attachment",COMMENT_ADD_REACTION:"Add reaction",COMMENT_REACTION_LIST:(e,t)=>p.jsxs(p.Fragment,{children:[e," reacted with ",p.jsx(Tu,{emoji:t})]}),COMMENT_REACTION_DESCRIPTION:(e,t)=>`${t} ${za(t,"reaction")}, react with ${e}`,THREAD_RESOLVE:"Resolve thread",THREAD_UNRESOLVE:"Re-open thread",THREAD_NEW_INDICATOR:"New",THREAD_NEW_INDICATOR_DESCRIPTION:"New comments",THREAD_COMPOSER_PLACEHOLDER:"Reply to thread…",THREAD_COMPOSER_SEND:"Reply",INBOX_NOTIFICATION_MORE:"More",INBOX_NOTIFICATION_MARK_AS_READ:"Mark as read",INBOX_NOTIFICATION_DELETE:"Delete notification",INBOX_NOTIFICATION_THREAD_COMMENTS_LIST:(e,t)=>p.jsxs(p.Fragment,{children:[e," commented",t?p.jsxs(p.Fragment,{children:[" in ",t]}):p.jsx(p.Fragment,{children:" in a thread"})]}),INBOX_NOTIFICATION_THREAD_MENTION:(e,t)=>p.jsxs(p.Fragment,{children:[e," mentioned you",t?p.jsxs(p.Fragment,{children:[" in ",t]}):null]}),INBOX_NOTIFICATION_TEXT_MENTION:(e,t)=>p.jsxs(p.Fragment,{children:[e," mentioned you",t?p.jsxs(p.Fragment,{children:[" in ",t]}):null]}),HISTORY_VERSION_PREVIEW_AUTHORS_LIST:e=>p.jsxs(p.Fragment,{children:["Edits from ",e]}),HISTORY_VERSION_PREVIEW_RESTORE:"Restore",HISTORY_VERSION_PREVIEW_EMPTY:"No content.",HISTORY_VERSION_PREVIEW_ERROR:()=>"There was an error while getting this version."},pE=f.createContext(void 0);function Ze(e){const t=f.useContext(pE);return f.useMemo(()=>({...hE,...t,...e}),[t,e])}/*!
4
4
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
@@ -1,4 +1,4 @@
1
- import{c as Jr}from"./vendor-CnQcJ2Lu.js";var jt={exports:{}};/**
1
+ import{c as Jr}from"./vendor-rkTZJa59.js";var jt={exports:{}};/**
2
2
  * @license
3
3
  * Lodash <https://lodash.com/>
4
4
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
@@ -1 +1 @@
1
- import{W as a}from"./CollapsableReportTable-NSlKGCNZ-DKKIVw3S.js";function r({title:e,balances:n,config:t,nodeId:i}){return{children:[],id:i??a("loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"loading_in_progress",title:e,data:n,numOfBalances:n.length},config:t}}}export{r as d};
1
+ import{W as a}from"./CollapsableReportTable-ULd7PQST-DRS_mwem.js";function r({title:e,balances:n,config:t,nodeId:i}){return{children:[],id:i??a("loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"loading_in_progress",title:e,data:n,numOfBalances:n.length},config:t}}}export{r as d};
@@ -1 +1 @@
1
- import{W as m,x as N}from"./CollapsableReportTable-NSlKGCNZ-DKKIVw3S.js";import"./index-DjfQ_8_G.js";function D({calculatedSection:t,numOfBalances:c,title:n,isLastNode:i,config:r}){return{children:[],id:m("calculated_section",[],n),isLastNode:i,reportElementData:{element:{kind:"calculated_section",title:n,data:t,numOfBalances:c},config:r}}}function B({account:t,numOfBalances:c,title:n,config:i,parentNodeIDs:r,ancestorMetadata:e}){return{children:[],id:m("ac_subentity_total",r,t.account.accountId),isLastNode:!1,reportElementData:{element:{kind:"ac_subentity_total",title:n,data:t,numOfBalances:c,metadata:e},config:i}}}function g({account:t,sectionType:c,numOfBalances:n,title:i,isLastNode:r,config:e,parentNodeIDs:l,ancestorMetadata:s}){const o={children:[],id:m("ac_subaccount",l,t.account.accountId),isLastNode:r,reportElementData:{element:{kind:"ac_subaccount",title:i,sectionType:c,metadata:s,data:t,numOfBalances:n},config:e}},a=N("no_filter",e.filterAccountsWithNilBalances,e.filterAccountGroupsWithNilBalances).compactedAccountsSelectorVariant(t.children),d=a.map((u,p)=>g({account:u,sectionType:c,numOfBalances:n,title:u.account.accountName,config:e,isLastNode:p===a.length-1,parentNodeIDs:l,ancestorMetadata:{subAccountAncestorMetadata:[...s.subAccountAncestorMetadata,{depth:u.id.length-1,hasSibling:a.length>1,hasChildren:u.children.length>0,isLastNode:p===a.length-1,name:u.account.accountName}],classAncestorMetadata:s.classAncestorMetadata}}));return o.children.push(...d),a.length>0&&o.children.push(B({config:e,account:t,numOfBalances:n,title:t.account.accountDescription,parentNodeIDs:l,ancestorMetadata:s})),o}function L({acGroup:t,sectionType:c,numOfBalances:n,title:i,isLastNode:r,config:e,parentNodeIDs:l}){const s=m("ac_group_subaccount",l,t.accountGroupId),o={children:[],id:s,isLastNode:r,reportElementData:{element:{kind:"ac_group_subaccount",title:i,sectionType:c,data:t,numOfBalances:n},config:e}},a=N("no_filter",e.filterAccountsWithNilBalances,e.filterAccountGroupsWithNilBalances).compactedAccountsSelectorVariant(t.accounts);return o.children=a.map((d,u)=>g({account:d,sectionType:c,numOfBalances:n,title:d.account.accountDescription,config:e,isLastNode:u===a.length-1,parentNodeIDs:[...l,s],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:a.length>1,hasChildren:d.children.length>0,isLastNode:u===a.length-1,name:d.account.accountName}]}})),o}function A({classNode:t,sectionType:c,numOfBalances:n,title:i,isLastNode:r,config:e,parentNodeIDs:l,ancestorMetadata:s}){const o=m("class",l,i),a={children:[],id:o,isLastNode:r,reportElementData:{element:{kind:"class",title:i,data:t,metadata:s,numOfBalances:n},config:e}},d=s.classAncestorMetadata!=null?s.classAncestorMetadata:[],u=t.children.map((h,f)=>A({classNode:h,sectionType:c,numOfBalances:n,title:h.class.className,isLastNode:f===t.children.length-1,config:e,parentNodeIDs:[...l,o],ancestorMetadata:{subAccountAncestorMetadata:[],classAncestorMetadata:[...d,{depth:h.id.length-1,hasSibling:t.children.length>1,hasChildren:h.children.length>0,isLastNode:f===t.children.length-1,name:h.class.className}]}})),p=t.class.accounts.map((h,f)=>g({account:h,sectionType:c,numOfBalances:n,title:h.account.accountName,config:e,isLastNode:f===t.class.accounts.length-1,parentNodeIDs:[...l,o],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:t.class.accounts.length>1,hasChildren:h.children.length>0,isLastNode:f===t.class.accounts.length-1,name:h.account.accountName}],classAncestorMetadata:s.classAncestorMetadata}}));return a.children.push(...p),a.children.push(...u),a}function y({section:t,sectionType:c,numOfBalances:n,title:i,isLastNode:r,config:e}){const l=m("section",[],i),s={children:[],id:l,isLastNode:r,reportElementData:{element:{kind:"section",title:i,sectionType:c,data:t,numOfBalances:n},config:e}},o=t.classes.map((a,d)=>A({classNode:a,sectionType:c,numOfBalances:n,title:a.class.className,isLastNode:a.isLeafClass,config:e,parentNodeIDs:[l],ancestorMetadata:{subAccountAncestorMetadata:[],classAncestorMetadata:[{depth:a.id.length-1,hasSibling:!1,hasChildren:a.children.length>0,isLastNode:d===t.classes.length-1,name:a.class.className}]}}));return s.children.push(...o),s}function b({section:t,sectionType:c,numOfBalances:n,title:i,isLastNode:r,config:e}){const l=m("section",[],i),s={children:[],id:l,isLastNode:r,reportElementData:{element:{kind:"section",title:i,sectionType:c,data:t,numOfBalances:n},config:e}},o=N("no_filter",e.filterAccountsWithNilBalances,e.filterAccountGroupsWithNilBalances).compactedAccountGroupsSelector(t.accountGroups),a=o.map((d,u)=>L({acGroup:d,sectionType:c,numOfBalances:n,title:d.accountGroupName,isLastNode:u===o.length-1,config:e,parentNodeIDs:[l]}));return s.children.push(...a),s}function T({sectionWithAcOnly:t,sectionType:c,numOfBalances:n,title:i,isLastNode:r,config:e}){const l=m("section",[],i),s={children:[],id:l,isLastNode:r,reportElementData:{element:{kind:"section",title:i,sectionType:c,data:t,numOfBalances:n},config:e}},o=N("no_filter",e.filterAccountsWithNilBalances,e.filterAccountGroupsWithNilBalances).compactedAccountsSelectorVariant(t.accounts),a=o.map((d,u)=>g({account:d,sectionType:c,numOfBalances:n,title:d.account.accountName,config:e,isLastNode:u===o.length-1,parentNodeIDs:[l],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:o.length>1,hasChildren:d.children.length>0,isLastNode:u===o.length-1,name:d.account.accountName}]}}));return s.children.push(...a),s}export{y as D,T as I,D as L,L as M,A as S,b as T,g};
1
+ import{W as m,x as N}from"./CollapsableReportTable-ULd7PQST-DRS_mwem.js";import"./index-Cnh9fv8f.js";function D({calculatedSection:t,numOfBalances:c,title:n,isLastNode:i,config:r}){return{children:[],id:m("calculated_section",[],n),isLastNode:i,reportElementData:{element:{kind:"calculated_section",title:n,data:t,numOfBalances:c},config:r}}}function B({account:t,numOfBalances:c,title:n,config:i,parentNodeIDs:r,ancestorMetadata:e}){return{children:[],id:m("ac_subentity_total",r,t.account.accountId),isLastNode:!1,reportElementData:{element:{kind:"ac_subentity_total",title:n,data:t,numOfBalances:c,metadata:e},config:i}}}function g({account:t,sectionType:c,numOfBalances:n,title:i,isLastNode:r,config:e,parentNodeIDs:l,ancestorMetadata:s}){const o={children:[],id:m("ac_subaccount",l,t.account.accountId),isLastNode:r,reportElementData:{element:{kind:"ac_subaccount",title:i,sectionType:c,metadata:s,data:t,numOfBalances:n},config:e}},a=N("no_filter",e.filterAccountsWithNilBalances,e.filterAccountGroupsWithNilBalances).compactedAccountsSelectorVariant(t.children),d=a.map((u,p)=>g({account:u,sectionType:c,numOfBalances:n,title:u.account.accountName,config:e,isLastNode:p===a.length-1,parentNodeIDs:l,ancestorMetadata:{subAccountAncestorMetadata:[...s.subAccountAncestorMetadata,{depth:u.id.length-1,hasSibling:a.length>1,hasChildren:u.children.length>0,isLastNode:p===a.length-1,name:u.account.accountName}],classAncestorMetadata:s.classAncestorMetadata}}));return o.children.push(...d),a.length>0&&o.children.push(B({config:e,account:t,numOfBalances:n,title:t.account.accountDescription,parentNodeIDs:l,ancestorMetadata:s})),o}function L({acGroup:t,sectionType:c,numOfBalances:n,title:i,isLastNode:r,config:e,parentNodeIDs:l}){const s=m("ac_group_subaccount",l,t.accountGroupId),o={children:[],id:s,isLastNode:r,reportElementData:{element:{kind:"ac_group_subaccount",title:i,sectionType:c,data:t,numOfBalances:n},config:e}},a=N("no_filter",e.filterAccountsWithNilBalances,e.filterAccountGroupsWithNilBalances).compactedAccountsSelectorVariant(t.accounts);return o.children=a.map((d,u)=>g({account:d,sectionType:c,numOfBalances:n,title:d.account.accountDescription,config:e,isLastNode:u===a.length-1,parentNodeIDs:[...l,s],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:a.length>1,hasChildren:d.children.length>0,isLastNode:u===a.length-1,name:d.account.accountName}]}})),o}function A({classNode:t,sectionType:c,numOfBalances:n,title:i,isLastNode:r,config:e,parentNodeIDs:l,ancestorMetadata:s}){const o=m("class",l,i),a={children:[],id:o,isLastNode:r,reportElementData:{element:{kind:"class",title:i,data:t,metadata:s,numOfBalances:n},config:e}},d=s.classAncestorMetadata!=null?s.classAncestorMetadata:[],u=t.children.map((h,f)=>A({classNode:h,sectionType:c,numOfBalances:n,title:h.class.className,isLastNode:f===t.children.length-1,config:e,parentNodeIDs:[...l,o],ancestorMetadata:{subAccountAncestorMetadata:[],classAncestorMetadata:[...d,{depth:h.id.length-1,hasSibling:t.children.length>1,hasChildren:h.children.length>0,isLastNode:f===t.children.length-1,name:h.class.className}]}})),p=t.class.accounts.map((h,f)=>g({account:h,sectionType:c,numOfBalances:n,title:h.account.accountName,config:e,isLastNode:f===t.class.accounts.length-1,parentNodeIDs:[...l,o],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:t.class.accounts.length>1,hasChildren:h.children.length>0,isLastNode:f===t.class.accounts.length-1,name:h.account.accountName}],classAncestorMetadata:s.classAncestorMetadata}}));return a.children.push(...p),a.children.push(...u),a}function y({section:t,sectionType:c,numOfBalances:n,title:i,isLastNode:r,config:e}){const l=m("section",[],i),s={children:[],id:l,isLastNode:r,reportElementData:{element:{kind:"section",title:i,sectionType:c,data:t,numOfBalances:n},config:e}},o=t.classes.map((a,d)=>A({classNode:a,sectionType:c,numOfBalances:n,title:a.class.className,isLastNode:a.isLeafClass,config:e,parentNodeIDs:[l],ancestorMetadata:{subAccountAncestorMetadata:[],classAncestorMetadata:[{depth:a.id.length-1,hasSibling:!1,hasChildren:a.children.length>0,isLastNode:d===t.classes.length-1,name:a.class.className}]}}));return s.children.push(...o),s}function b({section:t,sectionType:c,numOfBalances:n,title:i,isLastNode:r,config:e}){const l=m("section",[],i),s={children:[],id:l,isLastNode:r,reportElementData:{element:{kind:"section",title:i,sectionType:c,data:t,numOfBalances:n},config:e}},o=N("no_filter",e.filterAccountsWithNilBalances,e.filterAccountGroupsWithNilBalances).compactedAccountGroupsSelector(t.accountGroups),a=o.map((d,u)=>L({acGroup:d,sectionType:c,numOfBalances:n,title:d.accountGroupName,isLastNode:u===o.length-1,config:e,parentNodeIDs:[l]}));return s.children.push(...a),s}function T({sectionWithAcOnly:t,sectionType:c,numOfBalances:n,title:i,isLastNode:r,config:e}){const l=m("section",[],i),s={children:[],id:l,isLastNode:r,reportElementData:{element:{kind:"section",title:i,sectionType:c,data:t,numOfBalances:n},config:e}},o=N("no_filter",e.filterAccountsWithNilBalances,e.filterAccountGroupsWithNilBalances).compactedAccountsSelectorVariant(t.accounts),a=o.map((d,u)=>g({account:d,sectionType:c,numOfBalances:n,title:d.account.accountName,config:e,isLastNode:u===o.length-1,parentNodeIDs:[l],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:o.length>1,hasChildren:d.children.length>0,isLastNode:u===o.length-1,name:d.account.accountName}]}}));return s.children.push(...a),s}export{y as D,T as I,D as L,L as M,A as S,b as T,g};
@@ -1 +1 @@
1
- import{W as r}from"./CollapsableReportTable-NSlKGCNZ-DKKIVw3S.js";function i({title:t,balances:e=[],config:n,nodeId:a}){return{children:[],id:a??r("spacer_row",[],t),isLastNode:!1,reportElementData:{element:{kind:"spacer_row",title:"",data:e,numOfBalances:e.length},config:n}}}export{i as l};
1
+ import{W as r}from"./CollapsableReportTable-ULd7PQST-DRS_mwem.js";function i({title:t,balances:e=[],config:n,nodeId:a}){return{children:[],id:a??r("spacer_row",[],t),isLastNode:!1,reportElementData:{element:{kind:"spacer_row",title:"",data:e,numOfBalances:e.length},config:n}}}export{i as l};
@@ -1 +1 @@
1
- import{W as n}from"./CollapsableReportTable-NSlKGCNZ-DKKIVw3S.js";function i({balances:e,config:a,nodeId:t}){return{children:[],id:t??n("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:"timeframe_headers",title:"",data:e,numOfBalances:e.length},config:a}}}export{i as o};
1
+ import{W as n}from"./CollapsableReportTable-ULd7PQST-DRS_mwem.js";function i({balances:e,config:a,nodeId:t}){return{children:[],id:t??n("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:"timeframe_headers",title:"",data:e,numOfBalances:e.length},config:a}}}export{i as o};
@@ -1 +1 @@
1
- import{W as r}from"./CollapsableReportTable-NSlKGCNZ-DKKIVw3S.js";function i({balances:e,config:a,nodeId:t}){return{children:[],id:t??r("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:a.mode==="actual_vs_forecast"?"timeframe_headers_with_forecast":"timeframe_headers",title:"",data:e,numOfBalances:e.length},config:a}}}export{i as s};
1
+ import{W as r}from"./CollapsableReportTable-ULd7PQST-DRS_mwem.js";function i({balances:e,config:a,nodeId:t}){return{children:[],id:t??r("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:a.mode==="actual_vs_forecast"?"timeframe_headers_with_forecast":"timeframe_headers",title:"",data:e,numOfBalances:e.length},config:a}}}export{i as s};
@@ -1 +1 @@
1
- import{W as a}from"./CollapsableReportTable-NSlKGCNZ-DKKIVw3S.js";const t={0:"section-row",1:"root-class-row",2:"sub-class-row",3:"leaf-class-row"};function l({title:o,balances:e,config:s,nodeId:n}){return{children:[],id:n??a("headers_loading_in_progress",[],o),isLastNode:!1,reportElementData:{element:{kind:"headers_loading_in_progress",title:"",data:e,numOfBalances:e.length},config:s}}}export{l as d,t as l};
1
+ import{W as a}from"./CollapsableReportTable-ULd7PQST-DRS_mwem.js";const t={0:"section-row",1:"root-class-row",2:"sub-class-row",3:"leaf-class-row"};function l({title:o,balances:e,config:s,nodeId:n}){return{children:[],id:n??a("headers_loading_in_progress",[],o),isLastNode:!1,reportElementData:{element:{kind:"headers_loading_in_progress",title:"",data:e,numOfBalances:e.length},config:s}}}export{l as d,t as l};
@@ -1,4 +1,4 @@
1
- import{r as Zr,a as en,g as Cr,b as w,m as tn,n as rn,T as nn,R as on,f as Ie}from"./vendor-CnQcJ2Lu.js";var bt={exports:{}},Oe={};/**
1
+ import{r as Zr,a as en,g as Cr,b as w,m as tn,n as rn,T as nn,R as on,f as Ie}from"./vendor-rkTZJa59.js";var bt={exports:{}},Oe={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -1 +1 @@
1
- import{b as e}from"./vendor-CnQcJ2Lu.js";const o=r=>e.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},e.createElement("path",{d:"M20.5447 1.65002C21.0182 1.65002 21.4723 1.83811 21.807 2.1729C22.1418 2.5077 22.3299 2.96177 22.3299 3.43524V16.8467C22.3299 18.2612 21.768 19.6177 20.7678 20.6179C19.7676 21.6181 18.4111 22.18 16.9966 22.18H3.58514C3.11168 22.18 2.6576 21.9919 2.3228 21.6571C1.98801 21.3224 1.79993 20.8683 1.79993 20.3948V3.43524C1.79993 2.96177 1.98801 2.5077 2.3228 2.1729C2.6576 1.83811 3.11168 1.65002 3.58514 1.65002H20.5447Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M17.8671 22.1086V18.6095C17.8671 18.3728 17.9611 18.1458 18.1285 17.9784C18.2959 17.811 18.5229 17.7169 18.7597 17.7169H22.2587",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M5.97803 6.40503H17.978",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M5.97803 9.97534H17.978",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M5.97803 13.5459H11.978",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));export{o as t};
1
+ import{b as e}from"./vendor-rkTZJa59.js";const o=r=>e.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},e.createElement("path",{d:"M20.5447 1.65002C21.0182 1.65002 21.4723 1.83811 21.807 2.1729C22.1418 2.5077 22.3299 2.96177 22.3299 3.43524V16.8467C22.3299 18.2612 21.768 19.6177 20.7678 20.6179C19.7676 21.6181 18.4111 22.18 16.9966 22.18H3.58514C3.11168 22.18 2.6576 21.9919 2.3228 21.6571C1.98801 21.3224 1.79993 20.8683 1.79993 20.3948V3.43524C1.79993 2.96177 1.98801 2.5077 2.3228 2.1729C2.6576 1.83811 3.11168 1.65002 3.58514 1.65002H20.5447Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M17.8671 22.1086V18.6095C17.8671 18.3728 17.9611 18.1458 18.1285 17.9784C18.2959 17.811 18.5229 17.7169 18.7597 17.7169H22.2587",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M5.97803 6.40503H17.978",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M5.97803 9.97534H17.978",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M5.97803 13.5459H11.978",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));export{o as t};
@@ -1,4 +1,4 @@
1
- import{e as s,j as i,p as c,_ as d,c as p,o as n,C as o}from"./index-DjfQ_8_G.js";import{b as l,n as t}from"./vendor-CnQcJ2Lu.js";const a={width:new o(300,770,770),height:new o(195,500,500)},h=t.div`
1
+ import{e as s,j as i,p as c,_ as d,c as p,o as n,C as o}from"./index-Cnh9fv8f.js";import{b as l,n as t}from"./vendor-rkTZJa59.js";const a={width:new o(300,770,770),height:new o(195,500,500)},h=t.div`
2
2
  position: fixed;
3
3
  top: 0;
4
4
  left: 0;
@@ -1 +1 @@
1
- import{b as e}from"./vendor-CnQcJ2Lu.js";const r=o=>e.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o},e.createElement("path",{d:"M12 22.5C17.799 22.5 22.5 17.799 22.5 12C22.5 6.20101 17.799 1.5 12 1.5C6.20101 1.5 1.5 6.20101 1.5 12C1.5 17.799 6.20101 22.5 12 22.5Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));export{r as o};
1
+ import{b as e}from"./vendor-rkTZJa59.js";const r=o=>e.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o},e.createElement("path",{d:"M12 22.5C17.799 22.5 22.5 17.799 22.5 12C22.5 6.20101 17.799 1.5 12 1.5C6.20101 1.5 1.5 6.20101 1.5 12C1.5 17.799 6.20101 22.5 12 22.5Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));export{r as o};
@@ -1,4 +1,4 @@
1
- import{f as T,b as g,_ as D,h as be}from"./vendor-CnQcJ2Lu.js";import{_ as J,r as Ae}from"./mui-Bi8r7UDG.js";var N=T.createContext(null);function je(e){e()}var Ne=je,De=function(r){return Ne=r},Ue=function(){return Ne};function Le(){var e=Ue(),r=null,t=null;return{clear:function(){r=null,t=null},notify:function(){e(function(){for(var o=r;o;)o.callback(),o=o.next})},get:function(){for(var o=[],u=r;u;)o.push(u),u=u.next;return o},subscribe:function(o){var u=!0,a=t={callback:o,next:null,prev:t};return a.prev?a.prev.next=a:r=a,function(){!u||r===null||(u=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:r=a.next)}}}}var me={notify:function(){},get:function(){return[]}};function se(e,r){var t,n=me;function o(d){return f(),n.subscribe(d)}function u(){n.notify()}function a(){c.onStateChange&&c.onStateChange()}function i(){return!!t}function f(){t||(t=r?r.addNestedSub(a):e.subscribe(a),n=Le())}function p(){t&&(t(),t=void 0,n.clear(),n=me)}var c={addNestedSub:o,notifyNestedSubs:u,handleChangeWrapper:a,isSubscribed:i,trySubscribe:f,tryUnsubscribe:p,getListeners:function(){return n}};return c}var Q=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?g.useLayoutEffect:g.useEffect;function Ir(e){var r=e.store,t=e.context,n=e.children,o=g.useMemo(function(){var i=se(r);return{store:r,subscription:i}},[r]),u=g.useMemo(function(){return r.getState()},[r]);Q(function(){var i=o.subscription;return i.onStateChange=i.notifyNestedSubs,i.trySubscribe(),u!==r.getState()&&i.notifyNestedSubs(),function(){i.tryUnsubscribe(),i.onStateChange=null}},[o,u]);var a=t||N;return T.createElement(a.Provider,{value:o},n)}var oe={exports:{}},P={};/** @license React v17.0.2
1
+ import{f as T,b as g,_ as D,h as be}from"./vendor-rkTZJa59.js";import{_ as J,r as Ae}from"./mui-C42whWwM.js";var N=T.createContext(null);function je(e){e()}var Ne=je,De=function(r){return Ne=r},Ue=function(){return Ne};function Le(){var e=Ue(),r=null,t=null;return{clear:function(){r=null,t=null},notify:function(){e(function(){for(var o=r;o;)o.callback(),o=o.next})},get:function(){for(var o=[],u=r;u;)o.push(u),u=u.next;return o},subscribe:function(o){var u=!0,a=t={callback:o,next:null,prev:t};return a.prev?a.prev.next=a:r=a,function(){!u||r===null||(u=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:r=a.next)}}}}var me={notify:function(){},get:function(){return[]}};function se(e,r){var t,n=me;function o(d){return f(),n.subscribe(d)}function u(){n.notify()}function a(){c.onStateChange&&c.onStateChange()}function i(){return!!t}function f(){t||(t=r?r.addNestedSub(a):e.subscribe(a),n=Le())}function p(){t&&(t(),t=void 0,n.clear(),n=me)}var c={addNestedSub:o,notifyNestedSubs:u,handleChangeWrapper:a,isSubscribed:i,trySubscribe:f,tryUnsubscribe:p,getListeners:function(){return n}};return c}var Q=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?g.useLayoutEffect:g.useEffect;function Ir(e){var r=e.store,t=e.context,n=e.children,o=g.useMemo(function(){var i=se(r);return{store:r,subscription:i}},[r]),u=g.useMemo(function(){return r.getState()},[r]);Q(function(){var i=o.subscription;return i.onStateChange=i.notifyNestedSubs,i.trySubscribe(),u!==r.getState()&&i.notifyNestedSubs(),function(){i.tryUnsubscribe(),i.onStateChange=null}},[o,u]);var a=t||N;return T.createElement(a.Provider,{value:o},n)}var oe={exports:{}},P={};/** @license React v17.0.2
2
2
  * react-is.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1,4 +1,4 @@
1
- import{b as u,R as ue}from"./vendor-CnQcJ2Lu.js";import"./mui-Bi8r7UDG.js";/**
1
+ import{b as u,R as ue}from"./vendor-rkTZJa59.js";import"./mui-C42whWwM.js";/**
2
2
  * @remix-run/router v1.19.2
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
@@ -1,4 +1,4 @@
1
- import{d as Qa,b as Ce,h as _h,e as yh}from"./vendor-CnQcJ2Lu.js";const T=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,H=globalThis,ft="9.42.1";function wt(){return vr(H),H}function vr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ft,t[ft]=t[ft]||{}}function wr(e,t,n=H){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[ft]=r[ft]||{};return s[e]||(s[e]=t())}const Vi=["debug","info","warn","error","log","assert","trace"],Sh="Sentry Logger ",Cs={};function Ut(e){if(!("console"in H))return e();const t=H.console,n={},r=Object.keys(Cs);r.forEach(s=>{const o=Cs[s];n[s]=t[s],t[s]=o});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function bh(){Xi().enabled=!0}function Eh(){Xi().enabled=!1}function fl(){return Xi().enabled}function vh(...e){Yi("log",...e)}function wh(...e){Yi("warn",...e)}function Th(...e){Yi("error",...e)}function Yi(e,...t){T&&fl()&&Ut(()=>{H.console[e](`${Sh}[${e}]:`,...t)})}function Xi(){return T?wr("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const _={enable:bh,disable:Eh,isEnabled:fl,log:vh,warn:wh,error:Th},pl=50,it="?",ec=/\(error: (.*)\)/,tc=/captureMessage|captureException/;function hl(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const o=[],i=n.split(`
1
+ import{d as Qa,b as Ce,h as _h,e as yh}from"./vendor-rkTZJa59.js";const T=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,H=globalThis,ft="9.42.1";function wt(){return vr(H),H}function vr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ft,t[ft]=t[ft]||{}}function wr(e,t,n=H){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[ft]=r[ft]||{};return s[e]||(s[e]=t())}const Vi=["debug","info","warn","error","log","assert","trace"],Sh="Sentry Logger ",Cs={};function Ut(e){if(!("console"in H))return e();const t=H.console,n={},r=Object.keys(Cs);r.forEach(s=>{const o=Cs[s];n[s]=t[s],t[s]=o});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function bh(){Xi().enabled=!0}function Eh(){Xi().enabled=!1}function fl(){return Xi().enabled}function vh(...e){Yi("log",...e)}function wh(...e){Yi("warn",...e)}function Th(...e){Yi("error",...e)}function Yi(e,...t){T&&fl()&&Ut(()=>{H.console[e](`${Sh}[${e}]:`,...t)})}function Xi(){return T?wr("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const _={enable:bh,disable:Eh,isEnabled:fl,log:vh,warn:wh,error:Th},pl=50,it="?",ec=/\(error: (.*)\)/,tc=/captureMessage|captureException/;function hl(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const o=[],i=n.split(`
2
2
  `);for(let a=r;a<i.length;a++){const c=i[a];if(c.length>1024)continue;const u=ec.test(c)?c.replace(ec,"$1"):c;if(!u.match(/\S*Error: /)){for(const d of t){const l=d(u);if(l){o.push(l);break}}if(o.length>=pl+s)break}}return kh(o.slice(s))}}function Ih(e){return Array.isArray(e)?hl(...e):e}function kh(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Wr(t).function||"")&&t.pop(),t.reverse(),tc.test(Wr(t).function||"")&&(t.pop(),tc.test(Wr(t).function||"")&&t.pop()),t.slice(0,pl).map(n=>({...n,filename:n.filename||Wr(t).filename,function:n.function||it}))}function Wr(e){return e[e.length-1]||{}}const Mo="<anonymous>";function mt(e){try{return!e||typeof e!="function"?Mo:e.name||Mo}catch{return Mo}}function oi(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const us={},nc={};function Ht(e,t){us[e]=us[e]||[],us[e].push(t)}function Wt(e,t){if(!nc[e]){nc[e]=!0;try{t()}catch(n){T&&_.error(`Error while instrumenting ${e}`,n)}}}function We(e,t){const n=e&&us[e];if(n)for(const r of n)try{r(t)}catch(s){T&&_.error(`Error while triggering instrumentation handler.
3
3
  Type: ${e}
4
4
  Name: ${mt(r)}
@@ -1 +1 @@
1
- import{b as e}from"./vendor-CnQcJ2Lu.js";const r=t=>e.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{d:"M2.00005 4.13334V11.4379C1.99616 13.8081 2.71365 16.124 4.0583 18.0816C5.40294 20.0391 7.31188 21.5468 9.53446 22.4067L10.5614 22.8027C11.2458 23.0658 12.0042 23.0658 12.6886 22.8027L13.7155 22.4067C15.9381 21.5468 17.8471 20.0391 19.1917 18.0816C20.5363 16.124 21.2538 13.8081 21.25 11.4379V4.13334C21.2522 3.8511 21.1727 3.57417 21.0208 3.33569C20.8689 3.0972 20.651 2.90724 20.3933 2.78855C17.6308 1.58258 14.6422 0.973266 11.625 1.0009C8.60784 0.973266 5.61916 1.58258 2.85667 2.78855C2.59898 2.90724 2.38115 3.0972 2.22923 3.33569C2.07732 3.57417 1.99775 3.8511 2.00005 4.13334Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M16.3193 9.37876L11.1671 14.2887C11.1022 14.3507 11.0254 14.3988 10.9413 14.4302C10.8572 14.4616 10.7676 14.4755 10.678 14.4712C10.5896 14.467 10.5029 14.4451 10.4231 14.4068C10.3433 14.3685 10.272 14.3145 10.2134 14.2482L7.86807 11.5839",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));export{r as o};
1
+ import{b as e}from"./vendor-rkTZJa59.js";const r=t=>e.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{d:"M2.00005 4.13334V11.4379C1.99616 13.8081 2.71365 16.124 4.0583 18.0816C5.40294 20.0391 7.31188 21.5468 9.53446 22.4067L10.5614 22.8027C11.2458 23.0658 12.0042 23.0658 12.6886 22.8027L13.7155 22.4067C15.9381 21.5468 17.8471 20.0391 19.1917 18.0816C20.5363 16.124 21.2538 13.8081 21.25 11.4379V4.13334C21.2522 3.8511 21.1727 3.57417 21.0208 3.33569C20.8689 3.0972 20.651 2.90724 20.3933 2.78855C17.6308 1.58258 14.6422 0.973266 11.625 1.0009C8.60784 0.973266 5.61916 1.58258 2.85667 2.78855C2.59898 2.90724 2.38115 3.0972 2.22923 3.33569C2.07732 3.57417 1.99775 3.8511 2.00005 4.13334Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M16.3193 9.37876L11.1671 14.2887C11.1022 14.3507 11.0254 14.3988 10.9413 14.4302C10.8572 14.4616 10.7676 14.4755 10.678 14.4712C10.5896 14.467 10.5029 14.4451 10.4231 14.4068C10.3433 14.3685 10.272 14.3145 10.2134 14.2482L7.86807 11.5839",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));export{r as o};
@@ -1 +1 @@
1
- import{p as m}from"./chartTypes-CPj7oOMJ-BdHmGEgv.js";const e=(a,o,c)=>n(a,o,c.balances),t=(a,o,c)=>e(a,o,c),b=(a,o,c)=>e(a,o,c),n=(a,o,c)=>c.map(p=>({key:m(a,o),balance:p}));export{e as c,b as h,t as i,n as o};
1
+ import{p as m}from"./chartTypes-Cknnnhq_-BKEap-MQ.js";const e=(a,o,c)=>n(a,o,c.balances),t=(a,o,c)=>e(a,o,c),b=(a,o,c)=>e(a,o,c),n=(a,o,c)=>c.map(p=>({key:m(a,o),balance:p}));export{e as c,b as h,t as i,n as o};
@@ -1 +1 @@
1
- import{M as h,l as u}from"./index-DjfQ_8_G.js";function E(o,t,c,s,D){const l=D??!1,i=[];let f=[];if(t.forEach(r=>{const n=s[r];n!=null&&(i.push(n),r===c&&(f=n))}),i.length>0&&f.length>0){const r=f.map(a=>({startDate:a.balance.startDate,endDate:a.balance.endDate,label:y(o,a.balance,a.balance.balanceTimeFrame)})),n=[];for(let a=0;a<r.length;a++){const m={};i.forEach(b=>{if(b.length>0){const e=b[a];if(e!=null){const Y=l?e.balance.totalBalance:e.balance.balance,g=l?e.balance.totalForecast:e.balance.forecast,p=l?e.balance.totalPercentValue:e.balance.percentValue,k=e.balance.forecastPercentValue,d=e.key.endsWith("_forecast")?g:Y;if(d!=null){const w=e.key.endsWith("_forecast")?k:p;m[e.key]={amount:d,percentValue:w}}}}}),n.push({timeLabel:r[a],record:m})}return{timeseries:r,recordByTimeseries:n,orderedKeys:t}}else return}const y=(o,t,c)=>{const{dateFormat:{visual:s}}=h.getLocalizedStrings();switch(c){case"month":return`${u.formatZeniDate(t.startDate,s.MMMYYFormat,o)}`;case"quarter":return`${h.getLocalizedStrings().quarterPrefix}${u.formatZeniDate(t.startDate,s.QYYYYformat,o)}`;case"year":return`${u.formatZeniDate(t.startDate,s.YYYYformat,o)}`;case"free_range":case"week":throw new Error("free_range/week dates are not supported!")}};export{E as V};
1
+ import{M as h,l as u}from"./index-Cnh9fv8f.js";function E(o,t,c,s,D){const l=D??!1,i=[];let f=[];if(t.forEach(r=>{const n=s[r];n!=null&&(i.push(n),r===c&&(f=n))}),i.length>0&&f.length>0){const r=f.map(a=>({startDate:a.balance.startDate,endDate:a.balance.endDate,label:y(o,a.balance,a.balance.balanceTimeFrame)})),n=[];for(let a=0;a<r.length;a++){const m={};i.forEach(b=>{if(b.length>0){const e=b[a];if(e!=null){const Y=l?e.balance.totalBalance:e.balance.balance,g=l?e.balance.totalForecast:e.balance.forecast,p=l?e.balance.totalPercentValue:e.balance.percentValue,k=e.balance.forecastPercentValue,d=e.key.endsWith("_forecast")?g:Y;if(d!=null){const w=e.key.endsWith("_forecast")?k:p;m[e.key]={amount:d,percentValue:w}}}}}),n.push({timeLabel:r[a],record:m})}return{timeseries:r,recordByTimeseries:n,orderedKeys:t}}else return}const y=(o,t,c)=>{const{dateFormat:{visual:s}}=h.getLocalizedStrings();switch(c){case"month":return`${u.formatZeniDate(t.startDate,s.MMMYYFormat,o)}`;case"quarter":return`${h.getLocalizedStrings().quarterPrefix}${u.formatZeniDate(t.startDate,s.QYYYYformat,o)}`;case"year":return`${u.formatZeniDate(t.startDate,s.YYYYformat,o)}`;case"free_range":case"week":throw new Error("free_range/week dates are not supported!")}};export{E as V};
@@ -1 +1 @@
1
- import{b as e}from"./vendor-CnQcJ2Lu.js";const t=r=>e.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},e.createElement("path",{d:"M1.40002 12.0122C1.40002 13.0125 1.53974 13.9802 1.80074 14.8968M3.30747 5.97207C5.20954 3.26738 8.3545 1.5 11.9122 1.5C17.718 1.5 22.4245 6.20648 22.4245 12.0122C22.4245 15.3279 20.8893 18.2851 18.4911 20.2118M3.03087 17.6386C3.54058 18.4415 4.15615 19.1706 4.85796 19.8062M7.20863 21.416C8.09831 21.8619 9.06003 22.1852 10.0717 22.3639M12.9885 22.47C14.0169 22.3655 15.0015 22.1126 15.9206 21.7332",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M13.5621 7.68335H11.3837C10.8682 7.69888 10.38 7.91845 10.0264 8.29379C9.67278 8.66914 9.48267 9.16953 9.49785 9.68499C9.49327 10.0502 9.58792 10.4097 9.7717 10.7253C9.95548 11.0408 10.2215 11.3006 10.5414 11.4768L12.5227 12.5295C12.8412 12.7061 13.1059 12.9657 13.2889 13.2806C13.4719 13.5955 13.5663 13.9541 13.5621 14.3182C13.5773 14.8334 13.3875 15.3335 13.0343 15.7087C12.6811 16.084 12.1934 16.3038 11.6783 16.3199H9.49785",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M11.2781 16.3201V17.8442",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M12.2941 6.12598V7.6836",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M6.26847 6.35861L2.75043 6.35899V2.84058",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));export{t as o};
1
+ import{b as e}from"./vendor-rkTZJa59.js";const t=r=>e.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},e.createElement("path",{d:"M1.40002 12.0122C1.40002 13.0125 1.53974 13.9802 1.80074 14.8968M3.30747 5.97207C5.20954 3.26738 8.3545 1.5 11.9122 1.5C17.718 1.5 22.4245 6.20648 22.4245 12.0122C22.4245 15.3279 20.8893 18.2851 18.4911 20.2118M3.03087 17.6386C3.54058 18.4415 4.15615 19.1706 4.85796 19.8062M7.20863 21.416C8.09831 21.8619 9.06003 22.1852 10.0717 22.3639M12.9885 22.47C14.0169 22.3655 15.0015 22.1126 15.9206 21.7332",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M13.5621 7.68335H11.3837C10.8682 7.69888 10.38 7.91845 10.0264 8.29379C9.67278 8.66914 9.48267 9.16953 9.49785 9.68499C9.49327 10.0502 9.58792 10.4097 9.7717 10.7253C9.95548 11.0408 10.2215 11.3006 10.5414 11.4768L12.5227 12.5295C12.8412 12.7061 13.1059 12.9657 13.2889 13.2806C13.4719 13.5955 13.5663 13.9541 13.5621 14.3182C13.5773 14.8334 13.3875 15.3335 13.0343 15.7087C12.6811 16.084 12.1934 16.3038 11.6783 16.3199H9.49785",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M11.2781 16.3201V17.8442",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M12.2941 6.12598V7.6836",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("path",{d:"M6.26847 6.35861L2.75043 6.35899V2.84058",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));export{t as o};
@@ -1 +1 @@
1
- import{c as r}from"./index-DjfQ_8_G.js";const g=(e,h)=>`${e}${h}`,o=[{light:r.graphColor34Dark,dark:r.graphColor34Dark,headerBackgroundLight:g(r.graphColor34Light,"99"),headerBackgroundDark:g(r.graphColor34Light,""),highlightsBackgroundLight:g(r.graphColor34,"14"),highlightsBackgroundDark:g(r.graphColor34,"1F")},{light:r.graphColor16Dark,dark:r.graphColor16Dark,headerBackgroundLight:g(r.graphColor16Light,"99"),headerBackgroundDark:g(r.graphColor16Light,""),highlightsBackgroundLight:g(r.graphColor16Light,"29"),highlightsBackgroundDark:g(r.graphColor16Light,"29")}],d=(e,h)=>{const a=o[e%o.length];return{headerBackground:h.mode==="light"?a.headerBackgroundLight:a.headerBackgroundDark,fundNameColor:h.mode==="light"?a.light:a.dark,fundSubNameColor:h.mode==="light"?a.light:a.dark,highlightsBackground:h.mode==="light"?a.highlightsBackgroundLight:a.highlightsBackgroundDark}},l=e=>{if(e!=null){const{code:h,name:a}=e;return{value:a,color:t(h),code:h}}},t=e=>{switch(e){case"initiated":case"scheduled":return r.neutralGrey1Light;case"canceled":case"delayed":case"failed":case"problem":return r.important;case"completed":return r.success;case"mfa_required":case"consent_required":default:return r.neutralGrey1Light}};export{l as d,d as l};
1
+ import{c as r}from"./index-Cnh9fv8f.js";const g=(e,h)=>`${e}${h}`,o=[{light:r.graphColor34Dark,dark:r.graphColor34Dark,headerBackgroundLight:g(r.graphColor34Light,"99"),headerBackgroundDark:g(r.graphColor34Light,""),highlightsBackgroundLight:g(r.graphColor34,"14"),highlightsBackgroundDark:g(r.graphColor34,"1F")},{light:r.graphColor16Dark,dark:r.graphColor16Dark,headerBackgroundLight:g(r.graphColor16Light,"99"),headerBackgroundDark:g(r.graphColor16Light,""),highlightsBackgroundLight:g(r.graphColor16Light,"29"),highlightsBackgroundDark:g(r.graphColor16Light,"29")}],d=(e,h)=>{const a=o[e%o.length];return{headerBackground:h.mode==="light"?a.headerBackgroundLight:a.headerBackgroundDark,fundNameColor:h.mode==="light"?a.light:a.dark,fundSubNameColor:h.mode==="light"?a.light:a.dark,highlightsBackground:h.mode==="light"?a.highlightsBackgroundLight:a.highlightsBackgroundDark}},l=e=>{if(e!=null){const{code:h,name:a}=e;return{value:a,color:t(h),code:h}}},t=e=>{switch(e){case"initiated":case"scheduled":return r.neutralGrey1Light;case"canceled":case"delayed":case"failed":case"problem":return r.important;case"completed":return r.success;case"mfa_required":case"consent_required":default:return r.neutralGrey1Light}};export{l as d,d as l};