@zeniai/web-app-ui 4.14.38-dev → 4.14.39-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 (432) hide show
  1. package/dist/assets/{ACHDetailsPage-BShpKoIj-D1Wy32uO.js → ACHDetailsPage-B5qIuZya-Dqn8ZaVl.js} +6 -6
  2. package/dist/assets/{AIPerformancePage-CFErwUsE-DcUypqs6.js → AIPerformancePage-BHB45mP--CWtWN8JR.js} +23 -23
  3. package/dist/assets/AccountInfoPage-Cd5xYT1g-BylH1aam.js +18 -0
  4. package/dist/assets/AccountInfoPageContent-CJ7ycVIK-3aE5KJwU.js +149 -0
  5. package/dist/assets/{AccountLockedInfoModal-c30P9O_3-DzDiXoV7.js → AccountLockedInfoModal-Dox7IuAX-C5qPLBPz.js} +6 -6
  6. package/dist/assets/{AccountReconDetailsDrawerPage-CO9BYPWm-CTb98mzK.js → AccountReconDetailsDrawerPage-Bqty08m0-Dbr-jmu7.js} +5 -5
  7. package/dist/assets/{AccountRow-BrW_eEjE-Cmf0Jids.js → AccountRow-D1cjRJJD-Dsnq1o4t.js} +9 -9
  8. package/dist/assets/{AccountsPromoCardStack-De2yNNuZ-XXlQf85I.js → AccountsPromoCardStack-Bs3naJHM-DvbUMPbJ.js} +17 -17
  9. package/dist/assets/AddAddressForCardDrawer-DZkBMJfp-DwU9s4jD.js +6 -0
  10. package/dist/assets/{AddToWalletPage-CsOmzC7v-S49ZGsCa.js → AddToWalletPage-CyRfqVDB-DtRghMSs.js} +12 -12
  11. package/dist/assets/AddressRoutes-DbIoDD0z.js +1 -0
  12. package/dist/assets/AddressScreen-Duz_V-eF.js +9 -0
  13. package/dist/assets/AgingReportsPage-xBFff3BM-B936IQ2N.js +79 -0
  14. package/dist/assets/{AiCfoScreen-D5N0hxeG.js → AiCfoScreen-DkKXC6Fw.js} +2 -2
  15. package/dist/assets/{AllUserItems-Dq7NcP-o-Da1Zo4z6.js → AllUserItems-BJf6WPDo-D0H1tMjG.js} +7 -7
  16. package/dist/assets/{ApAgingDetailPage-Z5JgfH-e-CEuDNd6O.js → ApAgingDetailPage-CjBrPyi8-Dy0hX-gn.js} +5 -5
  17. package/dist/assets/{AppBasePage-B5sDynhi-CeUmBhIQ.js → AppBasePage-CqDm-hnV-DluaESRo.js} +9 -9
  18. package/dist/assets/{AppDrawerContent-D9Q8ir0T-DZmwUW8c.js → AppDrawerContent-CVVWj66i-D4zioU_X.js} +6 -6
  19. package/dist/assets/ApprovalRulesSettingsPage-Cckd2uVA-Bu-mEOHu.js +47 -0
  20. package/dist/assets/ArAgingChart-CBsqOd-4-CVCl4d59.js +24 -0
  21. package/dist/assets/{ArAgingDetailPage-B5vqkc3v-B1AqC5xt.js → ArAgingDetailPage-i7JObt60-CsyQx3rL.js} +1 -1
  22. package/dist/assets/{AttachmentView-CiYfninr-DZhIwWMR.js → AttachmentView-CzC4skJ3-D2ObdnK2.js} +6 -6
  23. package/dist/assets/BalancesInsightWithToolTip-B6umvmgL-B94s6jgr.js +38 -0
  24. package/dist/assets/{BankAccountSection-EZtscP2z-C2fUrA1M.js → BankAccountSection-Di4sF52j-BobhPzIF.js} +3 -3
  25. package/dist/assets/{BankAccountWarningSection-DCfyIUlu-D_RVGDL2.js → BankAccountWarningSection-Cled-2cR-CypxFFmY.js} +10 -10
  26. package/dist/assets/{BankConnectionsSettingsPage-CQWy9jvt-Brl3VmAQ.js → BankConnectionsSettingsPage-Ccnzq7st-DGOhp4FX.js} +52 -52
  27. package/dist/assets/{BillDetailPage-pt1k5AQf-C_HrCJfS.js → BillDetailPage-XXOwBfO1-DauaxUA2.js} +9 -9
  28. package/dist/assets/BillPayApprovalRoutes-S9Y_fMTz.js +1 -0
  29. package/dist/assets/{BillPayApprovalRuleDetailPage-Drh7Bhi8-EZrQsXba.js → BillPayApprovalRuleDetailPage-DFZ0csaT-1KbX_IY6.js} +2 -2
  30. package/dist/assets/{BillPayApprovalRulesPage-Cmyo59xB-D7U9ywcy.js → BillPayApprovalRulesPage-COCypDcS-BjGZEACH.js} +9 -9
  31. package/dist/assets/{BillPayPromoPage-Dgpz2TLG-BwKkDBie.js → BillPayPromoPage-DOE2YIqC-C8ApdrdB.js} +7 -7
  32. package/dist/assets/{BillPayRoutes-aVWMd64J.js → BillPayRoutes-Bz92yFGI.js} +18 -18
  33. package/dist/assets/{BillPaySetUpPage-B6Pd_eBf-DFM86E0U.js → BillPaySetUpPage-BCJbZDsV-BF2fTyNr.js} +7 -7
  34. package/dist/assets/{BillingSettingsPage-CYsvBrFV-B9NfPSZ9.js → BillingSettingsPage-iImtlEmO-CBp1rdfh.js} +6 -6
  35. package/dist/assets/{BillsBulkReviewDrawerPage-DNnAmqWz-C01NVO_d.js → BillsBulkReviewDrawerPage-B11GWM_0-Crsw24X2.js} +1 -1
  36. package/dist/assets/{BoxItem-B06DK4G--C4opawya.js → BoxItem-Bxa1M4QU-BEQbjRW-.js} +4 -4
  37. package/dist/assets/{BusinessVerificationPage-Dgk5gyMv-BrQSkaHR.js → BusinessVerificationPage-DSuJFoW1-mYZPYqnm.js} +8 -8
  38. package/dist/assets/{BusinessVerificationPageScreen-D9PxWQrU.js → BusinessVerificationPageScreen-BlaiKu4I.js} +2 -2
  39. package/dist/assets/{BusyIndication-Cd67eHX6-C7aB5h-1.js → BusyIndication-9zDqSKBP-WSsX6_uU.js} +1 -1
  40. package/dist/assets/{CardNumberSubText-CcH9jUoZ-HppogTjx.js → CardNumberSubText-_ZZbaz_k-D2s6-wsQ.js} +8 -8
  41. package/dist/assets/{CashbackDetailPage-5eysaHGf-CZA31npt.js → CashbackDetailPage-DAZXitLt-Dn6UduwT.js} +24 -24
  42. package/dist/assets/{ChargeCardDetailPage-Diwf-gwZ-BccKvsWr.js → ChargeCardDetailPage-B1VIpASk-D0l4y1IR.js} +20 -20
  43. package/dist/assets/{ChargeCardListPage-C-RTGkKK-Cc1az4M9.js → ChargeCardListPage-BOBepN-x-BtfglwWz.js} +36 -36
  44. package/dist/assets/{ChargeCardListTable-B-bNbtZQ-BuEumynS.js → ChargeCardListTable-YznzSsJo-KwncCUaT.js} +31 -31
  45. package/dist/assets/{ChargeCardPaymentHistoryPage-Cu-zT5tO-CNy0B9A3.js → ChargeCardPaymentHistoryPage--jOwsMla-DQFHZBZ2.js} +19 -19
  46. package/dist/assets/ChargeCardPromoPage-DIfakIOK-CUSVcG-Z.js +222 -0
  47. package/dist/assets/{ChargeCardRoutes-CKV_cGg2.js → ChargeCardRoutes-PKJBtykP.js} +9 -9
  48. package/dist/assets/{ChargeCardSetupPage-BcTB9Yy5-BJuaiwYA.js → ChargeCardSetupPage-0bpVkeJs-yW1xF9DG.js} +4 -4
  49. package/dist/assets/{ChargeCardStatementsPage-B_ERvgmB-W5ryAUPk.js → ChargeCardStatementsPage-ChWyQlw6-BDnJUrTu.js} +2 -2
  50. package/dist/assets/CheckDepositDrawerPage-BS7hnyZn-C-RoPs-w.js +206 -0
  51. package/dist/assets/{CollapsableReportTable-h0vIfI8o-Q6XPsw6M.js → CollapsableReportTable-DNfFkAts-CoCUKzx3.js} +40 -40
  52. package/dist/assets/{CompanyOfficerDetailsSection-CWADX4kZ-DANlup8L.js → CompanyOfficerDetailsSection-CrOIN4IW-wL1QY22J.js} +23 -23
  53. package/dist/assets/{CompanyPassportCard-DF9LFrFD-DPvP8c2P.js → CompanyPassportCard-CkzYFTrp-DRHCWpeb.js} +4 -4
  54. package/dist/assets/{CompanyPassportPage-BtAopyLq-CG1Jq4C9.js → CompanyPassportPage-FE6yli6h-Dd4_9uh3.js} +14 -14
  55. package/dist/assets/CompanyPassportScreen-BxfK5qi-.js +1 -0
  56. package/dist/assets/CompleteProfile-Cb8i1XgZ-BjB2Cj8T.js +52 -0
  57. package/dist/assets/ConfettiBurst-BZCXEGYA-2D0_Pemr.js +1 -0
  58. package/dist/assets/ConnectionAuthScreen-Wp_pgh6b.js +11 -0
  59. package/dist/assets/{ConstrainedInnerElement-hv51KpGg-CKGSsSPo.js → ConstrainedInnerElement-CgdnMeoA-CE1VZ_Vz.js} +1 -1
  60. package/dist/assets/{CreateOrEditVendorPage-C2xU6c51-Cx-c8OBN.js → CreateOrEditVendorPage-CzpSgxbO-k7E9cu5j.js} +10 -10
  61. package/dist/assets/{CreditCardPaymentDrawerPage-CeagMaCu-CazU8VPX.js → CreditCardPaymentDrawerPage-c_q0MsSO-dQfGXEwP.js} +7 -7
  62. package/dist/assets/{CurrencySelectField-B8EoF2aF-DHzUxLL4.js → CurrencySelectField-BAh7SHrG-BY-wwlD4.js} +5 -5
  63. package/dist/assets/{CustomerOnboardingActivationPage-CIeR2XvU-CMOVbNs9.js → CustomerOnboardingActivationPage-f3Aa6E5r-CsLUjIve.js} +6 -6
  64. package/dist/assets/CustomerOnboardingAuthScreen-CTK0e_jx.js +1 -0
  65. package/dist/assets/CustomerOnboardingContainerPage-CWAtSu08-CHM5gdzL.js +1 -0
  66. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-kUbwh2r2-BjHJq9e_.js → CustomerOnboardingDetailPageSkeleton-DYuiWn8s-Cjt3eU6d.js} +12 -12
  67. package/dist/assets/{CustomerOnboardingNoStepsPage-Br0jy7Pu-xbtVpPeD.js → CustomerOnboardingNoStepsPage-Bh_F0-oC-wTFuOqC8.js} +12 -12
  68. package/dist/assets/{CustomerOnboardingPage-Dm2Si769-CuOP2t9G.js → CustomerOnboardingPage-B9hSO88_-DWmXd-Uc.js} +7 -7
  69. package/dist/assets/{CustomerOnboardingProductSuitePage-Cz81Q5jC-CBFgnoEY.js → CustomerOnboardingProductSuitePage-CG0HKCpQ-GHwnhZEx.js} +7 -7
  70. package/dist/assets/CustomerOnboardingRoutes-liI38PH4.js +23 -0
  71. package/dist/assets/{Dashboard-DReG_aaf-B9cmSG7e.js → Dashboard-BJ_oIHab-R3_sy9De.js} +1 -1
  72. package/dist/assets/{DashboardReportPage-BXSlwsR7-CjT08Tnm.js → DashboardReportPage-BemzMw2e-DvGvflyG.js} +11 -11
  73. package/dist/assets/{DashboardRoutes-Cr_y84hZ.js → DashboardRoutes-C7dEIbTS.js} +3 -3
  74. package/dist/assets/DashboardSidebarBackgroundAnimation-BtA5oEGG-DP44-3NB.js +12 -0
  75. package/dist/assets/{DefaultTenantHome-Bp9gU4vX.js → DefaultTenantHome-CkG7rrVy.js} +1 -1
  76. package/dist/assets/DepositAccTransactionItem-CyFi1P_L-VEy51_-P.js +76 -0
  77. package/dist/assets/{DepositAccTransactionListPage-C-FAvZwD-CLMW6N19.js → DepositAccTransactionListPage-DvBRRUdZ-FPrNb8c2.js} +6 -6
  78. package/dist/assets/DomesticWireDetailScreen-CgfzlsVD.js +18 -0
  79. package/dist/assets/{DomesticWireDetailsPage-BaiSpc0N-BjZ307kD.js → DomesticWireDetailsPage-DCDo3aHI-DZy_Auc2.js} +4 -4
  80. package/dist/assets/{DownloadOverlay-BpRKCn-0-Ceuu4G9V.js → DownloadOverlay-D_lL1sPW-DBEVtdkQ.js} +18 -18
  81. package/dist/assets/{DrawerPage-DQ3Xuekx-osFrzw_b.js → DrawerPage-DesxXhZk-qxdDcPRN.js} +10 -10
  82. package/dist/assets/DrawerScreen-IScn_gPb.js +1 -0
  83. package/dist/assets/EditPeoplePage-QvPy_Six-pqhLCmsP.js +55 -0
  84. package/dist/assets/{EditReimbursementDetailPage-CC2BjMkR-UcYvbITo.js → EditReimbursementDetailPage-C0ZDkboO-Ds7tBMbu.js} +17 -17
  85. package/dist/assets/EntityDetailPage-l7nXIsyF-D-OEpTX_.js +18 -0
  86. package/dist/assets/EntityDetailRoutes-DCBMx6-C.js +1 -0
  87. package/dist/assets/{EntitySummarySection-vsEMiXYh-xFy88yRd.js → EntitySummarySection-BwX0a4JL-CYDWshdA.js} +12 -12
  88. package/dist/assets/{ExpenseAutomationOverviewPage-B3HPfIsK-BoAXmFoS.js → ExpenseAutomationOverviewPage-EdyHjbff-QECZrSJL.js} +13 -13
  89. package/dist/assets/ExpenseAutomationPage-DA22Qofw-QWboM4Rp.js +3614 -0
  90. package/dist/assets/ExpenseAutomationRoutes-DVcJr4np.js +20 -0
  91. package/dist/assets/{ExpressPayPage-BH7oCW_F-DgICn4el.js → ExpressPayPage-EMP6inpX-C812vhu_.js} +6 -6
  92. package/dist/assets/{FeaturePreviewPage-DSv61BhF-BsdnfTlO.js → FeaturePreviewPage-SYJm-3aR-BnuhMtuP.js} +2 -2
  93. package/dist/assets/FeaturePreviewScreen-C3Y9pgiz.js +1 -0
  94. package/dist/assets/{FollowStepsSection-Bgy9MpO4-CvIWpdyW.js → FollowStepsSection-BxESVqJD-BFhnhk7r.js} +9 -9
  95. package/dist/assets/{GlobalReviewListPage-VRq_gimm-BpVLghA7.js → GlobalReviewListPage-D5_ACa-q-DZo6UglL.js} +7 -7
  96. package/dist/assets/{InformationCardStack-rx0fypl3-OYwqii2C.js → InformationCardStack-B_qQUEYD-DRekqbq_.js} +4 -4
  97. package/dist/assets/InsightsCardStack-BsQzoVzj-BI_nQIXQ.js +79 -0
  98. package/dist/assets/{InsightsSection-ByFf2oGn-ChvKOP1F.js → InsightsSection-B6CNlTNH-BFr6MnTG.js} +9 -9
  99. package/dist/assets/{IntegrationsSettingsPage-Cj01Nub6-lRHeOJiB.js → IntegrationsSettingsPage-DP6fAccq-CigqZ0SM.js} +2 -2
  100. package/dist/assets/{InternationalWireSwiftDetailsPage-C2PM97sv-BLs5mpsl.js → InternationalWireSwiftDetailsPage-VdG7bDZi-Rlu68XJQ.js} +11 -11
  101. package/dist/assets/InternationalWireVerificationPage-COC6lZml-CR1f2JQF.js +65 -0
  102. package/dist/assets/{InviteFormPage-dsMpScvq-pwPoaIw-.js → InviteFormPage-DN02jRy5-UECY6Ai9.js} +6 -6
  103. package/dist/assets/{InvitePageListView-e7vGSbFa-BfSD0kcH.js → InvitePageListView-CP4K9tJi-CrsR5dUL.js} +42 -42
  104. package/dist/assets/InvitePeoplePage-VTM6kM1u-DEUyoj-n.js +12 -0
  105. package/dist/assets/{InvoiceUploadSection-Dg1-uunA-1cshMTVc.js → InvoiceUploadSection-it-ZYl1N-gndqObmu.js} +12 -12
  106. package/dist/assets/{IssueChargeCardPage-CyF9wrb0-CWwHqex_.js → IssueChargeCardPage-CVfuvGey-DLZauQU0.js} +20 -20
  107. package/dist/assets/{LabeledAddressValue-3l0Bv00--Bw_81ZJz.js → LabeledAddressValue-DDrQcHIE-CrQXufeN.js} +2 -2
  108. package/dist/assets/LabeledAddressValueField-BgWwd5Gw-BjdQu4oY.js +45 -0
  109. package/dist/assets/{LabeledControlledCheckBoxField-BgC8y0D6-BlS4qFJC.js → LabeledControlledCheckBoxField-CcPO1k23-wgZTidrw.js} +1 -1
  110. package/dist/assets/{LabeledCountryMultiSelectField-3qI_4noU-UcVNXOp1.js → LabeledCountryMultiSelectField-BYYjzwUG-Dh1nhUsB.js} +1 -1
  111. package/dist/assets/{LabeledCreatableSingleSelectField-BV3h9bh7-BCEINAy7.js → LabeledCreatableSingleSelectField-CISYMojq-C0CA90PE.js} +6 -6
  112. package/dist/assets/{LabeledDocumentField-rriEcsdr-CcDZw3QZ.js → LabeledDocumentField-C_bcFxdY-rxfuitkN.js} +1 -1
  113. package/dist/assets/{LabeledDropDownFormattedTextField-DoVSg3nZ-82mPtDTT.js → LabeledDropDownFormattedTextField-ScGGCap8-5XDDElAU.js} +5 -5
  114. package/dist/assets/{LabeledEmailInputField-CKWZEkTs-C9DTkL1y.js → LabeledEmailInputField-BppuWRbl-BqM5ToGw.js} +7 -7
  115. package/dist/assets/{LabeledNameField-yaSRe5Vt-cnDt7eal.js → LabeledNameField-mxSNQk3k-DSUzbE3j.js} +1 -1
  116. package/dist/assets/{LabeledSingleSelectField-D5QUlcEP-DOA8WTdI.js → LabeledSingleSelectField-C6ctNzkA-DJY2_gU-.js} +2 -2
  117. package/dist/assets/{LabeledText-DGZ7hxY4-BBOC0Eln.js → LabeledText-C8Y7EOsX-BG8Z0MTH.js} +3 -3
  118. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-DI07Eicg-NPjB_w_o.js → LabeledUserSingleSelectWithSubtitlesField-C8JxAcOT-eV0BTiQT.js} +11 -11
  119. package/dist/assets/{LabeledZeniRolesDropDownField-jIrTovp--C7mgztQg.js → LabeledZeniRolesDropDownField-BZtreVpj-BQKcvtGQ.js} +6 -6
  120. package/dist/assets/{LinkJETransactionPage-Bvbqpltz-BZhW34oI.js → LinkJETransactionPage-CKq4oiX9-BMq1iE01.js} +10 -10
  121. package/dist/assets/{LockCardPage-DyEQBJYx-DksW1-ZG.js → LockCardPage-CZENNby7-fCE1WXTx.js} +14 -14
  122. package/dist/assets/{LowBalancePopup-C2vHKMNF-CMEceag2.js → LowBalancePopup-1727S1ri-CiFxrWZ6.js} +5 -5
  123. package/dist/assets/MagicLinkACHDetailsPage-BSOlSfNu-C5Jji5Bc.js +1 -0
  124. package/dist/assets/MagicLinkDomesticWireDetailsPage-D1DTPo0E-DNJbU9wA.js +1 -0
  125. package/dist/assets/MagicLinkInternationalWireDetailsPage-D_wo_2nm-BDPVvMNI.js +1 -0
  126. package/dist/assets/MagicLinkRoutes-BBf-u6YU.js +72 -0
  127. package/dist/assets/MagicLinkSignInScreen-BGYMIMGW.js +12 -0
  128. package/dist/assets/{MagicLinkSuccessPage-B1LBYM2F-DRIhjweE.js → MagicLinkSuccessPage-QMkZgQLG-0gaJkIUo.js} +6 -6
  129. package/dist/assets/{MagicLinkTitleSection-ClAnBBt9-BWJjfwMs.js → MagicLinkTitleSection-CARU1oLQ-D-x2cYul.js} +9 -9
  130. package/dist/assets/MailingDetailsSection-ByOPaJ05-C__aFJd6.js +21 -0
  131. package/dist/assets/MobileAppDrawer-TF-9OTZ8.js +1 -0
  132. package/dist/assets/{MoreMenuButton-Ct8k8Oax-C0IXgNiJ.js → MoreMenuButton-BsBKwXvk-DeCIVX9G.js} +18 -18
  133. package/dist/assets/{MyBankConnectionsSettingsPage-CBNYcuP4-CSPIvvUE.js → MyBankConnectionsSettingsPage-BdgIIhL1-DSKnFya9.js} +6 -6
  134. package/dist/assets/{MyPendingActivationChargeCardListPage-n71n40uQ-DnLQhl3T.js → MyPendingActivationChargeCardListPage-CX38bDdq-CKY6khDW.js} +1 -1
  135. package/dist/assets/MyProfileSettingsPage-DYu0Fx6I-MQ1Uu5yx.js +85 -0
  136. package/dist/assets/{NavBarWithPicker-CbjFNysh-Ck578WIs.js → NavBarWithPicker-CGGEvLwe-xLu9BDbC.js} +8 -8
  137. package/dist/assets/{NavigationArrow-Dpc7u6y4-CiTKhYeI.js → NavigationArrow-CTNkKUtV-Cv--eO3H.js} +1 -1
  138. package/dist/assets/NavigationDots-Dvce3gHt-B5IBT8ql.js +15 -0
  139. package/dist/assets/{NewGlobalMerchantPage-B10sY6Q_-Cu6PKFa1.js → NewGlobalMerchantPage-D_f7z47T-DZeAHBD8.js} +12 -12
  140. package/dist/assets/NoDataChart-CrKeqWSr-aTXx8C4D.js +26 -0
  141. package/dist/assets/{NoDataTable-C6Q2Anpz-BqTI2GFx.js → NoDataTable-4vPXmPYF-MAxQ6k5D.js} +1 -1
  142. package/dist/assets/{NotFoundPage-4mPhXD5--pWqZwF3K.js → NotFoundPage-BLWPU1wU-BDFevjLh.js} +4 -4
  143. package/dist/assets/NotFoundScreen-BOQb1xUE.js +1 -0
  144. package/dist/assets/NotificationRoutes-CHyP48D4.js +1 -0
  145. package/dist/assets/{NotificationSettingsPage-BTxCoB_b-1ycVlHAN.js → NotificationSettingsPage-CDiDLX3A-CdiPU3_w.js} +30 -30
  146. package/dist/assets/NotificationsListConfig-B5pDa4cJ-C0GWEb8S.js +1 -0
  147. package/dist/assets/{NotificationsPage-D41h0mS6-lOcsglza.js → NotificationsPage-Ccl7Dny1-CsnU2sZr.js} +18 -18
  148. package/dist/assets/{OpExByVendorPage-BV_uJSCh-ClxLsbjb.js → OpExByVendorPage-spd-nKV4-Cz37eGG7.js} +9 -9
  149. package/dist/assets/OverlayContainerPage-BG9y5C0t-DvO1fY_N.js +11 -0
  150. package/dist/assets/{PandLWithForecastPage-Cj3UWjG4-C0webWAA.js → PandLWithForecastPage-TSoe4Z7F-xn1jaFoi.js} +11 -11
  151. package/dist/assets/PandLWithForecastRoutes-DWeIYgqG.js +1 -0
  152. package/dist/assets/{PaymentAccountSetupBillingAddressSection-BWFl695q-DCuXfW77.js → PaymentAccountSetupBillingAddressSection-9ma8SpIa-BDBHBe3a.js} +10 -10
  153. package/dist/assets/{PeoplePage-DcGqWtAP-kL10xLdE.js → PeoplePage-b5_I0qOw-lWi2XLJ6.js} +16 -16
  154. package/dist/assets/PeopleRoutes-D96ZRShY.js +22 -0
  155. package/dist/assets/PerformanceRoutes-w_Iip8ae.js +1 -0
  156. package/dist/assets/{Preview-Bd0e5eLk.js → Preview-C2zvk1tu.js} +1 -1
  157. package/dist/assets/{ProductsCarousel-C9JoJQeH-y7_emSya.js → ProductsCarousel-C3M0ocdF-2raBZnNq.js} +3 -3
  158. package/dist/assets/{PromoBaseCards-mFk7SsOr-B_0Pg0f0.js → PromoBaseCards-BOGJI2ws-Cm4e0wPQ.js} +1 -1
  159. package/dist/assets/{QBOConnectionDialog-CJsIrEZq-CgfqE4WV.js → QBOConnectionDialog-CmpnnuzP-BhhJabU7.js} +4 -4
  160. package/dist/assets/{QBOConnectionScreen-1Q56jIZw.js → QBOConnectionScreen-CCeXLrlB.js} +1 -1
  161. package/dist/assets/{QBOSetupSection-C_fqHza_-B72ZoKWs.js → QBOSetupSection-DjnN9dgv-6umyaC6d.js} +14 -14
  162. package/dist/assets/ReferralListScreen-DY8vZLmY.js +5 -0
  163. package/dist/assets/ReimbursementApprovalRoutes-kgV17rI7.js +1 -0
  164. package/dist/assets/{ReimbursementApprovalRuleDetailPage-BMZnKpsk-C22qLIuK.js → ReimbursementApprovalRuleDetailPage-D5NXjrO9-Bjrjwfbm.js} +2 -2
  165. package/dist/assets/ReimbursementApprovalRuleDetailScreen-CrQlcAIE.js +1 -0
  166. package/dist/assets/{ReimbursementApprovalRulesPage-C2zNa8dT-D_08-i4Q.js → ReimbursementApprovalRulesPage-BsCTIqUJ-CQyWyznw.js} +5 -5
  167. package/dist/assets/{ReimbursementDetailPage-B1o8ea57-pJYrfLLt.js → ReimbursementDetailPage-BbyxE2uL-DAWO6MN3.js} +16 -16
  168. package/dist/assets/{ReimbursementPromoPage-Df5QmXzC-CKWnZWeo.js → ReimbursementPromoPage-CyEgwqcf-D5kNu4r7.js} +10 -10
  169. package/dist/assets/{ReimbursementRoutes-RM0BTfix.js → ReimbursementRoutes-9PVCls-1.js} +3 -3
  170. package/dist/assets/{ReimbursementSetUpPage-D450RVsP-XThkQYrn.js → ReimbursementSetUpPage-RETPkEQd-zKPq6P2O.js} +9 -9
  171. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-DwgKrhlQ-Dpv01EXR.js → ReimbursementsBulkReviewDrawerPage-DnmYl0FM-Cp5RXmHi.js} +1 -1
  172. package/dist/assets/{ReloadCard-D5cvzWxe-BiXLC8Nt.js → ReloadCard-Bdoo0XiI-CgAT4eqC.js} +4 -4
  173. package/dist/assets/{ReportTableViewSelector-Ig41fOPb-DWudlBCf.js → ReportTableViewSelector-Bc1K7mU_-CRH7B2Xe.js} +9 -9
  174. package/dist/assets/{ReportsPage-CRAVAUTO-B8oVNLjt.js → ReportsPage-BOTHMLWh-DYARtx-l.js} +7 -7
  175. package/dist/assets/ReportsRoutes-DAq_Kk7t.js +1 -0
  176. package/dist/assets/{RevenueChart-DtQu0KAn-8Nxk30mB.js → RevenueChart-DvyZ3aO7-D41DyD4f.js} +18 -18
  177. package/dist/assets/{ReviewDetailsPage-vui4TqeA-BHywFcJg.js → ReviewDetailsPage-BIMg1n2e-w51F2KtJ.js} +19 -19
  178. package/dist/assets/{ReviewOverlay-CUnL7H-a-C2Hax1dX.js → ReviewOverlay-CxwoiOLC-C8uqNFMN.js} +9 -9
  179. package/dist/assets/RewardsRoutes-2CDMw_SM.js +1 -0
  180. package/dist/assets/RoleWithToolTip-Ct3_VuDM-zYFjvA-a.js +22 -0
  181. package/dist/assets/{ScheduleDetailsFixedAssetsPage-D_Cls2jC-DT2hV6fF.js → ScheduleDetailsFixedAssetsPage-DiL5Dozk-DjOTIJE4.js} +3 -3
  182. package/dist/assets/{ScheduleDetailsPage-DmSLuM8g-BJX_WigV.js → ScheduleDetailsPage-5FWpLRtd-DdkQQcuL.js} +3 -3
  183. package/dist/assets/{ScheduleSequenceTable-js9_P_Lo-C0aHTQ-B.js → ScheduleSequenceTable-R3-PsXES-F_YuqAKO.js} +8 -8
  184. package/dist/assets/{ScreenRoutes-Ckyy2m-9.js → ScreenRoutes-D-VUXgUA.js} +2 -2
  185. package/dist/assets/{SetUpAccountSection-DYRWWXcL-BJMCbqBu.js → SetUpAccountSection-CctbMmoK-BIwzDeUn.js} +16 -16
  186. package/dist/assets/{SettingsRoutes-HPPA3EWU.js → SettingsRoutes-BCFW0mUs.js} +7 -7
  187. package/dist/assets/{SetupPagesScreen-Cz2ybo_2.js → SetupPagesScreen-D_H5m3yT.js} +6 -6
  188. package/dist/assets/{SignIn-CUJkZb3S-Cj2EgQsz.js → SignIn-CmgmnRm4-BefvH7_D.js} +16 -16
  189. package/dist/assets/{SignInScreen-BSE9oghj.js → SignInScreen-DNDiNfUZ.js} +1 -1
  190. package/dist/assets/SignOutScreen-CGgsrBqm.js +9 -0
  191. package/dist/assets/{SpendManagementListViewPage-BieufnDb-Cqid6Xsk.js → SpendManagementListViewPage-CFUxCqkU-DWVJ8T34.js} +11 -11
  192. package/dist/assets/{SpendManagementPerTabPage-BmUp80QX-B1ZhgxKn.js → SpendManagementPerTabPage-C-kqNTci-61EpQHHf.js} +55 -55
  193. package/dist/assets/{SpendManagementSection-DKZNTYXT-D04hpJmz.js → SpendManagementSection-CIz4nE_w-CLtvB3Jo.js} +24 -24
  194. package/dist/assets/{StatementItem-Dyt5Q0eR-jB2YMdu5.js → StatementItem-vVtoBN2w-CGfe2rf-.js} +3 -3
  195. package/dist/assets/StatementsPage-As5WOnMR-C07ZcwWR.js +58 -0
  196. package/dist/assets/{StatusSwitcher-BfQ9VbBH-C2uXiIL4.js → StatusSwitcher-Bv-ozN6U-BMGDezKv.js} +4 -4
  197. package/dist/assets/{SubTabSwitcher-CzGiuhk3-C7cKUv_v.js → SubTabSwitcher-D7QeM6nb-C5vo1QLg.js} +3 -3
  198. package/dist/assets/SuccessAnimation-hijccO_0-CXGCZdn9.js +13 -0
  199. package/dist/assets/SummaryCard-C2qoTsAY-LkZgmc3l.js +1 -0
  200. package/dist/assets/{TaskDetailPage-CyZxZdJB-DrITidSC.js → TaskDetailPage-QMk4DTDK-DuNonnMy.js} +39 -39
  201. package/dist/assets/TaskListScreen-DXCPcaMg.js +9 -0
  202. package/dist/assets/{TaskManagementPage-ucVAdv7x-Msj3UnnC.js → TaskManagementPage-BJwp32Ph-D-u68mRD.js} +64 -64
  203. package/dist/assets/TaskRoutes-Biii2LFo.js +9 -0
  204. package/dist/assets/{TimeRangeSwitcher-C3jXm39I-fOK0S_yE.js → TimeRangeSwitcher-D00bDDhP-BG1zi2IK.js} +2 -2
  205. package/dist/assets/{TimeframeSwitcher-CcYg-YQJ-DfqszobX.js → TimeframeSwitcher-DA99HdHt-BQziHQmj.js} +6 -6
  206. package/dist/assets/{TimeframeSwitcherWithToggle-w4YJno-p-mLBmOb3v.js → TimeframeSwitcherWithToggle-DyggDIQj-BfhUUfrK.js} +2 -2
  207. package/dist/assets/{TopExCard-D2PRxvFc-3B8t-gu0.js → TopExCard-Z1WabZ8c-CBwSMJxd.js} +6 -6
  208. package/dist/assets/{TopExDetailPage-C0uHdU7N-CImodBfZ.js → TopExDetailPage-CzHG4f9E-gwAj-hq_.js} +18 -18
  209. package/dist/assets/{TransactionActivityLogPage-CqYb19tY-MGx1R4Ww.js → TransactionActivityLogPage-CGKnjNfU-BApvDmwN.js} +1 -1
  210. package/dist/assets/TransactionDetailPage-1-mLOWSz-rzQ235mE.js +903 -0
  211. package/dist/assets/TransactionDetailRoutes-C36yIgf5.js +1 -0
  212. package/dist/assets/TransactionDetailScreen-B9QxqSWW.js +5 -0
  213. package/dist/assets/TransactionList-BB-xoIGm-Cfa3U35Q.js +153 -0
  214. package/dist/assets/{TransactionListBig-BrDWayQS-BY28Hg37.js → TransactionListBig-C5Sf5Xh--ILOBUs5F.js} +14 -14
  215. package/dist/assets/TransactionListPage-Cj7h1Ros-C0trpcRO.js +35 -0
  216. package/dist/assets/TransactionListRoutes-DYDLTelW.js +1 -0
  217. package/dist/assets/{TransactionVendorDetailPage-CQQuAR6V-DBSEzxOy.js → TransactionVendorDetailPage-SsrSOk3O-DvVZeIE6.js} +13 -13
  218. package/dist/assets/{TransferDrawerPage-DfFm-1-3-BhX0O4LO.js → TransferDrawerPage-BvKZ7vHF-gusMX693.js} +21 -21
  219. package/dist/assets/{TreasuryOverviewPage-CKSanlUG-CXaeORdV.js → TreasuryOverviewPage-DwvjMR4_-v_PwtYfB.js} +15 -15
  220. package/dist/assets/{TreasuryPromoPage-Dyip3H10-C2tUOOp5.js → TreasuryPromoPage-CtTFvSQW-CBUcln_7.js} +14 -14
  221. package/dist/assets/TreasuryRoutes-BL7M49IT.js +45 -0
  222. package/dist/assets/TreasuryStatementsPage-Catz8shX-B10cgIs5.js +58 -0
  223. package/dist/assets/{TreasuryTaxLetterPage-D3cV3a-8-ZsZIzn5I.js → TreasuryTaxLetterPage-D8hzCL5o-8bU6d1vy.js} +4 -4
  224. package/dist/assets/TrendChart-Bnp4Pcdf-CsoTufL2.js +16 -0
  225. package/dist/assets/{TrendWithTransactions-It4KDov3-DY_vu1lx.js → TrendWithTransactions-3D1FvM8G-Dwn_v3ES.js} +7 -7
  226. package/dist/assets/{UncategorizedAccountsMappingPage-BxBz2Ce0-BJNWUYth.js → UncategorizedAccountsMappingPage-DbyY-dYB-DJ-xU1nq.js} +5 -5
  227. package/dist/assets/{UnitIntegrationPage-gVgsk2ji-D4-73jRv.js → UnitIntegrationPage-CTzme1te-Kzmir-JV.js} +4 -4
  228. package/dist/assets/{UploadAdditionalDocumentOverlay-C5m8jqup-BRodE0Ls.js → UploadAdditionalDocumentOverlay-Wl4Spdpn-vi85vqk-.js} +1 -1
  229. package/dist/assets/{Vendor2FAPopup-DRwBzOwn-DD_9hpy1.js → Vendor2FAPopup-D0zYKkIv-Corqbsks.js} +1 -1
  230. package/dist/assets/VendorACHDetailsPage-YYX9aQdw-DWmocppw.js +1 -0
  231. package/dist/assets/{VendorDetailPage-jci1LqX3-BHXhYJF0.js → VendorDetailPage-Br9wIOnI-D1eJIjzb.js} +5 -5
  232. package/dist/assets/VendorDomesticWireDetailsPage-BpPgQRHI-BpbupYob.js +1 -0
  233. package/dist/assets/{VendorFiling1099EditablePage-8pYT3u-X-BDiOOpIL.js → VendorFiling1099EditablePage-himC7iD3-DuTr9_9d.js} +24 -24
  234. package/dist/assets/{VendorFirstReviewPage-CafakxA1-DGimiBs4.js → VendorFirstReviewPage-BbknTCBD-DB1g9Qot.js} +15 -15
  235. package/dist/assets/{VendorInternationalWireDetailsPage-DJeI-ZFW-Cgs5W7gM.js → VendorInternationalWireDetailsPage-CS595Xgc-CmEESHX6.js} +9 -9
  236. package/dist/assets/VendorInternationalWireSwiftDetailsPage-yhTjWXvw-D43LaVfJ.js +1 -0
  237. package/dist/assets/{VendorsAccountsSection-YX2g8ETe-YNhvXO1d.js → VendorsAccountsSection-CgSJu8wq-CW2zmnnP.js} +4 -4
  238. package/dist/assets/{VendorsRoutes-n5RcX0Vf.js → VendorsRoutes-C4N6gRBp.js} +23 -23
  239. package/dist/assets/{VerifyDevice-DeHW4GAi-ejYUh2le.js → VerifyDevice-Dvf0JsNN-CSGpw0v_.js} +2 -2
  240. package/dist/assets/VideoPlayer-VAzOGCDL-BYL37uoQ.js +77 -0
  241. package/dist/assets/{VideoPopup-CUP7ctgS-Cy6Bpggh.js → VideoPopup-BqvZ-XIh-DBw1PWZ3.js} +5 -5
  242. package/dist/assets/WiseConfirmationScreen-DNU9Mqxk.js +12 -0
  243. package/dist/assets/{ZeniAccountDetailPage-7NdkdSg3-trkVyM14.js → ZeniAccountDetailPage-GcwTJdB8-_6oIn_wc.js} +19 -19
  244. package/dist/assets/{ZeniAccountListViewPage-B-cs_xnc-DkcNyo5a.js → ZeniAccountListViewPage-CdwO0Duy-G5U6kbnQ.js} +35 -35
  245. package/dist/assets/{ZeniAccountNavBarPieces-CjRip0v9-Bv00yUCA.js → ZeniAccountNavBarPieces-BrSIfL36-CgdxCVoA.js} +5 -5
  246. package/dist/assets/{ZeniAccountPromoPage-BikXtkeH-BWgu0hz6.js → ZeniAccountPromoPage-JrcedQYB-BtfY6t2a.js} +20 -20
  247. package/dist/assets/{ZeniAccountRoutes-BdqNU648.js → ZeniAccountRoutes-uUgaZh13.js} +11 -11
  248. package/dist/assets/{ZeniAccountSetupPage-BRBsijVt-BBTbKTOF.js → ZeniAccountSetupPage-TKBfbgzJ-Ovrdcrt5.js} +1 -1
  249. package/dist/assets/ZeniAccountStatementScreen-CPFcfx6A.js +9 -0
  250. package/dist/assets/{ZeniAvatar-pjdoqfWE-DmYSRpHD.js → ZeniAvatar-Bzhq25CU-DO1x3yqH.js} +1 -1
  251. package/dist/assets/{ZeniCopyright-DDGvdmLF-CPeY3qcE.js → ZeniCopyright-DglqrTpl-iRqjfc19.js} +1 -1
  252. package/dist/assets/{ZeniDatePicker-K3F-G3-0-pGSyeWuf.js → ZeniDatePicker-BHXPxPnI-CRe89Wst.js} +6 -6
  253. package/dist/assets/{ZeniTransferAmountSlider-Cdg0TlHk-B_jBC96s.js → ZeniTransferAmountSlider-BcaZZuAw-BeVI8Qc_.js} +2 -2
  254. package/dist/assets/{accountMappingHelper-CMy_dzCB.js → accountMappingHelper-BVO1DeGB.js} +1 -1
  255. package/dist/assets/{add-to-wallet-DgdBD8_G-DZDSR_90.js → add-to-wallet-DgdBD8_G-CV8RMwhX.js} +1 -1
  256. package/dist/assets/{analytics-Buyhprzd.js → analytics-CZ3wLx3P.js} +1 -1
  257. package/dist/assets/{analyticsHelper-D9xdJK4b-DkISjLhy.js → analyticsHelper-CAYdbjhS-CB8PHHr8.js} +1 -1
  258. package/dist/assets/{analyticsHelper-CTH_kB-0.js → analyticsHelper-RqmdZ4w4.js} +1 -1
  259. package/dist/assets/{arrow-south-east-round-PEovUgvH-CxvC0Cnw.js → arrow-south-east-round-PEovUgvH-DB6pjtdO.js} +1 -1
  260. package/dist/assets/{auto-transfer-rule-mbafm5D3-BXD0aAHO.js → auto-transfer-rule-mbafm5D3-CrxycPHV.js} +1 -1
  261. package/dist/assets/{avatar-Dz7aEm3d-tC3a4UX-.js → avatar-Dz7aEm3d-B1h__iIh.js} +1 -1
  262. package/dist/assets/{bank-letter-BOcVjN6J-B3HKnrvN.js → bank-letter-BOcVjN6J-B0RfZgcz.js} +1 -1
  263. package/dist/assets/{calculateSize-zPet_z9g-UKcDxIjM.js → calculateSize-B2w5JPEU-BqvYgtxt.js} +1 -1
  264. package/dist/assets/{chartTypes-Dq3hUz_T-DlStt0to.js → chartTypes-CD3vrBsI-4eICteeW.js} +1 -1
  265. package/dist/assets/{clock-CJkylEKt-BFtrn8ev.js → clock-CJkylEKt-o4osYW2f.js} +1 -1
  266. package/dist/assets/common-BpxEACHl-SqfXrkK_.js +1 -0
  267. package/dist/assets/{commonDimensions-CGHIQ2To-BVJ-7SGP.js → commonDimensions-Oz1tdAcx-Cf4qEJmU.js} +1 -1
  268. package/dist/assets/{commonTypes-BAJPaPYg-qcmBeNCl.js → commonTypes-5tEXwrX4-F6mC0EfI.js} +1 -1
  269. package/dist/assets/{core-5sxMy3sZ.js → core-CVVdXRky.js} +1 -1
  270. package/dist/assets/{dash.all.min-CTYaOyx7.js → dash.all.min-C2vle8BQ.js} +1 -1
  271. package/dist/assets/{decodeURIComponentSafe-BXr_Lgnt.js → decodeURIComponentSafe-Da8IsQO4.js} +1 -1
  272. package/dist/assets/{dnd-Cfx_ai1S.js → dnd-CcRW__D6.js} +3 -3
  273. package/dist/assets/{dollar-round-D18u7nlm-BAPPb_YV.js → dollar-round-D18u7nlm-BkHqkGHG.js} +1 -1
  274. package/dist/assets/{downloadPdf-BI2Y41h2-C3b-r1N_.js → downloadPdf-Dsuxeias-CPZEuUrl.js} +1 -1
  275. package/dist/assets/{empty-CDKH4CBD.js → empty-BHbH22vT.js} +1 -1
  276. package/dist/assets/{empty-DLdEFiEn.js → empty-M26y6UyA.js} +1 -1
  277. package/dist/assets/epic-CiCSO3K5.js +2 -0
  278. package/dist/assets/{filter-cZIFUNvj-DR0oScp6.js → filter-cZIFUNvj-BeqNUW3e.js} +1 -1
  279. package/dist/assets/getLocaleForTenant-DBVI4ovb.js +1 -0
  280. package/dist/assets/{gift-box-Cmt9OgIZ-CLkhO8vB.js → gift-box-Cmt9OgIZ-CR0qdQnT.js} +1 -1
  281. package/dist/assets/{graphic-no-data-l-DU4J8fDt-BXfLioW6.js → graphic-no-data-l-DU4J8fDt-CslJm2fU.js} +1 -1
  282. package/dist/assets/{graphic-no-data-net-burn-l-CzmycA0m-DESi1ZUm.js → graphic-no-data-net-burn-l-CzmycA0m-Cj977U7E.js} +1 -1
  283. package/dist/assets/{handshake-BPg58FML-Cw8-rpU_.js → handshake-BPg58FML-tq0X0Kiz.js} +1 -1
  284. package/dist/assets/{helper-z5-P4a-y-DRvyDGbW.js → helper-Ckm10Uko-U81O1HXL.js} +1 -1
  285. package/dist/assets/{hyperlink-DQyCeXx2-DiF-LRfD.js → hyperlink-DQyCeXx2-D504LM2b.js} +1 -1
  286. package/dist/assets/{index-XrFKA72B.js → index-BZOQWoRX.js} +1 -1
  287. package/dist/assets/{index-BocbTmE1.js → index-BngCC-zG.js} +2513 -2513
  288. package/dist/assets/{index-a2iFhnhM.js → index-ClO_SXUU.js} +1 -1
  289. package/dist/assets/{index-Bsc8ZpcH.js → index-DiKwyzh3.js} +1 -1
  290. package/dist/assets/{index-DCFJ_6wy.js → index-jI4vB8VC.js} +1 -1
  291. package/dist/assets/{index-B6cTzWKI.js → index-uxYir9Bm.js} +1 -1
  292. package/dist/assets/{lexical-BAlvZZhY.js → lexical-DPtIv0jk.js} +1 -1
  293. package/dist/assets/{liveblocks-BsQBjN-0.js → liveblocks-CHs9GmLG.js} +17 -17
  294. package/dist/assets/{lottie-C2R6rGxS.js → lottie-D68Xb3aQ.js} +1 -1
  295. package/dist/assets/mapLoadingInProgressToTreeNode-jcHEi-mv-cRyD83dc.js +1 -0
  296. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-dsBogxKz-DAKgnUEj.js → mapSectionWithAcOnlyToTreeNode-Cgyt68f3-C2AYKRBA.js} +1 -1
  297. package/dist/assets/{mapSpacerToTreeNode-DMDEaLzQ-lo7UbRO0.js → mapSpacerToTreeNode-XgUp1xUb-VRJ6un-L.js} +1 -1
  298. package/dist/assets/{mapTimeframeBalancesToTreeNode-CW_wzI5T-BaeuL7EQ.js → mapTimeframeBalancesToTreeNode-Bre8FfBF-XT9mQqpQ.js} +1 -1
  299. package/dist/assets/mapTimeframeBalancesToTreeNode-DOyCX6ij-CGvd2Wmc.js +1 -0
  300. package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-D2IvFyR5-BVVmyoym.js +1 -0
  301. package/dist/assets/{media-player-BX2lrCiw.js → media-player-D-MhIu5T.js} +2 -2
  302. package/dist/assets/{money-2cg1MuG4-C1UnGCa2.js → money-2cg1MuG4-DZxnWrWu.js} +1 -1
  303. package/dist/assets/{mui-C_CXevf3.js → mui-DyGc7Pg8.js} +3 -3
  304. package/dist/assets/{page-detail-CWX5S47F-DCvximFz.js → page-detail-CWX5S47F-CXX81aXy.js} +1 -1
  305. package/dist/assets/{page-summary-D7_VQHwN-BBMfUdRp.js → page-summary-D7_VQHwN-V_V9hbFl.js} +1 -1
  306. package/dist/assets/{panelSelectedMixin-Cddsb26L-Kk0Lc2Dj.js → panelSelectedMixin-Cddsb26L-bdcPTs-R.js} +1 -1
  307. package/dist/assets/{pathToGoBack-D5dFRCuJ.js → pathToGoBack-CsNBJVc2.js} +1 -1
  308. package/dist/assets/pdf-BxqSCr4b.js +13 -0
  309. package/dist/assets/{pdf-lib-BLLlynNv.js → pdf-lib-jHogAi_2.js} +1 -1
  310. package/dist/assets/{plaid-Yyr3DBd8.js → plaid-xWfKHEqu.js} +1 -1
  311. package/dist/assets/{pusher-CQAuuZH-.js → pusher-pngVK7xY.js} +1 -1
  312. package/dist/assets/{radio-default-CiSgisfh-HLL7c7Ix.js → radio-default-CiSgisfh-sLqGTxQv.js} +1 -1
  313. package/dist/assets/{react-CEO525cE.js → react-B3z4onjT.js} +1 -1
  314. package/dist/assets/{react-B9pn5zl_.js → react-BC4BTRLG.js} +1 -1
  315. package/dist/assets/{react-COI-5ihT.js → react-BElDOWJc.js} +1 -1
  316. package/dist/assets/{react-BFykbpKw.js → react-BuoJ-wtg.js} +1 -1
  317. package/dist/assets/{react-YbLjyGgM.js → react-CuUL9Ybl.js} +1 -1
  318. package/dist/assets/{react-D7RjW9MW.js → react-DpxbyLPn.js} +1 -1
  319. package/dist/assets/{react-BmJ9wc4M.js → react-DyZ9MM_3.js} +3 -3
  320. package/dist/assets/{react-BEZA9UfV.js → react-mv5GPJR4.js} +1 -1
  321. package/dist/assets/{recharts-CTWfsY-L.js → recharts-CMjB5mmq.js} +36 -36
  322. package/dist/assets/{routePaths-_EQ7HBkZ.js → routePaths-B2Ez8xiG.js} +1 -1
  323. package/dist/assets/{sentry-DINNQYpi.js → sentry-CHlUi953.js} +1 -1
  324. package/dist/assets/{shield-DOlUxcFf-DFaW8QSC.js → shield-DOlUxcFf-u1WG480f.js} +1 -1
  325. package/dist/assets/{spend-limit-D6SyboD4-05QrBanM.js → spend-limit-D6SyboD4-DKcfJ6au.js} +1 -1
  326. package/dist/assets/toCOABalancesWithID-aLNB35t7-DBx2vR3D.js +1 -0
  327. package/dist/assets/{toChartData-BUf5HHim-BMyIU8Hn.js → toChartData-DUL6vnzJ-CHvhrhF4.js} +1 -1
  328. package/dist/assets/{transaction-placeholder-CpOwZAMG-kO6lyet9.js → transaction-placeholder-CpOwZAMG-BRNI97Lv.js} +1 -1
  329. package/dist/assets/{undo-b_3XZ5CX-CAOnjxt9.js → undo-b_3XZ5CX-CHRencVP.js} +1 -1
  330. package/dist/assets/{unlock-BPWn2I5L-fA9hPtxv.js → unlock-BPWn2I5L-BfuVrsIJ.js} +1 -1
  331. package/dist/assets/{upload-reimbursement-receipt-O2N8vcO7-BbiwxEOu.js → upload-reimbursement-receipt-O2N8vcO7-vYnAE0FP.js} +1 -1
  332. package/dist/assets/{uploadAttachment-DJA30WSD-Mme28mRP.js → uploadAttachment-Ck4wivBR-D3iFmRh8.js} +18 -18
  333. package/dist/assets/{uploadReceipts-CqDftTRt-DnJMDyN6.js → uploadReceipts-CIgkuVpu-DQDaRUPe.js} +1 -1
  334. package/dist/assets/{url-dGBmezhj.js → url-7B3Yv5Zc.js} +1 -1
  335. package/dist/assets/{url-BnrMVJye.js → url-CDjIygfF.js} +1 -1
  336. package/dist/assets/{useDeviceId-Dhw-GVYT.js → useDeviceId-CPhY1yO5.js} +1 -1
  337. package/dist/assets/useInitialThreadRequest-D3BmEojQ.js +1 -0
  338. package/dist/assets/{useLongPress-GCK2COYQ-CI59nlOM.js → useLongPress-GCK2COYQ-C-ro8Pxu.js} +1 -1
  339. package/dist/assets/{usp-line-BBd1wKwW-Bi23t2Q-.js → usp-line-BBd1wKwW-BHKdiO38.js} +1 -1
  340. package/dist/assets/{utils-DmE88LS_.js → utils-BpkJZQMI.js} +12 -12
  341. package/dist/assets/withTransactionSidePanel-D4jXMzEn.js +8 -0
  342. package/dist/assets/{zeni-epic-state-a7Sj5mjO.js → zeni-epic-state-D8D2Skiq.js} +6 -6
  343. package/dist/assets/{zeni-icon-only-COM3FcNM.js → zeni-icon-only-BUIVMYdQ.js} +1 -1
  344. package/dist/index.html +1 -1
  345. package/package.json +4 -4
  346. package/dist/assets/AccountInfoPage-B8upbXj9-Cm42EUIq.js +0 -18
  347. package/dist/assets/AccountInfoPageContent-CKpeDot5-CwoUlvIm.js +0 -149
  348. package/dist/assets/AddAddressForCardDrawer-riOPLnxb-DAb8sz-Z.js +0 -6
  349. package/dist/assets/AddressRoutes-CO2FKDgK.js +0 -1
  350. package/dist/assets/AddressScreen-DsuZFaVf.js +0 -9
  351. package/dist/assets/AgingReportsPage-D9I9afnB-Df3hrLUY.js +0 -79
  352. package/dist/assets/ApprovalRulesSettingsPage-DVGvJsQG-yl1UuAvx.js +0 -47
  353. package/dist/assets/ArAgingChart-Tcu0Lja_-BWNKgMZE.js +0 -24
  354. package/dist/assets/BalancesInsightWithToolTip-tiQUQUbX-DMW3pWLJ.js +0 -38
  355. package/dist/assets/BillPayApprovalRoutes-5Y0msu-c.js +0 -1
  356. package/dist/assets/ChargeCardPromoPage-Cz3rNFwM-CdxjjcEa.js +0 -222
  357. package/dist/assets/CheckDepositDrawerPage-D7_usOVn-DA-Kombi.js +0 -206
  358. package/dist/assets/CompanyPassportScreen-Dl29U7F0.js +0 -1
  359. package/dist/assets/CompleteProfile-CsbsHQ0p-DmLd2177.js +0 -52
  360. package/dist/assets/ConfettiBurst-duD341Gp-CKS6HfNq.js +0 -1
  361. package/dist/assets/ConnectionAuthScreen-CtmFWvaS.js +0 -11
  362. package/dist/assets/CustomerOnboardingAuthScreen-DtvN_x2S.js +0 -1
  363. package/dist/assets/CustomerOnboardingContainerPage-DVL4s-eV-uJRgyQW8.js +0 -1
  364. package/dist/assets/CustomerOnboardingRoutes-C_QLwzau.js +0 -23
  365. package/dist/assets/DashboardSidebarBackgroundAnimation-B3dtVAe2-DcsdDEM2.js +0 -12
  366. package/dist/assets/DepositAccTransactionItem-YuSXjbLh-DkrFIYaS.js +0 -76
  367. package/dist/assets/DomesticWireDetailScreen-CV-2twy7.js +0 -18
  368. package/dist/assets/DrawerScreen-0WDRSJz6.js +0 -1
  369. package/dist/assets/EditPeoplePage-8DalSMWH-CybAz5BL.js +0 -55
  370. package/dist/assets/EntityDetailPage-fmWuxHTZ-zOCr7HwT.js +0 -18
  371. package/dist/assets/EntityDetailRoutes-r6uNQDsF.js +0 -1
  372. package/dist/assets/ExpenseAutomationPage-4LJefgNh-n1--5-UE.js +0 -3628
  373. package/dist/assets/ExpenseAutomationRoutes-Dd80KoVV.js +0 -20
  374. package/dist/assets/FeaturePreviewScreen-D2Pa-R10.js +0 -1
  375. package/dist/assets/InsightsCardStack-uJWMkIZL-BDZTXUwm.js +0 -79
  376. package/dist/assets/InternationalWireVerificationPage-Cr3sDrT--Dj5HT769.js +0 -65
  377. package/dist/assets/InvitePeoplePage-BT_YVCP4-CQRb2c-r.js +0 -12
  378. package/dist/assets/LabeledAddressValueField-F9kvUR_r-9ELTRqNI.js +0 -45
  379. package/dist/assets/MagicLinkACHDetailsPage-lAAwAtH7-D8E0BCBV.js +0 -1
  380. package/dist/assets/MagicLinkDomesticWireDetailsPage-cv823ASo-Br4bjkHP.js +0 -1
  381. package/dist/assets/MagicLinkInternationalWireDetailsPage-C_SjsgC9-Dt-hi6Za.js +0 -1
  382. package/dist/assets/MagicLinkRoutes-DAnRUF47.js +0 -72
  383. package/dist/assets/MagicLinkSignInScreen-BRdR8FPq.js +0 -12
  384. package/dist/assets/MailingDetailsSection-9_XLl4bT-Bq5v10Od.js +0 -21
  385. package/dist/assets/MobileAppDrawer-DXy0Oi_h.js +0 -1
  386. package/dist/assets/MyProfileSettingsPage-BUMIjZYc-CAlzma3h.js +0 -85
  387. package/dist/assets/NavigationDots-DCpslVnm-D-4SKVAz.js +0 -15
  388. package/dist/assets/NoDataChart-9-bhq204-BNHp8Nld.js +0 -26
  389. package/dist/assets/NotFoundScreen-MU1vvTl3.js +0 -1
  390. package/dist/assets/NotificationRoutes-CiTIiIjp.js +0 -1
  391. package/dist/assets/NotificationsListConfig-CylnViXd-DEcj9I_Q.js +0 -1
  392. package/dist/assets/OverlayContainerPage-CkUYOhlh-C1amAlX0.js +0 -11
  393. package/dist/assets/PandLWithForecastRoutes-t6sqNQ0M.js +0 -1
  394. package/dist/assets/PeopleRoutes-DvMa0FHX.js +0 -22
  395. package/dist/assets/PerformanceRoutes-C97G2NlX.js +0 -1
  396. package/dist/assets/ReferralListScreen-DJHg0qdR.js +0 -5
  397. package/dist/assets/ReimbursementApprovalRoutes-5hvNi1ri.js +0 -1
  398. package/dist/assets/ReimbursementApprovalRuleDetailScreen-CE15OHBL.js +0 -1
  399. package/dist/assets/ReportsRoutes-yGE_MThE.js +0 -1
  400. package/dist/assets/RewardsRoutes-BLdquuw-.js +0 -1
  401. package/dist/assets/RoleWithToolTip-x2rnvWn9-CndfBCzZ.js +0 -22
  402. package/dist/assets/SignOutScreen-CDL-h93X.js +0 -9
  403. package/dist/assets/StatementsPage-CbtnJM5y-y3-8Ovdn.js +0 -58
  404. package/dist/assets/SuccessAnimation-DA3343II-B6vDBJ0_.js +0 -13
  405. package/dist/assets/SummaryCard-D61xzK3a-CfR23TFg.js +0 -1
  406. package/dist/assets/TaskListScreen-DwAEl1NC.js +0 -9
  407. package/dist/assets/TaskRoutes-Bz1uRNCx.js +0 -9
  408. package/dist/assets/TransactionDetailPage-D-NR_yZG-CxUKWZX4.js +0 -921
  409. package/dist/assets/TransactionDetailRoutes-CpDSsFwB.js +0 -1
  410. package/dist/assets/TransactionDetailScreen-DfuoY_gg.js +0 -5
  411. package/dist/assets/TransactionList-f6yB-byH-FETk5Iif.js +0 -157
  412. package/dist/assets/TransactionListPage-C-Z62y2d-DONuCLTJ.js +0 -35
  413. package/dist/assets/TransactionListRoutes-Bw5edFOJ.js +0 -1
  414. package/dist/assets/TreasuryRoutes-j5E27301.js +0 -45
  415. package/dist/assets/TreasuryStatementsPage-mljf2Van-DcI9l-or.js +0 -58
  416. package/dist/assets/TrendChart-fFlHCvNx-QKskVgw6.js +0 -16
  417. package/dist/assets/VendorACHDetailsPage-By2Ya2bv-Cwsi_OAL.js +0 -1
  418. package/dist/assets/VendorDomesticWireDetailsPage-uIDE-n5v-uvktM6eq.js +0 -1
  419. package/dist/assets/VendorInternationalWireSwiftDetailsPage-Co-5nTam-xgR7Rh7n.js +0 -1
  420. package/dist/assets/VideoPlayer-DxIfGrPu-C3cW7OOT.js +0 -77
  421. package/dist/assets/WiseConfirmationScreen-CJyMiRdY.js +0 -12
  422. package/dist/assets/ZeniAccountStatementScreen-DVjRkXeL.js +0 -9
  423. package/dist/assets/common-kiEGPQ33-BvLj55nP.js +0 -1
  424. package/dist/assets/epic-Bn4m6PJ6.js +0 -2
  425. package/dist/assets/getLocaleForTenant-BPL6tSgt.js +0 -1
  426. package/dist/assets/mapLoadingInProgressToTreeNode-DrC2Zs2y-B2Wt05iy.js +0 -1
  427. package/dist/assets/mapTimeframeBalancesToTreeNode-DvfKBCs5-Dl1ySEwF.js +0 -1
  428. package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-CGdkzFsp-CUYmne9-.js +0 -1
  429. package/dist/assets/pdf-DyB_VHQx.js +0 -13
  430. package/dist/assets/toCOABalancesWithID-P7keEtAg-CVzjqCh4.js +0 -1
  431. package/dist/assets/useInitialThreadRequest-GWflkp6K.js +0 -1
  432. package/dist/assets/withTransactionSidePanel-D4o5a7Hq.js +0 -8
@@ -1,3628 +0,0 @@
1
- import{ba as Ci,bb as $o,bc as Wu,dm as Qn,j as W,S as zr,O as $e,V as t,o as r,cd as Ku,y as St,X as Ie,ad as mi,L as Pn,j1 as Hi,j2 as Gu,E as ae,e as fe,x as pe,N as Yu,n as Hr,ab as ad,aj as sd,eB as qu,j3 as Ju,j4 as $r,bu as oi,j5 as Zu,w as xt,C as nt,bo as Se,l as Me,a8 as Eo,j6 as Qu,i as Lt,iN as Xu,s as eh,fG as th,bd as To,aR as nh,g as ih,H as at,j7 as oh,b as rh,bq as ah,bR as sh,aZ as lh,I as st,a9 as ld,bS as ch,a_ as dh,hv as uh,a5 as ht,cK as jo,dY as hh,aT as ph,k as gh,eg as Sn,dj as lt,an as bi,cR as cd,aP as mh,ht as fh,gr as xh,gj as dd,aU as yh,bg as pt,ar as wi,b6 as ud,j8 as Ch,bz as bh,at as hd,D as Ur,P as Fn,M as Bn,j9 as wh,cP as pd,ja as vh,jb as Sh,jc as kh,g2 as Vr,bF as vi,bV as No,aE as gd,aF as md,c8 as Si,dq as Wr,cM as $h,aM as Eh,bI as Th,bx as jh,bO as ki,b_ as $i,c1 as Ei,jd as Nh,d6 as tt,cN as Ti,cs as vn,hE as fd,a7 as ga,gl as xd,je as _h,b1 as yd,ga as wn,hm as Lo,ed as po,cc as Kr,A as Rh,ee as Cd,bf as Ih,fr as Ah,gv as bd,aA as Lh,jf as Dh,g5 as ma,i5 as fa,dh as wd,jg as vd,g3 as go,iv as xa,jh as Oh,ah as Mh,cT as Sd,a as fi,hM as kd,hV as Er,ji as Yn,dO as $d,dQ as Ed,i9 as Tr,ia as Td,ag as Gr,gw as Ph,gx as Fh,jj as Bh,cq as _o,hN as jd,f1 as Nd,jk as zh,e4 as Do,a1 as jr,cp as _d,jl as Hh,c6 as Uh,i0 as Vh,dn as Wh,jm as Kh,g8 as Gh,al as Oo,d_ as Yh,fl as qh,jn as Jh,dg as Zh,m as Qh,e1 as Xh,e2 as ep,e3 as tp,e6 as ya,e7 as Ca,e8 as np,gd as ip,ei as op,ej as rp,ek as ap}from"./index-BocbTmE1.js";import{e as ba,r as kt,g as sp,a as c,b as Rd}from"./sentry-DINNQYpi.js";import{n as y,G as lp,c as ke,k as ji}from"./mui-C_CXevf3.js";import{bG as ni,bs as Id,lb as cp,GU as wa,GV as xi,GW as dp,GX as up,GY as hp,GZ as pp,bp as Yr,G_ as gp,Fc as va,G$ as mp,H0 as fp,mn as ui,c0 as Nn,H1 as Sa,H2 as xp,c7 as Ad,cp as _n,H3 as yp,H4 as Ld,H5 as Dd,H6 as Od,H7 as Md,H8 as Pd,H9 as qr,lM as Cp}from"./zeni-epic-state-a7Sj5mjO.js";import{m as bp}from"./BusyIndication-Cd67eHX6-C7aB5h-1.js";import{L as wp}from"./common-kiEGPQ33-BvLj55nP.js";import{t as Jr}from"./panelSelectedMixin-Cddsb26L-Kk0Lc2Dj.js";import{u as vp}from"./plaid-Yyr3DBd8.js";import{v as Fd}from"./SuccessAnimation-DA3343II-B6vDBJ0_.js";import{t as Sp}from"./clock-CJkylEKt-BFtrn8ev.js";import{K as kp}from"./LabeledEmailInputField-CKWZEkTs-C9DTkL1y.js";import{f as $p,g as Ep}from"./liveblocks-BsQBjN-0.js";import{r as Ze}from"./lexical-BAlvZZhY.js";import{f as Tp,r as yi}from"./core-5sxMy3sZ.js";import{t as jp}from"./undo-b_3XZ5CX-CAOnjxt9.js";import{m as Bd,n as zd,a as qn,t as Jt}from"./CollapsableReportTable-h0vIfI8o-Q6XPsw6M.js";import{N as Mo}from"./AccountRow-BrW_eEjE-Cmf0Jids.js";import{o as Hd}from"./mapTimeframeBalancesToTreeNode-DvfKBCs5-Dl1ySEwF.js";import{d as ka}from"./mapLoadingInProgressToTreeNode-DrC2Zs2y-B2Wt05iy.js";import{h as Np}from"./VendorsAccountsSection-YX2g8ETe-YNhvXO1d.js";import{u as _p,c as $a,d as Rp,m as Ip}from"./uploadAttachment-DJA30WSD-Mme28mRP.js";import{t as Ap}from"./bank-letter-BOcVjN6J-B3HKnrvN.js";import{t as Lp}from"./upload-reimbursement-receipt-O2N8vcO7-BbiwxEOu.js";import"./lottie-C2R6rGxS.js";import"./pdf-DyB_VHQx.js";import"./dnd-Cfx_ai1S.js";import"./analytics-Buyhprzd.js";import"./recharts-CTWfsY-L.js";import"./utils-DmE88LS_.js";import"./calculateSize-zPet_z9g-UKcDxIjM.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="136f8819-b1fd-4b04-9fbb-86270a2b759f",e._sentryDebugIdIdentifier="sentry-dbid-136f8819-b1fd-4b04-9fbb-86270a2b759f")}catch{}})();var Ea,Ve={},Ta={exports:{}};function Dp(){return Ea||(Ea=1,function(e){var n=function(a){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,f=0,x={},o={manual:a.Prism&&a.Prism.manual,disableWorkerMessageHandler:a.Prism&&a.Prism.disableWorkerMessageHandler,util:{encode:function u(m){return m instanceof l?new l(m.type,u(m.content),m.alias):Array.isArray(m)?m.map(u):m.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(u){return Object.prototype.toString.call(u).slice(8,-1)},objId:function(u){return u.__id||Object.defineProperty(u,"__id",{value:++f}),u.__id},clone:function u(m,E){var k,j;switch(E=E||{},o.util.type(m)){case"Object":if(j=o.util.objId(m),E[j])return E[j];for(var D in k={},E[j]=k,m)m.hasOwnProperty(D)&&(k[D]=u(m[D],E));return k;case"Array":return j=o.util.objId(m),E[j]?E[j]:(k=[],E[j]=k,m.forEach(function(M,_){k[_]=u(M,E)}),k);default:return m}},getLanguage:function(u){for(;u;){var m=i.exec(u.className);if(m)return m[1].toLowerCase();u=u.parentElement}return"none"},setLanguage:function(u,m){u.className=u.className.replace(RegExp(i,"gi"),""),u.classList.add("language-"+m)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(k){var u=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(k.stack)||[])[1];if(u){var m=document.getElementsByTagName("script");for(var E in m)if(m[E].src==u)return m[E]}return null}},isActive:function(u,m,E){for(var k="no-"+m;u;){var j=u.classList;if(j.contains(m))return!0;if(j.contains(k))return!1;u=u.parentElement}return!!E}},languages:{plain:x,plaintext:x,text:x,txt:x,extend:function(u,m){var E=o.util.clone(o.languages[u]);for(var k in m)E[k]=m[k];return E},insertBefore:function(u,m,E,k){var j=(k=k||o.languages)[u],D={};for(var M in j)if(j.hasOwnProperty(M)){if(M==m)for(var _ in E)E.hasOwnProperty(_)&&(D[_]=E[_]);E.hasOwnProperty(M)||(D[M]=j[M])}var R=k[u];return k[u]=D,o.languages.DFS(o.languages,function(A,F){F===R&&A!=u&&(this[A]=D)}),D},DFS:function u(m,E,k,j){j=j||{};var D=o.util.objId;for(var M in m)if(m.hasOwnProperty(M)){E.call(m,M,m[M],k||M);var _=m[M],R=o.util.type(_);R!=="Object"||j[D(_)]?R!=="Array"||j[D(_)]||(j[D(_)]=!0,u(_,E,M,j)):(j[D(_)]=!0,u(_,E,null,j))}}},plugins:{},highlightAll:function(u,m){o.highlightAllUnder(document,u,m)},highlightAllUnder:function(u,m,E){var k={callback:E,container:u,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",k),k.elements=Array.prototype.slice.apply(k.container.querySelectorAll(k.selector)),o.hooks.run("before-all-elements-highlight",k);for(var j,D=0;j=k.elements[D++];)o.highlightElement(j,m===!0,k.callback)},highlightElement:function(u,m,E){var k=o.util.getLanguage(u),j=o.languages[k];o.util.setLanguage(u,k);var D=u.parentElement;D&&D.nodeName.toLowerCase()==="pre"&&o.util.setLanguage(D,k);var M={element:u,language:k,grammar:j,code:u.textContent};function _(A){M.highlightedCode=A,o.hooks.run("before-insert",M),M.element.innerHTML=M.highlightedCode,o.hooks.run("after-highlight",M),o.hooks.run("complete",M),E&&E.call(M.element)}if(o.hooks.run("before-sanity-check",M),(D=M.element.parentElement)&&D.nodeName.toLowerCase()==="pre"&&!D.hasAttribute("tabindex")&&D.setAttribute("tabindex","0"),!M.code)return o.hooks.run("complete",M),void(E&&E.call(M.element));if(o.hooks.run("before-highlight",M),M.grammar)if(m&&a.Worker){var R=new Worker(o.filename);R.onmessage=function(A){_(A.data)},R.postMessage(JSON.stringify({language:M.language,code:M.code,immediateClose:!0}))}else _(o.highlight(M.code,M.grammar,M.language));else _(o.util.encode(M.code))},highlight:function(u,m,E){var k={code:u,grammar:m,language:E};if(o.hooks.run("before-tokenize",k),!k.grammar)throw new Error('The language "'+k.language+'" has no grammar.');return k.tokens=o.tokenize(k.code,k.grammar),o.hooks.run("after-tokenize",k),l.stringify(o.util.encode(k.tokens),k.language)},tokenize:function(u,m){var E=m.rest;if(E){for(var k in E)m[k]=E[k];delete m.rest}var j=new w;return d(j,j.head,u),v(u,j,m,j.head,0),function(D){for(var M=[],_=D.head.next;_!==D.tail;)M.push(_.value),_=_.next;return M}(j)},hooks:{all:{},add:function(u,m){var E=o.hooks.all;E[u]=E[u]||[],E[u].push(m)},run:function(u,m){var E=o.hooks.all[u];if(E&&E.length)for(var k,j=0;k=E[j++];)k(m)}},Token:l};function l(u,m,E,k){this.type=u,this.content=m,this.alias=E,this.length=0|(k||"").length}function p(u,m,E,k){u.lastIndex=m;var j=u.exec(E);if(j&&k&&j[1]){var D=j[1].length;j.index+=D,j[0]=j[0].slice(D)}return j}function v(u,m,E,k,j,D){for(var M in E)if(E.hasOwnProperty(M)&&E[M]){var _=E[M];_=Array.isArray(_)?_:[_];for(var R=0;R<_.length;++R){if(D&&D.cause==M+","+R)return;var A=_[R],F=A.inside,K=!!A.lookbehind,ee=!!A.greedy,te=A.alias;if(ee&&!A.pattern.global){var Z=A.pattern.toString().match(/[imsuy]*$/)[0];A.pattern=RegExp(A.pattern.source,Z+"g")}for(var B=A.pattern||A,O=k.next,g=j;O!==m.tail&&!(D&&g>=D.reach);g+=O.value.length,O=O.next){var h=O.value;if(m.length>u.length)return;if(!(h instanceof l)){var N,$=1;if(ee){if(!(N=p(B,g,u,K))||N.index>=u.length)break;var b=N.index,I=N.index+N[0].length,L=g;for(L+=O.value.length;b>=L;)L+=(O=O.next).value.length;if(g=L-=O.value.length,O.value instanceof l)continue;for(var U=O;U!==m.tail&&(L<I||typeof U.value=="string");U=U.next)$++,L+=U.value.length;$--,h=u.slice(g,L),N.index-=g}else if(!(N=p(B,0,h,K)))continue;b=N.index;var Q=N[0],Y=h.slice(0,b),z=h.slice(b+Q.length),H=g+h.length;D&&H>D.reach&&(D.reach=H);var V=O.prev;if(Y&&(V=d(m,V,Y),g+=Y.length),s(m,V,$),O=d(m,V,new l(M,F?o.tokenize(Q,F):Q,te,Q)),z&&d(m,O,z),$>1){var G={cause:M+","+R,reach:H};v(u,m,E,O.prev,g,G),D&&G.reach>D.reach&&(D.reach=G.reach)}}}}}}function w(){var u={value:null,prev:null,next:null},m={value:null,prev:u,next:null};u.next=m,this.head=u,this.tail=m,this.length=0}function d(u,m,E){var k=m.next,j={value:E,prev:m,next:k};return m.next=j,k.prev=j,u.length++,j}function s(u,m,E){for(var k=m.next,j=0;j<E&&k!==u.tail;j++)k=k.next;m.next=k,k.prev=m,u.length-=j}if(a.Prism=o,l.stringify=function u(m,E){if(typeof m=="string")return m;if(Array.isArray(m)){var k="";return m.forEach(function(R){k+=u(R,E)}),k}var j={type:m.type,content:u(m.content,E),tag:"span",classes:["token",m.type],attributes:{},language:E},D=m.alias;D&&(Array.isArray(D)?Array.prototype.push.apply(j.classes,D):j.classes.push(D)),o.hooks.run("wrap",j);var M="";for(var _ in j.attributes)M+=" "+_+'="'+(j.attributes[_]||"").replace(/"/g,"&quot;")+'"';return"<"+j.tag+' class="'+j.classes.join(" ")+'"'+M+">"+j.content+"</"+j.tag+">"},!a.document)return a.addEventListener&&(o.disableWorkerMessageHandler||a.addEventListener("message",function(u){var m=JSON.parse(u.data),E=m.language,k=m.code,j=m.immediateClose;a.postMessage(o.highlight(k,o.languages[E],E)),j&&a.close()},!1)),o;var C=o.util.currentScript();function S(){o.manual||o.highlightAll()}if(C&&(o.filename=C.src,C.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var T=document.readyState;T==="loading"||T==="interactive"&&C&&C.defer?document.addEventListener("DOMContentLoaded",S):window.requestAnimationFrame?window.requestAnimationFrame(S):window.setTimeout(S,16)}return o}(typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=n),ba!==void 0&&(ba.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(a){a.type==="entity"&&(a.attributes.title=a.content.replace(/&amp;/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(a,i){var f={};f["language-"+i]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[i]},f.cdata=/^<!\[CDATA\[|\]\]>$/i;var x={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:f}};x["language-"+i]={pattern:/[\s\S]+/,inside:n.languages[i]};var o={};o[a]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:x},n.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(a,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+a+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(a){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;a.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},a.languages.css.atrule.inside.rest=a.languages.css;var f=a.languages.markup;f&&(f.tag.addInlined("style","css"),f.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(n!==void 0&&typeof document<"u"){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var a={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},i="data-src-status",f="loading",x="loaded",o="pre[data-src]:not(["+i+'="'+x+'"]):not(['+i+'="'+f+'"])';n.hooks.add("before-highlightall",function(p){p.selector+=", "+o}),n.hooks.add("before-sanity-check",function(p){var v=p.element;if(v.matches(o)){p.code="",v.setAttribute(i,f);var w=v.appendChild(document.createElement("CODE"));w.textContent="Loading…";var d=v.getAttribute("data-src"),s=p.language;if(s==="none"){var C=(/\.(\w+)$/.exec(d)||[,"none"])[1];s=a[C]||C}n.util.setLanguage(w,s),n.util.setLanguage(v,s);var S=n.plugins.autoloader;S&&S.loadLanguages(s),function(T,u,m){var E=new XMLHttpRequest;E.open("GET",T,!0),E.onreadystatechange=function(){E.readyState==4&&(E.status<400&&E.responseText?u(E.responseText):E.status>=400?m("✖ Error "+E.status+" while fetching file: "+E.statusText):m("✖ Error: File does not exist or is empty"))},E.send(null)}(d,function(T){v.setAttribute(i,x);var u=function(j){var D=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(j||"");if(D){var M=Number(D[1]),_=D[2],R=D[3];return _?R?[M,Number(R)]:[M,void 0]:[M,M]}}(v.getAttribute("data-range"));if(u){var m=T.split(/\r\n?|\n/g),E=u[0],k=u[1]==null?m.length:u[1];E<0&&(E+=m.length),E=Math.max(0,Math.min(E-1,m.length)),k<0&&(k+=m.length),k=Math.max(0,Math.min(k,m.length)),T=m.slice(E,k).join(`
2
- `),v.hasAttribute("data-start")||v.setAttribute("data-start",String(E+1))}w.textContent=T,n.highlightElement(w)},function(T){v.setAttribute(i,"failed"),w.textContent=T})}}),n.plugins.fileHighlight={highlight:function(p){for(var v,w=(p||document).querySelectorAll(o),d=0;v=w[d++];)n.highlightElement(v)}};var l=!1;n.fileHighlight=function(){l||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),l=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}}()}(Ta)),Ta.exports}var ja,Na,_a,Ra,Op={};function Mp(){return Ra||(Ra=1,function(e){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function a(v){return v=v.replace(/<inner>/g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+v+")")}var i=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,f=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return i}),x=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+f+x+"(?:"+f+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+f+x+")(?:"+f+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(i),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+f+")"+x+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+f+"$"),inside:{"table-header":{pattern:RegExp(i),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:a(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:a(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:a(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:a(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(v){["url","bold","italic","strike","code-snippet"].forEach(function(w){v!==w&&(e.languages.markdown[v].inside.content.inside[w]=e.languages.markdown[w])})}),e.hooks.add("after-tokenize",function(v){v.language!=="markdown"&&v.language!=="md"||function w(d){if(d&&typeof d!="string")for(var s=0,C=d.length;s<C;s++){var S=d[s];if(S.type==="code"){var T=S.content[1],u=S.content[3];if(T&&u&&T.type==="code-language"&&u.type==="code-block"&&typeof T.content=="string"){var m=T.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),E="language-"+(m=(/[a-z][\w-]*/i.exec(m)||[""])[0].toLowerCase());u.alias?typeof u.alias=="string"?u.alias=[u.alias,E]:u.alias.push(E):u.alias=[E]}}else w(S.content)}}(v.tokens)}),e.hooks.add("wrap",function(v){if(v.type==="code-block"){for(var w="",d=0,s=v.classes.length;d<s;d++){var C=v.classes[d],S=/language-(.+)/.exec(C);if(S){w=S[1];break}}var T,u,m=e.languages[w];if(m)v.content=e.highlight((T=v.content,u=(u=T.replace(o,"")).replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(k,j){var D;if((j=j.toLowerCase())[0]==="#")return D=j[1]==="x"?parseInt(j.slice(2),16):Number(j.slice(1)),p(D);var M=l[j];return M||k}),u),m,w);else if(w&&w!=="none"&&e.plugins.autoloader){var E="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random());v.attributes.id=E,e.plugins.autoloader.loadLanguages(w,function(){var k=document.getElementById(E);k&&(k.innerHTML=e.highlight(k.textContent,e.languages[w],w))})}}});var o=RegExp(e.languages.markup.tag.pattern.source,"gi"),l={amp:"&",lt:"<",gt:">",quot:'"'},p=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism)),Op}var Ia,Aa,La,Da,Oa,Ma,Pa,Fa,Ba,za,Ha,Ua,Va,Wa,Ka,Ga,Ya,qa,Ja,ot={},Xe={};function Ni(){return Va?Ua:(Va=1,Ua=function(){if(Ha)return Xe;Ha=1;var n=Ze();let a=new Map;function i(s){for(;s!=null;){if(s.nodeType===Node.TEXT_NODE)return s;s=s.firstChild}return null}function f(s){let C=s.parentNode;if(C==null)throw Error("Should never happen");return[C,Array.from(C.childNodes).indexOf(s)]}function x(s){let C={};s=s.split(";");for(let S of s)if(S!==""){let[T,u]=S.split(/:([^]+)/);C[T.trim()]=u.trim()}return C}function o(s){let C=a.get(s);return C===void 0&&(C=x(s),a.set(s,C)),C}function l(s,C){var S=o("getStyle"in s?s.getStyle():s.style);C=Object.entries(C).reduce((T,[u,m])=>(m===null?delete T[u]:T[u]=m,T),{...S}),S=function(T){let u="";for(let m in T)m&&(u+=`${m}: ${T[m]};`);return u}(C),s.setStyle(S),a.set(S,C)}function p(s){for(;s!==null&&!n.$isRootOrShadowRoot(s);){let C=s.getLatest(),S=s.getParent();C.getChildrenSize()===0&&s.remove(!0),s=S}}function v(s,C,S,T,u=null){if(C.length!==0){var m=C[0],E=new Map,k=[];(m=n.$isElementNode(m)?m:m.getParentOrThrow()).isInline()&&(m=m.getParentOrThrow());for(var j=!1;m!==null;){var D=m.getPreviousSibling();if(D!==null){m=D,j=!0;break}if(m=m.getParentOrThrow(),n.$isRootOrShadowRoot(m))break}D=new Set;for(var M=0;M<S;M++){var _=C[M];n.$isElementNode(_)&&_.getChildrenSize()===0&&D.add(_.getKey())}var R=new Set;for(M=0;M<S;M++){var A=(_=C[M]).getParent();if(A!==null&&A.isInline()&&(A=A.getParent()),A!==null&&n.$isLeafNode(_)&&!R.has(_.getKey())){if(_=A.getKey(),E.get(_)===void 0){let F=T();F.setFormat(A.getFormatType()),F.setIndent(A.getIndent()),k.push(F),E.set(_,F),A.getChildren().forEach(K=>{F.append(K),R.add(K.getKey()),n.$isElementNode(K)&&K.getChildrenKeys().forEach(ee=>R.add(ee))}),p(A)}}else D.has(_.getKey())&&((A=T()).setFormat(_.getFormatType()),A.setIndent(_.getIndent()),k.push(A),_.remove(!0))}if(u!==null)for(C=0;C<k.length;C++)u.append(k[C]);if(C=null,n.$isRootOrShadowRoot(m))if(j)if(u!==null)m.insertAfter(u);else for(u=k.length-1;0<=u;u--)m.insertAfter(k[u]);else if(j=m.getFirstChild(),n.$isElementNode(j)&&(m=j),j===null)if(u)m.append(u);else for(u=0;u<k.length;u++)j=k[u],m.append(j),C=j;else if(u!==null)j.insertBefore(u);else for(m=0;m<k.length;m++)u=k[m],j.insertBefore(u),C=u;else if(u)m.insertAfter(u);else for(u=k.length-1;0<=u;u--)j=k[u],m.insertAfter(j),C=j;k=n.$getPreviousSelection(),n.$isRangeSelection(k)&&k.anchor.getNode().isAttached()&&k.focus.getNode().isAttached()?n.$setSelection(k.clone()):C!==null?C.selectEnd():s.dirty=!0}}function w(s,C,S,T){s.modify(C?"extend":"move",S,T)}function d(s){return s=s.anchor.getNode(),(n.$isRootNode(s)?s:s.getParentOrThrow()).getDirection()==="rtl"}return Xe.$addNodeStyle=function(s){let C=x(s=s.getStyle());a.set(s,C)},Xe.$cloneWithProperties=function(s){let C=(s=s.getLatest()).constructor.clone(s);return C.__parent=s.__parent,C.__next=s.__next,C.__prev=s.__prev,n.$isElementNode(s)&&n.$isElementNode(C)?(C.__first=s.__first,C.__last=s.__last,C.__size=s.__size,C.__format=s.__format,C.__indent=s.__indent,C.__dir=s.__dir,C):(n.$isTextNode(s)&&n.$isTextNode(C)&&(C.__format=s.__format,C.__style=s.__style,C.__mode=s.__mode,C.__detail=s.__detail),C)},Xe.$getSelectionStyleValueForProperty=function(s,C,S=""){let T=null,u=s.getNodes();var m=s.anchor,E=s.focus,k=s.isBackward();let j=k?E.offset:m.offset;if(m=k?E.getNode():m.getNode(),s.style!==""&&(s=o(s.style))!==null&&C in s)return s[C];for(s=0;s<u.length;s++){var D=u[s];if((s===0||j!==0||!D.is(m))&&n.$isTextNode(D)){if(E=C,k=S,E=(D=o(D=D.getStyle()))!==null&&D[E]||k,T===null)T=E;else if(T!==E){T="";break}}}return T===null?S:T},Xe.$isAtNodeEnd=function(s){return s.type==="text"?s.offset===s.getNode().getTextContentSize():s.offset===s.getNode().getChildrenSize()},Xe.$isParentElementRTL=d,Xe.$moveCaretSelection=w,Xe.$moveCharacter=function(s,C,S){let T=d(s);w(s,C,S?!T:T,"character")},Xe.$patchStyleText=function(s,C){var S=s.getNodes();let T=S.length-1,u=S[0],m=S[T];if(s.isCollapsed())l(s,C);else{var E=s.anchor,k=s.focus,j=u.getTextContent().length,D=k.offset,M=E.offset,_=E.isBefore(k),R=_?M:D;s=_?D:M;var A=_?E.type:k.type,F=_?k.type:E.type;if(E=_?k.key:E.key,n.$isTextNode(u)&&R===j&&(k=u.getNextSibling(),n.$isTextNode(k)&&(R=M=0,u=k)),S.length===1)n.$isTextNode(u)&&(R=A==="element"?0:M>D?D:M)!==(s=F==="element"?j:M>D?M:D)&&(R===0&&s===j?(l(u,C),u.select(R,s)):(S=u.splitText(R,s),l(S=R===0?S[0]:S[1],C),S.select(0,s-R)));else for(n.$isTextNode(u)&&R<u.getTextContentSize()&&(R!==0&&(u=u.splitText(R)[1]),l(u,C)),n.$isTextNode(m)&&(R=m.getTextContent().length,m.__key!==E&&s!==0&&(s=R),s!==R&&([m]=m.splitText(s)),s!==0&&l(m,C)),s=1;s<T;s++)j=(R=S[s]).getKey(),n.$isTextNode(R)&&j!==u.getKey()&&j!==m.getKey()&&!R.isToken()&&l(R,C)}},Xe.$selectAll=function(s){let C=s.anchor;s=s.focus;var S=C.getNode().getTopLevelElementOrThrow().getParentOrThrow();let T=S.getFirstDescendant();S=S.getLastDescendant();let u="element",m="element",E=0;n.$isTextNode(T)?u="text":n.$isElementNode(T)||T===null||(T=T.getParentOrThrow()),n.$isTextNode(S)?(m="text",E=S.getTextContentSize()):n.$isElementNode(S)||S===null||(S=S.getParentOrThrow()),T&&S&&(C.set(T.getKey(),0,u),s.set(S.getKey(),E,m))},Xe.$setBlocksType=function(s,C){if(s.anchor.key==="root"){C=C();var S=n.$getRoot();(s=S.getFirstChild())?s.replace(C,!0):S.append(C)}else for(S=s.getNodes(),s=s.anchor.getNode().getParentOrThrow(),S.indexOf(s)===-1&&S.push(s),s.isInline()&&(s=s.getParentOrThrow(),S.indexOf(s)===-1&&S.push(s)),s=0;s<S.length;s++){let m=S[s];var T=m;if(!n.$isElementNode(T)||n.$isRootOrShadowRoot(T))T=!1;else{var u=T.getFirstChild();u=u===null||n.$isTextNode(u)||u.isInline(),T=!T.isInline()&&T.canBeEmpty()!==!1&&u}T&&((T=C()).setFormat(m.getFormatType()),T.setIndent(m.getIndent()),m.replace(T,!0))}},Xe.$shouldOverrideDefaultCharacterSelection=function(s,C){return s=n.$getAdjacentNode(s.focus,C),n.$isDecoratorNode(s)&&!s.isIsolated()||n.$isElementNode(s)&&!s.isInline()&&!s.canBeEmpty()},Xe.$sliceSelectedTextNodeContent=function(s,C){if(C.isSelected()&&!C.isSegmented()&&!C.isToken()&&(n.$isRangeSelection(s)||n.DEPRECATED_$isGridSelection(s))){var S=s.anchor.getNode(),T=s.focus.getNode(),u=C.is(S),m=C.is(T);if(u||m){u=s.isBackward();let E,[k,j]=s.getCharacterOffsets();s=S.is(T),m=C.is(u?T:S),T=C.is(u?S:T),S=0,s?(S=k>j?j:k,E=k>j?k:j):m?(S=u?j:k,E=void 0):T&&(S=0,E=u=u?k:j),C.__text=C.__text.slice(S,E)}}return C},Xe.$wrapNodes=function(s,C,S=null){var T=s.getNodes();let u=T.length;var m=s.anchor;if(u===0||u===1&&m.type==="element"&&m.getNode().getChildrenSize()===0){T=(s=m.type==="text"?m.getNode().getParentOrThrow():m.getNode()).getChildren();let k=C();k.setFormat(s.getFormatType()),k.setIndent(s.getIndent()),T.forEach(j=>k.append(j)),S&&(k=S.append(k)),s.replace(k)}else{m=null;var E=[];for(let k=0;k<u;k++){let j=T[k];n.$isRootOrShadowRoot(j)?(v(s,E,E.length,C,S),E=[],m=j):m===null||m!==null&&n.$hasAncestor(j,m)?E.push(j):(v(s,E,E.length,C,S),E=[j])}v(s,E,E.length,C,S)}},Xe.createDOMRange=function(s,C,S,T,u){let m=C.getKey(),E=T.getKey(),k=document.createRange(),j=s.getElementByKey(m);if(s=s.getElementByKey(E),n.$isTextNode(C)&&(j=i(j)),n.$isTextNode(T)&&(s=i(s)),C===void 0||T===void 0||j===null||s===null)return null;j.nodeName==="BR"&&([j,S]=f(j)),s.nodeName==="BR"&&([s,u]=f(s)),C=j.firstChild,j===s&&C!=null&&C.nodeName==="BR"&&S===0&&u===0&&(u=1);try{k.setStart(j,S),k.setEnd(s,u)}catch{return null}return!k.collapsed||S===u&&m===E||(k.setStart(s,u),k.setEnd(j,S)),k},Xe.createRectsFromDOMRange=function(s,C){var S=s.getRootElement();if(S===null)return[];s=S.getBoundingClientRect(),S=getComputedStyle(S),S=parseFloat(S.paddingLeft)+parseFloat(S.paddingRight);let T,u=(C=Array.from(C.getClientRects())).length;for(let m=0;m<u;m++){let E=C[m],k=E.width+S===s.width;T&&T.top===E.top&&T.left===E.left&&T.width===E.width&&T.height===E.height||k?(C.splice(m--,1),u--):T=E}return C},Xe.getStyleObjectFromCSS=o,Xe.trimTextContentFromAnchor=function(s,C,S){let T=C.getNode();if(n.$isElementNode(T)){var u=T.getDescendantByIndex(C.offset);u!==null&&(T=u)}for(;0<S&&T!==null;){var m=T.getPreviousSibling(),E=0;if(m===null){for(var k=(u=T.getParentOrThrow()).getPreviousSibling();k===null;){if((u=u.getParent())===null){m=null;break}k=u.getPreviousSibling()}u!==null&&(E=u.isInline()?0:2,m=n.$isElementNode(k)?k.getLastDescendant():k)}if((k=T.getTextContent())===""&&n.$isElementNode(T)&&!T.isInline()&&(k=`
3
-
4
- `),u=T.getTextContentSize(),!n.$isTextNode(T)||S>=u)k=T.getParent(),T.remove(),k==null||k.getChildrenSize()!==0||n.$isRootNode(k)||k.remove(),S-=u+E,T=m;else{let j=T.getKey();E=s.getEditorState().read(()=>{const M=n.$getNodeByKey(j);return n.$isTextNode(M)&&M.isSimpleText()?M.getTextContent():null}),m=u-S;let D=k.slice(0,m);E!==null&&E!==k?(S=n.$getPreviousSelection(),u=T,T.isSimpleText()?T.setTextContent(E):(u=n.$createTextNode(E),T.replace(u)),n.$isRangeSelection(S)&&S.isCollapsed()&&(S=S.anchor.offset,u.select(S,S))):T.isSimpleText()?(E=C.key===j,(k=C.offset)<S&&(k=u),S=E?k-S:0,u=E?k:m,E&&S===0?([S]=T.splitText(S,u),S.remove()):([,S]=T.splitText(S,u),S.remove())):(S=n.$createTextNode(D),T.replace(S)),S=0}}},Xe}())}function $t(){return Ga?Ka:(Ga=1,Ka=function(){if(Wa)return ot;Wa=1;var n=Ni(),a=Ze();function i(o,l){for(let p of l)if(o.type.startsWith(p))return!0;return!1}function f(o,l){for(;o!==a.$getRoot()&&o!=null;){if(l(o))return o;o=o.getParent()}return null}function x(o){return o.nodeType===1}return ot.$splitNode=a.$splitNode,ot.$dfs=function(o,l){let p=[];o=(o||a.$getRoot()).getLatest(),l=l||(a.$isElementNode(o)?o.getLastDescendant():o);for(var v=o,w=0;(v=v.getParent())!==null;)w++;for(v=w;o!==null&&!o.is(l);)if(p.push({depth:v,node:o}),a.$isElementNode(o)&&0<o.getChildrenSize())o=o.getFirstChild(),v++;else for(w=null;w===null&&o!==null;)(w=o.getNextSibling())===null?(o=o.getParent(),v--):o=w;return o!==null&&o.is(l)&&p.push({depth:v,node:o}),p},ot.$findMatchingParent=f,ot.$getNearestBlockElementAncestorOrThrow=function(o){if(o=f(o,l=>a.$isElementNode(l)&&!l.isInline()),!a.$isElementNode(o))throw Error("Minified Lexical error #4; visit https://lexical.dev/docs/error?code=4 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");return o},ot.$getNearestNodeOfType=function(o,l){for(;o!=null;){if(o instanceof l)return o;o=o.getParent()}return null},ot.$insertNodeToNearestRoot=function(o){var l=a.$getSelection();if(a.$isRangeSelection(l)){var{focus:p}=l;if(l=p.getNode(),p=p.offset,a.$isRootOrShadowRoot(l))(p=l.getChildAtIndex(p))==null?l.append(o):p.insertBefore(o),o.selectNext();else{let v,w;a.$isTextNode(l)?(v=l.getParentOrThrow(),w=l.getIndexWithinParent(),0<p&&(w+=1,l.splitText(p))):(v=l,w=p),[,l]=a.$splitNode(v,w),l.insertBefore(o),l.selectStart()}}else a.$isNodeSelection(l)||a.DEPRECATED_$isGridSelection(l)?(l=l.getNodes())[l.length-1].getTopLevelElementOrThrow().insertAfter(o):a.$getRoot().append(o),l=a.$createParagraphNode(),o.insertAfter(l),l.select();return o.getLatest()},ot.$restoreEditorState=function(o,l){let p=new Map,v=o._pendingEditorState;for(let[w,d]of l._nodeMap){let s=n.$cloneWithProperties(d);a.$isTextNode(s)&&(s.__text=d.__text),p.set(w,s)}v&&(v._nodeMap=p),o._dirtyType=2,o=l._selection,a.$setSelection(o===null?null:o.clone())},ot.$wrapNodeInElement=function(o,l){return l=l(),o.replace(l),l.append(o),l},ot.addClassNamesToElement=function(o,...l){l.forEach(p=>{typeof p=="string"&&(p=p.split(" ").filter(v=>v!==""),o.classList.add(...p))})},ot.isHTMLAnchorElement=function(o){return x(o)&&o.tagName==="A"},ot.isHTMLElement=x,ot.isMimeType=i,ot.mediaFileReader=function(o,l){let p=o[Symbol.iterator]();return new Promise((v,w)=>{let d=[],s=()=>{const{done:C,value:S}=p.next();if(C)return v(d);const T=new FileReader;T.addEventListener("error",w),T.addEventListener("load",()=>{const u=T.result;typeof u=="string"&&d.push({file:S,result:u}),s()}),i(S,l)?T.readAsDataURL(S):s()};s()})},ot.mergeRegister=function(...o){return()=>{o.forEach(l=>l())}},ot.registerNestedElementResolver=function(o,l,p,v){return o.registerNodeTransform(l,w=>{e:{for(var d=w.getChildren(),s=0;s<d.length;s++)if(d[s]instanceof l){d=null;break e}for(d=w;d!==null;)if(s=d,(d=d.getParent())instanceof l){d={child:s,parent:d};break e}d=null}if(d!==null){const{child:C,parent:S}=d;if(C.is(w)){if(v(S,w),d=(w=C.getNextSiblings()).length,S.insertAfter(C),d!==0){s=p(S),C.insertAfter(s);for(let T=0;T<d;T++)s.append(w[T])}S.canBeEmpty()||S.getChildrenSize()!==0||S.remove()}}})},ot.removeClassNamesFromElement=function(o,...l){l.forEach(p=>{typeof p=="string"&&o.classList.remove(...p.split(" "))})},ot}())}function Pp(){if(Ya)return Ve;Ya=1;var e=Dp();ja||(ja=1,Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}),Na||(Na=1,Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript),_a||(_a=1,Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function($){$.type==="entity"&&($.attributes.title=$.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function($,b){var I={};I["language-"+b]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[b]},I.cdata=/^<!\[CDATA\[|\]\]>$/i;var L={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:I}};L["language-"+b]={pattern:/[\s\S]+/,inside:Prism.languages[b]};var U={};U[$]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return $}),"i"),lookbehind:!0,greedy:!0,inside:L},Prism.languages.insertBefore("markup","cdata",U)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function($,b){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+$+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[b,"language-"+b],inside:Prism.languages[b]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml),Mp(),Ia||(Ia=1,Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean),Aa||(Aa=1,function($){var b=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;$.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+b.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+b.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+b.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+b.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:b,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},$.languages.css.atrule.inside.rest=$.languages.css;var I=$.languages.markup;I&&(I.tag.addInlined("style","css"),I.tag.addAttribute("style","css"))}(Prism)),La||(La=1,Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec),Da||(Da=1,Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}),Oa||(Oa=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python),Ma||(Ma=1,function($){for(var b=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,I=0;I<2;I++)b=b.replace(/<self>/g,function(){return b});b=b.replace(/<self>/g,function(){return/[^\s\S]/.source}),$.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+b),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},$.languages.rust["closure-params"].inside.rest=$.languages.rust,$.languages.rust.attribute.inside.string=$.languages.rust.string}(Prism)),Pa||(Pa=1,Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function($){$.inside.interpolation.inside=Prism.languages.swift})),Fa||(Fa=1,function($){$.languages.typescript=$.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),$.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete $.languages.typescript.parameter,delete $.languages.typescript["literal-property"];var b=$.languages.extend("typescript",{});delete b["class-name"],$.languages.typescript["class-name"].inside=b,$.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:b}}}}),$.languages.ts=$.languages.typescript}(Prism)),Ba||(Ba=1,function($){var b=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,I=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,L={pattern:RegExp(/(^|[^\w.])/.source+I+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};$.languages.java=$.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[L,{pattern:RegExp(/(^|[^\w.])/.source+I+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:L.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+I+/[A-Z]\w*\b/.source),lookbehind:!0,inside:L.inside}],keyword:b,function:[$.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),$.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),$.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":L,keyword:b,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+I+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:L.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+I+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:L.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return b.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)),za||(za=1,function($){var b=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,I=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return b.source});$.languages.cpp=$.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return b.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:b,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),$.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return I})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),$.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:$.languages.cpp}}}}),$.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),$.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:$.languages.extend("cpp",{})}}),$.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},$.languages.cpp["base-clause"])}(Prism));var n=$t(),a=Ze();let i=$=>$!=null&&e.languages.hasOwnProperty($)?$:void 0;function f($,b){for(let I of $.childNodes){if(n.isHTMLElement(I)&&I.tagName===b)return!0;f(I,b)}return!1}class x extends a.ElementNode{static getType(){return"code"}static clone(b){return new x(b.__language,b.__key)}constructor(b,I){super(I),this.__language=i(b)}createDOM(b){let I=document.createElement("code");return n.addClassNamesToElement(I,b.theme.code),I.setAttribute("spellcheck","false"),(b=this.getLanguage())&&I.setAttribute("data-highlight-language",b),I}updateDOM(b,I){let L=this.__language;return b=b.__language,L?L!==b&&I.setAttribute("data-highlight-language",L):b&&I.removeAttribute("data-highlight-language"),!1}static importDOM(){return{code:b=>b.textContent!=null&&(/\r?\n/.test(b.textContent)||f(b,"BR"))?{conversion:p,priority:1}:null,div:()=>({conversion:v,priority:1}),pre:()=>({conversion:p,priority:0}),table:b=>C(b)?{conversion:w,priority:3}:null,td:b=>{let I=b.closest("table");return b.classList.contains("js-file-line")?{conversion:s,priority:3}:I&&C(I)?{conversion:d,priority:3}:null},tr:b=>(b=b.closest("table"))&&C(b)?{conversion:d,priority:3}:null}}static importJSON(b){let I=o(b.language);return I.setFormat(b.format),I.setIndent(b.indent),I.setDirection(b.direction),I}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(b,I=!0){var L=this.getChildren(),U=L.length;if(2<=U&&L[U-1].getTextContent()===`
5
- `&&L[U-2].getTextContent()===`
6
- `&&b.isCollapsed()&&b.anchor.key===this.__key&&b.anchor.offset===U)return L[U-1].remove(),L[U-2].remove(),b=a.$createParagraphNode(),this.insertAfter(b,I),b;if((U=D(I=b.anchor.getNode()))!=null){for(L=0,U=U.getTextContent();L<U.length&&/[\t ]/.test(U[L]);)L+=1;if(0<L)return L=k(L=U.substring(0,L)),I.insertAfter(L),b.insertNodes([a.$createLineBreakNode()]),L.select(),L}return null}canInsertTab(){let b=a.$getSelection();return!(!a.$isRangeSelection(b)||!b.isCollapsed())}canIndent(){return!1}collapseAtStart(){let b=a.$createParagraphNode();return this.getChildren().forEach(I=>b.append(I)),this.replace(b),!0}setLanguage(b){this.getWritable().__language=i(b)}getLanguage(){return this.getLatest().__language}}function o($){return a.$applyNodeReplacement(new x($))}function l($){return $ instanceof x}function p(){return{node:o(),preformatted:!0}}function v($){let b=$.style.fontFamily.match("monospace")!==null;return b||function(I){for(I=I.parentElement;I!==null;){if(I.style.fontFamily.match("monospace")!==null)return!0;I=I.parentElement}return!1}($)?{after:I=>{let L=$.parentNode;return L!=null&&$!==L.lastChild&&I.push(a.$createLineBreakNode()),I},node:b?o():null,preformatted:b}:{node:null}}function w(){return{node:o(),preformatted:!0}}function d(){return{node:null}}function s($){return{after:b=>($.parentNode&&$.parentNode.nextSibling&&b.push(a.$createLineBreakNode()),b),node:null}}function C($){return $.classList.contains("js-file-line-container")}let S={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},T={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function u($){return T[$]||$}class m extends a.TextNode{constructor(b,I,L){super(b,L),this.__highlightType=I}static getType(){return"code-highlight"}static clone(b){return new m(b.__text,b.__highlightType||void 0,b.__key)}getHighlightType(){return this.getLatest().__highlightType}createDOM(b){let I=super.createDOM(b);return b=E(b.theme,this.__highlightType),n.addClassNamesToElement(I,b),I}updateDOM(b,I,L){let U=super.updateDOM(b,I,L);return(b=E(L.theme,b.__highlightType))!==(L=E(L.theme,this.__highlightType))&&(b&&n.removeClassNamesFromElement(I,b),L&&n.addClassNamesToElement(I,L)),U}static importJSON(b){let I=k(b.text,b.highlightType);return I.setFormat(b.format),I.setDetail(b.detail),I.setMode(b.mode),I.setStyle(b.style),I}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(){return this}isParentRequired(){return!0}createParentElementNode(){return o()}}function E($,b){return b&&$&&$.codeHighlight&&$.codeHighlight[b]}function k($,b){return a.$applyNodeReplacement(new m($,b))}function j($){return $ instanceof m}function D($){let b=null,I=$.getPreviousSiblings();for(I.push($);0<I.length&&(j($=I.pop())&&(b=$),!a.$isLineBreakNode($)););return b}function M($){let b=null,I=$.getNextSiblings();for(I.unshift($);0<I.length&&(j($=I.shift())&&(b=$),!a.$isLineBreakNode($)););return b}let _={defaultLanguage:"javascript",tokenize($,b){return e.tokenize($,e.languages[b||""]||e.languages[this.defaultLanguage])}};function R($,b){var I=$.length;let L=-1;if(b)for(b=0;b<I;b++){let U=$[b];if(U!==" "&&U!==" "){L=b;break}}else for(--I;-1<I;I--)if((b=$[I])!==" "&&b!==" "){L=I;break}return L}function A($){let b=null,I=-1;var L=$.getPreviousSiblings();for(L.push($);0<L.length;){var U=L.pop();if(j(U)){var Q=U.getTextContent();(Q=R(Q,!0))!==-1&&(b=U,I=Q)}if(a.$isLineBreakNode(U))break}if(b===null)for($=$.getNextSiblings();0<$.length;){if(j(L=$.shift())&&(U=R(U=L.getTextContent(),!0))!==-1){b=L,I=U;break}if(a.$isLineBreakNode(L))break}return{node:b,offset:I}}function F($){let b=null,I=-1;var L=$.getNextSiblings();for(L.unshift($);0<L.length;){var U=L.shift();if(j(U)){var Q=U.getTextContent();(Q=R(Q,!1))!==-1&&(b=U,I=Q+1)}if(a.$isLineBreakNode(U))break}if(b===null)for($=$.getPreviousSiblings();0<$.length;){if(j(L=$.pop())&&(U=R(U=L.getTextContent(),!1))!==-1){b=L,I=U+1;break}if(a.$isLineBreakNode(L))break}return{node:b,offset:I}}function K($,b,I){let L=$.getParent();l(L)?te(L,b,I):j($)&&$.replace(a.$createTextNode($.__text))}let ee=new Set;function te($,b,I){let L=$.getKey();ee.has(L)||(ee.add(L),$.getLanguage()===void 0&&$.setLanguage(I.defaultLanguage),b.update(()=>{(function(U,Q){if(U=a.$getNodeByKey(U),l(U)&&U.isAttached()){var Y=a.$getSelection();if(a.$isRangeSelection(Y)){var z=(Y=Y.anchor).offset,H=Y.type==="element"&&a.$isLineBreakNode(U.getChildAtIndex(Y.offset-1)),V=0;if(!H){let G=Y.getNode();V=z+G.getPreviousSiblings().reduce((oe,se)=>oe+se.getTextContentSize(),0)}Q()&&(H?Y.getNode().select(z,z):U.getChildren().some(G=>{let oe=a.$isTextNode(G);if(oe||a.$isLineBreakNode(G)){let se=G.getTextContentSize();if(oe&&se>=V)return G.select(V,V),!0;V-=se}return!1}))}else Q()}})(L,()=>{var U=a.$getNodeByKey(L);if(!l(U)||!U.isAttached())return!1;var Q=U.getTextContent();Q=Z(Q=I.tokenize(Q,U.getLanguage()||I.defaultLanguage));var Y=U.getChildren();for(U=0;U<Y.length&&B(Y[U],Q[U]);)U++;var z=Y.length;let H=Q.length,V=Math.min(z,H)-U,G=0;for(;G<V;)if(G++,!B(Y[z-G],Q[H-G])){G--;break}Y=U,z-=G,Q=Q.slice(U,H-G);let{from:oe,to:se,nodesForReplacement:q}={from:Y,nodesForReplacement:Q,to:z};return!(oe===se&&!q.length)&&($.splice(oe,se-oe,q),!0)})},{onUpdate:()=>{ee.delete(L)},skipTransforms:!0}))}function Z($){let b=[];return $.forEach(I=>{if(typeof I=="string"){I=I.split(`
7
- `);for(var L=0;L<I.length;L++){let U=I[L];U.length&&b.push(k(U)),L<I.length-1&&b.push(a.$createLineBreakNode())}}else({content:L}=I),typeof L=="string"?b.push(k(L,I.type)):Array.isArray(L)&&L.length===1&&typeof L[0]=="string"?b.push(k(L[0],I.type)):Array.isArray(L)&&b.push(...Z(L))}),b}function B($,b){return j($)&&j(b)?$.__text===b.__text&&$.__highlightType===b.__highlightType:!(!a.$isLineBreakNode($)||!a.$isLineBreakNode(b))}function O($){var b=a.$getSelection();if(!a.$isRangeSelection(b)||b.isCollapsed())return!1;b=b.getNodes();for(var I=0;I<b.length;I++){var L=b[I];if(!j(L)&&!a.$isLineBreakNode(L))return!1}for((I=D(b[0]))!=null&&g(I,$),I=1;I<b.length;I++)L=b[I],a.$isLineBreakNode(b[I-1])&&j(L)&&g(L,$);return!0}function g($,b){let I=$.getTextContent();b===a.INDENT_CONTENT_COMMAND?0<I.length&&/\s/.test(I[0])?$.setTextContent(" "+I):(b=k(" "),$.insertBefore(b)):I.indexOf(" ")===0&&(I.length===1?$.remove():$.setTextContent(I.substring(1)))}function h($,b){let I=a.$getSelection();if(!a.$isRangeSelection(I))return!1;let{anchor:L,focus:U}=I,Q=L.offset,Y=U.offset,z=L.getNode(),H=U.getNode();var V=$===a.KEY_ARROW_UP_COMMAND;if(!j(z)||!j(H))return!1;if(!b.altKey){if(I.isCollapsed()){if($=z.getParentOrThrow(),V&&Q===0&&z.getPreviousSibling()===null){if($.getPreviousSibling()===null)return $.selectPrevious(),b.preventDefault(),!0}else if(!V&&Q===z.getTextContentSize()&&z.getNextSibling()===null&&$.getNextSibling()===null)return $.selectNext(),b.preventDefault(),!0}return!1}var G=D(z);let oe=M(H);if(G==null||oe==null)return!1;let se=G.getNodesBetween(oe);for(let P=0;P<se.length;P++){let J=se[P];if(!j(J)&&!a.$isLineBreakNode(J))return!1}if(b.preventDefault(),b.stopPropagation(),b=V?G.getPreviousSibling():oe.getNextSibling(),!a.$isLineBreakNode(b)||(G=V?b.getPreviousSibling():b.getNextSibling())==null)return!0;let q=(V=V?D(G):M(G))!=null?V:G;return b.remove(),se.forEach(P=>P.remove()),$===a.KEY_ARROW_UP_COMMAND?(se.forEach(P=>q.insertBefore(P)),q.insertBefore(b)):(q.insertAfter(b),q=b,se.forEach(P=>{q.insertAfter(P),q=P})),I.setTextNodeRange(z,Q,H,Y),!0}function N($,b){let I=a.$getSelection();if(!a.$isRangeSelection(I))return!1;let L,U,{anchor:Q,focus:Y}=I,z=Q.getNode(),H=Y.getNode();return $=$===a.MOVE_TO_START,!(!j(z)||!j(H))&&({node:L,offset:U}=$?A(H):F(H),L!==null&&U!==-1&&I.setTextNodeRange(L,U,L,U),b.preventDefault(),b.stopPropagation(),!0)}return Ve.$createCodeHighlightNode=k,Ve.$createCodeNode=o,Ve.$isCodeHighlightNode=j,Ve.$isCodeNode=l,Ve.CODE_LANGUAGE_FRIENDLY_NAME_MAP=S,Ve.CODE_LANGUAGE_MAP=T,Ve.CodeHighlightNode=m,Ve.CodeNode=x,Ve.DEFAULT_CODE_LANGUAGE="javascript",Ve.PrismTokenizer=_,Ve.getCodeLanguages=()=>Object.keys(e.languages).filter($=>typeof e.languages[$]!="function").sort(),Ve.getDefaultCodeLanguage=()=>"javascript",Ve.getEndOfCodeInLine=F,Ve.getFirstCodeHighlightNodeOfLine=D,Ve.getLanguageFriendlyName=function($){return $=u($),S[$]||$},Ve.getLastCodeHighlightNodeOfLine=M,Ve.getStartOfCodeInLine=A,Ve.normalizeCodeLang=u,Ve.registerCodeHighlighting=function($,b){if(!$.hasNodes([x,m]))throw Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return b==null&&(b=_),n.mergeRegister($.registerMutationListener(x,I=>{$.update(()=>{for(let[Q,Y]of I)if(Y!=="destroyed"){var L=a.$getNodeByKey(Q);if(L!==null)e:{var U=L;if((L=$.getElementByKey(U.getKey()))===null)break e;let z=(U=U.getChildren()).length;if(z===L.__cachedChildrenLength)break e;L.__cachedChildrenLength=z;let H="1",V=1;for(let G=0;G<z;G++)a.$isLineBreakNode(U[G])&&(H+=`
8
- `+ ++V);L.setAttribute("data-gutter",H)}}})}),$.registerNodeTransform(x,I=>te(I,$,b)),$.registerNodeTransform(a.TextNode,I=>K(I,$,b)),$.registerNodeTransform(m,I=>K(I,$,b)),$.registerCommand(a.INDENT_CONTENT_COMMAND,()=>O(a.INDENT_CONTENT_COMMAND),a.COMMAND_PRIORITY_LOW),$.registerCommand(a.OUTDENT_CONTENT_COMMAND,()=>O(a.OUTDENT_CONTENT_COMMAND),a.COMMAND_PRIORITY_LOW),$.registerCommand(a.KEY_ARROW_UP_COMMAND,I=>h(a.KEY_ARROW_UP_COMMAND,I),a.COMMAND_PRIORITY_LOW),$.registerCommand(a.KEY_ARROW_DOWN_COMMAND,I=>h(a.KEY_ARROW_DOWN_COMMAND,I),a.COMMAND_PRIORITY_LOW),$.registerCommand(a.MOVE_TO_END,I=>N(a.MOVE_TO_END,I),a.COMMAND_PRIORITY_LOW),$.registerCommand(a.MOVE_TO_START,I=>N(a.MOVE_TO_START,I),a.COMMAND_PRIORITY_LOW))},Ve}function Ud(){return Ja?qa:(Ja=1,qa=Pp())}var Za,Qa,Xa,Nr=Ud(),Ut={};function Ro(){return Xa?Qa:(Xa=1,Qa=function(){if(Za)return Ut;Za=1;var n=$t(),a=Ze();class i extends a.ElementNode{static getType(){return"link"}static clone(d){return new i(d.__url,{rel:d.__rel,target:d.__target,title:d.__title},d.__key)}constructor(d,s={},C){super(C);let{target:S=null,rel:T=null,title:u=null}=s;this.__url=d,this.__target=S,this.__rel=T,this.__title=u}createDOM(d){let s=document.createElement("a");return s.href=this.__url,this.__target!==null&&(s.target=this.__target),this.__rel!==null&&(s.rel=this.__rel),this.__title!==null&&(s.title=this.__title),n.addClassNamesToElement(s,d.theme.link),s}updateDOM(d,s){let C=this.__url,S=this.__target,T=this.__rel,u=this.__title;return C!==d.__url&&(s.href=C),S!==d.__target&&(S?s.target=S:s.removeAttribute("target")),T!==d.__rel&&(T?s.rel=T:s.removeAttribute("rel")),u!==d.__title&&(u?s.title=u:s.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:f,priority:1})}}static importJSON(d){let s=x(d.url,{rel:d.rel,target:d.target,title:d.title});return s.setFormat(d.format),s.setIndent(d.indent),s.setDirection(d.direction),s}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(d){this.getWritable().__url=d}getTarget(){return this.getLatest().__target}setTarget(d){this.getWritable().__target=d}getRel(){return this.getLatest().__rel}setRel(d){this.getWritable().__rel=d}getTitle(){return this.getLatest().__title}setTitle(d){this.getWritable().__title=d}insertNewAfter(d,s=!0){return d=this.getParentOrThrow().insertNewAfter(d,s),a.$isElementNode(d)?(s=x(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),d.append(s),s):null}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(d,s){if(!a.$isRangeSelection(s))return!1;d=s.anchor.getNode();let C=s.focus.getNode();return this.isParentOf(d)&&this.isParentOf(C)&&0<s.getTextContent().length}}function f(w){let d=null;if(n.isHTMLAnchorElement(w)){let s=w.textContent;s!==null&&s!==""&&(d=x(w.getAttribute("href")||"",{rel:w.getAttribute("rel"),target:w.getAttribute("target"),title:w.getAttribute("title")}))}return{node:d}}function x(w,d){return a.$applyNodeReplacement(new i(w,d))}function o(w){return w instanceof i}class l extends i{static getType(){return"autolink"}static clone(d){return new l(d.__url,{rel:d.__rel,target:d.__target,title:d.__title},d.__key)}static importJSON(d){let s=p(d.url,{rel:d.rel,target:d.target,title:d.title});return s.setFormat(d.format),s.setIndent(d.indent),s.setDirection(d.direction),s}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(d,s=!0){return d=this.getParentOrThrow().insertNewAfter(d,s),a.$isElementNode(d)?(s=p(this.__url,{rel:this._rel,target:this.__target,title:this.__title}),d.append(s),s):null}}function p(w,d){return a.$applyNodeReplacement(new l(w,d))}let v=a.createCommand("TOGGLE_LINK_COMMAND");return Ut.$createAutoLinkNode=p,Ut.$createLinkNode=x,Ut.$isAutoLinkNode=function(w){return w instanceof l},Ut.$isLinkNode=o,Ut.AutoLinkNode=l,Ut.LinkNode=i,Ut.TOGGLE_LINK_COMMAND=v,Ut.toggleLink=function(w,d={}){let{target:s,title:C}=d,S=d.rel===void 0?"noopener":d.rel;if(d=a.$getSelection(),a.$isRangeSelection(d))if(d=d.extract(),w===null)d.forEach(u=>{if(o(u=u.getParent())){let m=u.getChildren();for(let E=0;E<m.length;E++)u.insertBefore(m[E]);u.remove()}});else{if(d.length===1){var T=d[0];if(T=o(T)?T:function(E,k){for(;E!==null&&(E=E.getParent())!==null&&!k(E););return E}(T,o),T!==null)return T.setURL(w),s!==void 0&&T.setTarget(s),S!==null&&T.setRel(S),void(C!==void 0&&T.setTitle(C))}let u=null,m=null;d.forEach(E=>{var k=E.getParent();if(k!==m&&k!==null&&(!a.$isElementNode(E)||E.isInline()))if(o(k))m=k,k.setURL(w),s!==void 0&&k.setTarget(s),S!==null&&m.setRel(S),C!==void 0&&m.setTitle(C);else if(k.is(u)||(u=k,m=x(w,{rel:S,target:s}),o(k)?E.getPreviousSibling()===null?k.insertBefore(m):k.insertAfter(m):E.insertBefore(m)),o(E)){if(!E.is(m)){if(m!==null){k=E.getChildren();for(let j=0;j<k.length;j++)m.append(k[j])}E.remove()}}else m!==null&&m.append(E)})}},Ut}())}var es,ts,ns,an=Ro(),ut={};function Fp(){if(es)return ut;es=1;var e=Ze(),n=$t();function a(B){throw Error(`Minified Lexical error #${B}; visit https://lexical.dev/docs/error?code=${B} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function i(B){let O=1;for(B=B.getParent();B!=null;){if(k(B)){if(F(B=B.getParent())){O++,B=B.getParent();continue}a(40)}break}return O}function f(B){F(B=B.getParent())||a(40);let O=B;for(;O!==null;)O=O.getParent(),F(O)&&(B=O);return B}function x(B){let O=[];B=B.getChildren().filter(k);for(let g=0;g<B.length;g++){let h=B[g],N=h.getFirstChild();F(N)?O=O.concat(x(N)):O.push(h)}return O}function o(B){return k(B)&&F(B.getFirstChild())}function l(B){return E().append(B)}function p(B,O){return k(B)&&(O.length===0||O.length===1&&B.is(O[0])&&B.getChildrenSize()===0)}function v(B,O){B.splice(B.getChildrenSize(),0,O)}function w(B,O){if(F(B))return B;let g=B.getPreviousSibling(),h=B.getNextSibling(),N=E();return N.setFormat(B.getFormatType()),N.setIndent(B.getIndent()),v(N,B.getChildren()),F(g)&&O===g.getListType()?(g.append(N),B.remove(),F(h)&&O===h.getListType()&&(v(g,h.getChildren()),h.remove()),g):F(h)&&O===h.getListType()?(h.getFirstChildOrThrow().insertBefore(N),B.remove(),h):((O=A(O)).append(N),B.replace(O),s(O),O)}function d(B,O){var g=B.getLastChild();let h=O.getFirstChild();g&&h&&o(g)&&o(h)&&(d(g.getFirstChild(),h.getFirstChild()),h.remove()),0<(g=O.getChildren()).length&&(B.append(...g),s(B)),O.remove()}function s(B,O){if((B=O||B.getChildren())!==void 0)for(O=0;O<B.length;O++){let $=B[O];if(k($)){let b=$.getValue();var g=$,h=g.getParent(),N=1;for(h!=null&&(F(h)?N=h.getStart():a(44)),g=g.getPreviousSiblings(),h=0;h<g.length;h++){let I=g[h];k(I)&&!F(I.getFirstChild())&&N++}b!==N&&$.setValue(N)}}}function C(B){if(!o(B)){var O=B.getParent(),g=O?O.getParent():void 0,h=g?g.getParent():void 0;if(F(h)&&k(g)&&F(O)){var N=O?O.getFirstChild():void 0,$=O?O.getLastChild():void 0;if(B.is(N))g.insertBefore(B),O.isEmpty()&&g.remove();else if(B.is($))g.insertAfter(B),O.isEmpty()&&g.remove();else{var b=O.getListType();N=E();let I=A(b);N.append(I),B.getPreviousSiblings().forEach(L=>I.append(L)),$=E(),b=A(b),$.append(b),v(b,B.getNextSiblings()),g.insertBefore(N),g.insertAfter($),g.replace(B)}s(O),s(h)}}}class S extends e.ElementNode{static getType(){return"listitem"}static clone(O){return new S(O.__value,O.__checked,O.__key)}constructor(O,g,h){super(h),this.__value=O===void 0?1:O,this.__checked=g}createDOM(O){let g=document.createElement("li"),h=this.getParent();return F(h)&&h.getListType()==="check"&&u(g,this,null),g.value=this.__value,T(g,O.theme,this),g}updateDOM(O,g,h){let N=this.getParent();return F(N)&&N.getListType()==="check"&&u(g,this,O),g.value=this.__value,T(g,h.theme,this),!1}static transform(){return O=>{let g=O.getParent();F(g)&&(s(g),g.getListType()!=="check"&&O.getChecked()!=null&&O.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:m,priority:0})}}static importJSON(O){let g=new S(O.value,O.checked);return g.setFormat(O.format),g.setDirection(O.direction),g}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...O){for(let g=0;g<O.length;g++){let h=O[g];if(e.$isElementNode(h)&&this.canMergeWith(h)){let N=h.getChildren();this.append(...N),h.remove()}else super.append(h)}return this}replace(O,g){if(k(O))return super.replace(O);this.setIndent(0);let h=this.getParentOrThrow();if(!F(h))return O;if(h.__first===this.getKey())h.insertBefore(O);else if(h.__last===this.getKey())h.insertAfter(O);else{let N=A(h.getListType()),$=this.getNextSibling();for(;$;){let b=$;$=$.getNextSibling(),N.append(b)}h.insertAfter(O),O.insertAfter(N)}return g&&this.getChildren().forEach(N=>{O.append(N)}),this.remove(),h.getChildrenSize()===0&&h.remove(),O}insertAfter(O,g=!0){var h=this.getParentOrThrow();F(h)||a(39);var N=this.getNextSiblings();if(k(O))return g=super.insertAfter(O,g),F(O=O.getParentOrThrow())&&s(O),g;if(F(O)&&O.getListType()===h.getListType()){for(h=O,N=(O=O.getChildren()).length-1;0<=N;N--)h=O[N],this.insertAfter(h,g);return h}if(h.insertAfter(O,g),N.length!==0){let $=A(h.getListType());N.forEach(b=>$.append(b)),O.insertAfter($,g)}return O}remove(O){let g=this.getPreviousSibling(),h=this.getNextSibling();super.remove(O),g&&h&&o(g)&&o(h)?(d(g.getFirstChild(),h.getFirstChild()),h.remove()):h&&F(O=h.getParent())&&s(O)}insertNewAfter(O,g=!0){return O=E(this.__checked==null&&void 0),this.insertAfter(O,g),O}collapseAtStart(O){let g=e.$createParagraphNode();this.getChildren().forEach(b=>g.append(b));var h=this.getParentOrThrow(),N=h.getParentOrThrow();let $=k(N);return h.getChildrenSize()===1?$?(h.remove(),N.select()):(h.insertBefore(g),h.remove(),h=O.anchor,O=O.focus,N=g.getKey(),h.type==="element"&&h.getNode().is(this)&&h.set(N,h.offset,"element"),O.type==="element"&&O.getNode().is(this)&&O.set(N,O.offset,"element")):(h.insertBefore(g),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(O){this.getWritable().__value=O}getChecked(){return this.getLatest().__checked}setChecked(O){this.getWritable().__checked=O}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var O=this.getParent();if(O===null)return this.getLatest().__indent;O=O.getParentOrThrow();let g=0;for(;k(O);)O=O.getParentOrThrow().getParentOrThrow(),g++;return g}setIndent(O){typeof O=="number"&&-1<O||a(117);let g=this.getIndent();for(;g!==O;)if(g<O){e:{var h=new Set;if(o(this)||h.has(this.getKey()))break e;let I=this.getParent();var N=this.getNextSibling(),$=this.getPreviousSibling();if(o(N)&&o($)){if(F($=$.getFirstChild())){$.append(this);var b=N.getFirstChild();F(b)&&(v($,b=b.getChildren()),N.remove(),h.add(N.getKey())),s($)}}else o(N)?F(N=N.getFirstChild())&&((h=N.getFirstChild())!==null&&h.insertBefore(this),s(N)):o($)?F(N=$.getFirstChild())&&(N.append(this),s(N)):F(I)&&(h=E(),b=A(I.getListType()),h.append(b),b.append(this),$?$.insertAfter(h):N?N.insertBefore(h):I.append(h),s(b));F(I)&&s(I)}g++}else C(this),g--;return this}insertBefore(O){if(k(O)){let g=this.getParentOrThrow();F(g)&&s(g,this.getNextSiblings())}return super.insertBefore(O)}canInsertAfter(O){return k(O)}canReplaceWith(O){return k(O)}canMergeWith(O){return e.$isParagraphNode(O)||k(O)}extractWithChild(O,g){if(!e.$isRangeSelection(g))return!1;O=g.anchor.getNode();let h=g.focus.getNode();return this.isParentOf(O)&&this.isParentOf(h)&&this.getTextContent().length===g.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return A("bullet")}}function T(B,O,g){let h=[],N=[];var $=(O=O.list)?O.listitem:void 0;if(O&&O.nested)var b=O.nested.listitem;if($!==void 0&&($=$.split(" "),h.push(...$)),O){$=F($=g.getParent())&&$.getListType()==="check";let I=g.getChecked();$&&!I||N.push(O.listitemUnchecked),$&&I||N.push(O.listitemChecked),$&&h.push(I?O.listitemChecked:O.listitemUnchecked)}b!==void 0&&(b=b.split(" "),g.getChildren().some(I=>F(I))?h.push(...b):N.push(...b)),0<N.length&&n.removeClassNamesFromElement(B,...N),0<h.length&&n.addClassNamesToElement(B,...h)}function u(B,O,g){F(O.getFirstChild())?(B.removeAttribute("role"),B.removeAttribute("tabIndex"),B.removeAttribute("aria-checked")):(B.setAttribute("role","checkbox"),B.setAttribute("tabIndex","-1"),g&&O.__checked===g.__checked||B.setAttribute("aria-checked",O.getChecked()?"true":"false"))}function m(B){return{node:E(B=n.isHTMLElement(B)&&B.getAttribute("aria-checked")==="true")}}function E(B){return e.$applyNodeReplacement(new S(void 0,B))}function k(B){return B instanceof S}class j extends e.ElementNode{static getType(){return"list"}static clone(O){return new j(O.__listType||R[O.__tag],O.__start,O.__key)}constructor(O,g,h){super(h),this.__listType=O=R[O]||O,this.__tag=O==="number"?"ol":"ul",this.__start=g}getTag(){return this.__tag}getListType(){return this.__listType}getStart(){return this.__start}createDOM(O){let g=document.createElement(this.__tag);return this.__start!==1&&g.setAttribute("start",String(this.__start)),g.__lexicalListType=this.__listType,D(g,O.theme,this),g}updateDOM(O,g,h){return O.__tag!==this.__tag||(D(g,h.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:_,priority:0}),ul:()=>({conversion:_,priority:0})}}static importJSON(O){let g=A(O.listType,O.start);return g.setFormat(O.format),g.setIndent(O.indent),g.setDirection(O.direction),g}exportDOM(O){return{element:O}=super.exportDOM(O),O&&(this.__start!==1&&O.setAttribute("start",String(this.__start)),this.__listType==="check"&&O.setAttribute("__lexicalListType","check")),{element:O}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...O){for(let h=0;h<O.length;h++){var g=O[h];if(k(g))super.append(g);else{let N=E();F(g)||e.$isElementNode(g)&&(g=e.$createTextNode(g.getTextContent())),N.append(g),super.append(N)}}return s(this),this}extractWithChild(O){return k(O)}}function D(B,O,g){let h=[],N=[];var $=O.list;if($!==void 0){let I=$[`${g.__tag}Depth`]||[],L=(O=i(g)-1)%I.length;var b=I[L];let U,Q=$[g.__tag];if(($=$.nested)!==void 0&&$.list&&(U=$.list),Q!==void 0&&h.push(Q),b!==void 0)for(b=b.split(" "),h.push(...b),b=0;b<I.length;b++)b!==L&&N.push(g.__tag+b);U!==void 0&&(g=U.split(" "),1<O?h.push(...g):N.push(...g))}0<N.length&&n.removeClassNamesFromElement(B,...N),0<h.length&&n.addClassNamesToElement(B,...h)}function M(B){let O=[];for(let h=0;h<B.length;h++){var g=B[h];k(g)?(O.push(g),1<(g=g.getChildren()).length&&g.forEach(N=>{F(N)&&O.push(l(N))})):O.push(l(g))}return O}function _(B){let O=B.nodeName.toLowerCase(),g=null;return O==="ol"?g=A("number",B.start):O==="ul"&&(g=n.isHTMLElement(B)&&B.getAttribute("__lexicallisttype")==="check"?A("check"):A("bullet")),{after:M,node:g}}let R={ol:"number",ul:"bullet"};function A(B,O=1){return e.$applyNodeReplacement(new j(B,O))}function F(B){return B instanceof j}let K=e.createCommand("INSERT_UNORDERED_LIST_COMMAND"),ee=e.createCommand("INSERT_ORDERED_LIST_COMMAND"),te=e.createCommand("INSERT_CHECK_LIST_COMMAND"),Z=e.createCommand("REMOVE_LIST_COMMAND");return ut.$createListItemNode=E,ut.$createListNode=A,ut.$getListDepth=i,ut.$handleListInsertParagraph=function(){var B=e.$getSelection();if(!e.$isRangeSelection(B)||!B.isCollapsed()||!k(B=B.anchor.getNode())||B.getTextContent()!=="")return!1;var O=f(B),g=B.getParent();F(g)||a(40);let h,N=g.getParent();if(e.$isRootOrShadowRoot(N))h=e.$createParagraphNode(),O.insertAfter(h);else{if(!k(N))return!1;h=E(),N.insertAfter(h)}if(h.select(),0<(O=B.getNextSiblings()).length){let $=A(g.getListType());e.$isParagraphNode(h)?h.insertAfter($):((g=E()).append($),h.insertAfter(g)),O.forEach(b=>{b.remove(),$.append(b)})}return function($){for(;$.getNextSibling()==null&&$.getPreviousSibling()==null;){let b=$.getParent();if(b==null||!k($)&&!F($))break;$=b}$.remove()}(B),!0},ut.$isListItemNode=k,ut.$isListNode=F,ut.INSERT_CHECK_LIST_COMMAND=te,ut.INSERT_ORDERED_LIST_COMMAND=ee,ut.INSERT_UNORDERED_LIST_COMMAND=K,ut.ListItemNode=S,ut.ListNode=j,ut.REMOVE_LIST_COMMAND=Z,ut.insertList=function(B,O){B.update(()=>{var g=e.$getSelection();if(e.$isRangeSelection(g)||e.DEPRECATED_$isGridSelection(g)){var h=g.getNodes(),N=(g=g.anchor.getNode()).getParent();if(p(g,h))h=A(O),e.$isRootOrShadowRoot(N)?(g.replace(h),N=E(),e.$isElementNode(g)&&(N.setFormat(g.getFormatType()),N.setIndent(g.getIndent())),h.append(N)):k(g)&&(v(h,(g=g.getParentOrThrow()).getChildren()),g.replace(h));else for(g=new Set,N=0;N<h.length;N++){var $=h[N];if(e.$isElementNode($)&&$.isEmpty()&&!g.has($.getKey()))w($,O);else if(e.$isLeafNode($))for($=$.getParent();$!=null;){let I=$.getKey();if(F($)){if(!g.has(I)){var b=A(O);v(b,$.getChildren()),$.replace(b),s(b),g.add(I)}break}if(b=$.getParent(),e.$isRootOrShadowRoot(b)&&!g.has(I)){g.add(I),w($,O);break}$=b}}}})},ut.removeList=function(B){B.update(()=>{let O=e.$getSelection();if(e.$isRangeSelection(O)){var g=new Set,h=O.getNodes(),N=O.anchor.getNode();if(p(N,h))g.add(f(N));else for(N=0;N<h.length;N++){var $=h[N];e.$isLeafNode($)&&($=n.$getNearestNodeOfType($,S))!=null&&g.add(f($))}for(let b of g){g=b,h=x(b);for(let I of h)v(h=e.$createParagraphNode(),I.getChildren()),g.insertAfter(h),g=h,I.__key===O.anchor.key&&O.anchor.set(h.getKey(),0,"element"),I.__key===O.focus.key&&O.focus.set(h.getKey(),0,"element"),I.remove();b.remove()}}})},ut}function Zr(){return ns?ts:(ns=1,ts=Fp())}var is,os,rs,as,ss,ls,cs,ds,us,hs,ps,gs,vt=Zr(),ze={},Mt={},Vt={},Ui={};function Vd(){return rs?os:(rs=1,os=function(){if(is)return Ui;is=1;var n=Ni(),a=Ze();function i(o,l,p,v=null){let w=v==null||l.isSelected(),d=a.$isElementNode(l)&&l.excludeFromCopy("html");var s=l;v!==null&&(s=n.$cloneWithProperties(l),s=a.$isTextNode(s)&&v!=null?n.$sliceSelectedTextNodeContent(v,s):s);let C=a.$isElementNode(s)?s.getChildren():[],{element:S,after:T}=s.exportDOM(o);if(!S)return!1;let u=document.createDocumentFragment();for(let m=0;m<C.length;m++){let E=C[m],k=i(o,E,u,v);!w&&a.$isElementNode(l)&&k&&l.extractWithChild(E,v,"html")&&(w=!0)}return w&&!d?(S.append(u),p.append(S),T&&(o=T.call(s,S))&&S.replaceWith(o)):p.append(u),w}let f=new Set(["STYLE","SCRIPT"]);function x(o,l,p=new Map,v,w=!1){let d=[];if(f.has(o.nodeName))return d;let s=null;var{nodeName:C}=o,S=l._htmlConversions.get(C.toLowerCase());if(C=null,S!==void 0)for(T of S)(S=T(o))!==null&&(C===null||C.priority<S.priority)&&(C=S);var T=(T=C!==null?C.conversion:null)?T(o,void 0,w):null;if(C=null,T!==null){if(C=T.after,s=T.node,s!==null){for(var[,u]of p)if(s=u(s,v),!s)break;s&&d.push(s)}T.forChild!=null&&p.set(o.nodeName,T.forChild)}for(o=o.childNodes,v=[],u=0;u<o.length;u++)v.push(...x(o[u],l,new Map(p),s,w||(T&&T.preformatted)===!0));return C!=null&&(v=C(v)),s==null?d=d.concat(v):a.$isElementNode(s)&&s.append(...v),d}return Ui.$generateHtmlFromNodes=function(o,l){if(typeof document>"u"||typeof window>"u")throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let p=document.createElement("div"),v=a.$getRoot().getChildren();for(let w=0;w<v.length;w++)i(o,v[w],p,l);return p.innerHTML},Ui.$generateNodesFromDOM=function(o,l){let p=[];l=l.body?l.body.childNodes:[];for(let w=0;w<l.length;w++){var v=l[w];f.has(v.nodeName)||(v=x(v,o))!==null&&(p=p.concat(v))}return p},Ui}())}function Bp(){if(as)return Vt;as=1;var e=Vd(),n=Ni(),a=$t(),i=Ze();function f(C){throw Error(`Minified Lexical error #${C}; visit https://lexical.dev/docs/error?code=${C} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function x(C){let S=i.$getSelection();if(S==null)throw Error("Expected valid LexicalSelection");return i.$isRangeSelection(S)&&S.isCollapsed()||S.getNodes().length===0?"":e.$generateHtmlFromNodes(C,S)}function o(C){let S=i.$getSelection();if(S==null)throw Error("Expected valid LexicalSelection");return i.$isRangeSelection(S)&&S.isCollapsed()||S.getNodes().length===0?null:JSON.stringify(v(C,S))}function l(C,S,T){(i.DEPRECATED_$isGridSelection(T)||a.$findMatchingParent(T.anchor.getNode(),u=>i.DEPRECATED_$isGridCellNode(u))!==null&&a.$findMatchingParent(T.focus.getNode(),u=>i.DEPRECATED_$isGridCellNode(u))!==null)&&S.length===1&&i.DEPRECATED_$isGridNode(S[0])?function(u,m,E,k){u.length===1&&i.DEPRECATED_$isGridNode(u[0])||f(42);var j=u[0];u=j.getChildren(),E=j.getFirstChildOrThrow().getChildrenSize();var D=j.getChildrenSize(),M=a.$findMatchingParent(m.anchor.getNode(),te=>i.DEPRECATED_$isGridCellNode(te));m=(j=M&&a.$findMatchingParent(M,te=>i.DEPRECATED_$isGridRowNode(te)))&&a.$findMatchingParent(j,te=>i.DEPRECATED_$isGridNode(te)),i.DEPRECATED_$isGridCellNode(M)&&i.DEPRECATED_$isGridRowNode(j)&&i.DEPRECATED_$isGridNode(m)||f(43);var _=j.getIndexWithinParent(),R=Math.min(m.getChildrenSize()-1,_+D-1);let A,F;D=M.getIndexWithinParent(),M=Math.min(j.getChildrenSize()-1,D+E-1),E=Math.min(D,M),j=Math.min(_,R),D=Math.max(D,M),_=Math.max(_,R),R=m.getChildren(),M=0;for(let te=j;te<=_;te++){var K=R[te];i.DEPRECATED_$isGridRowNode(K)||f(24);var ee=u[M];i.DEPRECATED_$isGridRowNode(ee)||f(24),K=K.getChildren(),ee=ee.getChildren();let Z=0;for(let B=E;B<=D;B++){let O=K[B];i.DEPRECATED_$isGridCellNode(O)||f(25);let g=ee[Z];i.DEPRECATED_$isGridCellNode(g)||f(25),te===j&&B===E?A=O.getKey():te===_&&B===D&&(F=O.getKey());let h=O.getChildren();g.getChildren().forEach(N=>{i.$isTextNode(N)&&i.$createParagraphNode().append(N),O.append(N)}),h.forEach(N=>N.remove()),Z++}M++}A&&F&&(u=i.DEPRECATED_$createGridSelection(),u.set(m.getKey(),A,F),i.$setSelection(u),k.dispatchCommand(i.SELECTION_CHANGE_COMMAND,void 0))}(S,T,!1,C):function(u,m){let E=[],k=null;for(let j=0;j<u.length;j++){let D=u[j],M=i.$isLineBreakNode(D);if(M||i.$isDecoratorNode(D)&&D.isInline()||i.$isElementNode(D)&&D.isInline()||i.$isTextNode(D)||D.isParentRequired()){if(k===null&&(k=D.createParentElementNode(),E.push(k),M))continue;k!==null&&k.append(D)}else E.push(D),k=null}i.$isRangeSelection(m)?m.insertNodes(E):i.DEPRECATED_$isGridSelection(m)&&(u=m.anchor.getNode(),i.DEPRECATED_$isGridCellNode(u)||f(41),u.append(...E))}(S,T)}function p(C,S,T,u=[]){let m=S==null||T.isSelected(S),E=i.$isElementNode(T)&&T.excludeFromCopy("html");var k=T;if(S!==null){var j=n.$cloneWithProperties(T);k=j=i.$isTextNode(j)&&S!=null?n.$sliceSelectedTextNodeContent(S,j):j}let D=i.$isElementNode(k)?k.getChildren():[];var M=k;(j=M.exportJSON()).type!==M.constructor.getType()&&f(58);var _=j.children;for(i.$isElementNode(M)&&(Array.isArray(_)||f(59)),i.$isTextNode(k)&&(0<(k=k.__text).length?j.text=k:m=!1),k=0;k<D.length;k++)_=p(C,S,M=D[k],j.children),!m&&i.$isElementNode(T)&&_&&T.extractWithChild(M,S,"clone")&&(m=!0);if(m&&!E)u.push(j);else if(Array.isArray(j.children))for(C=0;C<j.children.length;C++)u.push(j.children[C]);return m}function v(C,S){let T=[],u=i.$getRoot().getChildren();for(let m=0;m<u.length;m++)p(C,S,u[m],T);return{namespace:C._config.namespace,nodes:T}}function w(C){let S=[];for(let T=0;T<C.length;T++){let u=i.$parseSerializedNode(C[T]);i.$isTextNode(u)&&n.$addNodeStyle(u),S.push(u)}return S}let d=null;function s(C,S){var T=window.getSelection();if(!T)return!1;var u=T.anchorNode;if(T=T.focusNode,u!==null&&T!==null&&!i.isSelectionWithinEditor(C,u,T)||(S.preventDefault(),S=S.clipboardData,u=i.$getSelection(),S===null||u===null))return!1;T=x(C),C=o(C);let m="";return u!==null&&(m=u.getTextContent()),T!==null&&S.setData("text/html",T),C!==null&&S.setData("application/x-lexical-editor",C),S.setData("text/plain",m),!0}return Vt.$generateJSONFromSelectedNodes=v,Vt.$generateNodesFromSerializedNodes=w,Vt.$getHtmlContent=x,Vt.$getLexicalContent=o,Vt.$insertDataTransferForPlainText=function(C,S){(C=C.getData("text/plain"))!=null&&S.insertRawText(C)},Vt.$insertDataTransferForRichText=function(C,S,T){var u=C.getData("application/x-lexical-editor");if(u)try{let E=JSON.parse(u);if(E.namespace===T._config.namespace&&Array.isArray(E.nodes))return l(T,w(E.nodes),S)}catch{}if(u=C.getData("text/html"))try{var m=new DOMParser().parseFromString(u,"text/html");return l(T,e.$generateNodesFromDOM(T,m),S)}catch{}if((C=C.getData("text/plain"))!=null)if(i.$isRangeSelection(S))for(T=(C=C.split(/\r?\n/)).length,m=0;m<T;m++)S.insertText(C[m]),m<T-1&&S.insertParagraph();else S.insertRawText(C)},Vt.$insertGeneratedNodes=l,Vt.copyToClipboard=async function(C,S){if(d!==null)return!1;if(S!==null)return new Promise(E=>{C.update(()=>{E(s(C,S))})});var T=C.getRootElement();let u=document.getSelection();if(T===null||u===null)return!1;let m=document.createElement("span");return m.style.cssText="position: fixed; top: -1000px;",m.append(document.createTextNode("#")),T.append(m),(T=new Range).setStart(m,0),T.setEnd(m,1),u.removeAllRanges(),u.addRange(T),new Promise(E=>{let k=C.registerCommand(i.COPY_COMMAND,j=>(j instanceof ClipboardEvent&&(k(),d!==null&&(window.clearTimeout(d),d=null),E(s(C,j))),!0),i.COMMAND_PRIORITY_CRITICAL);d=window.setTimeout(()=>{k(),d=null,E(!1)},50),document.execCommand("copy"),m.remove()})},Vt}function zp(){if(cs)return Mt;cs=1;var e=function(){return ls?ss:(ls=1,ss=Bp())}(),n=Ni(),a=$t(),i=Ze();function f(_,R){return document.caretRangeFromPoint!==void 0?(_=document.caretRangeFromPoint(_,R))===null?null:{node:_.startContainer,offset:_.startOffset}:document.caretPositionFromPoint!=="undefined"?(_=document.caretPositionFromPoint(_,R))===null?null:{node:_.offsetNode,offset:_.offset}:null}let x=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,o=x&&"documentMode"in document?document.documentMode:null,l=!(!x||!("InputEvent"in window)||o)&&"getTargetRanges"in new window.InputEvent("input"),p=x&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),v=x&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,w=x&&/^(?=.*Chrome).*/i.test(navigator.userAgent),d=x&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!w,s=i.createCommand("DRAG_DROP_PASTE_FILE");class C extends i.ElementNode{static getType(){return"quote"}static clone(R){return new C(R.__key)}constructor(R){super(R)}createDOM(R){let A=document.createElement("blockquote");return a.addClassNamesToElement(A,R.theme.quote),A}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:E,priority:0})}}static importJSON(R){let A=S();return A.setFormat(R.format),A.setIndent(R.indent),A.setDirection(R.direction),A}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(R,A){R=i.$createParagraphNode();let F=this.getDirection();return R.setDirection(F),this.insertAfter(R,A),R}collapseAtStart(){let R=i.$createParagraphNode();return this.getChildren().forEach(A=>R.append(A)),this.replace(R),!0}}function S(){return i.$applyNodeReplacement(new C)}class T extends i.ElementNode{static getType(){return"heading"}static clone(R){return new T(R.__tag,R.__key)}constructor(R,A){super(A),this.__tag=R}getTag(){return this.__tag}createDOM(R){let A=this.__tag,F=document.createElement(A);return(R=R.theme.heading)!==void 0&&a.addClassNamesToElement(F,R[A]),F}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:m,priority:0}),h2:()=>({conversion:m,priority:0}),h3:()=>({conversion:m,priority:0}),h4:()=>({conversion:m,priority:0}),h5:()=>({conversion:m,priority:0}),h6:()=>({conversion:m,priority:0}),p:R=>(R=R.firstChild)!==null&&u(R)?{conversion:()=>({node:null}),priority:3}:null,span:R=>u(R)?{conversion:()=>({node:k("h1")}),priority:3}:null}}static importJSON(R){let A=k(R.tag);return A.setFormat(R.format),A.setIndent(R.indent),A.setDirection(R.direction),A}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(R,A=!0){R=0<(R=R?R.anchor.offset:0)&&R<this.getTextContentSize()?k(this.getTag()):i.$createParagraphNode();let F=this.getDirection();return R.setDirection(F),this.insertAfter(R,A),R}collapseAtStart(){let R=this.isEmpty()?i.$createParagraphNode():k(this.getTag());return this.getChildren().forEach(A=>R.append(A)),this.replace(R),!0}extractWithChild(){return!0}}function u(_){return _.nodeName.toLowerCase()==="span"&&_.style.fontSize==="26pt"}function m(_){let R=null;return(_=_.nodeName.toLowerCase())!=="h1"&&_!=="h2"&&_!=="h3"&&_!=="h4"&&_!=="h5"&&_!=="h6"||(R=k(_)),{node:R}}function E(){return{node:S()}}function k(_){return i.$applyNodeReplacement(new T(_))}function j(_){let R=null;if(_ instanceof DragEvent?R=_.dataTransfer:_ instanceof ClipboardEvent&&(R=_.clipboardData),R===null)return[!1,[],!1];var A=R.types;return _=A.includes("Files"),A=A.includes("text/html")||A.includes("text/plain"),[_,Array.from(R.files),A]}function D(_,R){var A=i.$getSelection();if(i.$isRangeSelection(A)){var F=new Set;A=A.getNodes();for(let K=0;K<A.length;K++){let ee=A[K],te=ee.getKey();if(F.has(te))continue;let Z=a.$getNearestBlockElementAncestorOrThrow(ee),B=Z.getKey();Z.canInsertTab()?(_(ee),F.add(te)):Z.canIndent()&&!F.has(B)&&(F.add(B),R(Z))}}}function M(_){return _=i.$getNearestNodeFromDOMNode(_),i.$isDecoratorNode(_)}return Mt.$createHeadingNode=k,Mt.$createQuoteNode=S,Mt.$isHeadingNode=function(_){return _ instanceof T},Mt.$isQuoteNode=function(_){return _ instanceof C},Mt.DRAG_DROP_PASTE=s,Mt.HeadingNode=T,Mt.QuoteNode=C,Mt.eventFiles=j,Mt.registerRichText=function(_){return a.mergeRegister(_.registerCommand(i.CLICK_COMMAND,()=>{const R=i.$getSelection();return!!i.$isNodeSelection(R)&&(R.clear(),!0)},0),_.registerCommand(i.DELETE_CHARACTER_COMMAND,R=>{const A=i.$getSelection();return!!i.$isRangeSelection(A)&&(A.deleteCharacter(R),!0)},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.DELETE_WORD_COMMAND,R=>{const A=i.$getSelection();return!!i.$isRangeSelection(A)&&(A.deleteWord(R),!0)},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.DELETE_LINE_COMMAND,R=>{const A=i.$getSelection();return!!i.$isRangeSelection(A)&&(A.deleteLine(R),!0)},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.CONTROLLED_TEXT_INSERTION_COMMAND,R=>{const A=i.$getSelection();if(typeof R=="string")i.$isRangeSelection(A)?A.insertText(R):i.DEPRECATED_$isGridSelection(A);else{if(!i.$isRangeSelection(A)&&!i.DEPRECATED_$isGridSelection(A))return!1;const F=R.dataTransfer;F!=null?e.$insertDataTransferForRichText(F,A,_):i.$isRangeSelection(A)&&(R=R.data)&&A.insertText(R)}return!0},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.REMOVE_TEXT_COMMAND,()=>{const R=i.$getSelection();return!!i.$isRangeSelection(R)&&(R.removeText(),!0)},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.FORMAT_TEXT_COMMAND,R=>{const A=i.$getSelection();return!!i.$isRangeSelection(A)&&(A.formatText(R),!0)},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.FORMAT_ELEMENT_COMMAND,R=>{var A=i.$getSelection();if(!i.$isRangeSelection(A)&&!i.$isNodeSelection(A))return!1;A=A.getNodes();for(const F of A)a.$getNearestBlockElementAncestorOrThrow(F).setFormat(R);return!0},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.INSERT_LINE_BREAK_COMMAND,R=>{const A=i.$getSelection();return!!i.$isRangeSelection(A)&&(A.insertLineBreak(R),!0)},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.INSERT_PARAGRAPH_COMMAND,()=>{const R=i.$getSelection();return!!i.$isRangeSelection(R)&&(R.insertParagraph(),!0)},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.INDENT_CONTENT_COMMAND,()=>(D(()=>{_.dispatchCommand(i.CONTROLLED_TEXT_INSERTION_COMMAND," ")},R=>{const A=R.getIndent();A!==10&&R.setIndent(A+1)}),!0),i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.OUTDENT_CONTENT_COMMAND,()=>(D(R=>{i.$isTextNode(R)&&(R=R.getTextContent())[R.length-1]===" "&&_.dispatchCommand(i.DELETE_CHARACTER_COMMAND,!0)},R=>{const A=R.getIndent();A!==0&&R.setIndent(A-1)}),!0),i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.KEY_ARROW_UP_COMMAND,R=>{var A=i.$getSelection();if(i.$isNodeSelection(A)&&!M(R.target)){if(0<(R=A.getNodes()).length)return R[0].selectPrevious(),!0}else if(i.$isRangeSelection(A)){if(A=i.$getAdjacentNode(A.focus,!0),i.$isDecoratorNode(A)&&!A.isIsolated()&&!A.isInline())return A.selectPrevious(),R.preventDefault(),!0;if(i.$isElementNode(A)&&!A.isInline()&&!A.canBeEmpty())return A.select(),R.preventDefault(),!0}return!1},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.KEY_ARROW_DOWN_COMMAND,R=>{var A=i.$getSelection();if(i.$isNodeSelection(A)){if(0<(R=A.getNodes()).length)return R[0].selectNext(0,0),!0}else if(i.$isRangeSelection(A)){let F=A.focus;if(F.key==="root"&&F.offset===i.$getRoot().getChildrenSize())return R.preventDefault(),!0;if(A=i.$getAdjacentNode(A.focus,!1),i.$isDecoratorNode(A)&&!A.isIsolated()&&!A.isInline())return A.selectNext(),R.preventDefault(),!0}return!1},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.KEY_ARROW_LEFT_COMMAND,R=>{const A=i.$getSelection();if(i.$isNodeSelection(A)){var F=A.getNodes();if(0<F.length)return R.preventDefault(),F[0].selectPrevious(),!0}return!!i.$isRangeSelection(A)&&!!n.$shouldOverrideDefaultCharacterSelection(A,!0)&&(F=R.shiftKey,R.preventDefault(),n.$moveCharacter(A,F,!0),!0)},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.KEY_ARROW_RIGHT_COMMAND,R=>{const A=i.$getSelection();if(i.$isNodeSelection(A)&&!M(R.target)){var F=A.getNodes();if(0<F.length)return R.preventDefault(),F[0].selectNext(0,0),!0}return!!i.$isRangeSelection(A)&&(F=R.shiftKey,!!n.$shouldOverrideDefaultCharacterSelection(A,!1)&&(R.preventDefault(),n.$moveCharacter(A,F,!1),!0))},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.KEY_BACKSPACE_COMMAND,R=>{if(M(R.target))return!1;const A=i.$getSelection();if(!i.$isRangeSelection(A))return!1;R.preventDefault(),{anchor:R}=A;const F=R.getNode();return A.isCollapsed()&&R.offset===0&&!i.$isRootNode(F)&&0<a.$getNearestBlockElementAncestorOrThrow(F).getIndent()?_.dispatchCommand(i.OUTDENT_CONTENT_COMMAND,void 0):_.dispatchCommand(i.DELETE_CHARACTER_COMMAND,!0)},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.KEY_DELETE_COMMAND,R=>{if(M(R.target))return!1;const A=i.$getSelection();return!!i.$isRangeSelection(A)&&(R.preventDefault(),_.dispatchCommand(i.DELETE_CHARACTER_COMMAND,!1))},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.KEY_ENTER_COMMAND,R=>{const A=i.$getSelection();if(!i.$isRangeSelection(A))return!1;if(R!==null){if((v||p||d)&&l)return!1;if(R.preventDefault(),R.shiftKey)return _.dispatchCommand(i.INSERT_LINE_BREAK_COMMAND,!1)}return _.dispatchCommand(i.INSERT_PARAGRAPH_COMMAND,void 0)},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.KEY_ESCAPE_COMMAND,()=>{const R=i.$getSelection();return!!i.$isRangeSelection(R)&&(_.blur(),!0)},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.DROP_COMMAND,R=>{const[,A]=j(R);if(0<A.length){var F=f(R.clientX,R.clientY);if(F!==null){const{offset:ee,node:te}=F;var K=i.$getNearestNodeFromDOMNode(te);if(K!==null){if(F=i.$createRangeSelection(),i.$isTextNode(K))F.anchor.set(K.getKey(),ee,"text"),F.focus.set(K.getKey(),ee,"text");else{const Z=K.getParentOrThrow().getKey();K=K.getIndexWithinParent()+1,F.anchor.set(Z,K,"element"),F.focus.set(Z,K,"element")}F=i.$normalizeSelection__EXPERIMENTAL(F),i.$setSelection(F)}_.dispatchCommand(s,A)}return R.preventDefault(),!0}return R=i.$getSelection(),!!i.$isRangeSelection(R)},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.DRAGSTART_COMMAND,R=>{[R]=j(R);const A=i.$getSelection();return!(R&&!i.$isRangeSelection(A))},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.DRAGOVER_COMMAND,R=>{var[A]=j(R);const F=i.$getSelection();return!(A&&!i.$isRangeSelection(F))&&((A=f(R.clientX,R.clientY))!==null&&(A=i.$getNearestNodeFromDOMNode(A.node),i.$isDecoratorNode(A)&&R.preventDefault()),!0)},i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.COPY_COMMAND,R=>(e.copyToClipboard(_,R instanceof ClipboardEvent?R:null),!0),i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.CUT_COMMAND,R=>(async function(A,F){await e.copyToClipboard(F,A instanceof ClipboardEvent?A:null),F.update(()=>{let K=i.$getSelection();i.$isRangeSelection(K)?K.removeText():i.$isNodeSelection(K)&&K.getNodes().forEach(ee=>ee.remove())})}(R,_),!0),i.COMMAND_PRIORITY_EDITOR),_.registerCommand(i.PASTE_COMMAND,R=>{const[,A,F]=j(R);if(0<A.length&&!F)return _.dispatchCommand(s,A),!0;if(i.isSelectionCapturedInDecoratorInput(R.target))return!1;const K=i.$getSelection();return!(!i.$isRangeSelection(K)&&!i.DEPRECATED_$isGridSelection(K))&&(function(ee,te){ee.preventDefault(),te.update(()=>{let Z=i.$getSelection(),B=ee instanceof InputEvent||ee instanceof KeyboardEvent?null:ee.clipboardData;B!=null&&(i.$isRangeSelection(Z)||i.DEPRECATED_$isGridSelection(Z))&&e.$insertDataTransferForRichText(B,Z,te)},{tag:"paste"})}(R,_),!0)},i.COMMAND_PRIORITY_EDITOR))},Mt}function Qr(){return us?ds:(us=1,ds=zp())}function Hp(){if(hs)return ze;hs=1;var e=Ze(),n=Ud(),a=Zr(),i=Qr(),f=$t(),x=Ro();function o(P,J){let X={};for(let ne of P)X[P=J(ne)]?X[P].push(ne):X[P]=[ne];return X}function l(P){return{element:(P=o(P,J=>J.type)).element||[],textFormat:P["text-format"]||[],textMatch:P["text-match"]||[]}}let p=/[!-/:-@[-`{-~\s]/;function v(P,J,X,ne){for(let re of J)if((J=re.export(P,ie=>w(ie,X,ne)))!=null)return J;return e.$isElementNode(P)?w(P,X,ne):e.$isDecoratorNode(P)?P.getTextContent():null}function w(P,J,X){let ne=[];P=P.getChildren();e:for(let re of P){for(let ie of X)if((P=ie.export(re,ce=>w(ce,J,X),(ce,he)=>d(ce,he,J)))!=null){ne.push(P);continue e}e.$isLineBreakNode(re)?ne.push(`
9
- `):e.$isTextNode(re)?ne.push(d(re,re.getTextContent(),J)):e.$isElementNode(re)?ne.push(w(re,J,X)):e.$isDecoratorNode(re)&&ne.push(re.getTextContent())}return ne.join("")}function d(P,J,X){let ne=J.trim(),re=ne,ie=new Set;for(let he of X){X=he.format[0];let ue=he.tag;if(C(P,X)&&!ie.has(X)){ie.add(X);var ce=s(P,!0);C(ce,X)||(re=ue+re),C(ce=s(P,!1),X)||(re+=ue)}}return J.replace(ne,re)}function s(P,J){let X=J?P.getPreviousSibling():P.getNextSibling();for(X||(P=P.getParentOrThrow()).isInline()&&(X=J?P.getPreviousSibling():P.getNextSibling());X;){if(e.$isElementNode(X)){if(!X.isInline())break;if(P=J?X.getLastDescendant():X.getFirstDescendant(),e.$isTextNode(P))return P;X=J?X.getPreviousSibling():X.getNextSibling()}if(e.$isTextNode(X))return X;if(!e.$isElementNode(X))break}return null}function C(P,J){return e.$isTextNode(P)&&P.hasFormat(J)}let S=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,T=S&&"documentMode"in document?document.documentMode:null;S&&"InputEvent"in window&&!T&&new window.InputEvent("input");let u=S&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),m=S&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,E=S&&/^(?=.*Chrome).*/i.test(navigator.userAgent),k=S&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!E,j=/^\s{0,3}$/,D=/^```(\w{1,10})?\s?$/;function M(P){let J=l(P),X=function(ne){let re={},ie={},ce=[];for(let he of ne){({tag:ne}=he),re[ne]=he;let ue=ne.replace(/(\*|\^|\+)/g,"\\$1");ce.push(ue),ie[ne]=u||m||k?new RegExp(`(${ue})(?![${ue}\\s])(.*?[^${ue}\\s])${ue}(?!${ue})`):new RegExp(`(?<![\\\\${ue}])(${ue})((\\\\${ue})?.*?[^${ue}\\s](\\\\${ue})?)((?<!\\\\)|(?<=\\\\\\\\))(${ue})(?![\\\\${ue}])`)}return{fullMatchRegExpByTag:ie,openTagsRegExp:new RegExp((u||m||k?"":"(?<![\\\\])")+"("+ce.join("|")+")","g"),transformersByTag:re}}(J.textFormat);return(ne,re)=>{var ie=(ne=ne.split(`
10
- `)).length;(re=re||e.$getRoot()).clear();for(let xe=0;xe<ie;xe++){var ce=ne[xe];e:{var he=ne,ue=xe,Ce=re,be=he[ue].match(D);if(be){for(var me=ue,le=he.length;++me<le;)if(he[me].match(D)){be=n.$createCodeNode(be[1]),he=e.$createTextNode(he.slice(ue+1,me).join(`
11
- `)),be.append(he),Ce.append(be),Ce=[be,me];break e}}Ce=[null,ue]}let[ge,de]=Ce;if(ge!=null)xe=de;else{Ce=ce,le=re;var Re=J.element;me=X,he=J.textMatch,ue=Ce.trim(),be=e.$createTextNode(ue),(ce=e.$createParagraphNode()).append(be),le.append(ce);for(let{regExp:ye,replace:Ne}of Re)if(le=Ce.match(ye)){be.setTextContent(Ce.slice(le[0].length)),Ne(ce,[be],le,!0);break}_(be,me,he),ce.isAttached()&&0<ue.length&&(Ce=ce.getPreviousSibling(),e.$isParagraphNode(Ce)||i.$isQuoteNode(Ce)||a.$isListNode(Ce))&&(me=Ce,a.$isListNode(Ce)&&(me=(Ce=Ce.getLastDescendant())==null?null:f.$findMatchingParent(Ce,a.$isListItemNode)),me!=null&&0<me.getTextContentSize()&&(me.splice(me.getChildrenSize(),0,[e.$createLineBreakNode(),...ce.getChildren()]),ce.remove()))}}ne=re.getChildren();for(let xe of ne)ne=xe,e.$isParagraphNode(ne)?(ie=ne.getFirstChild(),ne=ie==null||ne.getChildrenSize()===1&&e.$isTextNode(ie)&&j.test(ie.getTextContent())):ne=!1,ne&&xe.remove();e.$getSelection()!==null&&re.selectEnd()}}function _(P,J,X){var ne=P.getTextContent();let re=function(ue,Ce){var be=ue.match(Ce.openTagsRegExp);if(be==null)return null;for(let Re of be){var me=Re.replace(/^\s/,"");if((be=Ce.fullMatchRegExpByTag[me])!=null&&(be=ue.match(be),me=Ce.transformersByTag[me],be!=null&&me!=null)){if(me.intraword!==!1)return be;var{index:le=0}=be;if(me=ue[le-1],le=ue[le+be[0].length],!(me&&!p.test(me)||le&&!p.test(le)))return be}}return null}(ne,J);if(re){var ie,ce;if(re[0]===ne)var he=P;else{let ue=(ne=re.index||0)+re[0].length;ne===0?[he,ie]=P.splitText(ue):[ce,he,ie]=P.splitText(ne,ue)}if(he.setTextContent(re[2]),P=J.transformersByTag[re[1]])for(let ue of P.format)he.hasFormat(ue)||he.toggleFormat(ue);he.hasFormat("code")||_(he,J,X),ce&&_(ce,J,X),ie&&_(ie,J,X)}else R(P,X)}function R(P,J){e:for(;P;){for(let X of J){let ne=P.getTextContent().match(X.importRegExp);if(!ne)continue;let re,ie,ce,he=ne.index||0,ue=he+ne[0].length;he===0?[re,P]=P.splitText(ue):[ie,re,ce]=P.splitText(he,ue),ie&&R(ie,J),ce&&(P=ce),X.replace(re,ne);continue e}break}}function A(P,J,X){let ne=X.length;for(;J>=ne;J--){let re=J-ne;if(F(P,re,X,0,ne)&&P[re+ne]!==" ")return re}return-1}function F(P,J,X,ne,re){for(let ie=0;ie<re;ie++)if(P[J+ie]!==X[ne+ie])return!1;return!0}let K=P=>(J,X,ne)=>{(ne=P(ne)).append(...X),J.replace(ne),ne.select(0,0)},ee=P=>(J,X,ne)=>{var re=J.getPreviousSibling();const ie=a.$createListItemNode(P==="check"?ne[3]==="x":void 0);a.$isListNode(re)&&re.getListType()===P?(re.append(ie),J.remove()):((re=a.$createListNode(P,P==="number"?Number(ne[2]):void 0)).append(ie),J.replace(re)),ie.append(...X),ie.select(0,0),(J=Math.floor(ne[1].length/4))&&ie.setIndent(J)},te=(P,J,X)=>{const ne=[];var re=P.getChildren();let ie=0;for(const he of re)if(a.$isListItemNode(he)){if(he.getChildrenSize()===1&&(re=he.getFirstChild(),a.$isListNode(re))){ne.push(te(re,J,X+1));continue}re=" ".repeat(4*X);var ce=P.getListType();ce=ce==="number"?`${P.getStart()+ie}. `:ce==="check"?`- [${he.getChecked()?"x":" "}] `:"- ",ne.push(re+ce+J(he)),ie++}return ne.join(`
12
- `)},Z={dependencies:[i.HeadingNode],export:(P,J)=>{if(!i.$isHeadingNode(P))return null;const X=Number(P.getTag().slice(1));return"#".repeat(X)+" "+J(P)},regExp:/^(#{1,6})\s/,replace:K(P=>i.$createHeadingNode("h"+P[1].length)),type:"element"},B={dependencies:[i.QuoteNode],export:(P,J)=>{if(!i.$isQuoteNode(P))return null;P=J(P).split(`
13
- `),J=[];for(const X of P)J.push("> "+X);return J.join(`
14
- `)},regExp:/^>\s/,replace:(P,J,X,ne)=>{if(ne&&(X=P.getPreviousSibling(),i.$isQuoteNode(X)))return X.splice(X.getChildrenSize(),0,[e.$createLineBreakNode(),...J]),X.select(0,0),void P.remove();(X=i.$createQuoteNode()).append(...J),P.replace(X),X.select(0,0)},type:"element"},O={dependencies:[n.CodeNode],export:P=>{if(!n.$isCodeNode(P))return null;const J=P.getTextContent();return"```"+(P.getLanguage()||"")+(J?`
15
- `+J:"")+"\n```"},regExp:/^```(\w{1,10})?\s/,replace:K(P=>n.$createCodeNode(P?P[1]:void 0)),type:"element"},g={dependencies:[a.ListNode,a.ListItemNode],export:(P,J)=>a.$isListNode(P)?te(P,J,0):null,regExp:/^(\s*)[-*+]\s/,replace:ee("bullet"),type:"element"},h={dependencies:[a.ListNode,a.ListItemNode],export:(P,J)=>a.$isListNode(P)?te(P,J,0):null,regExp:/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,replace:ee("check"),type:"element"},N={dependencies:[a.ListNode,a.ListItemNode],export:(P,J)=>a.$isListNode(P)?te(P,J,0):null,regExp:/^(\s*)(\d{1,})\.\s/,replace:ee("number"),type:"element"},$={format:["code"],tag:"`",type:"text-format"},b={format:["highlight"],tag:"==",type:"text-format"},I={format:["bold","italic"],tag:"***",type:"text-format"},L={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},U={format:["bold"],tag:"**",type:"text-format"},Q={format:["bold"],intraword:!1,tag:"__",type:"text-format"},Y={format:["strikethrough"],tag:"~~",type:"text-format"},z={format:["italic"],tag:"*",type:"text-format"},H={format:["italic"],intraword:!1,tag:"_",type:"text-format"},V={dependencies:[x.LinkNode],export:(P,J,X)=>{if(!x.$isLinkNode(P))return null;J=(J=P.getTitle())?`[${P.getTextContent()}](${P.getURL()} "${J}")`:`[${P.getTextContent()}](${P.getURL()})`;const ne=P.getFirstChild();return P.getChildrenSize()===1&&e.$isTextNode(ne)?X(ne,J):J},importRegExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(P,J)=>{const[,X,ne,re]=J;J=x.$createLinkNode(ne,{title:re});const ie=e.$createTextNode(X);ie.setFormat(P.getFormat()),J.append(ie),P.replace(J)},trigger:")",type:"text-match"},G=[Z,B,O,g,N],oe=[$,I,L,U,Q,b,z,H,Y],se=[V],q=[...G,...oe,...se];return ze.$convertFromMarkdownString=function(P,J=q,X){return M(J)(P,X)},ze.$convertToMarkdownString=function(P=q,J){return function(X){let ne=l(X),re=ne.textFormat.filter(ie=>ie.format.length===1);return ie=>{let ce=[];ie=(ie||e.$getRoot()).getChildren();for(let he of ie)(ie=v(he,ne.element,re,ne.textMatch))!=null&&ce.push(ie);return ce.join(`
16
-
17
- `)}}(P)(J)},ze.BOLD_ITALIC_STAR=I,ze.BOLD_ITALIC_UNDERSCORE=L,ze.BOLD_STAR=U,ze.BOLD_UNDERSCORE=Q,ze.CHECK_LIST=h,ze.CODE=O,ze.ELEMENT_TRANSFORMERS=G,ze.HEADING=Z,ze.HIGHLIGHT=b,ze.INLINE_CODE=$,ze.ITALIC_STAR=z,ze.ITALIC_UNDERSCORE=H,ze.LINK=V,ze.ORDERED_LIST=N,ze.QUOTE=B,ze.STRIKETHROUGH=Y,ze.TEXT_FORMAT_TRANSFORMERS=oe,ze.TEXT_MATCH_TRANSFORMERS=se,ze.TRANSFORMERS=q,ze.UNORDERED_LIST=g,ze.registerMarkdownShortcuts=function(P,J=q){let X=l(J),ne=o(X.textFormat,({tag:ie})=>ie[ie.length-1]),re=o(X.textMatch,({trigger:ie})=>ie);for(let ie of J)if(((J=ie.type)==="element"||J==="text-match")&&!P.hasNodes(ie.dependencies))throw Error("Minified Lexical error #79; visit https://lexical.dev/docs/error?code=79 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");return P.registerUpdateListener(({tags:ie,dirtyLeaves:ce,editorState:he,prevEditorState:ue})=>{if(!ie.has("historic")){var Ce=he.read(e.$getSelection);if(ie=ue.read(e.$getSelection),e.$isRangeSelection(ie)&&e.$isRangeSelection(Ce)&&Ce.isCollapsed()){ue=Ce.anchor.key;var be=Ce.anchor.offset,me=he._nodeMap.get(ue);e.$isTextNode(me)&&ce.has(ue)&&(be===1||be===ie.anchor.offset+1)&&P.update(()=>{if(!me.hasFormat("code")){var le=me.getParent();if(le!==null&&!n.$isCodeNode(le)){var Re=Ce.anchor.offset;e:{var xe=X.element,ge=le.getParent();if(e.$isRootOrShadowRoot(ge)&&le.getFirstChild()===me&&(ge=me.getTextContent())[Re-1]===" "){for(let{regExp:Ue,replace:Et}of xe)if((xe=ge.match(Ue))&&xe[0].length===Re){ge=me.getNextSiblings();let[Qe,ct]=me.splitText(Re);Qe.remove(),Et(le,ge=ct?[ct,...ge]:ge,xe,!1),le=!0;break e}}le=!1}if(!le){e:{if(xe=me.getTextContent(),(le=re[xe[Re-1]])!=null){for(ye of(Re<xe.length&&(xe=xe.slice(0,Re)),le))if((le=xe.match(ye.regExp))!==null){ge=(xe=le.index||0)+le[0].length;var de=void 0;xe===0?[de]=me.splitText(ge):[,de]=me.splitText(xe,ge),de.selectNext(0,0),ye.replace(de,le);var ye=!0;break e}}ye=!1}if(!ye)e:{var Ne=(ge=me.getTextContent())[--Re];if(ye=ne[Ne])for(let Ue of ye){var{tag:Pe}=Ue;let Et=Re-(ye=Pe.length)+1;if(!(1<ye&&!F(ge,Et,Pe,0,ye)||ge[Et-1]===" ")&&(de=ge[Re+1],Ue.intraword!==!1||!de||p.test(de))){le=de=me,xe=A(ge,Et,Pe);for(var Oe=le;0>xe&&(Oe=Oe.getPreviousSibling())&&!e.$isLineBreakNode(Oe);)e.$isTextNode(Oe)&&(xe=Oe.getTextContent(),le=Oe,xe=A(xe,xe.length,Pe));if(!(0>xe||le===de&&xe+ye===Et||(Pe=le.getTextContent(),0<xe&&Pe[xe-1]===Ne||(Oe=Pe[xe-1],Ue.intraword===!1&&Oe&&!p.test(Oe))))){ge=(ge=de.getTextContent()).slice(0,Et)+ge.slice(Re+1),de.setTextContent(ge),ge=le===de?ge:Pe,le.setTextContent(ge.slice(0,xe)+ge.slice(xe+ye)),ge=e.$getSelection(),Ne=e.$createRangeSelection(),e.$setSelection(Ne),Re=Re-ye*(le===de?2:1)+1,Ne.anchor.set(le.__key,xe,"text"),Ne.focus.set(de.__key,Re,"text");for(let Qe of Ue.format)Ne.hasFormat(Qe)||Ne.formatText(Qe);Ne.anchor.set(Ne.focus.key,Ne.focus.offset,Ne.focus.type);for(let Qe of Ue.format)Ne.hasFormat(Qe)&&Ne.toggleFormat(Qe);e.$isRangeSelection(ge)&&(Ne.format=ge.format);break e}}}}}}}})}}})},ze}function Wd(){return gs?ps:(gs=1,ps=Hp())}var ms,fs,xs,ys,Cs,bs,Up=Wd(),Po={},di={};function _t(){return xs?fs:(xs=1,fs=function(){if(ms)return di;ms=1;var n=kt();let a=n.createContext(null);return di.LexicalComposerContext=a,di.createLexicalComposerContext=function(i,f){let x=null;return i!=null&&(x=i[1]),{getTheme:function(){return f??(x!=null?x.getTheme():null)}}},di.useLexicalComposerContext=function(){let i=n.useContext(a);if(i==null)throw Error("Minified Lexical error #8; visit https://lexical.dev/docs/error?code=8 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");return i},di}())}var ws,vs,Ss,Vp=function(){return bs?Cs:(bs=1,Cs=function(){if(ys)return Po;ys=1;var n=_t(),a=kt();return Po.AutoFocusPlugin=function({defaultSelection:i}){let[f]=n.useLexicalComposerContext();return a.useEffect(()=>{f.focus(()=>{let x=document.activeElement,o=f.getRootElement();o===null||x!==null&&o.contains(x)||o.focus({preventScroll:!0})},{defaultSelection:i})},[i,f]),null},Po}())}(),Fo={};function Wp(){if(ws)return Fo;ws=1;var e=_t(),n=Ze(),a=kt();let i=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;var f=i?a.useLayoutEffect:a.useEffect;let x={tag:"history-merge"};return Fo.LexicalComposer=function({initialConfig:o,children:l}){let p=a.useMemo(()=>{const{theme:v,namespace:w,editor__DEPRECATED:d,nodes:s,onError:C,editorState:S}=o,T=e.createLexicalComposerContext(null,v);let u=d||null;if(u===null){const m=n.createEditor({editable:o.editable,namespace:w,nodes:s,onError:E=>C(E,m),theme:v});(function(E,k){if(k!==null){if(k===void 0)E.update(()=>{var j=n.$getRoot();if(j.isEmpty()){let D=n.$createParagraphNode();j.append(D),j=i?document.activeElement:null,(n.$getSelection()!==null||j!==null&&j===E.getRootElement())&&D.select()}},x);else if(k!==null)switch(typeof k){case"string":let j=E.parseEditorState(k);E.setEditorState(j,x);break;case"object":E.setEditorState(k,x);break;case"function":E.update(()=>{n.$getRoot().isEmpty()&&k(E)},x)}}})(m,S),u=m}return[u,T]},[]);return f(()=>{let v=o.editable,[w]=p;w.setEditable(v===void 0||v)},[]),a.createElement(e.LexicalComposerContext.Provider,{value:p},l)},Fo}var ks,$s,Es,Kp=function(){return Ss?vs:(Ss=1,vs=Wp())}(),Bo={},Ts,js,Ns,_s,Gp=function(){return Es?$s:(Es=1,$s=function(){if(ks)return Bo;ks=1;var n=_t(),a=kt(),i=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?a.useLayoutEffect:a.useEffect;return Bo.ContentEditable=function({ariaActiveDescendant:f,ariaAutoComplete:x,ariaControls:o,ariaDescribedBy:l,ariaExpanded:p,ariaLabel:v,ariaLabelledBy:w,ariaMultiline:d,ariaOwns:s,ariaRequired:C,autoCapitalize:S,className:T,id:u,role:m="textbox",spellCheck:E=!0,style:k,tabIndex:j,"data-testid":D}){let[M]=n.useLexicalComposerContext(),[_,R]=a.useState(!1),A=a.useCallback(F=>{M.setRootElement(F)},[M]);return i(()=>(R(M.isEditable()),M.registerEditableListener(F=>{R(F)})),[M]),a.createElement("div",{"aria-activedescendant":_?f:void 0,"aria-autocomplete":_?x:"none","aria-controls":_?o:void 0,"aria-describedby":l,"aria-expanded":_&&m==="combobox"?!!p:void 0,"aria-label":v,"aria-labelledby":w,"aria-multiline":d,"aria-owns":_?s:void 0,"aria-required":C,autoCapitalize:S,className:T,contentEditable:_,"data-testid":D,id:u,ref:A,role:_?m:void 0,spellCheck:E,style:k,tabIndex:j})},Bo}())}();function Yp(){if(js)return Ts;js=1;var e=kt();function n(f,x){return(n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o})(f,x)}var a={error:null},i=function(f){function x(){for(var l,p=arguments.length,v=Array(p),w=0;w<p;w++)v[w]=arguments[w];return(l=f.call.apply(f,[this].concat(v))||this).state=a,l.resetErrorBoundary=function(){for(var d,s=arguments.length,C=Array(s),S=0;S<s;S++)C[S]=arguments[S];l.props.onReset==null||(d=l.props).onReset.apply(d,C),l.reset()},l}(function(l,p){l.prototype=Object.create(p.prototype),l.prototype.constructor=l,n(l,p)})(x,f),x.getDerivedStateFromError=function(l){return{error:l}};var o=x.prototype;return o.reset=function(){this.setState(a)},o.componentDidCatch=function(l,p){var v,w;(v=(w=this.props).onError)==null||v.call(w,l,p)},o.componentDidUpdate=function(l,p){var v,w,d=this.props.resetKeys;this.state.error!==null&&p.error!==null&&function(s,C){return s===void 0&&(s=[]),C===void 0&&(C=[]),s.length!==C.length||s.some(function(S,T){return!Object.is(S,C[T])})}(l.resetKeys,d)&&((v=(w=this.props).onResetKeysChange)==null||v.call(w,l.resetKeys,d),this.reset())},o.render=function(){var l=this.state.error,p=this.props,v=p.fallbackRender,w=p.FallbackComponent;if(p=p.fallback,l!==null){if(l={error:l,resetErrorBoundary:this.resetErrorBoundary},e.isValidElement(p))return p;if(typeof v=="function")return v(l);if(w)return e.createElement(w,l);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},x}(e.Component);return Ts=function({children:f,onError:x}){return e.createElement(i,{fallback:e.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:x},f)}}const qp=sp(function(){return _s?Ns:(_s=1,Ns=Yp())}());var Rs,Is,As,Ls,Ds,Os,Vi={},Wi={};function Jp(){if(Rs)return Wi;Rs=1;var e=$t(),n=Ze();function a(i,f){let x=Date.now(),o=0;return(l,p,v,w,d,s)=>{let C=Date.now();if(s.has("historic"))return o=0,x=C,2;let S=function(u,m,E,k,j){if(u===null||E.size===0&&k.size===0&&!j)return 0;var D=m._selection,M=u._selection;if(j)return 1;if(!(n.$isRangeSelection(D)&&n.$isRangeSelection(M)&&M.isCollapsed()&&D.isCollapsed()))return 0;j=m._nodeMap;let _=[];for(let R of E)(E=j.get(R))!==void 0&&_.push(E);for(let[R,A]of k)A&&((k=j.get(R))===void 0||n.$isRootNode(k)||_.push(k));return _.length===0?0:1<_.length?(m=(k=m._nodeMap).get(D.anchor.key),M=k.get(M.anchor.key),m&&M&&!u._nodeMap.has(m.__key)&&n.$isTextNode(m)&&m.__text.length===1&&D.anchor.offset===1?2:0):(m=_[0],u=u._nodeMap.get(m.__key),n.$isTextNode(u)&&n.$isTextNode(m)&&u.__mode===m.__mode?(u=u.__text)===(m=m.__text)?0:(D=D.anchor,M=M.anchor,D.key!==M.key||D.type!=="text"?0:(D=D.offset,M=M.offset,(u=m.length-u.length)==1&&M===D-1?2:u===-1&&M===D+1?3:u===-1&&M===D?4:0)):0)}(l,p,w,d,i.isComposing()),T=(()=>{var u=v===null||v.editor===i,m=s.has("history-push");if(!m&&u&&s.has("history-merge"))return 0;if(l===null)return 1;var E=p._selection;if(!(0<w.size||0<d.size))return E!==null?0:2;if(m===!1&&S!==0&&S===o&&C<x+f&&u)return 0;if(w.size===1){{m=Array.from(w)[0],u=l._nodeMap.get(m),m=p._nodeMap.get(m),E=l._selection;let k=p._selection,j=!1;n.$isRangeSelection(E)&&n.$isRangeSelection(k)&&(j=E.anchor.type==="element"&&E.focus.type==="element"&&k.anchor.type==="text"&&k.focus.type==="text"),u=!(j||!n.$isTextNode(u)||!n.$isTextNode(m))&&u.__type===m.__type&&u.__text===m.__text&&u.__mode===m.__mode&&u.__detail===m.__detail&&u.__style===m.__style&&u.__format===m.__format&&u.__parent===m.__parent}if(u)return 0}return 1})();return x=C,o=S,T}}return Wi.createEmptyHistoryState=function(){return{current:null,redoStack:[],undoStack:[]}},Wi.registerHistory=function(i,f,x){let o=a(i,x);x=({editorState:v,prevEditorState:w,dirtyLeaves:d,dirtyElements:s,tags:C})=>{const S=f.current,T=f.redoStack,u=f.undoStack,m=S===null?null:S.editorState;if(S===null||v!==m){if((d=o(w,v,S,d,s,C))===1)T.length!==0&&(f.redoStack=[],i.dispatchCommand(n.CAN_REDO_COMMAND,!1)),S!==null&&(u.push({...S,undoSelection:w.read(n.$getSelection)}),i.dispatchCommand(n.CAN_UNDO_COMMAND,!0));else if(d===2)return;f.current={editor:i,editorState:v}}};let l=e.mergeRegister(i.registerCommand(n.UNDO_COMMAND,()=>{let v=f.redoStack,w=f.undoStack;if(w.length!==0){let d=f.current,s=w.pop();d!==null&&(v.push(d),i.dispatchCommand(n.CAN_REDO_COMMAND,!0)),w.length===0&&i.dispatchCommand(n.CAN_UNDO_COMMAND,!1),f.current=s||null,s&&s.editor.setEditorState(s.editorState.clone(s.undoSelection),{tag:"historic"})}return!0},n.COMMAND_PRIORITY_EDITOR),i.registerCommand(n.REDO_COMMAND,()=>{let v=f.redoStack;var w=f.undoStack;if(v.length!==0){let d=f.current;d!==null&&(w.push(d),i.dispatchCommand(n.CAN_UNDO_COMMAND,!0)),w=v.pop(),v.length===0&&i.dispatchCommand(n.CAN_REDO_COMMAND,!1),f.current=w||null,w&&w.editor.setEditorState(w.editorState,{tag:"historic"})}return!0},n.COMMAND_PRIORITY_EDITOR),i.registerCommand(n.CLEAR_EDITOR_COMMAND,()=>(f.undoStack=[],f.redoStack=[],f.current=null,!1),n.COMMAND_PRIORITY_EDITOR),i.registerCommand(n.CLEAR_HISTORY_COMMAND,()=>(f.undoStack=[],f.redoStack=[],f.current=null,i.dispatchCommand(n.CAN_REDO_COMMAND,!1),i.dispatchCommand(n.CAN_UNDO_COMMAND,!1),!0),n.COMMAND_PRIORITY_EDITOR),i.registerUpdateListener(x)),p=i.registerUpdateListener(x);return()=>{l(),p()}},Wi}function Zp(){if(Ls)return Vi;Ls=1;var e=_t(),n=function(){return As?Is:(As=1,Is=Jp())}(),a=kt();return Vi.createEmptyHistoryState=n.createEmptyHistoryState,Vi.HistoryPlugin=function({externalHistoryState:i}){let[f]=e.useLexicalComposerContext();return function(x,o,l=1e3){let p=a.useMemo(()=>o||n.createEmptyHistoryState(),[o]);a.useEffect(()=>n.registerHistory(x,p,l),[l,x,p])}(f,i),null},Vi}var Ms,Ps,Fs,Qp=function(){return Os?Ds:(Os=1,Ds=Zp())}(),zo={},Bs,zs,Hs,Xp=function(){return Fs?Ps:(Fs=1,Ps=function(){if(Ms)return zo;Ms=1;var n=Ro(),a=_t(),i=$t(),f=Ze(),x=kt();return zo.LinkPlugin=function({validateUrl:o}){let[l]=a.useLexicalComposerContext();return x.useEffect(()=>{if(!l.hasNodes([n.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return i.mergeRegister(l.registerCommand(n.TOGGLE_LINK_COMMAND,p=>{if(p===null)return n.toggleLink(p),!0;if(typeof p=="string")return!(o!==void 0&&!o(p)||(n.toggleLink(p),0));let{url:v,target:w,rel:d,title:s}=p;return n.toggleLink(v,{rel:d,target:w,title:s}),!0},f.COMMAND_PRIORITY_LOW),o!==void 0?l.registerCommand(f.PASTE_COMMAND,p=>{let v=f.$getSelection();if(!f.$isRangeSelection(v)||v.isCollapsed()||!(p instanceof ClipboardEvent)||p.clipboardData==null)return!1;let w=p.clipboardData.getData("text");return!!o(w)&&!v.getNodes().some(d=>f.$isElementNode(d))&&(l.dispatchCommand(n.TOGGLE_LINK_COMMAND,w),p.preventDefault(),!0)},f.COMMAND_PRIORITY_LOW):()=>{})},[l,o]),null},zo}())}(),Ho={};function eg(){if(Bs)return Ho;Bs=1;var e=Zr(),n=_t(),a=kt(),i=$t(),f=Ze();return Ho.ListPlugin=function(){let[x]=n.useLexicalComposerContext();return a.useEffect(()=>{if(!x.hasNodes([e.ListNode,e.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[x]),function(o){a.useEffect(()=>i.mergeRegister(o.registerCommand(e.INSERT_ORDERED_LIST_COMMAND,()=>(e.insertList(o,"number"),!0),f.COMMAND_PRIORITY_LOW),o.registerCommand(e.INSERT_UNORDERED_LIST_COMMAND,()=>(e.insertList(o,"bullet"),!0),f.COMMAND_PRIORITY_LOW),o.registerCommand(e.REMOVE_LIST_COMMAND,()=>(e.removeList(o),!0),f.COMMAND_PRIORITY_LOW),o.registerCommand(f.INSERT_PARAGRAPH_COMMAND,()=>!!e.$handleListInsertParagraph(),f.COMMAND_PRIORITY_LOW)),[o])}(x),null},Ho}var Us,Vs,Ws,Ks,Gs,Ys,qs,Js,Zs,tg=function(){return Hs?zs:(Hs=1,zs=eg())}(),Ki={},zn={},Uo={};function ng(){return Ws?Vs:(Ws=1,Vs=function(){if(Us)return Uo;Us=1;var n=_t(),a=Ze(),i=kt();function f(x,o){return x.getEditorState().read(()=>{let l=a.$getNodeByKey(o);return l!==null&&l.isSelected()})}return Uo.useLexicalNodeSelection=function(x){let[o]=n.useLexicalComposerContext(),[l,p]=i.useState(()=>f(o,x));i.useEffect(()=>{let d=!0,s=o.registerUpdateListener(()=>{d&&p(f(o,x))});return()=>{d=!1,s()}},[o,x]);let v=i.useCallback(d=>{o.update(()=>{let s=a.$getSelection();a.$isNodeSelection(s)||(s=a.$createNodeSelection(),a.$setSelection(s)),d?s.add(x):s.delete(x)})},[o,x]),w=i.useCallback(()=>{o.update(()=>{const d=a.$getSelection();a.$isNodeSelection(d)&&d.clear()})},[o]);return[l,v,w]},Uo}())}function ig(){return Ys?Gs:(Ys=1,Gs=function(){if(Ks)return zn;Ks=1;var n=_t(),a=ng(),i=$t(),f=Ze(),x=kt();let o=f.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function l({nodeKey:s}){let[C]=n.useLexicalComposerContext(),[S,T,u]=a.useLexicalNodeSelection(s),m=x.useCallback(E=>(S&&f.$isNodeSelection(f.$getSelection())&&(E.preventDefault(),d(E=f.$getNodeByKey(s))&&E.remove(),T(!1)),!1),[S,s,T]);return x.useEffect(()=>i.mergeRegister(C.registerCommand(f.CLICK_COMMAND,E=>{let k=C.getElementByKey(s);return E.target===k&&(E.shiftKey||u(),T(!S),!0)},f.COMMAND_PRIORITY_LOW),C.registerCommand(f.KEY_DELETE_COMMAND,m,f.COMMAND_PRIORITY_LOW),C.registerCommand(f.KEY_BACKSPACE_COMMAND,m,f.COMMAND_PRIORITY_LOW)),[u,C,S,s,m,T]),x.useEffect(()=>{let E=C.getElementByKey(s);E!==null&&(E.className=S?"selected":"")},[C,S,s]),null}class p extends f.DecoratorNode{static getType(){return"horizontalrule"}static clone(C){return new p(C.__key)}static importJSON(){return w()}static importDOM(){return{hr:()=>({conversion:v,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}getTextContent(){return`
18
- `}isInline(){return!1}updateDOM(){return!1}decorate(){return x.createElement(l,{nodeKey:this.__key})}}function v(){return{node:w()}}function w(){return f.$applyNodeReplacement(new p)}function d(s){return s instanceof p}return zn.$createHorizontalRuleNode=w,zn.$isHorizontalRuleNode=d,zn.HorizontalRuleNode=p,zn.INSERT_HORIZONTAL_RULE_COMMAND=o,zn}())}var Vo,Qs,Xs,el,og=function(){return Zs?Js:(Zs=1,Js=function(){if(qs)return Ki;qs=1;var n=Wd(),a=_t(),i=ig(),f=kt();let x=[{dependencies:[i.HorizontalRuleNode],export:o=>i.$isHorizontalRuleNode(o)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(o,l,p,v)=>{l=i.$createHorizontalRuleNode(),v||o.getNextSibling()!=null?o.replace(l):o.insertBefore(l),l.selectNext()},type:"element"},...n.TRANSFORMERS];return Ki.DEFAULT_TRANSFORMERS=x,Ki.MarkdownShortcutPlugin=function({transformers:o=x}){let[l]=a.useLexicalComposerContext();return f.useEffect(()=>n.registerMarkdownShortcuts(l,o),[l,o]),null},Ki}())}(),Wo={};function rg(){if(Qs)return Vo;Qs=1;var e=_t(),n=kt(),a=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?n.useLayoutEffect:n.useEffect;function i(f){return{initialValueFn:()=>f.isEditable(),subscribe:x=>f.registerEditableListener(x)}}return Vo=function(){return function(f){let[x]=e.useLexicalComposerContext(),o=n.useMemo(()=>f(x),[x,f]),l=n.useRef(o.initialValueFn()),[p,v]=n.useState(l.current);return a(()=>{let{initialValueFn:w,subscribe:d}=o,s=w();return l.current!==s&&(l.current=s,v(s)),d(C=>{l.current=C,v(C)})},[o,f]),p}(i)},Vo}var tl,nl,il,en={};function ag(){return il?nl:(il=1,nl=function(){if(tl)return en;tl=1;var n=Ze();function a(x,o=!0){return!x&&(x=i(),o&&(x=x.trim()),x==="")}function i(){return n.$getRoot().getTextContent()}function f(x){if(!a(x,!1))return!1;let o=(x=n.$getRoot().getChildren()).length;if(1<o)return!1;for(let p=0;p<o;p++){var l=x[p];if(n.$isDecoratorNode(l))return!1;if(n.$isElementNode(l)){if(!n.$isParagraphNode(l)||l.__indent!==0)return!1;let v=(l=l.getChildren()).length;for(let w=0;w<v;w++)if(!n.$isTextNode(l[p]))return!1}}return!0}return en.$canShowPlaceholder=f,en.$canShowPlaceholderCurry=function(x){return()=>f(x)},en.$findTextIntersectionFromCharacters=function(x,o){var l=x.getFirstChild();x=0;e:for(;l!==null;){if(n.$isElementNode(l)){var p=l.getFirstChild();if(p!==null){l=p;continue}}else if(n.$isTextNode(l)){if(x+(p=l.getTextContentSize())>o)return{node:l,offset:o-x};x+=p}if((p=l.getNextSibling())===null){for(l=l.getParent();l!==null;){if((p=l.getNextSibling())!==null){l=p;continue e}l=l.getParent()}break}l=p}return null},en.$isRootTextContentEmpty=a,en.$isRootTextContentEmptyCurry=function(x,o){return()=>a(x,o)},en.$rootTextContent=i,en.registerLexicalTextEntity=function(x,o,l,p){let v=d=>{const s=n.$createTextNode(d.getTextContent());s.setFormat(d.getFormat()),d.replace(s)},w=x.registerNodeTransform(n.TextNode,d=>{if(d.isSimpleText()){var s=d.getPreviousSibling(),C=d.getTextContent(),S=d;if(n.$isTextNode(s)){var T=s.getTextContent(),u=o(T+C);if(s instanceof l){if(u===null||s.getLatest().__mode!==0)return void v(s);if(0<(u=u.end-T.length))return S=T+(S=C.slice(0,u)),s.select(),s.setTextContent(S),void(u===C.length?d.remove():(s=C.slice(u),d.setTextContent(s)))}else if(u===null||u.start<T.length)return}for(;;){if(C=u=(d=o(C))===null?"":C.slice(d.end),u===""){if(T=S.getNextSibling(),n.$isTextNode(T)){if(u=S.getTextContent()+T.getTextContent(),(u=o(u))===null){T instanceof l?v(T):T.markDirty();break}if(u.start!==0)break}}else if((T=o(u))!==null&&T.start===0)break;if(d===null)break;if(d.start===0&&n.$isTextNode(s)&&s.isTextEntity())continue;let m;if(d.start===0?[m,S]=S.splitText(d.end):[,m,S]=S.splitText(d.start,d.end),d=p(m),m.replace(d),S==null)break}}});return x=x.registerNodeTransform(l,d=>{var s=d.getTextContent();const C=o(s);C===null||C.start!==0?v(d):s.length>C.end?d.splitText(C.end):(s=d.getPreviousSibling(),n.$isTextNode(s)&&s.isTextEntity()&&(v(s),v(d)),s=d.getNextSibling(),n.$isTextNode(s)&&s.isTextEntity()&&(v(s),d instanceof l&&v(d)))}),[w,x]},en}())}var ol,rl,al,sl,ll,cl,Ko={};function sg(){return al?rl:(al=1,rl=function(){if(ol)return Ko;ol=1;var n=Ze();return Ko.registerDragonSupport=function(a){let i=window.location.origin,f=x=>{if(x.origin===i){var o=a.getRootElement();if(document.activeElement===o&&typeof(o=x.data)=="string"){try{var l=JSON.parse(o)}catch{return}if(l&&l.protocol==="nuanria_messaging"&&l.type==="request"&&(l=l.payload)&&l.functionId==="makeChanges"&&(l=l.args)){const[p,v,w,d,s]=l;a.update(()=>{const C=n.$getSelection();if(n.$isRangeSelection(C)){var S=C.anchor;let T=S.getNode(),u=0,m=0;n.$isTextNode(T)&&0<=p&&0<=v&&(u=p,m=p+v,C.setTextNodeRange(T,u,T,m)),u===m&&w===""||(C.insertRawText(w),T=S.getNode()),n.$isTextNode(T)&&(u=d,m=d+s,u=u>(S=T.getTextContentSize())?S:u,m=m>S?S:m,C.setTextNodeRange(T,u,T,m)),x.stopImmediatePropagation()}})}}}};return window.addEventListener("message",f,!0),()=>{window.removeEventListener("message",f,!0)}},Ko}())}function lg(){if(sl)return Wo;sl=1;var e=_t(),n=function(){return el?Xs:(el=1,Xs=rg())}(),a=kt(),i=ag(),f=$t(),x=Tp(),o=sg(),l=Qr(),p=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?a.useLayoutEffect:a.useEffect;function v(d){return d.getEditorState().read(i.$canShowPlaceholderCurry(d.isComposing()))}function w({content:d}){var[s]=e.useLexicalComposerContext();s=function(S){let[T,u]=a.useState(()=>v(S));return p(()=>{function m(){let E=v(S);u(E)}return m(),f.mergeRegister(S.registerUpdateListener(()=>{m()}),S.registerEditableListener(()=>{m()}))},[S]),T}(s);let C=n();return s?typeof d=="function"?d(C):d:null}return Wo.RichTextPlugin=function({contentEditable:d,placeholder:s,ErrorBoundary:C}){let[S]=e.useLexicalComposerContext();return C=function(T,u){let[m,E]=a.useState(()=>T.getDecorators());return p(()=>T.registerDecoratorListener(k=>{x.flushSync(()=>{E(k)})}),[T]),a.useEffect(()=>{E(T.getDecorators())},[T]),a.useMemo(()=>{let k=[],j=Object.keys(m);for(let M=0;M<j.length;M++){var D=j[M];let _=a.createElement(u,{onError:R=>T._onError(R)},a.createElement(a.Suspense,{fallback:null},m[D]));(D=T.getElementByKey(D))!==null&&k.push(x.createPortal(_,D))}return k},[u,m,T])}(S,C),function(T){p(()=>f.mergeRegister(l.registerRichText(T),o.registerDragonSupport(T)),[T])}(S),a.createElement(a.Fragment,null,d,a.createElement(w,{content:s}),C)},Wo}var dl,ul,hl,cg=function(){return cl?ll:(cl=1,ll=lg())}(),_r=Qr(),Le={};function dg(){if(dl)return Le;dl=1;var e=Ze(),n=$t();let a={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class i extends e.DEPRECATED_GridCellNode{static getType(){return"tablecell"}static clone(h){let N=new i(h.__headerState,h.__colSpan,h.__width,h.__key);return N.__rowSpan=h.__rowSpan,N}static importDOM(){return{td:()=>({conversion:f,priority:0}),th:()=>({conversion:f,priority:0})}}static importJSON(h){let N=x(h.headerState,h.colSpan,h.width||void 0);return N.__rowSpan=h.rowSpan,N}constructor(h=a.NO_STATUS,N=1,$,b){super(N,b),this.__headerState=h,this.__width=$}createDOM(h){let N=document.createElement(this.getTag());return this.__width&&(N.style.width=`${this.__width}px`),1<this.__colSpan&&(N.colSpan=this.__colSpan),1<this.__rowSpan&&(N.rowSpan=this.__rowSpan),n.addClassNamesToElement(N,h.theme.tableCell,this.hasHeader()&&h.theme.tableCellHeader),N}exportDOM(h){if({element:h}=super.exportDOM(h),h){let N=this.getParentOrThrow().getChildrenSize();h.style.border="1px solid black",1<this.__colSpan&&(h.colSpan=this.__colSpan),1<this.__rowSpan&&(h.rowSpan=this.__rowSpan),h.style.width=`${this.getWidth()||Math.max(90,700/N)}px`,h.style.verticalAlign="top",h.style.textAlign="start",this.hasHeader()&&(h.style.backgroundColor="#f2f3f5")}return{element:h}}exportJSON(){return{...super.exportJSON(),headerState:this.__headerState,type:"tablecell",width:this.getWidth()}}getTag(){return this.hasHeader()?"th":"td"}setHeaderStyles(h){return this.getWritable().__headerState=h,this.__headerState}getHeaderStyles(){return this.getLatest().__headerState}setWidth(h){return this.getWritable().__width=h,this.__width}getWidth(){return this.getLatest().__width}toggleHeaderStyle(h){let N=this.getWritable();return N.__headerState=(N.__headerState&h)===h?N.__headerState-h:N.__headerState+h,N}hasHeaderState(h){return(this.getHeaderStyles()&h)===h}hasHeader(){return this.getLatest().__headerState!==a.NO_STATUS}updateDOM(h){return h.__headerState!==this.__headerState||h.__width!==this.__width||h.__colSpan!==this.__colSpan||h.__rowSpan!==this.__rowSpan}isShadowRoot(){return!0}collapseAtStart(){return!0}canBeEmpty(){return!1}canIndent(){return!1}}function f(g){var h=g.nodeName.toLowerCase();return(h=x(h==="th"?a.ROW:a.NO_STATUS)).__colSpan=g.colSpan,h.__rowSpan=g.rowSpan,{forChild:(N,$)=>o($)&&!e.$isElementNode(N)?($=e.$createParagraphNode(),e.$isLineBreakNode(N)&&N.getTextContent()===`
19
- `?null:($.append(N),$)):N,node:h}}function x(g,h=1,N){return e.$applyNodeReplacement(new i(g,h,N))}function o(g){return g instanceof i}class l extends e.DEPRECATED_GridRowNode{static getType(){return"tablerow"}static clone(h){return new l(h.__height,h.__key)}static importDOM(){return{tr:()=>({conversion:p,priority:0})}}static importJSON(h){return v(h.height)}constructor(h,N){super(N),this.__height=h}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(h){let N=document.createElement("tr");return this.__height&&(N.style.height=`${this.__height}px`),n.addClassNamesToElement(N,h.theme.tableRow),N}isShadowRoot(){return!0}setHeight(h){return this.getWritable().__height=h,this.__height}getHeight(){return this.getLatest().__height}updateDOM(h){return h.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function p(){return{node:v()}}function v(g){return e.$applyNodeReplacement(new l(g))}function w(g){return g instanceof l}function d(g){throw Error(`Minified Lexical error #${g}; visit https://lexical.dev/docs/error?code=${g} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let s=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;class C{constructor(h,N){this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.listenersToRemove=new Set,this.tableNodeKey=N,this.editor=h,this.grid={cells:[],columns:0,rows:0},this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.trackTableGrid()}getGrid(){return this.grid}removeListeners(){Array.from(this.listenersToRemove).forEach(h=>h())}trackTableGrid(){let h=new MutationObserver(N=>{this.editor.update(()=>{var $=!1;for(let b=0;b<N.length;b++){const I=N[b].target.nodeName;if(I==="TABLE"||I==="TR"){$=!0;break}}if($){if(!($=this.editor.getElementByKey(this.tableNodeKey)))throw Error("Expected to find TableElement in DOM");this.grid=T($)}})});this.editor.update(()=>{let N=this.editor.getElementByKey(this.tableNodeKey);if(!N)throw Error("Expected to find TableElement in DOM");this.grid=T(N),h.observe(N,{childList:!0,subtree:!0})})}clearHighlight(){this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),this.editor.update(()=>{var h=e.$getNodeByKey(this.tableNodeKey);if(!F(h))throw Error("Expected TableNode.");if(!(h=this.editor.getElementByKey(this.tableNodeKey)))throw Error("Expected to find TableElement in DOM");u(h=T(h),null),e.$setSelection(null),this.editor.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}enableHighlightStyle(){this.editor.update(()=>{let h=this.editor.getElementByKey(this.tableNodeKey);if(!h)throw Error("Expected to find TableElement in DOM");h.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1})}disableHighlightStyle(){this.editor.update(()=>{let h=this.editor.getElementByKey(this.tableNodeKey);if(!h)throw Error("Expected to find TableElement in DOM");h.classList.add("disable-selection"),this.hasHijackedSelectionStyles=!0})}updateTableGridSelection(h){h!=null&&h.gridKey===this.tableNodeKey?(this.gridSelection=h,this.isHighlightingCells=!0,this.disableHighlightStyle(),u(this.grid,this.gridSelection)):h==null&&this.clearHighlight()}setFocusCellForSelection(h,N=!1){this.editor.update(()=>{var $=e.$getNodeByKey(this.tableNodeKey);if(!F($))throw Error("Expected TableNode.");if(!this.editor.getElementByKey(this.tableNodeKey))throw Error("Expected to find TableElement in DOM");$=h.x;let b=h.y;if(this.focusCell=h,this.anchorCell!==null){let I=s?(this.editor._window||window).getSelection():null;I&&I.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(this.isHighlightingCells||this.anchorX===$&&this.anchorY===b&&!N){if($===this.focusX&&b===this.focusY)return}else this.isHighlightingCells=!0,this.disableHighlightStyle();this.focusX=$,this.focusY=b,this.isHighlightingCells&&($=e.$getNearestNodeFromDOMNode(h.elem),this.gridSelection!=null&&this.anchorCellNodeKey!=null&&o($)&&($=$.getKey(),this.gridSelection=this.gridSelection.clone()||e.DEPRECATED_$createGridSelection(),this.focusCellNodeKey=$,this.gridSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),e.$setSelection(this.gridSelection),this.editor.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0),u(this.grid,this.gridSelection)))})}setAnchorCellForSelection(h){this.isHighlightingCells=!1,this.anchorCell=h,this.anchorX=h.x,this.anchorY=h.y,this.editor.update(()=>{var N=e.$getNearestNodeFromDOMNode(h.elem);o(N)&&(N=N.getKey(),this.gridSelection=e.DEPRECATED_$createGridSelection(),this.anchorCellNodeKey=N)})}formatCells(h){this.editor.update(()=>{let N=e.$getSelection();e.DEPRECATED_$isGridSelection(N)||d(11);let $=e.$createRangeSelection(),b=$.anchor,I=$.focus;N.getNodes().forEach(L=>{o(L)&&L.getTextContentSize()!==0&&(b.set(L.getKey(),0,"element"),I.set(L.getKey(),L.getChildrenSize(),"element"),$.formatText(h))}),e.$setSelection(N),this.editor.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0)})}clearText(){this.editor.update(()=>{let h=e.$getNodeByKey(this.tableNodeKey);if(!F(h))throw Error("Expected TableNode.");var N=e.$getSelection();e.DEPRECATED_$isGridSelection(N)||d(11),(N=N.getNodes().filter(o)).length===this.grid.columns*this.grid.rows?(h.selectPrevious(),h.remove(),e.$getRoot().selectStart()):(N.forEach($=>{if(e.$isElementNode($)){let b=e.$createParagraphNode(),I=e.$createTextNode();b.append(I),$.append(b),$.getChildren().forEach(L=>{L!==b&&L.remove()})}}),u(this.grid,null),e.$setSelection(null),this.editor.dispatchCommand(e.SELECTION_CHANGE_COMMAND,void 0))})}}function S(g){for(;g!=null;){let h=g.nodeName;if(h==="TD"||h==="TH"){if((g=g._cell)===void 0)break;return g}g=g.parentNode}return null}function T(g){let h=[],N={cells:h,columns:0,rows:0};var $=g.firstChild;let b=g=0;for(h.length=0;$!=null;){var I=$.nodeName;if(I==="TD"||I==="TH")I={elem:$,highlighted:!1,x:g,y:b},$._cell=I,h[b]===void 0&&(h[b]=[]),h[b][g]=I;else if((I=$.firstChild)!=null){$=I;continue}if((I=$.nextSibling)!=null)g++,$=I;else if((I=$.parentNode)!=null){if(($=I.nextSibling)==null)break;b++,g=0}}return N.columns=g+1,N.rows=b+1,N}function u(g,h){let N=[],$=new Set(h?h.getNodes():[]);return m(g,(b,I)=>{let L=b.elem;$.has(I)?(b.highlighted=!0,L.style.setProperty("background-color","rgb(172, 206, 247)"),L.style.setProperty("caret-color","transparent"),N.push(b)):(b.highlighted=!1,L.style.removeProperty("background-color"),L.style.removeProperty("caret-color"),L.getAttribute("style")||L.removeAttribute("style"))}),N}function m(g,h){({cells:g}=g);for(let N=0;N<g.length;N++){let $=g[N];for(let b=0;b<$.length;b++){let I=$[b],L=e.$getNearestNodeFromDOMNode(I.elem);L!==null&&h(I,L,{x:b,y:N})}}}function E(g){g.disableHighlightStyle(),m(g.grid,h=>{let N=h.elem;h.highlighted=!0,N.style.setProperty("background-color","rgb(172, 206, 247)"),N.style.setProperty("caret-color","transparent")})}let k=(g,h,N,$,b)=>{const I=b==="forward";switch(b){case"backward":case"forward":return N!==(I?g.grid.columns-1:0)?M(h.getCellNodeFromCordsOrThrow(N+(I?1:-1),$,g.grid)):$!==(I?g.grid.rows-1:0)?M(h.getCellNodeFromCordsOrThrow(I?0:g.grid.columns-1,$+(I?1:-1),g.grid)):I?h.selectNext():h.selectPrevious(),!0;case"up":return $!==0?M(h.getCellNodeFromCordsOrThrow(N,$-1,g.grid)):h.selectPrevious(),!0;case"down":return $!==g.grid.rows-1?M(h.getCellNodeFromCordsOrThrow(N,$+1,g.grid)):h.selectNext(),!0;default:return!1}},j=(g,h,N,$,b)=>{const I=b==="forward";switch(b){case"backward":case"forward":return N!==(I?g.grid.columns-1:0)&&g.setFocusCellForSelection(h.getCellFromCordsOrThrow(N+(I?1:-1),$,g.grid)),!0;case"up":return $!==0&&(g.setFocusCellForSelection(h.getCellFromCordsOrThrow(N,$-1,g.grid)),!0);case"down":return $!==g.grid.rows-1&&(g.setFocusCellForSelection(h.getCellFromCordsOrThrow(N,$+1,g.grid)),!0);default:return!1}};function D(g,h){if(e.$isRangeSelection(g)||e.DEPRECATED_$isGridSelection(g)){let N=h.isParentOf(g.anchor.getNode());return g=h.isParentOf(g.focus.getNode()),N&&g}return!1}function M(g){let h=g.getChildren().find(N=>e.$isParagraphNode(N));e.$isParagraphNode(h)?h.selectEnd():g.selectEnd()}class _ extends e.DEPRECATED_GridNode{static getType(){return"table"}static clone(h){return new _(h.__key)}static importDOM(){return{table:()=>({conversion:R,priority:1})}}static importJSON(){return A()}constructor(h){super(h)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(h){let N=document.createElement("table");return n.addClassNamesToElement(N,h.theme.table),N}updateDOM(){return!1}exportDOM(h){return{...super.exportDOM(h),after:N=>{if(N){let $=N.cloneNode(),b=document.createElement("colgroup"),I=document.createElement("tbody");if(I.append(...N.children),!w(N=this.getFirstChildOrThrow()))throw Error("Expected to find row node.");N=N.getChildrenSize();for(let L=0;L<N;L++){let U=document.createElement("col");b.append(U)}return $.replaceChildren(b,I),$}}}}canExtractContents(){return!1}canBeEmpty(){return!1}isShadowRoot(){return!0}getCordsFromCellNode(h,N){let{rows:$,cells:b}=N;for(N=0;N<$;N++){var I=b[N];if(I==null)throw Error(`Row not found at y:${N}`);if((I=I.findIndex(({elem:L})=>e.$getNearestNodeFromDOMNode(L)===h))!==-1)return{x:I,y:N}}throw Error("Cell not found in table.")}getCellFromCords(h,N,$){return{cells:$}=$,(N=$[N])==null||(h=N[h])==null?null:h}getCellFromCordsOrThrow(h,N,$){if(!(h=this.getCellFromCords(h,N,$)))throw Error("Cell not found at cords.");return h}getCellNodeFromCords(h,N,$){return(h=this.getCellFromCords(h,N,$))==null?null:o(h=e.$getNearestNodeFromDOMNode(h.elem))?h:null}getCellNodeFromCordsOrThrow(h,N,$){if(!(h=this.getCellNodeFromCords(h,N,$)))throw Error("Node at cords not TableCellNode.");return h}canSelectBefore(){return!0}canIndent(){return!1}}function R(){return{node:A()}}function A(){return e.$applyNodeReplacement(new _)}function F(g){return g instanceof _}function K(g){if(g=n.$findMatchingParent(g,h=>w(h)),w(g))return g;throw Error("Expected table cell to be inside of table row.")}function ee(g){if(g=n.$findMatchingParent(g,h=>F(h)),F(g))return g;throw Error("Expected table cell to be inside of table.")}function te(g,h){let N=ee(g),{x:$,y:b}=N.getCordsFromCellNode(g,h);return{above:N.getCellNodeFromCords($,b-1,h),below:N.getCellNodeFromCords($,b+1,h),left:N.getCellNodeFromCords($-1,b,h),right:N.getCellNodeFromCords($+1,b,h)}}function Z(g){(g=g.getFirstDescendant())===null&&d(124),g.getParentOrThrow().selectStart()}function B(g,h){let N=g.getFirstChild();N!==null?N.insertBefore(h):g.append(h)}let O=e.createCommand("INSERT_TABLE_COMMAND");return Le.$createTableCellNode=x,Le.$createTableNode=A,Le.$createTableNodeWithDimensions=function(g,h,N=!0){let $=A();for(let I=0;I<g;I++){let L=v();for(let U=0;U<h;U++){var b=a.NO_STATUS;typeof N=="object"?(I===0&&N.rows&&(b|=a.ROW),U===0&&N.columns&&(b|=a.COLUMN)):N&&(I===0&&(b|=a.ROW),U===0&&(b|=a.COLUMN)),b=x(b);let Q=e.$createParagraphNode();Q.append(e.$createTextNode()),b.append(Q),L.append(b)}$.append(L)}return $},Le.$createTableRowNode=v,Le.$deleteTableColumn=function(g,h){let N=g.getChildren();for(let b=0;b<N.length;b++){var $=N[b];if(w($)){if(h>=($=$.getChildren()).length||0>h)throw Error("Table column target index out of range");$[h].remove()}}return g},Le.$deleteTableColumn__EXPERIMENTAL=function(){var g=e.$getSelection();e.$isRangeSelection(g)||e.DEPRECATED_$isGridSelection(g)||d(118);var h=g.anchor.getNode();g=g.focus.getNode();let[N,,$]=e.DEPRECATED_$getNodeTriplet(h);[h]=e.DEPRECATED_$getNodeTriplet(g);let[b,I,L]=e.DEPRECATED_$computeGridMap($,N,h);var{startColumn:U}=I;let{startRow:Q,startColumn:Y}=L;g=Math.min(U,Y);let z=(U=Math.max(U+N.__colSpan-1,Y+h.__colSpan-1))-g+1;if(b[0].length===U-g+1)$.selectPrevious(),$.remove();else{var H=b.length;for(let V=0;V<H;V++)for(let G=g;G<=U;G++){let{cell:oe,startColumn:se}=b[V][G];se<g?G===g&&oe.setColSpan(oe.__colSpan-Math.min(z,oe.__colSpan-(g-se))):se+oe.__colSpan-1>U?G===U&&oe.setColSpan(oe.__colSpan-(U-se+1)):oe.remove()}(h=(g=b[Q])[Y+h.__colSpan])!==void 0?({cell:h}=h,Z(h)):({cell:h}=g[Y-1],Z(h))}},Le.$deleteTableRow__EXPERIMENTAL=function(){var g=e.$getSelection();e.$isRangeSelection(g)||e.DEPRECATED_$isGridSelection(g)||d(118);var h=g.anchor.getNode();g=g.focus.getNode();let[N,,$]=e.DEPRECATED_$getNodeTriplet(h);[g]=e.DEPRECATED_$getNodeTriplet(g);let[b,I,L]=e.DEPRECATED_$computeGridMap($,N,g);({startRow:h}=I);var{startRow:U}=L;if(g=U+g.__rowSpan-1,b.length===g-h+1)$.remove();else{U=b[0].length;var Q=b[g+1],Y=$.getChildAtIndex(g+1);for(let H=g;H>=h;H--){for(var z=U-1;0<=z;z--){let{cell:V,startRow:G,startColumn:oe}=b[H][z];if(oe===z&&(H===h&&G<h&&V.setRowSpan(V.__rowSpan-(G-h)),G>=h&&G+V.__rowSpan-1>g))if(V.setRowSpan(V.__rowSpan-(g-G+1)),Y===null&&d(122),z===0)B(Y,V);else{let{cell:se}=Q[z-1];se.insertAfter(V)}}z=$.getChildAtIndex(H),e.DEPRECATED_$isGridRowNode(z)||d(123),z.remove()}Q!==void 0?({cell:h}=Q[0],Z(h)):({cell:h}=b[h-1][0],Z(h))}},Le.$getElementGridForTableNode=function(g,h){if((g=g.getElementByKey(h.getKey()))==null)throw Error("Table Element Not Found");return T(g)},Le.$getTableCellNodeFromLexicalNode=function(g){return g=n.$findMatchingParent(g,h=>o(h)),o(g)?g:null},Le.$getTableColumnIndexFromTableCellNode=function(g){return K(g).getChildren().findIndex(h=>h.is(g))},Le.$getTableNodeFromLexicalNodeOrThrow=ee,Le.$getTableRowIndexFromTableCellNode=function(g){let h=K(g);return ee(h).getChildren().findIndex(N=>N.is(h))},Le.$getTableRowNodeFromTableCellNodeOrThrow=K,Le.$insertTableColumn=function(g,h,N=!0,$,b){let I=g.getChildren();for(let Q=0;Q<I.length;Q++){let Y=I[Q];if(w(Y))for(let z=0;z<$;z++){var L=Y.getChildren();if(h>=L.length||0>h)throw Error("Table column target index out of range");o(L=L[h])||d(12);let{left:H,right:V}=te(L,b);var U=a.NO_STATUS;(H&&H.hasHeaderState(a.ROW)||V&&V.hasHeaderState(a.ROW))&&(U|=a.ROW),(U=x(U)).append(e.$createParagraphNode()),N?L.insertAfter(U):L.insertBefore(U)}}return g},Le.$insertTableColumn__EXPERIMENTAL=function(g=!0){function h(){let z=x(a.NO_STATUS).append(e.$createParagraphNode());return Q===null&&(Q=z),z}var N=e.$getSelection();e.$isRangeSelection(N)||e.DEPRECATED_$isGridSelection(N)||d(118),N=N.focus.getNode();let[$,,b]=e.DEPRECATED_$getNodeTriplet(N),[I,L]=e.DEPRECATED_$computeGridMap(b,$,$);N=I.length;var{startColumn:U}=L;g=g?U+$.__colSpan-1:U-1,U=b.getFirstChild(),e.DEPRECATED_$isGridRowNode(U)||d(120);let Q=null;var Y=U;e:for(U=0;U<N;U++){U!==0&&(Y=Y.getNextSibling(),e.DEPRECATED_$isGridRowNode(Y)||d(121));let z=I[U];if(0>g){B(Y,h());continue}let{cell:H,startColumn:V,startRow:G}=z[g];if(V+H.__colSpan-1<=g){let oe=H,se=G,q=g;for(;se!==U&&1<oe.__rowSpan;){if(q-=H.__colSpan,!(0<=q)){Y.append(h());continue e}{let{cell:P,startRow:J}=z[q];oe=P,se=J}}oe.insertAfter(h())}else H.setColSpan(H.__colSpan+1)}Q!==null&&Z(Q)},Le.$insertTableRow=function(g,h,N=!0,$,b){var I=g.getChildren();if(h>=I.length||0>h)throw Error("Table row target index out of range");if(!w(h=I[h]))throw Error("Row before insertion index does not exist.");for(I=0;I<$;I++){let U=h.getChildren(),Q=U.length,Y=v();for(let z=0;z<Q;z++){var L=U[z];o(L)||d(12);let{above:H,below:V}=te(L,b);L=a.NO_STATUS;let G=H&&H.getWidth()||V&&V.getWidth()||void 0;(H&&H.hasHeaderState(a.COLUMN)||V&&V.hasHeaderState(a.COLUMN))&&(L|=a.COLUMN),(L=x(L,1,G)).append(e.$createParagraphNode()),Y.append(L)}N?h.insertAfter(Y):h.insertBefore(Y)}return g},Le.$insertTableRow__EXPERIMENTAL=function(g=!0){var h=e.$getSelection();e.$isRangeSelection(h)||e.DEPRECATED_$isGridSelection(h)||d(118),h=h.focus.getNode();let[N,,$]=e.DEPRECATED_$getNodeTriplet(h),[b,I]=e.DEPRECATED_$computeGridMap($,N,N);h=b[0].length;var{startRow:L}=I;if(g){var U=b[g=L+N.__rowSpan-1];L=v();for(var Q=0;Q<h;Q++){let{cell:Y,startRow:z}=U[Q];z+Y.__rowSpan-1<=g?L.append(x(a.NO_STATUS)):Y.setRowSpan(Y.__rowSpan+1)}h=$.getChildAtIndex(g),e.DEPRECATED_$isGridRowNode(h)||d(119),h.insertAfter(L)}else{for(U=b[L],g=v(),Q=0;Q<h;Q++){let{cell:Y,startRow:z}=U[Q];z===L?g.append(x(a.NO_STATUS)):Y.setRowSpan(Y.__rowSpan+1)}h=$.getChildAtIndex(L),e.DEPRECATED_$isGridRowNode(h)||d(119),h.insertBefore(g)}},Le.$isTableCellNode=o,Le.$isTableNode=F,Le.$isTableRowNode=w,Le.$removeTableRowAtIndex=function(g,h){let N=g.getChildren();if(h>=N.length||0>h)throw Error("Expected table cell to be inside of table row.");return N[h].remove(),g},Le.$unmergeCell=function(){var g=e.$getSelection();e.$isRangeSelection(g)||e.DEPRECATED_$isGridSelection(g)||d(118),g=g.anchor.getNode();let[h,N,$]=e.DEPRECATED_$getNodeTriplet(g);g=h.__colSpan;let b=h.__rowSpan;if(1<g){for(var I=1;I<g;I++)h.insertAfter(x(a.NO_STATUS));h.setColSpan(1)}if(1<b){let[Q,Y]=e.DEPRECATED_$computeGridMap($,h,h),{startColumn:z,startRow:H}=Y;for(I=1;I<b;I++){let V=H+I,G=Q[V];var L=N.getNextSibling();e.DEPRECATED_$isGridRowNode(L)||d(125);var U=null;for(let oe=0;oe<z;oe++){let se=G[oe],q=se.cell;se.startRow===V&&(U=q),1<q.__colSpan&&(oe+=q.__colSpan-1)}if(U===null)for(U=0;U<g;U++)B(L,x(a.NO_STATUS));else for(L=0;L<g;L++)U.insertAfter(x(a.NO_STATUS))}h.setRowSpan(1)}},Le.INSERT_TABLE_COMMAND=O,Le.TableCellHeaderStates=a,Le.TableCellNode=i,Le.TableNode=_,Le.TableRowNode=l,Le.TableSelection=C,Le.applyTableHandlers=function(g,h,N){let $=N.getRootElement();if($===null)throw Error("No root element.");let b=new C(N,g.getKey());h.__lexicalTableSelection=b;let I=!1,L=!1;h.addEventListener("dblclick",z=>{let H=S(z.target);H!==null&&(z.preventDefault(),z.stopImmediatePropagation(),z.stopPropagation(),b.setAnchorCellForSelection(H),b.setFocusCellForSelection(H,!0),I=!1)}),h.addEventListener("mousedown",z=>{setTimeout(()=>{if(z.button===0){var H=S(z.target);H!==null&&(z.preventDefault(),z.stopPropagation(),z.stopImmediatePropagation(),b.setAnchorCellForSelection(H))}},0)}),h.addEventListener("mousemove",z=>{if(L&&(z.preventDefault(),z.stopPropagation(),z.stopImmediatePropagation()),I){let H=S(z.target);if(H!==null){let V=H.x,G=H.y;I&&(b.anchorX!==V||b.anchorY!==G||b.isHighlightingCells)&&(z.preventDefault(),b.setFocusCellForSelection(H))}}}),h.addEventListener("mouseleave",()=>{});let U=z=>{z.button===0&&N.update(()=>{var H=e.$getSelection();const V=z.target;if(V instanceof Node){if(e.DEPRECATED_$isGridSelection(H)&&H.gridKey===b.tableNodeKey&&$.contains(V))return b.clearHighlight();(H=e.$getNearestNodeFromDOMNode(V))!==null&&n.$findMatchingParent(H,e.DEPRECATED_$isGridNode)&&(I=!0)}})};window.addEventListener("mousedown",U),b.listenersToRemove.add(()=>window.removeEventListener("mousedown",U));let Q=z=>{var H;(H=I)&&(H=!(H=(H=z.target)!==null&&H.nodeName==="SPAN")),H&&(z.preventDefault(),z.stopPropagation()),I=!1};window.addEventListener("mouseup",Q),b.listenersToRemove.add(()=>window.removeEventListener("mouseup",Q)),h.addEventListener("mouseup",Q),b.listenersToRemove.add(()=>h.removeEventListener("mouseup",Q)),b.listenersToRemove.add(N.registerCommand(e.KEY_ARROW_DOWN_COMMAND,z=>{var H=e.$getSelection();if(!D(H,g))return!1;if(e.$isRangeSelection(H)){if(H.isCollapsed()){var V=n.$findMatchingParent(H.anchor.getNode(),oe=>o(oe));if(!o(V))return!1;var G=g.getCordsFromCellNode(V,b.grid);if(H=n.$findMatchingParent(H.anchor.getNode(),oe=>e.$isElementNode(oe)),H==null)throw Error("Expected BlockNode Parent");if((V=V.getLastChild())&&H.isParentOf(V)||H===V||z.shiftKey)return z.preventDefault(),z.stopImmediatePropagation(),z.stopPropagation(),z.shiftKey?(b.setAnchorCellForSelection(g.getCellFromCordsOrThrow(G.x,G.y,b.grid)),j(b,g,G.x,G.y,"down")):k(b,g,G.x,G.y,"down")}}else if(e.DEPRECATED_$isGridSelection(H)&&z.shiftKey)return!!o(G=H.focus.getNode())&&(G=g.getCordsFromCellNode(G,b.grid),z.preventDefault(),z.stopImmediatePropagation(),z.stopPropagation(),j(b,g,G.x,G.y,"down"));return!1},e.COMMAND_PRIORITY_HIGH)),b.listenersToRemove.add(N.registerCommand(e.KEY_ARROW_UP_COMMAND,z=>{var H=e.$getSelection();if(!D(H,g))return!1;if(e.$isRangeSelection(H)){if(H.isCollapsed()){var V=n.$findMatchingParent(H.anchor.getNode(),oe=>o(oe));if(!o(V))return!1;var G=g.getCordsFromCellNode(V,b.grid);if(H=n.$findMatchingParent(H.anchor.getNode(),oe=>e.$isElementNode(oe)),H==null)throw Error("Expected BlockNode Parent");if((V=V.getLastChild())&&H.isParentOf(V)||H===V||z.shiftKey)return z.preventDefault(),z.stopImmediatePropagation(),z.stopPropagation(),z.shiftKey?(b.setAnchorCellForSelection(g.getCellFromCordsOrThrow(G.x,G.y,b.grid)),j(b,g,G.x,G.y,"up")):k(b,g,G.x,G.y,"up")}}else if(e.DEPRECATED_$isGridSelection(H)&&z.shiftKey)return!!o(G=H.focus.getNode())&&(G=g.getCordsFromCellNode(G,b.grid),z.preventDefault(),z.stopImmediatePropagation(),z.stopPropagation(),j(b,g,G.x,G.y,"up"));return!1},e.COMMAND_PRIORITY_HIGH)),b.listenersToRemove.add(N.registerCommand(e.KEY_ARROW_LEFT_COMMAND,z=>{var H=e.$getSelection();if(!D(H,g))return!1;if(e.$isRangeSelection(H)){if(H.isCollapsed()){var V=n.$findMatchingParent(H.anchor.getNode(),G=>o(G));if(!o(V))return!1;if(V=g.getCordsFromCellNode(V,b.grid),n.$findMatchingParent(H.anchor.getNode(),G=>e.$isElementNode(G))==null)throw Error("Expected BlockNode Parent");if(H.anchor.offset===0||z.shiftKey)return z.preventDefault(),z.stopImmediatePropagation(),z.stopPropagation(),z.shiftKey?(b.setAnchorCellForSelection(g.getCellFromCordsOrThrow(V.x,V.y,b.grid)),j(b,g,V.x,V.y,"backward")):k(b,g,V.x,V.y,"backward")}}else if(e.DEPRECATED_$isGridSelection(H)&&z.shiftKey)return!!o(H=H.focus.getNode())&&(H=g.getCordsFromCellNode(H,b.grid),z.preventDefault(),z.stopImmediatePropagation(),z.stopPropagation(),j(b,g,H.x,H.y,"backward"));return!1},e.COMMAND_PRIORITY_HIGH)),b.listenersToRemove.add(N.registerCommand(e.KEY_ARROW_RIGHT_COMMAND,z=>{var H=e.$getSelection();if(!D(H,g))return!1;if(e.$isRangeSelection(H)){if(H.isCollapsed()){var V=n.$findMatchingParent(H.anchor.getNode(),G=>o(G));if(!o(V))return!1;if(V=g.getCordsFromCellNode(V,b.grid),n.$findMatchingParent(H.anchor.getNode(),G=>e.$isElementNode(G))==null)throw Error("Expected BlockNode Parent");if(H.anchor.offset===H.anchor.getNode().getTextContentSize()||z.shiftKey)return z.preventDefault(),z.stopImmediatePropagation(),z.stopPropagation(),z.shiftKey?(b.setAnchorCellForSelection(g.getCellFromCordsOrThrow(V.x,V.y,b.grid)),j(b,g,V.x,V.y,"forward")):k(b,g,V.x,V.y,"forward")}}else if(e.DEPRECATED_$isGridSelection(H)&&z.shiftKey)return!!o(H=H.focus.getNode())&&(H=g.getCordsFromCellNode(H,b.grid),z.preventDefault(),z.stopImmediatePropagation(),z.stopPropagation(),j(b,g,H.x,H.y,"forward"));return!1},e.COMMAND_PRIORITY_HIGH)),[e.DELETE_WORD_COMMAND,e.DELETE_LINE_COMMAND,e.DELETE_CHARACTER_COMMAND].forEach(z=>{b.listenersToRemove.add(N.registerCommand(z,(H=>()=>{var V=e.$getSelection();if(!D(V,g))return!1;if(e.DEPRECATED_$isGridSelection(V))return b.clearText(),!0;if(e.$isRangeSelection(V)){const se=n.$findMatchingParent(V.anchor.getNode(),q=>o(q));if(!o(se))return!1;var G=V.anchor.getNode(),oe=V.focus.getNode();if(G=g.isParentOf(G),oe=g.isParentOf(oe),G&&!oe||oe&&!G)return b.clearText(),!0;if(G=(oe=n.$findMatchingParent(V.anchor.getNode(),q=>e.$isElementNode(q)))&&n.$findMatchingParent(oe,q=>e.$isElementNode(q)&&o(q.getParent())),!e.$isElementNode(G)||!e.$isElementNode(oe))return!1;if(H===e.DELETE_LINE_COMMAND&&G.getPreviousSibling()===null)return!0;if((H===e.DELETE_CHARACTER_COMMAND||H===e.DELETE_WORD_COMMAND)&&V.isCollapsed()&&V.anchor.offset===0&&oe!==G){V=oe.getChildren();const q=e.$createParagraphNode();return V.forEach(P=>q.append(P)),oe.replace(q),oe.getWritable().__parent=se.getKey(),!0}}return!1})(z),e.COMMAND_PRIORITY_CRITICAL))});let Y=z=>{const H=e.$getSelection();return!!D(H,g)&&(e.DEPRECATED_$isGridSelection(H)?(z.preventDefault(),z.stopPropagation(),b.clearText(),!0):(e.$isRangeSelection(H)&&(z=n.$findMatchingParent(H.anchor.getNode(),V=>o(V)),o(z)),!1))};return b.listenersToRemove.add(N.registerCommand(e.KEY_BACKSPACE_COMMAND,Y,e.COMMAND_PRIORITY_CRITICAL)),b.listenersToRemove.add(N.registerCommand(e.KEY_DELETE_COMMAND,Y,e.COMMAND_PRIORITY_CRITICAL)),b.listenersToRemove.add(N.registerCommand(e.FORMAT_TEXT_COMMAND,z=>{let H=e.$getSelection();return!!D(H,g)&&(e.DEPRECATED_$isGridSelection(H)?(b.formatCells(z),!0):(e.$isRangeSelection(H)&&(z=n.$findMatchingParent(H.anchor.getNode(),V=>o(V)),o(z)),!1))},e.COMMAND_PRIORITY_CRITICAL)),b.listenersToRemove.add(N.registerCommand(e.CONTROLLED_TEXT_INSERTION_COMMAND,()=>{var z=e.$getSelection();return!!D(z,g)&&(e.DEPRECATED_$isGridSelection(z)?b.clearHighlight():e.$isRangeSelection(z)&&(z=n.$findMatchingParent(z.anchor.getNode(),H=>o(H)),o(z)),!1)},e.COMMAND_PRIORITY_CRITICAL)),b.listenersToRemove.add(N.registerCommand(e.KEY_TAB_COMMAND,z=>{var H=e.$getSelection();if(!D(H,g))return!1;if(e.$isRangeSelection(H)){let V=n.$findMatchingParent(H.anchor.getNode(),G=>o(G));if(!o(V))return!1;if(H.isCollapsed())return H=g.getCordsFromCellNode(V,b.grid),z.preventDefault(),k(b,g,H.x,H.y,z.shiftKey?"backward":"forward"),!0}return!1},e.COMMAND_PRIORITY_HIGH)),b.listenersToRemove.add(N.registerCommand(e.FOCUS_COMMAND,()=>g.isSelected(),e.COMMAND_PRIORITY_HIGH)),b.listenersToRemove.add(N.registerCommand(e.SELECTION_CHANGE_COMMAND,()=>{let z=e.$getSelection();var H=e.$getPreviousSelection();if(z&&e.$isRangeSelection(z)&&!z.isCollapsed()){var V=z.anchor.getNode(),G=z.focus.getNode();V=g.isParentOf(V);var oe=g.isParentOf(G);if(G=V&&!oe||oe&&!V,V=V&&oe&&!g.isSelected(),G)return H=z.isBackward(),V=e.$createRangeSelection(),G=g.getKey(),V.anchor.set(z.anchor.key,z.anchor.offset,z.anchor.type),V.focus.set(G,H?0:g.getChildrenSize(),"element"),L=!0,e.$setSelection(V),E(b),!0;if(V&&({grid:V}=b,z.getNodes().filter(o).length===V.rows*V.columns)){V=e.DEPRECATED_$createGridSelection(),G=g.getKey(),oe=g.getFirstChildOrThrow().getFirstChild();let se=g.getLastChildOrThrow().getLastChild();if(oe!=null&&se!=null)return V.set(G,oe.getKey(),se.getKey()),e.$setSelection(V),b.updateTableGridSelection(V),!0}}return z&&!z.is(H)&&(e.DEPRECATED_$isGridSelection(z)||e.DEPRECATED_$isGridSelection(H))&&b.gridSelection&&!b.gridSelection.is(H)?(e.DEPRECATED_$isGridSelection(z)&&z.gridKey===b.tableNodeKey?b.updateTableGridSelection(z):!e.DEPRECATED_$isGridSelection(z)&&e.DEPRECATED_$isGridSelection(H)&&H.gridKey===b.tableNodeKey&&b.updateTableGridSelection(null),!1):(b.hasHijackedSelectionStyles&&!g.isSelected()?(function(se){se.enableHighlightStyle(),m(se.grid,q=>{let P=q.elem;q.highlighted=!1,P.style.removeProperty("background-color"),P.style.removeProperty("caret-color"),P.getAttribute("style")||P.removeAttribute("style")})}(b),L=!1):!b.hasHijackedSelectionStyles&&g.isSelected()&&E(b),!1)},e.COMMAND_PRIORITY_CRITICAL)),b},Le.getCellFromTarget=S,Le.getTableSelectionFromTableElement=function(g){return g.__lexicalTableSelection},Le}var pl,gl,ml,Go=function(){return hl?ul:(hl=1,ul=dg())}(),Te=Ze(),Gi={};function ug(){if(pl)return Gi;pl=1;var e=Ro(),n=_t(),a=$t(),i=Ze(),f=kt();function x(d,s){for(let C=0;C<s.length;C++){let S=s[C](d);if(S)return S}return null}let o=/[.,;\s]/;function l(d){var s;return d=d.getPreviousSibling(),i.$isElementNode(d)&&(d=d.getLastDescendant()),!(s=d===null||i.$isLineBreakNode(d))&&(s=i.$isTextNode(d))&&(d=d.getTextContent(),s=o.test(d[d.length-1])),s}function p(d){return d=d.getNextSibling(),i.$isElementNode(d)&&(d=d.getFirstDescendant()),d===null||i.$isLineBreakNode(d)||i.$isTextNode(d)&&o.test(d.getTextContent()[0])}function v(d,s,C){var S=d.getChildren();let T=S.length;for(let u=0;u<T;u++){let m=S[u];if(!i.$isTextNode(m)||!m.isSimpleText())return w(d),void C(null,d.getURL())}(s=x(S=d.getTextContent(),s))===null||s.text!==S?(w(d),C(null,d.getURL())):l(d)&&p(d)?((S=d.getURL())!==s.url&&(d.setURL(s.url),C(s.url,S)),s.attributes&&((S=d.getRel())!==s.attributes.rel&&(d.setRel(s.attributes.rel||null),C(s.attributes.rel||null,S)),(S=d.getTarget())!==s.attributes.target&&(d.setTarget(s.attributes.target||null),C(s.attributes.target||null,S)))):(w(d),C(null,d.getURL()))}function w(d){let s=d.getChildren();var C=s.length;for(--C;0<=C;C--)d.insertAfter(s[C]);return d.remove(),s.map(S=>S.getLatest())}return Gi.AutoLinkPlugin=function({matchers:d,onChange:s}){let[C]=n.useLexicalComposerContext();return function(S,T,u){f.useEffect(()=>{if(!S.hasNodes([e.AutoLinkNode]))throw Error("Minified Lexical error #77; visit https://lexical.dev/docs/error?code=77 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");let m=(E,k)=>{u&&u(E,k)};return a.mergeRegister(S.registerNodeTransform(i.TextNode,E=>{var k=E.getParentOrThrow(),j=E.getPreviousSibling();if(e.$isAutoLinkNode(k))v(k,T,m);else if(!e.$isLinkNode(k)){if(E.isSimpleText()&&(o.test(E.getTextContent()[0])||!e.$isAutoLinkNode(j))){j=k=E.getTextContent();let K=0,ee=E;for(var D;(D=x(j,T))&&D!==null;){let te=D.index,Z=D.length,B=te+Z;var M=K+te,_=K+B,R=k,A=E;if((0<M?o.test(R[M-1]):l(A))&&(_<R.length?o.test(R[_]):p(A))){var F=void 0;K+te===0?[F,ee]=ee.splitText(K+Z):[,F,ee]=ee.splitText(K+te,K+te+Z),M=e.$createAutoLinkNode(D.url,D.attributes),(_=i.$createTextNode(D.text)).setFormat(F.getFormat()),_.setDetail(F.getDetail()),M.append(_),F.replace(M),u&&u(D.url,null),K=0}else K+=B;j=j.substring(B)}}k=E.getPreviousSibling(),D=E.getNextSibling(),F=E.getTextContent(),e.$isAutoLinkNode(k)&&!o.test(F[0])&&(k.append(E),v(k,T,m),E=k.getURL(),u&&u(null,E)),e.$isAutoLinkNode(D)&&!o.test(F[F.length-1])&&(w(D),v(D,T,m),E=D.getURL(),u&&u(null,E))}}))},[S,T,u])}(C,d,s),null},Gi.createLinkMatcherWithRegExp=function(d,s=C=>C){return C=>{let S=d.exec(C);return S===null?null:{index:S.index,length:S[0].length,text:S[0],url:s(C)}}},Gi}var hg=function(){return ml?gl:(ml=1,gl=ug())}(),_i=_t(),Yi=Vd(),Rr=Ni(),mo=$t();const{common:{texts:pg}}=$e.getLocalizedStrings();function gg({coords:e,alignment:n="top",style:a,onClick:i}){return t.jsx(mg,{style:{top:e.top,left:e.left,...n==="top"?{transform:`translateY(calc(-100% - ${r.sp1}))`}:{transform:`translateX(calc(-100% - ${r.sp1}))`},userSelect:"none",...a},onClick:f=>{f.stopPropagation(),i()},children:t.jsxs(fg,{children:[t.jsx(xg,{}),t.jsx(yg,{children:pg.addComment})]})})}const mg=y.div`
20
- position: absolute;
21
- background-color: ${e=>e.theme.colors.grey5};
22
- border: 1px solid ${e=>e.theme.colors.grey3};
23
- padding: ${r.sp1} ${r.sp0};
24
- border-radius: ${r.sp2};
25
- z-index: 5;
26
- width: max-content;
27
- top: ${r.sp7};
28
- box-shadow: ${e=>`${r.sp0} 1px 2px ${r.sp0} ${e.theme.colors.grey1}3D`};
29
- `,fg=y.div`
30
- color: ${e=>e.theme.colors.hero};
31
- height: ${r.sp6};
32
- padding: ${r.sp0} ${r.sp3};
33
- &:hover {
34
- color: ${e=>e.theme.colors.primary};
35
- background-color: ${e=>e.theme.colors.background};
36
- }
37
- cursor: pointer;
38
- display: flex;
39
- align-items: center;
40
- `,xg=y(Qu)`
41
- color: inherit;
42
- margin-right: ${r.sp2};
43
- height: ${r.sp3};
44
- width: ${r.sp3};
45
- `,yg=y(nt)`
46
- color: inherit;
47
- `,Kd=e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M9.95093 16.1016V9.94922C9.95093 8.59078 10.6425 7.48828 12.0017 7.48828C13.361 7.48828 14.0525 8.59078 14.0525 9.94922V17.7422C14.0525 19.7815 12.8097 21.4336 10.7712 21.4336C8.73276 21.4336 7.48999 19.7815 7.48999 17.7422V7.48828C7.48999 4.76977 9.28401 2.56641 12.0017 2.56641C14.7194 2.56641 16.5134 4.76977 16.5134 7.48828V14.8711",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Cg=y.div`
48
- display: flex;
49
- min-width: ${r.sp5};
50
- width: ${r.sp5};
51
- height: ${r.sp5};
52
- position: relative;
53
- background-color: ${e=>e.theme.colors.grey5};
54
- border: ${e=>`1px solid ${e.theme.colors.grey2}`};
55
- border-radius: ${r.sp3};
56
- box-shadow: ${e=>`${r.sp0} 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
57
- align-items: center;
58
- justify-content: center;
59
- color: ${e=>e.color??fe.neutralGrey2Light};
60
- cursor: pointer;
61
- `,bg=y(Kd)`
62
- width: ${r.sp4};
63
- height: ${r.sp4};
64
- color: ${e=>e.theme.colors.primary};
65
- `,wg=y(qu)`
66
- width: ${r.sp3};
67
- height: ${r.sp3};
68
- color: ${fe.important};
69
- `,fl=y.div`
70
- position: absolute;
71
- top: -${r.sp1};
72
- right: -${r.sp2};
73
- display: flex;
74
- align-items: center;
75
- justify-content: center;
76
- `;function vg({fileSizeError:e,loading:n,showAnimation:a=!1,setFileSizeError:i}){const[f,x]=c.useState(!1);return c.useEffect(()=>{if(!n&&a){x(!0);const o=setTimeout(()=>x(!1),2e3);return()=>clearTimeout(o)}if(e){const o=setTimeout(()=>i(!1),2e3);return()=>clearTimeout(o)}},[e,n,i,a]),t.jsx(Cg,{children:n?t.jsx(Pn,{size:"Small",start:n,style:{alignItems:"center",display:"flex"}}):t.jsxs(t.Fragment,{children:[f&&a&&t.jsx(fl,{children:t.jsx(Fd,{shouldDisplay:f,width:20,height:20,animationInLoop:!1,onAnimationComplete:()=>x(!1)})}),e&&t.jsx(fl,{children:t.jsx(wg,{})}),t.jsx(bg,{})]})})}const Sg=y.div`
77
- flex: none;
78
- order: 0;
79
- flex-grow: 0;
80
- margin-right: 6px;
81
- `,kg=y.div`
82
- flex: none;
83
- order: 1;
84
- flex-grow: 0;
85
- display: flex;
86
- align-items: center;
87
- column-gap: 6px;
88
- `,$g=y.div`
89
- flex: none;
90
- order: 3;
91
- flex-grow: 0;
92
- `,Eg=y.div`
93
- margin-right: ${r.sp2};
94
- `,Tg=y(at)`
95
- display: flex;
96
- color: ${e=>e.theme.colors.hero};
97
- `,jg=y(Me)`
98
- color: ${e=>e.theme.colors.primary};
99
- `,Ng=y.div`
100
- display: flex;
101
- flex-direction: column;
102
- `,_g=y.div`
103
- display: flex;
104
- flex-direction: row;
105
- `,Rg=y.img`
106
- height: ${r.sp4};
107
- width: ${r.sp4};
108
- border-radius: 50%;
109
- justify-content: center;
110
- color: ${e=>e.theme.colors.hero};
111
- `,Ig=y.div`
112
- margin: ${r.sp2} 5px 6px;
113
- border-radius: 50%;
114
- width: ${r.sp1};
115
- height: ${r.sp1};
116
- background-color: ${e=>e.theme.colors.grey1};
117
- order: 2;
118
- `,Ag=({time:e,user:n,timeStampLabel:a})=>{const{cockpit:i,dateFormat:{visual:f},timeFormat:x}=$e.getLocalizedStrings();return t.jsxs(_g,{children:[!!n&&t.jsx(Eg,{children:n?.photo!==void 0?t.jsx(Rg,{src:n?.photo.href,alt:i.userProfileAltText,onError:({currentTarget:o})=>{o.onerror=null,o.src=eh},loading:"lazy"}):t.jsx(th,{firstName:n?.firstName??"",lastName:n?.lastName??"",size:`${r.sp4}`})}),t.jsxs(Ng,{children:[n&&t.jsx(jg,{children:`${n.firstName} ${n.lastName}`}),!!e&&t.jsxs(Tg,{children:[a!=null?t.jsx(Sg,{children:a}):null,e!=null&&t.jsxs(kg,{children:[t.jsx(Sp,{width:r.sp3,height:r.sp3}),ni(e.toISOString()).format(e.year()===Id().year()?f.MMMDFormat:f.MMMDCommaYYYYformat)]}),t.jsx(Ig,{}),e!=null&&t.jsx($g,{children:ni(e.toISOString()).format(x.hhmmAFormat)})]})]})]})},qi={iconContainerMaxWidthHeight:new pe(W[6],W[7]),iconContainerMarginRight:new pe(12,W[3]),iconPadding:new pe(10,12)},Lg={title:new Yu("standardMedium","largeMedium")},Dg=y.div`
119
- background-color: ${e=>e.theme.colors.grey5};
120
- border: ${e=>`1px solid ${e.theme.colors.background}`};
121
- border-radius: ${r.sp2};
122
- box-shadow: ${e=>`${r.sp0} 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
123
- padding: ${r.sp3} ${r.sp4};
124
- display: flex;
125
- align-items: center;
126
- cursor: ${e=>e.disabled?"not-allowed":"pointer"};
127
- pointer-events: ${e=>e.disabled?"none":"auto"};
128
- &:hover {
129
- outline: ${e=>e.disabled?"none":`1px solid ${e.theme.colors.primary}`};
130
- }
131
- `,Og=y.div`
132
- display: flex;
133
- align-items: center;
134
- column-gap: ${r.sp2};
135
- justify-content: space-between;
136
- width: 100%;
137
- `,Mg=y.div`
138
- display: flex;
139
- flex-direction: row;
140
- align-items: center;
141
- `,Pg=y.div`
142
- display: flex;
143
- flex-direction: row;
144
- align-items: flex-start;
145
- padding: ${e=>qi.iconPadding.valuePx(e.windowSize)};
146
- background: ${e=>e.iconColor.toString()};
147
- border-radius: ${r.sp11};
148
- width: fit-content;
149
- height: fit-content;
150
- color: ${e=>e.isDarkMode?fe.neutralGrey5Light:e.theme.colors.brandColorOnyx}; // As per design
151
- max-width: ${e=>qi.iconContainerMaxWidthHeight.valuePx(e.windowSize)};
152
- max-height: ${e=>qi.iconContainerMaxWidthHeight.valuePx(e.windowSize)};
153
- margin-right: ${e=>qi.iconContainerMarginRight.valuePx(e.windowSize)};
154
- `,Fg=y(e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M5.20129 8.55841H8.85011",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M5.20129 11.6004H11.7072",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M16.1623 13.6136V7.20566L16.1668 6.05666C16.1668 5.95589 16.1483 5.85611 16.1123 5.76303C16.0763 5.66994 16.0235 5.58537 15.957 5.51416L12.0839 1.36303C12.0172 1.29154 11.9381 1.23487 11.851 1.19629C11.7638 1.1577 11.6705 1.13796 11.5762 1.13819H2.47558C2.2859 1.13819 2.10398 1.21895 1.96986 1.3627C1.83573 1.50645 1.76038 1.70142 1.76038 1.90472V18.0076C1.76038 18.2109 1.83573 18.4058 1.96986 18.5496C2.10398 18.6934 2.2859 18.7741 2.47558 18.7741H7.60821H15.3642",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M11.2159 1.20715V5.02387C11.2159 5.12591 11.236 5.22694 11.2751 5.32121C11.3141 5.41547 11.3714 5.50113 11.4435 5.57327C11.5157 5.64542 11.6013 5.70265 11.6956 5.7417C11.7898 5.78075 11.8909 5.80084 11.9929 5.80084H15.8088",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M5.20129 5.5174H8.3145",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M5.20129 14.6414H8.69612",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M19.4695 22.8615L16.2797 20.9737C15.9998 20.7731 15.7818 20.4979 15.6507 20.1795C15.5196 19.8611 15.4806 19.5123 15.5381 19.1727V17.2044L14.3421 16.0115C14.0743 15.7436 13.9239 15.3803 13.9239 15.0014C13.9239 14.6226 14.0743 14.2593 14.3421 13.9913C14.4085 13.9248 14.4812 13.8648 14.5592 13.8123C14.8341 13.6301 15.1634 13.5484 15.4916 13.581C15.8197 13.6136 16.1266 13.7586 16.3602 13.9913L18.0404 15.6725",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M16.341 8.40369L20.2861 11.8996C20.874 12.7217 21.1899 13.707 21.1898 14.7176V17.0673C21.1888 17.7421 21.4555 18.3898 21.9314 18.8682L22.2396 19.1755",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})))`
155
- width: ${r.sp4};
156
- height: ${r.sp4};
157
- `,Bg=y.div`
158
- display: flex;
159
- flex-direction: row;
160
- align-items: center;
161
- justify-content: space-between;
162
- `,zg=y.div``,Hg=y.div`
163
- display: flex;
164
- align-items: center;
165
- column-gap: ${r.sp2};
166
- `,Ug=y.div`
167
- ${e=>`${Lg.title.style(e.windowSize)}`};
168
- color: ${e=>e.theme.colors.primary};
169
- `,Vg=y(Hr)`
170
- color: ${fe.brandColorGoldDark};
171
- `,Wg=y.div`
172
- display: flex;
173
- align-items: center;
174
- justify-content: flex-start;
175
- `,Kg=y(ad)`
176
- color: ${e=>e.theme.colors.hero};
177
- `,Gg=y.div`
178
- display: flex;
179
- color: ${e=>e.theme.colors.hero};
180
- justify-content: flex-end;
181
- `,Yg=y(sd)`
182
- width: ${r.sp4};
183
- height: ${r.sp4};
184
- `;function qg({totalItems:e,onClickCustomerRequest:n}){const a=$e.getLocalizedStrings(),i=St(),f=Ie(),x=i.mode==="light"?new mi(i.colors.brandColorJadeLight):new mi(i.colors.brandColorJadeDark);return t.jsx(Dg,{disabled:e===0,onClick:e>0?n:void 0,children:t.jsxs(Og,{children:[t.jsxs(Mg,{children:[t.jsx(Pg,{iconColor:x,windowSize:f,isDarkMode:i.mode==="dark",children:t.jsx(Fg,{width:r.sp4,height:r.sp4})}),t.jsx(Bg,{children:t.jsxs(zg,{children:[t.jsxs(Hg,{children:[t.jsx(Ug,{windowSize:f,children:a.cockpit.monthEndReport.customerRequestSectionTitle}),t.jsx(Vg,{children:e>=0?`${a.common.strings.openingBrace}${e} ${e>1?a.common.texts.items:a.common.texts.item}${a.common.strings.closingBrace}`:a.common.strings.empty})]}),t.jsx(Wg,{children:t.jsx(Kg,{children:a.cockpit.monthEndReport.customerRequestSectionSubtitle})})]})})]}),t.jsx(Gg,{windowSize:f,children:t.jsx(Yg,{width:r.sp4,height:r.sp4})})]})})}const Jg=y.div`
185
- display: flex;
186
- flex-direction: column;
187
- `,Zg=y.div`
188
- display: flex;
189
- flex-direction: column;
190
- `,Qg=y.div`
191
- background-color: ${e=>e.theme.colors.grey5};
192
- border: ${e=>`1px solid ${e.theme.colors.background}`};
193
- border-top-left-radius: ${r.sp2};
194
- border-top-right-radius: ${r.sp2};
195
- box-shadow: ${e=>`${r.sp0} 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
196
- display: flex;
197
- align-items: center;
198
- `,Xg=y.div`
199
- background-color: ${e=>e.theme.colors.grey5};
200
- border: ${e=>`1px solid ${e.theme.colors.background}`};
201
- border-bottom-left-radius: ${r.sp2};
202
- border-bottom-right-radius: ${r.sp2};
203
- box-shadow: ${e=>`${r.sp0} 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
204
- padding: 0;
205
- display: flex;
206
- align-items: center;
207
- `;function em({previewMode:e,sectionId:n,subject:a}){const i=$e.getLocalizedStrings();return t.jsx(Jg,{children:t.jsxs(Zg,{children:[t.jsx(Qg,{children:t.jsx(kp,{label:`${i.cockpit.monthEndReport.sendEmailTo}${i.common.strings.colon}`,name:xl(n,"recipientEmailList"),registerOptions:{required:!0,disabled:e===!0},style:{paddingTop:r.sp2,paddingBottom:r.sp2,paddingRight:r.sp2},description:i.cockpit.monthEndReport.addUserForInsights,placeholder:i.cockpit.monthEndReport.addEmailAddress})}),t.jsx(Xg,{children:t.jsx(Ku,{text:{type:"text",name:xl(n,"subject"),placeholder:i.cockpit.monthEndReport.addSubject,defaultValue:a,options:{required:!0,disabled:e===!0}},label:{label:i.common.labels.subject,width:150},style:{flex:1}})})]})})}const xl=(e,n)=>`${e}.${n}`,tm=y.div`
208
- background-color: ${e=>e.theme.colors.grey3};
209
- &:hover {
210
- background-color: ${e=>e.theme.colors.primary};
211
- }
212
- width: fit-content;
213
- border-radius: ${r.sp1};
214
- border-color: ${e=>e.theme.colors.primary};
215
- display: flex;
216
- align-items: center;
217
- padding: 6px 12px;
218
- margin-top: ${r.sp3};
219
- `,nm=y(Me)`
220
- margin-right: ${r.sp2};
221
- overflow: visible;
222
- text-overflow: ellipsis;
223
- white-space: nowrap;
224
- color: ${e=>e.theme.colors.hero};
225
- `,im=y(Me)`
226
- color: ${e=>e.theme.colors.grey1};
227
- margin-right: ${r.sp2};
228
- `,om=y(Eo)`
229
- width: ${r.sp3};
230
- height: ${r.sp3};
231
- background-color: transparent;
232
- color: ${e=>e.theme.colors.champion};
233
- &:hover {
234
- color: ${e=>e.theme.colors.grey5};
235
- }
236
- border: none;
237
- cursor: pointer;
238
- margin-left: auto;
239
- `,rm=Rd.forwardRef(({fileName:e,fileSize:n,onRemove:a,isRemovable:i},f)=>{const x=Ie();return t.jsxs(tm,{className:"attachFileSeparator",ref:f,children:[t.jsx(nm,{windowSize:x,children:e}),t.jsx(im,{windowSize:x,children:n}),i&&t.jsx(om,{onClick:a})]})}),Ir="data-highlight-id";function yl({rect:e,isOpenThread:n,threadId:a}){return t.jsx(am,{[Ir]:a,rect:e,isOpenThread:n})}const am=y.div`
240
- position: absolute;
241
- background: ${e=>e.isOpenThread?e.theme.mode==="dark"?fe.alertDark:fe.alertLight:e.theme.mode==="dark"?`${fe.alertDark}80`:`${fe.alertLight}80`};
242
- width: ${e=>e.rect.width}px;
243
- height: ${e=>e.rect.height}px;
244
- top: ${e=>e.rect.top}px;
245
- left: ${e=>e.rect.left}px;
246
- `,hi=726,fo="<!--editorComesHere-->",Xr="editor-input",Ar="month-end-email-header-section",Ri="month-end-email-editor-section",So="month-end-email-body-section",Cl="monthEndReportCanvas",bl=W[3],Lr=W[3],{dateFormat:c5,common:{strings:{hash:xo,empty:yn}}}=$e.getLocalizedStrings(),Xn=(e,n)=>{const{startNodeId:a,startPath:i,endPath:f,startOffset:x,endOffset:o}=e;if(a==null||i==null||f==null||x==null||o==null)return null;const l=n&&a===Ri?document.getElementsByClassName(Xr)[0]:document.getElementById(a);if(!(l instanceof HTMLElement))return null;const p=$l(i.split(",").map(d=>parseInt(d,10)),l),v=$l(f.split(",").map(d=>parseInt(d,10)),l);if(!p||!v)return null;const w=document.createRange();try{w.setStart(p,Math.min(x,p.textContent?.trim().length??0)),w.setEnd(v,Math.min(o,v.textContent?.trim().length??0))}catch(d){return console.warn("Failed to set range:",d),null}return w},Dr=(e,n)=>Xn(e,n)?.getBoundingClientRect().top??0,wl=e=>{for(;e!=null;){if(e instanceof HTMLElement&&(e.id||e.className===Xr))return e;e=e.parentElement}return null},sm=()=>{const e=window.getSelection();if(!e||e.rangeCount===0)return null;const n=e.getRangeAt(0),{startContainer:a,endContainer:i}=n,f=e.anchorNode?.parentElement?.closest(xo+Ri),x=wl(a),o=wl(i);if(!x||!o)return null;const l=kl(a,x),p=kl(i,o);return{startPath:l,startOffset:vl(a,n.startOffset),endPath:p,endOffset:vl(i,n.endOffset),startNodeId:f!=null?f.id:x.id,endNodeId:f!=null?f.id:o.id}},vl=(e,n)=>{if(e.nodeType===Node.TEXT_NODE){const a=e.textContent??yn,i=a.match(/^\s*/)?.[0],f=n-(i?.length!=null?i.length:0);return Math.max(0,Math.min(f,a.trim().length))}return n},Sl=e=>{if(e){let n=e;for(;n;){if(n.nodeType===Node.ELEMENT_NODE){const a=n;if(a.id)return a}n=n.parentNode}}return null},kl=(e,n)=>{const a=[];let i=e;for(;i!=null&&i!==n;){const f=i.parentNode;if(!f)break;const x=Array.from(f.childNodes).filter(o=>!(o.nodeType===Node.ELEMENT_NODE&&o.tagName==="BR"||o.nodeType===Node.TEXT_NODE&&!o.nodeValue?.trim()||o.nodeType===Node.ELEMENT_NODE&&window.getComputedStyle(o).display==="none"||o.nodeType===Node.ELEMENT_NODE&&o.getAttribute("contenteditable")==="false"&&o.getAttribute("data-lexical-cursor")==="true"||o.nodeType===Node.ELEMENT_NODE&&o.tagName==="P"&&Array.from(o.childNodes).every(l=>l.nodeType===Node.ELEMENT_NODE&&l.tagName==="BR"||l.nodeType===Node.TEXT_NODE&&l.nodeValue?.trim()==="")||o.nodeType===Node.ELEMENT_NODE&&o.tagName==="P"&&o.childNodes.length===0||o.nodeType===Node.COMMENT_NODE)).indexOf(i);a.unshift(x),i=f}return a},$l=(e,n)=>{let a=n;for(const i of e){if(a==null)return null;a=Array.from(a.childNodes).filter(f=>!(f.nodeType===Node.ELEMENT_NODE&&f.tagName==="BR"||f.nodeType===Node.TEXT_NODE&&!f.nodeValue?.trim()||f.nodeType===Node.ELEMENT_NODE&&window.getComputedStyle(f).display==="none"||f.nodeType===Node.ELEMENT_NODE&&f.getAttribute("contenteditable")==="false"&&f.getAttribute("data-lexical-cursor")==="true"||f.nodeType===Node.ELEMENT_NODE&&f.tagName==="P"&&Array.from(f.childNodes).every(x=>x.nodeType===Node.ELEMENT_NODE&&x.tagName==="BR"||x.nodeType===Node.TEXT_NODE&&x.nodeValue?.trim()==="")||f.nodeType===Node.ELEMENT_NODE&&f.tagName==="P"&&f.childNodes.length===0||f.nodeType===Node.COMMENT_NODE))[i]??null}return a},lm=(e,n,a,i,f=!0)=>{const[x,o]=c.useState([]),[l,p]=c.useState(new Set),v=c.useRef([]),w=c.useRef(new Set),[d,s]=c.useState(0),C=c.useRef(),S=f?Ci:$o,{threads:T,openThread:u,removeThread:m,setOpenThread:E}=c.useContext(S),k=Wu(T,e,!1),j=Array.from(k),D=j.map(h=>h[0]).join(","),M=c.useMemo(()=>j.map(h=>h[0]),[D]);c.useEffect(()=>{n.current!=null&&p(new Set([...M]))},[n,M]);const[_,R]=c.useState(!1),[A,F]=c.useState(!1);c.useEffect(()=>{R(i)},[i]),c.useEffect(()=>{let h=null;const N=j.filter(([$])=>w.current.has($)).filter(([$,{metadata:b}])=>Xn(b,a)?.getClientRects()[0]!=null).map(([$])=>$);return i===!1&&d<3?w.current.size>0?(w.current.size===N.length&&N.every($=>w.current.has($))&&F(!0),h=setInterval(()=>{s($=>$+1)},2e3)):(F(!1),s(0),h!=null&&clearInterval(h)):d>=3&&h!=null&&clearInterval(h),()=>{h&&clearInterval(h)}},[d,i]);const K=c.useMemo(()=>j.sort(([h,{metadata:N}],[$,{metadata:b}])=>{if(i&&!_)return 0;const I=Xn(N,a)?.getClientRects()[0],L=Xn(b,a)?.getClientRects()[0];if(I==null&&(w.current=new Set([...w.current,h])),L==null&&(w.current=new Set([...w.current,$])),I){const Y=new Set([...w.current]);Y.delete(h),w.current=new Set([...Y])}if(L){const Y=new Set([...w.current]);Y.delete($),w.current=new Set([...Y])}if(!I||!L)return I?-1:L?1:0;const U=I.top-L.top,Q=I.left-L.left;return U===0?Q:U}),[D,l,i,_,A,a]),ee=c.useCallback((h,N)=>{if(u==null)return;const $=K.findIndex(([b])=>b===u);if($>=0){const b=Dr(K[$][1].metadata,a)-N,I=h[$].top;if(b-I<0){const L=b-I;u.includes(Qn)===!1&&v.current?.[$]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});for(const U of h)U.top+=L}}},[u,K,a]),te=c.useCallback(()=>{if(v.current?.length==null||v.current.length===0||!K.length||!n.current?.getBoundingClientRect())return;C.current=n.current?.getBoundingClientRect();const h=C.current?.top??0,N=L=>Dr(L,a)-h,$=(L,U,Q)=>L+U+bl>Q,[,{metadata:b}]=K[0],I=[{top:N(b),left:Lr}];for(let L=1;L<K.length;L++){const U=L-1,Q=I[U].top,Y=v.current[U]?.getBoundingClientRect().height??0,[,{metadata:z}]=K[L],H=N(z);I[L]={top:$(Q,Y,H)?Q+Y+bl:H,left:Lr}}return ee(I,h),I},[n,a,K,ee]),Z=c.useCallback(()=>{o(h=>{const N=te();return N&&!zr(h,N)?N:h})},[te]),B=c.useMemo(()=>new ResizeObserver(Z),[Z]);c.useEffect(()=>{const h=te();return h&&o(h),()=>{B.disconnect()}},[te,B,K,l,i]),c.useEffect(()=>(window.addEventListener("resize",Z),()=>{window.removeEventListener("resize",Z)}),[Z]);const O=c.useCallback(h=>{p(N=>{const $=new Set([...N]);return $.delete(h),$}),m(h),E(null)},[m,E]),g=c.useCallback(h=>{u==null||h.key!=="Escape"||(u&&k.get(u)?.comments.length===0?O(u):E(null))},[O,u,E,k]);return c.useEffect(()=>(document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}),[g]),c.useEffect(()=>{const h=N=>{if(window.getSelection()?.isCollapsed!==!0)return;const $=document.elementsFromPoint(N.clientX,N.clientY).find(b=>b.matches(`[${Ir}]`))?.getAttribute(Ir);$!=null&&E($)};return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}),{observer:B,sortedThreads:K,threadsPositions:x,threadsRefs:v,sheetContainerBoundingClientRect:C,threadsReady:l,unresolvedThreadsMap:k,setThreadsPositions:o,handleRemoveFloatingThread:O}},cm=(e,n,a)=>{const[i,f]=c.useState(),[x,o]=c.useState("top"),l=c.useCallback(()=>{const p=document.getSelection(),v=p?.anchorNode?.parentElement?.closest(xo+e)!=null&&p?.focusNode?.parentElement?.closest(xo+e)!=null;if(p&&!p.isCollapsed&&v===!0){if(p.rangeCount>0){const w=p.getRangeAt(0),d=Sl(w.startContainer),s=Sl(w.endContainer);d&&s&&d.id!==s.id&&(w.setEnd(w.startContainer,w.startOffset),p.removeAllRanges(),p.addRange(w))}if(p.toString().trim().length>0){const w=p.getRangeAt(0),{top:d,left:s}=w.getClientRects()[0],C=p.anchorNode?.parentElement?.closest(xo+Ri);o(a&&C?"left":"top"),f({top:a&&C?d-10:d,left:s})}}else f(void 0)},[e,a,n]);return c.useEffect(()=>(document.addEventListener("selectionchange",l),()=>{document.removeEventListener("selectionchange",l)}),[l]),{coords:i,alignment:x}},dm=e=>{let n=yn;const a=um(e);if(a==null||!a)return n;if(Hi.test(a)){const i=Hi.lastIndex,f=a.substring(0,i).replace("<style>","<div><style>").replace(fo,`</div>${fo}`).replace(a.match(Hi)?.[0]??yn,"<div>".concat(a.match(Hi)?.[0]??yn,"</div>")),x=a.substring(i),o=Gu.exec(x)?.index,l=`<div id="${Ar}">`.concat(f).concat("</div>");let p=yn,v=yn;if(o!=null){const w=x.substring(0,o-1),d=x.substring(o);p=`<div id="${Ri}">`.concat(w).concat("</div>"),v=`<div id="${So}">`.concat(d).concat("</div>"),n=l.concat(p.concat(v))}else n=l.concat(x)}else{const i=a.split(fo),f=i[1]!=null?`<div id="${So}">`.concat(i[1]).concat("</div>"):yn;n=`<div id="${Ar}">`.concat(i[0]).concat("</div>").concat(f)}return n},um=e=>{if(e==null)return yn;let n=e.replace(Ju,`<span class=${$r}>`);return n=n.replace(/<\/p>/g,"</span>"),n},hm=y.div`
247
- position: relative;
248
- `,pm=y.div``,gm=y.div`
249
- align-items: center;
250
- justify-content: center;
251
- display: flex;
252
- width: 300px;
253
- box-sizing: border-box;
254
- cursor: pointer;
255
- flex-direction: column;
256
- background-color: ${e=>e.theme.colors.grey5};
257
- border-radius: ${r.sp2};
258
- ${xt.standardRegular.css};
259
- `;function mm({observer:e,editorMode:n,threadsPositions:a,canvasContainerRef:i,threadsRefs:f,sortedThreads:x,unresolvedThreadsMap:o,style:l,handleRemoveFloatingThread:p}){const{openThread:v,removeThread:w,setOpenThread:d}=c.useContext(Ci),[s,C]=c.useState(v!=null),[S,T]=c.useState(i.current!=null);c.useEffect(()=>{T(i.current!=null)},[i.current]);const u=i.current?.getBoundingClientRect()?.top??0;c.useEffect(()=>{v!=null&&s===!1&&C(!0)},[v]);const m=$p(),E=c.useCallback(({body:k},j,D)=>{j.preventDefault(),j.stopPropagation(),m({body:k,metadata:D}),v!=null&&(w(v),d(null))},[m,v,w,d]);return t.jsx(hm,{style:l,children:x.map(([k,{metadata:j}],D)=>{if(!Xn(j,n)||S===!1)return null;const M=o.get(k),_=v===k;return t.jsx(Lt,{onClickAway:()=>{v!=null&&(C(!1),p(v))},children:t.jsx(pm,{ref:R=>{f.current&&R instanceof Element&&(f.current[D]=R,e.observe(R))},className:"floating-thread-container "+(v===k?"open ":"")+(k.includes(Qn)===!0?"new-thread":""),onClick:R=>{R.stopPropagation(),R.preventDefault()},style:{position:"absolute",left:(a[D]?.left??0)+ +(_?-48:Lr),top:(a[D]?.top??Dr(j,n)-u)-W[6],transition:"all 0.8s ease 0.1s",transitionProperty:v!=null&&v.includes(Qn)===!1?"left, left":"top, left",visibility:o.has(k)?"visible":"hidden"},children:M!=null?M.id.includes(Qn)===!0?t.jsx(gm,{children:t.jsx(Ep,{onComposerSubmit:(R,A)=>E(R,A,M.metadata),onCollapsedChange:R=>{v!==M.id&&R===!1&&d(M.id)},showAttachments:!0,defaultCollapsed:!1,autoFocus:!0,style:{userSelect:"none"}})}):t.jsx(Xu,{thread:M,showDeleted:!1,showActions:!0,showReactions:!0,indentContent:!0,showAttachments:!0,autoExpand:v===M.id,autoFocus:s,style:{width:"300px"},textOverrides:{},onThreadClick:R=>d(M.id),onReplyElementClick:R=>{R&&d(M.id)}},M.id):null})},k)})})}class Gd extends Te.ParagraphNode{__customClass;static getType(){return"custom-paragraph"}constructor(n,a){super(a),this.__customClass=n}createDOM(n){const a=super.createDOM(n);return a.classList.add(this.__customClass),a}updateDOM(n,a,i){const f=super.updateDOM(n,a,i);return this.__customClass!==n.__customClass&&(a.classList.remove(n.__customClass),a.classList.add(this.__customClass)),f}exportJSON(){return{...super.exportJSON(),type:"custom-paragraph",customClass:this.__customClass}}}function El(e){return Te.$applyNodeReplacement(new Gd(e))}const fm=ji`
260
- from {
261
- background-color: ${fe.brandColorGoldLight};
262
- }
263
- to {
264
- background-color: transparent;
265
- }
266
- `,xm=()=>t.jsx(lp,{styles:ke`
267
- .lexicalEditor__textBold {
268
- font-weight: ${oi.bold};
269
- }
270
-
271
- .lexicalEditor__textItalic {
272
- font-style: ${Zu.italic};
273
- }
274
-
275
- .lexicalEditor__textUnderline {
276
- text-decoration: underline;
277
- }
278
-
279
- .lexicalEditor__ol1 {
280
- padding: 0;
281
- margin: 0;
282
- list-style-position: inside;
283
- }
284
-
285
- .lexicalEditor__ol2 {
286
- padding: 0;
287
- margin: 0;
288
- list-style-type: upper-alpha;
289
- list-style-position: inside;
290
- }
291
-
292
- .lexicalEditor__ol3 {
293
- padding: 0;
294
- margin: 0;
295
- list-style-type: lower-alpha;
296
- list-style-position: inside;
297
- }
298
-
299
- .lexicalEditor__ol4 {
300
- padding: 0;
301
- margin: 0;
302
- list-style-type: upper-roman;
303
- list-style-position: inside;
304
- }
305
-
306
- .lexicalEditor__ol5 {
307
- padding: 0;
308
- margin: 0;
309
- list-style-type: lower-roman;
310
- list-style-position: inside;
311
- }
312
-
313
- .lexicalEditor__ul {
314
- padding: 0;
315
- margin: 0;
316
- list-style-position: inside;
317
- }
318
-
319
- .lexicalEditor__listItem {
320
- margin: 0 ${r.sp5};
321
- }
322
-
323
- .lexicalEditor__nestedListItem {
324
- list-style-type: none;
325
- }
326
-
327
- .lexicalEditor__nestedListItem:before,
328
- .lexicalEditor__nestedListItem:after {
329
- display: none;
330
- }
331
- .highlighted {
332
- animation: ${fm} 2s ease-in-out;
333
- }
334
- `}),ym=[e=>{const n=oh.exec(e);return n&&{index:n.index,length:n[0].length,text:n[0],url:n[0]}},e=>{const n=rh.exec(e);return n&&{index:n.index,length:n[0].length,text:n[0],url:`mailto:${n[0]}`}}];function Cm(){return t.jsx(hg.AutoLinkPlugin,{matchers:ym})}function bm(){const[e]=_i.useLexicalComposerContext();return c.useEffect(()=>Nr.registerCodeHighlighting(e),[e]),null}const wm=()=>{const[e]=_i.useLexicalComposerContext();return e.registerCommand(Te.PASTE_COMMAND,(n,a)=>(a.update(()=>{const i=Te.$getSelection();if(Te.$isRangeSelection(i)&&n.type==="beforeinput"){const f=n.dataTransfer?.getData("text/plain");f!=null&&i.insertText(f)}return!0}),!0),Te.COMMAND_PRIORITY_LOW),null},vm=()=>{const[e]=_i.useLexicalComposerContext();return e.registerCommand(Te.KEY_TAB_COMMAND,n=>{const a=n;return a.preventDefault(),e.dispatchCommand(a.shiftKey?Te.OUTDENT_CONTENT_COMMAND:Te.INDENT_CONTENT_COMMAND,void 0)},Te.COMMAND_PRIORITY_EDITOR),null};function Sm(e){const n=Te.$getSelection();if(!Te.$isRangeSelection(n))return!1;const a=function(f){const x=f?.getNodes();return x?.length===0?new Set([f.anchor.getNode().getParentOrThrow(),f.focus.getNode().getParentOrThrow()]):new Set(x.map(o=>Te.$isElementNode(o)?o:o.getParentOrThrow()))}(n);let i=0;for(const f of a)if(vt.$isListNode(f))i=Math.max(vt.$getListDepth(f)+1,i);else if(vt.$isListItemNode(f)){const x=f.getParent();if(!vt.$isListNode(x))throw new Error("ListMaxIndentLevelPlugin: A ListItemNode must have a ListNode for a parent.");i=Math.max(vt.$getListDepth(x)+1,i)}return i<=e}function km({maxDepth:e}){const[n]=_i.useLexicalComposerContext();return c.useEffect(()=>n.registerCommand(Te.INDENT_CONTENT_COMMAND,()=>!Sm(e??7),Te.COMMAND_PRIORITY_HIGH),[n,e]),null}const $m=e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M7.60846 2V21.9982",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M7.60847 11.5664H13.2601C14.5285 11.5664 15.7448 11.0626 16.6417 10.1657C17.5385 9.26889 18.0423 8.05252 18.0423 6.7842C18.0423 5.51589 17.5385 4.29952 16.6417 3.40269C15.7448 2.50585 14.5285 2.00201 13.2601 2.00201H5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M13.2601 11.5661H14.5644C15.948 11.5661 17.2749 12.1157 18.2533 13.0941C19.2317 14.0725 19.7813 15.3994 19.7813 16.783C19.7813 18.1667 19.2317 19.4936 18.2533 20.472C17.2749 21.4503 15.948 22 14.5644 22H5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Em=e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M3.78525 5H20.7448",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M4.67783 9.46301H19.8522",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M2 13.9261H22.53",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M5.57047 18.3891H18.9596",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Tm=e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M22.375 3H13",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M22.375 9H13",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M22.375 15H13",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M18.1562 21H13",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M3.48409 8L7.7924 11.8119C7.81051 11.8279 7.82501 11.8477 7.83494 11.8698C7.84487 11.8918 7.85001 11.9158 7.85001 11.94C7.85001 11.9642 7.84487 11.9882 7.83494 12.0102C7.82501 12.0323 7.81051 12.0521 7.7924 12.0681L3.48409 15.88",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),jm=e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M18.9595 1.5L5.57042 22.03",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M2 22.03H9.14086",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M15.3891 1.5H22.53",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Nm=e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M0.979614 5H23.0204",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M0.979614 9.31012H23.0204",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M0.979614 13.8163H23.0204",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M0.979614 18.1265H23.0204",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"})),_m=e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M2 5H19.8522",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M2 9.46301H16.2817",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M2 13.9261H22.53",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M2 18.3891H18.9596",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Rm=e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M13.6039 13.8557C13.6039 14.3291 13.792 14.7832 14.1268 15.118C14.4616 15.4528 14.9157 15.6409 15.3891 15.6409H19.8522C20.5618 15.639 21.2418 15.3563 21.7436 14.8545C22.2454 14.3527 22.5281 13.6727 22.53 12.963V11.1778C22.5279 10.4683 22.2451 9.78839 21.7433 9.28666C21.2416 8.78493 20.5617 8.50212 19.8522 8.5H15.3891C14.9157 8.5 14.4616 8.68809 14.1268 9.02288C13.792 9.35767 13.6039 9.81175 13.6039 10.2852",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M10.9261 13.8557C10.9261 14.3291 10.738 14.7832 10.4032 15.118C10.0684 15.4528 9.61434 15.6409 9.14087 15.6409H4.67783C3.9682 15.639 3.28818 15.3563 2.7864 14.8545C2.28462 14.3527 2.00188 13.6727 2 12.963V11.1778C2.00212 10.4683 2.28493 9.78839 2.78666 9.28666C3.28839 8.78493 3.96827 8.50212 4.67783 8.5H9.14087C9.61434 8.5 10.0684 8.68809 10.4032 9.02288C10.738 9.35767 10.9261 9.81175 10.9261 10.2852",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M7.35565 12.0696H17.1743",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Im=e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M2 4.78522C2 5.25869 2.18808 5.71276 2.52288 6.04756C2.85767 6.38235 3.31175 6.57044 3.78522 6.57044C4.25869 6.57044 4.71276 6.38235 5.04756 6.04756C5.38235 5.71276 5.57044 5.25869 5.57044 4.78522C5.57044 4.31175 5.38235 3.85767 5.04756 3.52288C4.71276 3.18809 4.25869 3 3.78522 3C3.31175 3 2.85767 3.18809 2.52288 3.52288C2.18808 3.85767 2 4.31175 2 4.78522Z",stroke:"currentColor",strokeWidth:1.46939,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M9.14087 4.78522H22.53",stroke:"currentColor",strokeWidth:1.46939,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M2 11.9261C2 12.3996 2.18808 12.8536 2.52288 13.1884C2.85767 13.5232 3.31175 13.7113 3.78522 13.7113C4.25869 13.7113 4.71276 13.5232 5.04756 13.1884C5.38235 12.8536 5.57044 12.3996 5.57044 11.9261C5.57044 11.4526 5.38235 10.9985 5.04756 10.6637C4.71276 10.329 4.25869 10.1409 3.78522 10.1409C3.31175 10.1409 2.85767 10.329 2.52288 10.6637C2.18808 10.9985 2 11.4526 2 11.9261Z",stroke:"currentColor",strokeWidth:1.46939,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M9.14087 11.9261H22.53",stroke:"currentColor",strokeWidth:1.46939,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M2 19.067C2 19.5404 2.18808 19.9945 2.52288 20.3293C2.85767 20.6641 3.31175 20.8522 3.78522 20.8522C4.25869 20.8522 4.71276 20.6641 5.04756 20.3293C5.38235 19.9945 5.57044 19.5404 5.57044 19.067C5.57044 18.5935 5.38235 18.1394 5.04756 17.8046C4.71276 17.4698 4.25869 17.2817 3.78522 17.2817C3.31175 17.2817 2.85767 17.4698 2.52288 17.8046C2.18808 18.1394 2 18.5935 2 19.067Z",stroke:"currentColor",strokeWidth:1.46939,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M9.14087 19.067H22.53",stroke:"currentColor",strokeWidth:1.46939,strokeLinecap:"round",strokeLinejoin:"round"})),Am=e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M1.625 3H11",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M1.625 9H11",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M1.625 15H11",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M5.84375 21H11",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M20.5159 8L16.2076 11.8119C16.1895 11.8279 16.175 11.8477 16.1651 11.8698C16.1551 11.8918 16.15 11.9158 16.15 11.94C16.15 11.9642 16.1551 11.9882 16.1651 12.0102C16.175 12.0323 16.1895 12.0521 16.2076 12.0681L20.5159 15.88",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Lm=e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M21.74 2V8.24772H15.4923",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M21.74 8.2496C20.129 6.03385 17.709 4.54298 15.0054 4.10065C12.3019 3.65833 9.53293 4.30026 7.29977 5.88707C5.97812 6.83145 4.8993 8.07583 4.15188 9.51804C3.40446 10.9602 3.00976 12.5592 3.00018 14.1835C2.9906 15.8079 3.36641 17.4113 4.09676 18.8623C4.82711 20.3132 5.89117 21.5702 7.20159 22.5301",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Dm=e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M5.57047 5H22.53",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M8.24826 9.46307H22.53",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M2 13.9261H22.53",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M5.57047 18.3892H22.53",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Om=e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M3 21.2H21.7",stroke:"currentColor",strokeWidth:1.35,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M6.25217 2.50165V11.8516C6.25217 13.4689 6.89462 15.0199 8.03819 16.1635C9.18175 17.307 10.7328 17.9495 12.35 17.9495C13.9672 17.9495 15.5183 17.307 16.6618 16.1635C17.8054 15.0199 18.4478 13.4689 18.4478 11.8516V2.50165",stroke:"currentColor",strokeWidth:1.35,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M3.81304 2.5H8.6913",stroke:"currentColor",strokeWidth:1.35,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M16.0087 2.5H20.887",stroke:"currentColor",strokeWidth:1.35,strokeLinecap:"round",strokeLinejoin:"round"}));function Tl(){return t.jsx("div",{className:"divider"})}function jl(e,n){n===null?(e.style.opacity="0",e.style.top="-1000px",e.style.left="-1000px"):(e.style.opacity="1",e.style.top=`${n.top+n.height+window.pageYOffset+10}px`,e.style.left=n.left+window.pageXOffset-e.offsetWidth/2+n.width/2+"px")}function Mm({editor:e}){const n=St(),a=c.useRef(null),i=c.useRef(null),f=c.useRef(!1),[x,o]=c.useState(""),[l,p]=c.useState(!1),[v,w]=c.useState(null),d=c.useCallback(()=>{const s=Te.$getSelection();if(Te.$isRangeSelection(s)){const m=Yd(s),E=m.getParent();an.$isLinkNode(E)?o(E.getURL()):an.$isLinkNode(m)?o(m.getURL()):o("")}const C=a.current,S=window.getSelection(),T=document.activeElement;if(C===null)return;const u=e.getRootElement();if(s!==null&&S!=null&&!S.isCollapsed&&u!==null&&u.contains(S.anchorNode)){const m=S.getRangeAt(0);let E;if(S.anchorNode===u){let k=u;for(;k.firstElementChild!=null;)k=k.firstElementChild;E=k.getBoundingClientRect()}else E=m.getBoundingClientRect();f.current||jl(C,E),w(s)}else(!T||T.className!=="link-input")&&(jl(C,null),w(null),p(!1),o(""));return!0},[e]);return c.useEffect(()=>mo.mergeRegister(e.registerUpdateListener(({editorState:s})=>{s.read(()=>{d()})}),e.registerCommand(Te.SELECTION_CHANGE_COMMAND,()=>(d(),!0),1)),[e,d]),c.useEffect(()=>{e.getEditorState().read(()=>{d()})},[e,d]),c.useEffect(()=>{l&&i.current!=null&&i.current?.focus()},[l]),t.jsx(Hm,{ref:a,children:l?t.jsx("input",{ref:i,className:"link-input",value:x,onChange:s=>{o(s.target.value)},onKeyDown:s=>{s.key==="Enter"?(s.preventDefault(),v!==null&&(x!==""&&e.dispatchCommand(an.TOGGLE_LINK_COMMAND,x),p(!1))):s.key==="Escape"&&(s.preventDefault(),p(!1))}}):t.jsxs(Um,{className:"link-input",children:[t.jsx(Vm,{href:x,target:"_blank",rel:"noopener noreferrer",children:x}),t.jsx(mt,{className:"link-edit",type:"button",tabIndex:0,onMouseDown:s=>s.preventDefault(),onClick:()=>{p(!0)},children:t.jsx(nh,{style:{width:r.sp3,height:r.sp3,color:n.colors.primary}})})]})})}function Yd(e){const n=e.anchor,a=e.focus,i=e.anchor.getNode(),f=e.focus.getNode();return i===f?i:e?.isBackward()?Rr.$isAtNodeEnd(a)?i:f:Rr.$isAtNodeEnd(n)?f:i}function Pm({fileAttached:e,enableZeniGPTFeature:n,isZeniGPTResponseLoading:a,customerRequestData:i,initialHtmlString:f,handleFileInputClick:x,improveUsingZeniGPTClick:o,setZeniRequestsHtml:l}){const[p]=_i.useLexicalComposerContext(),v=c.useRef(null),[w,d]=c.useState(!1),[s,C]=c.useState(!1),[S,T]=c.useState("paragraph"),[,u]=c.useState(!1),[m,E]=c.useState(!1),[k,j]=c.useState(!1),[D,M]=c.useState(!1),[_,R]=c.useState(!1),A=c.useCallback(g=>{const h=new DOMParser().parseFromString(g,"text/html"),N=h.getElementsByTagName("p");for(let I=N.length-1;I>=0;I--){const L=N[I];L.textContent?.trim()===""&&(L.innerHTML="")}const $=Yi.$generateNodesFromDOM(p,h),b=Te.$getRoot();b.clear(),b.append(...$)},[p]);c.useEffect(()=>{p.update(()=>{f!=null&&f.length>0&&A(f)})},[p,f,A]),c.useEffect(()=>{p.update(()=>{a===!0?p.setEditable(!1):p.setEditable(!0)})},[p,a]),c.useEffect(()=>mo.mergeRegister(p.registerCommand(Te.BLUR_COMMAND,()=>{const g=Yi.$generateHtmlFromNodes(p,null);return l?.(g),!0},1)),[p,l]);const F=c.useCallback(g=>{p.update(()=>{const h=new DOMParser,N=El($r),$=vt.$createListNode("bullet");g.forEach(U=>{const Q=h.parseFromString(U,"text/html"),Y=Yi.$generateNodesFromDOM(p,Q),z=vt.$createListItemNode();Y.forEach(H=>{z.append(H)}),$.append(z)}),N.append($);const b=El($r);b.append(Te.$createTextNode(""));const I=Te.$getRoot(),L=I.getFirstChild();L?L.insertBefore(N):I.append(N),L?L.insertBefore(b):I.append(b),I.getFirstChild()===null&&I.append(Te.$createParagraphNode().append(Te.$createTextNode($e.getLocalizedStrings().common.strings.empty))),setTimeout(()=>{p.update(()=>{const U=vt.ListNode.clone($);N.replace(U)})},1e3)})},[p]);c.useEffect(()=>{i.length>0&&F(i)},[i,F]);const K=c.useCallback(()=>{const g=Te.$getSelection();if(Te.$isRangeSelection(g)){const h=g.anchor.getNode(),N=h.getKey()==="root"?h:h.getTopLevelElementOrThrow(),$=N.getKey();if(p.getElementByKey($)!==null)if(vt.$isListNode(N)){const L=mo.$getNearestNodeOfType(h,vt.ListNode),U=L?L.getTag():N.getTag();T(U)}else{const L=_r.$isHeadingNode(N)?N.getTag():N.getType();T(L)}R(g.hasFormat("bold")),j(g.hasFormat("italic")),M(g.hasFormat("underline")),u(Rr.$isParentElementRTL(g));const b=Yd(g),I=b.getParent();an.$isLinkNode(I)||an.$isLinkNode(b)?E(!0):E(!1)}},[p]);c.useEffect(()=>mo.mergeRegister(p.registerUpdateListener(({editorState:g})=>{g.read(()=>{K()})}),p.registerCommand(Te.SELECTION_CHANGE_COMMAND,g=>(K(),!1),1),p.registerCommand(Te.CAN_UNDO_COMMAND,g=>(d(g),!1),1),p.registerCommand(Te.CAN_REDO_COMMAND,g=>(C(g),!1),1)),[p,K]);const ee=c.useCallback(()=>{m?p.dispatchCommand(an.TOGGLE_LINK_COMMAND,null):p.dispatchCommand(an.TOGGLE_LINK_COMMAND,"https://")},[p,m]),{cockpit:{monthEndReport:{toolbarPluginTooltip:te,editorZeniGPTButton:Z}},common:{documents:B,strings:O}}=$e.getLocalizedStrings();return t.jsxs("div",{className:"toolbar",ref:v,children:[t.jsxs(Nl,{children:[t.jsx(Se,{placement:"bottom",title:t.jsx(Tt,{children:te.bold}),children:t.jsx(mt,{type:"button",onClick:()=>{p.dispatchCommand(Te.FORMAT_TEXT_COMMAND,"bold")},className:"toolbar-item spaced "+(_?"active":""),style:{padding:r.sp1},disabled:a,"aria-label":"Format Bold",children:t.jsx($m,{className:"format"})})}),t.jsx(Se,{placement:"bottom",title:t.jsx(Tt,{children:te.italic}),children:t.jsx(mt,{type:"button",onClick:()=>{p.dispatchCommand(Te.FORMAT_TEXT_COMMAND,"italic")},className:"toolbar-item spaced "+(k?"active":""),style:{padding:r.sp1},disabled:a,"aria-label":"Format Italics",children:t.jsx(jm,{className:"format"})})}),t.jsx(Se,{placement:"bottom",title:t.jsx(Tt,{children:te.underline}),children:t.jsx(mt,{type:"button",onClick:()=>{p.dispatchCommand(Te.FORMAT_TEXT_COMMAND,"underline")},className:"toolbar-item spaced "+(D?"active":""),style:{padding:r.sp1},disabled:a,"aria-label":"Format Underline",children:t.jsx(Om,{className:"format"})})}),t.jsx(Se,{placement:"bottom",title:t.jsx(Tt,{children:te.link}),children:t.jsxs(mt,{type:"button",onClick:ee,className:"toolbar-item spaced "+(m?"active":""),style:{padding:r.sp1},disabled:a,"aria-label":"Insert Link",children:[t.jsx(Wm,{className:"format link"}),t.jsx(Rm,{className:"format"})]})}),m&&yi.createPortal(t.jsx(Mm,{editor:p}),document.body),t.jsx(Tl,{}),t.jsx(Se,{placement:"bottom",title:t.jsx(Tt,{children:te.list}),children:t.jsx(mt,{type:"button",onClick:()=>{S!=="ul"?p.dispatchCommand(vt.INSERT_UNORDERED_LIST_COMMAND,void 0):p.dispatchCommand(vt.REMOVE_LIST_COMMAND,void 0)},className:"toolbar-item spaced "+(S==="ul"?"active":""),style:{padding:r.sp1},disabled:a,"aria-label":"Format Underline",children:t.jsx(Im,{className:"format"})})}),t.jsx(Tl,{}),t.jsx(mt,{type:"button",onClick:()=>{p.dispatchCommand(Te.FORMAT_ELEMENT_COMMAND,"left")},className:"toolbar-item spaced",style:{padding:r.sp1},disabled:a,"aria-label":"Left Align",children:t.jsx(_m,{className:"format"})}),t.jsx(mt,{type:"button",onClick:()=>{p.dispatchCommand(Te.FORMAT_ELEMENT_COMMAND,"center")},className:"toolbar-item spaced",style:{padding:r.sp1},disabled:a,"aria-label":"Center Align",children:t.jsx(Em,{className:"format"})}),t.jsx(mt,{type:"button",onClick:()=>{p.dispatchCommand(Te.FORMAT_ELEMENT_COMMAND,"right")},className:"toolbar-item spaced",style:{padding:r.sp1},disabled:a,"aria-label":"Right Align",children:t.jsx(Dm,{className:"format"})}),t.jsx(mt,{type:"button",onClick:()=>{p.dispatchCommand(Te.FORMAT_ELEMENT_COMMAND,"justify")},className:"toolbar-item",style:{padding:r.sp1},disabled:a,"aria-label":"Justify Align",children:t.jsx(Nm,{className:"format"})}),t.jsx(Se,{placement:"bottom",title:t.jsx(Tt,{children:te.indent}),children:t.jsx(mt,{type:"button",onClick:()=>{p.dispatchCommand(Te.INDENT_CONTENT_COMMAND,void 0)},className:"toolbar-item",style:{padding:r.sp1},disabled:a,"aria-label":"Indent",children:t.jsx(Tm,{className:"format"})})}),t.jsx(Se,{placement:"bottom",title:t.jsx(Tt,{children:te.outdent}),children:t.jsx(mt,{type:"button",onClick:()=>{p.dispatchCommand(Te.OUTDENT_CONTENT_COMMAND,void 0)},className:"toolbar-item",style:{padding:r.sp1},disabled:a,"aria-label":"Outdent",children:t.jsx(Am,{className:"format"})})}),t.jsx(Se,{placement:"bottom",style:{padding:`2px ${r.sp2}`},title:t.jsxs(Km,{children:[t.jsxs(Tt,{children:[B.attachFile,O.space]}),t.jsx(Tt,{children:B.formatImageAndDocumentAttachments}),t.jsxs(Tt,{children:[O.space,B.attachmentFileSize700KB]})]}),children:t.jsx(mt,{type:"button",onClick:x,className:"toolbar-item",style:{padding:r.sp1},disabled:a||e,"aria-label":"Attachment",children:t.jsx(Kd,{className:"format"})})})]}),t.jsxs(Nl,{children:[n?t.jsx(Se,{placement:"top",title:t.jsx(Tt,{children:Z.tooltip}),children:t.jsxs(Bm,{isZeniGPTResponseLoading:a,type:"button",onClick:()=>{p.update(()=>{const g=Yi.$generateHtmlFromNodes(p,null);o?.(g)})},disabled:a,children:[t.jsx(zm,{}),t.jsx(Fm,{children:Z.label})]})}):null,t.jsx(Se,{placement:"bottom",title:t.jsx(Tt,{children:te.undo}),children:t.jsx(mt,{type:"button",disabled:!w||a,onClick:()=>{p.dispatchCommand(Te.UNDO_COMMAND,void 0)},className:"toolbar-item spaced",style:{padding:r.sp1},"aria-label":"Undo",children:t.jsx(jp,{className:"format"})})}),t.jsx(Se,{placement:"bottom",title:t.jsx(Tt,{children:te.redo}),children:t.jsx(mt,{type:"button",disabled:!s||a,onClick:()=>{p.dispatchCommand(Te.REDO_COMMAND,void 0)},className:"toolbar-item",style:{padding:r.sp1},"aria-label":"Redo",children:t.jsx(Lm,{className:"format"})})})]})]})}const mt=y.button``,Nl=y.div`
335
- display: flex;
336
- align-items: center;
337
- gap: ${r.sp1};
338
- `,Tt=y.div`
339
- padding: 2px ${r.sp2};
340
- color: ${fe.neutralGrey4Light};
341
- `,Fm=y(ih)`
342
- color: ${fe.neutralGrey5Light};
343
- `,Bm=y.button`
344
- display: flex;
345
- align-items: center;
346
- justify-content: center;
347
- min-width: 165px;
348
- background-color: ${e=>e.isZeniGPTResponseLoading?e.theme.colors.brandColorSapphireLight:e.theme.colors.brandColorSapphire};
349
- color: ${fe.neutralGrey5Light};
350
- border-radius: ${r.sp1};
351
- border: none;
352
- height: 26px;
353
- &:hover {
354
- background-color: ${fe.brandColorSapphireDark};
355
- }
356
- `,zm=y(e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M9.74707 6.07052L11.2433 2.02682C11.5032 1.32439 12.4968 1.32439 12.7567 2.02683L14.2529 6.07052C14.8833 7.77389 16.2261 9.1167 17.9295 9.74707L21.9732 11.2433C22.6756 11.5032 22.6756 12.4968 21.9732 12.7567L17.9295 14.2529C16.2261 14.8833 14.8833 16.2261 14.2529 17.9295L12.7567 21.9732C12.4968 22.6756 11.5032 22.6756 11.2433 21.9732L9.74707 17.9295C9.1167 16.2261 7.77389 14.8833 6.07052 14.2529L2.02682 12.7567C1.32439 12.4968 1.32439 11.5032 2.02683 11.2433L6.07052 9.74707C7.77389 9.1167 9.1167 7.77389 9.74707 6.07052Z",fill:"currentColor",stroke:"currentColor",strokeWidth:1.5})))`
357
- height: ${r.sp3};
358
- width: ${r.sp3};
359
- margin-right: ${r.sp1};
360
- color: ${fe.brandColorPearl};
361
- `,Hm=y.div`
362
- position: absolute;
363
- z-index: 100;
364
- top: -10000px;
365
- left: -10000px;
366
- margin-top: -6px;
367
- max-width: 300px;
368
- width: 100%;
369
- opacity: 0;
370
- border: 1px solid ${e=>e.theme.colors.grey3};
371
- background-color: ${e=>e.theme.colors.grey5};
372
- box-shadow: ${r.sp0} 5px 10px ${fe.overlayLight};
373
- border-radius: ${r.sp2};
374
- transition: opacity 0.5s;
375
- z-index: 10000;
376
-
377
- .link-input {
378
- display: block;
379
- box-sizing: border-box;
380
- padding: ${r.sp3};
381
- border-radius: ${r.sp3};
382
- background-color: ${e=>e.theme.colors.grey5};
383
- font-size: 15px;
384
- color: ${e=>e.theme.colors.primary};
385
- border: 0;
386
- outline: 0;
387
- position: relative;
388
- font-family: inherit;
389
- }
390
-
391
- button.link-edit {
392
- display: flex;
393
- align-items: center;
394
- width: 35px;
395
- position: absolute;
396
- right: ${r.sp0};
397
- top: ${r.sp0};
398
- bottom: ${r.sp0};
399
- cursor: pointer;
400
- background: none;
401
- border: none;
402
- padding: 0;
403
- margin: 0;
404
-
405
- &:focus {
406
- outline: none;
407
- }
408
- }
409
-
410
- .link-input a {
411
- color: ${e=>e.theme.colors.link};
412
- text-decoration: none;
413
- display: block;
414
- white-space: nowrap;
415
- overflow: hidden;
416
- margin-right: 30px;
417
- text-overflow: ellipsis;
418
- }
419
-
420
- .link-input a:hover {
421
- text-decoration: underline;
422
- }
423
-
424
- .button {
425
- width: 20px;
426
- height: 20px;
427
- display: inline-block;
428
- padding: 6px;
429
- border-radius: ${r.sp2};
430
- cursor: pointer;
431
- margin: 0 2px;
432
- }
433
-
434
- .button.hovered {
435
- width: 20px;
436
- height: 20px;
437
- display: inline-block;
438
- background-color: ${e=>e.theme.colors.background};
439
- }
440
-
441
- .button i,
442
- .actions i {
443
- background-size: contain;
444
- display: inline-block;
445
- height: 20px;
446
- width: 20px;
447
- vertical-align: -0.25em;
448
- }
449
- `,Um=y.div``,Vm=y.a``,Wm=y.i``,Km=y.div`
450
- display: flex;
451
- flex-direction: column; /* Align children vertically */
452
- align-items: center; /* Center children horizontally */
453
- justify-content: center; /* Center children vertically */
454
- height: 100%; /* Adjust to your desired height */
455
- width: 100%; /* Adjust to your desired width */
456
- `,Gm=y(Me)`
457
- color: ${e=>e.theme.colors.grey2};
458
- overflow: hidden;
459
- position: absolute;
460
- text-overflow: ellipsis;
461
- top: ${r.sp3};
462
- left: 12px;
463
- user-select: none;
464
- display: inline-block;
465
- pointer-events: none;
466
- `,Ym=y(nt)`
467
- position: relative;
468
- margin: ${r.sp0};
469
- border-radius: ${r.sp2};
470
- color: ${e=>e.theme.colors.primary};
471
- text-align: left;
472
- border: 1px solid ${e=>e.theme.colors.grey2};
473
- overflow: hidden;
474
-
475
- &:hover {
476
- border: ${e=>`1px solid ${e.isZeniGPTResponseLoading?e.theme.colors.grey2:e.theme.colors.primary}`};
477
-
478
- .toolbar {
479
- border-bottom: ${e=>`1px solid ${e.isZeniGPTResponseLoading?e.theme.colors.grey2:e.theme.colors.primary}`};
480
- }
481
- }
482
-
483
- &:focus-within {
484
- border: ${e=>`1px solid ${e.isZeniGPTResponseLoading?e.theme.colors.grey2:e.theme.colors.primary}`};
485
-
486
- .toolbar {
487
- border-bottom: ${e=>`1px solid ${e.isZeniGPTResponseLoading?e.theme.colors.grey2:e.theme.colors.primary}`};
488
- }
489
- }
490
-
491
- .editor-input {
492
- min-height: 120px;
493
- max-height: 360px;
494
- overflow: auto;
495
- resize: none;
496
- ${xt.standardRegular.css};
497
- color: ${e=>e.isZeniGPTResponseLoading?e.theme.colors.grey2:e.theme.colors.primary};
498
- position: relative;
499
- tab-size: 1;
500
- outline: 0;
501
- padding: ${r.sp3} 12px;
502
-
503
- .editor__link {
504
- color: ${e=>e.isZeniGPTResponseLoading?e.theme.colors.grey2:e.theme.colors.link};
505
- text-decoration: none;
506
- }
507
- .editor__link:hover {
508
- text-decoration: underline;
509
- cursor: pointer;
510
- }
511
- }
512
-
513
- .editor-input p {
514
- margin: 0;
515
- }
516
-
517
- .toolbar {
518
- display: flex;
519
- margin-bottom: 1px;
520
- background: ${e=>e.theme.colors.grey5};
521
- padding: ${r.sp1};
522
- border-top-left-radius: 10px;
523
- border-top-right-radius: 10px;
524
- vertical-align: middle;
525
- border-bottom: 1px solid ${e=>e.theme.colors.grey2};
526
- justify-content: space-between;
527
- }
528
-
529
- .toolbar button.toolbar-item {
530
- border: 0;
531
- display: flex;
532
- background: none;
533
- border-radius: ${r.sp2};
534
- padding: ${r.sp2};
535
- cursor: pointer;
536
- vertical-align: middle;
537
- }
538
-
539
- .toolbar button.toolbar-item:disabled {
540
- cursor: not-allowed;
541
- }
542
-
543
- .toolbar button.toolbar-item.spaced {
544
- margin-right: 2px;
545
- }
546
-
547
- .toolbar button.toolbar-item svg.format {
548
- background-size: contain;
549
- display: inline-block;
550
- height: ${r.sp3};
551
- width: ${r.sp3};
552
- vertical-align: -0.25em;
553
- display: flex;
554
- color: ${e=>e.theme.colors.grey1};
555
- }
556
-
557
- .toolbar button.toolbar-item:disabled svg.format {
558
- opacity: 0.2;
559
- }
560
-
561
- .toolbar button.toolbar-item.active {
562
- svg.format {
563
- color: ${e=>e.theme.colors.primary};
564
- }
565
- }
566
-
567
- .toolbar .toolbar-item:hover:not([disabled]) {
568
- svg.format {
569
- color: ${e=>e.theme.colors.primary};
570
- }
571
- }
572
-
573
- .toolbar .divider {
574
- width: 1px;
575
- background-color: ${e=>e.theme.colors.background};
576
- margin: ${r.sp0} ${r.sp1};
577
- }
578
-
579
- .toolbar .toolbar-item .text {
580
- display: flex;
581
- width: 200px;
582
- vertical-align: middle;
583
- ${xt.smallRegular.css};
584
- color: ${e=>e.theme.colors.primary};
585
- text-overflow: ellipsis;
586
- width: 70px;
587
- overflow: hidden;
588
- height: 20px;
589
- text-align: left;
590
- }
591
- `,qm=y.div`
592
- position: absolute;
593
- display: flex;
594
- justify-content: center;
595
- align-items: center;
596
- height: 100%;
597
- width: 100%;
598
- z-index: 1;
599
- `,Jm=y.div`
600
- background-color: transparent;
601
- position: relative;
602
- `;function Zm(){return t.jsx(Gm,{children:$e.getLocalizedStrings().cockpit.monthEndReport.editorPlaceholder})}const Qm={namespace:"",onError(e){throw e},nodes:[_r.HeadingNode,vt.ListNode,vt.ListItemNode,_r.QuoteNode,Nr.CodeNode,Nr.CodeHighlightNode,Go.TableNode,Go.TableCellNode,Go.TableRowNode,an.AutoLinkNode,an.LinkNode,Gd],theme:{link:"editor__link",list:{listitem:"lexicalEditor__listItem",nested:{listitem:"lexicalEditor__nestedListItem"},olDepth:["lexicalEditor__ol1","lexicalEditor__ol2","lexicalEditor__ol3","lexicalEditor__ol4","lexicalEditor__ol5"],ul:"lexicalEditor__ul"},text:{bold:"lexicalEditor__textBold",code:"lexicalEditor__textCode",italic:"lexicalEditor__textItalic",underline:"lexicalEditor__textUnderline"}}};function Xm({fileAttached:e,enableZeniGPTFeature:n,isZeniGPTResponseLoading:a,initialHtmlString:i,customerRequestData:f,handleFileInputClick:x,improveUsingZeniGPTClick:o,setZeniRequestsHtml:l}){const p=St();return t.jsxs(Kp.LexicalComposer,{initialConfig:Qm,children:[t.jsx(xm,{}),t.jsxs(Ym,{isZeniGPTResponseLoading:a,children:[a?t.jsx(qm,{children:t.jsx(Pn,{size:"Standard",start:!0,style:{display:"flex",padding:r.sp4,borderRadius:"100%",backgroundColor:p.colors.grey5,border:`2px solid ${p.colors.grey3}`,boxShadow:`${r.sp0} 2px ${r.sp1} ${p.colors.dropShadowNormal}`}})}):null,t.jsx(Pm,{handleFileInputClick:x,fileAttached:e,customerRequestData:f,enableZeniGPTFeature:n,isZeniGPTResponseLoading:a,initialHtmlString:i,improveUsingZeniGPTClick:o,setZeniRequestsHtml:l}),t.jsxs(Jm,{children:[t.jsx(cg.RichTextPlugin,{contentEditable:t.jsx(Gp.ContentEditable,{className:Xr}),placeholder:t.jsx(Zm,{}),ErrorBoundary:qp}),t.jsx(wm,{}),t.jsx(vm,{}),t.jsx(Qp.HistoryPlugin,{}),t.jsx(Vp.AutoFocusPlugin,{}),t.jsx(bm,{}),t.jsx(tg.ListPlugin,{}),t.jsx(Xp.LinkPlugin,{}),t.jsx(Cm,{}),t.jsx(km,{maxDepth:7}),t.jsx(og.MarkdownShortcutPlugin,{transformers:Up.TRANSFORMERS})]})]})]})}const e1=y.div``;function t1({canvasContainerRef:e,sortedThreads:n,editorMode:a,isZeniUser:i=!0}){const f=i?Ci:$o,{openThread:x}=c.useContext(f),[o,l]=c.useState(e.current!=null);c.useEffect(()=>{l(e.current!=null)},[e.current]);const p=c.useRef();return t.jsx(e1,{children:n.map(([v,{metadata:w}])=>{const d=Xn(w,a);if(!d||o===!1)return null;p.current=e.current?.getBoundingClientRect();const s=p.current?.top??0,C=p.current?.left??0,S=x===v,T=Array.from(d.getClientRects()).filter(u=>u.width>0);if(T.length===0){const u=d.getBoundingClientRect();let m=u.width;return m===0&&(m=6*d.toString().length),t.jsx(yl,{rect:{...u.toJSON(),top:u.top-s,left:u.left-C,width:m},isOpenThread:S,threadId:v},v)}return T.map((u,m)=>t.jsx(yl,{rect:{...u.toJSON(),top:u.top-s,left:u.left-C},isOpenThread:S,threadId:v},m))})})}const n1=y(nt)`
603
- color: ${e=>e.theme.colors.hero};
604
- `,i1=y.div`
605
- justify-content: center;
606
- align-items: center;
607
- display: flex;
608
- flex-direction: column;
609
- cursor: pointer;
610
- `,o1=y(To)`
611
- width: ${r.sp10};
612
- height: ${r.sp10};
613
- color: ${e=>e.theme.colors.primary};
614
- `,r1=({message:e,onReload:n})=>t.jsxs(i1,{onClick:n,"data-testid":ae("reload-container"),children:[t.jsx(o1,{}),t.jsx(n1,{children:e})]}),{common:{navBar:{back:a1},texts:{refresh:s1,close:l1,copy:c1,copied:d1,open:u1}},expenseAutomation:{common:{numbers:{maximumCount:h1}}}}=$e.getLocalizedStrings(),p1=y(Ih)`
615
- display: flex;
616
- width: ${r.sp4};
617
- height: ${r.sp4};
618
- align-items: center;
619
- justify-content: center;
620
- `,g1=y.div`
621
- display: flex;
622
- align-items: center;
623
- justify-content: center;
624
- position: relative;
625
- cursor: ${e=>e.isDisabled?"not-allowed":"pointer"};
626
- color: ${e=>e.theme.colors.hero};
627
- &:hover {
628
- color: ${e=>e.theme.colors.primary};
629
- }
630
- `,m1=y.div`
631
- width: 100%;
632
- display: flex;
633
- flex-shrink: 0;
634
- flex-direction: column;
635
- background: ${e=>e.theme.colors.grey4};
636
- box-sizing: border-box;
637
- position: sticky;
638
- top: 0;
639
- z-index: 6;
640
- `,_l=y.div`
641
- display: flex;
642
- flex-direction: column;
643
- align-items: center;
644
- padding-left: ${e=>Il.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
645
- padding-right: ${e=>Il.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
646
- `,f1=y.div`
647
- display: flex;
648
- align-items: baseline;
649
- justify-content: end;
650
- gap: ${r.sp4};
651
- flex: 1 1 ${r.sp0};
652
- `,x1=y.div`
653
- display: flex;
654
- align-items: baseline;
655
- justify-content: start;
656
- gap: ${r.sp4};
657
- flex: 1 1 ${r.sp0};
658
- `,y1=y(bd)`
659
- width: ${r.sp3};
660
- height: ${r.sp3};
661
- cursor: pointer;
662
- margin-left: ${r.sp1};
663
- color: inherit;
664
- `,C1=y(Ah)`
665
- width: ${r.sp3};
666
- height: ${r.sp3};
667
- margin-left: ${r.sp1};
668
- color: ${fe.success};
669
- `,b1=y(Eo)`
670
- cursor: pointer;
671
- width: ${r.sp4};
672
- height: ${r.sp4};
673
- color: ${e=>e.theme.colors.hero};
674
- &:hover {
675
- color: ${e=>e.theme.colors.primary};
676
- }
677
- `,w1=y(jh)`
678
- cursor: pointer;
679
- width: ${r.sp4};
680
- height: ${r.sp4};
681
- color: ${e=>e.theme.colors.hero};
682
- &:hover {
683
- color: ${e=>e.theme.colors.primary};
684
- }
685
- `,v1=y(Th,{shouldForwardProp:e=>typeof e=="string"&&e!=="$spinning"})`
686
- cursor: pointer;
687
- width: ${r.sp4};
688
- height: ${r.sp4};
689
- color: ${e=>e.theme.colors.hero};
690
- animation: ${e=>e.$spinning?ke`
691
- ${S1} 2s linear infinite;
692
- `:"none"};
693
- &:hover {
694
- color: ${e=>e.theme.colors.primary};
695
- }
696
- `,S1=ji`
697
- 0% {
698
- transform: rotate(0deg);
699
- }
700
- 100% {
701
- transform: rotate(360deg);
702
- }
703
- `,k1=y.div`
704
- width: 100%;
705
- `,$1=y.div`
706
- padding-top: ${r.sp0};
707
- padding-bottom: ${r.sp0};
708
- `,Rl=y(Me)`
709
- color: ${e=>e.theme.colors.hero};
710
- text-align: center;
711
- display: flex;
712
- align-items: center;
713
- justify-content: center;
714
- flex-direction: column;
715
- padding-bottom: ${r.sp4};
716
- `,E1=y.div`
717
- display: flex;
718
- `,T1=y.div`
719
- border: 1px solid ${e=>e.theme.colors.grey3};
720
- width: 100%;
721
- margin-top: -2px;
722
- border-top-right-radius: ${r.sp2};
723
- border-top-left-radius: ${r.sp2};
724
- border-bottom-right-radius: ${r.sp2};
725
- border-bottom-left-radius: ${r.sp2};
726
- `,j1=y.div`
727
- display: flex;
728
- height: ${r.sp4};
729
- `,N1=y.div`
730
- text-align: center;
731
- display: flex;
732
- align-items: center;
733
- justify-content: center;
734
- flex-wrap: wrap;
735
- `,_1=y.div`
736
- display: flex;
737
- flex-direction: column;
738
- `,R1=y(Sn)`
739
- width: ${r.sp3};
740
- height: ${r.sp3};
741
- margin-right: ${r.sp1};
742
- path {
743
- stroke-width: 2;
744
- }
745
- `,Ji=y.span`
746
- font-weight: ${oi.regular};
747
- color: ${e=>e.theme.colors.primary};
748
- `,I1=y.span`
749
- font-weight: ${oi.medium};
750
- color: ${e=>e.theme.colors.primary};
751
- `,A1=y.span`
752
- color: ${e=>e.theme.colors.primary};
753
- text-decoration: underline;
754
- text-decoration-color: ${e=>e.theme.colors.grey2};
755
- cursor: pointer;
756
- display: flex;
757
- align-items: center;
758
- transition: text-decoration-color 0.2s;
759
- .copy-icon {
760
- color: ${e=>e.theme.colors.hero};
761
- transition: color 0.2s;
762
- }
763
- &:hover {
764
- .copy-icon {
765
- color: ${e=>e.theme.colors.primary};
766
- }
767
- text-decoration-color: ${e=>e.theme.colors.primary};
768
- }
769
- `,Il={subSectionContainerLeftRightPadding:new pe(W[3],W[6],W[8])},L1=({onAllThreadsClick:e,companyId:n,companyName:a})=>{const i={application:"cockpit",companyId:n,entityId:n,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:a,url:window.location.href},{url:f,...x}=i,o={...x},{threads:l,isLoading:p}=$h(o,!1,!1),v=l.filter(w=>w.id.includes(Qn)===!1);return t.jsxs(g1,{isDisabled:p,onClick:e,"data-testid":ae("comment-icon"),children:[t.jsx(Eh,{count:v.length,isLoading:p}),t.jsx(p1,{})]})},D1=({headerData:e,refreshStatus:n,searchText:a,companyName:i,companyId:f,isZeniUser:x,onAllThreadsClick:o,onClose:l,onRefresh:p,onSearchTextChanged:v})=>{const w=()=>{n!=="In-Progress"&&p()};return t.jsx(f1,{children:e.rightSection.map((d,s)=>{switch(d){case"search":return t.jsx(fh,{isSearchOpen:(a.length??0)>0,searchPlaceHolder:e.searchPlaceholder,searchText:a,searchTextBoxStyle:{position:"initial",height:"fit-content"},styledSearchIconContainerStyle:{height:r.sp4},searchIconMarginRight:r.sp0,onSearchTextChanged:C=>{v(C)},downloadPresent:!1},s+d);case"refresh":return t.jsx(Se,{display:"block",placement:"bottom",title:s1,style:{marginTop:"2px"},enterDelay:600,children:t.jsx(v1,{onClick:w,$spinning:n==="In-Progress","data-testid":ae("refresh-icon")})},s+d);case"comment":return x===!1?null:t.jsx(L1,{companyId:f,companyName:i,onAllThreadsClick:o});default:return t.jsx(Se,{display:"block",placement:"bottom",title:l1,enterDelay:600,style:{marginTop:"2px"},children:t.jsx(b1,{onClick:l,"data-testid":ae("close-icon")})},s+d)}})})},O1=({headerData:e,onBack:n})=>t.jsx(x1,{children:e.leftSection.map((a,i)=>t.jsx(Se,{display:"block",placement:"bottom",title:a1,enterDelay:600,style:{marginTop:"-14px"},children:t.jsx(w1,{onClick:n,"data-testid":ae("back-button")})},i+a))}),Al=({text:e,linkText:n,windowSize:a,isCopied:i,onLinkClick:f})=>{if(n==null||!n)return t.jsxs(Ji,{windowSize:a,children:[e," "]});const x=e.indexOf(n);if(x===-1)return t.jsxs(Ji,{windowSize:a,children:[e," "]});const o=e.substring(0,x),l=e.substring(x+n.length);return t.jsxs(t.Fragment,{children:[o?t.jsxs(Ji,{windowSize:a,children:[o.trim()," "]}):null,t.jsx(Se,{display:"flex",placement:"right",title:dd.test(n)?i?d1:c1:u1,enterTouchDelay:600,children:t.jsxs(A1,{onClick:()=>f?.(n),"data-testid":ae("pre-link"),children:[n,i?t.jsx(C1,{className:"success-icon"}):t.jsx(y1,{className:"copy-icon"})]})}),l?t.jsxs(Ji,{windowSize:a,children:[l," "]}):null]})},Ll=({subTitles:e})=>{const n=Ie(),[,a]=xh(),[i,f]=c.useState(!1),x=c.useRef(null),o=c.useCallback(l=>{dd.test(l)?(a(l),f(!0),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{f(!1)},2e3)):window.open(l,"_blank","noopener,noreferrer")},[a]);return c.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]),t.jsx(_1,{children:e.map((l,p)=>t.jsxs(N1,{"data-testid":ae("subtitle-item",p.toString()),children:[l.pre?t.jsx(Al,{text:l.pre,linkText:l.preLink,windowSize:n,isCopied:i,onLinkClick:o}):null,l.prefixIconName?t.jsx(t.Fragment,{children:l.prefixIconName==="zeniAIIcon"?t.jsx(R1,{}):t.jsx(t.Fragment,{})}):null,l.bold?t.jsx(t.Fragment,{children:t.jsxs(I1,{windowSize:n,children:[l.bold," "]})}):null,l.post?t.jsx(Al,{text:l.post,linkText:l.postLink,windowSize:n,isCopied:i,onLinkClick:o}):null]},p+l.bold+l.pre+l.post))})};function M1(e){const{headerData:n,currentTab:a,completionStatus:i,onUpdateTab:f,selectedReconAccountId:x,getTabCountAndFetchState:o,reconcileDetailPageFetchState:l,forceShowSubtitle:p,currentSelectedView:v,currentMissingReceiptsTab:w,onMissingReceiptsTabUpdate:d,onReconTabUpdate:s,currentRecontab:C,navBarCustomElement:S,titleStyle:T={},hideEmptyDivBelowTabs:u=!1,belowTabsSlot:m}=e,E=o("autoCategorized")?.count??0,k=o("review")?.count??0,j=o("reconcile")?.count??0,D=n.tabs.length>0||n.subTitle.length>0,M=v==="transaction_categorization"&&a==="autoCategorized"?E>0:v==="reconciliation"&&C==="review"&&x!=null?l==="In-Progress"||k>0:v==="reconciliation"&&C==="reconcile"&&x!=null?l==="In-Progress"||j>0:i!=="complete",_=St(),R=Ie();let A=[];n.tabs.length>0&&(A=n.tabs.map(K=>({label:K.label,id:K.id,countDetails:o(K.id)})));const F=n.tabs.some(K=>(v==="reconciliation"?K.id===C:v==="missing_receipts"?K.id===w:K.id===a)&&K.subTitle.length>0);return t.jsxs(m1,{children:[t.jsx(dh,{title:n.title,subTitle:n.subText,titleTextStyles:{flex:"1 1 0px"},backgroundColor:_.colors.grey4,onBackClick:()=>null,titleStyle:T,ignoreScrollAction:v!=="month_end_insights",keepBackgroundOnScroll:v!=="month_end_insights",leftSideComponent:t.jsx(O1,{...e}),rightSideComponent:t.jsx(D1,{...e}),source:"NavBarWithHeader"}),S??null,t.jsx(st,{controller:D===!0,children:t.jsx(_l,{windowSize:R,children:n.tabs.length>0?t.jsxs(t.Fragment,{children:[t.jsx($1,{windowSize:R,children:t.jsx(uh,{allTabs:A,selectedTab:v==="transaction_categorization"?a??A[0].id:v==="missing_receipts"?w??A[0].id:C??A[0].id,onTabChange:K=>{if(v==="transaction_categorization"){const ee=dp(K.id);ee!=null&&f(ee)}else if(v==="reconciliation"){const ee=up(K.id);ee!=null&&s(ee)}else v==="missing_receipts"&&d?.(K.id)},maximumCountLimit:h1})}),t.jsx(T1,{windowSize:R}),u!==!0?t.jsx(j1,{}):null,t.jsx(st,{controller:(M===!0||p===!0)&&F,children:t.jsx(Rl,{windowSize:R,"data-testid":ae("subtitle-container"),children:n.tabs.map((K,ee)=>(v==="reconciliation"?K.id===C:v==="missing_receipts"?K.id===w:K.id===a)?t.jsx(E1,{"data-testid":ae("subtitle-wrapper",K.id),children:t.jsx(Ll,{subTitles:K.subTitle})},ee+K.id):null)})})]}):t.jsx(st,{controller:M===!0||p===!0,children:t.jsx(Rl,{windowSize:R,children:t.jsx(Ll,{subTitles:n.subTitle})})})})}),m!=null?t.jsx(_l,{windowSize:R,children:t.jsx(k1,{children:m})}):null]})}function P1({name:e,checkBoxes:n,mode:a,isDisabled:i,style:f,labelStyle:x,labelCheckBoxStyle:o,checkBoxStyle:l,width:p,registerOptions:v,checkedIconColor:w,checkBoxIconStyle:d,checkBoxContainerStyle:s,draggable:C=!1,selectionLimit:S,infoIconContainerStyle:T,onDragStart:u,rowHeight:m=40,initialScrollOffSet:E,onScroll:k}){const j=Ie(),D=c.useRef(null),{control:M}=Kr(),_=n.find(K=>K.groupLabel),R=n.filter(K=>!K.groupLabel),A=[];for(const K of R)if(K.isException||A.push(K.value),S!=null&&A.length===S+1)break;const F=n.filter(K=>K.defaultChecked).map(K=>K.value);return t.jsx(Cd,{control:M,name:e,rules:v,defaultValue:F,render:({field:{value:K,ref:ee,onChange:te}})=>{const Z=B=>{B1({event:B,value:K,allCheckBoxValues:A,groupLabelCheckBox:_,onChange:te})};return t.jsxs(z1,{style:f,windowSize:j,children:[_&&t.jsx(ea,{checkBox:_,index:0,value:K,allCheckBoxValues:A,mode:a,name:e,checkBoxContainerStyle:s,checkBoxIconStyle:d,checkBoxStyle:l,labelCheckBoxStyle:o,labelStyle:x,width:p,draggable:C,groupLabelCheckBox:_,infoIconContainerStyle:T,checkedIconColor:w,isDisabled:i,selectionLimit:S,onDragStart:u,ref:ee,onChangeHandler:Z}),t.jsx(H1,{children:t.jsx(bi,{style:{height:"100%",width:"100%"},children:({height:B,width:O})=>t.jsx(No,{ref:D,height:B,width:O,itemCount:R.length,itemSize:()=>m,estimatedItemSize:m,initialScrollOffset:E??0,onScroll:({scrollOffset:g})=>{k?.(g)},overscanCount:1,itemKey:g=>R[g].value,itemData:{checkBoxes:R,value:K,allCheckBoxValues:A,mode:a,name:e,checkBoxContainerStyle:s,checkBoxIconStyle:d,checkBoxStyle:l,labelCheckBoxStyle:o,labelStyle:x,width:p,draggable:C,groupLabelCheckBox:_,infoIconContainerStyle:T,checkedIconColor:w,isDisabled:i,selectionLimit:S,onDragStart:u,ref:ee,onChange:te,handleChangeEvent:Z,rowHeight:m},children:F1})})})]})}})}const F1=({index:e,style:n,data:a})=>{const i=c.useRef(null),{checkBoxes:f,value:x,allCheckBoxValues:o,mode:l,name:p,checkBoxContainerStyle:v,checkBoxIconStyle:w,checkBoxStyle:d,labelCheckBoxStyle:s,labelStyle:C,width:S,draggable:T,groupLabelCheckBox:u,infoIconContainerStyle:m,checkedIconColor:E,isDisabled:k,selectionLimit:j,onDragStart:D,ref:M,handleChangeEvent:_}=a,R=f[e];return t.jsx(Y1,{style:{...n,width:"100%"},ref:i,children:t.jsx(ea,{checkBox:R,index:e,value:x,allCheckBoxValues:o,mode:l,name:p,checkBoxContainerStyle:v,checkBoxIconStyle:w,checkBoxStyle:d,labelCheckBoxStyle:s,labelStyle:C,width:S,draggable:T,groupLabelCheckBox:u,infoIconContainerStyle:m,checkedIconColor:E,isDisabled:k,selectionLimit:j,onDragStart:D,ref:M,onChangeHandler:_})})},ea=c.forwardRef((e,n)=>{const{value:a,checkBox:i,groupLabelCheckBox:f,allCheckBoxValues:x,selectionLimit:o,mode:l,checkBoxStyle:p,labelCheckBoxStyle:v,isDisabled:w,draggable:d,checkBoxContainerStyle:s,infoIconContainerStyle:C,name:S,index:T,width:u,checkedIconColor:m,checkBoxIconStyle:E,labelStyle:k,onDragStart:j,onChangeHandler:D}=e,M=Ie();let _=a.includes(i.value);const R=Array.from(new Set([...a,i.value]));return f?.value===i.value&&a.length>0&&(_=o!=null?R.length===x.length||R.length===o+1:x.every(A=>R.includes(A)===!0)),t.jsxs(V1,{mode:l,draggable:d===!0,onDragStart:A=>{j?.(A,i.value)},style:s,isDisabled:w,isSelected:_,exceptionMode:i.exceptionMode,children:[i.prefix?t.jsx(U1,{className:"prefix-box",children:i.prefix}):null,i.isException?t.jsx(W1,{style:C,className:"checkbox-alert",children:t.jsx(Se,{style:{padding:`12px ${r.sp3}`},title:i.exceptionInfo??"",placement:"bottom-start",children:i.exceptionType==="info"?t.jsx(K1,{}):t.jsx(G1,{})})}):t.jsx(Hh,{name:`${S}.${i.value}`,checkBoxValue:i.value,value:_,checkedIconColor:m,isDisabled:w||!i.groupLabel&&!_&&o!=null&&R.length===o+1?"disabled":void 0,checkBoxStyle:l==="off"||i.isException?M==="small"?{display:"none",...p}:{visibility:"hidden",...p}:i.groupLabel?x.length===1&&x[0]===f?.value?{visibility:"hidden",...v}:v:p,checkBoxIconStyle:E,ref:A=>{typeof n=="function"?n(A):n&&(n.current=A)},onChange:D}),typeof i.label=="string"&&i.label?t.jsx(Uh,{isDisabled:w,label:i.label,labelStyle:k,htmlFor:`${S}.${i.value}`,style:{display:"flex",flex:1,minHeight:r.sp4,marginLeft:r.sp2,width:u,backgroundColor:"inherit",...k}}):i.label]},`${i.value}_${T}`)});ea.displayName="CheckBoxWithLabel";const B1=({event:e,value:n,allCheckBoxValues:a,groupLabelCheckBox:i,onChange:f})=>{const x=e.currentTarget.value,o=e.currentTarget.checked,l=i?.value,p=new Set(n);if(x===l)return void f(o?Array.from(new Set([l,...a])):[]);o?p.add(x):p.delete(x);const v=a.every(w=>p.has(w));l!=null&&(v&&!p.has(l)?p.add(l):!v&&p.has(l)&&p.delete(l)),f(Array.from(p))},z1=y.div`
770
- display: flex;
771
- flex-direction: column;
772
- width: 100%;
773
- height: 100%;
774
- `,H1=y.div`
775
- flex: 1;
776
- overflow: hidden;
777
- `,U1=y.div`
778
- opacity: 0;
779
- `,V1=y.div`
780
- display: flex;
781
- align-items: center;
782
- flex-direction: row;
783
- width: 100%;
784
- min-height: ${r.sp4};
785
-
786
- ${e=>e.mode==="checked_or_hover"&&ke`
787
- input:not(:checked) ~ .unchecked-icon {
788
- opacity: 0;
789
- }
790
-
791
- :hover {
792
- input:not(:checked) ~ .unchecked-icon,
793
- .prefix-box {
794
- opacity: 1;
795
- }
796
- }
797
- `};
798
-
799
- ${e=>e.mode==="hover_only"&&ke`
800
- input:not(:checked) ~ .unchecked-icon,
801
- input:checked ~ .checked-icon {
802
- opacity: 0;
803
- }
804
-
805
- :hover {
806
- input:not(:checked) ~ .unchecked-icon,
807
- input:checked ~ .checked-icon,
808
- .prefix-box {
809
- opacity: 1;
810
- }
811
- }
812
- `};
813
-
814
- label {
815
- color: ${e=>e.isSelected?e.theme.colors.primary:e.theme.colors.hero};
816
- ${e=>e.isDisabled==="disabled"&&ke`
817
- color: ${e.theme.colors.grey2};
818
- `};
819
- cursor: ${e=>e.isDisabled==="disabled"?"not-allowed":"pointer"};
820
- pointer-events: ${e=>e.isDisabled==="disabled"||e.isDisabled==="readonly"?"none":"initial"};
821
- }
822
-
823
- .checkbox-alert {
824
- opacity: 0;
825
- }
826
-
827
- ${e=>e.exceptionMode==="hover_only"&&ke`
828
- :hover {
829
- .checkbox-alert {
830
- opacity: 1;
831
- }
832
- }
833
- `}
834
-
835
- ${e=>e.exceptionMode==="checked_or_hover"&&ke`
836
- .checkbox-alert {
837
- opacity: 1;
838
- }
839
- `}
840
- `,W1=y.div`
841
- cursor: pointer;
842
- `,K1=y(ud)`
843
- height: ${r.sp3};
844
- width: ${r.sp3};
845
- color: ${e=>e.theme.colors.hero};
846
- background-color: ${e=>e.theme.colors.grey4};
847
- border-radius: 50%;
848
- `,G1=y(Nd)`
849
- height: ${r.sp3};
850
- width: ${r.sp3};
851
- color: ${e=>e.theme.colors.hero};
852
- background-color: ${e=>e.theme.colors.grey4};
853
- border-radius: 50%;
854
- `,Y1=y.div`
855
- width: 100%;
856
- box-sizing: border-box;
857
- `,q1=y.div`
858
- width: 100%;
859
- display: flex;
860
- justify-content: center;
861
- align-items: center;
862
- flex: 1;
863
- background: ${e=>e.theme.colors.grey4};
864
- box-sizing: border-box;
865
- `,J1=y(e=>c.createElement("svg",{viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M178 14L19 65L53 76M178 14L123 123.5L90.5 91M178 14L53 76M178 14L78.5 79M78.5 79L62 104M78.5 79L90.5 91M62 104L90.5 91M62 104L53 76",stroke:"#97C3B9",strokeWidth:2}),c.createElement("path",{opacity:.2,d:"M21 68L180 17L125 126.5L92.5 94L64 107L55 79L21 68Z",fill:"#97C3B9"}),c.createElement("path",{d:"M94.495 135.259C83.8632 135.259 75.2592 143.863 75.2592 154.495C75.2592 143.863 66.6318 135.259 56 135.259C66.6318 135.259 75.2592 126.632 75.2592 116C75.2592 126.632 83.8632 135.259 94.495 135.259Z",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10}),c.createElement("path",{d:"M180.481 94.79C173.445 94.79 167.748 100.506 167.748 107.565C167.748 100.506 162.036 94.79 155 94.79C162.036 94.79 167.748 89.0591 167.748 82C167.748 89.0591 173.445 94.79 180.481 94.79Z",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10,strokeLinejoin:"round"}),c.createElement("path",{d:"M42 35.0047C37.582 35.0047 34.0047 38.582 34.0047 43C34.0047 38.582 30.418 35.0047 26 35.0047C30.418 35.0047 34.0047 31.418 34.0047 27C34.0047 31.418 37.582 35.0047 42 35.0047Z",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10,strokeLinejoin:"round"}),c.createElement("path",{d:"M21.5625 129.486C22.3958 127.153 24.8625 121.586 28.0625 117.986",stroke:"#97C3B9",strokeWidth:2}),c.createElement("path",{d:"M35.5631 109.486C37.3272 107.746 41.5625 103.486 45.7381 101.468",stroke:"#97C3B9",strokeWidth:2}),c.createElement("path",{d:"M19.0623 140.486C18.8956 142.653 18.9623 148.286 20.5623 153.486",stroke:"#97C3B9",strokeWidth:2}),c.createElement("path",{d:"M26.5625 162.986C28.0625 164.82 32.3625 168.886 37.5625 170.486M48.0625 173.986C50.7292 174.32 57.1625 174.986 61.5625 174.986",stroke:"#97C3B9",strokeWidth:2}),c.createElement("path",{d:"M72.0625 175.486H85.5625M96.0625 175.486H110.562M121.062 175.486H135.062",stroke:"#97C3B9",strokeWidth:2}),c.createElement("path",{d:"M145.562 176.486C148.229 176.486 154.662 176.786 159.062 177.986",stroke:"#97C3B9",strokeWidth:2}),c.createElement("path",{d:"M169.562 180.986C172.062 181.653 178.062 183.686 182.062 186.486",stroke:"#97C3B9",strokeWidth:2})))`
866
- width: 90px;
867
- height: 90px;
868
- `,Z1=y(e=>c.createElement("svg",{viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M197 140.889C186.368 140.889 177.764 149.493 177.764 160.124C177.764 149.493 169.137 140.889 158.505 140.889C169.137 140.889 177.764 132.261 177.764 121.629C177.764 132.261 186.368 140.889 197 140.889Z",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10}),c.createElement("path",{d:"M43.2928 47.6752C32.661 47.6752 24.0571 56.2792 24.0571 66.911C24.0571 56.2792 15.4297 47.6752 4.79785 47.6752C15.4297 47.6752 24.0571 39.0479 24.0571 28.416C24.0571 39.0479 32.661 47.6752 43.2928 47.6752Z",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10}),c.createElement("path",{d:"M76.2983 17.0808C70.0153 17.0808 64.9279 22.1681 64.9279 28.4511C64.9279 22.1681 59.8289 17.0808 53.5459 17.0808C59.8289 17.0808 64.9279 11.9817 64.9279 5.69873C64.9279 11.9817 70.0153 17.0808 76.2983 17.0808Z",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10}),c.createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M112.065 93.8122C112.065 93.8122 118.524 67.2385 125.499 46.9477C132.473 26.657 141.968 12.825 147.899 9.73043C153.831 6.63583 162.341 5.32297 166.631 15.9196C170.429 25.2738 166.608 36.3393 166.608 36.3393C166.608 36.3393 163.712 48.7295 148.825 70.462C139.647 83.8603 132.626 93.8122 132.626 93.8122H166.76C169.022 93.8122 170.851 95.6408 170.851 97.9032C170.851 100.166 169.022 101.994 166.76 101.994H142.641L143.093 102.006L153.69 178.914C155.284 185.97 147.688 187.916 147.688 187.916C147.688 187.916 144.195 192.441 105.841 192.687C89.1723 192.793 70.6985 190.038 62.9268 187.74C55.1551 185.443 56.9251 174.319 56.9251 174.319L63.4165 119.209C58.0319 119.224 55.4195 115.095 54.4752 107.023C54.2796 105.351 54.2251 103.546 54.3058 101.643L54.276 102.018V102.006H42.1554C39.8931 102.006 38.0645 100.177 38.0645 97.9149C38.0645 95.6526 39.8931 93.8239 42.1554 93.8239H55.2855C57.1676 84.4084 61.6018 73.8826 68.0493 65.2575H68.061C68.061 65.2575 75.4693 56.3253 84.1319 57.2162C94.2714 58.2712 100.308 62.3504 100.308 62.3504L100.11 63.0914L105.841 93.8122H112.065ZM90.1921 93.8122H90.1837L90.1322 93.9283L90.1921 93.8122Z",fill:"#97C3B9"}),c.createElement("path",{d:"M101.841 90.8122L96.5003 60.5H96.0003C96.0003 60.5 91.4672 78.8323 86.2861 90.5894L101.841 90.8122Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10}),c.createElement("path",{d:"M64.0607 62.2576C64.0607 62.2576 71.469 53.3254 80.1316 54.2163C90.2711 55.2713 96.3079 59.3505 96.3079 59.3505L92.3576 74.1437L86.2856 90.5779C86.2856 90.5779 78.2795 109.415 67.3429 114.162C56.4063 118.91 51.7995 115.346 50.4749 104.023C49.1504 92.6995 54.2963 75.3041 64.049 62.2576H64.0607Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10}),c.createElement("path",{d:"M114.126 90.812L127.595 50.4532C127.595 50.4532 134.511 27.5602 142.587 17.8544C150.745 8.05481 159.502 15.6272 154.707 30.901C150.406 44.6157 133.631 70.4275 121.37 90.812H114.126Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10}),c.createElement("path",{d:"M108.065 90.8122C108.065 90.8122 114.524 64.2385 121.499 43.9477C128.473 23.657 137.968 9.82504 143.9 6.73043C149.831 3.63583 158.341 2.32297 162.631 12.9196C166.429 22.2738 162.608 33.3393 162.608 33.3393C162.608 33.3393 159.712 45.7295 144.826 67.462C135.647 80.8603 128.626 90.8122 128.626 90.8122H108.077H108.065Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10}),c.createElement("path",{d:"M86.1926 90.812H162.761C165.023 90.812 166.852 92.6406 166.852 94.903C166.852 97.1653 165.023 98.994 162.761 98.994H81.9727",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10}),c.createElement("path",{d:"M50.276 99.0057H38.1554C35.8931 99.0057 34.0645 97.1771 34.0645 94.9147C34.0645 92.6524 35.8931 90.8237 38.1554 90.8237H51.4247L50.7683 93.9652L50.4752 96.5089L50.276 99.0174V99.0057Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10}),c.createElement("path",{d:"M59.9937 117.105L52.9253 171.319C52.9253 171.319 51.1553 182.443 58.927 184.74C66.6986 187.038 85.1725 189.793 101.841 189.687C140.195 189.441 143.689 184.916 143.689 184.916C143.689 184.916 151.284 182.97 149.69 175.914L139.094 99.0059H81.9021C81.9021 99.0059 76.0119 113.988 59.9937 117.105Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10}),c.createElement("path",{d:"M60.7893 119.993L60.799 119.476H140.794L140.851 119.765L60.7893 119.993Z",fill:"#231F20",stroke:"#97C3B9",strokeWidth:2})))`
869
- width: 90px;
870
- height: 90px;
871
- `,Q1=y(e=>c.createElement("svg",{width:90,height:90,viewBox:"0 0 90 90",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M72.4185 11.061C72.4185 14.6835 75.357 17.622 78.9795 17.622C80.481 17.649 83.25 17.1 84.717 14.2515H78.912C78.912 14.2515 75.8025 13.9815 75.8025 11.142C75.8025 8.0325 78.912 8.0325 78.912 8.0325H84.798L84.1185 6.984C82.917 5.472 81.063 4.5 78.9795 4.5C75.357 4.5 72.4185 7.4385 72.4185 11.061Z",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10}),c.createElement("path",{d:"M85.4682 8.03232H78.9117C77.1944 8.03232 75.8022 9.42348 75.8022 11.1396C75.8022 12.8557 77.1944 14.2468 78.9117 14.2468H85.4682C87.1856 14.2468 88.5777 12.8557 88.5777 11.1396C88.5777 9.42348 87.1856 8.03232 85.4682 8.03232Z",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10}),c.createElement("path",{d:"M28.4263 14.2469H24.0028C22.2883 14.2469 20.8933 12.8564 20.8933 11.1374C20.8933 9.41842 22.2838 8.02792 24.0028 8.02792H28.2625C28.2625 8.02792 26.5813 10.8629 27.9763 14.2424L28.4263 14.2469Z",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10}),c.createElement("path",{d:"M53.9688 68.3098H15.3093C11.5473 68.3098 8.49634 65.2588 8.49634 61.4968C8.49634 57.7348 11.5473 54.6838 15.3093 54.6838H51.4263",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10}),c.createElement("path",{d:"M65.6235 45.9497L77.8365 18.1982H33.3135L15.7905 54.6572C15.7905 54.6572 37.872 54.6752 51.435 54.6842",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10}),c.createElement("g",{opacity:.2},c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M85.8128 16.0468C84.7317 18.3797 82.3687 19.998 79.6276 19.998L78.7323 20.0077L67.0499 46.8002L65.4818 47.8361C65.6694 47.9711 65.8535 48.1339 66.0367 48.296C66.4128 48.6286 66.7851 48.9578 67.1764 49.0365C67.5728 49.1158 68.0543 48.9552 68.537 48.7942C69.0956 48.6079 69.6559 48.4211 70.0879 48.6045C70.5193 48.7877 70.7584 49.309 70.996 49.8271C71.202 50.2763 71.4068 50.723 71.7349 50.9445C72.0683 51.1703 72.5689 51.1942 73.0687 51.2181C73.6349 51.2452 74.2002 51.2723 74.5204 51.5925C74.8415 51.9136 74.8691 52.4809 74.8968 53.0485C74.9211 53.5469 74.9454 54.0456 75.1684 54.378C75.3909 54.7076 75.8415 54.9157 76.2933 55.1244C76.8101 55.3631 77.3283 55.6025 77.5084 56.025C77.6876 56.4455 77.5053 56.9915 77.3211 57.5433C77.1583 58.0308 76.9941 58.5228 77.0764 58.9365C77.1553 59.3307 77.4857 59.7039 77.8189 60.0802C78.2085 60.5202 78.6019 60.9645 78.6019 61.452C78.6019 61.9403 78.2072 62.3866 77.817 62.8278L77.8169 62.8279C77.4844 63.2039 77.1551 63.5762 77.0764 63.9675C76.9971 64.3639 77.1577 64.8454 77.3187 65.3282C77.505 65.8867 77.6919 66.447 77.5084 66.879C77.3253 67.3104 76.8039 67.5495 76.2859 67.7871C75.8367 67.9931 75.3899 68.1979 75.1684 68.526C74.9454 68.8564 74.9211 69.355 74.8968 69.854C74.8691 70.4221 74.8414 70.9905 74.5204 71.3115C74.1994 71.6326 73.6321 71.6602 73.0645 71.6879C72.5661 71.7122 72.0674 71.7365 71.7349 71.9595C71.4054 72.182 71.1972 72.6326 70.9886 73.0844C70.7504 73.6 70.5116 74.117 70.0909 74.2982L69.9433 86.6701C69.9388 86.9896 69.6013 87.2011 69.3133 87.0616L63.9853 84.5191C63.8593 84.4561 63.7108 84.4606 63.5848 84.5281L59.0443 87.0031C58.7518 87.1606 58.3963 86.9491 58.3963 86.6161V73.2221C58.375 73.1765 58.3539 73.1307 58.3328 73.0849C58.1243 72.6329 57.9162 72.1818 57.5869 71.9595C57.2565 71.7365 56.7579 71.7122 56.2589 71.6879C55.6909 71.6602 55.1224 71.6325 54.8014 71.3115C54.5284 71.0386 54.4676 70.5876 54.4385 70.1098H16.2094C13.4696 70.1098 11.1069 68.4916 10.0252 66.159H5.3595C3.64217 66.159 2.25 64.7678 2.25 63.0517C2.25 61.3356 3.64217 59.9445 5.3595 59.9445H10.2772C11.4475 57.8784 13.6659 56.4838 16.2094 56.4838H16.8914L34.0978 20.2418C32.0553 19.6588 30.3782 18.0406 29.5344 16.0459L29.3264 16.0469H24.9029C23.1884 16.0469 21.7934 14.6564 21.7934 12.9374C21.7934 11.2184 23.1839 9.82792 24.9029 9.82792H29.8292C31.0005 7.76679 33.2164 6.37645 35.7571 6.37645H78.8745C79.1951 6.32719 79.5233 6.30112 79.8574 6.30002L79.8794 6.29999C82.4104 6.29999 84.6067 7.73319 85.701 9.83231H86.3681C88.0855 9.83231 89.4776 11.2235 89.4776 12.9396C89.4776 14.6557 88.0855 16.0468 86.3681 16.0468H85.8128Z",fill:"#97C3B9"})),c.createElement("path",{d:"M64.1251 65.7C67.7288 65.7 70.6501 62.7787 70.6501 59.175C70.6501 55.5713 67.7288 52.65 64.1251 52.65C60.5214 52.65 57.6001 55.5713 57.6001 59.175C57.6001 62.7787 60.5214 65.7 64.1251 65.7Z",stroke:"#EEBA7D",strokeWidth:.9,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M61.2 59.4484L63.4903 61.65L67.5 56.7",stroke:"#EEBA7D",strokeWidth:.9,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M33.6736 27.0088H66.7216",stroke:"#EEBA7D",strokeWidth:.9,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M30.2854 35.8198H63.3334",stroke:"#EEBA7D",strokeWidth:.9,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M26.8962 43.875H59.9442",stroke:"#EEBA7D",strokeWidth:.9,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M50.27 59.202C50.27 58.2975 51.6245 57.537 51.7955 56.6865C51.971 55.8045 51.0215 54.5805 51.3635 53.775C51.7055 52.9695 53.2265 52.8345 53.7035 52.128C54.1805 51.4215 53.7485 49.9455 54.3515 49.3425C54.9545 48.7395 56.426 49.1715 57.137 48.6945C57.848 48.2175 57.992 46.692 58.784 46.3545C59.576 46.017 60.8135 46.962 61.6955 46.7865C62.5505 46.6155 63.3065 45.261 64.211 45.261C65.1155 45.261 65.876 46.6155 66.7265 46.7865C67.5815 46.9575 68.8325 46.0125 69.638 46.3545C70.4435 46.6965 70.5785 48.2175 71.285 48.6945C71.996 49.176 73.4675 48.7395 74.0705 49.3425C74.6735 49.9455 74.2415 51.417 74.7185 52.128C75.1955 52.8345 76.721 52.983 77.0585 53.775C77.396 54.567 76.451 55.8045 76.6265 56.6865C76.7975 57.5415 78.152 58.2975 78.152 59.202C78.152 60.1065 76.7975 60.867 76.6265 61.7175C76.4555 62.5725 77.4005 63.8235 77.0585 64.629C76.7165 65.4345 75.1955 65.5695 74.7185 66.276C74.2415 66.9825 74.6735 68.4585 74.0705 69.0615C73.4675 69.6645 71.996 69.2325 71.285 69.7095C70.5785 70.1865 70.43 71.712 69.638 72.0495C68.846 72.387 67.6085 71.442 66.7265 71.6175C65.8715 71.7885 65.1155 73.143 64.211 73.143C63.3065 73.143 62.546 71.7885 61.6955 71.6175C60.845 71.4465 59.5895 72.3915 58.784 72.0495C57.992 71.7165 57.8435 70.1865 57.137 69.7095C56.4305 69.2325 54.9545 69.6645 54.3515 69.0615C53.7485 68.4585 54.1805 66.987 53.7035 66.276C53.2265 65.565 51.701 65.421 51.3635 64.629C51.026 63.837 51.971 62.5995 51.7955 61.7175C51.6245 60.8625 50.27 60.1065 50.27 59.202Z",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10}),c.createElement("path",{d:"M57.9463 70.5151V84.8161C57.9463 85.1491 58.3018 85.3606 58.5943 85.2031L63.1348 82.7281C63.2608 82.6606 63.4093 82.6561 63.5353 82.7191L68.8633 85.2616C69.1513 85.4011 69.4888 85.1896 69.4933 84.8701L69.6463 72.0496",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10}),c.createElement("path",{d:"M78.228 18.1215C78.1965 18.1215 78.165 18.1215 78.138 18.1215H34.263C30.501 18.1215 27.45 15.0705 27.45 11.3085C27.45 7.5465 30.501 4.5 34.263 4.5C34.263 4.5 78.138 4.5 78.147 4.5",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10}),c.createElement("path",{d:"M9.38255 64.2645H4.90955C3.19505 64.2645 1.80005 62.874 1.80005 61.155C1.80005 59.436 3.19055 58.05 4.90955 58.05H9.22955",stroke:"#97C3B9",strokeWidth:.9,strokeMiterlimit:10})))`
872
- width: 90px;
873
- height: 90px;
874
- `,X1=y(e=>c.createElement("svg",{viewBox:"0 0 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{opacity:.2,fillRule:"evenodd",clipRule:"evenodd",d:"M8.54492 149.483C8.54492 149.483 31.4705 136.963 39.2741 116.167C39.2741 116.167 43.7687 99.3912 46.3662 81.1928C46.3662 81.1928 47.0668 72.2067 47.5519 68.9204C48.0369 65.6341 50.5483 62.1431 53.2644 62.2401C55.9806 62.3371 57.0368 66.1082 57.4249 68.1446C57.5326 68.7102 57.386 69.962 57.118 71.4755C58.1719 66.7819 59.2474 61.7944 59.4512 60.1175C59.947 56.0339 60.8093 51.2176 63.9027 48.6963C66.9961 46.175 69.2272 45.7979 71.1673 45.8841C71.1673 45.8841 73.3014 40.4644 78.3349 40.2705C78.3349 40.2705 81.5253 39.8826 83.5624 42.4039C83.5624 42.4039 87.6259 40.0766 90.9241 43.7615C94.2222 47.4464 95.0845 52.0903 95.4725 60.5054C95.564 62.4897 95.58 64.8514 95.551 67.3023C96.4299 61.724 98.2955 55.6981 100.161 53.3186C104.86 47.3064 108.396 48.8579 108.396 48.8579C108.396 48.8579 110.573 43.309 114.744 42.8133C118.915 42.3177 118.139 46.2289 118.139 46.2289C120.683 43.9016 123.475 44.5049 123.475 44.5049C126.676 45.2053 128.336 47.5757 126.751 56.2063C125.167 64.8368 127.549 69.7931 127.549 69.7931C135.094 63.9425 137.605 69.1898 138.166 72.3683C138.279 72.9998 138.264 73.8438 138.243 75.1149C138.199 77.7258 138.125 82.1383 139.06 90.2112C140.451 102.214 143.124 105.878 143.124 105.878C144.783 108.353 146.57 110.433 148.29 112.148C148.295 112.041 148.297 111.933 148.297 111.825C148.297 111.825 151.897 107.612 156.898 109.994C159.836 111.392 164.068 115.762 168.352 120.184C171.36 123.29 174.394 126.422 177.022 128.569C177.304 128.8 177.579 129.024 177.849 129.244C183.67 133.994 186.768 136.522 193.804 145.151C193.804 145.151 195.959 147.5 198.805 149.666L162.051 191.569C162.051 191.569 141.316 174.666 118.316 149.666C118.316 149.666 121.603 148.5 125.547 145.509C121.267 140.784 115.527 134.794 110.767 131.047C102.326 124.402 99.325 120.466 99.0785 120.134C96.0268 123.958 90.4968 130.202 83.1636 135.627C83.1636 135.627 74.9289 143.955 68.4511 154.795C61.9733 165.634 50.4405 176.376 44.0489 179.577L8.54492 149.483ZM90.439 96.2235C90.4595 96.2104 90.4799 96.1972 90.5001 96.1839L90.5273 96.1764C90.4685 96.2087 90.439 96.2235 90.439 96.2235Z",fill:"#97C3B9"}),c.createElement("path",{d:"M4.5459 145.483C4.5459 145.483 27.4715 132.963 35.2751 112.168C35.2751 112.168 39.7696 95.3917 42.3672 77.1933C42.3672 77.1933 43.0678 68.2072 43.5528 64.9209C44.0379 61.6346 46.5492 58.1436 49.2654 58.2406C51.9815 58.3376 53.0378 62.1087 53.4258 64.1451C53.8139 66.1815 50.9037 77.1179 50.9037 77.1179C50.9037 77.1179 55.0318 59.5766 55.4522 56.118C55.948 52.0344 56.8102 47.2181 59.9036 44.6968C62.997 42.1755 65.2282 41.7984 67.1683 41.8846C67.1683 41.8846 69.3024 36.4649 74.3359 36.271C74.3359 36.271 77.5263 35.8831 79.5634 38.4044C79.5634 38.4044 83.6269 36.077 86.925 39.762C90.2232 43.4469 91.0855 48.0908 91.4735 56.5059C91.8615 64.9209 90.8915 80.124 90.8915 80.124C90.8915 80.124 90.6975 89.5087 86.44 92.224C86.44 92.224 90.1154 90.3815 97.186 82.8392C104.257 75.2969 105.895 75.674 108.805 76.0619C111.715 76.4498 114.13 79.5422 111.996 87.774C109.861 96.0059 97.7573 112.556 97.7573 112.556C97.7573 112.556 90.6867 123.104 79.1646 131.627C79.1646 131.627 70.9299 139.956 64.4521 150.795C57.9743 161.635 46.4414 172.377 40.0499 175.577",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M60.0654 79.2617C60.0654 79.2617 64.1073 66.1812 64.4738 59.4471C64.8403 52.7129 65.5516 44.5133 67.1684 41.8735",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M71.1992 80.8566C71.1992 80.8566 75.1118 73.8854 75.974 61.419C76.8363 48.9527 76.5237 45.6557 76.8255 43.0805C77.3106 38.9215 79.5632 38.4043 79.5632 38.4043",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M44.8614 135.143C51.6486 134.887 56.9589 129.594 56.7222 123.32C56.4855 117.047 50.7915 112.168 44.0042 112.424C37.217 112.68 31.9067 117.973 32.1434 124.247C32.3801 130.52 38.0742 135.399 44.8614 135.143Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M44.9719 137.801C53.0975 137.495 59.4577 131.23 59.1777 123.809C58.8977 116.388 52.0836 110.62 43.9579 110.927C35.8323 111.233 29.4721 117.498 29.7521 124.919C30.0321 132.34 36.8462 138.108 44.9719 137.801Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M39.6943 121.046L43.4452 127.026L48.7266 119.117",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M30.2517 119.117L24.2589 125.614C24.2589 125.614 24.1619 129.676 30.2517 129.773C30.2517 129.773 28.3223 124.602 30.2517 119.117Z",fill:"#97C3B9"}),c.createElement("path",{d:"M55.0212 114.14C55.0212 114.14 57.3385 114.959 60.9062 119.516C60.9062 119.516 71.1564 121.854 77.5588 135.15C77.5588 135.15 71.7708 145.914 67.6103 148.242C67.6103 148.242 57.3601 139.309 52.8871 138.9C52.8871 138.9 49.0284 143.264 40.5997 141.335C32.171 139.406 29.2285 129.763 29.2285 129.763H30.2417C30.2417 129.763 37.3877 141.292 50.214 136.691C50.214 136.691 57.6619 134.03 58.869 127.015C60.0762 120.001 56.6487 116.144 55.0104 114.129L55.0212 114.14Z",fill:"#97C3B9"}),c.createElement("path",{d:"M68.9787 127.92C68.9787 127.92 68.4613 132.844 63.1152 136.885",stroke:"#FAFAFA",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M72.7079 132.402C72.7079 132.402 71.824 135.29 70.1318 136.087",stroke:"#FAFAFA",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M152.91 114.667C152.91 114.667 145.171 110.896 139.124 101.878C139.124 101.878 136.451 98.2143 135.061 86.2113C133.67 74.2083 134.511 70.2971 134.166 68.3684C133.606 65.1899 131.094 59.9426 123.549 65.7933C123.549 65.7933 121.167 60.8369 122.752 52.2064C124.336 43.5759 122.676 41.2054 119.475 40.5051C119.475 40.5051 116.684 39.9017 114.14 42.229C114.14 42.229 114.916 38.3178 110.745 38.8134C106.573 39.3091 104.396 44.858 104.396 44.858C104.396 44.858 100.861 43.3065 96.1616 49.3188C94.2861 51.7107 92.4107 57.7877 91.5377 63.3905L91.1389 75.3935C91.1389 75.3935 91.5592 88.1939 86.4287 92.2021C86.4287 92.2021 91.958 88.6787 99.0717 80.8455C106.185 73.0123 111.025 75.8892 112.372 79.2509C113.72 82.6126 113.536 88.2154 106.94 98.5268C100.344 108.838 95.0622 116.111 95.0622 116.111C95.0622 116.111 97.94 120.098 106.768 127.047C115.595 133.997 127.796 148.661 127.796 148.661C127.796 148.661 143.867 134.676 152.888 114.657L152.91 114.667Z",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M111.058 108.612C111.058 108.612 111.252 98.1068 115.919 91.4588C115.919 91.4588 118.236 87.2028 118.204 79.8545C118.161 70.4051 123.561 65.772 123.561 65.772",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M114.151 42.2183C114.151 42.2183 110.216 45.2352 108.772 52.9822C106.724 63.9939 107.382 72.8184 107.382 72.8184",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M99.3845 78.1522C99.3845 78.1522 98.8671 67.7546 99.8695 59.0271C100.872 50.2996 104.407 44.8584 104.407 44.8584",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M92.4217 79.1864C92.4217 79.1864 91.3223 63.8002 92.1953 59.6304",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M152.91 114.667C156.09 108.332 150.075 108.623 150.075 108.623",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M118.16 137.833C118.16 137.833 109.699 149.319 119.68 151.194C119.68 151.194 125.856 150.493 127.818 148.672L118.16 137.833Z",fill:"#97C3B9"}),c.createElement("path",{d:"M158.051 187.569C158.051 187.569 139.65 173 116.65 148C116.65 148 124.15 160 140.978 134.256C140.978 134.256 152.263 119.236 152.511 114.01C152.511 114.01 147.284 111.36 144.298 107.826C144.298 107.826 147.898 103.613 152.899 105.994C157.9 108.375 166.652 119.365 173.022 124.569C179.392 129.774 182.443 132.122 189.804 141.152C189.804 141.152 191.96 143.501 194.805 145.666",stroke:"#97C3B9",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M160.746 81.6538C160.746 81.6538 182.443 82.699 184.868 83.3885",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M145.99 53.8984L169.25 44.8584",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M122.041 30.474L139.922 14.1719",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M82.4735 30.474C82.4735 30.474 75.3597 15.9066 62.167 9.48486",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M40.9985 49.3833C40.9985 49.3833 33.3674 39.3305 23.1172 37.0786",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"}),c.createElement("path",{d:"M28.3231 74.5425C28.3231 74.5425 8.71728 83.2269 1.59277 93.7214",stroke:"#EEBA7D",strokeWidth:2,strokeMiterlimit:10,strokeLinecap:"round"})))`
875
- width: 90px;
876
- height: 90px;
877
- `,ef=y.div`
878
- display: flex;
879
- align-items: center;
880
- justify-content: center;
881
- flex-direction: column;
882
- `,tf=y(Ur)`
883
- margin-top: ${r.sp2};
884
- color: ${e=>e.theme.colors.brandColorJade};
885
- `,nf=y(Hr)`
886
- color: ${e=>e.theme.colors.primary};
887
- `,of=e=>{const{tab:n}=e;switch(n){case"transaction_categorization":return t.jsx(J1,{});case"je_schedules":case"reconciliation":return t.jsx(X1,{});case"flux_analysis":return t.jsx(Q1,{});default:return t.jsx(Z1,{})}};function zt(e){const{title:n,subTitle:a}=e;return t.jsx(q1,{children:t.jsxs(ef,{children:[t.jsx(of,{...e}),t.jsx(tf,{children:n}),t.jsx(nf,{children:a})]})})}const{common:{headers:{transactions:rf,jeSchedules:af,fluxAnalysis:sf,missingReceipts:lf,insights:cf,reconciliation:Dl},strings:{empty:En}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:{missing:df,unmatched:uf,completed:hf}}},expenseAutomation:{transactions:{tabs:Ol,subTitles:{review:{item1:Zi,item2:Qi},autoCategorized:{item1:Xi,item2:pf}},searchPlaceholder:gf,allDoneText:mf},jeSchedules:{subTitles:{item1:ff,item2:xf},searchPlaceholder:yf,allDoneText:Cf},missingReceipts:{subTitles:bf,searchPlaceholder:wf,allDoneText:Yo},fluxAnalysis:{subTitles:{item1:vf,item2:Sf},searchPlaceholder:kf,emptyPageTexts:{youDidIt:$f,allReviewed:Ef}},accountRecon:{review:{allDoneText:Ml},reconcile:{allDoneText:Tf},tabs:Pl,titles:{item1:jf,item2:Nf},subTitles:{review:{item1:_f,item2:eo},reconcile:{item1:to,item2:Rf}}}}}=$e.getLocalizedStrings(),et=(e,n,a,i,f,x)=>{switch(e){case"transaction_categorization":return{key:"transaction_categorization",title:rf,subTitle:[],tabs:[{label:Ol.review,id:"review",subTitle:[{pre:Zi.pre,bold:Zi.bold,prefixIconName:Zi.prefixIconName,post:Zi.post},{pre:Qi.pre,bold:Qi.bold,prefixIconName:Qi.prefixIconName,post:Qi.post}]},{label:Ol.autoCategorized,id:"autoCategorized",subTitle:[{pre:Xi.pre,bold:Xi.bold,prefixIconName:Xi.prefixIconName,post:Xi.post.replace("#number",n!=null&&n!=0?n.toString():"")},pf]}],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:gf,allDoneText:mf};case"je_schedules":return{key:"je_schedules",title:af,subTitle:[ff,xf],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:yf,allDoneText:Cf};case"missing_receipts":{const o=x?.includeBulkUploadTabs!==!1;return{key:"missing_receipts",title:x?.navTitle??lf,subTitle:[bf],tabs:o?[{label:df,id:"missing",subTitle:[],allDoneText:Yo},{label:uf,id:"unmatched",subTitle:[]},{label:hf,id:"completed",subTitle:[],allDoneText:Yo}]:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:wf,allDoneText:Yo}}case"flux_analysis":return{key:"flux_analysis",title:sf,subTitle:[vf,Sf],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:kf,allDoneText:{title:$f,subTitle:Ef}};case"month_end_insights":return{key:"month_end_insights",title:cf,subTitle:[],tabs:[],rightSection:["comment","refresh","close"],leftSection:[],searchPlaceholder:En,allDoneText:{title:En,subTitle:En}};case"reconciliation":return a==null?{key:"reconciliation",title:Dl,subTitle:[jf,Nf],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:En,allDoneText:{title:En,subTitle:En}}:{key:"reconciliation",title:i??Dl,subText:f??void 0,subTitle:[],tabs:[{label:Pl.review,id:"review",subTitle:[_f,{pre:eo.pre,bold:eo.bold,prefixIconName:eo.prefixIconName,post:eo.post}],allDoneText:Ml},{label:Pl.reconcile,id:"reconcile",subTitle:[{pre:to.pre,bold:to.bold,prefixIconName:to.prefixIconName,post:to.post},Rf],allDoneText:Tf}],rightSection:["refresh"],leftSection:["back"],searchPlaceholder:En,allDoneText:Ml}}},{common:{strings:{empty:If}},expenseAutomation:{accountRecon:{reconcile:{header:gn}}}}=$e.getLocalizedStrings(),qe=[{key:"date",value:gn.date,sortOrder:"ascending",width:new pe(12.75,12.75,12.75),customStyle:{marginLeft:W[4],marginRight:W[3]}},{key:"clearedDate",value:gn.clearedDate,sortOrder:"ascending",width:new pe(12.75,12.75,12.75),customStyle:{marginRight:W[3],display:"none"}},{key:"type",value:gn.type,sortOrder:"ascending",width:new pe(12.75,12.75,12.75),customStyle:{marginRight:W[3]}},{key:"payee",value:gn.payee,sortOrder:"ascending",width:new pe(12.75,12.75,12.75),customStyle:{marginRight:W[3]}},{key:"account",value:gn.account,sortOrder:"ascending",width:new pe(12.75,12.75,12.75),customStyle:{marginRight:W[3]}},{key:"transactionDirection",value:gn.direction,sortOrder:"ascending",width:new pe(12.75,12.75,12.75),customStyle:{marginRight:W[3]}},{key:"memo",value:gn.memo,sortOrder:"ascending",width:new pe(12.75,12.75,12.75),customStyle:{marginRight:W[3]}},{key:"amount",value:gn.amount,sortOrder:"ascending",width:new pe(12.75,12.75,12.75),customStyle:{marginRight:W[3]}},{key:"recommended",value:If,sortOrder:"ascending",width:new pe(1.25,1.25,1.25),customStyle:{marginRight:W[4],marginLeft:W[0]}}],qo="date",Fl="descending",Af=Rd.memo(function({sortConfig:e,onReconTabColumnSortConfigChanged:n}){const a=Ie(),[i,f]=c.useState(jr(qe));c.useEffect(()=>{const o=[...i];for(const l of o)l.key===e.sortKey?l.sortOrder=e.sortOrder:l.sortOrder="ascending";f(o)},[e.sortKey,e.sortOrder]);const x=o=>{((l,p)=>{let v=p;e.sortKey===l&&(v=p==="ascending"?"descending":"ascending"),n(l,v)})(o.key,o.sortOrder)};return t.jsx(Of,{headerHeight:50,children:i.map(o=>t.jsx(Lf,{columnWidth:o.width,windowSize:a,sortDataValue:e.sortKey,actualDataValue:o.key,style:o.customStyle,children:t.jsxs(zf,{isVisible:o.key!=="recommended",children:[t.jsx(Df,{"data-testid":ae("reconcile-tab-list-sort",o.value),onClick:()=>x(o),children:t.jsx(at,{children:o.value})}),t.jsx(Mf,{sortConfig:e,headerData:o,children:t.jsx(Pf,{})}),t.jsx(Ff,{isVisible:e.sortKey===o.key&&(e.sortKey!==qo||e.sortOrder!==Fl),children:t.jsx(Bf,{"data-testid":ae("reconcile-tab-list-reset-sort",qo),onClick:()=>n(qo,Fl)})})]})},o.key))})}),Lf=y.div`
888
- color: ${e=>e.sortDataValue===e.actualDataValue?e.theme.colors.primary:e.theme.colors.grey1};
889
- :hover {
890
- color: ${e=>e.theme.colors.primary};
891
- }
892
- width: ${e=>e.columnWidth.valuePercentage(e.windowSize)};
893
- display: flex;
894
- align-items: center;
895
- height: 100%;
896
- justify-content: flex-start;
897
- gap: 6px;
898
- z-index: auto;
899
- position: relative;
900
- `,Df=y.div`
901
- display: flex;
902
- gap: 5px;
903
- cursor: pointer;
904
- `,Of=y(nt)`
905
- width: fit-content;
906
- height: ${e=>`${e.headerHeight}px`};
907
- width: calc(100% - 20px);
908
- z-index: 6;
909
- display: flex;
910
- align-items: center;
911
- background-color: ${e=>e.theme.colors.grey4};
912
- box-sizing: border-box;
913
- padding: ${r.sp3} ${r.sp8} ${r.sp3} ${r.sp0};
914
- position: sticky;
915
- color: ${e=>e.theme.colors.grey1};
916
- `,Mf=y.div`
917
- display: flex;
918
- align-items: center;
919
- transform: ${e=>e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
920
- ${e=>e.headerData.sortOrder==="ascending"?"padding-top: 2px":"padding-bottom: 2px"};
921
- `,Pf=y($i)`
922
- width: ${r.sp2};
923
- height: ${r.sp2};
924
- `,Ff=y.div`
925
- display: ${e=>e.isVisible?"flex":"none"};
926
- align-items: center;
927
- padding-top: 2px;
928
- cursor: pointer;
929
- color: ${e=>e.theme.colors.grey1};
930
- &:hover {
931
- color: ${e=>e.theme.colors.primary};
932
- }
933
- `,Bf=y(Ei)`
934
- width: 12px;
935
- height: 12px;
936
- `,zf=y.div`
937
- display: ${e=>e.isVisible?"flex":"none"};
938
- `,{common:{strings:{hyphen:Jo}}}=$e.getLocalizedStrings(),{dateFormat:Bl}=$e.getLocalizedStrings();function Hf({selectedTransactionIds:e,transaction:n,transactionId:a}){const i=Ie(),f=St(),[x,o]=c.useState(!1),l=e.includes(a),p=x||l;return t.jsx(Uf,{id:a,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:t.jsxs(Vf,{isSelected:p,totalHeight:54,children:[t.jsx(tn,{windowSize:i,responsiveWidth:qe[0].width,style:qe[0].customStyle,children:t.jsx(Tn,{isSelected:p,children:n.date.format(Bl.visual.MMMDCommaYYYYformat)})}),qe[1].customStyle.display!=="none"?t.jsx(tn,{windowSize:i,responsiveWidth:qe[1].width,style:qe[1].customStyle,children:t.jsx(Tn,{isSelected:p,children:n.clearedDate!=null?n.clearedDate.format(Bl.visual.MMMDCommaYYYYformat):t.jsx("span",{children:Jo})})}):null,t.jsx(tn,{windowSize:i,style:qe[2].customStyle,responsiveWidth:qe[2].width,children:t.jsx(Gf,{isSelected:p,children:t.jsx(Wf,{isSelected:p,children:Bh(n.type)})})}),t.jsx(tn,{windowSize:i,style:qe[3].customStyle,responsiveWidth:qe[3].width,children:n.merchantName!=null&&n.merchantName.length>0?t.jsx(tt,{text:n.merchantName,itemTextStyle:{color:p?f.colors.primary:f.colors.hero}}):t.jsx(Tn,{isSelected:p,children:t.jsx("span",{children:Jo})})}),t.jsx(tn,{windowSize:i,style:qe[4].customStyle,responsiveWidth:qe[4].width,children:n.accountName!=null&&n.accountName.length>0?t.jsx(tt,{text:n.accountName,itemTextStyle:{color:p?f.colors.primary:f.colors.hero}}):t.jsx(Tn,{isSelected:p,children:t.jsx("span",{children:Jo})})}),t.jsx(tn,{windowSize:i,style:qe[5].customStyle,responsiveWidth:qe[5].width,children:t.jsx(Tn,{isSelected:p,style:{textTransform:"capitalize"},children:n.transactionDirection})}),t.jsx(tn,{windowSize:i,style:qe[6].customStyle,responsiveWidth:qe[6].width,children:t.jsx(tt,{text:n.memo,itemTextStyle:{color:p?f.colors.primary:f.colors.hero}})}),t.jsx(tn,{windowSize:i,style:qe[7].customStyle,responsiveWidth:qe[7].width,children:t.jsx(Tn,{isSelected:p,children:ht("0,0.[00]",n.amount)})}),t.jsx(tn,{windowSize:i,responsiveWidth:qe[8].width,style:qe[8].customStyle,children:t.jsx(Tn,{isSelected:p,children:n.isZeniRecommended?t.jsx(Kf,{}):null})})]})})}const Uf=y.div`
939
- box-sizing: border-box;
940
- width: 100%;
941
- display: flex;
942
- padding-right: ${r.sp8};
943
- `,Vf=y.div`
944
- cursor: pointer;
945
- display: flex;
946
- border-radius: ${r.sp2};
947
- width: 100%;
948
- align-items: center;
949
- height: ${e=>`${e.totalHeight}px`};
950
- background-color: ${e=>e.theme.colors.grey5};
951
- border: ${e=>`1px solid ${e.theme.colors.grey3}`};
952
- border-color: ${e=>e.isSelected===!0?e.theme.colors.primary:"none"};
953
- box-shadow: ${e=>`${r.sp0} 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
954
- :hover {
955
- border: ${e=>`1px solid ${e.theme.colors.primary}`};
956
- }
957
- `,tn=y.div`
958
- width: ${e=>e.responsiveWidth.valuePercentage(e.windowSize)};
959
- display: flex;
960
- align-items: center;
961
- justify-content: flex-start;
962
- height: 100%;
963
- z-index: auto;
964
- position: relative;
965
- `,Tn=y(Me)`
966
- color: ${e=>e.isSelected===!0?e.theme.colors.primary:e.theme.colors.hero};
967
- span {
968
- padding-left: ${r.sp3};
969
- }
970
- `,Wf=y(at)`
971
- text-transform: capitalize;
972
- color: ${e=>e.isSelected===!0?e.theme.colors.primary:e.theme.colors.hero};
973
- `,Kf=y(Sn)`
974
- width: ${r.sp3};
975
- height: ${r.sp3};
976
- margin-right: ${r.sp1};
977
- path {
978
- stroke-width: 2;
979
- }
980
- `,Gf=y.div`
981
- padding: 1px 6px;
982
- border-radius: ${r.sp1};
983
- border: ${e=>`1px solid ${e.isSelected?e.theme.colors.primary:e.theme.colors.hero}`};
984
- `,Yf=$e.getLocalizedStrings(),{common:{all:zl,strings:{empty:Hl}}}=Yf,Ul="selectedTransactionIds",qf=e=>`${e}_form`;function Jf({currentFooterFormId:e,localData:n,matchedTransactions:a,sortConfig:i,onSaveReconciliation:f,selectedAccountId:x,onReconTabColumnSortConfigChanged:o,onUpdateReconcileTabLocalData:l,setCurrentFooterFormId:p}){const v=Fn({mode:"all",defaultValues:{selectedTransactionIds:n.selectedTransactionIds},values:{selectedTransactionIds:n.selectedTransactionIds}}),w=[{label:t.jsx(Af,{onReconTabColumnSortConfigChanged:o,sortConfig:i}),value:zl.toLocaleLowerCase(),defaultChecked:!1,groupLabel:!0},...a.map(s=>({label:t.jsx(Hf,{transaction:s,selectedTransactionIds:n.selectedTransactionIds,transactionId:s.id}),value:s.id,defaultChecked:!1,groupLabel:!1}))];c.useEffect(()=>{const s=v.watch(C=>{C!=null&&Si(()=>(async S=>{const T=S[Ul].filter(u=>u!=zl.toLocaleLowerCase());l(T)})(C))});return()=>{s.unsubscribe()}}),c.useEffect(()=>(e!=="expenseAutomationBankReconReconcilePage"&&p("expenseAutomationBankReconReconcilePage"),()=>{p("expenseAutomationPage")}),[]);const d=c.useCallback(()=>{f({reconcileAction:"reconcile"})},[f]);if(a.length===0){const s=et("reconciliation",void 0,x).tabs.find(C=>C.id==="reconcile")?.allDoneText;return t.jsx(e0,{children:t.jsx(zt,{tab:"missing_receipts",title:s?.title??Hl,subTitle:s?.subTitle??Hl})})}return t.jsx(Zf,{children:t.jsx(Bn,{...v,children:t.jsx(Qf,{onSubmit:v.handleSubmit(d),id:qf("expenseAutomationBankReconReconcilePage"),children:t.jsx(Xf,{children:t.jsx(P1,{name:Ul,checkBoxes:w,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:20},rowHeight:72,mode:n.selectedTransactionIds.length>0?"always_on":"checked_or_hover",checkBoxContainerStyle:{boxSizing:"border-box"}})})})})})}const Zf=y.div``,Qf=y.form``,Xf=y.div`
985
- height: calc(100vh - 350px);
986
- `,e0=y.div`
987
- height: 100%;
988
- display: flex;
989
- justify-content: center;
990
- align-items: center;
991
- `,rn=187,On=136,Yt=240,Mn=146,qd=y.div`
992
- display: flex;
993
- flex-direction: column;
994
- background-color: ${e=>e.theme.colors.grey4};
995
- width: 100%;
996
- min-height: 100%;
997
- height: calc(100vh - 500px);
998
- overflow-x: scroll;
999
- align-items: center;
1000
- `,Jd=y.div`
1001
- display: flex;
1002
- flex-direction: column;
1003
- gap: ${r.sp5};
1004
- align-items: flex-start;
1005
- padding-bottom: ${r.sp9};
1006
- width: 100%;
1007
- `,Zd=y.div`
1008
- width: 100%;
1009
- `,Qd=y.div`
1010
- width: 100%;
1011
- `,ta=y.div`
1012
- display: flex;
1013
- flex-direction: row;
1014
- padding: ${r.sp2};
1015
- padding-right: ${r.sp3};
1016
- justify-content: space-between;
1017
- border-bottom: ${e=>`1px solid ${e.theme.colors.grey3}`};
1018
- `,na=y.div`
1019
- display: flex;
1020
- flex-direction: row;
1021
- justify-content: space-between;
1022
- padding: ${r.sp2};
1023
- padding-right: ${r.sp3};
1024
- `,t0=y.div`
1025
- border-top: ${e=>`1px solid ${e.theme.colors.grey3}`};
1026
- display: flex;
1027
- flex-direction: row;
1028
- justify-content: space-between;
1029
- padding: ${r.sp2};
1030
- padding-right: ${r.sp3};
1031
- `,n0=y.div`
1032
- padding: ${r.sp2} ${r.sp3};
1033
- `,ia=y.div`
1034
- display: flex;
1035
- `,i0=y.div`
1036
- display: flex;
1037
- align-items: center;
1038
- justify-content: center;
1039
- gap: ${r.sp1};
1040
- padding: ${r.sp2} ${r.sp0};
1041
- background-color: ${e=>e.theme.colors.grey3};
1042
- border-bottom-left-radius: ${r.sp2};
1043
- border-bottom-right-radius: ${r.sp2};
1044
- `,oa=y.div`
1045
- display: flex;
1046
- flex-direction: column;
1047
- border: ${e=>`1px solid ${e.theme.colors.grey3}`};
1048
- border-radius: ${r.sp2};
1049
- background-color: ${e=>e.theme.colors.grey5};
1050
- box-shadow: ${e=>e.theme.colors.elevation1};
1051
- cursor: pointer;
1052
- border: ${e=>`1px solid ${e.showBorder===!0?e.theme.colors.primary:e.theme.colors.grey3}`};
1053
- .highlight {
1054
- color: ${e=>e.showBorder===!0?e.theme.colors.primary:e.theme.colors.hero};
1055
- }
1056
- :hover {
1057
- border: ${e=>`1px solid ${e.theme.colors.primary}`};
1058
- }
1059
- :hover .highlight {
1060
- color: ${e=>e.theme.colors.primary};
1061
- }
1062
- `,we=y.div`
1063
- display: flex;
1064
- flex-direction: column;
1065
- width: 180px;
1066
- padding: ${r.sp2};
1067
- .hover-background {
1068
- border-radius: ${r.sp1};
1069
- background-color: ${e=>e.forceHoverEffect===!0?e.theme.colors.background:"unset"};
1070
- .select-control {
1071
- background-color: ${e=>e.forceHoverEffect===!0?e.theme.colors.background:"unset"};
1072
- }
1073
- :hover {
1074
- background-color: ${e=>`${e.showHoverEffect===!0?e.theme.colors.background:"unset"}`};
1075
- .select-control {
1076
- background-color: ${e=>e.theme.colors.background};
1077
- }
1078
- }
1079
- :focus-within {
1080
- background-color: ${e=>`${e.showHoverEffect===!0?e.theme.colors.background:"unset"}`};
1081
- .select-control {
1082
- background-color: ${e=>e.theme.colors.background};
1083
- }
1084
- }
1085
- }
1086
- .item-value-container {
1087
- .grouped-single-select-field__menu {
1088
- margin-top: ${r.sp2};
1089
- }
1090
- }
1091
- `,Kt=y.div`
1092
- padding: ${r.sp2} ${r.sp3};
1093
- `,je=y(at)`
1094
- color: ${e=>e.theme.colors.hero};
1095
- `,Ae=y(Me)`
1096
- width: 100%;
1097
- color: ${e=>e.theme.colors.hero};
1098
- white-space: nowrap;
1099
- overflow: hidden;
1100
- text-overflow: ellipsis;
1101
- `,_e=y.div`
1102
- display: flex;
1103
- gap: ${r.sp1};
1104
- color: ${e=>e.theme.colors.primary};
1105
- .select-value-container {
1106
- .auto-complete-single-select-field__input-container {
1107
- .auto-complete-single-select-field__input {
1108
- text-align: left;
1109
- }
1110
- }
1111
- .grouped-single-select-field__input-container {
1112
- .grouped-single-select-field__input {
1113
- text-align: left;
1114
- }
1115
- }
1116
- }
1117
- `,ra=y.div`
1118
- border-left: ${e=>`1px solid ${e.theme.colors.grey3}`};
1119
- display: flex;
1120
- flex-direction: column;
1121
- gap: ${r.sp3};
1122
- align-items: center;
1123
- justify-content: center;
1124
- padding: ${r.sp0} 42px;
1125
- `,aa=y.div`
1126
- flex: 1;
1127
- `,Xd=y(at)`
1128
- padding: ${r.sp0} 6px;
1129
- color: ${fe.info};
1130
- border: 1px solid ${fe.info};
1131
- border-radius: ${r.sp1};
1132
- margin-top: ${r.sp1};
1133
- `,yo=y(nt)`
1134
- padding: ${r.sp2};
1135
- color: ${e=>e.theme.colors.hero};
1136
- background: ${e=>e.theme.colors.overlayColor};
1137
- border-radius: ${r.sp1};
1138
- `,ft=y(yo)`
1139
- padding: 2px ${r.sp2};
1140
- `,Cn=$e.getLocalizedStrings().expenseAutomation.accountRecon.review.header,on=[{key:"date",value:Cn.date,sortOrder:"ascending",width:new pe(20,20),loaderWidth:120},{key:"payee",value:Cn.payee,sortOrder:"ascending",width:new pe(20,20),loaderWidth:212},{key:"memo",value:Cn.memo,sortOrder:"ascending",width:new pe(20,20),loaderWidth:192},{key:"direction",value:Cn.direction,sortOrder:"ascending",width:new pe(15,15),loaderWidth:84},{key:"match",value:Cn.match,sortOrder:"ascending",width:new pe(15,15),loaderWidth:152},{key:"amount",value:Cn.amount,sortOrder:"ascending",width:new pe(10,10),loaderWidth:64}],Or=[{key:"payee",value:Cn.payee,sortOrder:"ascending",width:new pe(65,65),loaderWidth:212},{key:"amount",value:Cn.amount,sortOrder:"ascending",width:new pe(30,30),loaderWidth:64}],o0=c.memo(e=>{const{sortConfig:n,onColumnSortConfigChanged:a}=e,i=Ie(),f=lt()?Or:on,[x,o]=c.useState(()=>f.map(p=>({...p,sortOrder:p.key===n.sortKey?n.sortOrder:"ascending"})));c.useEffect(()=>{o(f.map(p=>({...p,sortOrder:p.key===n.sortKey?n.sortOrder:"ascending"})))},[n.sortKey,n.sortOrder,f]);const l=(p,v)=>{let w=v;n.sortKey===p&&(w=v==="ascending"?"descending":"ascending"),a(p,w)};return t.jsx(r0,{children:x.map(p=>t.jsxs(a0,{sortDataValue:n.sortKey,actualDataValue:p.key,wrapperWidth:p.width,windowSize:i,isLastColumn:p.key==="amount",children:[t.jsxs(s0,{"data-testid":ae("account-reconciliation-review-header",p.value),sortKey:p.key,onClick:()=>l(p.key,p.sortOrder),children:[t.jsx(at,{children:p.value}),t.jsx(l0,{sortDataValue:n.sortKey,headerData:p,children:t.jsx(c0,{})})]}),t.jsx(d0,{sortDataValue:n.sortKey,windowSize:i,isVisible:n.sortKey===p.key&&(n.sortKey!=="date"||n.sortOrder==="ascending"),children:t.jsx(u0,{"data-testid":ae("account-reconciliation-review-sort-by-date"),onClick:()=>l("date","ascending")})})]},p.key))})}),r0=y(nt)`
1141
- top: 0;
1142
- left: 0;
1143
- width: fit-content;
1144
- min-width: 100%;
1145
- z-index: 6;
1146
- display: flex;
1147
- align-items: center;
1148
- box-sizing: border-box;
1149
- padding: ${r.sp3} ${r.sp4};
1150
- position: sticky;
1151
- color: ${e=>e.theme.colors.grey1};
1152
- background-color: ${e=>e.theme.colors.grey4};
1153
- `,a0=y.div`
1154
- color: ${e=>e.sortDataValue===e.actualDataValue?e.theme.colors.primary:e.theme.colors.grey1};
1155
- width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
1156
- min-width: ${e=>e.isLastColumn===!0?"auto":e.wrapperWidth.valuePercentage(e.windowSize)};
1157
- display: flex;
1158
- align-items: center;
1159
- gap: 5px;
1160
- left: ${r.sp0};
1161
- justify-content: ${e=>e.isLastColumn===!0?"flex-end":"flex-start"};
1162
- `,s0=y.div`
1163
- display: flex;
1164
- cursor: pointer;
1165
- gap: ${r.sp1};
1166
- &:hover {
1167
- color: ${e=>e.theme.colors.primary};
1168
- }
1169
- white-space: nowrap;
1170
- `,l0=y.div`
1171
- display: flex;
1172
- align-items: center;
1173
- transform: ${e=>e.sortDataValue===e.headerData.key&&e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
1174
- ${e=>e.headerData.sortOrder==="ascending"?ke`
1175
- padding-top: 2px;
1176
- `:ke`
1177
- padding-bottom: 2px;
1178
- `}
1179
- `,c0=y($i)`
1180
- width: ${r.sp2};
1181
- height: ${r.sp2};
1182
- cursor: pointer;
1183
- color: inherit;
1184
- `,d0=y.div`
1185
- display: ${e=>e.isVisible?"flex":"none"};
1186
- align-items: center;
1187
- padding-top: 2px;
1188
- `,u0=y(Ei)`
1189
- width: 12px;
1190
- height: 12px;
1191
- cursor: pointer;
1192
- color: ${e=>e.theme.colors.hero};
1193
- `,Ft="accountReconReviewTableSection",{dateFormat:h0,expenseAutomation:p0,common:qt}=$e.getLocalizedStrings(),{visual:eu}=h0,{accountRecon:De}=p0,tu=e=>[{label:De.review.formLabels.allBankAccounts,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],nu=e=>[{label:De.review.formLabels.allCreditCards,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],Vl=e=>`${Ft}_${e}_form`,We=(e,n)=>`${Ft}.${e}.${n}`,g0=e=>{const{sortKey:n,sortOrder:a,accountReconEntity:i,entitySearchAutoCompleteActions:f,allAccountList:x,classList:o,localData:l,accountListNestedAccountHierarchy:p,classListNestedAccountHierarchy:v,selectedAccountId:w,entitySearchAutoCompleteData:d,excludeFetchById:s,saveFetchById:C,reviewTabSelectedVendorByTransactionId:S,refreshStatus:T,updateLocalData:u,onColumnSortConfigChanged:m,onSaveReconciliation:E,onSaveReconciliationReview:k,onReconMatchedTransactionClick:j,bankAccounts:D,creditCards:M}=e,{transactionsToReview:_,account:{accountType:R}}=i,A=c.useRef(null),[F,K]=c.useState(null),ee=Z=>{const B=_[Z],O=Ld(B),g=Dd(B),h=Od(B,R??"bank"),N=Md(B,R??"bank"),$=Pd(B),b=qr(B),I=B.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return B.transactionId===F?g||h||N||$||b?275+(I?25:0):O?185+40*B.recommendedAction.recommendedTransactions.length+(I?25:0):146:72},te=c.useMemo(()=>({onColumnSortConfigChanged:m,sortConfig:{sortKey:n,sortOrder:a}}),[m,n,a]);if(c.useEffect(()=>{K(_[0]?.transactionId??null),A.current?.resetAfterIndex(0)},[n,a]),c.useEffect(()=>{A.current?.resetAfterIndex(0)},[F]),c.useEffect(()=>{A.current?.resetAfterIndex(0)},[_.length]),c.useEffect(()=>{T.fetchState==="Completed"&&A.current?.resetAfterIndex(0)},[T]),_.length===0){const Z=et("reconciliation",void 0,w).tabs.find(B=>B.id==="review")?.allDoneText;return t.jsx(O0,{children:t.jsx(zt,{tab:"reconciliation",title:Z?.title??qt.strings.empty,subTitle:Z?.subTitle??qt.strings.empty})})}return t.jsx(v0,{children:t.jsx(iu.Provider,{value:te,children:t.jsx(bi,{children:({height:Z,width:B})=>t.jsx(No,{width:B,height:Z,innerElementType:ou,ref:A,itemCount:_.length,itemSize:ee,itemKey:O=>_[O].transactionId,overscanCount:wp,itemData:{transactionsList:_,expandedRowId:F,allAccountList:x,classList:o,accountListNestedAccountHierarchy:p,classListNestedAccountHierarchy:v,localData:l,entitySearchAutoCompleteData:d,entitySearchAutoCompleteActions:f,excludeFetchById:s,saveFetchById:C,reviewTabSelectedVendorByTransactionId:S,bankAccounts:D,creditCards:M,accountType:R,updateLocalData:u,setExpandedRowId:K,onSaveReconciliation:E,onSaveReconciliationReview:k,onReconMatchedTransactionClick:j},initialScrollOffset:0,children:m0})})})})},iu=c.createContext(void 0),ou=c.forwardRef((e,n)=>{const{children:a,style:i,...f}=e,x=c.useContext(iu);return t.jsxs(S0,{ref:n,style:{...i,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",padding:`${r.sp0} ${r.sp8}`},...f,children:[x!=null&&t.jsx(o0,{onColumnSortConfigChanged:x.onColumnSortConfigChanged,sortConfig:x.sortConfig}),t.jsx(k0,{children:a})]})});ou.displayName="Account recon review table inner element type";const m0=({index:e,style:n,data:a})=>{const{selectedTransactionId:i}=jo(),{transactionsList:f,expandedRowId:x,setExpandedRowId:o,entitySearchAutoCompleteActions:l,allAccountList:p,classList:v,localData:w,updateLocalData:d,accountListNestedAccountHierarchy:s,classListNestedAccountHierarchy:C,entitySearchAutoCompleteData:S,onSaveReconciliation:T,onSaveReconciliationReview:u,onReconMatchedTransactionClick:m,excludeFetchById:E,saveFetchById:k,reviewTabSelectedVendorByTransactionId:j,bankAccounts:D,creditCards:M,accountType:_}=a,R=f[e],A=i!=null&&i===R.transactionId;return t.jsx(w0,{isPanelSelected:A,style:{...n,width:"100%"},children:t.jsx(f0,{transaction:R,expandedRowId:x,setExpandedRowId:o,entitySearchAutoCompleteActions:l,accountListNestedAccountHierarchy:s,allAccountList:p,classList:v,localData:w,updateLocalData:d,entitySearchAutoCompleteData:S,classListNestedAccountHierarchy:C,onSaveReconciliation:T,onSaveReconciliationReview:u,onReconMatchedTransactionClick:m,excludeFetchById:E,saveFetchById:k,selectedVendor:j[R.transactionId],bankAccounts:D,creditCards:M,accountType:_})})},f0=({transaction:e,expandedRowId:n,accountListNestedAccountHierarchy:a,entitySearchAutoCompleteActions:i,allAccountList:f,classList:x,classListNestedAccountHierarchy:o,localData:l,entitySearchAutoCompleteData:p,excludeFetchById:v,saveFetchById:w,selectedVendor:d,bankAccounts:s,creditCards:C,accountType:S,setExpandedRowId:T,updateLocalData:u,onSaveReconciliation:m,onSaveReconciliationReview:E,onReconMatchedTransactionClick:k})=>{const j=n===e.transactionId,D=Ie(),M=lt(),_=l[e.transactionId],R=e.recommendedAction.action==="record_bill_payment",A=e.recommendedAction.action==="record_expense",F=qr(e),K=f.find(Z=>Z.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),ee=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(y0,{className:"recon-row-card",isQuickViewMode:M,isExpanded:j,children:[t.jsxs(C0,{isExpanded:j,onClick:()=>T(e.transactionId),"data-testid":ae("account-reconciliation-review-row",e.transactionId),children:[M?null:t.jsx(Un,{windowSize:D,responsiveWidth:on[0].width,children:t.jsx(Hn,{children:e.transactionDate.format(eu.MMMDCommaYYYYformat)})}),t.jsx(Un,{windowSize:D,responsiveWidth:M?Or[0].width:on[1].width,children:t.jsx(Hn,{children:t.jsx(tt,{itemTextStyle:{...xt.standardRegular.cssObject,color:"inherit"},text:(te=e,te.recommendedAction.recommendedTransactions.length>0&&te.recommendedAction.recommendedTransactions[0].merchantName!=null?te.recommendedAction.recommendedTransactions[0].merchantName:qt.strings.hyphen)})})}),M?null:t.jsxs(t.Fragment,{children:[t.jsx(Un,{windowSize:D,responsiveWidth:on[2].width,children:t.jsx(Hn,{children:t.jsx(tt,{itemTextStyle:{...xt.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(Un,{windowSize:D,responsiveWidth:on[3].width,children:t.jsx(Hn,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(Un,{windowSize:D,responsiveWidth:on[4].width,children:[t.jsx(st,{controller:R,children:t.jsx(M0,{children:t.jsx(P0,{children:De.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(st,{controller:!R,children:t.jsx(Hn,{children:K!=null?t.jsxs(t.Fragment,{children:[t.jsx(ru,{}),t.jsx(tt,{itemTextStyle:{...xt.standardRegular.cssObject,color:"inherit"},text:K.accountName})]}):qt.strings.hyphen})})]})]}),t.jsx(Un,{windowSize:D,isLastColumn:!0,responsiveWidth:M?Or[1].width:on[5].width,children:t.jsx(Hn,{children:Gr("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(st,{controller:j&&_!=null,children:[t.jsx(x0,{onSaveReconciliation:m,onSaveReconciliationReview:E,updateLocalData:u,saveFetchById:w,excludeFetchById:v,localData:_,classListNestedAccountHierarchy:o,allAccountList:f,classList:x,transaction:e,accountListNestedAccountHierarchy:a,entitySearchAutoCompleteActions:i,entitySearchAutoCompleteData:p,selectedVendor:d,bankAccounts:s,creditCards:C,accountType:S,onReconMatchedTransactionClick:k}),t.jsx(st,{controller:(R||A||F)&&ee!=null,children:t.jsx(B0,{children:t.jsxs(z0,{children:[S==="credit_card"?De.review.creditCardDetail:De.review.bankDetail,qt.strings.colon," ",ee]})})})]})]});var te},x0=({transaction:e,accountListNestedAccountHierarchy:n,entitySearchAutoCompleteActions:a,allAccountList:i,classList:f,classListNestedAccountHierarchy:x,localData:o,entitySearchAutoCompleteData:l,excludeFetchById:p,saveFetchById:v,selectedVendor:w,bankAccounts:d,creditCards:s,accountType:C,updateLocalData:S,onSaveReconciliation:T,onSaveReconciliationReview:u,onReconMatchedTransactionClick:m})=>{const E=St(),k=lt(),[j,D]=c.useState(!o.vendor?.id),[M,_]=c.useState(!o.customer?.id),[R,A]=c.useState(o.categoryId==null),[F,K]=c.useState(o.classId==null),[ee,te]=c.useState(o.bankAccountId==null),[Z,B]=c.useState(o.creditCardId==null),[O,g]=c.useState(!o.memo),h=Ld(e),N=Dd(e),$=Md(e,C??"bank"),b=Od(e,C??"bank"),I=Pd(e),L=qr(e),U=c.useMemo(()=>{if(!N&&!L)return wn(n);if(w!=null&&w.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return wn(n,w?.recommendations);const P=i.find(X=>X.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),J=P!=null?{...P,reason:De.review.zeniGptRecommendation,min:0,max:0}:void 0;return wn(n,[{account:J}])},[N,L,w,e.recommendedAction.recommendedTransactions,i,n]),Q=c.useMemo(()=>{if(!N&&!L)return po(x);if(w!=null&&w.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return po(x,w?.recommendations);const P=f.find(X=>X.classId===e.recommendedAction.recommendedTransactions[0]?.classId),J=P!=null?{...P,reason:De.review.zeniGptRecommendation,min:0,max:0}:void 0;return po(x,[{class:J}])},[N,L,w,e.recommendedAction.recommendedTransactions,f,x]),Y=Fn({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:c.useMemo(()=>Wl(e,o,U,i,Q,d,s,l),[e,o,Q,i,U,d,s,l]),values:c.useMemo(()=>Wl(e,o,U,i,Q,d,s,l),[e,o,Q,i,U,d,s,l])});c.useEffect(()=>{const P=Y.watch((J,{name:X})=>{X!=null&&J!=null&&Si(()=>(async(ne,re)=>{ne.includes("memo")||S(Kl(re,e,l,i),e.transactionId,ne.includes("vendor"))})(X,J))});return()=>{P.unsubscribe()}});const z=c.useCallback(P=>{if(!k){if(N||I||L){if((N||L)&&o.vendor==null)return D(!1),void Y.setError(We(e.transactionId,"vendor"),{type:"required"});if(I&&o.customer==null)return _(!1),void Y.setError(We(e.transactionId,"customer"),{type:"required"});if(o.categoryId==null)return A(!1),void Y.setError(We(e.transactionId,"category"),{type:"required"})}S(Kl(P,e,l,i),e.transactionId,!1),u(e.transactionId)}},[k,N,L,I,S,e,l,i,u,o.categoryId,o.vendor,o.customer]),H=Y.watch(We(e.transactionId,"vendor")),V=Y.watch(We(e.transactionId,"customer")),G=c.useRef(),oe=c.useMemo(()=>N||L?"vendor":I?"customer":null,[N,L,I]),se=(P,J)=>{oe!=null&&a.onAutoCompleteInputChange?.(P,oe),G.current=J};c.useEffect(()=>{l.entityAutoCompleteView.fetchState==="Completed"&&((N||L)&&G.current?.(kd(l.entityAutoCompleteView)),I&&G.current?.(Gh(l.entityAutoCompleteView)))},[l.entityAutoCompleteView,I,N,L]);const q=c.useMemo(()=>{if(C==="bank")switch(e.recommendedAction.action){case"record_bill_payment":return["record_bill_payment"];case"record_cc_payment":case"record_expense":case"record_transfer":return["record_expense","record_transfer","record_cc_payment"];default:return["record_deposit","record_cc_credit"]}else switch(e.transactionDirection){case"payment":return["record_expense"];case"deposit":return["record_cc_credit","record_cc_payment"];default:return[]}},[C,e.recommendedAction.action,e.transactionDirection]);return c.useEffect(()=>{R===!1&&o.categoryId==null&&Y.setFocus(We(e.transactionId,"category"))},[R]),c.useEffect(()=>{F===!1&&o.classId==null&&Y.setFocus(We(e.transactionId,"class"))},[F]),c.useEffect(()=>{j===!1&&o.vendor==null&&Y.setFocus(We(e.transactionId,"vendor"))},[j]),c.useEffect(()=>{M===!1&&o.customer==null&&Y.setFocus(We(e.transactionId,"customer"))},[M]),c.useEffect(()=>{ee===!1&&o.bankAccountId==null&&Y.setFocus(We(e.transactionId,"bankAccount"))},[ee]),c.useEffect(()=>{Z===!1&&o.creditCardId==null&&Y.setFocus(We(e.transactionId,"creditCard"))},[Z]),t.jsx(Bn,{...Y,children:t.jsx("form",{onSubmit:Y.handleSubmit(z),id:Vl(e.transactionId),children:t.jsxs(b0,{children:[t.jsxs($0,{children:[t.jsxs(j0,{children:[t.jsxs(N0,{children:[t.jsx(ru,{}),t.jsx(Oo,{label:{label:h?De.review.formLabels.match:De.review.formLabels.categorize},radioField:{name:We(e.transactionId,"match_radio"),id:h?"match":"categorize",value:h?"match":"categorize",checked:!0,style:{width:r.sp3,height:r.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(st,{controller:!h,children:t.jsxs(t.Fragment,{children:[t.jsx(Gl,{}),q.map(P=>t.jsx(Oo,{label:{label:De.review.formLabels[P]},style:{width:"auto"},isDisabled:"readonly",changeLabelColorInDisableMode:!0,radioField:{name:We(e.transactionId,"recommendedActionType"),id:P,value:P,style:{width:r.sp3,height:r.sp3,padding:"2px"}}},P))]})})]}),t.jsxs(T0,{children:[t.jsx(fi,{variant:"secondary",size:"small",label:De.review.formLabels.exclude,loading:p[e.transactionId]?.fetchState==="In-Progress","data-testid":ae("account-reconciliation-review-exclude-button",e.transactionId),style:{width:r.sp10},reverseSpinnerColor:!1,onClick:()=>{k||T({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx(fi,{form:Vl(e.transactionId),"data-testid":ae("account-reconciliation-review-save-button",e.transactionId),label:qt.footer.save,style:{width:r.sp10},variant:"primary",size:"small",type:"submit",loading:v[e.transactionId]?.fetchState==="In-Progress"})]})]}),t.jsx(st,{controller:N||I||L,children:t.jsxs(Zo,{children:[t.jsx(st,{controller:N||L,children:t.jsx(Lt,{onClickAway:()=>{o.vendor==null&&j===!1&&D(!0)},children:t.jsx(we,{style:{flex:1,padding:W[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(Kt,{className:"hover-background",style:{padding:`${r.sp2} ${r.sp3}`},children:[t.jsx(je,{style:{display:"flex",alignItems:"center",gap:W[1]},children:qt.texts.vendor}),t.jsx(_e,{style:{gap:W[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:j===!0?t.jsxs(Ae,{onClick:P=>{P.stopPropagation(),!k&&D(!1)},"data-testid":ae("account-reconciliation-review-add-vendor-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:W[1],color:E.colors.champion,cursor:"pointer"},children:[t.jsx(jn,{}),De.review.formLabels.addVendor]}):t.jsx(Er,{name:We(e.transactionId,"vendor"),allowEmpty:!1,placeholder:De.review.formLabels.addVendor,valueToId:P=>P,defaultValue:{selectedOption:H?.selectedOption,defaultOptions:H?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:r.sp4})},registerOptions:{required:!0,validate:P=>!!P.selectedOption},loadOptions:se})})})]})})})}),t.jsx(st,{controller:I,children:t.jsx(Lt,{onClickAway:()=>{o.customer==null&&M===!1&&_(!0)},children:t.jsx(we,{style:{flex:1,padding:W[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(Kt,{className:"hover-background",style:{padding:`${r.sp2} ${r.sp3}`},children:[t.jsx(je,{style:{display:"flex",alignItems:"center",gap:W[1]},children:qt.texts.customer}),t.jsx(_e,{style:{gap:W[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:M===!0?t.jsxs(Ae,{onClick:P=>{P.stopPropagation(),!k&&_(!1)},"data-testid":ae("account-reconciliation-review-add-customer-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:W[1],color:E.colors.champion,cursor:"pointer"},children:[t.jsx(jn,{}),De.review.formLabels.addCustomer]}):t.jsx(Er,{name:We(e.transactionId,"customer"),allowEmpty:!1,placeholder:De.review.formLabels.addCustomer,valueToId:P=>P,defaultValue:{selectedOption:V?.selectedOption,defaultOptions:V?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:r.sp4})},registerOptions:{required:!0,validate:P=>!!P.selectedOption},loadOptions:se})})})]})})})}),t.jsx(Lt,{onClickAway:()=>{o.categoryId==null&&R===!1&&A(!0)},children:t.jsx(we,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Kt,{className:"hover-background",children:[t.jsx(je,{style:{display:"flex",alignItems:"center",gap:W[1]},children:qt.texts.category}),t.jsx(_e,{className:"item-value-container",children:t.jsx(t.Fragment,{children:R===!0?t.jsxs(Ae,{onClick:P=>{P.stopPropagation(),!k&&(k||A(!1))},"data-testid":ae("account-reconciliation-review-add-category-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:W[1],color:E.colors.champion,cursor:"pointer"},children:[t.jsx(jn,{}),De.review.formLabels.addCategory]}):t.jsx(Yn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:We(e.transactionId,"category"),placeholder:De.review.formLabels.addCategory,valueToId:P=>(J=>i.filter(X=>X.qboId===J)[0]?.qboId)(P),defaultValue:{allOptions:U,selectedOption:i.find(P=>P.accountId===o.categoryId)?.qboId},registerOptions:{required:!0,validate:P=>!!P.selectedOption},customStyleConfig:no})})})]})})}),t.jsx(Lt,{onClickAway:()=>{o.classId==null&&F===!1&&K(!0)},children:t.jsx(we,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Kt,{className:"hover-background",children:[t.jsx(je,{style:{display:"flex",alignItems:"center",gap:W[1]},children:qt.texts.class}),t.jsx(_e,{className:"item-value-container",children:t.jsx(t.Fragment,{children:F===!0?t.jsxs(Ae,{onClick:P=>{P.stopPropagation(),!k&&K(!1)},"data-testid":ae("account-reconciliation-review-add-class-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:W[1],color:E.colors.champion,cursor:"pointer"},children:[t.jsx(jn,{}),De.review.formLabels.addClass]}):t.jsx(Yn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:We(e.transactionId,"class"),placeholder:De.review.formLabels.addClass,valueToId:P=>(J=>f.filter(X=>X.classId===J)[0]?.accountingClassNumber??void 0)(P),defaultValue:{allOptions:Q,selectedOption:o.classId},registerOptions:{required:!0,validate:P=>!!P.selectedOption},customStyleConfig:no})})})]})})})]})}),t.jsx(st,{controller:h,children:t.jsxs(_0,{children:[t.jsxs(R0,{children:[t.jsx("span",{className:"matched-text",children:`${De.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),De.review.matchesFoundFullInfo]}),t.jsx(A0,{children:e.recommendedAction.recommendedTransactions.map(P=>P.bookTransactionId!=null?t.jsxs(L0,{children:[t.jsx(Oo,{label:{label:t.jsxs(I0,{children:[t.jsx(Me,{children:P.date.format(eu.MMMDCommaYYYYformat)}),t.jsx(Me,{children:P.memo})]})},style:{width:"auto"},isDisabled:void 0,changeLabelColorInDisableMode:!0,radioField:{name:We(e.transactionId,"matchedTransaction"),registerOptions:{required:!0},id:P.bookTransactionId,value:P.bookTransactionId,style:{width:r.sp3,height:r.sp3,padding:"2px"}}}),t.jsxs(F0,{"data-testid":ae("account-reconciliation-review-matched-transaction-amount",P.bookTransactionId),onClick:()=>{P.bookTransactionId!=null&&m(P.bookTransactionId)},children:[t.jsx(D0,{children:Gr("0,0.00",P.amount.amount,P.amount.currencySymbol)}),t.jsx(Gl,{})]})]},P.bookTransactionId):null)})]})}),t.jsx(st,{controller:$,children:t.jsx(Zo,{children:t.jsx(Lt,{onClickAway:()=>{o.bankAccountId==null&&ee===!1&&te(!0)},children:t.jsx(we,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Kt,{className:"hover-background",children:[t.jsx(je,{style:{display:"flex",alignItems:"center",gap:W[1]},children:C==="credit_card"?De.review.formLabels.selectAccount:De.review.formLabels.transferTo}),t.jsx(_e,{className:"item-value-container",children:t.jsx(t.Fragment,{children:ee===!0?t.jsxs(Ae,{onClick:P=>{P.stopPropagation(),!k&&(k||te(!1))},"data-testid":ae("account-reconciliation-review-add-account-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:W[1],color:E.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(jn,{}),De.review.formLabels.selectAccount]}):t.jsx(Yn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:We(e.transactionId,"bankAccount"),placeholder:De.review.formLabels.selectAccount,defaultValue:{allOptions:tu(d),selectedOption:o.bankAccountId},registerOptions:{required:!0,validate:P=>!!P.selectedOption},customStyleConfig:no})})})]})})})})}),t.jsx(st,{controller:b,children:t.jsx(Zo,{children:t.jsx(Lt,{onClickAway:()=>{o.creditCardId==null&&Z===!1&&B(!0)},children:t.jsx(we,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Kt,{className:"hover-background",children:[t.jsx(je,{style:{display:"flex",alignItems:"center",gap:W[1]},children:De.review.formLabels.creditCard}),t.jsx(_e,{className:"item-value-container",children:t.jsx(t.Fragment,{children:Z===!0?t.jsxs(Ae,{onClick:P=>{P.stopPropagation(),!k&&(k||B(!1))},"data-testid":ae("account-reconciliation-review-add-credit-card-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:W[1],color:E.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(jn,{}),De.review.formLabels.selectCard]}):t.jsx(Yn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:We(e.transactionId,"creditCard"),placeholder:De.review.formLabels.selectCard,defaultValue:{allOptions:nu(s),selectedOption:o.creditCardId},registerOptions:{required:!0,validate:P=>!!P.selectedOption},customStyleConfig:no})})})]})})})})}),t.jsx(st,{controller:!h,children:t.jsx(E0,{children:t.jsx(we,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",width:"100%"},children:t.jsxs(Kt,{className:"hover-background",children:[t.jsx(je,{style:{display:"flex",alignItems:"center",gap:W[1]},children:De.review.header.memo}),t.jsx(_e,{className:"item-value-container",children:t.jsx(t.Fragment,{children:O===!0?t.jsxs(Ae,{onClick:P=>{P.stopPropagation(),!k&&g(!1)},"data-testid":ae("account-reconciliation-review-add-memo-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:W[1],color:E.colors.champion,cursor:"pointer"},children:[t.jsx(jn,{}),De.review.formLabels.addMemo]}):t.jsx(Yh,{name:We(e.transactionId,"memo"),placeholder:De.review.formLabels.addMemo,type:"text",style:{padding:0,textAlign:"left",width:"100%",background:"transparent"}})})})]})})})})]})})})},no={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:r.sp4}),singleValue:()=>({margin:0}),menuPortal:()=>({zIndex:9999}),menu:()=>({width:`calc(100% + ${r.sp5})`,marginRight:`-${r.sp3}`,marginLeft:`-${r.sp3}`})},Wl=(e,n,a,i,f,x,o,l)=>{const p=i.find(v=>v.accountId===n.categoryId);return{[Ft]:{[e.transactionId]:{category:{selectedOption:p?.qboId,allOptions:a},class:{selectedOption:n?.classId,allOptions:f},bankAccount:{selectedOption:n?.bankAccountId,allOptions:tu(x)},creditCard:{selectedOption:n?.creditCardId,allOptions:nu(o)},memo:n?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:n?.matchedTransactionId,vendor:{selectedOption:n?.vendor?.id,defaultOptions:jd(l.entityAutoCompleteView,n?.vendor)},customer:{selectedOption:n?.customer?.id,defaultOptions:ip(n?.customer,l.entityAutoCompleteView)}}}}},Kl=(e,n,a,i)=>{const{vendor:f,customer:x}=e[Ft][n.transactionId];let o,l;if(f.selectedOption!=null){const p=f.defaultOptions.find(v=>v.value===f.selectedOption);if(p!=null)o={id:f.selectedOption,name:p.label};else{const v=a.entityAutoCompleteView.vendor.find(w=>w.id===f.selectedOption||w.zeniId===f.selectedOption);v!=null&&(o={id:v.zeniId,name:v.name})}}if(x.selectedOption!=null){const p=x.defaultOptions.find(v=>v.value===x.selectedOption);if(p!=null)l={id:x.selectedOption,name:p.label};else{const v=a.entityAutoCompleteView.customer.find(w=>w.id===x.selectedOption||w.zeniId===x.selectedOption);v!=null&&(l={id:v.zeniId,name:v.name})}}return{categoryId:i.find(p=>p.qboId===e[Ft][n.transactionId].category.selectedOption)?.accountId??e[Ft][n.transactionId].category.selectedOption,classId:e[Ft][n.transactionId].class.selectedOption,memo:e[Ft][n.transactionId].memo,matchedTransactionId:e[Ft][n.transactionId].matchedTransaction,vendor:o,bankAccountId:e[Ft][n.transactionId].bankAccount.selectedOption,creditCardId:e[Ft][n.transactionId].creditCard.selectedOption,customer:l}},Hn=y(Me)`
1194
- display: flex;
1195
- align-items: center;
1196
- column-gap: ${r.sp1};
1197
- `,Un=y.div`
1198
- width: ${e=>e.responsiveWidth.valuePercentage(e.windowSize)};
1199
- display: flex;
1200
- justify-content: ${e=>e.isLastColumn===!0?"flex-end":"flex-start"};
1201
- `,y0=y.div`
1202
- display: flex;
1203
- flex-direction: column;
1204
- box-sizing: border-box;
1205
- position: relative;
1206
- background: ${e=>e.theme.colors.grey5};
1207
- border: 1px solid
1208
- ${e=>e.isExpanded?e.theme.colors.primary:e.theme.colors.grey3};
1209
- color: ${e=>e.isExpanded?e.theme.colors.primary:e.theme.colors.hero};
1210
- &:hover {
1211
- border: 1px solid ${e=>e.theme.colors.primary};
1212
- color: ${e=>e.theme.colors.primary};
1213
- }
1214
- box-shadow: ${e=>e.theme.colors.elevation1};
1215
- border-radius: ${r.sp2};
1216
- `,C0=y.div`
1217
- display: flex;
1218
- flex-direction: row;
1219
- align-items: center;
1220
- cursor: pointer;
1221
- padding: ${r.sp3} ${r.sp4};
1222
- column-gap: ${r.sp2};
1223
-
1224
- border-bottom: ${e=>e.isExpanded?"1px solid "+e.theme.colors.primary:"none"};
1225
- `,b0=y.div`
1226
- padding: ${r.sp2} ${r.sp4};
1227
- display: flex;
1228
- flex-direction: column;
1229
- row-gap: ${r.sp2};
1230
- `,w0=y.div`
1231
- top: ${r.sp0};
1232
- left: ${r.sp0};
1233
- padding-right: var(--side-panel-list-item-pr, 0px);
1234
- box-sizing: border-box;
1235
- ${e=>e.isPanelSelected===!0&&ke`
1236
- .recon-row-card {
1237
- ${Jr(e.theme)}
1238
- }
1239
- `}
1240
- `,v0=y.div`
1241
- height: calc(100vh - 350px);
1242
- max-width: 99.9%;
1243
- padding: ${r.sp0};
1244
- `,S0=y.div``,k0=y.div`
1245
- position: relative;
1246
- width: auto;
1247
- height: 100%;
1248
- display: flex;
1249
- flex-direction: column;
1250
- row-gap: ${r.sp3};
1251
- `,$0=y.div`
1252
- display: flex;
1253
- flex-direction: row;
1254
- align-items: center;
1255
- justify-content: space-between;
1256
- padding: 12px ${r.sp3};
1257
- background-color: ${e=>e.theme.colors.background};
1258
- border-radius: ${r.sp2};
1259
- `,Zo=y.div`
1260
- display: flex;
1261
- flex-direction: row;
1262
- align-items: center;
1263
- column-gap: ${r.sp3};
1264
- `,E0=y.div`
1265
- width: 100%;
1266
- `,T0=y.div`
1267
- display: flex;
1268
- flex-direction: row;
1269
- align-items: center;
1270
- column-gap: ${r.sp3};
1271
- `,j0=y.div`
1272
- display: flex;
1273
- flex-direction: row;
1274
- align-items: center;
1275
- column-gap: ${r.sp6};
1276
- `,N0=y.div`
1277
- display: flex;
1278
- flex-direction: row;
1279
- align-items: center;
1280
- column-gap: ${r.sp1};
1281
- `,jn=y(_o)`
1282
- width: ${r.sp3};
1283
- height: ${r.sp3};
1284
- `,Gl=y(sd)`
1285
- width: ${r.sp3};
1286
- height: ${r.sp3};
1287
- color: ${e=>e.theme.colors.hero};
1288
- `,_0=y.div`
1289
- display: flex;
1290
- flex-direction: column;
1291
- row-gap: ${r.sp3};
1292
- padding: ${r.sp0} 12px;
1293
- `,R0=y(Me)`
1294
- color: ${e=>e.theme.colors.primary};
1295
-
1296
- .matched-text {
1297
- font-weight: ${oi.bold};
1298
- }
1299
- `,I0=y.div`
1300
- display: flex;
1301
- align-items: center;
1302
- column-gap: ${r.sp2};
1303
- `,A0=y.div`
1304
- display: flex;
1305
- flex-direction: column;
1306
- row-gap: ${r.sp2};
1307
- `,L0=y.div`
1308
- display: flex;
1309
- flex-direction: row;
1310
- align-items: center;
1311
- justify-content: space-between;
1312
- padding-bottom: ${r.sp2};
1313
- border-bottom: 1px solid ${e=>e.theme.colors.grey3};
1314
- `,D0=y(Me)`
1315
- color: ${e=>e.theme.colors.hero};
1316
- `,O0=y.div`
1317
- height: 100%;
1318
- display: flex;
1319
- justify-content: center;
1320
- align-items: center;
1321
- `,M0=y.div`
1322
- border: 1px solid ${e=>e.theme.colors.grey2};
1323
- padding: ${r.sp0} ${r.sp1};
1324
- border-radius: ${r.sp1};
1325
- `,P0=y(at)`
1326
- color: ${e=>e.theme.colors.hero};
1327
- `,F0=y.div`
1328
- display: flex;
1329
- align-items: center;
1330
- column-gap: 20px;
1331
- cursor: pointer;
1332
- `,B0=y.div`
1333
- text-align: center;
1334
- padding: ${r.sp1} ${r.sp0};
1335
- border-top: 1px solid ${e=>e.theme.colors.grey3};
1336
- `,z0=y(at)`
1337
- color: ${e=>e.theme.colors.hero};
1338
- `,ru=y(Sn)`
1339
- width: ${r.sp3};
1340
- height: ${r.sp3};
1341
- margin-right: ${r.sp1};
1342
- path {
1343
- stroke-width: 2;
1344
- }
1345
- `,H0=({reconciliation:e,entitySearchAutoCompleteData:n,selectedAccountId:a,currentFooterFormId:i,entitySearchAutoCompleteActions:f,onUpdateReconcileTabLocalData:x,setCurrentFooterFormId:o,onReconTabColumnSortConfigChanged:l,updateReviewTabLocalData:p,onReconReviewTabColumnSortConfigChanged:v,onSaveReconciliation:w,onSaveReconciliationReview:d,onReconMatchedTransactionClick:s})=>{const{accountReconciliationsByAccountID:C,reconciliationTabsState:{reconcile:{uiState:{sortKey:S,sortOrder:T}}},selectedReconAccount:u}=e,m=C[a],{transactionFetchState:E}=u??{};return E?.fetchState==="In-Progress"||E?.fetchState==="Not-Started"?t.jsxs(Yl,{style:{paddingLeft:W[8],paddingRight:W[8]},children:[t.jsx(U0,{children:on.map(k=>t.jsx(pt,{width:k.loaderWidth,height:18},k.key))}),t.jsxs(W0,{children:[...Array(3).fill(0).map((k,j)=>t.jsx(V0,{children:on.map(D=>t.jsx(pt,{width:D.loaderWidth,height:W[4]},D.key))},`${j}_${k}`))]})]}):t.jsx(Yl,{children:e.selectedTab==="reconcile"?t.jsx(Jf,{selectedAccountId:a,currentFooterFormId:i,setCurrentFooterFormId:o,onUpdateReconcileTabLocalData:x,onReconTabColumnSortConfigChanged:l,onSaveReconciliation:w,sortConfig:{sortKey:S,sortOrder:T},localData:e.reconciliationTabsState.reconcile.localData,matchedTransactions:m?.accountReconEntity.transactionsToReconcile}):t.jsx(g0,{localData:e.reconciliationTabsState.review.localData,reviewTabSelectedVendorByTransactionId:e.reviewTabSelectedVendorByTransactionId,refreshStatus:e.accountReconciliationsByAccountID[a]?.refreshStatus??{fetchState:"Not-Started",error:null},accountReconEntity:e.accountReconciliationsByAccountID[a].accountReconEntity,accountListNestedAccountHierarchy:e.accountListNestedAccountHierarchy,classListNestedAccountHierarchy:e.classListNestedAccountHierarchy,allAccountList:e.allAccountList,classList:e.allClassList,bankAccounts:e.bankAccounts,creditCards:e.creditCards,entitySearchAutoCompleteData:n,updateLocalData:p,entitySearchAutoCompleteActions:f,onColumnSortConfigChanged:v,onSaveReconciliation:w,onSaveReconciliationReview:d,onReconMatchedTransactionClick:s,excludeFetchById:e.actionFetchStates.excludeFetchById,saveFetchById:e.actionFetchStates.saveReconciliationReviewFetch,selectedAccountId:a,sortKey:e.reconciliationTabsState.review.uiState.sortKey,sortOrder:e.reconciliationTabsState.review.uiState.sortOrder})})},Yl=y.div`
1346
- width: 100%;
1347
- height: 100%;
1348
- `,U0=y.div`
1349
- display: flex;
1350
- justify-content: space-between;
1351
- padding: ${r.sp3} ${r.sp4};
1352
- column-gap: ${r.sp6};
1353
- `,V0=y.div`
1354
- display: flex;
1355
- justify-content: space-between;
1356
- padding: ${r.sp3} ${r.sp4};
1357
- background-color: ${e=>e.theme.colors.grey5};
1358
- border-radius: ${r.sp2};
1359
- border: ${e=>`1px solid ${e.theme.colors.grey3}`};
1360
- box-shadow: ${e=>e.theme.colors.elevation1};
1361
- column-gap: ${r.sp6};
1362
- `,W0=y.div`
1363
- display: flex;
1364
- gap: ${r.sp3};
1365
- flex-direction: column;
1366
- `;function ql({section:e,allAccountReconciliations:n,title:a,subTitle:i,isLastNode:f,isTitleRowRequired:x,config:o}){const l={children:[],id:Jt("section",[],a),isLastNode:f,reportElementData:{element:{kind:"section",title:a,data:e,numOfBalances:0},config:o}};if(x){const v={children:[],id:Jt("title_string_only",[],a),isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a,data:e,numOfBalances:0},config:o}};l.children.push(v)}const p=function({title:v,section:w,config:d,numOfBalances:s,nodeId:C}){return{children:[],id:C??Jt("total",[]),isLastNode:!1,reportElementData:{element:{kind:"total",title:v,data:w,numOfBalances:s},config:d}}}({title:i,section:e,config:o,numOfBalances:0});return l.children.push(p),e.accountIDs.forEach((v,w)=>{const d=n[v],s=function({account:C,numOfBalances:S,title:T,isLastNode:u,config:m}){return{children:[],id:Jt("ac_group_report",[],T),isLastNode:u,reportElementData:{element:{kind:"ac_group_report",title:T,data:C,numOfBalances:S},config:m}}}({account:d,numOfBalances:0,title:d.accountReconEntity.account.accountName,isLastNode:w===e.accountIDs.length-1,config:o});l.children.push(s)}),l}function au({config:e,accountReconForSection:n,nodeId:a}){return{children:[],id:a??Jt("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:"timeframe_headers",title:"",data:n,numOfBalances:0},config:e}}}const K0=(e,n,a,i,f=!0,x="assets")=>{const o=x==="liabilities"&&e.accountReconciliationBySectionID.liabilities.accountIDs.length>0?e.accountReconciliationBySectionID.liabilities:e.accountReconciliationBySectionID.assets,l=au({config:n,accountReconForSection:o}),p=[];p.push(l);const v=Array.isArray(a[i])?a[i]:[],{expenseAutomation:{accountRecon:{reconciliation:w}},common:{loading:d}}=$e.getLocalizedStrings(),s=C=>C.filter(S=>!v.includes(S));if(e.fetchStatus.fetchState==="Not-Started"||e.fetchStatus.fetchState==="In-Progress")[...Array(3)].forEach((C,S)=>{p.push(function({title:T,config:u,nodeId:m}){return{children:[],id:m??Jt("loading_in_progress",[],T),isLastNode:!1,reportElementData:{element:{kind:"loading_in_progress",title:"",data:[],numOfBalances:0},config:u}}}({title:`${S}+${d}`,config:n}))});else{const C=s(e.accountReconciliationBySectionID.assets.accountIDs),S=ql({section:{...e.accountReconciliationBySectionID.assets,accountIDs:C},allAccountReconciliations:e.accountReconciliationsByAccountID,title:w.headers.section.assets.title,subTitle:w.headers.section.assets.subTitle,isLastNode:!1,isTitleRowRequired:!1,config:n});if(p.push(S),e.accountReconciliationBySectionID.liabilities.accountIDs.length>0){const T=s(e.accountReconciliationBySectionID.liabilities.accountIDs),u=ql({section:{...e.accountReconciliationBySectionID.liabilities,accountIDs:T},allAccountReconciliations:e.accountReconciliationsByAccountID,title:w.headers.section.liabilities.title,subTitle:w.headers.section.liabilities.subTitle,isLastNode:!1,isTitleRowRequired:!0,config:n});p.push(u)}}return{config:n,headerNodes:f?[l]:[],contentNodes:p}},Mr={wrapperPadding:new pe(W[2],W[2],W[2],W[8]),contentPaddingLeft:new pe(W[2],W[2],W[2],W[2]),contentPaddingRight:new pe(W[2],W[2],W[2],W[2])},G0=y.div`
1367
- display: flex;
1368
- height: 100%;
1369
- width: 100%;
1370
- justify-content: center;
1371
- align-items: center;
1372
- `,Y0=y.div`
1373
- display: flex;
1374
- height: 100%;
1375
- min-height: 100%;
1376
- flex: 1 1 auto;
1377
- width: 100%;
1378
- justify-content: center;
1379
- padding-left: ${e=>Mr.wrapperPadding.valuePx(e.windowSize)};
1380
- background-color: ${e=>e.theme.colors.grey4};
1381
- `,q0=y.div`
1382
- width: 100%;
1383
- height: 100%;
1384
- `,{common:J0}=$e.getLocalizedStrings();function Z0({reconciliation:e,companyId:n,onReload:a,onReviewClicked:i,setOpenDrawerClicked:f,onFetchLinkTokenClick:x,onEstablishConnectionClick:o,onAddStatementClick:l}){const[p,v]=c.useState(void 0),[w,d]=c.useState(void 0),s=e.plaidConnectionDetails.link_account_no_microdeposit,C=e.plaidConnectionDetails.update_account,S=w==="update_account"?C:s,[T,u]=c.useState(S.linkToken??null),[m,E]=c.useState(!1),{useDynamicConfig:k}=gd(),{configValue:j}=k(md.accountReconGLAccountsConfig),D=c.useCallback(H=>{v(H),d("link_account_no_microdeposit")},[]),M=c.useCallback(H=>{const V=F.current.accountReconciliationsByAccountID[H]?.paymentAccountId;v(H),d("update_account"),x("update_account",V)},[]),_=c.useCallback(H=>{f(H)},[]),R=c.useRef(p),A=c.useRef(w),F=c.useRef(e);c.useEffect(()=>{R.current=p},[p]),c.useEffect(()=>{A.current=w},[w]),c.useEffect(()=>{F.current=e},[e]);const K=c.useCallback(H=>{o(H,R.current??"",A.current),v(void 0),d(void 0),E(!1)},[o]),ee=c.useCallback((H,V)=>{H!=null&&console.log("Plaid Connection Error",H,V),v(void 0),d(void 0),E(!1)},[]),{open:te,ready:Z}=vp({token:T,onSuccess:K,onExit:ee});c.useEffect(()=>{(ni(new Date().toISOString()).isAfter(S.expiration)||S.linkToken==null)&&S.fetchStatus.fetchState==="Not-Started"&&x("link_account_no_microdeposit")},[S.fetchStatus.fetchState]),c.useEffect(()=>{!m&&w!=null&&S.linkToken===T&&S.fetchStatus.fetchState==="Completed"&&Z&&E(!0)},[Z,T,S.fetchStatus.fetchState,S.linkToken,w,m]),c.useEffect(()=>{S.fetchStatus.fetchState==="Completed"&&S.linkToken!=null&&S.linkToken!==T&&u(S.linkToken)},[S.fetchStatus.fetchState,S.linkToken,T]),c.useEffect(()=>{m&&te()},[m,te]);const[B,O]=c.useState(void 0),[g,h]=c.useState(void 0),[N,$]=c.useState("assets"),b=ni("2025-03-31"),I=Ie(),L=St();vi({componentName:"expense_automation.account_reconciliation_list",enabled:e.fetchStatus.fetchState==="Completed"});const U=!0,Q=Array.isArray(j?.[n])?j[n]:[],Y=function(H,V){return V?Mo("section")+Mo("total")+H*Mo("ac_group_report"):1/0}(e.accountReconciliationBySectionID.assets.accountIDs.filter(H=>!Q.includes(H)).length,e.accountReconciliationBySectionID.liabilities.accountIDs.length>0),z=c.useCallback(H=>{const V=H.scrollTop>=Y?"liabilities":"assets";V!==N&&$(V)},[Y,N]);return c.useEffect(()=>{const H={reportId:"account_reconciliation",mode:"none",displayOrder:"ascending_date",reportFormat:"more_detailed",bookCloseDate:b,firstMonthOfFY:1,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,dataAvailable:void 0,accountReconciliationConfig:{selectedDrawerAccountId:e.selectedDrawerAccountId,onReviewClicked:i,onConnectClicked:D,onReconnectClicked:M,onOpenDrawerClicked:_,onStatementAddClicked:l}};if(B!=null&&zr(g,e)){const V=function(G,oe,se,q=!1,P="assets"){Object.assign(G.config,se);const J=au({config:se,accountReconForSection:P==="liabilities"&&oe.accountReconciliationBySectionID.liabilities.accountIDs.length>0?oe.accountReconciliationBySectionID.liabilities:oe.accountReconciliationBySectionID.assets});return{config:se,headerNodes:q?[J]:[],contentNodes:[J,...G.contentNodes.slice(1)]}}(B,e,H,U,N);O(V)}else{const V=K0(e,H,j,n,U,N);h(e),O(V)}},[e,N]),e.fetchStatus.fetchState==="Error"?t.jsx(G0,{children:t.jsx(r1,{onReload:a,message:J0.errorMessage.somethingWentWrong})}):t.jsx(Y0,{windowSize:I,children:B!=null?t.jsx(q0,{windowSize:I,children:t.jsx(zd,{backgroundColor:new mi(L.colors.grey4),rootNodes:B,type:"name+balances_actual",compareMode:"compare_mode_percent",isSticky:{isStickyHeader:U,isStickyName:U},treeNodePadding:{left:Mr.contentPaddingLeft.value(I),right:Mr.contentPaddingRight.value(I)},nodeOpenStatus:{},scrollPosition:e.reconListUIState.scrollPosition,onCompareModeChanged:()=>{},onScroll:z})}):null})}function Q0({currentFooterFormId:e,vendorSearchAutoCompleteData:n,vendorSearchAutoCompleteActions:a,reconciliation:i,companyId:f,onReconTabColumnSortConfigChanged:x,updateReconReviewTabLocalData:o,onUpdateReconcileTabLocalData:l,setCurrentFooterFormId:p,onReloadReconciliationListPage:v,onReviewClicked:w,onFetchLinkTokenClick:d,onEstablishConnectionClick:s,onAddStatementClick:C,onReconReviewTabColumnSortConfigChanged:S,onSaveReconciliation:T,onSaveReconciliationReview:u,setOpenDrawerClicked:m,onReconMatchedTransactionClick:E}){return i.selectedAccountId==null?t.jsx(Z0,{companyId:f,reconciliation:i,onReload:v,onReviewClicked:w,onFetchLinkTokenClick:d,onEstablishConnectionClick:s,setOpenDrawerClicked:m,onAddStatementClick:C}):t.jsx(H0,{currentFooterFormId:e,setCurrentFooterFormId:p,onUpdateReconcileTabLocalData:l,onReconTabColumnSortConfigChanged:x,reconciliation:i,updateReviewTabLocalData:o,entitySearchAutoCompleteActions:a,onReconReviewTabColumnSortConfigChanged:S,entitySearchAutoCompleteData:n,selectedAccountId:i.selectedAccountId,onSaveReconciliation:T,onSaveReconciliationReview:u,onReconMatchedTransactionClick:E})}function X0({config:e,isLastNode:n,numOfBalances:a,parentNodeIDs:i,title:f,vendorRowIndex:x,vendorView:o}){const l=Jt("flux_vendor_row",i,o.vendor.id),p={children:[],id:l,isLastNode:n,reportElementData:{element:{kind:"flux_vendor_row",title:f,data:o,numOfBalances:a,index:x},config:e}},v=o.vendorAccountsAndClasses;return p.children=v.map((w,d)=>function({accountAndClassReport:s,numOfBalances:C,title:S,isLastNode:T,isFirstNode:u,config:m,parentNodeIDs:E,ancestorMetadata:k}){let j="";return s.accountBase&&s.classBase?j=`${s.accountBase.accountId}_${s.classBase.classId}`:s.accountBase?j=s.accountBase.accountId:s.classBase&&(j=s.classBase.classId),{children:[],id:Jt("flux_vendor_account_class_row",E,j),isLastNode:T,isFirstNode:u,reportElementData:{element:{kind:"flux_vendor_account_class_row",title:S,data:s,metadata:k,numOfBalances:C},config:m}}}({accountAndClassReport:w,numOfBalances:a,title:w.accountBase?.accountName??"",config:e,isLastNode:d===v.length-1,isFirstNode:d===0,parentNodeIDs:[...i,l],ancestorMetadata:{accountAndClassRowMetadata:{depth:0,hasSibling:v.length>1,hasChildren:!1,isLastNode:d===v.length-1,isFirstNode:d===0,name:w.accountBase?.accountName},isVendorLastChild:n,vendorId:o.vendor.id}})),p}const{common:io,expenseAutomation:{fluxAnalysis:ex}}=$e.getLocalizedStrings(),tx=(e,n,a=!0)=>{const i=e.sections.generalExpense.balancesByMonth?Object.keys(e.sections.generalExpense.balancesByMonth).length:e.sections.reimbursement.balancesByMonth?Object.keys(e.sections.reimbursement.balancesByMonth).length:2,f=e.sections.generalExpense.balancesByMonth?qn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?qn(e.sections.reimbursement.balancesByMonth):[],x=Hd({balances:f,config:n}),o=[],l=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken==null,p=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken!=null||e.sections.reimbursement.fetchStatus.fetchState==="In-Progress";if(l===!0)o.push(function({title:v,balances:w,config:d,nodeId:s}){return{children:[],id:s??Jt("headers_loading_in_progress",[],v),isLastNode:!1,reportElementData:{element:{kind:"headers_loading_in_progress",title:"",data:w,numOfBalances:w.length},config:d}}}({title:`${io.loading}`,balances:f,config:n})),[...Array(10)].forEach((v,w)=>{o.push(ka({title:`${w}+${io.loading}`,balances:f,config:n}))});else{o.push(x);let v=0;if(["generalExpense","reimbursement"].forEach(w=>{const d=e.sections[w];if(d.vendors.length>0||d.fetchStatus.fetchState==="Completed"){const s=qn(d.balancesByMonth);o.push(function({section:C,numOfBalances:S,title:T,isLastNode:u,config:m,vendorIndexOffset:E}){const k=C.sectionId,j={children:[],id:k,isLastNode:u,reportElementData:{element:{kind:"section",title:T,data:C,numOfBalances:S,sectionType:C.sectionId},config:m}},D=(C.vendors??[]).map((M,_)=>X0({config:m,isLastNode:_===C.vendors.length-1,numOfBalances:S,parentNodeIDs:[k],title:M.vendor.name,vendorRowIndex:E+_,vendorView:M}));return j.children.push(...D),j}({section:{sectionId:w,reportId:"flux_analysis_operating_expense",balances:s,vendors:d.vendors,varianceAmount:d.varianceAmount,variancePercentage:d.variancePercentage,currency:e.currency},numOfBalances:i,title:nx(w),isLastNode:!1,config:n,vendorIndexOffset:v})),v+=d.vendors.length}}),e.totalBalancesAndVariance){const w=e.totalBalancesAndVariance.balancesByMonth?qn(e.totalBalancesAndVariance.balancesByMonth):[],d=function({title:s,data:C,isLastNode:S,config:T,numOfBalances:u}){return{children:[],id:Jt("total",[],s),isLastNode:S,reportElementData:{element:{kind:"total",title:s,data:C,numOfBalances:u},config:T}}}({title:io.texts.total,data:{balances:w,varianceAmount:e.totalBalancesAndVariance.varianceAmount,variancePercentage:e.totalBalancesAndVariance.variancePercentage,currency:e.currency},config:n,isLastNode:!0,numOfBalances:i});o.push(d)}p===!0&&[...Array(1)].forEach((w,d)=>{o.push(ka({title:`${d}+${io.loading}`,balances:f,config:n}))})}return{config:n,headerNodes:a&&!l?[x]:[],contentNodes:o}},nx=e=>ex.sectionTitle[e],ix=e=>e.sections.generalExpense.balancesByMonth?qn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?qn(e.sections.reimbursement.balancesByMonth):[],Pr={contentPaddingLeft:new pe(W[0],W[0],W[0]),contentPaddingRight:new pe(W[3],W[3],W[8]),wrapperPadding:new pe(W[3],W[3],W[8])},ox=y.div`
1385
- display: flex;
1386
- position: sticky;
1387
- width: 100%;
1388
- justify-content: center;
1389
- padding-top: ${e=>Pr.wrapperPadding.valuePx(e.windowSize)};
1390
- padding-left: 20px;
1391
- background-color: ${e=>e.theme.colors.grey4};
1392
- `,rx=y.div`
1393
- width: 100%;
1394
- height: calc(100vh - ${r.sp11});
1395
- `,ax=e=>{const{fluxView:n,handleRedirectToVendorDetailPage:a,updateOperatingExpensesIdsForReview:i,updateSectionIdsForReview:f,onSortOrderChanged:x,updateNodeCollapsableStatus:o,fetchReimbursementView:l,fetchGeneralExpenseView:p}=e,v=Ie(),w=St(),[d,s]=c.useState(null),[C,S]=c.useState(null),[T,u]=c.useState(null),m=va([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,[E,k]=c.useState(!1),j=ga(m),D=ga(n.refreshStatus.fetchState),M=c.useRef(!1),[_,R]=c.useState(!1),A=c.useRef(Z=>{Z&&!M.current&&(M.current=!0,R(!0))});vi({componentName:"expense_automation.flux_analysis",enabled:_});const F=c.useCallback(Z=>{const B=!(n.uiState.collapsableStatus[Z]??1);o({...n.uiState.collapsableStatus,[Z]:B})},[n.uiState.collapsableStatus,o]),K=c.useCallback((Z,B)=>{let O=n.reviewOperatingExpensesIds;const g=[];let h=n.selectedSectionIds;const N=n.sections[Z].vendors;g.push(...N.map(b=>b.fluxAnalysisEntityId));let $=Bd-O.length;B?(g.forEach(b=>{!O.includes(b)&&$>0&&(O=[...O,b],$--)}),h=[...h,Z]):(O=O.filter(b=>!g.includes(b)),h=h.filter(b=>b!==Z)),i(O),f(h)},[n.reviewOperatingExpensesIds,n.selectedSectionIds,n.sections,i,f]),ee=c.useCallback(Z=>{const B=n.uiState.collapsableStatus[Z]===!1;Z==="generalExpense"&&!B&&n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken),F(Z)},[n.uiState.collapsableStatus,n.sections.reimbursement.fetchStatus.fetchState,n.uiState.paginationInfoByGroup.reimbursement.pageToken,l,F]),te=n.sections.generalExpense.vendors.length+n.sections.reimbursement.vendors.length;return c.useEffect(()=>{const Z={reportId:"flux_analysis_operating_expense",mode:"none",displayOrder:"ascending_date",reportFormat:"summary",firstMonthOfFY:1,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,fluxAnalysisConfig:{sortOrder:n.uiState.sortOrder,sortKey:n.uiState.sortKey,sortOrSearchInProgress:!1,reviewOpExIds:n.reviewOperatingExpensesIds,reviewSectionIds:n.selectedSectionIds,fetchStatus:n.fetchStatus.fetchState,setIsSortApplied:k,onSectionRowClick:ee,updateNodeCollapsableStatus:F,updateOperatingExpensesIdsForReview:i,handleRedirectToVendorDetailPage:a,onSectionCheckboxClick:K,onSortOrderChanged:x}};if(d!=null&&zr(C,n)){const B=function(O,g,h,N=!0){Object.assign(O.config,g);const $=ix(h),b=Hd({balances:$,config:g});return{config:g,headerNodes:N?[b]:[],contentNodes:[b,...O.contentNodes.slice(1)]}}(d,Z,n,!0);s(B)}else{const B=tx(n,Z,!0);S(n),s(B)}},[n,C,a,K,ee,x,F,i]),t.jsx(ox,{windowSize:v,children:t.jsx(rx,{children:d?t.jsx(sx,{ref:A.current,children:t.jsx(zd,{backgroundColor:new mi(w.colors.grey4),rootNodes:d,type:"name+balances_actual",isSticky:{isStickyHeader:!0,isStickyName:!0},treeNodePadding:{left:Pr.contentPaddingLeft.value(v),right:Pr.contentPaddingRight.value(v)},nodeOpenStatus:Object.keys(n.uiState.collapsableStatus).reduce((Z,B)=>(Z[B]=n.uiState.collapsableStatus[B],Z),{}),compareMode:"compare_mode_amount",infiniteLoadingProps:{isItemLoaded:Z=>Z<te,itemCount:te,loadMoreItems:()=>{n.uiState.collapsableStatus.generalExpense?n.uiState.paginationInfoByGroup.generalExpense.hasMore===!0&&n.sections.generalExpense.fetchStatus.fetchState==="Completed"?p(n.uiState.paginationInfoByGroup.generalExpense.pageToken):n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken):n.uiState.collapsableStatus.reimbursement&&n.uiState.paginationInfoByGroup.reimbursement.hasMore===!0&&n.sections.reimbursement.fetchStatus.fetchState==="Completed"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken)}},variableNodeHeightTree:{prevFetchState:j??"Not-Started",fetchState:n.fetchStatus.fetchState,isSortApplied:E,setIsSortApplied:k,reducedFetchState:va([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,prevRefreshFetchState:D??"Not-Started",refreshFetchState:n.refreshStatus.fetchState},hoveredParentIdProps:{hoveredParentId:T,setHoveredParentId:u}})}):null})})},sx=y.div`
1396
- height: 100%;
1397
- width: 100%;
1398
- `,{reports:{common:lx}}=$e.getLocalizedStrings(),cx=({selectedPeriod:e,fluxAnalysis:n,onFetchFluxViewList:a,markAsReview:i,onReloadPage:f,setCurrentFooterFormId:x,updateOperatingExpensesIdsForReview:o,updateSectionIdsForReview:l,onUpdateFluxAnalysisUIState:p,redirectToVendorDetailPage:v,fetchFluxViewOnScroll:w,onFetchReimbursementView:d})=>{const{fetchStatus:s,reviewOperatingExpensesIds:C,uiState:S}=n,T=c.useRef(null),u=c.useRef(!1),m=Fn({mode:"all",reValidateMode:"onChange",resetOptions:{keepDefaultValues:!0},defaultValues:dx(C)}),E=Ie();c.useEffect(()=>()=>{x("expenseAutomationPage")},[x]),c.useEffect(()=>{u.current&&T?.current?.scrollLeft!=null&&S.scrollPosition?.scrollLeft!==T.current.scrollLeft&&S.scrollPosition!=null&&p({scrollPosition:{scrollTop:S.scrollPosition?.scrollTop,scrollLeft:T.current.scrollLeft}})},[S.scrollPosition?.scrollLeft,T.current?.scrollLeft,S.scrollPosition,p]),c.useEffect(()=>{x(C.length>0?"expenseAutomationFluxPage":"expenseAutomationPage")},[C,x]);const k=_=>{v(_)},j=_=>{w(e,_)},D=(_,R)=>{p({sortOrder:_,sortKey:R}),a(),d(e,null,!1)},M=()=>{const _=su(n.sections,C);i(C,_===!0?"review":"unreview",e,!0)};if(s.fetchState==="Error")return t.jsxs(hx,{children:[t.jsx(px,{onClick:f,children:t.jsx(To,{})}),t.jsx(gx,{children:lx.failed})]});{const _=A=>{p({collapsableStatus:A})},R=A=>{d(e,A,!0)};return t.jsx(Bn,{...m,children:t.jsx("form",{id:wh("expenseAutomationFluxPage"),onSubmit:m.handleSubmit(M),style:{height:"100%",width:"100%"},children:t.jsx(ux,{windowSize:E,children:t.jsx(ax,{fluxView:n,handleRedirectToVendorDetailPage:k,onSortOrderChanged:D,updateOperatingExpensesIdsForReview:o,updateNodeCollapsableStatus:_,fetchReimbursementView:R,updateSectionIdsForReview:l,fetchGeneralExpenseView:j,reportId:"flux_analysis_operating_expense"})})})})}},su=(e,n)=>{let a;return[...e.generalExpense.vendors,...e.reimbursement.vendors].filter(i=>i.status==="Pending Review").forEach(i=>{n.includes(i.fluxAnalysisEntityId)&&(a=!0)}),a},dx=e=>({fluxAnalysisRowIds:e}),ux=y.div`
1399
- display: flex;
1400
- flex: 1 1 auto;
1401
- min-height: 100%;
1402
- flex-direction: column;
1403
- background-color: ${e=>e.theme.colors.grey4};
1404
- padding: ${r.sp0};
1405
- gap: 2px;
1406
- height: 100%;
1407
- .flux-vendor-name-sticky,
1408
- .flux-vendor-header-sticky,
1409
- .flux-section-name-container,
1410
- .flux-class-and-account-value-container,
1411
- .flux-vendor-name-container,
1412
- .flux-total-row {
1413
- border-right: 1px solid transparent;
1414
- }
1415
- &:hover {
1416
- .flux-vendor-name-sticky,
1417
- .flux-vendor-header-sticky,
1418
- .flux-section-name-container,
1419
- .flux-class-and-account-value-container,
1420
- .flux-vendor-name-container,
1421
- .flux-total-row {
1422
- border-right: ${e=>` 1px solid ${e.theme.colors.grey3}`};
1423
- }
1424
- }
1425
- `,hx=y.div`
1426
- display: flex;
1427
- width: 100%;
1428
- height: 100vh;
1429
- flex-direction: column;
1430
- justify-content: center;
1431
- align-items: center;
1432
- `,px=y.div`
1433
- height: 96px;
1434
- width: 96px;
1435
- background: ${e=>e.theme.colors.background};
1436
- border-radius: 50%;
1437
- cursor: pointer;
1438
- & svg {
1439
- margin: ${r.sp5};
1440
- color: ${e=>e.theme.colors.grey1};
1441
- }
1442
- &:hover {
1443
- & svg {
1444
- color: ${e=>e.theme.colors.primary};
1445
- }
1446
- }
1447
- `,gx=y(nt)`
1448
- margin-top: ${r.sp3};
1449
- color: ${e=>e.theme.colors.hero};
1450
- `,lu="vendorsAccountSection",mx=e=>`${e}_form`;function fx({accountSettings:e,currentFooterFormId:n,onSaveJeAccountSettingsClick:a,setIsJeAccountSettingsOpened:i,onJeAccountSettingsChange:f,setResetJeAccountSettingsForm:x,setCurrentFooterFormId:o}){const l=e.prepaidExpensesRecommendations,p=e.fixedAssetsRecommendations,v=e.accruedExpensesRecommendations,w=c.useMemo(()=>wn(e.prepaidExpensesAccountHierarchy,l,"Accounts"),[e.prepaidExpensesAccountHierarchy,l]),d=c.useMemo(()=>wn(e.fixedAssetsAccountHierarchy,p,"Accounts"),[e.fixedAssetsAccountHierarchy,p]),s=c.useMemo(()=>wn(e.accruedExpensesAccountHierarchy,v,"Accounts"),[e.accruedExpensesAccountHierarchy,v]),C=c.useMemo(()=>yx(e,w,d,s),[e,w,d,s]),S=Fn({mode:"all",reValidateMode:"onBlur",defaultValues:C,values:C,resetOptions:{keepDefaultValues:!0}}),T=S.handleSubmit(u=>{a(u)});return c.useEffect(()=>{const u=S.watch(m=>{m!=null&&Si(()=>(async E=>{f(E)})(m))});return()=>{u.unsubscribe()}}),c.useEffect(()=>(x(()=>S.reset),i(!0),()=>{o("expenseAutomationPage"),i(!1)}),[]),c.useEffect(()=>{const{selectedPrepaidExpensesAccountIds:u,previousPrepaidExpensesAccount:m,selectedFixedAssetsAccountIds:E,previousFixedAssetsAccount:k,selectedAccruedExpensesAccountIds:j,previousAccruedExpensesAccount:D}=e.accountSettingsLocalData,M=Lo(u,m)||Lo(E,k)||Lo(j,D);M===!0&&n!="expenseAutomationJEAccountSettingsPage"?o("expenseAutomationJEAccountSettingsPage"):M===!1&&n!=="expenseAutomationPage"&&o("expenseAutomationPage")},[e,n,o]),t.jsx(xx,{children:t.jsx(Bn,{...S,children:t.jsx("form",{id:mx("expenseAutomationJEAccountSettingsPage"),onSubmit:T,children:t.jsx(Np,{showTitle:!1,sectionId:lu,vendorAccountMappingSection:{accruedExpensesAccountHierarchy:e.accruedExpensesAccountHierarchy,accruedExpensesAccountList:e.accruedExpensesAccountList,accruedExpensesRecommendations:e.accruedExpensesRecommendations,fixedAssetsAccountHierarchy:e.fixedAssetsAccountHierarchy,fixedAssetsAccountList:e.fixedAssetsAccountList,fixedAssetsRecommendations:e.fixedAssetsRecommendations,prepaidExpensesAccountHierarchy:e.prepaidExpensesAccountHierarchy,prepaidExpensesAccountList:e.prepaidExpensesAccountList,prepaidExpensesRecommendations:e.prepaidExpensesRecommendations,selectedAccruedExpensesAccountIds:e.accountSettingsLocalData?.selectedAccruedExpensesAccountIds??[],selectedFixedAssetsAccountIds:e.accountSettingsLocalData?.selectedFixedAssetsAccountIds??[],selectedPrepaidExpensesAccountIds:e.accountSettingsLocalData?.selectedPrepaidExpensesAccountIds??[]},isAccruedExpensesFeatureEnabled:!1})})})})}const xx=y.div`
1451
- padding-top: ${r.sp3};
1452
- display: flex;
1453
- align-items: center;
1454
- min-height: 100%;
1455
- flex-direction: column;
1456
- width: 100%;
1457
- background-color: ${e=>e.theme.colors.grey4};
1458
- `,yx=(e,n,a,i)=>{const f=e.prepaidExpensesAccountList.filter(w=>e.accountSettingsLocalData.selectedPrepaidExpensesAccountIds.includes(w.accountId)),x=e.fixedAssetsAccountList.filter(w=>e.accountSettingsLocalData.selectedFixedAssetsAccountIds.includes(w.accountId)),o=e.accruedExpensesAccountList.filter(w=>e.accountSettingsLocalData.selectedAccruedExpensesAccountIds.includes(w.accountId)),l=f.map(w=>w.qboId).filter(w=>w!=null),p=x.map(w=>w.qboId).filter(w=>w!=null),v=o.map(w=>w.qboId).filter(w=>w!=null);return{[lu]:{prepaidExpensesAccount:{selectedOptions:l,allOptions:n},fixedAssetsAccount:{selectedOptions:p,allOptions:a},accruedExpensesAccount:{selectedOptions:v,allOptions:i}}}},{expenseAutomation:{jeSchedules:mn},common:{currency:oo,review:Cx,ignore:bx,strings:{hyphen:nn},texts:ro},dateFormat:wx,timeframe:{month:Jl}}=$e.getLocalizedStrings(),vx=({draft:e,ignoreStatus:n,ignoreRecommendedJeSchedule:a,jeScheduleClickHandler:i,onReviewClickHandler:f})=>t.jsxs(oa,{onClick:x=>{e.jeScheduleType!=null&&e.jeScheduleId!=null&&i(x,e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":ae("je-schedule-draft-component",e.jeScheduleId),children:[t.jsxs(ia,{children:[t.jsxs(aa,{children:[t.jsxs(ta,{children:[t.jsxs(we,{style:{width:rn,padding:`${r.sp2} ${r.sp3}`},children:[t.jsx(je,{children:ro.vendor}),t.jsxs(_e,{style:{gap:W[2]},children:[e.vendor.logo!=null?t.jsx(Sd,{photoUrl:e.vendor.logo.href,styles:{width:W[4],height:W[4]}}):t.jsx(vn,{name:e.vendor.name}),t.jsx(Se,{display:"block",placement:"bottom",style:{width:"100%"},title:e.vendor.name!=null?t.jsx(ft,{children:e.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(Ae,{className:"highlight",children:e.vendor.name??nn})})]})]}),t.jsxs(we,{children:[t.jsx(je,{children:mn.scheduleHeaders.scheduleCategory}),t.jsx(_e,{children:t.jsx(Se,{display:"block",placement:"bottom",style:{width:"100%"},title:e.baseTransaction.account.accountName!=null?t.jsx(ft,{children:e.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(Ae,{className:"highlight",children:e.baseTransaction.account.accountName??nn})})})]}),t.jsxs(we,{style:{width:On},children:[t.jsx(je,{children:mn.scheduleHeaders.startMonth}),t.jsx(_e,{children:t.jsx(Ae,{className:"highlight",children:e.startDate?.format(wx.visual.MMMCommaYYYYFormat)??nn})})]}),t.jsxs(we,{style:{width:Yt,paddingLeft:W[3]},children:[t.jsx(je,{children:mn.scheduleHeaders.period}),t.jsx(_e,{children:t.jsx(Ae,{className:"highlight",children:e.period!=null?`${e.period} ${e.period===1?Jl.slice(0,-1):Jl}`:nn})})]}),t.jsxs(we,{style:{alignItems:"flex-end",width:Mn},children:[t.jsx(je,{children:ro.totalAmount}),t.jsx(_e,{children:t.jsx(Se,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(ft,{children:ht("0,0.[00]",_n(e.baseTransaction.amount.amount,oo.currencyCode,oo.currencySymbol))??nn}),children:t.jsx(Ae,{className:"highlight",children:ht("0,0.[00]",_n(e.baseTransaction.amount.amount,oo.currencyCode,oo.currencySymbol))??nn})})})]})]}),t.jsxs(na,{children:[t.jsxs(we,{style:{width:rn,padding:`${r.sp2} ${r.sp3}`},children:[t.jsx(je,{children:ro.category}),t.jsx(_e,{children:t.jsx(Se,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.account?.accountName!=null?t.jsx(ft,{children:e.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(Ae,{className:"highlight",children:e.jeDebit.account?.accountName??nn})})})]}),t.jsxs(we,{children:[t.jsx(je,{children:ro.classText}),t.jsx(_e,{children:t.jsx(Se,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.accountingClass?.className!=null?t.jsx(ft,{children:e.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(Ae,{className:"highlight",children:e.jeDebit.accountingClass?.className??nn})})})]}),t.jsxs(we,{style:{width:On},children:[t.jsx(je,{children:mn.scheduleHeaders.type}),t.jsx(_e,{children:t.jsx(Ae,{className:"highlight",style:{width:"unset"},children:t.jsx(Xd,{children:mn.scheduleTypes[e.jeScheduleType??"prepaid_expenses"]})})})]}),e.jeScheduleType==="fixed_assets"?t.jsxs(we,{style:{width:Yt,paddingLeft:W[3]},children:[t.jsx(je,{children:mn.scheduleHeaders.accumulatedCategory}),t.jsx(_e,{children:t.jsx(Se,{display:"block",placement:"bottom",title:e.jeCredit.account?.accountName!=null?t.jsx(ft,{children:e.jeCredit.account?.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(Ae,{className:"highlight",children:e.jeCredit.account?.accountName??nn})})})]}):null,e.jeScheduleType!=="fixed_assets"?t.jsx(we,{style:{width:Yt}}):null,t.jsx(we,{style:{width:Mn}})]})]}),t.jsxs(ra,{children:[t.jsx(fi,{onClick:()=>{e.jeScheduleId!=null&&e.jeScheduleType!=null&&f(e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":ae("je-schedule-draft-component-review-button",e.jeScheduleId),label:Cx,variant:"primary",size:"small",className:"item-value-container",style:{minWidth:69}}),t.jsx(fi,{"data-testid":ae("je-schedule-draft-component-ignore-button",e.jeScheduleId),className:"item-value-container",label:bx,size:"small",reverseSpinnerColor:!1,loading:n?.fetchState==="In-Progress",onClick:()=>{e.jeScheduleType!=null&&a(e.jeScheduleTransactionKey,e.jeScheduleType)},style:{minWidth:69}})]})]}),t.jsxs(i0,{children:[t.jsx(Sx,{}),t.jsx(kx,{children:mn.aiAccountant}),t.jsx($x,{children:mn.zeniGPTText})]})]}),Sx=y(Sn)`
1459
- height: ${r.sp3};
1460
- width: ${r.sp3};
1461
- margin-right: ${r.sp1};
1462
- path {
1463
- stroke-width: 2;
1464
- }
1465
- `,kx=y(xd)`
1466
- color: ${e=>e.theme.colors.brandColorSapphire};
1467
- `,$x=y(Me)`
1468
- color: ${e=>e.theme.colors.primary};
1469
- `,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:Zl}}},expenseAutomation:{jeSchedules:rt},common:{currency:Wt,retry:Ex,strings:{hyphen:gt,empty:Ql},texts:Vn},dateFormat:Xl}=$e.getLocalizedStrings(),{common:Tx,timeframe:{month:ec}}=$e.getLocalizedStrings(),Nt="jeSchedulePage",tc=e=>`${e}_form`,sa=(e,n)=>`${e}.${n}`,nc=sa(Nt,"vendor"),ic=sa(Nt,"scheduleExpenseCategory"),oc=sa(Nt,"accumulatedDepreciationCategory"),jx=({allAccountGroupedOptions:e,allAccountList:n,allClassGroupedOptions:a,allClassList:i,allDepAccountGroupedOptions:f,allDepAccountList:x,draft:o,localData:l,postStatus:p,uncategorizedAccounts:v,vendorSearchAutoCompleteActions:w,vendorSearchAutoCompleteData:d,jeScheduleClickHandler:s,onFormDataChange:C,onPostJESchedule:S})=>{const{updatedAccumulatedDepreciationCategoryID:T,updatedCategoryId:u,updatedVendor:m}=l,E={vendor_deleted:"updatedVendor",debit_category_deleted:"updatedCategoryId",credit_category_deleted:"updatedAccumulatedDepreciationCategoryID",qbo_authorization_error:"jeScheduleID",qbo_book_close_date_error:"jeScheduleID",qbo_error:"jeScheduleID",qbo_invalid_company_status_error:"jeScheduleID"},k=c.useRef(),j=Fn({mode:"all",reValidateMode:"onChange",defaultValues:rc(l,e,a,f,n,i,x,d.entityAutoCompleteView),values:rc(l,e,a,f,n,i,x,d.entityAutoCompleteView)}),D={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:r.sp4}),menu:()=>({width:300})},M={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:r.sp4}),menu:()=>({width:350})},_=(o?.scheduledJournalEntry.error??[]).every(L=>{const U=E[L];return!(l!=null&&U&&(U==="updatedAccumulatedDepreciationCategoryID"&&l.updatedAccumulatedDepreciationCategoryID==null||U==="updatedCategoryId"&&l.updatedCategoryId==null||U==="updatedVendor"&&(l.updatedVendor?.id==null||l.updatedVendor?.id===""||l.updatedVendor?.name==null||l.updatedVendor?.name==="")))});c.useEffect(()=>{const L=j.watch((U,{name:Q})=>{Q!=null&&U!=null&&Si(()=>(async(Y,z)=>{if(Y!=null){const H=z[Nt],{scheduledJournalEntryID:V,vendor:G}=H;if(Y.includes("vendor")){const oe=G?.defaultOptions.map(se=>se.value);if(G?.selectedOption!=null&&oe?.includes(G.selectedOption)!==!0){const se=d.entityAutoCompleteView.vendor.find(q=>q.id===G.selectedOption);se!=null&&j.setValue(`${Nt}.vendor.defaultOptions`,[{label:se.name??Tx.strings.empty,value:se.id}])}else G?.selectedOption==null&&G?.defaultOptions.length!==0&&j.setValue(`${Nt}.vendor`,{selectedOption:void 0,defaultOptions:[]})}C(V,{...H,vendor:G})}})(Q,U))});return()=>{L.unsubscribe()}}),c.useEffect(()=>{d.entityAutoCompleteView.fetchState==="Completed"&&k.current?.(kd(d.entityAutoCompleteView))},[d.entityAutoCompleteView.fetchState]);const R=j.handleSubmit(()=>{S(o.scheduledJournalEntry.scheduledJournalEntryID,o.jeScheduleTransactionKey)}),A=L=>[v.expense?.qboId,v.income?.qboId].includes(L),F=j.watch("jeSchedulePage.vendor"),K=o.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,ee=o.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,te=o.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,Z=o.vendor.name.split("(deleted)")[0]?.toString(),B=o.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??Ql,O=o.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??Ql,[g,h]=c.useState(ee===!0&&u==null),[N,$]=c.useState(te===!0&&T==null),[b,I]=c.useState(K&&(m?.id==null||m?.id==""));return c.useEffect(()=>{g===!1&&l.updatedCategoryId==null&&j.setFocus(ic),N===!1&&l.updatedAccumulatedDepreciationCategoryID==null&&j.setFocus(oc),b===!1&&l.updatedVendor?.id==null&&j.setFocus(nc)},[g,N,b,l,j]),t.jsx(Bn,{...j,children:t.jsx("form",{style:{width:"100%"},id:tc(`${Nt}_${o.jeScheduleId}`),onSubmit:R,children:t.jsx(oa,{showBorder:_,onClick:L=>{o.jeScheduleType!=null&&o.jeScheduleId!=null&&s(L,o.jeScheduleId,o.jeScheduleTransactionKey,o.jeScheduleType)},"data-testid":ae("je-schedule-resolve-component-schedule",`${Nt}_${o.jeScheduleId}`),children:t.jsxs(ia,{children:[t.jsxs(aa,{children:[t.jsxs(ta,{children:[K===!0?t.jsx(we,{style:{width:rn,padding:W[0],justifyContent:"center"},showHoverEffect:K,forceHoverEffect:b===!1&&(l?.updatedVendor?.id==null||l?.updatedVendor?.id==""),children:t.jsxs(Kt,{className:"hover-background",style:{padding:`${r.sp2} ${r.sp3}`},children:[t.jsxs(je,{style:{display:"flex",alignItems:"center",gap:W[1]},children:[Vn.vendor,t.jsx(Se,{display:"flex",placement:"top-start",title:t.jsx(yo,{children:rt.tooltipText.missingVendor.replace("_deleted_vendor_",Z)}),children:t.jsx(Xo,{})})]}),t.jsx(_e,{style:{gap:W[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:b===!0?t.jsxs(Ae,{onClick:L=>{L.stopPropagation(),I(!1)},"data-testid":ae("je-schedule-resolve-component-add-vendor-button",`${Nt}_${o.jeScheduleId}`),style:{display:"inline-flex",alignItems:"center",gap:W[2],color:fe.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Qo,{}),Zl]}):t.jsx(Er,{name:nc,placeholder:Zl,valueToId:L=>L,defaultValue:{selectedOption:F?.selectedOption,defaultOptions:F?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:r.sp4})},registerOptions:{required:!0,validate:L=>!!L.selectedOption},loadOptions:(L,U)=>{w.onAutoCompleteInputChange?.(L,"vendor"),k.current=U}})})})]})}):t.jsxs(we,{style:{width:rn,padding:`${r.sp2} ${r.sp0} ${r.sp2} ${r.sp3}`},children:[t.jsx(je,{children:Vn.vendor}),t.jsx(_e,{children:t.jsxs(t.Fragment,{children:[o.vendor.logo?.href!=null?t.jsx(Sd,{photoUrl:o.vendor.logo.href,styles:{width:W[4],height:W[4]}}):t.jsx(vn,{name:o.vendor.name}),t.jsx(Se,{display:"block",placement:"bottom",style:{width:"100%"},title:o.vendor.name!==null?t.jsx(ft,{children:o.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(Ae,{className:"highlight",children:o.vendor.name??gt})})]})})]}),t.jsxs(we,{children:[t.jsx(je,{children:rt.scheduleHeaders.scheduleCategory}),t.jsx(_e,{children:t.jsx(Se,{display:"block",placement:"bottom",style:{width:"100%"},title:o.baseTransaction.account.accountName!=null?t.jsx(ft,{children:o.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(Ae,{className:"highlight",children:o.baseTransaction.account.accountName??gt})})})]}),t.jsxs(we,{style:{width:On},children:[t.jsx(je,{children:rt.scheduleHeaders.startMonth}),t.jsx(_e,{children:t.jsx(Ae,{className:"highlight",children:o.startDate?.format(Xl.visual.MMMCommaYYYYFormat)??gt})})]}),t.jsxs(we,{style:{width:Yt,paddingLeft:W[3]},children:[t.jsx(je,{children:rt.scheduleHeaders.period}),t.jsx(_e,{children:t.jsx(Ae,{className:"highlight",children:o.period!=null?`${o.period} ${o.period===1?ec.slice(0,-1):ec}`:gt})})]}),t.jsxs(we,{style:{alignItems:"flex-end",width:Mn},children:[t.jsx(je,{children:Vn.totalAmount}),t.jsx(_e,{children:t.jsx(Se,{display:"block",placement:"bottom",title:t.jsx(ft,{children:ht("0,0.[00]",_n(o.baseTransaction.amount.amount,Wt.currencyCode,Wt.currencySymbol))??gt}),children:t.jsx(Ae,{className:"highlight",children:ht("0,0.[00]",_n(o.baseTransaction.amount.amount,Wt.currencyCode,Wt.currencySymbol))??gt})})})]})]}),t.jsxs(na,{children:[ee===!0?t.jsx(we,{showHoverEffect:ee===!0,forceHoverEffect:l?.updatedCategoryId==null&&g===!1,style:{padding:"unset",justifyContent:"center",width:rn},children:t.jsxs(Kt,{className:"hover-background",children:[t.jsxs(je,{style:{display:"flex",alignItems:"center",gap:W[1]},children:[Vn.category,ee===!0?t.jsx(Se,{display:"flex",placement:"top-start",title:t.jsx(yo,{children:rt.tooltipText.missingCategory.replace("_deleted_category_",B)}),children:t.jsx(Xo,{})}):null]}),t.jsx(_e,{className:"item-value-container",style:{marginLeft:ee===!0?-2:0},children:ee===!0?t.jsx(t.Fragment,{children:g===!0?t.jsxs(Ae,{onClick:L=>{L.stopPropagation(),h(!1)},style:{display:"inline-flex",alignItems:"center",gap:W[1],color:fe.brandColorGoldDark,cursor:"pointer"},"data-testid":ae("je-schedule-resolve-component-add-category-button",`${Nt}_${o.jeScheduleId}`),children:[t.jsx(Qo,{}),rt.addCategory]}):t.jsx(Yn,{shouldShowChevronIcon:!1,name:ic,placeholder:rt.addCategory,valueToId:L=>(U=>n.filter(Q=>Q.qboId===U)[0]?.qboId)(L),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:L=>!!L.selectedOption},disableCurrentOption:A,customStyleConfig:D})}):t.jsx(Se,{display:"block",placement:"bottom",style:{width:"100%"},title:o.jeDebit.account?.accountName!=null?t.jsx(ft,{children:o.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(Ae,{className:"highlight",children:o.jeDebit.account?.accountName??gt})})})]})}):t.jsxs(we,{style:{width:rn,padding:`${r.sp2} ${r.sp3}`},children:[t.jsx(je,{style:{display:"flex",alignItems:"center",gap:W[1]},children:Vn.category}),t.jsx(_e,{className:"item-value-container",children:t.jsx(Se,{display:"block",placement:"bottom",style:{width:"100%"},title:o.jeDebit.account?.accountName!=null?t.jsx(ft,{children:o.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(Ae,{className:"highlight",children:o.jeDebit.account?.accountName??gt})})})]}),t.jsxs(we,{children:[t.jsx(je,{style:{display:"flex",alignItems:"center",gap:W[1]},children:Vn.classText}),t.jsx(_e,{children:t.jsx(Se,{display:"block",placement:"bottom",style:{width:"100%"},title:o.jeDebit.accountingClass?.className!=null?t.jsx(ft,{children:o.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(Ae,{className:"highlight",children:o.jeDebit.accountingClass?.className??gt})})})]}),t.jsxs(we,{style:{width:On},children:[t.jsx(je,{children:rt.scheduleHeaders.type}),t.jsx(_e,{className:"test",children:t.jsx(Ae,{className:"highlight",style:{width:"unset"},children:t.jsx(Xd,{children:rt.scheduleTypes[o.jeScheduleType??"prepaid_expenses"]})})})]}),o.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:te===!0?t.jsx(we,{style:{width:Yt,padding:"unset",justifyContent:"center"},showHoverEffect:te,forceHoverEffect:l.updatedAccumulatedDepreciationCategoryID==null&&N===!1,children:t.jsxs(Kt,{className:"hover-background",style:{padding:W[2],paddingLeft:W[3]},children:[t.jsxs(je,{style:{display:"flex",alignItems:"center",gap:W[1]},children:[rt.scheduleHeaders.accumulatedCategory,te===!0?t.jsx(Se,{display:"flex",placement:"top-end",title:t.jsx(yo,{children:rt.tooltipText.missingDepCategory.replace("_deleted_dep_category_",O)}),children:t.jsx(Xo,{})}):null]}),t.jsx(_e,{className:"item-value-container",style:{marginLeft:te===!0?-2:0},children:te===!0?t.jsx(t.Fragment,{children:N===!0?t.jsxs(Ae,{onClick:L=>{L.stopPropagation(),$(!1)},style:{display:"inline-flex",alignItems:"center",gap:W[1],color:fe.brandColorGoldDark,cursor:"pointer"},"data-testid":ae("je-schedule-resolve-component-add-depreciation-category-button",`${Nt}_${o.jeScheduleId}`),children:[t.jsx(Qo,{}),rt.addDepCategory]}):t.jsx(Yn,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:oc,placeholder:rt.addDepCategory,valueToId:L=>(U=>x.filter(Q=>Q.qboId===U)[0]?.qboId)(L),defaultValue:{allOptions:f},registerOptions:{required:!0,validate:L=>!!L.selectedOption},customStyleConfig:M,disableCurrentOption:A})}):t.jsx(Se,{display:"block",placement:"bottom",title:o.jeCredit.account?.accountName!=null?t.jsx(ft,{children:o.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(Ae,{className:"highlight",children:o.jeCredit.account?.accountName??gt})})})]})}):t.jsxs(we,{style:{width:Yt,padding:`${r.sp2} ${r.sp2} ${r.sp2} ${r.sp3}`,justifyContent:"center"},children:[t.jsx(je,{style:{display:"flex",alignItems:"center",gap:W[1]},children:rt.scheduleHeaders.accumulatedCategory}),t.jsx(Se,{display:"block",placement:"bottom",title:o.jeCredit.account?.accountName!=null?t.jsx(ft,{children:o.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(Ae,{className:"highlight",children:o.jeCredit.account?.accountName??gt})})]})}):null,o.jeScheduleType!=="fixed_assets"?t.jsx(we,{style:{width:Yt}}):null,t.jsx(we,{style:{width:Mn}})]}),t.jsxs(t0,{children:[t.jsx(we,{style:{padding:"unset",width:rn},children:t.jsxs(n0,{children:[t.jsx(je,{children:rt.scheduleHeaders.jePostingDate}),t.jsx(_e,{children:t.jsx(Ae,{className:"highlight",children:o.scheduledJournalEntry.expectedPostDate.format(Xl.visual.MMMDCommaYYFormat)??gt})})]})}),t.jsxs(we,{children:[t.jsx(je,{children:rt.scheduleHeaders.balance}),t.jsx(_e,{children:t.jsx(Se,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(ft,{children:ht("0,0.[00]",_n(o?.scheduledJournalEntry?.runningBalance?.amount??0,Wt.currencyCode,Wt.currencySymbol))??gt}),children:t.jsx(Ae,{className:"highlight",children:ht("0,0.[00]",_n(o?.scheduledJournalEntry?.runningBalance?.amount??0,Wt.currencyCode,Wt.currencySymbol))??gt})})})]}),t.jsxs(we,{style:{width:On},children:[t.jsx(je,{children:rt.scheduleHeaders.months}),t.jsx(_e,{children:t.jsxs(Ae,{className:"highlight",children:[o.scheduledJournalEntry.expectedPostDate.diff(o.startDate,"month")+1,"/",o.period]})})]}),t.jsx(we,{style:{width:Yt}}),t.jsxs(we,{style:{alignItems:"flex-end",width:Mn},children:[t.jsx(je,{children:rt.scheduleHeaders.amountForMonth}),t.jsx(_e,{children:t.jsx(Ae,{className:"highlight",children:ht("0,0.[00]",_n(o.scheduledJournalEntry.amount?.amount??0,Wt.currencyCode,Wt.currencySymbol))??gt})})]})]})]}),t.jsx(ra,{children:t.jsx(fi,{form:tc(`${Nt}_${o.jeScheduleId}`),label:Ex,variant:"primary",className:"item-value-container",type:"submit",loading:p?.fetchState==="In-Progress",size:"small",disabled:!_,style:{minWidth:69}})})]})})})})},rc=(e,n,a,i,f,x,o,l)=>{const p=e.updatedCategoryId,v=e.updatedVendor,w=v!=null?l.vendor.find(u=>u.zeniId===v.id):void 0,d=e.updatedAccumulatedDepreciationCategoryID,s=e.updatedClassId,C=p!=null?f.find(u=>u.accountId===p):void 0,S=d!=null?o.find(u=>u.accountId===d):void 0,T=s!=null?x.find(u=>u.classId===s):void 0;return{[Nt]:{jeScheduleID:e.jeScheduleID,scheduledJournalEntryID:e.scheduledJournalEntryID,jeScheduleType:e.jeScheduleType,scheduleExpenseCategory:{selectedOption:C?.qboId,allOptions:n},accumulatedDepreciationCategory:{selectedOption:S?.qboId,allOptions:i},vendor:{selectedOption:w?.id??v?.id,defaultOptions:jd(l,w??v)},scheduleClass:{selectedOption:T?.classId,allOptions:a}}}},Qo=y(_o)`
1470
- width: ${r.sp3};
1471
- height: ${r.sp3};
1472
- `,Xo=y(Nd)`
1473
- width: 12px;
1474
- height: 12px;
1475
- color: ${fe.important};
1476
- `;function cu(){return t.jsx(qd,{children:t.jsxs(Jd,{children:[t.jsxs(Zd,{children:[t.jsx(Je,{width:W[9],height:27,style:{marginBottom:W[2]}}),t.jsx(ac,{})]}),t.jsxs(Qd,{children:[t.jsx(Je,{width:W[9],height:27,style:{marginBottom:W[2]}}),t.jsx(ac,{})]})]})})}const ac=()=>t.jsx(oa,{style:{minWidth:1088},children:t.jsxs(ia,{children:[t.jsxs(aa,{children:[t.jsxs(ta,{children:[t.jsxs(we,{style:{width:rn,padding:`${r.sp2} ${r.sp3}`},children:[t.jsx(je,{children:t.jsx(Je,{width:W[10],height:14})}),t.jsxs(_e,{style:{gap:W[2]},children:[t.jsx(ki,{height:W[4],width:W[4]}),t.jsx(Je,{height:W[4],width:W[10]})]})]}),t.jsxs(we,{children:[t.jsx(je,{children:t.jsx(Je,{width:101,height:14})}),t.jsx(_e,{children:t.jsx(Je,{height:W[4],width:203})})]}),t.jsxs(we,{style:{width:On},children:[t.jsx(je,{children:t.jsx(Je,{width:W[9],height:14})}),t.jsx(_e,{children:t.jsx(Je,{height:W[4],width:71})})]}),t.jsxs(we,{style:{width:Yt,paddingLeft:W[3]},children:[t.jsx(je,{children:t.jsx(Je,{width:107,height:14})}),t.jsx(Je,{height:W[4],width:68})]}),t.jsxs(we,{style:{alignItems:"flex-end",width:Mn},children:[t.jsx(je,{children:t.jsx(Je,{width:73,height:14})}),t.jsx(_e,{children:t.jsx(Je,{height:W[4],width:49})})]})]}),t.jsxs(na,{children:[t.jsxs(we,{style:{width:rn,padding:`${r.sp2} ${r.sp3}`},children:[t.jsx(je,{children:t.jsx(Je,{width:49,height:14})}),t.jsx(_e,{children:t.jsx(Je,{height:W[4],width:158})})]}),t.jsxs(we,{children:[t.jsx(je,{children:t.jsx(Je,{width:36,height:14})}),t.jsx(_e,{children:t.jsx(Je,{height:W[4],width:88})})]}),t.jsxs(we,{style:{width:On},children:[t.jsx(je,{children:t.jsx(Je,{width:36,height:14})}),t.jsx(_e,{children:t.jsx(Je,{height:W[4],width:100})})]}),t.jsx(we,{style:{width:Yt,paddingLeft:W[3]}}),t.jsx(we,{style:{width:Mn}})]})]}),t.jsxs(ra,{children:[t.jsx(Je,{height:29,width:53,style:{margin:`${r.sp0} ${r.sp3}`}}),t.jsx(Je,{height:29,width:53,style:{margin:`${r.sp0} ${r.sp3}`}})]})]})}),Je=y(pt)`
1477
- border-radius: ${r.sp1};
1478
- `,{common:{create:Nx,resolve:_x}}=$e.getLocalizedStrings();function Rx({jeSchedules:e,vendorSearchAutoCompleteData:n,handleJeScheduleClick:a,onJESchedulesFormDataChange:i,onPostJESchedule:f,ignoreRecommendedJeSchedule:x,vendorSearchAutoCompleteActions:o,setCurrentFooterFormId:l}){const p=e.draftSchedules,v=e.jeScheduleLocalDataById,w=e.postStatusById,d=e.ignoreStatusById,s=c.useRef(!1),[C,S]=c.useState(!1),T=c.useRef(F=>{F&&!s.current&&(s.current=!0,S(!0))});vi({componentName:"expense_automation.je_schedules",enabled:C});const u=e.resolveSchedules,m=e.uncategorizedAccounts,{allAccountList:E,allClassList:k,allDepreciationAccountList:j}=e,D=wn(e.accountListNestedAccountHierarchy),M=wn(e.allDepreciationAccountListNestedAccountHierarchy),_=po(e.classListNestedAccountHierarchy),R=(F,K,ee)=>{a(F,K,ee)},A=(F,K,ee,te)=>{let Z=F.target;for(;Z;){if(Z.classList.contains("item-value-container")||Z.classList.contains("hover-background")||Z.classList.contains("auto-complete-single-select-field__input")||Z.classList.contains("auto-complete-single-select-field__option")||Z.classList.contains("grouped-single-select-field__input")||Z.classList.contains("grouped-single-select-field__menu"))return;Z=Z.parentElement}a(K,ee,te)};return c.useEffect(()=>{if(u.length!==0){for(const F in v)if(Object.prototype.hasOwnProperty.call(v,F)){const{updatedAccumulatedDepreciationCategoryID:K,updatedCategoryId:ee,updatedVendor:te}=v[F];if(K!=null||ee!=null||te!=null&&te?.id!==""){l("expenseAutomationJESchedulePage");break}l("expenseAutomationPage")}}else u.length===0&&l("expenseAutomationPage")}),c.useEffect(()=>()=>{l("expenseAutomationPage")},[]),e.fetchState==="In-Progress"?t.jsx(cu,{}):p.length!==0||u.length!==0?t.jsx(qd,{children:t.jsxs(Jd,{children:[p.length>0?t.jsxs(Zd,{children:[t.jsxs(cc,{children:[Nx,t.jsx(dc,{isCircular:p.length<10,children:t.jsx(uc,{children:p.length})})]}),t.jsx(sc,{"data-testid":ae("expense-automation","draft-je-schedules"),children:p.map((F,K)=>t.jsx(lc,{ref:T.current,children:t.jsx(vx,{ignoreStatus:d[F.jeScheduleTransactionKey],ignoreRecommendedJeSchedule:x,onReviewClickHandler:R,jeScheduleClickHandler:A,draft:F})},`${K}_${F.jeScheduleId}`))})]}):null,u.length>0?t.jsxs(Qd,{children:[t.jsxs(cc,{children:[_x,t.jsx(dc,{isCircular:u.length<10,children:t.jsx(uc,{children:u.length})})]}),t.jsx(sc,{"data-testid":ae("expense-automation","resolve-je-schedules"),children:u.map((F,K)=>v[F.scheduledJournalEntry.scheduledJournalEntryID]==null?null:t.jsx(lc,{ref:T.current,children:t.jsx(jx,{vendorSearchAutoCompleteActions:o,vendorSearchAutoCompleteData:n,jeScheduleClickHandler:A,onPostJESchedule:f,uncategorizedAccounts:m,allAccountList:E,allAccountGroupedOptions:D,allClassGroupedOptions:_,allClassList:k,allDepAccountGroupedOptions:M,allDepAccountList:j,draft:F,postStatus:w[F.scheduledJournalEntry.scheduledJournalEntryID],localData:v[F.scheduledJournalEntry.scheduledJournalEntryID],onFormDataChange:i})},`${K}_${F.jeScheduleTransactionKey}`))})]}):null]})}):null}const sc=y.div`
1479
- display: flex;
1480
- flex-direction: column;
1481
- gap: ${r.sp4};
1482
- min-width: 1088px;
1483
- `,lc=y.div``,cc=y(wi)`
1484
- color: ${e=>e.theme.colors.primary};
1485
- padding: ${r.sp2} ${r.sp0};
1486
- display: flex;
1487
- align-items: center;
1488
- gap: ${r.sp1};
1489
- `,dc=y.div`
1490
- border-radius: ${r.sp12};
1491
- display: flex;
1492
- justify-content: center;
1493
- border: ${e=>`1px solid ${e.theme.colors.grey1}`};
1494
- color: ${e=>e.theme.colors.hero};
1495
- ${e=>e.isCircular?ke`
1496
- height: ${r.sp3};
1497
- width: ${r.sp3};
1498
- padding: ${r.sp0};
1499
- `:ke`
1500
- height: 18px;
1501
- padding: ${Oh.padding};
1502
- `}
1503
- `,uc=y(Mh)`
1504
- color: ${e=>e.theme.colors.hero};
1505
- height: 100%;
1506
- width: 100%;
1507
- display: flex;
1508
- align-items: center;
1509
- justify-content: center;
1510
- color: inherit;
1511
- `;function Ix({expenseAutomationViewSelector:e,currentFooterFormId:n,setResetJeAccountSettingsForm:a,vendorSearchAutoCompleteData:i,onJESchedulesFormDataChange:f,onPostJESchedule:x,handleJeScheduleClick:o,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:p,ignoreRecommendedJeSchedule:v,vendorSearchAutoCompleteActions:w,setCurrentFooterFormId:d,setIsJeAccountSettingsOpened:s}){const{jeSchedules:C}=e;return C.fetchState==="In-Progress"||C.accountSettingsView.fetchState==="In-Progress"?t.jsx(cu,{}):C.accountSettingsView.fetchState==="Completed"&&C.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length===0&&C.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length===0?t.jsx(fx,{setIsJeAccountSettingsOpened:s,setResetJeAccountSettingsForm:a,currentFooterFormId:n,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:p,accountSettings:C.accountSettingsView,setCurrentFooterFormId:d}):C.fetchState==="Completed"&&C.draftSchedules.length===0&&C.resolveSchedules.length===0?t.jsx(zt,{tab:e.currentSelectedView,title:et(e.currentSelectedView).allDoneText.title,subTitle:et(e.currentSelectedView).allDoneText.subTitle}):C.fetchState==="Completed"?t.jsx(Rx,{setCurrentFooterFormId:d,handleJeScheduleClick:o,ignoreRecommendedJeSchedule:v,jeSchedules:e.jeSchedules,onJESchedulesFormDataChange:f,onPostJESchedule:x,vendorSearchAutoCompleteActions:w,vendorSearchAutoCompleteData:i}):null}const Ax=["receipts"],hc=e=>Yr(e,Ax),{common:{texts:{vendor:Lx,amount:Dx,receipts:Ox,category:Mx,classText:Px,date:Fx}}}=$e.getLocalizedStrings(),du={key:"vendor",value:Lx,sortOrder:"ascending",width:new pe(18,18)},Bx={key:"category",value:Mx,sortOrder:"ascending",width:new pe(18,18)},zx={key:"class",value:Px,sortOrder:"ascending",width:new pe(18,18)},Hx={key:"date",value:Fx,sortOrder:"descending",width:new pe(11,11)},Ux={key:"receipts",value:Ox,sortOrder:"descending",width:new pe(6,6)},uu={key:"amount",value:Dx,sortOrder:"ascending",width:new pe(10,10)},pi=[du,Bx,zx,Hx,Ux,uu],hu=[{...du,width:new pe(65,65)},{...uu,width:new pe(30,30)}],pc="date",Vx="descending",pu=({sortConfig:e,isDisabled:n,onColumnSortConfigChanged:a})=>{const i=Ie(),f=lt(),x=f?hu:pi,[o,l]=c.useState(x);c.useEffect(()=>{const v=[...x];for(const w of v)w.key===e.sortKey?w.sortOrder=e.sortOrder:w.sortOrder="ascending";l(v)},[e.sortKey,e.sortOrder,f]);const p=(v,w)=>{let d=w;e.sortKey===v&&(d=w==="ascending"?"descending":"ascending"),a(v,d)};return t.jsx(Wx,{windowSize:i,isQuickViewMode:f,children:o.map((v,w)=>{const d=n!=null||hc(v.key)!=null;return t.jsxs(Kx,{sortDataValue:e.sortKey,actualDataValue:v.key,wrapperWidth:v.width,isSortDisabled:d,windowSize:i,isQuickViewMode:f,isLastItem:w===o.length-1,style:v.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(Zx,{onClick:()=>d?null:(s=>{hc(s.key)==null&&p(xp(s.key),s.sortOrder)})(v),isSortDisabled:d,children:[t.jsx(Qx,{children:v.value}),d?null:t.jsx(Yx,{sortConfig:e,headerData:v,children:t.jsx(Jx,{})})]}),d?null:t.jsx(qx,{isSortDisabled:d,sortDataValue:e.sortKey,isVisible:e.sortKey===v.key&&e.sortKey!==pc,children:t.jsx(Gx,{onClick:()=>{d||p(pc,Vx)},"data-testid":ae("missing-receipts-header-close-icon",v.key)})})]},v.key)})})},Wx=y.div`
1512
- top: ${r.sp0};
1513
- left: ${r.sp0};
1514
- height: ${50}px;
1515
- z-index: 2;
1516
- display: flex;
1517
- flex-wrap: nowrap;
1518
- align-items: center;
1519
- box-sizing: border-box;
1520
- background-color: ${e=>e.theme.colors.grey4};
1521
- position: sticky;
1522
- width: 100%;
1523
- justify-content: space-between;
1524
-
1525
- ${e=>e.isQuickViewMode===!0?ke`
1526
- width: 32%;
1527
- max-width: var(--side-panel-list-width, 100%);
1528
- `:ke`
1529
- padding: ${r.sp0} ${r.sp3};
1530
- `}
1531
- `,Kx=y.div`
1532
- color: ${e=>e.sortDataValue!==e.actualDataValue||e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
1533
- padding-left: ${r.sp0};
1534
- left: ${r.sp0};
1535
- display: flex;
1536
- align-items: center;
1537
- gap: 6px;
1538
- justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
1539
- position: static;
1540
- z-index: 0;
1541
- box-sizing: border-box;
1542
- flex-shrink: 0;
1543
- ${e=>e.isQuickViewMode===!0?ke`
1544
- width: calc(
1545
- ${e.wrapperWidth.valuePercentage(e.windowSize)} -
1546
- ${r.sp4}
1547
- );
1548
- min-width: calc(
1549
- ${e.wrapperWidth.valuePercentage(e.windowSize)} -
1550
- ${r.sp4}
1551
- );
1552
- max-width: calc(
1553
- ${e.wrapperWidth.valuePercentage(e.windowSize)} -
1554
- ${r.sp4}
1555
- );
1556
- `:ke`
1557
- width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
1558
- min-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
1559
- max-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
1560
- `}
1561
- `,Gx=y(Ei)`
1562
- width: ${r.sp2};
1563
- height: ${r.sp2};
1564
- cursor: pointer;
1565
- `,Yx=y.div`
1566
- display: flex;
1567
- align-items: center;
1568
- transform: ${e=>e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
1569
- `,qx=y.div`
1570
- display: ${e=>e.isVisible?"flex":"none"};
1571
- align-items: center;
1572
- cursor: ${e=>e.isSortDisabled===!0?"not-allowed":"pointer"};
1573
- &:hover {
1574
- color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
1575
- }
1576
- `,Jx=y($i)`
1577
- width: ${r.sp2};
1578
- height: ${r.sp2};
1579
- `,Zx=y.div`
1580
- display: flex;
1581
- cursor: ${e=>e.isSortDisabled===!0?"not-allowed":"pointer"};
1582
- gap: 6px;
1583
- &:hover {
1584
- color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
1585
- }
1586
- `,Qx=y(at)`
1587
- display: flex;
1588
- `,{common:{strings:{underscore:gu,hyphen:er,empty:gc},documents:{singleFileUploadSizeErrorMessage:Xx,multipleFileUploadSizeErrorMessage:ey},snackBar:{missing_receipts_attachment:{failed:ty}},tooltips:{addMissingReceipt:ny}},dateFormat:iy}=$e.getLocalizedStrings(),Wn={containerPaddingLeftRight:new pe(W[3],W[4]),containerPaddingTopBottom:new pe(W[2],W[3])},oy=({transaction:e,uploadReceiptsFetchState:n,receiptUploadEndpoint:a,authParams:i,selectedPeriod:f,onUploadReceiptComplete:x,onMissingReceiptsRowClick:o,onUploadReceiptFetchStatus:l,onUploadReceiptAttachment:p})=>{const v=Ie(),w=lt(),d=c.useRef(null),s=c.useCallback(async(u,m,E,k,j)=>{l(e.id,"In-Progress"),await _p(u,m,E,k,j).then(({uploadResponse:D,errorMessage:M})=>{D!=null?D.transaction.attachments!=null&&(p(D.transaction),setTimeout(()=>x(D.transaction,f),2e3)):l(e.id,"Error",{code:500,message:ty},M)}).catch(D=>{l(e.id,"Error",D)})},[e.id,f,p,x,l]),C=c.useCallback(u=>{if(u.target.files!=null){const m=u.target.files,E=[],k=[];for(let j=0;j<m.length;j++)E.push(m[j].name),k.push(m[j]);s(a,i,m[0],m[0].name,{id:e.id,type:e.type})}},[i,s,a,e.id,e.type]),S=c.useCallback(()=>{w||d.current?.click()},[d,w]),T=w?hu:pi;return t.jsx(mu,{className:"missing-receipts-row-card",windowSize:v,isQuickViewMode:w,onClick:()=>o(e.id,e.type),"data-testid":ae("missing-receipts-list-row",e.id),children:T.map((u,m)=>{const E=`${e.id}${gu}${u.key}`;switch(u.key){case"vendor":default:return t.jsx(Rn,{windowSize:v,wrapperWidth:u.width,isQuickViewMode:w,children:t.jsx(In,{windowSize:v,isLastItem:m===T.length-1,children:t.jsxs(Co,{children:[t.jsx(Ti,{photoUrl:e.vendorId!=null?e.logo?.toString()??gc:gc,styles:{width:r.sp4,height:r.sp4,borderRadius:r.sp0},placeholder:{width:W[4],height:W[4]},fallbackAvatar:t.jsx(uy,{children:t.jsx(vn,{name:e.vendorName??e.description,size:r.sp4})})}),t.jsx(tt,{text:e.vendorName??e.description,itemTextStyle:{...xt.standardRegular.cssObject,color:"inherit"}})]})})},E);case"category":case"class":{const k=e.lines!=null&&e.lines.length>0&&e.lines[0]?.account!=null&&e.lines[0].account.accountName?e.lines[0].account.accountName:er,j=e.lines!=null&&e.lines.length>0&&e.lines[0]?.class!=null&&e.lines[0].class.className?e.lines[0].class.className:er,D=u.key==="category"?k:j;return t.jsx(Rn,{windowSize:v,wrapperWidth:u.width,isQuickViewMode:w,children:t.jsx(In,{windowSize:v,isLastItem:m===T.length-1,children:t.jsx(Co,{children:D!==er?t.jsx(tt,{text:D,itemTextStyle:{...xt.standardRegular.cssObject,color:"inherit"}}):t.jsx(dy,{children:D})})})},E)}case"date":return t.jsx(Rn,{windowSize:v,wrapperWidth:u.width,isQuickViewMode:w,children:t.jsx(In,{windowSize:v,isLastItem:m===T.length-1,children:t.jsx(Co,{children:t.jsx(tt,{text:e.date.format(iy.visual.MMMDCommaYYYYformat),itemTextStyle:{...xt.standardRegular.cssObject,color:"inherit"}})})})},E);case"receipts":return t.jsx(Rn,{windowSize:v,wrapperWidth:u.width,isQuickViewMode:w,children:t.jsx(In,{windowSize:v,isLastItem:m===T.length-1,style:{justifyContent:"center"},children:n.fetchState==="In-Progress"?t.jsx(Pn,{size:"Small",style:{display:"flex"},start:!0}):n.fetchState==="Completed"||e.attachments!=null&&e.attachments.length>0?t.jsx(Fd,{shouldDisplay:!0,width:W[4],height:W[4],animationInLoop:!1,shouldFade:!1,onAnimationComplete:()=>null}):t.jsxs(t.Fragment,{children:[t.jsx(cy,{onClick:k=>{k.stopPropagation()},children:t.jsx(Vr,{"data-testid":ae("missing-receipts-file-input",e.id),name:`missing-receipts-${e.id}`,fileRef:d,sizeLimit:go,multiple:!1,acceptableTypes:[...Ad],onFileChange:C,onFileSizeError:(k,j)=>{k&&l(e.id,"Error",{code:500,message:j===!0?Xx.replace("__maxFileSize__",xa(go,0)):ey.replace("__maxFileSize__",xa(go,0))})}})}),t.jsx(Se,{display:"flex",placement:"bottom",title:ny,enterDelay:600,children:t.jsx(ly,{onClick:k=>{k.stopPropagation(),S()}})})]})})},E);case"amount":{const k=ht("0,0.[00]",e.amount);return t.jsx(Rn,{windowSize:v,wrapperWidth:u.width,isQuickViewMode:w,children:t.jsx(In,{windowSize:v,isLastItem:m===T.length-1,children:t.jsx(tt,{text:e.amount.amount<0?`-${k}`:k,itemTextStyle:{...xt.standardRegular.cssObject,color:"inherit"}})})},E)}}})})},ry=()=>{const e=Ie(),n=lt(),a=c.useRef(null),[i,f]=c.useState(0);return c.useLayoutEffect(()=>{a.current&&f(a.current.offsetWidth)},[e]),t.jsx(mu,{windowSize:e,isQuickViewMode:n,ref:a,children:pi.map((x,o)=>{const l=`${o}${gu}${x.key}`;return x.key==="vendor"?t.jsx(Rn,{windowSize:e,wrapperWidth:x.width,isQuickViewMode:n,children:t.jsx(In,{windowSize:e,isLastItem:o===pi.length-1,children:t.jsxs(Co,{children:[t.jsx(ki,{width:W[4],height:W[4]}),t.jsx(pt,{width:i*x.width.value(e)/100,height:W[4],style:{display:"flex",alignItems:"center"}})]})})},l):t.jsx(Rn,{windowSize:e,wrapperWidth:x.width,isQuickViewMode:n,children:t.jsx(In,{windowSize:e,isLastItem:o===pi.length-1,children:t.jsx(pt,{width:i*x.width.value(e)/100,height:W[4],style:{display:"flex",alignItems:"center"}})})},l)})})},mu=y.div`
1589
- display: flex;
1590
- height: 100%;
1591
- background-color: ${e=>e.theme.colors.grey5};
1592
- padding-top: ${e=>Wn.containerPaddingTopBottom.valuePx(e.windowSize)};
1593
- padding-bottom: ${e=>Wn.containerPaddingTopBottom.valuePx(e.windowSize)};
1594
- border: ${e=>`1px solid ${e.theme.colors.grey3}`};
1595
- box-shadow: ${e=>`${r.sp0} 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
1596
- border-radius: ${r.sp2};
1597
- color: ${e=>e.theme.colors.hero};
1598
- cursor: pointer;
1599
- &:hover {
1600
- border-color: ${e=>e.theme.colors.primary};
1601
- color: ${e=>e.theme.colors.primary};
1602
- }
1603
-
1604
- box-sizing: border-box;
1605
- align-items: center;
1606
- justify-content: space-between;
1607
- ${e=>e.isQuickViewMode?ke`
1608
- flex: 1;
1609
- padding-left: ${Wn.containerPaddingLeftRight.valuePx(e.windowSize)};
1610
- padding-right: ${Wn.containerPaddingLeftRight.valuePx(e.windowSize)};
1611
- width: 95%;
1612
- `:ke`
1613
- min-width: min-content;
1614
- padding-left: ${Wn.containerPaddingLeftRight.valuePx(e.windowSize)};
1615
- padding-right: ${Wn.containerPaddingLeftRight.valuePx(e.windowSize)};
1616
- `}
1617
- `,Rn=y.div`
1618
- display: flex;
1619
- align-items: center;
1620
- position: relative;
1621
- :last-of-type {
1622
- padding-right: ${r.sp0};
1623
- }
1624
- ${e=>e.isQuickViewMode===!0?ke`
1625
- width: calc(
1626
- ${e.wrapperWidth.valuePercentage(e.windowSize)} -
1627
- ${r.sp4}
1628
- );
1629
- min-width: calc(
1630
- ${e.wrapperWidth.valuePercentage(e.windowSize)} -
1631
- ${r.sp4}
1632
- );
1633
- `:ke`
1634
- width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
1635
- min-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
1636
- `}
1637
- `,ay=ke`
1638
- word-break: break-all;
1639
- white-space: normal;
1640
- -webkit-line-clamp: 1;
1641
- -webkit-box-orient: vertical;
1642
- overflow: hidden;
1643
- text-overflow: ellipsis;
1644
- display: -webkit-box;
1645
- `,sy=ke`
1646
- height: ${r.sp3};
1647
- width: ${r.sp3};
1648
- cursor: pointer;
1649
- `,ly=y(_o)`
1650
- ${sy};
1651
- color: ${e=>e.theme.colors.brandColorJadeDark};
1652
- &:hover {
1653
- color: ${e=>e.theme.colors.primary};
1654
- }
1655
- `,In=y(Me)`
1656
- overflow: hidden;
1657
- justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
1658
- display: flex;
1659
- width: 100%;
1660
- align-items: center;
1661
- `,cy=y.div``,Co=y.div`
1662
- display: flex;
1663
- flex-direction: row;
1664
- column-gap: ${r.sp2};
1665
- align-items: center;
1666
- `,dy=y(Me)`
1667
- ${ay};
1668
- color: inherit;
1669
- `,uy=y.div`
1670
- display: flex;
1671
- `,hy=({sortConfig:e,fetchState:n,isDisabled:a,onColumnSortConfigChanged:i})=>{const f=Ie(),x=lt();return t.jsxs(py,{windowSize:f,children:[t.jsx(gy,{isQuickViewMode:x,children:t.jsx(pu,{sortConfig:e,isDisabled:n==="In-Progress"?"readonly":a,onColumnSortConfigChanged:i})}),t.jsx(my,{windowSize:f,children:[...Array(3)].map((o,l)=>t.jsx(ry,{},l))})]})},py=y.div`
1672
- display: block;
1673
- min-height: 100%;
1674
- flex-direction: column;
1675
- width: 100%;
1676
- `,gy=y.div`
1677
- flex: 1;
1678
- width: auto;
1679
- padding-left: ${({isQuickViewMode:e})=>e===!0?r.sp8:r.sp0};
1680
- `,my=y.div`
1681
- display: flex;
1682
- min-height: 100%;
1683
- flex-direction: column;
1684
- row-gap: ${r.sp3};
1685
- `,{common:fy}=$e.getLocalizedStrings(),xy=({missingReceipts:e,receiptUploadEndpoint:n,authParams:a,selectedPeriod:i,isDisabled:f,onMissingReceiptsRowClick:x,onUploadReceiptComplete:o,onUploadReceiptAttachment:l,onUploadReceiptFetchStatus:p,onUpdateMissingReceiptsUIState:v,onFetchMissingReceiptsList:w})=>{const d=Ie(),s=lt(),{fetchState:C,uiState:S,transactions:T}=e;vi({componentName:"expense_automation.missing_receipts",enabled:C==="Completed"});const u=c.useRef(null),[m,E]=c.useState(!1);c.useEffect(()=>{u.current?.resetAfterIndex(0)},[d,u]),c.useEffect(()=>{C==="Completed"&&E(!1)},[C]);const k=D=>72,j=(D,M)=>{v({sortOrder:M,sortKey:D})};return t.jsxs(by,{children:[t.jsx(wy,{windowSize:d,children:C==="Error"?t.jsxs(Sy,{windowSize:d,children:[t.jsx(ky,{onClick:()=>w(),"data-testid":ae("missing-receipts-list-table-reload-button"),children:t.jsx(To,{})}),t.jsx($y,{children:fy.reloadPage.label})]}):C==="Completed"&&T.length===0?t.jsx(zt,{tab:"missing_receipts",title:et("missing_receipts").allDoneText.title,subTitle:et("missing_receipts").allDoneText.subTitle}):C==="Not-Started"||C==="In-Progress"&&T.length===0?t.jsx(hy,{sortConfig:{sortKey:S.sortKey,sortOrder:S.sortOrder},fetchState:C,onColumnSortConfigChanged:j}):t.jsx(vy,{windowSize:d,children:t.jsx(bi,{children:({height:D,width:M})=>t.jsxs(Ty,{style:{height:D,width:M},children:[t.jsx(Cy,{isQuickViewMode:s,children:t.jsx(pu,{sortConfig:{sortKey:S.sortKey,sortOrder:S.sortOrder},isDisabled:C==="In-Progress"?"readonly":f,onColumnSortConfigChanged:j})}),t.jsx(No,{ref:u,height:D-50,innerElementType:fu,itemCount:T.length,itemData:{missingReceipts:e,receiptUploadEndpoint:n,authParams:a,isDisabled:f,isQuickViewMode:s,selectedPeriod:i,onMissingReceiptsRowClick:x,onUploadReceiptComplete:o,onUploadReceiptAttachment:l,onUploadReceiptFetchStatus:p},itemSize:k,width:M,style:{willChange:"auto"},overscanCount:1,onScroll:({scrollOffset:_})=>{v({scrollPosition:{scrollTop:_}})},initialScrollOffset:S.scrollPosition?.scrollTop,children:yy})]})})})}),t.jsx(st,{controller:m===!0,children:t.jsx(jy,{children:t.jsx(Pn,{size:"Small",start:!0})})})]})},yy=({index:e,style:n,data:a})=>{const{selectedTransactionId:i}=jo(),{missingReceipts:f,receiptUploadEndpoint:x,authParams:o,isQuickViewMode:l,onMissingReceiptsRowClick:p,onUploadReceiptComplete:v,onUploadReceiptAttachment:w,onUploadReceiptFetchStatus:d,selectedPeriod:s}=a,C=f.transactions[e],S=i!=null&&i===C.id;return t.jsx(Ey,{isPanelSelected:S,isQuickViewMode:l,style:{...n,width:"100%"},children:t.jsx(oy,{transaction:C,receiptUploadEndpoint:x,authParams:o,selectedPeriod:s,onMissingReceiptsRowClick:p,onUploadReceiptComplete:v,onUploadReceiptAttachment:w,onUploadReceiptFetchStatus:d,uploadReceiptsFetchState:f.uploadReceiptStatusById[C.id]??{fetchState:"Not-Started",error:void 0}},C.id)})},Cy=y.div`
1686
- flex: 1;
1687
- width: auto;
1688
- `,by=y.div`
1689
- width: 100%;
1690
- height: 100%;
1691
- background-color: ${e=>e.theme.colors.grey4};
1692
- `,wy=y.div`
1693
- height: 100%;
1694
- `,vy=y.div`
1695
- height: 100%;
1696
- display: flex;
1697
- flex-direction: column;
1698
- max-width: 99.9%;
1699
- `,Sy=y.div`
1700
- display: flex;
1701
- width: 100%;
1702
- height: ${e=>`calc(100% - ${yd.valuePx(e.windowSize)})`};
1703
- flex-direction: column;
1704
- justify-content: center;
1705
- align-items: center;
1706
- `,ky=y.div`
1707
- height: 96px;
1708
- width: 96px;
1709
- background: ${e=>e.theme.colors.background};
1710
- border-radius: 50%;
1711
- cursor: pointer;
1712
- & svg {
1713
- margin: ${r.sp5};
1714
- color: ${e=>e.theme.colors.grey1};
1715
- }
1716
- &:hover {
1717
- & svg {
1718
- color: ${e=>e.theme.colors.primary};
1719
- }
1720
- }
1721
- `,$y=y(ad)`
1722
- margin-top: ${r.sp3};
1723
- color: ${e=>e.theme.colors.hero};
1724
- `,Ey=y.div`
1725
- top: ${r.sp0};
1726
- left: ${r.sp0};
1727
- padding-bottom: ${r.sp3};
1728
- box-sizing: border-box;
1729
- ${e=>e.isPanelSelected===!0&&ke`
1730
- .missing-receipts-row-card {
1731
- ${Jr(e.theme)}
1732
- }
1733
- `}
1734
- `,Ty=y.div`
1735
- position: relative;
1736
- `,fu=c.forwardRef((e,n)=>{const{style:a,...i}=e;return t.jsx("div",{ref:n,style:{...a,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",position:"relative"},...i})});fu.displayName="Missing receipts inner element type";const jy=y.div`
1737
- display: flex;
1738
- width: 100%;
1739
- height: ${r.sp3};
1740
- flex-direction: row;
1741
- justify-content: center;
1742
- align-items: center;
1743
- margin-top: ${r.sp3};
1744
- margin-bottom: ${r.sp3};
1745
- `,Ny=[...pp],_y=y.div`
1746
- width: ${hi}px;
1747
- `,tr=y.div`
1748
- width: ${e=>`${e.availableWidth}px`};
1749
- min-width: auto;
1750
- position: relative;
1751
- height: fit-content;
1752
- min-height: ${r.sp12};
1753
- `,Ry=y.div`
1754
- flex-grow: 1;
1755
- overflow: auto;
1756
- min-height: 2em;
1757
- display: flex;
1758
- flex-direction: row;
1759
- position: relative;
1760
-
1761
- pointer-events: auto;
1762
- user-select: text;
1763
- justify-content: space-between;
1764
- margin-bottom: ${r.sp2};
1765
-
1766
- // Disable select for Zeni Logo and File Separator
1767
- #${So} img[alt*="company logo"],
1768
- .attachFileSeparator {
1769
- user-select: none;
1770
- }
1771
- `,Iy=y.div`
1772
- display: flex;
1773
- column-gap: ${r.sp2};
1774
- align-items: flex-end;
1775
- margin-top: ${r.sp2};
1776
- margin-bottom: ${r.sp3};
1777
- `,Ay=y.div`
1778
- position: relative;
1779
- `,mc=y(Me)`
1780
- position: relative;
1781
- `,Ly=y.div`
1782
- background-color: ${e=>e.theme.colors.grey5};
1783
- border: ${e=>`1px solid ${e.theme.colors.background}`};
1784
- border-radius: ${r.sp2};
1785
- box-shadow: ${e=>`${r.sp0} 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
1786
- padding: ${r.sp5};
1787
- color: ${e=>e.theme.colors.primary};
1788
- position: relative;
1789
- .lexicalEditor__nestedListItem {
1790
- list-style-type: none;
1791
- }
1792
- user-select: text;
1793
-
1794
- .monthEndReportCanvasWrapper > * {
1795
- isolation: isolate;
1796
- z-index: ${W[1]};
1797
- }
1798
- `,Dy=y.div`
1799
- user-select: text;
1800
- `,Oy=y.div`
1801
- position: absolute;
1802
- top: ${r.sp4}; // Attachment icon position from the top
1803
- right: -${r.sp3}; // To show attachment icon on the edge
1804
- `,My=y.div`
1805
- margin-top: ${r.sp2};
1806
- display: flex;
1807
- flex-direction: column;
1808
- row-gap: ${r.sp3};
1809
- margin-bottom: ${r.sp4};
1810
- position: relative;
1811
-
1812
- .toolbar {
1813
- user-select: none;
1814
- }
1815
- `,Py=y(nt)`
1816
- color: ${e=>e.theme.colors.grey1};
1817
- user-select: none;
1818
- `,Fy=y(xd)`
1819
- color: ${e=>e.theme.colors.primary};
1820
- `,By=y.div`
1821
- flex-direction: column;
1822
- row-gap: ${r.sp3};
1823
- display: flex;
1824
- `,zy=ji`
1825
- 0% {
1826
- transform: translateX(100%);
1827
- }
1828
- 100% {
1829
- transform: translateX(0)
1830
- }
1831
- `,Hy=ji`
1832
- 0% {
1833
- transform: translateX(0)
1834
- }
1835
- 100% {
1836
- transform: translateX(100%)
1837
- }
1838
- `,Uy=y.div`
1839
- animation: ${e=>e.allThreadsSectionOpen?zy:Hy}
1840
- 0.5s forwards;
1841
- height: 100vh;
1842
- position: fixed;
1843
- right: ${r.sp0};
1844
- top: ${r.sp0};
1845
- z-index: ${W[2]};
1846
- min-width: ${360}px;
1847
- max-width: ${450}px;
1848
- `,bo="monthEndReportFormSection",fc="monthEndReportPage",bt=$e.getLocalizedStrings();function Vy({companyId:e,enableZeniGPTFeature:n,monthEndReportView:a,previewMode:i,customerRequestData:f,allThreadsSectionOpen:x,filterMetaData:o,newThreadMetadata:l,isZeniUser:p,selectedPeriod:v,improveUsingZeniGPTClick:w,onRemoveFileAttachment:d,onUpdateFileAttachment:s,onCloseAllThreadsSection:C,previewMonthEndReport:S,saveMonthEndReport:T,onEditClick:u,onOpenFileAttachmentSnackBar:m,onClickCustomerRequest:E,sendMonthEndReport:k}){const j=St(),[D,M]=c.useState(),[_,R]=c.useState(0),[A,F]=c.useState(0),K=c.useRef(),ee=c.useRef(null),te=c.useRef(null),{html:Z,subject:B,improveUsingZeniGPTStatus:O}=a,[g,h]=c.useState(),[N,$]=c.useState(!1),[b,I]=c.useState(!1),L=c.useRef(null),U=c.useRef(null),Q=((ge,de)=>{const[ye,Ne]=c.useState(!1);return c.useEffect(()=>{let Pe;return ge&&!ye?Ne(!0):!ge&&ye&&(Pe=setTimeout(()=>Ne(!1),de)),()=>clearTimeout(Pe)},[ge,de,ye]),ye})(x,250),Y=a.fetchState==="Not-Started"||a.fetchState==="In-Progress"||a.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||a.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:z,sortedThreads:H,threadsPositions:V,observer:G,unresolvedThreadsMap:oe,handleRemoveFloatingThread:se}=lm(o,L,!i,Y,p),q=c.useCallback(()=>{x?U.current!=null&&F(Math.min((U.current.offsetWidth-hi-W[4])/2,U.current.offsetWidth-hi-450-W[4])):U.current!=null&&R(Math.min((U.current.offsetWidth-hi-W[4])/2,U.current.offsetWidth-hi-360-W[4]))},[x]);c.useEffect(()=>{q()},[x,q]),c.useEffect(()=>(window.addEventListener("resize",q),()=>{window.removeEventListener("resize",q)}),[q]);const P=p?Ci:$o,{openThread:J,addThread:X,setOpenThread:ne}=c.useContext(P),re=cm(Cl,!1,!i),ie=L.current?.getBoundingClientRect(),ce=re!=null&&re.coords&&ie?{left:re.coords.left-ie.left,top:re.coords.top-ie.top}:void 0,he=c.useCallback(()=>{const ge=window.getSelection()?.getRangeAt(0),de=sm();if(!ge||de==null)return;const ye={...l,...de,startPath:de.startPath.join(),endPath:de.endPath.join()},Ne=`${pd()}${Qn}`;X(Ne,{type:"thread",id:Ne,roomId:`cockpit_${e}`,createdAt:new Date,comments:[],metadata:ye,updatedAt:new Date,resolved:!1}),ne(Ne)},[X,e,l,ne]);c.useEffect(()=>{J!=null&&x&&C()},[x,J,C]);const ue=O.fetchState==="In-Progress",Ce=Fn({mode:"all",defaultValues:xc(a),values:xc(a)}),be=Ce.handleSubmit(ge=>{const{recipientEmailList:de,subject:ye}=ge[bo];if(i===!0)k?.(g?.id);else{const Ne=D?.replace(vh,bt.common.strings.empty);de!=null&&ye!=null&&S(de,ye,g?.id,Ne!=null&&Ne.length>0?D:void 0)}});c.useEffect(()=>{M(a.zeniRequestsHtml)},[a.zeniRequestsHtml]),c.useEffect(()=>{K.current=g},[g]),c.useEffect(()=>{h(hp(a.attachmentFile)),$(!1)},[a.attachmentFile]),c.useEffect(()=>{b&&m()},[b,m]);const me=ni(`${v.year}-${v.month}-01`).format(bt.dateFormat.visual.MMMMFormat),le=Z!=null?Z.split(fo):[],Re=a.concatenatedHtml,xe=(a.zeniRequestsData??[]).length+Sh(a.companyMonthEndReportTemplatesData).length;return t.jsxs(t.Fragment,{children:[t.jsxs(Ry,{ref:U,children:[t.jsx(tr,{availableWidth:x?A:_}),t.jsxs(_y,{children:[t.jsx(Bn,{...Ce,children:t.jsx("form",{id:yc(fc),onSubmit:be,children:t.jsxs(By,{children:[t.jsx(em,{sectionId:bo,previewMode:i,subject:B}),!i&&xe>0?t.jsx(qg,{totalItems:xe,onClickCustomerRequest:E}):null,t.jsxs(Ly,{id:Cl,ref:L,children:[t.jsxs(Dy,{className:"monthEndReportCanvasWrapper",children:[g!=null||b?t.jsx(Oy,{"data-testid":ae("email-attachment-container"),onClick:()=>{te.current&&te.current.scrollIntoView({behavior:"smooth"})},children:t.jsx(vg,{fileSizeError:b,setFileSizeError:I,loading:!1,showAnimation:!i&&N})}):null,i?t.jsx(mc,{dangerouslySetInnerHTML:{__html:dm(Re)}}):t.jsxs(t.Fragment,{children:[t.jsxs(Ay,{id:Ar,children:[t.jsx(Me,{dangerouslySetInnerHTML:{__html:le[0]!=null?le[0]+"</body></html>":bt.common.strings.empty}}),t.jsxs(Iy,{children:[t.jsx(Fy,{children:bt.cockpit.monthEndReport.editorTitle}),t.jsx(Py,{children:bt.cockpit.monthEndReport.editorNote})]})]}),t.jsx(My,{id:Ri,children:t.jsx(Xm,{handleFileInputClick:()=>{ee.current!=null&&ee.current.click()},fileAttached:g!=null,enableZeniGPTFeature:n,isZeniGPTResponseLoading:ue,initialHtmlString:a.zeniRequestsHtml,improveUsingZeniGPTClick:w,setZeniRequestsHtml:M,customerRequestData:f})}),t.jsx(mc,{id:So,dangerouslySetInnerHTML:{__html:le[1]!=null?"<html><body>"+le[1]:bt.common.strings.empty}})]}),g!=null?t.jsx(rm,{ref:te,fileName:g.name,fileSize:kh(g.data),onRemove:()=>{g!==void 0&&g!=null&&(d([g.id]),h(void 0),$(!1))},isRemovable:!i}):null]}),ce?t.jsx(gg,{style:{zIndex:15},coords:ce,alignment:re.alignment,onClick:he}):null,t.jsx(t1,{canvasContainerRef:L,sortedThreads:H,editorMode:!i,isZeniUser:p})]})]})})}),t.jsx(Vr,{name:g?.name??bt.common.strings.empty,fileRef:ee,sizeLimit:716800,acceptableTypes:Ny,onFileChange:async ge=>{(de=>{const ye=de.target.files?de.target.files[0]:null;if(ye)if(!mp(ye.type)||b)console.warn("Please select a valid file.");else{const Ne=new FileReader;Ne.onload=function(Pe){const Oe=Pe.target?.result;if(typeof Oe=="string"){const Ue={data:Oe.split(",")[1],name:ye.name,id:fp(e,ye.name)};h(Ue),$(!0),s([Ue])}},Ne.readAsDataURL(ye)}})(ge)},onFileSizeError:ge=>I(ge),multiple:!1})]}),p===!0?Q?t.jsxs(t.Fragment,{children:[t.jsx(Uy,{allThreadsSectionOpen:x,children:t.jsx(_h,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${j.colors.grey3}`,boxShadow:`${r.sp0} 1px 2px ${r.sp0} ${fe.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${r.sp5} - ${r.sp5})`,backgroundColor:j.colors.background},threadsContainerStyle:{paddingBottom:i?"160px":r.sp12},collapsibleThreadStyle:{width:`calc(100% - ${r.sp4})`},allowComposer:!1,drawerTitle:bt.common.texts.comments,filter:o,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(ge,de)=>{ne(de);const ye=H.findIndex(Ne=>Ne[0]===de);C(),z.current?.[ye]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>C()})}),t.jsx(tr,{availableWidth:_})]}):t.jsx(mm,{observer:G,canvasContainerRef:L,sortedThreads:H,threadsPositions:V,threadsRefs:z,unresolvedThreadsMap:oe,editorMode:!i,style:{minWidth:`${_}px`,position:"relative",height:"fit-content",top:`${L.current?.offsetTop}px`,minHeight:r.sp12},handleRemoveFloatingThread:se}):t.jsx(tr,{availableWidth:_})]}),t.jsx(ld,{style:{zIndex:10},leftSideComponent:a.lastDraftSavedDate!=null&&i===!1?t.jsx(Ag,{time:a.lastDraftSavedDate,user:a.reportLastSavedByUser,timeStampLabel:bt.cockpit.monthEndReport.timeStampLabel}):null,formId:yc(fc),cancelBtn:{isDisabled:ue,label:i===!0?bt.cockpit.monthEndReport.editButtonLabel:bt.cockpit.monthEndReport.saveChanges,onClick:i===!0?u:()=>{const ge=Ce.getValues(),{recipientEmailList:de,subject:ye}=ge[bo];de!=null&&ye!=null&&T(de,ye,g?.id,D)},style:{width:"136px",padding:`${r.sp0} ${r.sp3}`,boxSizing:"border-box"},size:"medium",isLoading:a.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:ue,isLoading:i===!0?a.sendMonthEndReportStatus.fetchState==="In-Progress":a.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:i===!0?"unset":"136px"},label:i===!0?bt.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",me):bt.cockpit.monthEndReport.preview,size:"medium"}})]})}const xc=e=>({[bo]:{recipientEmailList:e.recipientEmailList,subject:e.subject??bt.common.strings.empty}}),yc=e=>`${e}_form`;xt.smallBold.lineHeightValue;const Wy=["memo_and_receipt","activity","paymentAccount","receipt"],Cc=e=>Yr(e,Wy);function ln(e,n,a,i){const f=n,x=Math.round(1240*n/905),o=Math.round(1440*n/905),l=Math.round(1920*n/905),p=a??o,v=i??p;return new pe(e,n,f,Math.min(x,p),Math.min(o,p),Math.min(l,v))}const{common:{strings:{empty:Ky}},expenseAutomation:{transactions:{header:{vendors:Gy,category:Yy,classText:qy,date:Jy,type:Zy,amount:Qy,paymentAccount:Xy,memoReceipt:eC}}}}=$e.getLocalizedStrings(),xu={key:"vendor",value:Gy,sortOrder:"ascending",width:ln(200,200,220,360),customStyle:{common:{paddingLeft:W[7]}}},tC={key:"payment_account",value:Xy,sortOrder:"ascending",width:ln(180,180,200,320),customStyle:{common:{paddingLeft:W[0]}}},nC={key:"category",value:Yy,sortOrder:"ascending",width:ln(200,200,220,360),customStyle:{common:{paddingLeft:W[6]}}},iC={key:"class",value:qy,sortOrder:"ascending",width:ln(200,200,220,360),customStyle:{common:{paddingLeft:W[6]}}},oC={key:"date",value:Jy,sortOrder:"descending",width:ln(108,108,130,144),customStyle:{common:{paddingLeft:W[0]}}},rC={key:"transaction_type",value:Zy,sortOrder:"descending",width:ln(108,108,130,144),customStyle:{common:{paddingLeft:0}}},aC={key:"memo_and_receipt",value:eC,sortOrder:"ascending",width:ln(108,108,108,120),customStyle:{common:{paddingLeft:0,justifyContent:"center",display:"flex",alignItems:"center"}}},yu={key:"amount",value:Qy,sortOrder:"ascending",width:ln(108,108,140,156),customStyle:{common:{paddingRight:W[0],justifyContent:"flex-end",display:"flex",alignItems:"center"}}},sC={key:"activity",value:Ky,sortOrder:"ascending",width:ln(W[6],W[6],48,54),customStyle:{common:{}}},la=e=>{const n=[xu,tC,nC,iC,oC,rC,aC,yu];return e===!0&&n.push(sC),n},ca=[{...xu,width:new pe(65,65)},{...yu,width:new pe(30,30)}],bc="date",lC="descending",Cu=({sortConfig:e,isDisabled:n,isTransactionActivityEnabled:a,onColumnSortConfigChanged:i})=>{const f=Ie(),x=lt(),o=x?ca:la(a),[l,p]=c.useState(jr(o));c.useEffect(()=>{const w=jr(o);for(const d of w)d.key===e.sortKey?d.sortOrder=e.sortOrder:d.sortOrder="ascending";p(w)},[e.sortKey,e.sortOrder,x]);const v=(w,d)=>{let s=d;e.sortKey===w&&(s=d==="ascending"?"descending":"ascending"),i(w,s)};return t.jsx(cC,{windowSize:f,isQuickViewMode:x,"data-testid":ae("transaction-categorization-header-container"),children:l.map((w,d)=>{const s=n!=null||Cc(w.key)!=null;return t.jsxs(dC,{sortDataValue:e.sortKey,actualDataValue:w.key,wrapperWidth:w.width,style:w.customStyle?.common,isSortDisabled:s,isQuickViewMode:x,windowSize:f,isLastItem:d===l.length-1,"data-testid":ae("transaction-categorization-header-wrapper",w.key),children:[t.jsxs(mC,{"data-testid":ae("transaction-categorization-header",w.value?w.value:w.key),onClick:()=>(C=>{Cc(C.key)==null&&v(Cp(C.key),C.sortOrder)})(w),isSortDisabled:s,children:[t.jsx(fC,{children:w.value}),s?null:t.jsx(hC,{sortConfig:e,headerData:w,"data-testid":ae("transaction-categorization-sort-icon",w.key),children:t.jsx(gC,{})})]}),s?null:t.jsx(pC,{isSortDisabled:s,sortDataValue:e.sortKey,isVisible:e.sortKey===w.key&&e.sortKey!==bc,"data-testid":ae("transaction-categorization-close-icon",w.key),children:t.jsx(uC,{onClick:()=>{v(bc,lC)},"data-testid":ae("transaction-categorization-close-icon-button",w.key)})})]},w.key)})})},cC=y.div`
1849
- top: ${r.sp0};
1850
- left: ${r.sp0};
1851
- height: ${50}px;
1852
- z-index: 2;
1853
- display: flex;
1854
- flex-wrap: nowrap;
1855
- align-items: center;
1856
- box-sizing: border-box;
1857
- background-color: ${e=>e.theme.colors.grey4};
1858
- position: sticky;
1859
- ${e=>e.isQuickViewMode?ke`
1860
- width: 100%;
1861
- justify-content: space-between;
1862
- `:ke`
1863
- column-gap: ${r.sp4};
1864
- width: max-content;
1865
- min-width: 100%;
1866
- `}
1867
- `,dC=y.div`
1868
- color: ${e=>e.sortDataValue!==e.actualDataValue||e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
1869
- padding-left: ${r.sp0};
1870
- left: ${r.sp0};
1871
- display: flex;
1872
- align-items: center;
1873
- gap: 6px;
1874
- justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
1875
- position: static;
1876
- z-index: 0;
1877
- box-sizing: border-box;
1878
- ${e=>e.isQuickViewMode?ke`
1879
- width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
1880
- max-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
1881
- `:ke`
1882
- width: ${e.wrapperWidth.valuePx(e.windowSize)};
1883
- max-width: ${e.wrapperWidth.valuePx(e.windowSize)};
1884
- `}
1885
- `,uC=y(Ei)`
1886
- width: 12px;
1887
- height: 12px;
1888
- `,hC=y.div`
1889
- display: flex;
1890
- align-items: center;
1891
- transform: ${e=>e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
1892
- ${e=>e.headerData.sortOrder==="ascending"?"padding-top: 2px":"padding-bottom: 2px"};
1893
- `,pC=y.div`
1894
- display: ${e=>e.isVisible?"flex":"none"};
1895
- align-items: center;
1896
- padding-top: 2px;
1897
- cursor: ${e=>e.isSortDisabled===!0?"not-allowed":"pointer"};
1898
- &:hover {
1899
- color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
1900
- }
1901
- `,gC=y($i)`
1902
- width: ${r.sp2};
1903
- height: ${r.sp2};
1904
- `,mC=y.div`
1905
- display: flex;
1906
- cursor: ${e=>e.isSortDisabled===!0?"not-allowed":"pointer"};
1907
- gap: 6px;
1908
- &:hover {
1909
- color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
1910
- }
1911
- `,fC=y(at)`
1912
- display: flex;
1913
- `,nr="expenseAutomationTransactionsPage",Dn="transactionCategorizationListTable",Ge="account",wt="class",Bt="lineEntitySelection",xC="lineEntity",yC="recommendations",bu="lineInfo",CC="vendorDetails",bC="customerDetails",wo="selectedTransactionIds",fn=(e,n,a)=>`${e}.${a}.${n}`,wu=e=>c.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M0.929688 8.00813C0.929688 8.675 1.02283 9.32014 1.19683 9.93121M2.20132 3.98138C3.46937 2.17826 5.566 1 7.93783 1C11.8083 1 14.946 4.13765 14.946 8.00813C14.946 10.2186 13.9226 12.1901 12.3237 13.4745M2.01692 11.7591C2.35672 12.2943 2.7671 12.7804 3.23498 13.2041M4.80209 14.2773C5.39521 14.5746 6.03636 14.7901 6.7108 14.9092M8.65531 14.98C9.34096 14.9103 9.99736 14.7418 10.6101 14.4888",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M8 4.66602V7.93891L11.0228 10.9322",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M4.1813 4.23989L1.83594 4.24014V1.89453",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:wC,hyphen:xn,empty:bn,colon:wc},tooltips:{addReceipt:vC,viewReceipt:SC,viewReceipts:kC}},expenseAutomation:{transactions:Pt},dateFormat:$C}=$e.getLocalizedStrings(),sn={containerPaddingLeftRight:new pe(W[3],W[4]),containerPaddingTopBottom:new pe(W[1],W[2]),containerPaddingTopBottomEmpty:new pe(W[2],W[3]),nameLogoWidth:new pe(W[2],W[4]),nameLogoHeight:new pe(W[2],W[4])},EC=({transactionView:e,transaction:n,sectionId:a,vendorSearchAutoCompleteData:i,vendorSearchAutoCompleteActions:f,selectedTab:x,containerRef:o,listContainerRef:l,isCOTEnabled:p,cotTracking:v,onTransactionCategorizationRowClick:w,setCurrentTransactionInAction:d,vendorLoadOptions:s,openTooltipId:C,setOpenTooltipId:S,isUncategorizedExpenseCategoryEnabled:T,setActivityLogTransactionId:u,isTransactionActivityEnabled:m,authParams:E,onUploadTransactionReceipt:k})=>{const j=Ie(),D=lt(),[M,_]=c.useState(!1),[R,A]=c.useState(!1),{lineItemById:F,sortedLineItems:K}=n.transactionReviewLocalData,ee=n.transactionReviewLocalData.tabSpecificLineItems?.[x]||[],te=K.filter(q=>ee.indexOf(q)!==-1),Z=[];te.forEach(q=>{Z.push(F[q])});const{accountList:B,accountsHierarchyList:O,classHierarchyList:g,classList:h,uncategorizedAccounts:N,transactions:$,selectedCheckBoxTransactionIds:b}=e,I=e.uploadReceiptStatusById,L=b.includes(n.transactionId),U=St(),Q={control:()=>({marginLeft:-2,backgroundColor:M?U.colors.background:U.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:W[0]}),menu:()=>({width:"150%",background:U.colors.grey5}),singleValue:()=>({color:M||L?U.colors.primary:U.colors.hero,paddingLeft:W[2]}),input:q=>({...q,color:M||L?U.colors.primary:U.colors.hero,textAlign:"left",paddingLeft:W[2]}),menuPortal:q=>({...q,zIndex:10})},Y={...Q,singleValue:q=>({...q,color:M||L?U.colors.primary:U.colors.hero}),menu:()=>({marginTop:W[1],marginLeft:-8}),input:q=>({...q,color:M||L?U.colors.primary:U.colors.hero,textAlign:"left"})},z=$.find(q=>q.id===n.transactionId),H=c.useRef(null),[V,G]=c.useState(void 0),[oe,se]=c.useState("bottom");return c.useEffect(()=>{if(V===void 0)return;const q=l?.current?._outerRef??null,P=()=>{const J=H.current;if(J==null||q==null)return;const X=J.getBoundingClientRect(),ne=q.getBoundingClientRect(),re=q.scrollTop+(X.bottom-ne.top),ie=q.scrollHeight-re;se(ie>=288?"bottom":"top")};return P(),window.addEventListener("resize",P),q?.addEventListener("scroll",P),()=>{window.removeEventListener("resize",P),q?.removeEventListener("scroll",P)}},[l,V]),t.jsxs(jC,{onMouseEnter:D?void 0:()=>_(!0),onMouseLeave:D?void 0:()=>_(!1),children:[t.jsx(_C,{className:"categorization-row-card",windowSize:j,isSelected:L,isQuickViewMode:D,isHovered:M,children:t.jsx(RC,{children:Z.map((q,P)=>t.jsx(IC,{ref:V===P?H:void 0,"data-testid":ae("transaction-categorization-list-row",q.lineId),windowSize:j,isQuickViewMode:D,onClick:J=>((X,ne)=>{const{transactionType:re}=ne.transactionReviewLocalData;let ie=X.target;for(;ie;){if(ie.classList.contains("select-value-container")||ie.classList.contains("item-value-container")||ie.classList.contains("grouped-single-select-field__value-container")||ie.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||ie.classList.contains("grouped-single-select-field__input")||ie.classList.contains("grouped-single-select-field__menu"))return;ie=ie.parentElement}re!=null&&w(ne.transactionId,re)})(J,n),children:t.jsx(TC,{isTransactionActivityEnabled:m,line:q,isHovered:M||L,isSelected:L,isQuickViewMode:D,lineIndex:P,sectionId:a,transaction:n,currentTransaction:z,windowSize:j,accountsHierarchyList:O,classHierarchyList:g,allAccountList:B,allClassList:h,uncategorizedAccounts:N,vendorSearchAutoCompleteData:i,vendorSearchAutoCompleteActions:f,setCurrentTransactionInAction:d,vendorLoadOptions:s,customStyle:Q,customStyleAutoComplete:Y,recommendations:q.recommendationsWithCOT,selectedTab:x,isCOTEnabled:p,menuPlacement:oe,cotTracking:v,openTooltipId:C,setOpenTooltipId:S,isUncategorizedExpenseCategoryEnabled:T,authParams:E,uploadReceiptStatus:I?.[n.transactionId],onUploadTransactionReceipt:k,onDropdownClose:()=>G(void 0),onDropdownOpen:()=>G(P)})},`${n.transactionId}.${q.lineId}`))},n.transactionId)},n.transactionId),m===!0&&!D&&t.jsx(QC,{className:"activity-log-icon","data-testid":ae("activity-log-icon",n.transactionId),onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),onClick:q=>{q.stopPropagation(),u(n.transactionId)},children:t.jsx(Se,{title:Pt.header.activity,placement:"bottom",children:t.jsx(XC,{style:{color:R?U.colors.primary:U.colors.hero}})})})]})},TC=({accountsHierarchyList:e,allAccountList:n,allClassList:a,classHierarchyList:i,customStyle:f,customStyleAutoComplete:x,line:o,lineIndex:l,transaction:p,currentTransaction:v,windowSize:w,uncategorizedAccounts:d,isHovered:s=!1,isSelected:C=!1,isQuickViewMode:S=!1,sectionId:T,recommendations:u,vendorSearchAutoCompleteData:m,selectedTab:E,isCOTEnabled:k,menuPlacement:j,cotTracking:D,openTooltipId:M,setCurrentTransactionInAction:_,vendorLoadOptions:R,setOpenTooltipId:A,isUncategorizedExpenseCategoryEnabled:F,isTransactionActivityEnabled:K,onDropdownClose:ee,onDropdownOpen:te,authParams:Z,uploadReceiptStatus:B,onUploadTransactionReceipt:O})=>{const{transactionDate:g,transactionType:h,transactionTypeName:N,memo:$}=p.transactionReviewLocalData,{setValue:b}=Kr(),I=c.useCallback((ve,Be)=>{D?.onCOTView!=null&&D.onCOTView(o.lineId,p.transactionId,ve,Be)},[D,o.lineId,p.transactionId]),L=o.lineDescription,U=c.useMemo(()=>{if(L||$)return[{title:Pt.description,description:L||xn},{title:Pt.header.memo,description:$||xn}]},[$,L]),Q=fn(T,Bt,l.toString()),Y=fn(T,Ge,l.toString()),z=fn(T,wt,l.toString()),H=(ve,Be)=>{if(S)return;let Fe;switch(Be){case"vendor":Fe=Q;break;case"category":Fe=Y;break;case"class":Fe=z;break;default:return}b(`${Fe}.selectedOption`,ve,{shouldValidate:!0,shouldDirty:!0})},V=St(),G=c.useMemo(()=>v!=null&&Nn(v)===!0?{id:p.transactionReviewLocalData.customer?.id??"",logo:p.transactionReviewLocalData.customer?.logo,name:p.transactionReviewLocalData.customer?.name??""}:{id:o.customer?.id??"",logo:o.customer?.logo,name:o.customer?.name??""},[v,o.customer?.id,o.customer?.logo,o.customer?.name,p.transactionReviewLocalData.customer?.id,p.transactionReviewLocalData.customer?.logo,p.transactionReviewLocalData.customer?.name]),oe=c.useMemo(()=>v!=null&&Nn(v)===!0?{id:p.transactionReviewLocalData.vendor?.id??"",logo:p.transactionReviewLocalData.vendor?.logo,name:p.transactionReviewLocalData.vendor?.name??""}:{id:o.vendor?.id??"",logo:o.vendor?.logo,name:o.vendor?.name??""},[v,o.vendor?.id,o.vendor?.logo,o.vendor?.name,p.transactionReviewLocalData.vendor?.id,p.transactionReviewLocalData.vendor?.logo,p.transactionReviewLocalData.vendor?.name]),se=o[wt]?.classId,q=o[Ge]?.qboId??o[Ge]?.accountId,P=G?.id,J=oe?.id,X=oe?.name,[ne,re]=c.useState(!se),[ie,ce]=c.useState(!q||o[Ge]?.qboId!=null&&ui(d,o[Ge].qboId,F===!0?["income"]:void 0)===!0),[he,ue]=c.useState(!J||!P),Ce=ve=>u?.find(Be=>Be.vendor?.qboId===ve||Be.vendor?.id===ve||Be.vendor?.name===ve)?.vendor?.reason??"",be=p.transactionReviewLocalData.lineItemById[o.lineId]?.recommendationsWithCOT||[],me=Ed(e,be),le=$d(i,be),Re=c.useCallback(ve=>ui(d,ve,F===!0?["income"]:void 0),[d,F]),[xe,ge]=c.useState(!1),[de,ye]=c.useState(!1),[Ne,Pe]=c.useState(!1),[Oe,Ue]=c.useState(0),[Et,Qe]=c.useState(null),[ct,it]=c.useState([]),[kn,dt]=c.useState(void 0),$n=c.useRef(null),[Rt,cn]=c.useState(0),[dn,un]=c.useState(0),ri=zh()?.url,[Zt,Ht]=c.useState(!1),Ii=(ve,Be)=>{_({transactionId:p.transactionId,lineItemId:o.lineId}),R(ve,Be)},ai=()=>{ue(!(J||P)),ge(!1),ee?.()},si=()=>{q&&o[Ge]?.qboId!=null&&ui(d,o[Ge].qboId,F===!0?["income"]:void 0)===!1?ce(!1):ce(!0),Ht(!1),ee?.()},Ai=()=>{re(!se),ye(!1),ee?.()},Io=()=>{S||(J||P)&&(ge(!0),te?.())},Li=()=>{S||(ye(!0),te?.())},Di=()=>{S||(Ht(!0),te?.())};c.useEffect(()=>{q&&o[Ge]?.qboId!=null&&ui(d,o[Ge].qboId,F===!0?["income"]:void 0)===!1?ce(!1):ce(!0)},[q]),c.useEffect(()=>{re(!se)},[se]),c.useEffect(()=>{ue(!(J||P))},[J,P]);const Oi=p.transactionReviewLocalData.selectedEntity,Ao=p.transactionReviewLocalData.lineItemById[o.lineId].selectedEntityLine,Ee=v!=null&&Nn(v)===!0?Oi:Ao,He=c.useMemo(()=>{const ve=p.transactionReviewLocalData.lineItemById[o.lineId]?.recommendationsWithCOT||[],Be=m.entityAutoCompleteView;return{selectedOption:Ee?.qboId??Ee?.id,defaultOptions:Wr(Be,Ee,ve??[])}},[Ee,p.transactionReviewLocalData.lineItemById,o.lineId,m.entityAutoCompleteView]),Dt=(ve,Be)=>{if(Be==null||!Be)return;let Fe=[];return ve.forEach(Qt=>{Fe=Fe.concat(Qt.options)}),Fe.find(Qt=>Qt.value===Be)?.label??Be},Mi=Dt(le,se),Pi=Dt(me,q),Ot=E==="review",Fi=Do("vendor",He.defaultOptions,He.selectedOption),Bi=Do("category",me,q),zi=Do("class",le,se),yt=v?.attachments??[],li=kn??yt[0];return t.jsxs(t.Fragment,{children:[(ve=>{const Be=S?ca:la(ve);return Be.map((Fe,Qt)=>{const It=`${p.transactionId}_${Fe.key}_${o.lineId}`;if(l>0&&v!=null&&Nn(v)===!0&&Fe.key==="vendor")return t.jsx(jt,{windowSize:w,wrapperWidth:Fe.width,isQuickViewMode:S},It);if(l>0&&(Fe.key==="transaction_type"||Fe.key==="payment_account"||Fe.key==="memo_and_receipt"))return t.jsx(jt,{windowSize:w,wrapperWidth:Fe.width,isQuickViewMode:S},It);switch(Fe.key){case"activity":return t.jsx(Su,{},It);case"vendor":default:return t.jsxs(jt,{windowSize:w,wrapperWidth:Fe.width,isQuickViewMode:S,className:"item-value-container",children:[!S&&t.jsx(ir,{isCOTEnabled:k,recommendations:be,type:"vendor",isFirstColumn:!0,isEnabled:!!Ee?.isPreFilled,isMisCategorized:Fi,onRecommendationClick:H,selectedValue:J,selectedValueLabel:X,isReviewTab:Ot,isAccountOptionDisabled:Re,existingOption:{label:v!=null&&Nn(v)===!0?v?.vendor?.name:void 0,value:v!=null&&Nn(v)===!0?v?.vendor?.id:void 0},cotTracking:D,lineId:o.lineId,transactionId:p.transactionId,openTooltipId:M,setOpenTooltipId:A}),t.jsx(lr,{children:he===!0?t.jsx(ar,{isHovered:s,isQuickViewMode:S,children:t.jsxs(rr,{onClick:Ye=>{Ye.stopPropagation(),!S&&(te?.(),ue(!1),ge(!0))},"data-testid":ae("add-vendor-button",T),style:{display:"inline-flex",alignItems:"center",color:fe.brandColorGoldDark,cursor:"pointer",height:r.sp6},children:[t.jsx(ao,{}),Pt.addPayee]})}):xe===!0?t.jsx(Lt,{onClickAway:ai,children:t.jsx(qC,{"data-testid":ae("vendor-selection-dropdown-container",fn(T,Bt,l.toString())),children:t.jsx(Kh,{name:Q,placeholder:Pt.addPayee,valueToInfo:Ce,defaultValue:{selectedOption:He.selectedOption,defaultOptions:He.defaultOptions},type:"vendor",autoFocus:!he,style:{width:"100%"},pageSource:"list_page",transactionStatus:Ot?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:x,menuIsOpen:xe,onMenuClose:ai,registerOptions:{required:!1},loadOptions:Ii,showCOT:k,onCOTView:I,menuPlacement:j})})}):t.jsx(ZC,{children:t.jsxs(sr,{isHovered:s,isQuickViewMode:S,showOutline:!S&&Fi&&Ee?.isPreFilled!==!0&&!C&&Ot,children:[Ee!=null&&Ee.logo!=null?t.jsx(Ti,{photoUrl:Ee.logo.toString(),styles:{width:sn.nameLogoWidth.valuePx(w),height:sn.nameLogoHeight.valuePx(w)},fallbackAvatar:t.jsx(kc,{children:t.jsx(vn,{name:Ee.name,size:r.sp4})})}):Ee!=null&&Ee.name!=null?t.jsx(kc,{children:t.jsx(vn,{name:Ee.name,size:r.sp4})}):null,t.jsx(YC,{onClick:Io,"data-testid":ae("vendor-name-text",T),children:Ee!=null&&Ee.name?t.jsx(tt,{text:Ee.name,itemTextStyle:{color:s?V.colors.primary:V.colors.hero}}):t.jsx(JC,{children:xn})})]})})})]},It);case"category":{const Ye=v?.lines!=null?v?.lines[l]:void 0;return t.jsxs(jt,{windowSize:w,wrapperWidth:Fe.width,className:"item-value-container",children:[t.jsx(ir,{isCOTEnabled:k,recommendations:be,type:"category",isFirstColumn:!1,isReviewTab:Ot,isEnabled:!!o[Ge]?.isPreFilled,isAccountOptionDisabled:Re,isMisCategorized:Bi,onRecommendationClick:H,selectedValue:q,selectedValueLabel:Pi,existingOption:{label:Ye?.account?.accountName,value:Ye?.account?.qboId??Ye?.account?.accountId},cotTracking:D,lineId:o.lineId,transactionId:p.transactionId,openTooltipId:M,setOpenTooltipId:A}),t.jsx(lr,{children:ie===!0?t.jsx(ar,{isHovered:s,children:t.jsxs(rr,{onClick:Ct=>{Ct.stopPropagation(),!S&&(te?.(),ce(!1),Ht(!0))},"data-testid":ae("category-selection-field",Y),style:{display:"inline-flex",alignItems:"center",color:fe.brandColorGoldDark,cursor:"pointer",height:r.sp6},children:[t.jsx(ao,{}),Pt.addCategory]})}):Zt===!0?t.jsx(Lt,{onClickAway:si,children:t.jsx($c,{isHovered:s,"data-testid":ae("category-selection-dropdown-container",Y),children:t.jsx($a,{name:Y,placeholder:Pt.addCategory,valueToId:Ct=>(Xt=>n.filter(hn=>hn.qboId===Xt)[0]?.qboId)(Ct),type:"category",pageSource:"list_page",transactionStatus:Ot?"pending_review":"auto_categorized",showCOT:k,defaultValue:{selectedOption:q,allOptions:me},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:Zt,autoFocus:!ie&&(!q||o[Ge]?.qboId!=null&&[d.expense?.qboId,d.income?.qboId].includes(o[Ge].qboId)),onMenuClose:si,customStyleConfig:f,disableCurrentOption:Re,menuPlacement:j,onCOTView:I})})}):t.jsx(sr,{isHovered:s,showOutline:Bi&&o[Ge]?.isPreFilled!==!0&&!C&&Ot,children:t.jsx(Ec,{onClick:Di,"data-testid":ae("category-label-text",Y),children:t.jsx(tt,{text:Pi??"",itemTextStyle:{color:s?V.colors.primary:V.colors.hero}})})})})]},It)}case"class":{const Ye=v?.lines!=null?v?.lines[l]:void 0;return t.jsxs(jt,{windowSize:w,wrapperWidth:Fe.width,className:"item-value-container",children:[t.jsx(ir,{isCOTEnabled:k,recommendations:be,type:"class",isFirstColumn:!1,isReviewTab:Ot,isEnabled:!!o[wt]?.isPreFilled,isAccountOptionDisabled:Re,isMisCategorized:zi,onRecommendationClick:H,selectedValue:se,selectedValueLabel:Mi,existingOption:{label:Ye?.class?.className,value:Ye?.class?.classId},cotTracking:D,lineId:o.lineId,transactionId:p.transactionId,openTooltipId:M,setOpenTooltipId:A}),t.jsx(lr,{children:ne===!0?t.jsx(ar,{isHovered:s,children:t.jsxs(rr,{onClick:Ct=>{Ct.stopPropagation(),!S&&(te?.(),re(!1),ye(!0))},"data-testid":ae("class-selection-field",z),style:{display:"inline-flex",alignItems:"center",color:fe.brandColorGoldDark,cursor:"pointer",height:r.sp6},children:[t.jsx(ao,{}),Pt.addClass]})}):de===!0?t.jsx(Lt,{onClickAway:Ai,children:t.jsx($c,{isHovered:s,"data-testid":ae("class-selection-dropdown-container",z),children:t.jsx($a,{name:z,placeholder:Pt.addClass,valueToId:Ct=>(Xt=>a.filter(hn=>hn.classId===Xt)[0]?.accountingClassNumber??void 0)(Ct),type:"class",showCOT:k,defaultValue:{selectedOption:se,allOptions:le},pageSource:"list_page",transactionStatus:Ot?"pending_review":"auto_categorized",menuIsOpen:de,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!ne&&!se,customStyleConfig:f,onMenuClose:Ai,menuPlacement:j,onCOTView:I})})}):t.jsx(sr,{isHovered:s,showOutline:zi&&o[wt]?.isPreFilled!==!0&&!C&&Ot,children:t.jsx(Ec,{"data-testid":ae("class-selection-field",z),onClick:Li,children:t.jsx(tt,{text:Mi??"",itemTextStyle:{color:s?V.colors.primary:V.colors.hero}})})})})]},It)}case"date":return t.jsx(jt,{windowSize:w,wrapperWidth:Fe.width,children:t.jsx(An,{windowSize:w,isLastItem:Qt===Be.length-1,children:t.jsx(Fr,{"data-testid":ae("date-field",fn(T,wt,l.toString())),children:t.jsx(or,{style:{color:s?V.colors.primary:V.colors.hero},children:g!=null?g.format($C.visual.MMMDCommaYYYYformat):null})})})},It);case"transaction_type":return t.jsx(jt,{windowSize:w,wrapperWidth:Fe.width,children:t.jsx(An,{windowSize:w,"data-testid":ae("transaction-type-field",fn(T,wt,l.toString())),isLastItem:Qt===Be.length-1,children:N!=null?t.jsx(Vh,{textColor:s?new mi(V.colors.primary):Wh(void 0,V),text:N??h}):null})},It);case"amount":{const Ye=ht("0,0.[00]",o.amount,!0);return t.jsx(jt,{windowSize:w,style:{marginRight:ve&&!S?W[0]:W[4]},wrapperWidth:Fe.width,isQuickViewMode:S,children:t.jsx(An,{windowSize:w,isLastItem:Qt===Be.length-1,style:{justifyContent:"flex-end"},children:t.jsx(Fr,{"data-testid":ae("transaction-amount-field",fn(T,wt,l.toString())),style:{color:s?V.colors.primary:V.colors.hero},children:Ye})})},It)}case"payment_account":{if(h!=="expense"&&h!=="check"&&h!=="bill_payment"&&h!=="vendor_credit"&&h!=="credit_card_credit"&&h!=="deposit"&&h!=="sales_receipt"&&h!=="refund"&&h!=="payment")return t.jsx(jt,{windowSize:w,wrapperWidth:Fe.width,children:t.jsx(An,{windowSize:w,isLastItem:Qt===Be.length-1,children:t.jsx(or,{style:{textAlign:"center",width:"100%"},children:xn})})},It);const Ye=v?.account?.accountName,Ct=v?.paymentType,Xt=v?.paymentTypeName,hn=Ct==="credit_card"?DC:Ct==="cash"?OC:Ct==="check"?PC:Ct==="ach"?ib:MC,At={title:bn,items:[{text:Pt.paymentAccountTooltip.accountLabel+wc,amount:Ye??xn},...Xt!=null?[{text:Pt.paymentAccountTooltip.methodLabel+wc,amount:Xt}]:[]]};return t.jsx(jt,{windowSize:w,wrapperWidth:Fe.width,children:t.jsx(An,{windowSize:w,isLastItem:Qt===Be.length-1,children:t.jsx(Se,{display:"flex",placement:"bottom",variant:"list-description",data:At,title:Ye??xn,enterDelay:600,style:{overflow:"hidden",minWidth:0},children:t.jsxs(LC,{"data-testid":ae("payment-account",T),style:{color:s?V.colors.primary:V.colors.hero},children:[hn!=null&&t.jsx(hn,{style:{color:s?V.colors.primary:V.colors.hero}}),t.jsx(or,{style:{color:"inherit",whiteSpace:"pre-wrap"},children:Ye??xn})]})})})},It)}case"memo_and_receipt":{const Ye=v?.attachments??[],Ct=B?.fetchState==="In-Progress",Xt=At=>{if(At.stopPropagation(),Ye.length===0||v==null)return;if(ri==null)return void console.warn("webV2MicroServiceEndpoint is not available, cannot fetch attachments.");dt(Ye[0]),Ue(0),Pe(!0);const ci=Ye.map(pn=>pn.id);vd(`${ri}/transaction_attachments`,Z,{transaction_key:{transaction_id:v.id,transaction_type:v.type},attachment_ids:ci}).then(pn=>{it(pn),pn.length>0&&Qe(pn[0])})},hn=At=>{At.stopPropagation(),$n.current?.click()};return t.jsx(jt,{windowSize:w,wrapperWidth:Fe.width,"data-testid":ae("memo-field",fn(T,wt,l.toString())),children:t.jsxs(eb,{onClick:At=>At.stopPropagation(),children:[U!=null?t.jsx(Se,{display:"flex",placement:"bottom",data:U,variant:"multi-information-points",style:{maxHeight:"min(60vh, 360px)",overflowY:"auto",overflowX:"hidden"},children:t.jsx(BC,{"data-testid":ae("memo-icon",T),style:{color:s?V.colors.primary:V.colors.hero}})}):t.jsx(FC,{style:{margin:0},children:xn}),Ct?t.jsx(Pn,{size:"Small",style:{display:"flex"},start:!0}):Ye.length===0?t.jsx(Se,{display:"flex",placement:"bottom",title:vC,enterDelay:600,children:t.jsx(ao,{"data-testid":ae("upload-receipt-icon",T),style:{margin:0},onClick:At=>{At.stopPropagation(),hn(At)}})}):Ye.length===1?t.jsx(Se,{display:"flex",placement:"bottom",title:SC,enterDelay:600,children:t.jsx(tb,{"data-testid":ae("view-receipt-icon",T),style:{color:s?V.colors.primary:V.colors.hero},onClick:Xt})}):t.jsx(Se,{display:"flex",placement:"bottom",title:kC,enterDelay:600,children:t.jsx(nb,{"data-testid":ae("view-receipts-icon",T),style:{color:s?V.colors.primary:V.colors.hero},onClick:Xt})}),t.jsx(Vr,{name:`transaction-receipt-${p.transactionId}`,fileRef:$n,sizeLimit:go,multiple:!0,acceptableTypes:[...Ad],onFileChange:At=>{const ci=At.target.files;if(ci!=null&&ci.length>0){const pn=Array.from(ci);O(E,p.transactionId,h??bn,pn,pn.map(Vu=>Vu.name))}},onFileSizeError:()=>{}})]})},It)}}})})(K),Ne&&yt.length>0&&li!=null?yi.createPortal(t.jsx(fd,{allFiles:ct,fileSource:Et,file:li,title:li.fileName,attachments:yt,showNavigation:!1,setFileSource:Qe,setShowFullScreenView:Pe,onCrossClick:()=>{Pe(!1),Qe(null),it([]),dt(void 0),Ue(0)},onNextClick:()=>{const ve=(Oe+1)%yt.length;Ue(ve),dt(yt[ve]),ct[ve]!=null&&Qe(ct[ve])},onPreviousClick:()=>{const ve=(Oe-1+yt.length)%yt.length;Ue(ve),dt(yt[ve]),ct[ve]!=null&&Qe(ct[ve])},setSelectedFileAttachment:ve=>{dt(typeof ve=="function"?Be=>ve(Be??yt[0]):ve)},handleTouchStart:ve=>cn(ve.targetTouches[0].clientX),handleTouchMove:ve=>un(ve.targetTouches[0].clientX),handleTouchEnd:()=>{if(Rt-dn>50&&dn!==0&&Oe<yt.length-1){const ve=Oe+1;Ue(ve),dt(yt[ve]),ct[ve]!=null&&Qe(ct[ve]),cn(0),un(0)}else if(Rt-dn<-50&&dn!==0&&Oe>0){const ve=Oe-1;Ue(ve),dt(yt[ve]),ct[ve]!=null&&Qe(ct[ve]),cn(0),un(0)}}}),document.body):null]})},vc=({isEnabled:e,isReviewTab:n,isMisCategorized:a,hasRecommendations:i,isTooltipVisible:f=!1,type:x})=>e?n?f?t.jsx(UC,{"data-testid":ae("recommendation-icon",x)}):t.jsx(zC,{"data-testid":ae("recommendation-icon",x)}):f?t.jsx(HC,{"data-testid":ae("recommendation-icon",x)}):t.jsx(VC,{className:"ai-icon-selected-plain","data-testid":ae("recommendation-icon",x)}):!e&&a||i?f?t.jsx(KC,{"data-testid":ae("recommendation-icon",x)}):t.jsx(WC,{"data-testid":ae("recommendation-icon",x)}):null,Sc=({isFirstColumn:e,children:n})=>t.jsx(ku,{isFirstColumn:e,children:n}),ir=({recommendations:e,isCOTEnabled:n,type:a,isReviewTab:i,selectedValueLabel:f,isFirstColumn:x,isEnabled:o=!1,isMisCategorized:l=!1,selectedValue:p,existingOption:v,cotTracking:w,lineId:d,openTooltipId:s,transactionId:C,isAccountOptionDisabled:S,onRecommendationClick:T,setOpenTooltipId:u})=>{const m=c.useMemo(()=>`${C}:${d}:${a}`,[C,d,a]),E=s===m,k=Qh().analytics,{createAlternateRecommendationCallback:j}=Xh(),D=c.useCallback(ee=>{const te=e[1],Z=e[0];j(a,{currentValue:f??bn,transactionCurrentStatus:i?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:w?{transactionId:C,lineId:d,onCOTView:(B,O,g,h)=>{w.onCOTView?.(B,O,g,h)}}:void 0},te,Z)(ee)},[j,e,f,i,a,w,d,C]),M=ep(e,a,n,v,"list_page",i?"pending_review":"auto_categorized",T,D,p,S),_=tp(e,a),R=c.useCallback(()=>{u(m);const ee=M?.recommendations[0]?.cot??[],te=M?.recommendations[1]?.cot??[],Z=te.length>0;if(k.trackTransactionCotView({recommendationFor:a,currentValue:f??bn,recommendation:M?.recommendations[0]?.name??bn,recommendationCot:ee,isRecommendationCotAvailable:ee.length>0,recommendationReason:M?.recommendations[0]?.reason??bn,recommendationConfidencePercentage:M?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:ya(Ca(M?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:M?.recommendations[1]?.name??bn,alternativeRecommendationCot:te,isAlternativeRecommendationCotAvailable:Z,alternativeRecommendationReason:M?.recommendations[1]?.reason??bn,alternativeRecommendationConfidencePercentage:M?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:Z?ya(Ca(M?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:i?"pending_review":"auto_categorized",transactionPage:"list_page"}),w?.onCOTView!=null){const B=np(M);B!=null&&w.onCOTView(d,C,a,B)}},[k,M,i,f,a,d,C,m,u]),A=c.useCallback(()=>{s===m&&u(void 0)},[s,m,u]),F=c.useMemo(()=>!(!p||!_)&&e.some(ee=>a==="vendor"&&ee.vendor!=null?ee.vendor.id===p||ee.vendor.qboId===p:a==="category"&&ee.account!=null?ee.account.qboId===p||ee.account.accountId===p:a==="class"&&ee.class!=null&&ee.class.classId===p),[p,_,e,a]);if(!_)return t.jsx(ku,{isFirstColumn:x});const K=o||F;return M?t.jsx(Sc,{isFirstColumn:x,children:t.jsx(Se,{variant:"chain-of-thought",data:M,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:E,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:R,onClose:A,children:t.jsx(GC,{"data-testid":ae("recommendation-icon",a),children:t.jsx(vc,{isEnabled:K,isReviewTab:i,isMisCategorized:l,hasRecommendations:_,isTooltipVisible:E})})})}):t.jsx(Sc,{isFirstColumn:x,children:t.jsx(vc,{isEnabled:K,isReviewTab:i,isMisCategorized:l,hasRecommendations:_,isTooltipVisible:E,type:a})})},vu=({isTransactionActivityEnabled:e})=>{const n=Ie(),a=lt(),i=a?ca:la(e);return t.jsx(NC,{windowSize:n,isQuickViewMode:a,isTransactionActivityEnabled:e,children:i.map((f,x)=>{const o=`${x}${wC}${f.key}`;switch(f.key){case"activity":return t.jsx(Su,{},o);case"vendor":return t.jsx(jt,{windowSize:n,wrapperWidth:f.width,isQuickViewMode:a,style:a?{paddingLeft:r.sp0}:{paddingLeft:r.sp3},children:t.jsx(An,{windowSize:n,isLastItem:x===i.length-1,children:t.jsxs(Fr,{children:[t.jsx(ki,{width:W[4],height:W[4]}),t.jsx(pt,{width:"100%",height:W[4],style:{display:"flex",alignItems:"center"}})]})})},o);default:{const l=x===i.length-1;return t.jsx(jt,{windowSize:n,wrapperWidth:f.width,isQuickViewMode:a,style:{marginRight:l&&a?W[4]:void 0},children:t.jsx(An,{windowSize:n,isLastItem:l,children:t.jsx(pt,{width:"100%",height:W[4],style:{display:"flex",alignItems:"center"}})})},o)}}})})},Su=y.div`
1914
- width: ${r.sp0};
1915
- height: ${r.sp0};
1916
- `,jC=y.div`
1917
- display: flex;
1918
- height: 100%;
1919
- flex: 1;
1920
- align-items: center;
1921
-
1922
- &:hover .activity-log-icon {
1923
- visibility: visible;
1924
- }
1925
- `,NC=y.div`
1926
- display: flex;
1927
- flex-direction: row;
1928
- flex-wrap: nowrap;
1929
- background-color: ${e=>e.theme.colors.grey5};
1930
- padding-right: ${e=>e.isTransactionActivityEnabled?r.sp0:sn.containerPaddingLeftRight.valuePx(e.windowSize)};
1931
- padding-top: ${e=>sn.containerPaddingTopBottomEmpty.valuePx(e.windowSize)};
1932
- padding-bottom: ${e=>sn.containerPaddingTopBottomEmpty.valuePx(e.windowSize)};
1933
- border: ${e=>`1px solid ${e.theme.colors.grey3}`};
1934
- box-shadow: ${e=>`${r.sp0} 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
1935
- border-radius: ${r.sp2};
1936
- color: ${e=>e.theme.colors.hero};
1937
- cursor: pointer;
1938
- &:hover {
1939
- border-color: ${e=>e.theme.colors.primary};
1940
- }
1941
-
1942
- box-sizing: border-box;
1943
- align-items: center;
1944
- ${e=>e.isQuickViewMode?ke`
1945
- flex: 1;
1946
- justify-content: space-between;
1947
- padding-left: ${sn.containerPaddingLeftRight.valuePx(e.windowSize)};
1948
- `:ke`
1949
- column-gap: ${r.sp4};
1950
- min-width: min-content;
1951
- `}
1952
- `,_C=y.div`
1953
- display: flex;
1954
- height: 100%;
1955
- background-color: ${e=>e.theme.colors.grey5};
1956
- border: ${e=>`1px solid ${e.theme.colors.grey3}`};
1957
- box-shadow: ${e=>`${r.sp0} 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
1958
- border-radius: ${r.sp2};
1959
- color: ${e=>e.theme.colors.hero};
1960
- border-color: ${e=>e.isSelected?e.theme.colors.primary:"none"};
1961
- cursor: pointer;
1962
- ${e=>e.isQuickViewMode?ke`
1963
- flex: 1;
1964
- padding-left: ${sn.containerPaddingLeftRight.valuePx(e.windowSize)};
1965
- `:ke`
1966
- min-width: min-content;
1967
- `}
1968
- &:hover {
1969
- border-color: ${e=>e.theme.colors.primary};
1970
- }
1971
-
1972
- box-sizing: border-box;
1973
- align-items: center;
1974
- justify-content: space-between;
1975
-
1976
- .ai-icon-selected-plain {
1977
- color: ${e=>e.theme.colors.hero};
1978
- }
1979
-
1980
- ${({isHovered:e,theme:n})=>e?ke`
1981
- .ai-icon-selected-plain {
1982
- color: ${n.colors.primary};
1983
- }
1984
- `:null};
1985
- `,RC=y.div`
1986
- display: flex;
1987
- flex: 1;
1988
- flex-direction: column;
1989
- min-width: min-content;
1990
- box-sizing: border-box;
1991
- align-items: stretch;
1992
- `,IC=y.div`
1993
- display: flex;
1994
- flex: 1;
1995
- flex-direction: row;
1996
- flex-wrap: nowrap;
1997
- align-items: center;
1998
- height: ${r.sp8};
1999
- padding-top: ${e=>sn.containerPaddingTopBottom.valuePx(e.windowSize)};
2000
- padding-bottom: ${e=>sn.containerPaddingTopBottom.valuePx(e.windowSize)};
2001
- ${e=>e.isQuickViewMode===!0?ke`
2002
- width: 100%;
2003
- justify-content: space-between;
2004
- `:ke`
2005
- min-width: min-content;
2006
- column-gap: ${r.sp4};
2007
- `}
2008
- `,jt=y.div`
2009
- display: flex;
2010
- align-items: center;
2011
- flex-direction: row;
2012
- position: relative;
2013
- :last-of-type {
2014
- padding-right: ${r.sp0};
2015
- }
2016
- ${e=>e.isQuickViewMode===!0?ke`
2017
- width: calc(
2018
- ${e.wrapperWidth.valuePercentage(e.windowSize)} -
2019
- ${r.sp4}
2020
- );
2021
- min-width: calc(
2022
- ${e.wrapperWidth.valuePercentage(e.windowSize)} -
2023
- ${r.sp4}
2024
- );
2025
- `:ke`
2026
- box-sizing: border-box;
2027
- width: ${e.wrapperWidth.valuePx(e.windowSize)};
2028
- min-width: ${e.wrapperWidth.valuePx(e.windowSize)};
2029
- max-width: ${e.wrapperWidth.valuePx(e.windowSize)};
2030
- `}
2031
- `,AC=ke`
2032
- word-break: break-word;
2033
- white-space: nowrap;
2034
- -webkit-line-clamp: 1;
2035
- -webkit-box-orient: vertical;
2036
- overflow: hidden;
2037
- text-overflow: ellipsis;
2038
- display: -webkit-box;
2039
- `,An=y(Me)`
2040
- overflow: hidden;
2041
- justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
2042
- display: flex;
2043
- width: 100%;
2044
- align-items: center;
2045
- `,Fr=y.div`
2046
- display: flex;
2047
- flex-direction: row;
2048
- column-gap: ${r.sp2};
2049
- align-items: center;
2050
- `,or=y(Me)`
2051
- ${AC};
2052
- min-width: 0;
2053
- color: ${e=>e.theme.colors.hero};
2054
- `,rr=y(Me)`
2055
- color: ${e=>e.theme.colors.hero};
2056
- `,LC=y.div`
2057
- display: flex;
2058
- align-items: center;
2059
- gap: ${r.sp2};
2060
- cursor: default;
2061
- overflow: hidden;
2062
- min-width: 0;
2063
- `,DC=y(qh)`
2064
- width: ${r.sp3};
2065
- height: ${r.sp3};
2066
- flex-shrink: 0;
2067
- `,OC=y(Jh)`
2068
- width: ${r.sp3};
2069
- height: ${r.sp3};
2070
- flex-shrink: 0;
2071
- `,MC=y(Ap)`
2072
- width: ${r.sp3};
2073
- height: ${r.sp3};
2074
- flex-shrink: 0;
2075
- `,PC=y(e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M4.85022 13.5836L5.52057 12.9133C5.63229 12.8016 5.77164 12.7217 5.92438 12.6815C6.07712 12.6413 6.23779 12.6424 6.38999 12.6846C6.54218 12.7268 6.68046 12.8086 6.7907 12.9217C6.90094 13.0348 6.97919 13.1751 7.01747 13.3283L7.08174 13.5836L7.8119 13.0972C7.98361 12.9827 8.1897 12.9312 8.39508 12.9515C8.60046 12.9719 8.79245 13.0628 8.93837 13.2087L9.31326 13.5836H11.0985",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M17.4206 6H2.24629C2.12792 6 2.01441 6.04702 1.93071 6.13072C1.84701 6.21442 1.79999 6.32794 1.79999 6.4463V17.1576C1.79999 17.276 1.84701 17.3895 1.93071 17.4732C2.01441 17.5569 2.12792 17.6039 2.24629 17.6039H21.8837C22.0021 17.6039 22.1156 17.5569 22.1993 17.4732C22.283 17.3895 22.33 17.276 22.33 17.1576V6.4463C22.33 6.32794 22.283 6.21442 22.1993 6.13072C22.1156 6.04702 22.0021 6 21.8837 6H17.4206Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M16.0854 9.6521H19.6559V12.0656H16.0854V9.6521Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})))`
2076
- width: ${r.sp3};
2077
- height: ${r.sp3};
2078
- flex-shrink: 0;
2079
- `,ao=y(_o)`
2080
- width: ${r.sp3};
2081
- height: ${r.sp3};
2082
- margin: ${r.sp1};
2083
- cursor: pointer;
2084
- color: ${e=>e.theme.colors.brandColorGoldDark};
2085
- &:hover {
2086
- color: ${e=>e.theme.colors.primary};
2087
- }
2088
- `,FC=y.div`
2089
- margin: ${r.sp3};
2090
- `,BC=y(e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M21.7995 14.6384L14.7656 21.6723L11.3086 22.3637L12 18.9067L19.0339 11.8728C19.3997 11.5071 19.8958 11.3016 20.413 11.3016C20.9303 11.3016 21.4263 11.5071 21.7922 11.8728L21.7995 11.8811C21.9808 12.062 22.1246 12.2769 22.2227 12.5134C22.3208 12.75 22.3713 13.0036 22.3713 13.2597C22.3713 13.5158 22.3208 13.7694 22.2227 14.006C22.1246 14.2426 21.9808 14.4575 21.7995 14.6384Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M8.54295 19.5981H3.0117C2.82886 19.6026 2.64701 19.57 2.47718 19.5021C2.30735 19.4342 2.15309 19.3325 2.02376 19.2032C1.89444 19.0739 1.79275 18.9196 1.72487 18.7498C1.65699 18.58 1.62433 18.3981 1.62888 18.2153V4.48579C1.61644 4.10613 1.75499 3.73703 2.01419 3.45934C2.27339 3.18165 2.63209 3.01804 3.0117 3.00433H16.8398C17.2194 3.01804 17.5781 3.18165 17.8373 3.45934C18.0965 3.73703 18.2351 4.10613 18.2226 4.48579V8.53558",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M14.055 8.06982L5.80499 8.06982",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M10.305 12.5698L5.80499 12.5698",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})))`
2091
- width: ${r.sp3};
2092
- height: ${r.sp3};
2093
- `,zC=y(rp)`
2094
- width: ${r.sp5};
2095
- height: ${r.sp5};
2096
- `,HC=y(Rp)`
2097
- width: ${r.sp5};
2098
- height: ${r.sp5};
2099
- `,UC=y(op)`
2100
- width: ${r.sp5};
2101
- height: ${r.sp5};
2102
- `,VC=y(Ip)`
2103
- width: ${r.sp5};
2104
- height: ${r.sp5};
2105
- `,WC=y(Sn)`
2106
- width: ${r.sp3};
2107
- height: ${r.sp3};
2108
- path {
2109
- stroke-width: 2;
2110
- }
2111
- `,KC=y(ap)`
2112
- width: ${r.sp3};
2113
- height: ${r.sp3};
2114
- `,ku=y.div`
2115
- display: flex;
2116
- align-items: center;
2117
- justify-content: center;
2118
- width: ${r.sp5};
2119
- margin-left: ${e=>e.isFirstColumn?r.sp2:r.sp0};
2120
- height: 100%;
2121
- `,GC=y.div`
2122
- display: flex;
2123
- align-items: center;
2124
- justify-content: center;
2125
- width: auto;
2126
- cursor: pointer;
2127
- `,YC=y(Me)`
2128
- display: flex;
2129
- max-width: calc(100% - ${r.sp6});
2130
- flex: 1 1 auto;
2131
- color: ${e=>e.theme.colors.primary};
2132
- text-align: center;
2133
- align-items: center;
2134
- overflow: hidden;
2135
- display: flex;
2136
- `,kc=y.div`
2137
- display: flex;
2138
- `,qC=y.div`
2139
- width: 100%;
2140
- padding-left: 10px;
2141
- margin-left: ${r.sp0};
2142
- border-radius: ${r.sp1};
2143
- background-color: ${e=>e.theme.colors.background};
2144
- display: flex;
2145
- align-items: center;
2146
- flex-direction: row;
2147
- `,ar=y.div`
2148
- padding: ${r.sp0} ${r.sp2};
2149
- border-radius: ${r.sp1};
2150
- margin-left: ${r.sp0};
2151
- width: 100%;
2152
- background-color: ${e=>e.isQuickViewMode===!0?"transparent":e.isHovered?e.theme.colors.background:e.theme.colors.grey5};
2153
- `,$c=y.div`
2154
- width: 100%;
2155
- border-radius: ${r.sp1};
2156
- padding-left: 2px;
2157
- background-color: ${e=>e.theme.colors.background};
2158
- background-color: ${e=>e.isHovered?e.theme.colors.background:e.theme.colors.grey5};
2159
- display: flex;
2160
- align-items: center;
2161
- flex-direction: row;
2162
- `,JC=y(Me)``,ZC=y.div`
2163
- width: 100%;
2164
- display: flex;
2165
- padding-left: ${r.sp0};
2166
- `,sr=y.div`
2167
- width: 100%;
2168
- display: flex;
2169
- flex-direction: row;
2170
- align-items: center;
2171
- gap: ${r.sp2};
2172
- padding: ${r.sp2};
2173
- padding-left: ${r.sp2};
2174
- border-radius: ${r.sp1};
2175
- background-color: ${e=>e.isQuickViewMode===!0?"transparent":e.isHovered?e.theme.colors.background:e.theme.colors.grey5};
2176
- outline: ${e=>e.showOutline?`1px dashed ${e.theme.colors.grey1}`:"none"};
2177
- outline-color: ${e=>e.isHovered&&e.theme.colors.primary};
2178
- `,Ec=y.div``,lr=y.div`
2179
- display: flex;
2180
- align-items: center;
2181
- width: calc(100% - ${r.sp5});
2182
- `,QC=y.div`
2183
- display: flex;
2184
- align-items: center;
2185
- justify-content: center;
2186
- cursor: pointer;
2187
- visibility: hidden;
2188
- flex-shrink: 0;
2189
- margin-left: ${r.sp3};
2190
- `,XC=y(wu)`
2191
- width: ${r.sp3};
2192
- height: ${r.sp3};
2193
- `,eb=y.div`
2194
- display: flex;
2195
- align-items: center;
2196
- justify-content: center;
2197
- width: 100%;
2198
- gap: ${r.sp5};
2199
- `,tb=y(wd)`
2200
- width: ${r.sp3};
2201
- height: ${r.sp3};
2202
- cursor: pointer;
2203
- `,nb=y(e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M20.25 19.5H6.75C6.55109 19.5 6.36032 19.421 6.21967 19.2803C6.07902 19.1397 6 18.9489 6 18.75V2.25C6 2.05109 6.07902 1.86032 6.21967 1.71967C6.36032 1.57902 6.55109 1.5 6.75 1.5H15.75L21 6.75V18.75C21 18.9489 20.921 19.1397 20.7803 19.2803C20.6397 19.421 20.4489 19.5 20.25 19.5Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M15.75 1.5V6.75H21",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M10.4941 11.2559H16.4941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M10.4941 14.2559H16.4941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M16.5 22.5H3V5.85315",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})))`
2204
- width: ${r.sp3};
2205
- height: ${r.sp3};
2206
- cursor: pointer;
2207
- `,ib=y(Zh)`
2208
- width: ${r.sp3};
2209
- height: ${r.sp3};
2210
- cursor: pointer;
2211
- `,ob=({sortConfig:e,fetchState:n,isDisabled:a,isTransactionActivityEnabled:i,onColumnSortConfigChanged:f})=>{const x=Ie();return t.jsxs(rb,{windowSize:x,children:[t.jsx(Cu,{isTransactionActivityEnabled:i,sortConfig:e,isDisabled:n==="In-Progress"?"readonly":a,onColumnSortConfigChanged:f,"data-testid":ae("transaction-categorization-list-empty-table-header")}),t.jsx(ab,{windowSize:x,"data-testid":ae("transaction-categorization-list-empty-rows-container"),children:[...Array(3)].map((o,l)=>t.jsx(vu,{isTransactionActivityEnabled:i,"data-testid":ae("transaction-categorization-list-empty-row",l.toString())},l))})]})},rb=y.div`
2212
- display: block;
2213
- min-height: 100%;
2214
- flex-direction: column;
2215
- width: 100%;
2216
- box-sizing: border-box;
2217
- overflow-x: auto;
2218
- padding-left: ${r.sp8};
2219
- padding-right: ${r.sp8};
2220
- `,ab=y.div`
2221
- display: flex;
2222
- flex: 1;
2223
- min-height: 100%;
2224
- flex-direction: column;
2225
- row-gap: ${r.sp3};
2226
- `,{common:sb,transactionDetail:{notCategorizedTooltipText:lb}}=$e.getLocalizedStrings(),cr={rowGap:new pe(W[0],W[2],W[3])},cb=({selectedTab:e,transactionView:n,authParams:a,sectionId:i,isCOTEnabled:f,isDisabled:x,vendorSearchAutoCompleteActions:o,isTransactionActivityEnabled:l,vendorSearchAutoCompleteData:p,setCurrentTransactionInAction:v,vendorLoadOptions:w,onTransactionCategorizationRowClick:d,onUpdateTransactionCategorizationUIState:s,onUpdateScrollYOffSetTransactionCategorizationUIState:C,onFetchTransactionCategorizationList:S,containerRef:T,cotTracking:u,isUncategorizedExpenseCategoryEnabled:m,setActivityLogTransactionId:E,onUploadTransactionReceipt:k})=>{const j=Ie(),D=lt(),[M,_]=c.useState(void 0),{fetchState:R,uiState:A,transactionLocalData:F,selectedCheckBoxTransactionIds:K,transactionIdsWithUnsavedData:ee,transactions:te,uncategorizedAccounts:Z}=n;vi({componentName:`expense_automation.transaction_categorization.${e}`,enabled:R==="Completed"});const B=c.useRef(null),O=c.useRef({}),{control:g}=Kr();c.useEffect(()=>{B.current?.resetAfterIndex(0,!0)},[j,B,F]),c.useEffect(()=>{B.current?.scrollTo(A.scrollPosition?.scrollTop??0)},[e]);const h=c.useCallback(q=>{if(O.current?.[q]!=null){const X=j==="small"&&A.pageToken==null&&q===F.length-1?cr.rowGap.value("medium-regular"):cr.rowGap.value(j);return O.current[q]+X}if(F[q]==null)return 0;const P=F[q].transactionReviewLocalData,J=Object.keys(P.lineItemById).length;return J!=null&&!isNaN(J)&&J>1?56*J+cr.rowGap.value(j)*(J-1):56},[F,j,A.pageToken,A.sortKey,A.sortOrder]),N=c.useCallback((q,P)=>{O.current={...O.current,[q]:P},B.current?.resetAfterIndex(0,!0)},[j,B,F,A.sortKey,A.sortOrder]),$=c.useCallback(()=>{(A.pageToken!=null&&n.refreshStatus.fetchState!=="In-Progress"||n.refreshStatus.fetchState==="Completed")&&S(e,A.searchString,!0,A.pageToken,!0,!1)},[n.refreshStatus.fetchState,S,e,A.pageToken,A.searchString,A.sortKey,A.sortOrder]),b=c.useCallback(()=>{A.pageToken!=null&&$()},[$,A.pageToken,A.sortKey,A.sortOrder]),I=Rh(q=>C(e,{scrollPosition:{scrollTop:q}}),1e3,{trailing:!0}),L=q=>q<n.transactionLocalData.length,U=(q,P)=>{s(e,{sortOrder:P,sortKey:q}),S(e,A.searchString,!1,null,!1,!0)};let Q=[],Y=[];(R==="Completed"||n.transactionLocalData.length>0)&&(Y=n.transactionLocalData.map((q,P)=>{const J=(re=>{if(e==="autoCategorized")return!K.includes(re);const ie=F.find(he=>he.transactionId===re)?.transactionReviewLocalData,ce=te.find(he=>he.id===re);return ce!=null&&ie!=null?!yp(ce,ie,Z,m)||!(m!==!0||!Sa(Z,ie.lineItemById,["expense"]))&&ee.includes(re)===!1:K.length===0||!K.includes(re)})(q.transactionId);let X=!1;m===!0&&J===!0&&e==="review"&&Sa(Z,q.transactionReviewLocalData.lineItemById,["expense"])&&(X=!ee.includes(q.transactionId));const ne=q.transactionReviewLocalData;return{label:t.jsx(EC,{isTransactionActivityEnabled:l,transactionView:n,sectionId:`${i}.${P}.${bu}`,transaction:q,authParams:a,onTransactionCategorizationRowClick:d,vendorLoadOptions:w,setCurrentTransactionInAction:v,vendorSearchAutoCompleteActions:o,vendorSearchAutoCompleteData:p,selectedTab:e,containerRef:T,listContainerRef:B,isCOTEnabled:f,cotTracking:u,openTooltipId:M,setOpenTooltipId:_,isUncategorizedExpenseCategoryEnabled:m,setActivityLogTransactionId:E,onUploadTransactionReceipt:k},`${q.transactionId}.${ne.transactionType}`),value:q.transactionId,defaultChecked:!1,groupLabel:!1,isException:X,exceptionMode:X===!0?"checked_or_hover":void 0,isSticky:!0,isDisabled:J===!0?"readonly":void 0,exceptionType:X===!0?"alert":void 0,exceptionInfo:X===!0?lb:void 0,exceptionTooltipStyle:{textAlign:"center",maxWidth:"250px",padding:`12px ${r.sp2}`}}}),Q=Y.map(q=>q.value));const z={label:"All",value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},{title:H,subTitle:V}=et("transaction_categorization").allDoneText,G=F.map(q=>q.transactionId),oe=c.useMemo(()=>n.totalCountByTab[e],[e,n.totalCountByTab]),se=c.useMemo(()=>F.reduce((q,P)=>{const J=Object.keys(P.transactionReviewLocalData.lineItemById).length;return q+(J>0?J:1)},0)<n.totalCountByTab[e]?F.length+1:F.length,[F,n.totalCountByTab,e]);return t.jsx(gb,{windowSize:j,"data-testid":ae("transaction-categorization-list-wrapper"),children:t.jsx(mb,{windowSize:j,"data-testid":ae("transaction-categorization-list-container"),children:R==="Error"?t.jsxs(xb,{windowSize:j,"data-testid":ae("transaction-categorization-reload-page"),children:[t.jsx(yb,{onClick:()=>S(e,void 0,!0,null,!1,!0),"data-testid":ae("transaction-categorization-reload-icon"),children:t.jsx(To,{})}),t.jsx(Cb,{"data-testid":ae("transaction-categorization-reload-label"),children:sb.reloadPage.label})]}):R==="Completed"&&F.length===0?t.jsx(zt,{tab:"transaction_categorization",title:H,subTitle:V,"data-testid":ae("transaction-categorization-empty-table-section")}):R==="Not-Started"||R==="In-Progress"&&F.length===0?t.jsx(ob,{sortConfig:{sortKey:A.sortKey,sortOrder:A.sortOrder},fetchState:R,onColumnSortConfigChanged:U,"data-testid":ae("transaction-categorization-list-empty-table"),isTransactionActivityEnabled:l}):t.jsx(fb,{windowSize:j,"data-testid":ae("transaction-categorization-list-view"),children:t.jsx(Cd,{control:g,name:"selectedTransactionIds",defaultValue:[],render:({field:{value:q,ref:P,onChange:J}})=>t.jsx($u.Provider,{value:{value:q,mode:"off",allCheckBoxValues:Q,index:0,isQuickViewMode:D,sortKey:A.sortKey,sortOrder:A.sortOrder,fetchState:R,isDisabled:x,groupLabelCheckBox:z,isTransactionActivityEnabled:l,onColumnSortConfigChanged:U,ref:P,onChange:J,selectedTab:e},children:t.jsx(bi,{children:({height:X,width:ne})=>t.jsx(cd,{isItemLoaded:L,itemCount:oe,loadMoreItems:b,children:({onItemsRendered:re,ref:ie})=>t.jsx(No,{ref:ce=>{ie(ce),B.current=ce},height:X,itemCount:se,itemKey:ce=>`${F[ce]?.transactionId??""}-row-${ce}`,innerElementType:db,onItemsRendered:re,width:ne,style:{willChange:"auto"},overscanCount:1,itemSize:h,itemData:{checkboxes:Y,value:q,allCheckBoxValues:Q,groupLabelCheckBox:z,categorizationGroupValue:G,transactionLocalData:F,isQuickViewMode:D,mode:"always_on",setRowHeight:N,isItemLoaded:L,ref:ie,onChange:J,selectedCheckBoxTransactionIds:K,isTransactionActivityEnabled:l},initialScrollOffset:n.uiState.scrollPosition?.scrollTop,onScroll:({scrollOffset:ce})=>{I(ce)},children:hb})})})})})})})})},db=e=>{const{isQuickViewMode:n,value:a,allCheckBoxValues:i,groupLabelCheckBox:f,index:x,isDisabled:o,fetchState:l,sortKey:p,sortOrder:v,mode:w,isTransactionActivityEnabled:d,ref:s,onChange:C,onColumnSortConfigChanged:S}=ub(),T=St(),{children:u,style:m,...E}=e;return l==="Completed"?t.jsxs(bb,{ref:s,style:{...m,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)"},...E,children:[t.jsx(wb,{children:t.jsx(Tr,{selectionLimit:xi,value:a,checkBoxContainerStyle:{width:"auto",backgroundColor:T.colors.grey4},checkBox:{label:t.jsx(pb,{isQuickViewMode:n,children:t.jsx(Cu,{isTransactionActivityEnabled:d,sortConfig:{sortKey:p,sortOrder:v},isDisabled:o,onColumnSortConfigChanged:S})}),value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},isDisabled:"disabled",groupLabelCheckBox:f,allCheckBoxValues:i,mode:n?"off":w,draggable:!1,checkBoxStyle:n?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:r.sp3},name:"transactionCategorizationHeader",index:x,onChangeHandler:k=>Td({event:k,value:a,allCheckBoxValues:i,groupLabelCheckBox:f,onChange:C}),ref:s})}),t.jsx(vb,{children:u})]},`${i[x]}-${x}`):null},$u=c.createContext(void 0),ub=()=>{const e=c.useContext($u);if(!e)throw new Error("useStickyContext must be used within a StickyProvider");return e},hb=({index:e,style:n,data:a})=>{const{selectedTransactionId:i}=jo(),{checkboxes:f,value:x,groupLabelCheckBox:o,categorizationGroupValue:l,allCheckBoxValues:p,transactionLocalData:v,isQuickViewMode:w,isItemLoaded:d,setRowHeight:s,ref:C,onChange:S,selectedCheckBoxTransactionIds:T,isTransactionActivityEnabled:u}=a,m=c.useRef(null),E=Ie();if(c.useEffect(()=>{m.current?.firstElementChild!=null&&s(e,m.current.firstElementChild.clientHeight)},[e,m,E,v[e]?.transactionReviewLocalData]),d(e)===!0){const k=f[e],j=i!=null&&i===l[e];return t.jsx(Tc,{isPanelSelected:j,isQuickViewMode:w,style:{...n,paddingBottom:r.sp0,width:"100%",flex:"1"},ref:m,children:t.jsx(Tr,{selectionLimit:xi,checkBox:w===!0?{...k,isException:!1}:k,value:x,groupLabelCheckBox:o,allCheckBoxValues:p,mode:w===!0||k.isDisabled==="readonly"||T.includes(k.value)===!1&&T.length>=xi?"off":"always_on",draggable:!1,isDisabled:k.isDisabled,checkBoxStyle:w===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:r.sp3},infoIconContainerStyle:w===!0?{display:"none"}:{padding:20},name:`${Dn}.${x}`,ref:C,index:e,onChangeHandler:D=>Td({event:D,value:x,allCheckBoxValues:p,groupLabelCheckBox:o,onChange:S})})},l[e])}return t.jsx(Tc,{isQuickViewMode:w,style:{...n,paddingBottom:r.sp0,width:"100%",flex:"1"},ref:m,children:t.jsx(Tr,{checkBox:{label:t.jsx(vu,{isTransactionActivityEnabled:u}),value:"loading",defaultChecked:!1,groupLabel:!1},value:x,groupLabelCheckBox:o,allCheckBoxValues:p,mode:"off",draggable:!1,checkBoxStyle:w===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:r.sp3},infoIconContainerStyle:w===!0?{display:"none"}:{padding:20},name:"loading-placeholder",index:e,onChangeHandler:()=>{}})},pd())},pb=y.div`
2227
- flex: 1;
2228
- width: auto;
2229
- padding-left: ${({isQuickViewMode:e})=>e===!0?r.sp8:r.sp0};
2230
- padding-right: ${({isQuickViewMode:e})=>e===!0?r.sp0:r.sp8};
2231
- `,gb=y.div`
2232
- width: 100%;
2233
- height: 100%;
2234
- background-color: ${e=>e.theme.colors.grey4};
2235
- `,mb=y.div`
2236
- height: 100%;
2237
- `,fb=y.div`
2238
- height: 100%;
2239
- display: flex;
2240
- flex-direction: column;
2241
- max-width: 99.9%;
2242
- `,xb=y.div`
2243
- display: flex;
2244
- width: 100%;
2245
- height: ${e=>`calc(100% - ${yd.valuePx(e.windowSize)})`};
2246
- flex-direction: column;
2247
- justify-content: center;
2248
- align-items: center;
2249
- `,yb=y.div`
2250
- height: 96px;
2251
- width: 96px;
2252
- background: ${e=>e.theme.colors.background};
2253
- border-radius: 50%;
2254
- cursor: pointer;
2255
- & svg {
2256
- margin: ${r.sp5};
2257
- color: ${e=>e.theme.colors.grey1};
2258
- }
2259
- &:hover {
2260
- & svg {
2261
- color: ${e=>e.theme.colors.primary};
2262
- }
2263
- }
2264
- `,Cb=y(nt)`
2265
- margin-top: ${r.sp3};
2266
- color: ${e=>e.theme.colors.hero};
2267
- `,Tc=y.div`
2268
- top: ${r.sp0};
2269
- left: ${r.sp0};
2270
- padding-bottom: ${r.sp3};
2271
- padding-left: ${({isQuickViewMode:e})=>e===!0?r.sp8:r.sp0};
2272
- padding-right: ${({isQuickViewMode:e})=>e===!0?r.sp0:r.sp8};
2273
- box-sizing: border-box;
2274
- ${e=>e.isPanelSelected===!0&&ke`
2275
- .categorization-row-card {
2276
- ${Jr(e.theme)}
2277
- }
2278
- `}
2279
- `,bb=y.div`
2280
- background-color: ${e=>e.theme.colors.grey4};
2281
- `,wb=y.div`
2282
- top: 0;
2283
- left: 0;
2284
- width: 100%;
2285
- min-width: 100%;
2286
- z-index: 11;
2287
- display: flex;
2288
- align-items: center;
2289
- position: sticky;
2290
- background-color: ${e=>e.theme.colors.grey4};
2291
- `,vb=y.div`
2292
- position: relative;
2293
- width: auto;
2294
- height: 100%;
2295
- `,Sb=({selectedTab:e,transactionView:n,authParams:a,sectionId:i,vendorSearchAutoCompleteData:f,vendorSearchAutoCompleteActions:x,isCOTEnabled:o,isTransactionActivityEnabled:l,setCurrentFooterFormId:p,setLocalDataForCategoryAndClass:v,onTransactionCategorizationRowClick:w,onUpdateTransactionCategorizationUIState:d,onUpdateScrollYOffSetTransactionCategorizationUIState:s,onFetchTransactionCategorizationList:C,onSaveUpdateTransactionCategorization:S,onUpdateSelectedCheckboxTransactionIds:T,onFetchRecommendationsForEntityCategorization:u,onFetchRecommendationsForEntityCategorizationWithCustomer:m,setActivityLogTransactionId:E,onUploadTransactionReceipt:k})=>{const[j,D]=c.useState({transactionId:void 0,lineItemId:void 0}),M=c.useRef(),_=c.useRef({}),{useDynamicConfig:R}=gd(),{configValue:A}=R(md.enableUncategorizedExpenseCategory),F=A?.uncategorized_expense_category_enabled===!0,{transactions:K,transactionLocalData:ee,accountsHierarchyList:te,classHierarchyList:Z,accountList:B,classList:O,selectedCheckBoxTransactionIds:g,uncategorizedAccounts:h}=n,N=Fn({mode:"all",reValidateMode:"onChange",defaultValues:c.useMemo(()=>Nc(g,ee,te,Z,f.entityAutoCompleteView),[te,Z,g,ee,f.entityAutoCompleteView]),values:c.useMemo(()=>Nc(g,ee,te,Z,f.entityAutoCompleteView),[te,Z,g,ee,f.entityAutoCompleteView]),resetOptions:{keepDefaultValues:!0,keepDirty:!1}});c.useEffect(()=>()=>{p("expenseAutomationPage")},[]),c.useEffect(()=>{g.length>0?p(nr):p("expenseAutomationPage")},[g,p]);const $=N.handleSubmit(I=>{const L=I[wo],U=_.current;S(e,L,U),L.forEach(Q=>{delete _.current[Q]})});c.useEffect(()=>{const I=N.watch((L,{name:U})=>{U!=null&&L!=null&&Si(()=>(async(Q,Y)=>{if(Q!=null){if(Q===wo){const z=N.getValues(wo);if(z.length<g.length||z.length===xi)return void T(e,z);const H=z[z.length-1],V=Y[Dn].findIndex(oe=>oe.transactionId===H),G=N.getValues(`${Dn}.${V}.lineInfo`);if(G!=null){let oe=!1;if(G.every(se=>(oe=ui(h,se[Ge].selectedOption,F?["income"]:void 0),!(!se[Ge].selectedOption||se[Ge].selectedOption==null||oe||!se[wt].selectedOption||!se[Bt].selectedOption)))===!0)return void T(e,z);{const se=z.filter(q=>q!==H);return void T(e,se)}}return}if(Q.includes(Ge)===!0||Q.includes(wt)===!0){const z=parseInt(Q.split(".")[1]),H=parseInt(Q.split(".")[3]),V=N.getValues(`${Dn}.${z}.lineInfo`),G=V[H];if(Q.includes(Ge)||Q.includes(wt)){const{transactionId:oe,lineId:se,recommendations:q}=G;if(V!=null){const P=G[Ge].selectedOption,J=G[wt].selectedOption,X=G[Bt].selectedOption,ne=G[Bt].selectedOption,re=G[Bt].defaultOptions,ie=re?.find(de=>de.options?.find(ye=>ye.value===X))?.options?.find(de=>de.value===X)?.label,ce=re?.find(de=>de.options?.find(ye=>ye.value===ne))?.options?.find(de=>de.value===ne)?.label,he=f.entityAutoCompleteView.vendor.find(de=>de.qboId===X),ue=f.entityAutoCompleteView.customer.find(de=>de.qboId===ne),Ce=q.find(de=>de.vendor?.qboId===X)?.vendor,be=X||he?.qboId||Ce?.qboId?{id:X??he?.qboId??Ce?.qboId??"",name:ie??he?.name??Ce?.name??"",logo:he?.logo??Ce?.logo}:void 0,me=ne||ue?.qboId?{id:ne??ue?.qboId??"",name:ce??ue?.name??"",logo:ue?.logo}:void 0,le=B.find(de=>de.qboId===P),Re=O.find(de=>de.classId===J),xe=n.transactionLocalData.find(de=>de.transactionId===oe)?.transactionReviewLocalData.lineItemById[se].account,ge=n.transactionLocalData.find(de=>de.transactionId===oe)?.transactionReviewLocalData.lineItemById[se].class;v(e,oe,se,K,be?.id,me?.id,Q.includes(Ge)&&le!=null?{...le,isPreFilled:!1}:xe,Q.includes(wt)&&Re!=null?{...Re,isPreFilled:!1}:ge,void 0,q,F)}return}}if(Q.includes(Bt)){const z=parseInt(Q.split(".")[1]),H=parseInt(Q.split(".")[3]),V=N.getValues(`${Dn}.${z}.lineInfo`);if(V!=null){const G=V[H],{transactionId:oe,recommendations:se}=G,q=G[Bt].selectedOption,P=G[Bt].selectedOption,J=G[Bt].defaultOptions,X=J?.flatMap(le=>le.options)?.find(le=>le.value===q)?.label,ne=J?.flatMap(le=>le.options)?.find(le=>le.value===P)?.label,re=f.entityAutoCompleteView.vendor.find(le=>le.qboId===q),ie=f.entityAutoCompleteView.customer.find(le=>le.qboId===P),ce=se.find(le=>le.vendor?.qboId===q)?.vendor,he=q!==""&&q!=null?q:X!==""&&X!=null?X:"",ue=(re?.qboId!=null&&re.qboId!==""?re.qboId:null)??(ce?.qboId!=null&&ce.qboId!==""?ce.qboId:null)??(q!=null&&q!==""?q:null),Ce={id:ue??X??"",name:X??re?.name??ce?.name??"",logo:re?.logo??ce?.logo},be=ie?.qboId!=null&&ie.qboId!==""?{id:ie.qboId??P??"",name:ne??ie.name??"",logo:ie.logo}:void 0,me=K.find(le=>le.id===oe);if(me!=null){const le=n.transactionLocalData.find(ye=>ye.transactionId===me.id)?.transactionReviewLocalData,Re=le?.lineItemById[G.lineId],xe=Nn(me)===!0?le?.selectedEntity:Re?.selectedEntityLine,ge=be?.id!=null&&be.id!==""?{id:be.id,name:be.name,type:"customer",qboId:be.id,zeniId:be.id,logo:be.logo}:Ce.id!==""&&Ce.id!=null?{id:he,name:X??he,type:"vendor",qboId:he,zeniId:he,logo:Ce.logo,isPreFilled:xe?.id===ue&&xe?.isPreFilled}:void 0,de={transactionId:{id:me.id,type:me.type},transaction:me,lineIds:me.type!=="journal_entry"?me.lines?.map(ye=>ye.id)??[]:[G.lineId]};ge?.type==="customer"?m(G.amount.amount,de,!1,e,ge,be,F):u(G.amount.amount,de,!1,e,ge,Ce,F)}}return void x.onCancelAutoComplete?.()}}})(U,L))});return()=>{I.unsubscribe()}}),c.useEffect(()=>{if(f.entityAutoCompleteView.fetchState==="Completed"){const I=n.transactionLocalData.find(L=>L.transactionId===j.transactionId);if(I){const{transactionReviewLocalData:L}=I,{selectedEntity:U}=L,Q=j?.lineItemId??L.sortedLineItems[0],Y=L.lineItemById[Q],z=Y.selectedEntityLine;M.current?.(Wr(f.entityAutoCompleteView,U??z,Y?.recommendationsWithCOT??[]))}D({transactionId:void 0,lineItemId:void 0})}},[f.entityAutoCompleteView.fetchState]);const b=c.useRef(null);return t.jsx($b,{ref:b,"data-testid":ae("transaction-categorization-list-page"),children:t.jsx(Bn,{...N,children:t.jsx("form",{id:jc(nr),onSubmit:$,style:{height:"100%",width:"100%"},"data-testid":ae(jc(nr)),children:t.jsx(cb,{isTransactionActivityEnabled:l,selectedTab:e,sectionId:i,transactionView:n,authParams:a,setCurrentTransactionInAction:D,onUpdateTransactionCategorizationUIState:d,onUpdateScrollYOffSetTransactionCategorizationUIState:s,onFetchTransactionCategorizationList:C,onTransactionCategorizationRowClick:w,vendorLoadOptions:(I,L)=>{x.onAutoCompleteInputChange?.(I),M.current=L},vendorSearchAutoCompleteData:f,vendorSearchAutoCompleteActions:x,containerRef:b,isCOTEnabled:o,cotTracking:{onCOTView:(I,L,U,Q)=>{const Y={..._.current};Y[L]==null&&(Y[L]=[]);let z=Y[L].findIndex(H=>H.lineId===I);if(z===-1){const H={lineId:I,category:{recommendationTypesViewed:[]},class:{recommendationTypesViewed:[]},vendor:{recommendationTypesViewed:[]}};Y[L].push(H),z=Y[L].length-1}else{const H=Y[L][z];Y[L][z]={...H,category:{...H.category,recommendationTypesViewed:[...H.category.recommendationTypesViewed]},class:{...H.class,recommendationTypesViewed:[...H.class.recommendationTypesViewed]},vendor:{...H.vendor,recommendationTypesViewed:[...H.vendor.recommendationTypesViewed]}}}Q!=null&&Q!==""&&!Y[L][z][U].recommendationTypesViewed.includes(Q)&&Y[L][z][U].recommendationTypesViewed.push(Q),_.current=Y}},isUncategorizedExpenseCategoryEnabled:F,setActivityLogTransactionId:E,onUploadTransactionReceipt:k})})})})},jc=e=>`${e}_form`,Nc=(e,n,a,i,f)=>({[Dn]:n.map(x=>kb(x.transactionId,x.transactionReviewLocalData,a,i,f)),[wo]:e}),kb=(e,n,a,i,f)=>{const{lineItemById:x,sortedLineItems:o,selectedEntity:l}=n,p=Object.values(x).sort((w,d)=>o.indexOf(w.lineId)-o.indexOf(d.lineId)),v=p[0]?.lineId;return{[bu]:p.map(w=>{const d=w.account?.qboId??w.account?.accountId,s=w.class?.classId,C=w.selectedEntityLine;return{id:w.id,transactionId:w.transactionId,type:w.type,amount:w.amount,lineDetailType:w.lineDetailType,platformLineDetailType:w.platformLineDetailType,lineTransactionType:w.lineTransactionType,postingType:w.postingType,postingTypeName:w.postingTypeName,customer:w.customer,vendor:w.vendor,billable:w.billable,item:w.item,isCategoryMiscategorized:w.isCategoryMiscategorized,isClassMiscategorized:w.isClassMiscategorized,lineId:w.id,[Ge]:{selectedOption:d,allOptions:Ed(a,w.recommendationsWithCOT)},[wt]:{selectedOption:s,allOptions:$d(i,w.recommendationsWithCOT)},[Bt]:{selectedOption:l?.id??C?.id??l?.name??C?.name,defaultOptions:Wr(f,l??C,n.lineItemById[v]?.recommendationsWithCOT??[])},[xC]:w.lineEntity,[yC]:w.recommendationsWithCOT??[]}}),transactionId:e,[CC]:n.vendorDetails!=null&&n.vendorDetails.id!=null?{id:n.vendorDetails.id,qboId:n.vendorDetails.qboId,name:n.vendorDetails.name}:void 0,[bC]:n.customerDetails!=null&&n.customerDetails.id!=null?{id:n.customerDetails.id,qboId:n.customerDetails.qboId,name:n.customerDetails.name}:void 0}},$b=y.div`
2296
- display: flex;
2297
- min-height: 100%;
2298
- width: 100%;
2299
- height: 100%;
2300
- flex-direction: column;
2301
- background-color: ${e=>e.theme.colors.grey4};
2302
- z-index: 2;
2303
- `,_c={subSectionContainerLeftRightPadding:new pe(W[3],W[6],W[8])},Eb=y.div`
2304
- width: 100%;
2305
- display: flex;
2306
- justify-content: center;
2307
- align-items: center;
2308
- flex: 1;
2309
- background: ${e=>e.theme.colors.grey4};
2310
- box-sizing: border-box;
2311
- `,Tb=y.div`
2312
- display: flex;
2313
- flex-direction: column;
2314
- width: 100%;
2315
- `,jb=e=>{const{currentFooterFormId:n,onJeAccountSettingsChange:a,onSaveJeAccountSettingsClick:i,setResetJeAccountSettingsForm:f,expenseAutomationViewSelector:x,isTransactionActivityEnabled:o,authParams:l,receiptUploadEndpoint:p,companyId:v,vendorSearchAutoCompleteActions:w,vendorSearchAutoCompleteData:d,enableMonthEndInsightsZeniGPTFeature:s,monthEndInsightsPreviewMode:C,monthEndInsightsCustomerRequestData:S,allThreadsSectionOpen:T,loggedInUser:u,isCOTEnabled:m,setCurrentFooterFormId:E,onFetchRecommendationsForEntityCategorization:k,onFetchRecommendationsForEntityCategorizationWithCustomer:j,onTransactionCategorizationRowClick:D,onFetchMissingReceiptsList:M,onMissingReceiptsRowClick:_,onUploadReceiptAttachment:R,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:F,onReconTabColumnSortConfigChanged:K,onReloadReconciliationListPage:ee,onUpdateReconcileTabLocalData:te,onUpdateMissingReceiptsUIState:Z,onFetchTransactionCategorizationList:B,onUpdateTransactionCategorizationUIState:O,onUpdateScrollYOffSetTransactionCategorizationUIState:g,handleJeScheduleClick:h,ignoreRecommendedJeSchedule:N,onJESchedulesFormDataChange:$,onPostJESchedule:b,setLocalDataForCategoryAndClass:I,resetTransactionCategorizationLocalData:L,updateSelectedVendorForTransaction:U,onSaveUpdateTransactionCategorization:Q,onUpdateSelectedCheckboxTransactionIds:Y,improveMonthEndInsightsUsingZeniGPTClick:z,onRemoveFileAttachment:H,onUpdateFileAttachment:V,onCloseAllThreadsSection:G,onEditMonthEndInsightsClick:oe,previewMonthEndReport:se,saveMonthEndReport:q,onOpenFileAttachmentSnackBar:P,onCloseFileAttachmentSnackBar:J,onClickCustomerRequest:X,sendMonthEndReport:ne,markAsReview:re,onReloadPage:ie,updateOperatingExpensesIdsForReview:ce,onFetchReimbursementView:he,updateSectionIdsForReview:ue,onUpdateFluxAnalysisUIState:Ce,fetchFluxViewOnScroll:be,onFetchFluxViewList:me,setIsJeAccountSettingsOpened:le,onReviewClicked:Re,setOpenDrawerClicked:xe,onEstablishConnectionClick:ge,onFetchLinkTokenClick:de,updateReconReviewTabLocalData:ye,onReconReviewTabColumnSortConfigChanged:Ne,onSaveReconciliation:Pe,onSaveReconciliationReview:Oe,onReconMatchedTransactionClick:Ue,onAddStatementClick:Et,redirectToVendorDetailPage:Qe,setActivityLogTransactionId:ct}=e,{currentSelectedView:it,missingReceipts:kn,transactionView:dt,selectedPeriod:$n,monthEndInsights:Rt,selectedTransactionCategorizationTab:cn,reconciliation:dn}=x;switch(it){case"transaction_categorization":return dt.fetchState==="Completed"&&dt.transactionLocalData.length===0?t.jsx(zt,{tab:it,title:et(it).allDoneText.title,subTitle:et(it).allDoneText.subTitle}):t.jsx(Sb,{setCurrentFooterFormId:E,selectedPeriod:$n,selectedTab:cn,sectionId:Dn,transactionView:dt,authParams:l,isTransactionActivityEnabled:o,onUpdateTransactionCategorizationUIState:O,onUpdateScrollYOffSetTransactionCategorizationUIState:g,onFetchTransactionCategorizationList:B,onTransactionCategorizationRowClick:D,setLocalDataForCategoryAndClass:I,resetTransactionCategorizationLocalData:L,updateSelectedVendorForTransaction:U,onSaveUpdateTransactionCategorization:Q,onUpdateSelectedCheckboxTransactionIds:Y,vendorSearchAutoCompleteActions:w,vendorSearchAutoCompleteData:d,onFetchRecommendationsForEntityCategorization:k,onFetchRecommendationsForEntityCategorizationWithCustomer:j,isCOTEnabled:m,setActivityLogTransactionId:ct,onUploadTransactionReceipt:e.onUploadTransactionReceipt});case"je_schedules":return t.jsx(Ix,{setIsJeAccountSettingsOpened:le,expenseAutomationViewSelector:x,setResetJeAccountSettingsForm:f,currentFooterFormId:n,onJeAccountSettingsChange:a,onSaveJeAccountSettingsClick:i,setCurrentFooterFormId:E,handleJeScheduleClick:h,ignoreRecommendedJeSchedule:N,onJESchedulesFormDataChange:$,onPostJESchedule:b,vendorSearchAutoCompleteActions:w,vendorSearchAutoCompleteData:d});case"missing_receipts":return kn.fetchState==="Completed"&&kn.transactions.length===0?t.jsx(zt,{tab:it,title:et(it).allDoneText.title,subTitle:et(it).allDoneText.subTitle}):t.jsx(xy,{onUpdateMissingReceiptsUIState:Z,onFetchMissingReceiptsList:M,missingReceipts:kn,receiptUploadEndpoint:p,authParams:l,selectedPeriod:$n,onMissingReceiptsRowClick:_,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:F,onUploadReceiptAttachment:R});case"month_end_insights":if(Rt!=null&&x.monthEndCloseChecksView.monthEndCloseChecks!=null){if(Rt.fetchState==="Not-Started"||Rt.fetchState==="In-Progress"||Rt.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||Rt.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return t.jsx(bp,{fetchState:"In-Progress"});{const un={application:"cockpit",companyId:v,entityId:v,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:Rt.companyName,url:window.location.href},{url:ri,...Zt}=un,Ht={...Zt};return t.jsx(Tb,{children:t.jsx(Vy,{allThreadsSectionOpen:T,customerRequestData:S,companyId:v,enableZeniGPTFeature:s,filterMetaData:Ht,selectedPeriod:x.selectedPeriod,improveUsingZeniGPTClick:z,isZeniUser:u?.userEmail?.includes("zeni.ai")??!1,monthEndReportView:Rt,newThreadMetadata:un,onClickCustomerRequest:X,onCloseAllThreadsSection:G,onCloseFileAttachmentSnackBar:J,onOpenFileAttachmentSnackBar:P,onRemoveFileAttachment:H,onUpdateFileAttachment:V,previewMode:C,previewMonthEndReport:se,saveMonthEndReport:q,onEditClick:oe,sendMonthEndReport:ne})})}}return null;case"flux_analysis":return x.fluxAnalysis.fetchStatus.fetchState==="Completed"&&x.fluxAnalysis.sections.generalExpense.vendors.length===0&&x.fluxAnalysis.sections.reimbursement.vendors.length===0?t.jsx(zt,{tab:it,title:et(it).allDoneText.title,subTitle:et(it).allDoneText.subTitle}):t.jsx(cx,{fluxAnalysis:x.fluxAnalysis,selectedPeriod:x.selectedPeriod,markAsReview:re,onReloadPage:ie,updateOperatingExpensesIdsForReview:ce,updateSectionIdsForReview:ue,onUpdateFluxAnalysisUIState:Ce,setCurrentFooterFormId:E,fetchFluxViewOnScroll:be,onFetchFluxViewList:me,onFetchReimbursementView:he,redirectToVendorDetailPage:Qe});case"reconciliation":return t.jsx(Q0,{onReloadReconciliationListPage:ee,currentFooterFormId:n,reconciliation:dn,companyId:v,vendorSearchAutoCompleteActions:w,vendorSearchAutoCompleteData:d,onReviewClicked:Re,setOpenDrawerClicked:xe,setCurrentFooterFormId:E,onReconTabColumnSortConfigChanged:K,onUpdateReconcileTabLocalData:te,onEstablishConnectionClick:ge,onFetchLinkTokenClick:de,updateReconReviewTabLocalData:ye,onReconReviewTabColumnSortConfigChanged:Ne,onSaveReconciliation:Pe,onSaveReconciliationReview:Oe,onReconMatchedTransactionClick:Ue,onAddStatementClick:Et});default:return t.jsx(zt,{tab:it,title:et(it).allDoneText.title,subTitle:et(it).allDoneText.subTitle})}};function Eu(e){const n=Ie(),{currentSelectedView:a}=e.expenseAutomationViewSelector,i=e.expenseAutomationViewSelector.currentSelectedView==="transaction_categorization",f=e.expenseAutomationViewSelector.currentSelectedView!=="month_end_insights"&&e.expenseAutomationViewSelector.currentSelectedView!=="flux_analysis";return t.jsx(Eb,{windowSize:n,style:{...f===!0?{paddingLeft:_c.subSectionContainerLeftRightPadding.value(n),paddingRight:_c.subSectionContainerLeftRightPadding.value(n)}:{paddingLeft:W[0],paddingRight:W[0]},...i===!0||a==="reconciliation"?{paddingLeft:W[0],paddingRight:W[0]}:{}},children:t.jsx(jb,{...e})})}const Nb=["receipts"],Rc=e=>Yr(e,Nb),{common:{texts:{vendor:_b,amount:Rb,receipts:Ib,category:Ab,classText:Lb,date:Db}}}=$e.getLocalizedStrings(),Tu={key:"vendor",value:_b,sortOrder:"ascending",width:new pe(18,18)},Ob={key:"category",value:Ab,sortOrder:"ascending",width:new pe(18,18)},Mb={key:"class",value:Lb,sortOrder:"ascending",width:new pe(18,18)},Pb={key:"date",value:Db,sortOrder:"descending",width:new pe(11,11)},Fb={key:"receipts",value:Ib,sortOrder:"descending",width:new pe(6,6)},ju={key:"amount",value:Rb,sortOrder:"ascending",width:new pe(10,10)},da=[Tu,Ob,Mb,Pb,Fb,ju],ua=[{...Tu,width:new pe(65,65)},{...ju,width:new pe(30,30)}],Ic="date",Bb="descending",Nu=({sortConfig:e,isDisabled:n,onColumnSortConfigChanged:a})=>{const i=Ie(),f=lt(),x=f?ua:da,[o,l]=c.useState(()=>x.map(v=>({...v,sortOrder:v.key===e.sortKey?e.sortOrder:"ascending"})));c.useEffect(()=>{l(x.map(v=>({...v,sortOrder:v.key===e.sortKey?e.sortOrder:"ascending"})))},[e.sortKey,e.sortOrder,f,x]);const p=(v,w)=>{let d=w;e.sortKey===v&&(d=w==="ascending"?"descending":"ascending"),a(v,d)};return t.jsx(zb,{windowSize:i,isQuickViewMode:f,children:o.map((v,w)=>{const d=n!=null||Rc(v.key)!=null;return t.jsxs(Hb,{sortDataValue:e.sortKey,actualDataValue:v.key,wrapperWidth:v.width,isSortDisabled:d,windowSize:i,isQuickViewMode:f,isLastItem:w===o.length-1,style:v.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(Gb,{onClick:()=>d?null:(s=>{Rc(s.key)==null&&p(gp(s.key),s.sortOrder)})(v),isSortDisabled:d,children:[t.jsx(Yb,{children:v.value}),d?null:t.jsx(Vb,{sortConfig:e,headerData:v,children:t.jsx(Kb,{})})]}),d?null:t.jsx(Wb,{isSortDisabled:d,sortDataValue:e.sortKey,isVisible:e.sortKey===v.key&&e.sortKey!==Ic,children:t.jsx(Ub,{onClick:()=>{d||p(Ic,Bb)},"data-testid":ae("completed-tab-header-close-icon",v.key)})})]},v.key)})})},zb=y.div`
2316
- top: ${r.sp0};
2317
- left: ${r.sp0};
2318
- height: ${50}px;
2319
- z-index: 2;
2320
- display: flex;
2321
- flex-wrap: nowrap;
2322
- align-items: center;
2323
- box-sizing: border-box;
2324
- background-color: ${e=>e.theme.colors.grey4};
2325
- position: sticky;
2326
- width: 100%;
2327
- justify-content: space-between;
2328
- ${e=>e.isQuickViewMode===!0?ke`
2329
- width: 32%;
2330
- max-width: var(--side-panel-list-width, 100%);
2331
- `:ke`
2332
- padding: ${r.sp0} ${r.sp3};
2333
- `}
2334
- `,Hb=y.div`
2335
- color: ${e=>e.sortDataValue!==e.actualDataValue||e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
2336
- padding-left: ${r.sp0};
2337
- left: ${r.sp0};
2338
- display: flex;
2339
- align-items: center;
2340
- gap: 6px;
2341
- justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
2342
- position: static;
2343
- z-index: 0;
2344
- box-sizing: border-box;
2345
- flex-shrink: 0;
2346
- ${e=>e.isQuickViewMode===!0?ke`
2347
- width: calc(
2348
- ${e.wrapperWidth.valuePercentage(e.windowSize)} -
2349
- ${r.sp4}
2350
- );
2351
- min-width: calc(
2352
- ${e.wrapperWidth.valuePercentage(e.windowSize)} -
2353
- ${r.sp4}
2354
- );
2355
- max-width: calc(
2356
- ${e.wrapperWidth.valuePercentage(e.windowSize)} -
2357
- ${r.sp4}
2358
- );
2359
- `:ke`
2360
- width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
2361
- min-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
2362
- max-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
2363
- `}
2364
- `,Ub=y(Ei)`
2365
- width: ${r.sp2};
2366
- height: ${r.sp2};
2367
- cursor: pointer;
2368
- `,Vb=y.div`
2369
- display: flex;
2370
- align-items: center;
2371
- transform: ${e=>e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
2372
- `,Wb=y.div`
2373
- display: ${e=>e.isVisible?"flex":"none"};
2374
- align-items: center;
2375
- cursor: ${e=>e.isSortDisabled===!0?"not-allowed":"pointer"};
2376
- &:hover {
2377
- color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
2378
- }
2379
- `,Kb=y($i)`
2380
- width: ${r.sp2};
2381
- height: ${r.sp2};
2382
- `,Gb=y.div`
2383
- display: flex;
2384
- cursor: ${e=>e.isSortDisabled===!0?"not-allowed":"pointer"};
2385
- gap: 6px;
2386
- &:hover {
2387
- color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
2388
- }
2389
- `,Yb=y(at)`
2390
- display: flex;
2391
- `,{dateFormat:qb,common:{strings:{underscore:_u,hyphen:Kn,empty:Ac}}}=$e.getLocalizedStrings(),so={containerPaddingLeftRight:new pe(W[3],W[4])},Jb=({transaction:e,authParams:n,transactionAttachmentsEndpoint:a,onMissingReceiptsRowClick:i})=>{const f=Ie(),x=lt(),o=x?ua:da,[l,p]=c.useState(!1),[v,w]=c.useState([]),[d,s]=c.useState(null),C=e.attachments?.filter(E=>E.contentType!=null&&Nh.includes(E.contentType))??[],[S,T]=c.useState(C[0]),u=e.attachments!=null&&e.attachments.length>0,m=e.date?.format?.(qb.visual.MMMDCommaYYYYformat)??Kn;return t.jsxs(Ru,{windowSize:f,isQuickViewMode:x,onClick:()=>i(e.id,e.type),"data-testid":ae("completed-tab-list-row",e.id),children:[o.map((E,k)=>{const j=`${e.id}${_u}${E.key}`;switch(E.key){case"vendor":default:return t.jsx(Ln,{windowSize:f,wrapperWidth:E.width,isQuickViewMode:x,children:t.jsx(Jn,{windowSize:f,isLastItem:k===o.length-1,children:t.jsxs(vo,{children:[t.jsx(Ti,{photoUrl:e.vendorId!=null?e.logo?.toString()??Ac:Ac,styles:{width:r.sp4,height:r.sp4,borderRadius:r.sp0},placeholder:{width:W[4],height:W[4]},fallbackAvatar:t.jsx(Xb,{children:t.jsx(vn,{name:e.vendorName??e.description??Kn,size:r.sp4})})}),t.jsx(tt,{text:e.vendorName??e.description??Kn,itemTextStyle:{...xt.standardRegular.cssObject,color:"inherit"}})]})})},j);case"category":case"class":{const D=e.lines!=null&&e.lines.length>0&&e.lines[0]?.account!=null&&e.lines[0].account.accountName?e.lines[0].account.accountName:Kn,M=e.lines!=null&&e.lines.length>0&&e.lines[0]?.class!=null&&e.lines[0].class.className?e.lines[0].class.className:Kn,_=E.key==="category"?D:M;return t.jsx(Ln,{windowSize:f,wrapperWidth:E.width,isQuickViewMode:x,children:t.jsx(Jn,{windowSize:f,isLastItem:k===o.length-1,children:t.jsx(vo,{children:_!==Kn?t.jsx(tt,{text:_,itemTextStyle:{...xt.standardRegular.cssObject,color:"inherit"}}):t.jsx(Qb,{children:_})})})},j)}case"date":return t.jsx(Ln,{windowSize:f,wrapperWidth:E.width,isQuickViewMode:x,children:t.jsx(Jn,{windowSize:f,isLastItem:k===o.length-1,children:t.jsx(vo,{children:t.jsx(tt,{text:m,itemTextStyle:{...xt.standardRegular.cssObject,color:"inherit"}})})})},j);case"receipts":return t.jsx(Ln,{windowSize:f,wrapperWidth:E.width,isQuickViewMode:x,style:{justifyContent:"center"},children:u?t.jsx(ew,{onClick:D=>{D.stopPropagation(),(()=>{p(!0),T(C[0]);const M=C.map(_=>_.id);vd(a,n,{transaction_key:{transaction_id:e.id,transaction_type:e.type},attachment_ids:M}).then(_=>{w(_),_.length>0&&s(_[0])})})()}}):null},j);case"amount":{const D=ht("0,0.[00]",e.amount);return t.jsx(Ln,{windowSize:f,wrapperWidth:E.width,isQuickViewMode:x,children:t.jsx(Jn,{windowSize:f,isLastItem:k===o.length-1,children:t.jsx(tt,{text:e.amount!=null&&e.amount.amount<0?`-${D}`:D,itemTextStyle:{...xt.standardRegular.cssObject,color:"inherit"}})})},j)}}}),l&&C.length>0?yi.createPortal(t.jsx(fd,{allFiles:v,fileSource:d,file:S,title:S.fileName,attachments:C,setFileSource:s,setShowFullScreenView:p,onCrossClick:()=>{p(!1),s(null),w([]),C.length>0&&T(C[0])},setSelectedFileAttachment:T,handleTouchStart:()=>{},handleTouchMove:()=>{},handleTouchEnd:()=>{}}),document.body):null]})},Zb=()=>{const e=Ie(),n=lt(),a=n?ua:da,i=c.useRef(null),[f,x]=c.useState(0);return c.useLayoutEffect(()=>{i.current&&x(i.current.offsetWidth)},[e]),t.jsx(Ru,{windowSize:e,isQuickViewMode:n,ref:i,children:a.map((o,l)=>{const p=`${l}${_u}${o.key}`;return o.key==="vendor"?t.jsx(Ln,{windowSize:e,wrapperWidth:o.width,isQuickViewMode:n,children:t.jsx(Jn,{windowSize:e,isLastItem:l===a.length-1,children:t.jsxs(vo,{children:[t.jsx(ki,{width:W[4],height:W[4]}),t.jsx(pt,{width:f*o.width.value(e)/100,height:W[4],style:{display:"flex",alignItems:"center"}})]})})},p):t.jsx(Ln,{windowSize:e,wrapperWidth:o.width,isQuickViewMode:n,children:t.jsx(Jn,{windowSize:e,isLastItem:l===a.length-1,children:t.jsx(pt,{width:f*o.width.value(e)/100,height:W[4],style:{display:"flex",alignItems:"center"}})})},p)})})},Ru=y.div`
2392
- display: flex;
2393
- height: 100%;
2394
- background-color: ${e=>e.theme.colors.grey5};
2395
- padding: ${r.sp3};
2396
- border: ${e=>`1px solid ${e.theme.colors.grey3}`};
2397
- box-shadow: ${e=>`${r.sp0} 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
2398
- border-radius: ${r.sp2};
2399
- color: ${e=>e.theme.colors.hero};
2400
- cursor: pointer;
2401
- &:hover {
2402
- border-color: ${e=>e.theme.colors.primary};
2403
- color: ${e=>e.theme.colors.primary};
2404
- }
2405
- box-sizing: border-box;
2406
- align-items: center;
2407
- justify-content: space-between;
2408
- ${e=>e.isQuickViewMode?ke`
2409
- flex: 1;
2410
- padding-left: ${so.containerPaddingLeftRight.valuePx(e.windowSize)};
2411
- padding-right: ${so.containerPaddingLeftRight.valuePx(e.windowSize)};
2412
- width: 95%;
2413
- `:ke`
2414
- min-width: min-content;
2415
- padding-left: ${so.containerPaddingLeftRight.valuePx(e.windowSize)};
2416
- padding-right: ${so.containerPaddingLeftRight.valuePx(e.windowSize)};
2417
- `}
2418
- `,Ln=y.div`
2419
- display: flex;
2420
- align-items: center;
2421
- position: relative;
2422
- :last-of-type {
2423
- padding-right: ${r.sp0};
2424
- }
2425
- ${e=>e.isQuickViewMode===!0?ke`
2426
- width: calc(
2427
- ${e.wrapperWidth.valuePercentage(e.windowSize)} -
2428
- ${r.sp4}
2429
- );
2430
- min-width: calc(
2431
- ${e.wrapperWidth.valuePercentage(e.windowSize)} -
2432
- ${r.sp4}
2433
- );
2434
- `:ke`
2435
- width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
2436
- min-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
2437
- `}
2438
- `,Jn=y(Me)`
2439
- overflow: hidden;
2440
- justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
2441
- display: flex;
2442
- width: 100%;
2443
- align-items: center;
2444
- `,vo=y.div`
2445
- display: flex;
2446
- flex-direction: row;
2447
- column-gap: ${r.sp2};
2448
- align-items: center;
2449
- `,Qb=y(Me)`
2450
- word-break: break-all;
2451
- white-space: normal;
2452
- -webkit-line-clamp: 1;
2453
- -webkit-box-orient: vertical;
2454
- overflow: hidden;
2455
- text-overflow: ellipsis;
2456
- display: -webkit-box;
2457
- color: inherit;
2458
- `,Xb=y.div`
2459
- display: flex;
2460
- `,ew=y(wd)`
2461
- width: 16px;
2462
- height: 16px;
2463
- color: inherit;
2464
- `,tw=({sortConfig:e,fetchState:n,isDisabled:a,onColumnSortConfigChanged:i})=>{const f=Ie(),x=lt();return t.jsxs(nw,{windowSize:f,children:[t.jsx(iw,{isQuickViewMode:x,children:t.jsx(Nu,{sortConfig:e,isDisabled:n.fetchState==="In-Progress"?"readonly":a,onColumnSortConfigChanged:i})}),t.jsx(ow,{windowSize:f,children:[...Array(3)].map((o,l)=>t.jsx(Zb,{},l))})]})},nw=y.div`
2465
- display: block;
2466
- min-height: 100%;
2467
- flex-direction: column;
2468
- width: 100%;
2469
- `,iw=y.div`
2470
- flex: 1;
2471
- width: auto;
2472
- padding-left: ${({isQuickViewMode:e})=>e===!0?r.sp8:r.sp0};
2473
- `,ow=y.div`
2474
- display: flex;
2475
- min-height: 100%;
2476
- flex-direction: column;
2477
- row-gap: ${r.sp3};
2478
- `,rw=({authParams:e,fetchState:n,nextPageToken:a,sortKey:i,sortOrder:f,totalCount:x,transactionAttachmentsEndpoint:o,transactions:l,onFetchMore:p,onMissingReceiptsRowClick:v,onSortConfigChanged:w,onSortReset:d})=>{const s=Ie(),C=lt(),S=c.useRef(null),T=(M,_)=>{w?.(M,_)},u=c.useCallback(M=>M<l.length,[l.length]),m=c.useCallback(()=>{a!=null&&n.fetchState!=="In-Progress"&&p(a)},[a,n.fetchState,p]),E=c.useMemo(()=>x,[x]),k=c.useMemo(()=>l.length<x?l.length+1:l.length,[l.length,x]),j=n.fetchState==="Completed"&&l.length===0,D=n.fetchState==="Not-Started"||n.fetchState==="In-Progress"&&l.length===0;return t.jsx(sw,{children:t.jsx(lw,{windowSize:s,children:j?t.jsx(zt,{tab:"missing_receipts",title:et("missing_receipts").allDoneText.title,subTitle:et("missing_receipts").allDoneText.subTitle}):D?t.jsx(tw,{sortConfig:{sortKey:i??"date",sortOrder:f},fetchState:n,onColumnSortConfigChanged:T}):t.jsx(cw,{windowSize:s,children:t.jsx(bi,{children:({height:M,width:_})=>t.jsxs(uw,{style:{height:M,width:_},children:[t.jsx(dw,{isQuickViewMode:C,children:t.jsx(Nu,{sortConfig:{sortKey:i??"date",sortOrder:f},isDisabled:n.fetchState==="In-Progress"?"readonly":void 0,onColumnSortConfigChanged:T})}),t.jsx(cd,{isItemLoaded:u,itemCount:E,loadMoreItems:m,children:({onItemsRendered:R,ref:A})=>t.jsx(mh,{ref:F=>{A(F),S.current=F},height:M-50,innerElementType:Iu,itemCount:k,itemSize:70,width:_,style:{willChange:"auto"},overscanCount:3,onItemsRendered:R,itemKey:F=>l[F]?.id??`loading-${F}`,itemData:{transactions:l,isItemLoaded:u,authParams:e,isQuickViewMode:C,transactionAttachmentsEndpoint:o,onMissingReceiptsRowClick:v},children:aw})})]})})})})})},aw=({index:e,style:n,data:a})=>{const{transactions:i,isItemLoaded:f,authParams:x,isQuickViewMode:o,transactionAttachmentsEndpoint:l,onMissingReceiptsRowClick:p}=a;if(f(e)===!1)return t.jsx(Lc,{isQuickViewMode:o,style:{...n,width:"100%"},children:t.jsx(hw,{})});const v=i[e];return t.jsx(Lc,{isQuickViewMode:o,style:{...n,width:"100%"},children:t.jsx(Jb,{transaction:v,authParams:x,transactionAttachmentsEndpoint:l,onMissingReceiptsRowClick:p},v.id)})},sw=y.div`
2479
- display: flex;
2480
- flex-direction: column;
2481
- flex: 1;
2482
- overflow: hidden;
2483
- background-color: ${e=>e.theme.colors.grey4};
2484
- `,lw=y.div`
2485
- flex: 1;
2486
- display: flex;
2487
- flex-direction: column;
2488
- overflow: hidden;
2489
- `,cw=y.div`
2490
- height: 100%;
2491
- display: flex;
2492
- flex-direction: column;
2493
- max-width: 99.9%;
2494
- `,dw=y.div`
2495
- flex: 1;
2496
- width: auto;
2497
- `,uw=y.div`
2498
- position: relative;
2499
- `,Lc=y.div`
2500
- top: ${r.sp0};
2501
- left: ${r.sp0};
2502
- padding-bottom: ${r.sp3};
2503
- box-sizing: border-box;
2504
- `,Iu=c.forwardRef((e,n)=>{const{style:a,...i}=e;return t.jsx("div",{ref:n,style:{...a,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",position:"relative"},...i})});Iu.displayName="Completed tab inner element type";const hw=y.div`
2505
- display: flex;
2506
- align-items: center;
2507
- justify-content: space-between;
2508
- box-sizing: border-box;
2509
- padding: ${r.sp3} ${r.sp4};
2510
- background-color: ${e=>e.theme.colors.grey5};
2511
- border: 1px solid ${e=>e.theme.colors.grey3};
2512
- border-radius: ${r.sp2};
2513
- height: 58px;
2514
- animation: pulse 1.5s ease-in-out infinite;
2515
-
2516
- @keyframes pulse {
2517
- 0%,
2518
- 100% {
2519
- opacity: 1;
2520
- }
2521
- 50% {
2522
- opacity: 0.4;
2523
- }
2524
- }
2525
- `;function Au(e){const{bulkUploadSelector:n,isUploading:a}=e;if(n==null)return!1;const i=(n.unmatchedFiles?.length??0)>0||(n.pastUnmatchedFiles?.length??0)>0;if(i)return!1;const f=n.batchListFetchState?.fetchState,x=n.batchDetailsPaginationState?.fetchState,o=f==="In-Progress"||f==="Not-Started",l=x==="In-Progress",p=n.batchList?.length??0,v=n.hasMoreBatchDetails===!0;return a===!0||o||l||f==="Completed"&&x==="Not-Started"&&(v||p>0)||v===!0&&!i}const lo="cubic-bezier(0.42, 0, 0.58, 1)",pw=({children:e,onExitComplete:n})=>{const a=c.useRef(n);a.current=n;const[i,f]=c.useState(null),[x,o]=c.useState(!1),l=c.useRef(null),p=c.useRef({}),v=c.useRef(null),w=c.useRef(!1),d=c.useCallback(s=>{v.current=s,s!=null&&w.current===!1&&(w.current=!0,f(s.offsetHeight))},[]);return c.useLayoutEffect(()=>{if(!(typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches))return i!=null?(p.current.outer=requestAnimationFrame(()=>{p.current.inner=requestAnimationFrame(()=>{o(!0)})}),()=>{const{inner:s,outer:C}=p.current;C!=null&&cancelAnimationFrame(C),s!=null&&cancelAnimationFrame(s),p.current={}}):void 0;a.current()},[i]),c.useLayoutEffect(()=>{if(x)return l.current=setTimeout(()=>{a.current()},500),()=>{l.current!=null&&(clearTimeout(l.current),l.current=null)}},[x]),t.jsx(gw,{onTransitionEnd:s=>{s.target===s.currentTarget&&s.propertyName==="height"&&(l.current!=null&&(clearTimeout(l.current),l.current=null),a.current())},style:i==null?void 0:{height:x?0:i,marginTop:x?0:void 0,transition:`height 420ms ${lo}, margin-top 420ms ${lo}`},children:t.jsx(mw,{ref:d,style:{opacity:x?0:1,transform:x?"translateY(-16px)":"translateY(0)",transition:`opacity 420ms ${lo}, transform 420ms ${lo}`,pointerEvents:x?"none":"auto"},children:e})})},gw=y.div`
2526
- overflow: hidden;
2527
- width: 100%;
2528
- flex-shrink: 0;
2529
- min-height: 0;
2530
- will-change: height, margin-top;
2531
- backface-visibility: hidden;
2532
- `,mw=y.div`
2533
- width: 100%;
2534
- min-width: 0;
2535
- will-change: opacity, transform;
2536
- backface-visibility: hidden;
2537
- `,fw=`calc(
2538
- 5 * (${r.sp4} + 2 * ${r.sp3}) +
2539
- (5 - 1) * ${r.sp3}
2540
- )`,ha=y.div`
2541
- display: flex;
2542
- flex-direction: column;
2543
- gap: ${r.sp3};
2544
- min-height: 0;
2545
- max-height: ${fw};
2546
- overflow-y: auto;
2547
- overflow-x: hidden;
2548
- overscroll-behavior: contain;
2549
- scrollbar-width: thin;
2550
- scrollbar-color: ${e=>e.theme.colors.grey1} transparent;
2551
- width: 100%;
2552
- `,dr=[new pe(50,50),new pe(25,25),new pe(25,25)],Lu=()=>t.jsx(Sw,{children:t.jsx(pt,{width:"100%",height:W[3],style:{borderRadius:r.sp1,height:W[4],display:"block"}})}),xw=()=>{const e=Ie(),n=c.useRef(null),[a,i]=c.useState(0);return c.useLayoutEffect(()=>{n.current&&i(n.current.offsetWidth)},[e]),t.jsx(kw,{children:t.jsxs($w,{ref:n,children:[t.jsx(Ew,{children:t.jsxs(Tw,{children:[t.jsx(ki,{width:W[4],height:W[4]}),t.jsx(pt,{width:a>0?a*dr[0].value(e)/100:"100%",height:W[4],style:{display:"flex",alignItems:"center"}})]})}),t.jsx(jw,{children:t.jsx(pt,{width:a>0?a*dr[1].value(e)/100:"100%",height:W[4],style:{display:"flex",alignItems:"center"}})}),t.jsx(Nw,{children:t.jsx(pt,{width:a>0?a*dr[2].value(e)/100:"100%",height:W[4],style:{display:"flex",alignItems:"center"}})})]})})},Du=({rowCount:e=5})=>t.jsx(ha,{"aria-hidden":!0,children:Array.from({length:e},(n,a)=>t.jsx(xw,{},a))}),yw=()=>t.jsxs(bw,{children:[t.jsx(ww,{children:t.jsx(pt,{width:200,height:31,style:{display:"block",borderRadius:r.sp1}})}),t.jsx(Lu,{}),t.jsx(Du,{rowCount:2})]}),Cw=()=>t.jsxs(vw,{children:[t.jsx(Lu,{}),t.jsx(Du,{rowCount:1})]}),bw=y.div`
2553
- display: flex;
2554
- flex-direction: column;
2555
- gap: ${r.sp3};
2556
- min-width: 0;
2557
- align-items: start;
2558
- margin-top: ${r.sp6};
2559
- `;y.div`
2560
- display: flex;
2561
- flex-direction: column;
2562
- gap: ${r.sp2};
2563
- min-width: 0;
2564
- `;const ww=y.div``;y.div`
2565
- display: flex;
2566
- align-items: center;
2567
- flex: 1;
2568
- min-width: 0;
2569
- height: ${r.sp6};
2570
- padding: ${r.sp2} 12px;
2571
- border-radius: ${r.sp2};
2572
- box-sizing: border-box;
2573
- background-color: ${e=>e.theme.colors.background};
2574
- `;const vw=y.div`
2575
- display: flex;
2576
- flex-direction: column;
2577
- gap: ${r.sp2};
2578
- margin-top: ${r.sp1};
2579
- `,Sw=y.div`
2580
- width: 100%;
2581
- box-sizing: border-box;
2582
- `,kw=y.div`
2583
- display: flex;
2584
- align-items: center;
2585
- gap: ${r.sp3};
2586
- `,$w=y.div`
2587
- display: flex;
2588
- align-items: center;
2589
- flex: 1;
2590
- min-width: 0;
2591
- padding: ${r.sp3} ${r.sp3};
2592
- background-color: ${e=>e.theme.colors.grey5};
2593
- border: 1px solid ${e=>e.theme.colors.grey3};
2594
- border-radius: ${r.sp2};
2595
- box-shadow: ${e=>e.theme.colors.elevation1};
2596
- `,Ew=y.div`
2597
- flex: 2;
2598
- display: flex;
2599
- align-items: center;
2600
- gap: ${r.sp1};
2601
- min-width: 0;
2602
- `,Tw=y.div`
2603
- display: flex;
2604
- flex-direction: row;
2605
- column-gap: ${r.sp2};
2606
- align-items: center;
2607
- min-width: 0;
2608
- flex: 1;
2609
- `,jw=y.div`
2610
- flex: 1;
2611
- min-width: 0;
2612
- padding: ${r.sp0} ${r.sp5};
2613
- `,Nw=y.div`
2614
- flex: 1;
2615
- min-width: 0;
2616
- padding: ${r.sp0} ${r.sp5};
2617
- text-align: right;
2618
- `;function Ou(){return $e.getLocalizedStrings().dateFormat.visual.MMMDCommaYYYYformat}function _w(e){return e.format(Ou())}function Mu(e){if(e==null||String(e).trim()==="")return"";const n=String(e).trim(),a=Ou(),i=ni(n);return i!=null&&typeof i.isValid=="function"&&i.isValid()?i.format(a):n}function Pu(e,n){return Gr("0,0.[00]",e,function(a){if(a==null||a==="")return"";if(!/^[A-Z]{3}$/.test(a))return a;try{return new Intl.NumberFormat("en",{style:"currency",currency:a,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(i=>i.type==="currency")?.value??a}catch{return a}}(n))}const{common:{texts:{vendor:Rw,amount:Iw,date:Aw}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:ur}}}=$e.getLocalizedStrings(),Lw=({hasCandidates:e,interactionLocked:n=!1,isLoadingMore:a,isSearching:i,manualSearchNextPageToken:f,searchResults:x,selectedTransactionId:o,onClearSelection:l,onSearch:p,onSelectionChange:v,onLoadMore:w})=>{const[d,s]=c.useState(""),C=c.useRef(null),S=c.useRef(null),T=c.useRef(!1),u=c.useCallback(j=>{const[D]=j;n!==!0&&D.isIntersecting&&f!=null&&a!==!0&&i!==!0&&w!=null&&w()},[n,a,i,f,w]);c.useEffect(()=>{const j=C.current,D=S.current;if(j==null||D==null||f==null||w==null)return;const M=new IntersectionObserver(u,{root:j,rootMargin:"120px"});return M.observe(D),()=>M.disconnect()},[u,f,w,x?.length]),c.useEffect(()=>{const j=C.current,D=S.current;if(j==null||D==null||f==null||w==null)return void(T.current=a===!0);const M=T.current===!0&&a!==!0;if(T.current=a===!0,!M)return;const _=j.getBoundingClientRect(),R=D.getBoundingClientRect();R.top<_.bottom&&R.bottom>_.top&&R.left<_.right&&R.right>_.left&&requestAnimationFrame(()=>{w()})},[a,f,w,x?.length]);const m=c.useCallback(j=>{n||j.key==="Enter"&&d.trim().length>=2&&p(d.trim())},[n,d,p]),E=c.useCallback(j=>{if(n)return;const D=j.target.value;s(D);const M=D.trim();M.length>=2?p(M):p("")},[n,p]),k=c.useCallback(()=>{n||(s(""),l(),p(""))},[n,l,p]);return t.jsxs(Dw,{hasCandidates:e,$interactionLocked:n,children:[t.jsx(Ow,{children:t.jsx(wi,{children:e?ur.orSearchManually:ur.searchManually})}),t.jsxs(Mw,{children:[t.jsx(Pw,{}),t.jsx(Fw,{type:"text",placeholder:ur.searchByVendorDateAmount,value:d,onChange:E,onKeyDown:m,disabled:n,"data-testid":ae("manual-search-input")}),d.length>0?t.jsx(Bw,{type:"button",disabled:n,onClick:k,children:t.jsx(zw,{})}):null]}),x!=null&&x.length>0?t.jsxs(Hw,{children:[t.jsxs(Uw,{children:[t.jsx(hr,{style:{flex:2},children:t.jsx(at,{children:Rw})}),t.jsx(hr,{children:t.jsx(at,{children:Aw})}),t.jsx(hr,{style:{textAlign:"right"},children:t.jsx(at,{children:Iw})})]}),t.jsxs(ha,{ref:C,children:[x.map(j=>t.jsxs(Vw,{onClick:()=>{n||v(j.transactionId,j.transactionType)},"data-testid":ae("search-result",j.transactionId),children:[t.jsx(Kw,{children:t.jsx(Gw,{type:"radio",name:"manual-search-result",checked:o===j.transactionId,disabled:n,onChange:()=>{n||v(j.transactionId,j.transactionType)}})}),t.jsxs(Ww,{isSelected:o===j.transactionId,children:[t.jsxs(Yw,{children:[t.jsx(Ti,{photoUrl:j.vendorLogo??"",styles:{width:r.sp4,height:r.sp4,borderRadius:"50%"},placeholder:{width:W[4],height:W[4]},fallbackAvatar:t.jsx(vn,{name:j.vendorName,size:r.sp4})}),t.jsx(tt,{text:j.vendorName,maxWidth:"120px"})]}),t.jsx(qw,{children:t.jsx(nt,{children:Mu(j.transactionDate)})}),t.jsx(Jw,{children:t.jsx(nt,{children:Pu(j.amount,j.currencyCode)})})]})]},j.transactionId)),f!=null?t.jsx(Zw,{ref:S,"aria-hidden":!0}):null]})]}):i===!0?t.jsx(Cw,{}):null]})},Dw=y.div`
2619
- display: flex;
2620
- flex-direction: column;
2621
- gap: ${r.sp2};
2622
- padding-top: ${e=>e.hasCandidates?r.sp4:r.sp0};
2623
- pointer-events: ${e=>e.$interactionLocked?"none":"auto"};
2624
- opacity: ${e=>e.$interactionLocked?.65:1};
2625
- `,Ow=y.div``,Mw=y.div`
2626
- display: flex;
2627
- align-items: center;
2628
- gap: ${r.sp1};
2629
- height: ${r.sp6};
2630
- padding: ${r.sp2} 12px;
2631
- border-radius: ${r.sp2};
2632
- background-color: ${e=>e.theme.colors.background};
2633
- box-sizing: border-box;
2634
- `,Pw=y(Ph)`
2635
- width: ${r.sp3};
2636
- height: ${r.sp3};
2637
- color: ${e=>e.theme.colors.hero};
2638
- flex-shrink: 0;
2639
- `,Fw=y(Fh)`
2640
- flex: 1;
2641
- border: none;
2642
- outline: none;
2643
- color: ${e=>e.theme.colors.grey1};
2644
- background-color: transparent;
2645
- `,Bw=y.button`
2646
- display: flex;
2647
- align-items: center;
2648
- justify-content: center;
2649
- background: none;
2650
- border: none;
2651
- cursor: pointer;
2652
- padding: 0;
2653
- flex-shrink: 0;
2654
- `,zw=y(Eo)`
2655
- width: ${r.sp3};
2656
- height: ${r.sp3};
2657
- color: ${e=>e.theme.colors.hero};
2658
-
2659
- &:hover {
2660
- color: ${e=>e.theme.colors.primary};
2661
- }
2662
- `,Hw=y.div`
2663
- display: flex;
2664
- flex-direction: column;
2665
- gap: ${r.sp3};
2666
- margin-top: ${r.sp2};
2667
- margin-left: -${r.sp5};
2668
- `,Uw=y.div`
2669
- display: flex;
2670
- align-items: center;
2671
- padding: ${r.sp0} ${r.sp3};
2672
- margin-left: ${r.sp5};
2673
- `,hr=y.div`
2674
- flex: 1;
2675
- color: ${e=>e.theme.colors.hero};
2676
- `,Vw=y.div`
2677
- display: flex;
2678
- align-items: center;
2679
- gap: ${r.sp2};
2680
- cursor: pointer;
2681
- `,Ww=y.div`
2682
- display: flex;
2683
- align-items: center;
2684
- flex: 1;
2685
- padding: ${r.sp3} ${r.sp3};
2686
- background-color: ${e=>e.theme.colors.grey5};
2687
- border: 1px solid
2688
- ${e=>e.isSelected?e.theme.colors.primary:e.theme.colors.grey3};
2689
- border-radius: ${r.sp2};
2690
- box-shadow: ${e=>e.theme.colors.elevation1};
2691
- transition: border-color 0.15s ease;
2692
-
2693
- &:hover {
2694
- border-color: ${e=>e.theme.colors.primary};
2695
- }
2696
- `,Kw=y.div`
2697
- flex-shrink: 0;
2698
- display: flex;
2699
- align-items: center;
2700
- `,Gw=y.input`
2701
- accent-color: ${e=>e.theme.colors.primary};
2702
- width: ${r.sp3};
2703
- height: ${r.sp3};
2704
- cursor: pointer;
2705
- `,Yw=y.div`
2706
- flex: 2;
2707
- display: flex;
2708
- align-items: center;
2709
- gap: ${r.sp1};
2710
- `,qw=y.div`
2711
- flex: 1;
2712
- color: ${e=>e.theme.colors.hero};
2713
- `,Jw=y.div`
2714
- flex: 1;
2715
- text-align: right;
2716
- `,Zw=y.div`
2717
- height: 1px;
2718
- width: 100%;
2719
- flex-shrink: 0;
2720
- `,{common:{texts:{vendor:Qw,amount:Xw,date:ev}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:Dc}}}=$e.getLocalizedStrings(),tv=({attachmentId:e,candidates:n,selectedTransactionId:a,interactionLocked:i=!1,onSelectionChange:f})=>{const x=[...n].sort((l,p)=>p.matchScore-l.matchScore),o=n.length===1?Dc.possibleMatch:Dc.possibleMatches.replace("__count__",n.length.toString());return t.jsxs(nv,{$interactionLocked:i,children:[t.jsx(iv,{children:t.jsx(wi,{children:o})}),t.jsxs(ov,{children:[t.jsx(pr,{style:{flex:2},children:t.jsx(at,{children:Qw})}),t.jsx(pr,{children:t.jsx(at,{children:ev})}),t.jsx(pr,{style:{textAlign:"right"},children:t.jsx(at,{children:Xw})})]}),t.jsx(ha,{children:x.map(l=>t.jsxs(rv,{onClick:()=>f(l.transactionId,l.transactionType),"data-testid":ae("candidate-row",l.transactionId),children:[t.jsx(sv,{children:t.jsx(lv,{type:"radio",name:`match-${e}`,checked:a===l.transactionId,onChange:()=>f(l.transactionId,l.transactionType)})}),t.jsxs(av,{isSelected:a===l.transactionId,children:[t.jsxs(cv,{children:[t.jsx(Ti,{photoUrl:l.vendorLogo??"",styles:{width:r.sp4,height:r.sp4,borderRadius:"50%"},placeholder:{width:W[4],height:W[4]},fallbackAvatar:t.jsx(vn,{name:l.vendorName,size:r.sp4})}),t.jsx(tt,{text:l.vendorName,maxWidth:"120px"})]}),t.jsx(dv,{children:t.jsx(nt,{children:Mu(l.transactionDate)})}),t.jsx(uv,{children:t.jsx(nt,{children:Pu(l.amount,l.currencyCode)})})]})]},l.transactionId))})]})},nv=y.div`
2721
- display: flex;
2722
- flex-direction: column;
2723
- gap: ${r.sp3};
2724
- pointer-events: ${e=>e.$interactionLocked?"none":"auto"};
2725
- opacity: ${e=>e.$interactionLocked?.65:1};
2726
- `,iv=y.div``,ov=y.div`
2727
- display: flex;
2728
- align-items: center;
2729
- padding: ${r.sp0} ${r.sp3};
2730
- `,pr=y.div`
2731
- flex: 1;
2732
- color: ${e=>e.theme.colors.hero};
2733
- `,rv=y.div`
2734
- display: flex;
2735
- align-items: center;
2736
- gap: ${r.sp2};
2737
- cursor: pointer;
2738
- `,av=y.div`
2739
- display: flex;
2740
- align-items: center;
2741
- flex: 1;
2742
- padding: ${r.sp3} ${r.sp3};
2743
- background-color: ${e=>e.theme.colors.grey5};
2744
- border: 1px solid
2745
- ${e=>e.isSelected?e.theme.colors.primary:e.theme.colors.grey3};
2746
- border-radius: ${r.sp2};
2747
- box-shadow: ${e=>e.theme.colors.elevation1};
2748
- transition: border-color 0.15s ease;
2749
-
2750
- &:hover {
2751
- border-color: ${e=>e.theme.colors.primary};
2752
- }
2753
- `,sv=y.div`
2754
- flex-shrink: 0;
2755
- display: flex;
2756
- align-items: center;
2757
- `,lv=y.input`
2758
- accent-color: ${e=>e.theme.colors.primary};
2759
- width: ${r.sp3};
2760
- height: ${r.sp3};
2761
- cursor: pointer;
2762
- `,cv=y.div`
2763
- flex: 2;
2764
- display: flex;
2765
- align-items: center;
2766
- gap: ${r.sp1};
2767
- `,dv=y.div`
2768
- flex: 1;
2769
- color: ${e=>e.theme.colors.hero};
2770
- `,uv=y.div`
2771
- flex: 1;
2772
- text-align: right;
2773
- `,Gt=new Map,gr=new Map;function hv(e,n){const a=Gt.get(e);a!=null&&a!==n&&URL.revokeObjectURL(a),Gt.delete(e),Gt.set(e,n),function(){for(;Gt.size>48;){const i=Gt.keys().next().value;if(i===void 0)break;const f=Gt.get(i);Gt.delete(i),f!=null&&URL.revokeObjectURL(f)}}()}function Fu(e){return function(n){const a=Gt.get(n);return a!=null&&(Gt.delete(n),Gt.set(n,a)),a}(e)}function pv(e,n,a,i){const f=Fu(e);if(f!=null)return Promise.resolve(f);const x=gr.get(e);if(x!=null)return x;const o=function(l,p){return fetch(l,{method:"GET",headers:{"zeni-user-id":p.userId,"zeni-tenant-id":p.tenantId,"zeni-session-id":p.sessionId}}).then(v=>{if(!v.ok)throw new Error(`File fetch failed: ${v.status}`);return v.blob()})}(n,a).then(l=>{const p=URL.createObjectURL(l);return hv(e,p),p}).finally(()=>{gr.delete(e)});return gr.set(e,o),o}const{uncategorizedTransactionList:{missingReceipt:{bulkUpload:gv}}}=$e.getLocalizedStrings(),mv=$e.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail;function Oc({title:e,windowSize:n,onDeleteClick:a,deleteDataTestId:i}){const f=a!=null;return t.jsxs(Cv,{children:[t.jsx(bv,{children:e}),f?t.jsx(wv,{className:"actionIcons",children:n==="small"?t.jsx(Sv,{"data-testid":i,onClick:x=>{x.stopPropagation(),a?.()}}):t.jsx(Se,{enterDelay:600,display:"flex",title:mv.delete,placement:"top",children:t.jsx(vv,{"data-testid":i,onClick:x=>{x.stopPropagation(),a?.()}})})}):null]})}const fv=({authParams:e,attachmentTitle:n,attachmentId:a,fileDownloadUrl:i,filename:f,filePreviewUrl:x,onDeleteClick:o})=>{const[l,p]=c.useState(!1),v=Ie(),w=function(m,E,k){const[j,D]=c.useState(null);return c.useLayoutEffect(()=>{if(m==null)return void D(null);const M=function(A,F,K){return F!=null&&F!==""?`${A}::att::${F}`:`${A}::url::${K}`}(E.tenantId,k,m),_=Fu(M);if(_!=null)return void D(_);let R=!1;return pv(M,m,E).then(A=>{R||D(A)}).catch(A=>{(A instanceof Error?A.name:"")!=="AbortError"&&console.error("Failed to fetch file with auth:",A)}),()=>{R=!0}},[m,E.userId,E.tenantId,E.sessionId,k,E]),j}(i,e,a),d=x??w,s=w??x,C=function(m){return m.toLowerCase().endsWith(".pdf")}(f),S=ae("receipt-card-delete",a??f),T=c.useCallback(()=>{s!=null&&p(!0)},[s]),u=c.useCallback(()=>{p(!1)},[]);return C&&s!=null?t.jsxs(t.Fragment,{children:[t.jsx(xv,{"data-testid":ae("receipt-pdf-preview",f),children:t.jsx(ma,{fileUrl:s,isFullScreen:!1,setShowFullScreenView:p,showTitlebar:!0,pdfTitle:n,showTitlebarIcon:o!=null,showReplaceIcon:!1,onDeleteClick:o,deleteAttachmentDataTestId:o!=null?S:void 0})}),l?yi.createPortal(t.jsxs(Mc,{children:[t.jsxs(Pc,{children:[t.jsx(fa,{children:f}),t.jsx(Fc,{onClick:u,"data-testid":ae("close-receipt-preview",f),children:t.jsx(Bc,{})})]}),t.jsx(Lt,{onClickAway:u,children:t.jsx(zc,{children:t.jsx(ma,{fileUrl:s,isFullScreen:!0,setShowFullScreenView:p,onCrossClick:u})})})]}),document.body):null]}):d!=null&&d!==""?t.jsxs(t.Fragment,{children:[t.jsxs(yv,{windowSize:v,children:[t.jsx(Oc,{title:n,windowSize:v,onDeleteClick:o,deleteDataTestId:S}),t.jsx(kv,{children:t.jsx($v,{src:d,alt:f,onClick:T,"data-testid":ae("receipt-img-preview",f)})})]}),l&&s!=null?yi.createPortal(t.jsxs(Mc,{children:[t.jsxs(Pc,{children:[t.jsx(fa,{children:f}),t.jsx(Fc,{onClick:u,"data-testid":ae("close-receipt-preview",f),children:t.jsx(Bc,{})})]}),t.jsx(Lt,{onClickAway:u,children:t.jsx(zc,{children:t.jsx(jv,{src:s,alt:f})})})]}),document.body):null]}):t.jsxs(Ev,{windowSize:v,children:[t.jsx(Oc,{title:n,windowSize:v,onDeleteClick:o,deleteDataTestId:S}),t.jsx(Tv,{children:t.jsx(nt,{children:gv.noPreview})})]})},xv=y.div`
2774
- width: 100%;
2775
- min-height: 300px;
2776
- max-height: 650px;
2777
- overflow: hidden;
2778
- background-color: ${e=>e.theme.colors.grey3};
2779
- border-radius: 0;
2780
- `,yv=y.div`
2781
- display: flex;
2782
- flex-direction: column;
2783
- width: 100%;
2784
- min-height: 300px;
2785
- overflow: hidden;
2786
- box-sizing: border-box;
2787
- padding: ${r.sp3};
2788
- cursor: pointer;
2789
- background-color: ${e=>e.theme.colors.grey3};
2790
- border-radius: 0;
2791
-
2792
- .actionIcons {
2793
- ${e=>e.windowSize==="small"&&`
2794
- display: flex;
2795
- `}
2796
- }
2797
- &:hover {
2798
- .actionIcons {
2799
- display: flex;
2800
- }
2801
- }
2802
- `,Cv=y.div`
2803
- position: sticky;
2804
- background: ${e=>e.theme.colors.grey3};
2805
- z-index: 1;
2806
- width: 100%;
2807
- top: 0;
2808
- display: flex;
2809
- flex-direction: row;
2810
- justify-content: space-between;
2811
- align-items: center;
2812
- padding-bottom: ${r.sp3};
2813
- cursor: default;
2814
- flex-shrink: 0;
2815
- `,bv=y(hd)``,wv=y.div`
2816
- display: none;
2817
- flex-direction: row;
2818
- `,vv=y(_d)`
2819
- cursor: pointer;
2820
- width: ${r.sp3};
2821
- height: ${r.sp3};
2822
- color: ${e=>e.theme.colors.grey1};
2823
- :hover {
2824
- color: ${fe.important};
2825
- }
2826
- `,Sv=y(_d)`
2827
- cursor: pointer;
2828
- width: ${r.sp3};
2829
- height: ${r.sp3};
2830
- color: ${fe.important};
2831
- `,kv=y.div`
2832
- box-sizing: border-box;
2833
- width: 100%;
2834
- flex: 1;
2835
- min-height: 0;
2836
- display: flex;
2837
- align-items: center;
2838
- justify-content: center;
2839
- overflow: auto;
2840
- max-height: 650px;
2841
- `,$v=y.img`
2842
- width: 100%;
2843
- height: auto;
2844
- object-fit: contain;
2845
- cursor: pointer;
2846
- display: block;
2847
- max-height: 650px;
2848
- `,Ev=y.div`
2849
- width: 100%;
2850
- min-height: 300px;
2851
- max-height: 650px;
2852
- display: flex;
2853
- flex-direction: column;
2854
- box-sizing: border-box;
2855
- padding: ${r.sp3};
2856
- background-color: ${e=>e.theme.colors.grey3};
2857
- border-radius: 0;
2858
- color: ${e=>e.theme.colors.grey2};
2859
-
2860
- .actionIcons {
2861
- ${e=>e.windowSize==="small"&&`
2862
- display: flex;
2863
- `}
2864
- }
2865
- &:hover {
2866
- .actionIcons {
2867
- display: flex;
2868
- }
2869
- }
2870
- `,Tv=y.div`
2871
- flex: 1;
2872
- display: flex;
2873
- align-items: center;
2874
- justify-content: center;
2875
- min-height: 200px;
2876
- `,Mc=y.div`
2877
- position: fixed;
2878
- top: 0;
2879
- left: 0;
2880
- width: 100%;
2881
- height: 100%;
2882
- z-index: 1201;
2883
- display: flex;
2884
- flex-direction: column;
2885
- background: ${fe.overlayDark};
2886
- `,Pc=y.div`
2887
- width: 100%;
2888
- height: 59px;
2889
- display: flex;
2890
- align-items: center;
2891
- justify-content: space-between;
2892
- padding: ${r.sp0} ${r.sp8};
2893
- color: ${fe.neutralGrey5Light};
2894
- box-sizing: border-box;
2895
- flex-shrink: 0;
2896
- `,Fc=y.button`
2897
- background: none;
2898
- border: none;
2899
- cursor: pointer;
2900
- padding: ${r.sp0};
2901
- display: flex;
2902
- align-items: center;
2903
- `,Bc=y(Eo)`
2904
- width: ${r.sp4};
2905
- height: ${r.sp4};
2906
- color: ${fe.neutralGrey5Light};
2907
-
2908
- &:hover {
2909
- color: ${fe.primaryDark};
2910
- }
2911
- `,zc=y.div`
2912
- flex: 1;
2913
- display: flex;
2914
- align-items: center;
2915
- justify-content: center;
2916
- overflow: auto;
2917
- max-width: 90%;
2918
- margin: 0 auto;
2919
- `,jv=y.img`
2920
- max-width: 100%;
2921
- max-height: 100%;
2922
- object-fit: contain;
2923
- `,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Hc}}}=$e.getLocalizedStrings(),Nv=({authParams:e,file:n,index:a,isLoadingMoreManualSearch:i,isSearching:f,manualSearchUiResetKey:x=0,isConfirmMatchInProgress:o=!1,manualSearchNextPageToken:l,manualSearchTotalCount:p,selectedTransactionId:v,onClearSelection:w,onDelete:d,onLoadMoreManualSearch:s,onSearchTransactions:C,onSelectionChange:S,searchResults:T})=>{const u=n.status==="possible_matches",m=n.status==="no_match",E=u&&n.candidates!=null&&n.candidates.length>0,k=Ie(),j=n.candidates?.map(_=>({amount:_.transaction.amount.amount,currencyCode:_.transaction.amount.currencySymbol||_.transaction.amount.currencyCode||"",matchScore:_.matchScore,transactionDate:_w(_.transaction.date),transactionId:_.transaction.id,transactionType:_.transaction.type??"",vendorName:_.transaction.vendorName??"",vendorLogo:_.transaction.logo?.href})),D=c.useCallback((_,R)=>{o||S(_,R)},[o,S]),M=`${n.attachmentId}-${x}`;return t.jsxs(_v,{windowSize:k,"data-testid":ae("receipt-card",n.attachmentId),children:[t.jsx(Rv,{children:t.jsx(Iv,{children:t.jsx(fv,{authParams:e,attachmentId:n.attachmentId,attachmentTitle:`#${a+1} ${n.filename}`,fileDownloadUrl:n.fileDownloadUrl,filename:n.filename,filePreviewUrl:n.filePreviewUrl,onDeleteClick:d!=null?()=>d(n.attachmentId):void 0})})}),t.jsxs(Av,{children:[E&&j!=null?t.jsx(tv,{attachmentId:n.attachmentId,candidates:j,interactionLocked:o,selectedTransactionId:v,onSelectionChange:D}):null,m?t.jsxs(Lv,{children:[t.jsx(Dv,{children:t.jsx(wi,{children:Hc.noPossibleMatch})}),t.jsx(Ov,{children:t.jsx(nt,{children:Hc.noMatchFound})})]}):null,u||m?t.jsx(Lw,{hasCandidates:E,interactionLocked:o,isLoadingMore:i,isSearching:f,manualSearchNextPageToken:l,manualSearchTotalCount:p,searchResults:T,selectedTransactionId:v,onClearSelection:w,onLoadMore:s,onSearch:C??(()=>{}),onSelectionChange:D},M):null]})]})},_v=y.div`
2924
- display: grid;
2925
- grid-template-columns: ${e=>e.windowSize==="small"?"1fr":"1fr 1fr"};
2926
- grid-template-rows: ${e=>e.windowSize==="small"?"1fr 1fr 1fr 1fr":"auto"};
2927
- align-items: start;
2928
- gap: ${r.sp4};
2929
- min-width: 0;
2930
- `,Rv=y.div`
2931
- display: flex;
2932
- flex-direction: column;
2933
- min-width: 0;
2934
- max-width: 94%;
2935
- `,Iv=y.div`
2936
- display: flex;
2937
- flex-direction: column;
2938
- width: 100%;
2939
- background-color: ${e=>e.theme.colors.grey3};
2940
- border-radius: ${r.sp2};
2941
- overflow: hidden;
2942
- max-height: 650px;
2943
- `,Av=y.div`
2944
- display: flex;
2945
- flex-direction: column;
2946
- min-width: 0;
2947
- gap: ${r.sp5};
2948
- margin-top: ${r.sp3};
2949
- `,Lv=y.div`
2950
- display: flex;
2951
- flex-direction: column;
2952
- gap: ${r.sp3};
2953
- `,Dv=y.div`
2954
- color: ${e=>e.theme.colors.primary};
2955
- `,Ov=y.div`
2956
- display: flex;
2957
- align-items: center;
2958
- justify-content: center;
2959
- padding: ${r.sp4} ${r.sp0};
2960
- width: 100%;
2961
- background-color: ${e=>e.theme.colors.background};
2962
- border-radius: ${r.sp2};
2963
- color: ${e=>e.theme.colors.grey1};
2964
- `,Mv=()=>t.jsx(Pv,{children:t.jsxs(Fv,{children:[t.jsxs(Bv,{children:[t.jsx(Uv,{children:t.jsx(pt,{width:286,height:27,style:{display:"block",borderRadius:r.sp1}})}),t.jsx(zv,{children:t.jsx(Hv,{children:t.jsx(Vv,{children:t.jsx(Pn,{size:"Large",start:!0})})})})]}),t.jsx(Wv,{children:t.jsx(yw,{})})]})}),Pv=y.div`
2965
- display: flex;
2966
- flex-direction: column;
2967
- flex: 1;
2968
- min-height: 0;
2969
- width: 100%;
2970
- `,Fv=y.div`
2971
- display: grid;
2972
- grid-template-columns: minmax(0, 50%) minmax(0, 1fr);
2973
- align-items: start;
2974
- gap: ${r.sp7};
2975
- width: 100%;
2976
- min-width: 0;
2977
- `,Bv=y.div`
2978
- display: flex;
2979
- flex-direction: column;
2980
- min-width: 0;
2981
- `,zv=y.div`
2982
- display: flex;
2983
- flex-direction: column;
2984
- width: 100%;
2985
- background-color: ${e=>e.theme.colors.grey3};
2986
- border-radius: ${r.sp2};
2987
- overflow: hidden;
2988
- `,Hv=y.div`
2989
- display: flex;
2990
- flex-direction: column;
2991
- width: 100%;
2992
- min-height: 480px;
2993
- max-height: 540px;
2994
- box-sizing: border-box;
2995
- padding: ${r.sp3};
2996
- margin-top: ${r.sp6};
2997
- background-color: ${e=>e.theme.colors.grey3};
2998
- `,Uv=y.div`
2999
- display: flex;
3000
- align-items: center;
3001
- padding-bottom: ${r.sp3};
3002
- flex-shrink: 0;
3003
- margin-top: ${r.sp4};
3004
- `,Vv=y.div`
3005
- flex: 1;
3006
- min-height: 200px;
3007
- display: flex;
3008
- align-items: center;
3009
- justify-content: center;
3010
- background-color: ${e=>e.theme.colors.grey5};
3011
- border: 1px solid ${e=>e.theme.colors.grey3};
3012
- border-radius: ${r.sp2};
3013
- box-sizing: border-box;
3014
- color: ${e=>e.theme.colors.grey1};
3015
- `,Wv=y.div`
3016
- display: flex;
3017
- flex-direction: column;
3018
- gap: ${r.sp5};
3019
- min-width: 0;
3020
- margin-top: ${r.sp8};
3021
- `;function Uc(e,n,a){if(n==null||n.section!==a)return e;const i=n.file.attachmentId;if(e.some(o=>o.attachmentId===i))return e;const f=Math.min(n.index,e.length),x=[...e];return x.splice(f,0,n.file),x}const{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Vc}}}=$e.getLocalizedStrings(),Kv=({authParams:e,unmatchedFiles:n,pastUnmatchedFiles:a,hasMoreBatchDetails:i,isLoading:f,isLoadingMore:x,isLoadingMoreManualSearch:o,isSearching:l,manualSearchNextPageToken:p,manualSearchTotalCount:v,manualSearchUiResetKey:w=0,confirmMatchFetchState:d="Not-Started",isConfirmMatchInProgress:s=!1,pendingMatchAttachmentId:C,pendingMatchTransactionId:S,onDelete:T,onLoadMoreBatchDetails:u,onLoadMoreManualSearch:m,onPendingMatchChange:E,onSearchTransactions:k,manualSearchResultsAttachmentId:j,scrollRoot:D,searchResults:M})=>{const _=c.useRef(null),R=c.useRef(!1),[A,F]=c.useState(null),K=j??A,ee=c.useCallback((Y,z)=>{s||(z.trim().length>=2&&F(Y),k?.(z))},[s,k]);c.useEffect(()=>{j==null&&(M?.length??0)===0&&l!==!0&&F(null)},[M,l,j]);const te=c.useRef(null),[Z,B]=c.useState(null),O=c.useCallback(()=>{B(null)},[]);c.useLayoutEffect(()=>{if(d==="In-Progress"&&C!=null){const Y=function(z,H,V){const G=H.findIndex(q=>q.attachmentId===z);if(G>=0)return{file:H[G],index:G,section:"primary"};const oe=V??[],se=oe.findIndex(q=>q.attachmentId===z);return se>=0?{file:oe[se],index:se,section:"past"}:null}(C,n,a);Y!=null&&(te.current=Y)}},[d,C,n,a]),c.useLayoutEffect(()=>{if(d==="Completed"&&Z==null){const Y=te.current;Y!=null&&(B(Y),te.current=null)}},[d,Z]),c.useLayoutEffect(()=>{d==="Error"&&(te.current=null,B(null))},[d]);const g=c.useMemo(()=>Uc(n,Z,"primary"),[n,Z]),h=c.useMemo(()=>Uc(a??[],Z,"past"),[a,Z]),N=c.useCallback(Y=>{const[z]=Y;z.isIntersecting&&i===!0&&x!==!0&&u?.()},[i,x,u]);if(c.useEffect(()=>{if(f===!0||D==null)return;const Y=_.current;if(Y==null)return;const z=new IntersectionObserver(N,{root:D,rootMargin:"200px"});return z.observe(Y),()=>z.disconnect()},[N,f,D]),c.useEffect(()=>{if(f===!0||D==null||i!==!0)return void(R.current=x===!0);const Y=R.current===!0&&x!==!0;if(R.current=x===!0,!Y)return;const z=_.current;if(z==null)return;const H=D.getBoundingClientRect(),V=z.getBoundingClientRect();V.top<H.bottom&&V.bottom>H.top&&V.left<H.right&&V.right>H.left&&requestAnimationFrame(()=>{u?.()})},[f,x,i,D,u]),f===!0)return t.jsx(Mv,{});const $=g.length>0,b=h.length>0;if(!$&&!b&&i!==!0&&x!==!0){const{title:Y,subTitle:z}=et("missing_receipts").allDoneText;return t.jsx(Gv,{children:t.jsx(qv,{children:t.jsx(zt,{tab:"missing_receipts",title:Y,subTitle:z})})})}const I=b,L=Vc.unmatchedReceipts.replace("__count__",g.length.toString()),U=g.length>0,Q=(Y,z,H)=>{const V=`${Y.batchId}-${Y.attachmentId}`,G=Z!=null&&Z.section===H&&Z.file.attachmentId===Y.attachmentId,oe=t.jsx(Nv,{authParams:e,file:Y,index:z,isLoadingMoreManualSearch:o,isSearching:l===!0&&K===Y.attachmentId,manualSearchNextPageToken:p,manualSearchTotalCount:v,selectedTransactionId:C===Y.attachmentId?S:null,onClearSelection:()=>E(null),onDelete:T,onLoadMoreManualSearch:m,onSearchTransactions:k!=null?se=>ee(Y.attachmentId,se):void 0,onSelectionChange:(se,q)=>{s||E({batchId:Y.batchId,attachmentId:Y.attachmentId,fileName:Y.filename,transactionId:se,transactionType:q})},searchResults:K===Y.attachmentId?M:void 0,manualSearchUiResetKey:w,isConfirmMatchInProgress:s});return G?t.jsx(pw,{onExitComplete:O,children:oe},V):t.jsx(c.Fragment,{children:oe},V)};return t.jsxs(Yv,{children:[U?t.jsxs(Qv,{children:[t.jsx(Wc,{"aria-hidden":!0}),t.jsx(Xv,{children:L})]}):null,t.jsx(Jv,{children:t.jsxs(Zv,{children:[g.length>0?t.jsx(Kc,{children:g.map((Y,z)=>Q(Y,z,"primary"))}):null,I?t.jsxs(t.Fragment,{children:[t.jsxs(e2,{children:[t.jsx(Wc,{"aria-hidden":!0}),t.jsx(t2,{children:Vc.pastUnmatchedReceipts.replace("__count__",h.length.toString())})]}),t.jsx(Kc,{children:h.map((Y,z)=>Q(Y,g.length+z,"past"))})]}):null,t.jsx(n2,{ref:_}),x===!0?t.jsx(i2,{children:t.jsx(Pn,{size:"Small",start:!0})}):null]})})]})},Gv=y.div`
3022
- display: flex;
3023
- flex-direction: column;
3024
- flex: 1;
3025
- overflow: hidden;
3026
- align-self: stretch;
3027
- width: 100%;
3028
- min-height: 100%;
3029
- background-color: ${e=>e.theme.colors.grey4};
3030
- `,Yv=y.div`
3031
- display: flex;
3032
- flex-direction: column;
3033
- flex: 0 0 auto;
3034
- align-self: stretch;
3035
- width: 100%;
3036
- min-height: 100%;
3037
- gap: ${r.sp3};
3038
- overflow: visible;
3039
- `,qv=y.div`
3040
- flex: 1;
3041
- display: flex;
3042
- flex-direction: column;
3043
- min-height: 0;
3044
- width: 100%;
3045
- overflow: hidden;
3046
- `,Jv=y.div`
3047
- width: 100%;
3048
- flex: 0 0 auto;
3049
- align-self: stretch;
3050
- `,Zv=y.div`
3051
- position: relative;
3052
- z-index: 1;
3053
- display: flex;
3054
- flex-direction: column;
3055
- width: 100%;
3056
- gap: ${r.sp3};
3057
- `,Qv=y.div`
3058
- display: flex;
3059
- align-items: center;
3060
- gap: ${r.sp2};
3061
- position: relative;
3062
- z-index: 1;
3063
- width: 100%;
3064
- margin-top: ${r.sp4};
3065
- `,Wc=y(e=>c.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M22.7737 11.8149C22.781 14.6922 21.6539 17.4563 19.6368 19.5081C17.6197 21.5598 14.8751 22.7338 11.9982 22.7756C10.5931 22.7967 9.19783 22.5387 7.89323 22.0165C6.58864 21.4942 5.40071 20.7182 4.39835 19.7333C3.39598 18.7484 2.59913 17.5743 2.05399 16.2791C1.50886 14.9839 1.2263 13.5934 1.2227 12.1882C1.21466 9.31044 2.34142 6.54556 4.35861 4.49316C6.3758 2.44076 9.12077 1.26633 11.9982 1.22458C13.4035 1.20356 14.799 1.46178 16.1037 1.98426C17.4084 2.50673 18.5964 3.28306 19.5988 4.26821C20.6012 5.25337 21.398 6.42774 21.943 7.72322C22.488 9.0187 22.7704 10.4095 22.7737 11.8149Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M12 13.8571V7",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M11.9902 16.8164C11.9582 16.8169 11.9266 16.8238 11.8972 16.8367C11.8679 16.8496 11.8415 16.8682 11.8195 16.8915C11.7975 16.9148 11.7804 16.9423 11.7691 16.9723C11.7579 17.0023 11.7528 17.0342 11.7541 17.0662C11.7564 17.1305 11.7835 17.1914 11.8297 17.2361C11.8759 17.2809 11.9376 17.306 12.0019 17.3062C12.0339 17.3056 12.0655 17.2986 12.0947 17.2856C12.124 17.2727 12.1504 17.254 12.1723 17.2308C12.1943 17.2075 12.2114 17.1801 12.2227 17.1502C12.234 17.1203 12.2392 17.0884 12.238 17.0564C12.2361 16.9935 12.2103 16.9338 12.1659 16.8892C12.1215 16.8446 12.0619 16.8186 11.999 16.8164H11.9941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})))`
3066
- width: ${r.sp4};
3067
- height: ${r.sp4};
3068
- color: ${fe.important};
3069
- flex-shrink: 0;
3070
- `,Xv=y(Ur)`
3071
- color: ${fe.important};
3072
- `,e2=y.div`
3073
- display: flex;
3074
- align-items: center;
3075
- gap: ${r.sp2};
3076
- color: ${fe.important};
3077
- margin-top: ${r.sp9};
3078
- position: relative;
3079
- z-index: 1;
3080
- width: 100%;
3081
- `,t2=y(Ur)`
3082
- color: ${fe.important};
3083
- `,Kc=y.div`
3084
- display: flex;
3085
- flex-direction: column;
3086
- flex-shrink: 0;
3087
- border-radius: ${r.sp2};
3088
- overflow: hidden;
3089
- & > * + * {
3090
- margin-top: ${r.sp11};
3091
- }
3092
- `,n2=y.div`
3093
- height: 1px;
3094
- width: 100%;
3095
- `,i2=y.div`
3096
- display: flex;
3097
- justify-content: center;
3098
- padding: ${r.sp3};
3099
- `,o2=e=>{const{missingReceiptsTab:n,missingTransactionCount:a,bulkUploadSelector:i,selectedPeriod:f,authParams:x,bulkUploadEndpoint:o,onBulkUploadFiles:l,onFetchBulkUploadBatches:p,onPendingMatchChange:v,setMissingReceiptsTab:w,tableSectionProps:d,bulkUploadInteractions:s,missingReceiptsBulkUploadChromeInPageBody:C,missingReceiptsCompletedChromeInPageBody:S}=e,T=Ie(),[u,m]=c.useState(null),{isUploading:E,handleDragOver:k,handleDragLeave:j,handleDrop:D}=s,M=i?.phase,_=o!=null||l!=null,R=i?.manualSearch;c.useEffect(()=>{if(_&&M==="completed"){const h=(i?.unmatchedFiles.length??0)+(i?.pastUnmatchedFiles.length??0);a===0&&h===0?w("completed"):h>0&&w("unmatched")}},[_,M,a,i?.unmatchedFiles.length,i?.pastUnmatchedFiles.length,w]);const A=i?.completedTransactions?.fetchState?.fetchState,F=e.onFetchCompletedTransactions,K=c.useRef(void 0);c.useEffect(()=>{if(_){const h=K.current;n==="completed"&&h!=="completed"&&f!=null&&A==="Not-Started"&&F?.()}K.current=n},[_,n,f,A,F]);const ee=i?.batchListFetchState?.fetchState,te=Au({bulkUploadSelector:i,isUploading:E}),Z=c.useRef(null);c.useEffect(()=>{if(!_||f==null)return;const h={month:f.month,tenantId:x.tenantId,year:f.year},N=Z.current,$=N!=null&&(N.month!==h.month||N.tenantId!==h.tenantId||N.year!==h.year),b=()=>{Z.current=h};if(!(M==="uploading"||M==="matching"&&n!=="unmatched"||M!=="completed"&&n!=="unmatched")){if($)return p?.({cacheOverride:!0,invalidateBatchDetailsCache:!0}),void b();if(ee==="Not-Started")return p?.(),void b();b()}},[_,M,n,f,ee,x.tenantId,p]),c.useEffect(()=>{n!=="unmatched"&&v(null)},[n,v]);const B=_&&n==="unmatched"&&i!=null&&T!=="small",O=i!=null&&(i.unmatchedFiles.length>0||(i.pastUnmatchedFiles?.length??0)>0),g=B&&te!==!0&&O;return t.jsxs(r2,{ref:m,windowSize:T,onDragOver:_?k:void 0,onDragLeave:_?j:void 0,onDrop:_?D:void 0,children:[C,S,n==="missing"?t.jsx(s2,{windowSize:T,children:t.jsx(Eu,{...d.parentProps,isCOTEnabled:d.isCOTEnabled,setIsJeAccountSettingsOpened:d.setIsJeAccountSettingsOpened,setResetJeAccountSettingsForm:d.setResetJeAccountSettingsForm,allThreadsSectionOpen:d.allThreadsSectionOpen,setCurrentFooterFormId:d.setCurrentFooterFormId,currentFooterFormId:d.currentFooterFormId,onCloseAllThreadsSection:d.onCloseAllThreadsSection})}):null,_&&n==="unmatched"&&i!=null?t.jsx(a2,{$desktopRail:g,"data-testid":g?ae("unmatched-page-splitter"):void 0,children:t.jsx(Kv,{authParams:e.authParams,unmatchedFiles:i.unmatchedFiles,pastUnmatchedFiles:i.pastUnmatchedFiles,manualSearchUiResetKey:i.manualSearchUiResetKey??0,confirmMatchFetchState:i.confirmMatchStatus.fetchState,isConfirmMatchInProgress:i.confirmMatchStatus.fetchState==="In-Progress",isLoading:te,isLoadingMore:i.batchDetailsPaginationState.fetchState==="In-Progress",hasMoreBatchDetails:i.hasMoreBatchDetails,isLoadingMoreManualSearch:R?.isLoadingMore===!0,isSearching:R?.fetchState.fetchState==="In-Progress"&&R?.isLoadingMore!==!0,manualSearchNextPageToken:R?.nextPageToken,manualSearchTotalCount:R?.totalCount,searchResults:i.manualSearch.results,manualSearchResultsAttachmentId:i.manualSearch.attachmentId,pendingMatchAttachmentId:e.pendingMatchAttachmentId,pendingMatchTransactionId:e.pendingMatchTransactionId,onDelete:e.onDeleteUnmatchedReceipt,onLoadMoreBatchDetails:e.onFetchMoreBatchDetails,onPendingMatchChange:v,onLoadMoreManualSearch:e.onLoadMoreManualSearch,onSearchTransactions:e.onSearchTransactionsForManualMatch,scrollRoot:u})}):null,_&&n==="completed"&&i!=null?t.jsx(rw,{authParams:e.authParams,transactionAttachmentsEndpoint:e.transactionAttachmentsEndpoint??"",transactions:i.completedTransactions.transactions,totalCount:i.completedTransactions.totalCount,nextPageToken:i.completedTransactions.nextPageToken,fetchState:i.completedTransactions.fetchState,sortKey:i.sortKey,sortOrder:i.sortOrder,onMissingReceiptsRowClick:e.onMissingReceiptsRowClick,onSortConfigChanged:e.onSetBulkUploadSortConfig,onSortReset:e.onResetBulkUploadSort,onFetchMore:h=>e.onFetchCompletedTransactions?.(h)}):null]})},ko={contentPadding:new pe(W[3],W[6],W[8])},r2=y("div",{shouldForwardProp:e=>e!=="windowSize"})`
3100
- display: flex;
3101
- flex-direction: column;
3102
- flex: 1;
3103
- min-height: 0;
3104
- width: 100%;
3105
- position: relative;
3106
- overflow-x: hidden;
3107
- overflow-y: auto;
3108
- /* Scroll works; scrollbar UI hidden (same pattern as DocumentRenderer) */
3109
- scrollbar-width: none;
3110
- -ms-overflow-style: none;
3111
- &::-webkit-scrollbar {
3112
- display: none;
3113
- }
3114
- padding-left: ${e=>ko.contentPadding.valuePx(e.windowSize)};
3115
- padding-right: ${e=>ko.contentPadding.valuePx(e.windowSize)};
3116
- box-sizing: border-box;
3117
- `,a2=y.div`
3118
- display: flex;
3119
- flex-direction: column;
3120
- flex: 0 0 auto;
3121
- align-self: stretch;
3122
- width: 100%;
3123
- min-height: 100%;
3124
- position: relative;
3125
- z-index: 0;
3126
-
3127
- & > * {
3128
- position: relative;
3129
- z-index: 1;
3130
- }
3131
-
3132
- ${e=>e.$desktopRail===!0?`
3133
- background-image: linear-gradient(
3134
- to right,
3135
- transparent 0,
3136
- transparent calc(48% - 0.5px),
3137
- ${e.theme.colors.grey3} calc(48% - 0.5px),
3138
- ${e.theme.colors.grey3} calc(48% + 0.5px),
3139
- transparent calc(48% + 0.5px),
3140
- transparent 100%
3141
- );
3142
- background-repeat: no-repeat;
3143
- background-size: 100% 100%;
3144
- `:""}
3145
- `,s2=y.div`
3146
- margin-left: -${e=>ko.contentPadding.valuePx(e.windowSize)};
3147
- margin-right: -${e=>ko.contentPadding.valuePx(e.windowSize)};
3148
- flex: 1;
3149
- display: flex;
3150
- `;function Gc({children:e,onDragLeave:n,onDragOver:a,onDrop:i}){return t.jsx("div",{style:{width:"100%"},onDragLeave:n,onDragOverCapture:a,onDrop:i,children:e})}function Bu(e,n,a,i){const f=n===1?a:i;return e.replace("__count__",String(n)).replace("__receiptWord__",f)}const{uncategorizedTransactionList:{missingReceipt:{bulkUpload:co}}}=$e.getLocalizedStrings(),l2=({total:e})=>{const n=e>0?Bu(co.autoMatchingReceipts,e,co.receiptWordSingular,co.receiptWordPlural):co.autoMatchingReceiptsGeneric;return t.jsx(d2,{children:t.jsxs(u2,{children:[t.jsx(h2,{}),t.jsx(p2,{children:n})]})})},c2=ji`
3151
- 0% {
3152
- background-position: -200% center;
3153
- }
3154
- 100% {
3155
- background-position: 200% center;
3156
- }
3157
- `,d2=y.div`
3158
- position: relative;
3159
- display: flex;
3160
- align-items: center;
3161
- height: ${r.sp8};
3162
- background-color: ${e=>e.theme.colors.grey5};
3163
- border: 1px solid transparent;
3164
- border-radius: ${r.sp2};
3165
- box-sizing: border-box;
3166
- overflow: hidden;
3167
- margin-top: ${r.sp3};
3168
- &::before {
3169
- content: "";
3170
- position: absolute;
3171
- inset: 0;
3172
- border-radius: ${r.sp2};
3173
- pointer-events: none;
3174
- background: ${fe.receiptAgentLinearGradient};
3175
- padding: 1px;
3176
- mask: ${fe.gradientMask};
3177
- -webkit-mask: ${fe.gradientMask};
3178
- -webkit-mask-composite: xor;
3179
- mask-composite: exclude;
3180
- z-index: 0;
3181
- }
3182
- `,u2=y.div`
3183
- position: relative;
3184
- display: flex;
3185
- align-items: center;
3186
- justify-content: center;
3187
- width: 100%;
3188
- gap: ${r.sp2};
3189
- padding: 0 ${r.sp3};
3190
- z-index: 1;
3191
- `,h2=y(Sn)`
3192
- width: ${r.sp3};
3193
- height: ${r.sp3};
3194
- color: ${fe.aiCfoGradient4};
3195
- flex-shrink: 0;
3196
- `,p2=y(Me)`
3197
- background: linear-gradient(
3198
- 90deg,
3199
- ${fe.aiCfoGradient4} 25%,
3200
- ${fe.aiCfoGradient1} 50%,
3201
- ${fe.aiCfoGradient4} 75%
3202
- );
3203
- background-size: 200% auto;
3204
- background-clip: text;
3205
- -webkit-background-clip: text;
3206
- -webkit-text-fill-color: transparent;
3207
- animation: ${c2} 2.5s ease-in-out infinite;
3208
- `,ii=20,pa=["application/pdf","image/jpeg","image/png"],zu=pa.join(","),g2=e=>c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:1088,height:378,viewBox:"0 0 1088 378",fill:"none",preserveAspectRatio:"none",...e},c.createElement("rect",{x:.5,y:.5,width:1087,height:377,rx:8,ry:8,fill:"none",stroke:"currentColor",strokeWidth:1,strokeDasharray:"8 8",vectorEffect:"non-scaling-stroke"})),{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Yc}}}=$e.getLocalizedStrings(),m2=({onFilesSelected:e})=>{const n=c.useRef(null),[a,i]=c.useState(!0);bh();const f=c.useCallback(l=>{l.preventDefault(),l.stopPropagation(),i(!1);const p=[],{files:v}=l.dataTransfer;for(let w=0;w<v.length;w+=1){const d=v.item(w);if(d==null)continue;const s=String(d.type);if(pa.some(C=>C===s)===!0&&(p.push(d),p.length>=ii))break}p.length>0&&e(p)},[e]),x=c.useCallback(l=>{l.preventDefault(),l.stopPropagation(),l.type==="dragenter"||l.type==="dragover"?i(!0):l.type==="dragleave"&&i(!1)},[]),o=c.useCallback(()=>{n.current?.click()},[]);return t.jsxs(f2,{onClick:o,onDrop:f,onDragEnter:x,onDragLeave:x,onDragOver:x,isDragActive:a,"data-testid":ae("bulk-upload-inline-drop-zone"),children:[t.jsx(x2,{"aria-hidden":!0,children:t.jsx(g2,{})}),t.jsxs(y2,{children:[t.jsx(C2,{}),t.jsx(b2,{children:t.jsx(Hr,{children:Yc.dropYourFilesHere})}),a?null:t.jsx(w2,{children:t.jsx(hd,{children:Yc.orBrowseFiles})})]}),t.jsx(v2,{ref:n,type:"file",multiple:!0,accept:zu,onClick:l=>l.stopPropagation(),onChange:l=>{const p=l.target.files?Array.from(l.target.files):[];p.length>0&&e(p.slice(0,ii)),l.target.value=""}})]})},f2=y.div`
3209
- display: flex;
3210
- flex-direction: column;
3211
- justify-content: center;
3212
- align-items: center;
3213
- min-height: ${e=>e.isDragActive?378:200}px;
3214
- box-sizing: border-box;
3215
- border-radius: ${r.sp2};
3216
- margin: ${r.sp3} ${r.sp0};
3217
- margin-bottom: ${e=>e.isDragActive?`calc(-178px + ${r.sp3})`:r.sp3};
3218
- padding: ${r.sp4};
3219
- background-color: ${e=>e.theme.colors.background};
3220
- cursor: pointer;
3221
- transition: all 0.3s ease;
3222
- position: relative;
3223
- z-index: ${e=>e.isDragActive?10:1};
3224
- margin-top: ${r.sp3};
3225
- `,x2=y.div`
3226
- position: absolute;
3227
- inset: 0;
3228
- z-index: 0;
3229
- pointer-events: none;
3230
- border-radius: inherit;
3231
- overflow: hidden;
3232
- color: ${e=>e.theme.colors.grey1};
3233
-
3234
- svg {
3235
- display: block;
3236
- width: 100%;
3237
- height: 100%;
3238
- }
3239
- `,y2=y.div`
3240
- position: relative;
3241
- z-index: 1;
3242
- display: flex;
3243
- flex-direction: column;
3244
- align-items: center;
3245
- justify-content: center;
3246
- flex-grow: 1;
3247
- gap: ${r.sp2};
3248
- `,C2=y(Lp)`
3249
- width: ${r.sp8};
3250
- height: ${r.sp8};
3251
- color: ${e=>e.theme.colors.hero};
3252
- margin-bottom: ${r.sp2};
3253
- `,b2=y.div`
3254
- color: ${e=>e.theme.colors.hero};
3255
- text-align: center;
3256
- `,w2=y.div`
3257
- color: ${e=>e.theme.colors.primary};
3258
- `,v2=y.input`
3259
- display: none;
3260
- `,S2=e=>c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:1088,height:56,viewBox:"0 0 1088 56",fill:"none",preserveAspectRatio:"none",...e},c.createElement("rect",{x:.5,y:.5,width:1087,height:55,rx:8,ry:8,fill:"none",stroke:"currentColor",strokeWidth:1,strokeDasharray:"8 8",vectorEffect:"non-scaling-stroke"})),qc="receipts@zeni.ai",{uncategorizedTransactionList:{missingReceipt:{bulkUpload:uo}},common:{copyToClipBoard:ho}}=$e.getLocalizedStrings(),k2=({onFilesSelected:e})=>{const n=c.useRef(null),[a,i]=c.useState(!1),[f,x]=c.useState(0),[o,l]=c.useState(!1),[p,v]=c.useState(0),[w,d]=c.useState(!1);c.useEffect(()=>{const m=window.setInterval(()=>{x(E=>{const k=(E+1)%3;return E===2&&k===0&&l(!0),k})},2e3);return()=>window.clearInterval(m)},[]),c.useEffect(()=>{if(!o)return;const m=requestAnimationFrame(()=>{l(!1)});return()=>cancelAnimationFrame(m)},[o]),c.useEffect(()=>{if(f===1)return d(!1),void v(360);d(!0),v(0);const m=requestAnimationFrame(()=>{d(!1)});return()=>cancelAnimationFrame(m)},[f]);const s=c.useCallback(m=>{m.stopPropagation(),navigator.clipboard.writeText(qc).then(()=>{i(!0),setTimeout(()=>i(!1),2e3)})},[]),C=c.useCallback(()=>{n.current?.click()},[]),S=c.useCallback(m=>{m.preventDefault(),m.stopPropagation();const E=[],{files:k}=m.dataTransfer;for(let j=0;j<k.length;j+=1){const D=k.item(j);if(D==null)continue;const M=String(D.type);if(pa.some(_=>_===M)===!0&&(E.push(D),E.length>=ii))break}E.length>0&&e(E)},[e]),T=c.useCallback(m=>{m.preventDefault()},[]),u=()=>t.jsxs(_2,{children:[t.jsx(Jc,{children:uo.emailBannerUploadLead}),t.jsx(Br,{children:uo.emailBannerUploadSuffix}),t.jsxs(R2,{children:[t.jsx(N2,{children:qc}),t.jsx(Se,{display:"inline-flex",placement:"top",title:a?ho.copied:ho.copy,enterDelay:300,leaveDelay:0,children:t.jsx(I2,{type:"button","aria-label":a?ho.copied:ho.copy,onClick:s,children:a?t.jsx(L2,{}):t.jsx(A2,{})})})]})]});return t.jsxs(E2,{onClick:C,onDrop:S,onDragOver:T,children:[t.jsx($2,{"aria-hidden":!0,children:t.jsx(S2,{})}),t.jsx(T2,{children:t.jsxs(j2,{$phase:f,$skipTransition:o,children:[t.jsx(mr,{children:u()}),t.jsx(mr,{children:t.jsxs(D2,{children:[t.jsx(O2,{$deg:p,$skipTransition:w,"aria-hidden":!0,children:t.jsx(M2,{})}),t.jsx(Jc,{children:uo.emailBannerAiLead}),t.jsx(Br,{children:uo.emailBannerAiTail})]})}),t.jsx(mr,{children:u()})]})}),t.jsx(P2,{ref:n,type:"file",multiple:!0,accept:zu,onClick:m=>m.stopPropagation(),onChange:m=>{const E=m.target.files?Array.from(m.target.files):[];E.length>0&&e(E.slice(0,ii)),m.target.value=""}})]})},$2=y.div`
3261
- position: absolute;
3262
- inset: 0;
3263
- z-index: 0;
3264
- pointer-events: none;
3265
- border-radius: inherit;
3266
- overflow: hidden;
3267
- color: ${e=>e.theme.colors.grey1};
3268
-
3269
- svg {
3270
- display: block;
3271
- width: 100%;
3272
- height: 100%;
3273
- }
3274
- `,E2=y.div`
3275
- position: relative;
3276
- display: flex;
3277
- align-items: center;
3278
- justify-content: center;
3279
- gap: ${r.sp2};
3280
- padding: ${r.sp3};
3281
- box-sizing: border-box;
3282
- cursor: pointer;
3283
- border: none;
3284
- border-radius: ${r.sp2};
3285
- background-color: ${e=>e.theme.colors.background};
3286
- isolation: isolate;
3287
- margin-top: ${r.sp3};
3288
- /* Stack frame (first child) under content; avoid Emotion component selectors
3289
- * in parent rules — Storybook Vite preview omits @emotion/babel-plugin. */
3290
- > *:not(:first-child) {
3291
- position: relative;
3292
- z-index: 1;
3293
- }
3294
- `,T2=y.div`
3295
- flex: 1;
3296
- min-width: 0;
3297
- height: ${r.sp4};
3298
- overflow: hidden;
3299
- `,j2=y.div`
3300
- display: flex;
3301
- flex-direction: column;
3302
- transition: ${e=>e.$skipTransition?"none":"transform 400ms ease-in-out"};
3303
- transform: translateY(${e=>`-${e.$phase*W[4]}px`});
3304
- `,mr=y.div`
3305
- flex-shrink: 0;
3306
- height: ${r.sp4};
3307
- line-height: ${r.sp4};
3308
- display: flex;
3309
- align-items: center;
3310
- justify-content: center;
3311
- `,Hu=y.span`
3312
- font-family: ${Dh};
3313
- font-size: ${r.sp3};
3314
- line-height: ${r.sp4};
3315
- letter-spacing: 0;
3316
- color: ${e=>e.theme.colors.primary};
3317
- text-decoration: none;
3318
- border-bottom: none;
3319
- box-shadow: none;
3320
- `,Jc=y(Hu)`
3321
- font-weight: ${oi.medium};
3322
- `,Br=y(Hu)`
3323
- font-weight: ${oi.regular};
3324
- `,N2=y(Br)`
3325
- text-decoration: underline;
3326
- text-decoration-color: ${fe.neutralGrey2Light};
3327
- text-underline-offset: 0.15em;
3328
- border-bottom: none;
3329
- box-shadow: none;
3330
- `,_2=y.span`
3331
- display: inline-flex;
3332
- align-items: center;
3333
- flex-wrap: nowrap;
3334
- gap: 0.3em;
3335
- max-width: 100%;
3336
- min-width: 0;
3337
- white-space: nowrap;
3338
- overflow: hidden;
3339
- text-overflow: ellipsis;
3340
- `,R2=y.span`
3341
- display: inline-flex;
3342
- align-items: center;
3343
- align-self: center;
3344
- gap: 0.35em;
3345
- flex-shrink: 0;
3346
- `,I2=y.button`
3347
- display: inline-flex;
3348
- align-items: center;
3349
- justify-content: center;
3350
- padding: 0;
3351
- margin: 0;
3352
- border: none;
3353
- background: transparent;
3354
- cursor: pointer;
3355
- line-height: 1;
3356
- flex-shrink: 0;
3357
- `,A2=y(bd)`
3358
- width: ${r.sp3};
3359
- height: ${r.sp3};
3360
- flex-shrink: 0;
3361
- color: ${e=>e.theme.colors.primary};
3362
- `,L2=y(Lh)`
3363
- width: ${r.sp3};
3364
- height: ${r.sp3};
3365
- flex-shrink: 0;
3366
- color: ${fe.success};
3367
- `,D2=y.div`
3368
- display: inline-flex;
3369
- align-items: center;
3370
- justify-content: center;
3371
- gap: 0.35em;
3372
- min-width: 0;
3373
- max-width: 100%;
3374
- white-space: nowrap;
3375
- overflow: hidden;
3376
- text-overflow: ellipsis;
3377
- `,O2=y.div`
3378
- display: inline-flex;
3379
- align-items: center;
3380
- justify-content: center;
3381
- flex-shrink: 0;
3382
- align-self: center;
3383
- transition: ${e=>e.$skipTransition?"none":"transform 1200ms ease-in-out"};
3384
- transform: rotate(${e=>e.$deg}deg);
3385
- `,M2=y(Sn)`
3386
- width: ${r.sp3};
3387
- height: ${r.sp3};
3388
- flex-shrink: 0;
3389
- display: block;
3390
- color: ${e=>e.theme.colors.primary};
3391
- `,P2=y.input`
3392
- display: none;
3393
- `,F2=({isDraggingFiles:e,onFilesSelected:n,policyDescription:a,showEmailOrDropZone:i})=>t.jsxs(B2,{children:[i?e?t.jsx(m2,{onFilesSelected:n}):t.jsx(k2,{onFilesSelected:n}):null,a.trim().length>0?t.jsx(z2,{children:t.jsx(Me,{children:a})}):null]}),B2=y.div`
3394
- display: flex;
3395
- flex-direction: column;
3396
- width: 100%;
3397
- `,z2=y.div`
3398
- text-align: center;
3399
- padding: ${r.sp4} ${r.sp4};
3400
- color: ${e=>e.theme.colors.hero};
3401
- `,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:fr}}}=$e.getLocalizedStrings(),xr=2e3,H2=({fileCount:e,percentage:n=0})=>{const[a,i]=c.useState(0);c.useEffect(()=>{const o=performance.now(),l=()=>{const v=performance.now()-o;i(function(w){return w<=xr?w/xr*75:w<=3e3?75+(w-xr)/1e3*25:100}(v))};l();const p=window.setInterval(l,100);return()=>window.clearInterval(p)},[]);const f=Math.min(100,Math.max(a,n)),x=Bu(fr.uploadingReceipts,e,fr.receiptWordSingular,fr.receiptWordPlural);return t.jsxs(U2,{children:[t.jsx(V2,{children:t.jsx(W2,{style:{width:`${f}%`}})}),t.jsx(K2,{children:t.jsx(G2,{children:x})})]})},U2=y.div`
3402
- position: relative;
3403
- display: flex;
3404
- align-items: center;
3405
- height: ${r.sp8};
3406
- margin: ${r.sp3} ${r.sp3} ${r.sp0};
3407
- background-color: ${e=>e.theme.colors.grey5};
3408
- border: 1px solid ${fe.success};
3409
- border-radius: ${r.sp2};
3410
- overflow: hidden;
3411
- `,V2=y.div`
3412
- position: absolute;
3413
- inset: 0;
3414
- overflow: hidden;
3415
- `,W2=y.div`
3416
- height: 100%;
3417
- background-color: ${fe.successLight};
3418
- transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
3419
- `,K2=y.div`
3420
- position: relative;
3421
- display: flex;
3422
- align-items: center;
3423
- justify-content: center;
3424
- width: 100%;
3425
- padding: 0 ${r.sp3};
3426
- `,G2=y(Me)`
3427
- color: ${fe.success};
3428
- `,Zc=({bulkUploadPhase:e,isDraggingFiles:n,isUploading:a,matchingProgressBannerTotal:i,onFilesSelected:f,policyDescription:x,showEmailOrDropZone:o,uploadError:l,uploadFileCount:p,uploadProgressPercent:v})=>t.jsxs(Y2,{children:[a?t.jsx(H2,{fileCount:p,percentage:v}):null,l==null||a?null:t.jsx(q2,{children:l}),e==="matching"?t.jsx(l2,{total:i}):null,t.jsx(F2,{isDraggingFiles:n,onFilesSelected:f,policyDescription:x,showEmailOrDropZone:o})]}),Y2=y.div`
3429
- display: flex;
3430
- flex-direction: column;
3431
- width: 100%;
3432
- `,q2=y(gh)`
3433
- padding: ${r.sp2} ${r.sp3};
3434
- margin: ${r.sp2} ${r.sp0} ${r.sp0};
3435
- background-color: ${fe.importantLight};
3436
- border: 1px solid ${fe.important};
3437
- border-radius: ${r.sp2};
3438
- color: ${fe.important};
3439
- text-align: center;
3440
- `,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:ei}}}=$e.getLocalizedStrings(),J2=[{id:"all",label:ei.completedSubTabAll},{id:"ai_accountant",label:ei.completedSubTabAiAccountant},{id:"manual",label:ei.completedSubTabManual}],Qc=({activeSubTab:e,totalCount:n,onSubTabChange:a,completedTransactionsFetchState:i,completedTransactionsLoadedCount:f=0})=>{const x=i?.fetchState,o=(f>0||i!=null&&x!=="Not-Started"&&x!=="In-Progress")&&n>0,l=c.useMemo(()=>{switch(e){case"all":default:return ei.completedDescriptionAll;case"ai_accountant":return ei.completedDescriptionAi.replace("__count__",n.toString());case"manual":return ei.completedDescriptionManual}},[e,n]);return t.jsxs(Z2,{children:[t.jsx(Q2,{children:J2.map(p=>t.jsx(X2,{isActive:e===p.id,onClick:()=>{a(p.id)},children:t.jsx(nt,{children:p.label})},p.id))}),o?t.jsxs(eS,{children:[e==="ai_accountant"?t.jsx(tS,{}):null,t.jsx(nS,{children:t.jsx(Me,{children:l})})]}):null]})},Z2=y.div`
3441
- display: flex;
3442
- flex-direction: column;
3443
- width: 100%;
3444
- margin-top: ${r.sp4};
3445
- `,Q2=y.div`
3446
- display: flex;
3447
- align-items: center;
3448
- gap: ${r.sp3};
3449
- padding-bottom: ${r.sp3};
3450
- `,X2=y.button`
3451
- box-sizing: border-box;
3452
- padding: ${r.sp1} ${r.sp2};
3453
- border-radius: ${r.sp1};
3454
- border: 1px solid
3455
- ${e=>e.isActive?e.theme.colors.primary:"transparent"};
3456
- background-color: transparent;
3457
- color: ${e=>e.isActive?e.theme.colors.primary:e.theme.colors.hero};
3458
- cursor: ${e=>e.isActive?"default":"pointer"};
3459
- transition:
3460
- border-color 0.15s ease,
3461
- color 0.15s ease;
3462
-
3463
- &:hover {
3464
- color: ${e=>e.theme.colors.primary};
3465
- }
3466
- `,eS=y.div`
3467
- display: flex;
3468
- align-items: center;
3469
- justify-content: center;
3470
- gap: ${r.sp1};
3471
- padding-bottom: ${r.sp4};
3472
- `,tS=y(Sn)`
3473
- width: ${r.sp3};
3474
- height: ${r.sp3};
3475
- flex-shrink: 0;
3476
- `,nS=y.div`
3477
- color: ${e=>e.theme.colors.champion};
3478
- text-align: center;
3479
- `;function iS(e){const{authParams:n,bulkUploadEndpoint:a,onBulkUploadFilesFallback:i,onBulkUploadProgress:f,onBulkUploadSuccess:x,onBulkUploadUploadedFileCount:o}=e,[l,p]=c.useState(!1),[v,w]=c.useState(0),[d,s]=c.useState(!1),[C,S]=c.useState(null),T=c.useCallback(async k=>{const j=k.slice(0,ii);if(w(j.length),p(!1),S(null),a!=null){o?.(j.length),s(!0);try{const D=await async function(M,_,R,A){const F=new FormData;R.forEach((K,ee)=>{F.append(`attachment_file_${ee}`,K);const te=JSON.stringify({file_name:K.name,content_type:K.type,size:K.size});F.append(`attachment_json_${ee}`,te)});try{const K=await(await hh(M,{method:"POST",body:F,headers:{"zeni-user-id":_.userId,"zeni-tenant-id":_.tenantId,"zeni-session-id":_.sessionId}})).json();if(K.status.code>=200&&K.status.code<300)return K.data;throw console.error(`Bulk upload failed with ${K.status.message}`),A?.(K.status.message),new Error(`Bulk upload failed: ${K.status.message}`)}catch(K){throw console.error(`Bulk upload failed: ${JSON.stringify(K)}`),K}}(a,n,j,S);f?.(100),await new Promise(M=>{window.setTimeout(M,cp)}),x?.(D.batch_id)}catch{S("Upload failed. Please try again.")}finally{s(!1)}}else i?.(j)},[a,n,f,x,o,i]),u=c.useCallback(k=>{k.preventDefault(),k.stopPropagation(),p(!0)},[]),m=c.useCallback(k=>{const j=k.relatedTarget,D=k.currentTarget;j&&D.contains(j)||(k.preventDefault(),k.stopPropagation(),p(!1))},[]),E=c.useCallback(k=>{k.preventDefault(),k.stopPropagation();const j=Array.from(k.dataTransfer.files).slice(0,ii);j.length>0?T(j):p(!1)},[T]);return{isDraggingFiles:l,uploadFileCount:v,isUploading:d,uploadError:C,handleBulkUploadFiles:T,handleDragOver:u,handleDragLeave:m,handleDrop:E}}const oS=y.div`
3480
- width: 100%;
3481
- height: 100vh;
3482
- display: flex;
3483
- flex-direction: column;
3484
- background: ${e=>e.theme.colors.grey4};
3485
- box-shadow: ${e=>e.theme.colors.elevation1};
3486
- `,rS=y.div`
3487
- display: flex;
3488
- flex-direction: column;
3489
- align-items: center;
3490
- min-width: 100%;
3491
- min-height: 0;
3492
- flex: 1;
3493
-
3494
- ${e=>e.theme.breakpoints.down("md")} {
3495
- width: 100%;
3496
- padding-left: ${r.sp0};
3497
- }
3498
- `,Xc=y(ph)`
3499
- height: ${r.sp3};
3500
- width: ${r.sp3};
3501
- cursor: pointer;
3502
- color: inherit;
3503
- `,ed=y(e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M22.9902 12.0403L1.12726 12.0403",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M7.68994 5.60718L1.00953 12.0402L7.68994 18.4732",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})))`
3504
- height: ${r.sp3};
3505
- width: ${r.sp3};
3506
- cursor: pointer;
3507
- color: inherit;
3508
- `,{common:{footer:Ke,texts:{maxLimitReached:aS,confirmAction:sS},headers:Uu,create:lS,strings:gi,texts:Zn,cancel:cS,confirm:dS,monthsByIndex:uS},dateFormat:{visual:{MMMDCommaYYYYformat:td}},expenseAutomation:ti,uncategorizedTransactionList:{missingReceipt:{bulkUpload:nd}}}=$e.getLocalizedStrings(),hS=({setActivityLogTransactionId:e})=>{const{selectedTransactionId:n}=jo(),a=St(),[i,f]=c.useState(!1);return n==null?null:t.jsx(Se,{title:ti.transactions.header.activity,placement:"bottom",children:t.jsx(RS,{"data-testid":ae("panel-activity-button"),onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),onClick:x=>{x.stopPropagation(),e(n)},children:t.jsx(IS,{style:{color:i?a.colors.primary:a.colors.hero}})})})},d5=e=>{const{expenseAutomationViewSelector:n,isDisabled:a,isRealtimeInsightsFeatureEnabled:i,isUncategorizedExpenseCategoryEnabled:f,isCOTEnabled:x,onUpdateTab:o,onReconTabUpdate:l,onUpdateStep:p,onSearchTextChanged:v,onRefresh:w,onClose:d,onBack:s,onBulkUploadConfirmMatchAcknowledged:C,onClearMissingReceiptsTabNavigation:S,closeSidePanel:T,initialMissingReceiptsTab:u,resetTransactionCategorizationLocalData:m,updateOperatingExpensesIdsForReview:E,clearJeScheduleLocalData:k,onSaveReconciliation:j}=e,D=e.bulkUploadEndpoint!=null||e.onBulkUploadFiles!=null,M=iS({authParams:e.authParams,bulkUploadEndpoint:e.bulkUploadEndpoint,onBulkUploadProgress:e.onBulkUploadProgress,onBulkUploadSuccess:e.onBulkUploadSuccess,onBulkUploadUploadedFileCount:e.onBulkUploadUploadedFileCount,onBulkUploadFilesFallback:e.onBulkUploadFiles}),{currentSelectedView:_,allSteps:R,missingReceipts:A,jeSchedules:F,fluxAnalysis:K,monthEndInsights:ee,transactionView:te,selectedTransactionCategorizationTab:Z,reconciliation:B,selectedPeriod:O}=n,{pendingMissingReceiptsTabNavigation:g}=A,[h,N]=c.useState("expenseAutomationPage"),[$,b]=c.useState(()=>{}),[I,L]=c.useState(!1),U=Ie(),Q=!!e.loggedInUser?.userEmail?.includes("zeni.ai"),Y=Q?Ci:$o,{openThread:z,setOpenThread:H}=c.useContext(Y),[V,G]=c.useState(!1),[oe,se]=c.useState(!1),[q,P]=c.useState(u??"missing"),J=c.useRef(null);c.useEffect(()=>{const Ee=J.current;Ee!==null&&Ee!==q&&T?.(),J.current=q},[q,T]);const X=c.useCallback(Ee=>{P(Ee)},[]),[ne,re]=c.useState(null),ie=c.useCallback(Ee=>{re(Ee),N(Ee!=null?"expenseAutomationMissingReceipts":"expenseAutomationPage")},[N]),ce=e.bulkUploadSelector?.confirmMatchStatus.fetchState,he=c.useRef(void 0);c.useEffect(()=>{he.current==="In-Progress"&&ce==="Completed"&&ne!=null&&(ie(null),C?.()),he.current=ce},[ce,ne,ie,C]),c.useEffect(()=>{q!=="unmatched"&&ie(null)},[q,ie]),c.useEffect(()=>{g==="unmatched"&&(D&&X("unmatched"),S?.())},[g,S,D,X]),c.useEffect(()=>{D===!1&&(q==="unmatched"||q==="completed")&&X("missing")},[D,q,X]);const ue=R.find(Ee=>Ee.step===_),{nextStep:Ce,previousStep:be}=mS(R,_),{uiState:{searchString:me,pageToken:le},totalCountByTab:Re,transactions:xe,fetchStateByTransactionTabs:ge,transactionLocalData:de}=te,{selectedReconAccount:ye,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:Ne}}}}=B;let Pe="Not-Started",Oe="complete";switch(_){case"missing_receipts":Pe=A.refreshStatus.fetchState,Oe=A.completionStatus;break;case"je_schedules":Pe=F.refreshStatus.fetchState,Oe=F.completionStatus;break;case"month_end_insights":ee!=null&&(Pe=ee?.fetchState);break;case"flux_analysis":Pe=K.refreshStatus.fetchState,Oe=K.completionStatus;break;case"transaction_categorization":Pe=te.refreshStatus.fetchState,Oe=te.completionStatus;break;case"reconciliation":ye==null?(Pe=B.refreshStatus.fetchState,Oe=B.completionStatus):(Pe=B.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",Oe=B.completionStatus)}const{saveStatus:Ue,selectedCheckBoxTransactionIds:Et}=te,{primaryBtn:Qe,cancelBtn:ct,leftSideComponent:it}=(()=>{const Ee=su(n.fluxAnalysis.sections,n.fluxAnalysis.reviewOperatingExpensesIds);switch(h){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Ee===!0?Ke.markAsReviewed:Zn.undo,style:{justifyContent:"space-evenly"},isLoading:n.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:yr(n.fluxAnalysis.reviewOperatingExpensesIds.length,Bd,U,Zn.vendor,_),cancelBtn:{label:Ke.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{E([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Ke.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:Ue.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:yr(Et.length,xi,U,Zn.transaction,_),cancelBtn:{label:Ke.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{m(Z,xe.map(He=>He.id),O,!1,Re[Z],wa(de,Z),f,le)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:Ke.next,backBtnLabel:Ke.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Ke.next,style:{justifyContent:"space-evenly"},isDisabled:a||ue?.isNextDisabled,suffixIcon:t.jsx(Xc,{}),onClick:()=>{p(Ce.step)}},cancelBtn:{label:Ke.back,isDisabled:a||ue?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(ed,{}),onClick:()=>{p(be.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:Ke.reconcile,backBtnLabel:Ke.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Ke.reconcile,onClick:()=>{j({reconcileAction:"reconcile"})},isDisabled:B.reconciliationTabsState.balances.variance.amount!==0,isLoading:B.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:yr(Ne.length,1/0,U,Zn.transaction,_),cancelBtn:{onClick:()=>{j({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:B.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:Ke.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:Ke.save,backBtnLabel:Ke.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Ke.save,isLoading:F.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>{$()},label:Ke.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};case"expenseAutomationMissingReceipts":return{formId:"expenseAutomationMissingReceipts",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:nd.confirmMatch,isLoading:e.bulkUploadSelector?.confirmMatchStatus.fetchState==="In-Progress",isDisabled:ne==null||e.bulkUploadSelector?.confirmMatchStatus.fetchState==="In-Progress",style:{minWidth:"96px",justifyContent:"space-evenly"},onClick:()=>{ne!=null&&e.bulkUploadSelector?.confirmMatchStatus.fetchState!=="In-Progress"&&e.onConfirmBulkUploadMatch?.(ne.batchId,ne.attachmentId,ne.transactionId,ne.transactionType,ne.fileName)}},cancelBtn:{label:Ke.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>ie(null)}};default:{const He=_==="reconciliation"&&n.reconciliation.selectedTab==="review"&&n.reconciliation.selectedAccountId!=null,Dt=_==="reconciliation"&&n.reconciliation.selectedAccountId==null,Mi=_==="reconciliation"&&n.reconciliation.selectedTab==="reconcile"&&n.reconciliation.selectedAccountId!=null,Pi=Ce.step==="month_end_insights"&&(_==="flux_analysis"&&(n.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||n.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||Dt),Ot=_==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="review",Fi=_==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="autoCategorized",Bi=n.monthEndCloseChecksView.monthEndCloseChecks?.monthEndCloseCheckList.find(li=>li.id==="month_end_insights"),zi=n.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&Bi?.isDisabled===!1&&(i||ue?.isNextDisabled===!1),yt=Ce.step!=="month_end_insights"||!Dt&&_!=="flux_analysis"?ue?.isNextDisabled===!0:!zi;return{formId:"expenseAutomationPage",nextBtnLabel:Ke.next,backBtnLabel:Ke.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Pi===!0?gS(n.selectedPeriod.month):Ke.next,style:{justifyContent:"space-evenly"},isDisabled:yt,suffixIcon:t.jsx(Xc,{}),onClick:()=>{Ot?o("autoCategorized"):He?l("reconcile"):p(Ce.step)}},cancelBtn:{label:Ke.back,isDisabled:a||ue?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(ed,{}),onClick:()=>{Fi?o("review"):Mi?l("review"):He?s():p(be.step)}}}}}})(),{confirmAction:kn}=(()=>{switch(h){case"expenseAutomationFluxPage":return{confirmAction:()=>{G(!1),E([]),d()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{G(!1),m(Z,xe.map(Ee=>Ee.id),O,!1,Re[Z],wa(de,Z),f,le),d()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{G(!1),k(),d()}};default:return{confirmAction:()=>{G(!1)},confirmationDescription:gi.empty}}})(),dt=_==="reconciliation"&&B.selectedAccountId!=null&&B.selectedReconAccount!=null,{month:$n,year:Rt}=O,cn=Id().set("month",$n-1).set("year",Rt),dn=cn.startOf("month").format(td),un=cn.endOf("month").format(td),ri=`${dn} ${gi.hyphen} ${un}`,Zt=e.sidePanelIsOpen??!1,Ht=e.sidePanelIsFullView??!1,Ii=_==="missing_receipts"&&q==="missing"&&D,ai=e.bulkUploadSelector?.phase,si=e.bulkUploadSelector,Ai=function(...Ee){for(const He of Ee)if(He!=null&&He>0&&!Number.isNaN(He))return He;return 0}(si?.progress.total,si?.uploadedFileCount,M.uploadFileCount),Io=q==="completed"&&e.bulkUploadSelector!=null&&e.bulkUploadSelector.completedTransactions.fetchState.fetchState==="Completed"&&e.bulkUploadSelector.completedTransactions.totalCount===0,Li={bulkUploadPhase:ai,isDraggingFiles:M.isDraggingFiles,isUploading:M.isUploading===!0,matchingProgressBannerTotal:Ai,onFilesSelected:M.handleBulkUploadFiles,policyDescription:Io?"":nd.policyDescription,showEmailOrDropZone:M.isUploading!==!0&&ai!=="matching"&&A.fetchState!=="In-Progress"&&A.fetchState!=="Not-Started",uploadError:M.uploadError,uploadFileCount:M.uploadFileCount,uploadProgressPercent:e.bulkUploadSelector?.uploadProgress??0},Di=_==="missing_receipts"&&q==="completed"&&D&&e.bulkUploadSelector!=null,Oi={onDragLeave:M.handleDragLeave,onDragOver:M.handleDragOver,onDrop:M.handleDrop},Ao=Ii!==!0||Zt&&Ht?Di!==!0||Zt&&Ht||e.bulkUploadSelector==null?null:t.jsx(Qc,{activeSubTab:e.bulkUploadSelector.completedSubTab,completedTransactionsFetchState:e.bulkUploadSelector.completedTransactions.fetchState,completedTransactionsLoadedCount:e.bulkUploadSelector.completedTransactions.transactions.length,onSubTabChange:Ee=>{e.onSetBulkUploadCompletedSubTab?.(Ee)},totalCount:e.bulkUploadSelector.completedTransactions.totalCount}):t.jsx(Gc,{...Oi,children:t.jsx(Zc,{...Li})});return t.jsxs(oS,{children:[V?t.jsx(sh,{containerStyle:{width:356},titleComponent:t.jsx(wS,{children:sS}),primaryButtonText:dS,secondaryButtonText:cS,proceedButtonVariant:"danger",action:{onOkClick:()=>{kn()},onCancelClick:()=>G(!1)},descriptionComponent:t.jsx(vS,{children:ti.confirmationDescription})}):null,t.jsx(lh,{isOpen:e.sidePanelIsOpen??!1,isFullView:e.sidePanelIsFullView??!1,panelContent:e.panelContent,panelActionBarContent:e.isTransactionActivityEnabled?t.jsx(hS,{setActivityLogTransactionId:e.setActivityLogTransactionId}):null,headerContent:t.jsx(M1,{hideEmptyDivBelowTabs:_==="missing_receipts",onBack:s,navBarCustomElement:_==="reconciliation"&&B.selectedAccountId!=null?t.jsx(pS,{reconciliation:B}):void 0,onReconTabUpdate:l,currentRecontab:B.selectedTab,bulkUploadPhase:e.bulkUploadSelector?.phase,currentMissingReceiptsTab:q,onMissingReceiptsTabUpdate:X,reconcileDetailPageFetchState:B.selectedAccountId!=null?B.accountReconciliationsByAccountID[B.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:dt?B.selectedAccountId:void 0,currentSelectedView:_,titleStyle:{justifyContent:"center",marginLeft:r.sp0},headerData:et(_,Re.autoCategorized,dt?B.selectedAccountId:void 0,dt?B.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,dt?ri:void 0,_==="missing_receipts"?{includeBulkUploadTabs:D,navTitle:D?Uu.receipts:void 0}:void 0),searchText:me,currentTab:Z,getTabCountAndFetchState:Ee=>{if(_==="transaction_categorization"&&(Ee==="autoCategorized"||Ee==="review")){const He=Ee;return{hideCountInTab:Re[He]>ti.common.numbers.maximumCount,count:Re[He],isFetching:ge[He].fetchState==="In-Progress"}}if(_==="reconciliation"){const{reconciliation:He}=n,{selectedAccountId:Dt}=He;return Dt==null?{count:0,isFetching:!1}:Ee==="review"?{count:He.accountReconciliationsByAccountID[Dt]?.accountReconEntity?.transactionsToReview.length,isFetching:He.accountReconciliationsByAccountID[Dt]?.transactionFetchState.fetchState==="In-Progress"}:{count:He.accountReconciliationsByAccountID[Dt]?.accountReconEntity?.transactionsToReconcile.length,isFetching:He.accountReconciliationsByAccountID[Dt]?.transactionFetchState.fetchState==="In-Progress"}}if(_==="missing_receipts"){if(Ee==="missing")return{count:A.transactions.length,isFetching:A.fetchState==="In-Progress"};if(Ee==="unmatched")return{count:(e.bulkUploadSelector?.unmatchedFiles.length??0)+(e.bulkUploadSelector?.pastUnmatchedFiles.length??0),isFetching:q==="unmatched"&&Au({bulkUploadSelector:e.bulkUploadSelector})};if(Ee==="completed")return{count:e.bulkUploadSelector?.completedTransactions?.totalCount??0,isFetching:e.bulkUploadSelector?.completedTransactions?.fetchState?.fetchState==="In-Progress",hideCountInTab:!0}}},completionStatus:Oe,forceShowSubtitle:I===!0||_==="je_schedules"&&(F.fetchState==="In-Progress"||F.accountSettingsView.fetchState==="In-Progress"),refreshStatus:Pe,companyId:e.companyId,companyName:n.monthEndInsights?.companyName??gi.empty,isZeniUser:Q,onAllThreadsClick:()=>{z!=null&&H(null),se(!0)},onUpdateTab:o,onSearchTextChanged:v,onRefresh:_==="missing_receipts"?()=>{switch(q){case"missing":e.onFetchMissingReceiptsList();break;case"unmatched":e.onFetchBulkUploadBatches?.({cacheOverride:!0,invalidateBatchDetailsCache:!0});break;case"completed":e.onFetchCompletedTransactions?.(void 0,!0)}}:w,onClose:()=>{h==="expenseAutomationFluxPage"||h==="expenseAutomationJESchedulePage"||h==="expenseAutomationTransactionsPage"?G(!0):d()},belowTabsSlot:Ao}),listContent:t.jsxs(rS,{children:[_==="missing_receipts"?t.jsx(o2,{missingReceiptsTab:q,missingTransactionCount:A.transactions.length,missingReceiptsBulkUploadChromeInPageBody:Ii===!0&&Zt&&Ht?t.jsx(Gc,{...Oi,children:t.jsx(Zc,{...Li})}):null,missingReceiptsCompletedChromeInPageBody:Di===!0&&Zt&&Ht&&e.bulkUploadSelector!=null?t.jsx(Qc,{activeSubTab:e.bulkUploadSelector.completedSubTab,completedTransactionsFetchState:e.bulkUploadSelector.completedTransactions.fetchState,completedTransactionsLoadedCount:e.bulkUploadSelector.completedTransactions.transactions.length,onSubTabChange:Ee=>{e.onSetBulkUploadCompletedSubTab?.(Ee)},totalCount:e.bulkUploadSelector.completedTransactions.totalCount}):null,bulkUploadInteractions:M,bulkUploadSelector:e.bulkUploadSelector,selectedPeriod:O,authParams:e.authParams,bulkUploadEndpoint:e.bulkUploadEndpoint,transactionAttachmentsEndpoint:e.transactionAttachmentsEndpoint,onBulkUploadSuccess:e.onBulkUploadSuccess,onBulkUploadFiles:e.onBulkUploadFiles,onFetchBulkUploadBatches:e.onFetchBulkUploadBatches,onFetchMoreBatchDetails:e.onFetchMoreBatchDetails,onFetchCompletedTransactions:e.onFetchCompletedTransactions,onDeleteUnmatchedReceipt:e.onDeleteUnmatchedReceipt,onLoadMoreManualSearch:e.onLoadMoreManualSearch,onSearchTransactionsForManualMatch:e.onSearchTransactionsForManualMatch,onPendingMatchChange:ie,pendingMatchAttachmentId:ne?.attachmentId??null,pendingMatchTransactionId:ne?.transactionId??null,onMissingReceiptsRowClick:e.onMissingReceiptsRowClick,onSetBulkUploadCompletedSubTab:e.onSetBulkUploadCompletedSubTab,onSetBulkUploadSortConfig:e.onSetBulkUploadSortConfig,onResetBulkUploadSort:e.onResetBulkUploadSort,setMissingReceiptsTab:X,tableSectionProps:{parentProps:e,isCOTEnabled:x,setIsJeAccountSettingsOpened:L,setResetJeAccountSettingsForm:b,allThreadsSectionOpen:oe,setCurrentFooterFormId:N,currentFooterFormId:h,onCloseAllThreadsSection:()=>se(!1)}}):t.jsx(Eu,{...e,isCOTEnabled:x,setIsJeAccountSettingsOpened:L,setResetJeAccountSettingsForm:b,allThreadsSectionOpen:oe,setCurrentFooterFormId:N,currentFooterFormId:h,onCloseAllThreadsSection:()=>se(!1)}),t.jsx(st,{controller:_!=="month_end_insights"&&e.sidePanelIsOpen!==!0,children:t.jsx(ld,{style:{width:"-webkit-fill-available",maxHeight:W[8]},formId:fS(h),primaryBtn:Qe,leftSideComponent:it,cancelBtn:ct,separatorStyle:{marginRight:r.sp4}})})]})})]})},pS=({reconciliation:e})=>{const n=St(),{clearedBalance:a,variance:i,variancePercentage:f,deposits:x,payments:o}=e.reconciliationTabsState.balances,{balance:l}=e.selectedReconAccount?.accountReconEntity??{},{selectedReconAccount:p}=e,{transactionFetchState:v}=p??{};return t.jsx(SS,{children:t.jsxs(kS,{children:[t.jsxs(Cr,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx(br,{children:t.jsx($S,{})}),t.jsx(wr,{children:v?.fetchState==="In-Progress"?t.jsxs(kr,{children:[t.jsx(Gn,{height:25,width:120}),t.jsx(Gn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(Sr,{children:ht("0,0.00",l)}),t.jsx(vr,{children:ti.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs(Cr,{children:[t.jsx(br,{children:t.jsx(TS,{})}),t.jsx(wr,{children:v?.fetchState==="In-Progress"?t.jsxs(kr,{children:[t.jsx(Gn,{height:25,width:120}),t.jsx(Gn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(Sr,{children:ht("0,0.00",a)}),t.jsxs(NS,{children:[t.jsx(vr,{children:ti.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(Se,{placement:"bottom",title:t.jsxs(_S,{children:[t.jsxs(id,{children:[t.jsxs(od,{children:[o.count," ",Zn.payments]}),t.jsx(rd,{children:ht("0,0.[00]",o.totalAmount)})]}),t.jsxs(id,{children:[t.jsxs(od,{children:[x.count," ",Zn.deposits]}),t.jsx(rd,{children:ht("0,0.[00]",x.totalAmount)})]})]}),display:"flex",children:t.jsx(jS,{})})]})]})})]}),t.jsxs(Cr,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx(br,{children:t.jsx(ES,{})}),t.jsx(wr,{children:v?.fetchState==="In-Progress"?t.jsxs(kr,{children:[t.jsx(Gn,{height:25,width:120}),t.jsx(Gn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(Sr,{children:[t.jsx("span",{style:{color:i.amount===0?n.colors.brandColorJadeDark:n.colors.primary},children:ht("0,0.00",i)}),f!=null&&i.amount!==0?t.jsx("span",{style:{color:n.colors.primary,marginLeft:2},children:`(${f.toFixed(2)}%)`}):null]}),t.jsx(vr,{children:ti.accountRecon.reconciliation.headers.variance})]})})]})]})})},yr=(e,n,a,i,f)=>{const x=(e>1?i+"s":i)+" selected";return e>0?t.jsxs(xS,{currentView:f,style:a==="small"?{position:"absolute",top:r.sp2,left:`-${r.sp5}`}:{},children:[t.jsx(yS,{multiDigit:e>=5,children:e}),t.jsx(CS,{children:x}),e===n?t.jsx(bS,{children:`(${aS})`}):null]}):null},gS=e=>{const n=uS[e];return`${lS}${gi.space}${n}${gi.space}${Uu.insights}`};function mS(e,n){const a=e.findIndex(x=>x.step===n);if(a===-1)throw new Error("currentStep not found in allSteps array");const i=(a+1)%e.length,f=(a-1+e.length)%e.length;return{nextStep:e[i],previousStep:e[f]}}const fS=e=>`${e}_form`,xS=y.div`
3509
- display: flex;
3510
- justify-content: flex-start;
3511
- align-items: center;
3512
- gap: ${r.sp2};
3513
- margin-left: ${e=>e.currentView==="flux_analysis"?"36px":r.sp8};
3514
- `,yS=y(at)`
3515
- height: 18px;
3516
- width: ${e=>e.multiDigit?"auto":"18px"};
3517
- padding: ${r.sp0} 6px;
3518
- border-radius: ${r.sp12};
3519
- border: ${e=>`1px solid ${e.theme.colors.primary}`};
3520
- display: flex;
3521
- justify-content: center;
3522
- align-items: center;
3523
- `,CS=y(Me)`
3524
- color: ${e=>e.theme.colors.primary};
3525
- `,bS=y(nt)`
3526
- color: ${fe.important};
3527
- `,wS=y(ah)`
3528
- margin-top: ${r.sp5};
3529
- padding-left: ${r.sp8};
3530
- padding-right: ${r.sp8};
3531
- color: ${e=>e.theme.colors.primary};
3532
- word-break: break-word;
3533
- `,vS=y(ch)`
3534
- color: ${e=>e.theme.colors.primary};
3535
- margin-top: ${r.sp2};
3536
- margin-bottom: ${r.sp2};
3537
- `,SS=y.div`
3538
- display: flex;
3539
- justify-content: center;
3540
- align-items: center;
3541
- padding: ${r.sp3} ${r.sp0};
3542
- `,kS=y.div`
3543
- width: 100%;
3544
- display: flex;
3545
- justify-content: center;
3546
- align-items: center;
3547
- gap: ${r.sp1};
3548
- `,Cr=y.div`
3549
- display: flex;
3550
- justify-content: center;
3551
- align-items: center;
3552
- gap: ${r.sp3};
3553
- `,br=y.div`
3554
- width: ${r.sp7};
3555
- height: ${r.sp7};
3556
- border-radius: 50%;
3557
- display: flex;
3558
- justify-content: center;
3559
- align-items: center;
3560
- background-color: ${e=>e.theme.mode==="dark"?e.theme.colors.brandColorJadeDark:e.theme.colors.brandColorJadeLight};
3561
- `,wr=y.div`
3562
- display: flex;
3563
- flex-direction: column;
3564
- `,vr=y(nt)`
3565
- color: ${e=>e.theme.colors.hero};
3566
- `,Sr=y(wi)`
3567
- min-width: 180px;
3568
- color: ${e=>e.theme.colors.primary};
3569
- `,$S=y(yh)`
3570
- color: ${e=>e.theme.colors.primary};
3571
- width: ${r.sp4};
3572
- height: ${r.sp4};
3573
- `,ES=y(Ch)`
3574
- color: ${e=>e.theme.colors.primary};
3575
- width: ${r.sp4};
3576
- height: ${r.sp4};
3577
- `,TS=y(e=>c.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},c.createElement("path",{d:"M12 22.0619L11.4825 21.5444C9.66604 19.7284 7.20261 18.7082 4.63406 18.7084H2.17687C1.92268 18.7082 1.67898 18.607 1.49932 18.4272C1.31966 18.2474 1.21875 18.0036 1.21875 17.7494V2.89563C1.21875 2.64152 1.3197 2.39781 1.49938 2.21813C1.67906 2.03845 1.92276 1.9375 2.17687 1.9375H3.94219C5.53731 1.93666 7.10793 2.32989 8.51448 3.08223C9.92104 3.83457 11.12 4.92273 12.0047 6.25L12 22.0619Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M12 22.0619L12.5175 21.5444C14.334 19.7284 16.7974 18.7082 19.3659 18.7084H21.8231C22.0773 18.7082 22.321 18.607 22.5007 18.4272C22.6803 18.2474 22.7813 18.0036 22.7812 17.7494V2.89563C22.7812 2.64152 22.6803 2.39781 22.5006 2.21813C22.3209 2.03845 22.0772 1.9375 21.8231 1.9375H20.0625C18.4674 1.93666 16.8968 2.32989 15.4902 3.08223C14.0837 3.83457 12.8847 4.92273 12 6.25V22.0619Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M4.07031 6.47765C5.88047 6.33155 7.68276 6.84169 9.14781 7.91484",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M4.07031 10.3118C5.88051 10.1652 7.68295 10.6754 9.14781 11.7489",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M4.07031 14.1435C5.88058 13.9978 7.68285 14.5083 9.14781 15.5817",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M18.5882 8.40625H16.6392C16.3407 8.40684 16.0516 8.51125 15.8217 8.70157C15.5917 8.8919 15.4351 9.15629 15.3786 9.44943C15.3222 9.74258 15.3695 10.0462 15.5125 10.3083C15.6554 10.5704 15.885 10.7746 16.162 10.8859L18.1392 11.6762C18.4162 11.7876 18.6458 11.9918 18.7887 12.2539C18.9316 12.516 18.9789 12.8196 18.9225 13.1128C18.8661 13.4059 18.7095 13.6703 18.4795 13.8606C18.2495 14.0509 17.9605 14.1553 17.662 14.1559H15.7129",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M17.1504 8.40656V7.6875",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M17.1504 14.8753V14.1562",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})))`
3578
- color: ${e=>e.theme.colors.primary};
3579
- width: ${r.sp4};
3580
- height: ${r.sp4};
3581
- `,jS=y(ud)`
3582
- width: ${r.sp3};
3583
- height: ${r.sp3};
3584
- color: ${e=>e.theme.colors.hero};
3585
- :hover {
3586
- color: ${e=>e.theme.colors.primary};
3587
- }
3588
- `,NS=y.div`
3589
- display: flex;
3590
- align-items: center;
3591
- gap: ${r.sp1};
3592
- `,_S=y.div`
3593
- background-color: ${fe.overlayDark};
3594
- padding: 2px ${r.sp2};
3595
- border-radius: ${r.sp1};
3596
- `,id=y.div`
3597
- display: flex;
3598
- justify-content: space-between;
3599
- gap: ${r.sp2};
3600
- `,od=y.div`
3601
- text-transform: capitalize;
3602
- `,rd=y(nt)`
3603
- color: ${fe.primaryDark};
3604
- align-self: "flex-end";
3605
- `,Gn=y(pt)`
3606
- border-radius: ${r.sp2};
3607
- `,kr=y.div`
3608
- display: flex;
3609
- flex-direction: column;
3610
- min-width: 180px;
3611
- gap: ${r.sp1};
3612
- `,RS=y.button`
3613
- background: none;
3614
- border: none;
3615
- cursor: pointer;
3616
- padding: ${r.sp1};
3617
- border-radius: ${r.sp1};
3618
- display: flex;
3619
- align-items: center;
3620
- justify-content: center;
3621
-
3622
- &:hover {
3623
- background: ${({theme:e})=>e.colors.grey4};
3624
- }
3625
- `,IS=y(wu)`
3626
- width: ${r.sp4};
3627
- height: ${r.sp4};
3628
- `;export{wS as ConfirmationPopUpTitle,d5 as default,mS as getNextAndPreviousSteps,fS as uniqueFormName};