@outmarket-ai/react-sdk 0.1.0-alpha.36 → 0.1.0-alpha.37

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 (356) hide show
  1. package/dist/{AddNoteDialog-Cpi1nfwT.js → AddNoteDialog-Yge3IB1P.js} +1 -1
  2. package/dist/{AlertDialog-_t-evdam.js → AlertDialog-DJZSkNpg.js} +1 -1
  3. package/dist/{ApproveWorkflowsList-BmYZqp9s.js → ApproveWorkflowsList-CWH0NN8N.js} +1 -1
  4. package/dist/{BORLetterEditor-BZDBvV69.js → BORLetterEditor-1rUoHq5R.js} +1 -1
  5. package/dist/{BillDetailModal-B9yFiJTi.js → BillDetailModal-Xw_hhT8b.js} +1 -1
  6. package/dist/{CoiIssueHolderModal-CzSDU14A.js → CoiIssueHolderModal-fQUcFLoh.js} +1 -1
  7. package/dist/{DeletePromptDialog-Dzsl84zg.js → DeletePromptDialog-56PY2_Jl.js} +1 -1
  8. package/dist/{EmailFormatSelectionDialog-a6wInMbw.js → EmailFormatSelectionDialog-DnQG_6jn.js} +1 -1
  9. package/dist/{ExcelExportPreviewDialog-BavPa1AV.js → ExcelExportPreviewDialog-CGlfNt1H.js} +1 -1
  10. package/dist/{ExplainPanel-DQHRbHze.js → ExplainPanel-CGE04xa3.js} +1 -1
  11. package/dist/{ExportDialog-B_xEStjm.js → ExportDialog-D_iXexam.js} +1 -1
  12. package/dist/{ExportToAmsDialog--_rUT0ky.js → ExportToAmsDialog-Cq8DeJm9.js} +1 -1
  13. package/dist/{ExportToDriveDialog--KGO6oHg.js → ExportToDriveDialog-DdXXdD1O.js} +1 -1
  14. package/dist/{FeedbackTool-C1u8INbG.js → FeedbackTool-BkqROb9w.js} +1 -1
  15. package/dist/{LayerDetailModal-CpMvOQy3.js → LayerDetailModal-CnOt0XDk.js} +1 -1
  16. package/dist/{LogoEditor-Bq6jF9Ib.js → LogoEditor-BpiMgfHM.js} +1 -1
  17. package/dist/{MarkdownExportPreviewDialog-OxivowqQ.js → MarkdownExportPreviewDialog-HVMv0Xpe.js} +1 -1
  18. package/dist/{NotificationDrawer-CMT3ICuy.js → NotificationDrawer-lEXwDeTJ.js} +1 -1
  19. package/dist/{PhoneNumbersDisplay-BuqW5ohD.js → PhoneNumbersDisplay-DT_0SadL.js} +1 -1
  20. package/dist/{PlanSelector-8i1S3uNY.js → PlanSelector-BeRIZrQw.js} +1 -1
  21. package/dist/{PlanSettingsModal-DcDAPx6W.js → PlanSettingsModal-HcuqqWHQ.js} +1 -1
  22. package/dist/{PlanWizardModal-aEFulQHO.js → PlanWizardModal-D-Eiops9.js} +1 -1
  23. package/dist/{RenameAssetDialog-BoOhjh5z.js → RenameAssetDialog-CCw0Hazz.js} +1 -1
  24. package/dist/{SaveBlockDialog-BM81p_97.js → SaveBlockDialog-BGoexB3m.js} +1 -1
  25. package/dist/{SaveOutlineDialog-Be6DzbOL.js → SaveOutlineDialog-Dkgc5ETS.js} +1 -1
  26. package/dist/{SavePromptDialog-r0lmgAS0.js → SavePromptDialog-CKQPDlh5.js} +1 -1
  27. package/dist/{ShareResourceDialog-DSUOAqDU.js → ShareResourceDialog-CuHJ487E.js} +1 -1
  28. package/dist/{TermsNoticeModal-C_Kg50vV.js → TermsNoticeModal-BsaIzfO-.js} +1 -1
  29. package/dist/{TowerAlertModal-DMDKlIat.js → TowerAlertModal-D_z7--D_.js} +1 -1
  30. package/dist/{TowerSummaryModal-a_l4Aym6.js → TowerSummaryModal-DSC1Pm1Y.js} +1 -1
  31. package/dist/{VaultSettingsDialog-B0GHZrxc.js → VaultSettingsDialog-Deynp-iQ.js} +1 -1
  32. package/dist/{ViewNoteDialog-C3aj5iIR.js → ViewNoteDialog-DUH1NRD3.js} +1 -1
  33. package/dist/{WhatsNewProvider-BriMwYKH.js → WhatsNewProvider-CcxLnw1k.js} +1 -1
  34. package/dist/{WidgetRawDataView-BRl2UmhF.js → WidgetRawDataView-BSumRkDH.js} +1 -1
  35. package/dist/{abap-D24AqS3I.js → abap-CgaBvtsa.js} +1 -1
  36. package/dist/{abnf-iCVfVLyA.js → abnf-P_WbR2sm.js} +1 -1
  37. package/dist/{actionscript-Zxb50RoG.js → actionscript-DLGJnRv3.js} +1 -1
  38. package/dist/{activityLog-CJDeBNhQ.js → activityLog-BZlv-Eve.js} +1 -1
  39. package/dist/{ada-Bqgs7QSd.js → ada-DuWfifjJ.js} +1 -1
  40. package/dist/{agda-BywGEnku.js → agda-CtfJoxS4.js} +1 -1
  41. package/dist/{al-BltDFxUF.js → al-B0lTwEiv.js} +1 -1
  42. package/dist/{antlr4-D7rj6N3C.js → antlr4-retFXi1E.js} +1 -1
  43. package/dist/{apacheconf-DloZ1Qre.js → apacheconf-Q_DriHMo.js} +1 -1
  44. package/dist/{apex-CaOyI3ry.js → apex-BL0DoEXd.js} +1 -1
  45. package/dist/{apl-BUg81PJG.js → apl-CGlhmeNp.js} +1 -1
  46. package/dist/{applescript-BrCxNDW3.js → applescript-DHg6XZam.js} +1 -1
  47. package/dist/{aql-BlRWJ7nt.js → aql-Cvf4IoYj.js} +1 -1
  48. package/dist/{arduino-num0XMBY.js → arduino-C1jIv4Hb.js} +1 -1
  49. package/dist/{arff-DWp2gz5V.js → arff-DSBKjv6P.js} +1 -1
  50. package/dist/{asciidoc-B74XLNRS.js → asciidoc-ByL_VbaN.js} +1 -1
  51. package/dist/{asm6502-DJ9xPLh7.js → asm6502-CvIXa_zj.js} +1 -1
  52. package/dist/{asmatmel-B1JRUJxe.js → asmatmel-BHjw6gOv.js} +1 -1
  53. package/dist/{aspnet-BM7s5Uva.js → aspnet-BvCkcUJ_.js} +1 -1
  54. package/dist/{autohotkey-CKFdtcF-.js → autohotkey-Cqck_wiv.js} +1 -1
  55. package/dist/{autoit-CNYKEym4.js → autoit-CVDd08hL.js} +1 -1
  56. package/dist/{avisynth-vusQHINy.js → avisynth-D97xYESW.js} +1 -1
  57. package/dist/{avro-idl-CaNF-lM-.js → avro-idl-BhBMl4Td.js} +1 -1
  58. package/dist/{bash-Bwcu9Bqt.js → bash-Dij0omZ0.js} +1 -1
  59. package/dist/{basic-Dq5kyGFj.js → basic-CTiNpNF1.js} +1 -1
  60. package/dist/{batch-C7CUM3Xz.js → batch-Djh-RD3-.js} +1 -1
  61. package/dist/{bbcode-DK5SVeOe.js → bbcode-87ZwUZdM.js} +1 -1
  62. package/dist/{bell-B5ZaarrC.js → bell-DdFiq7CV.js} +1 -1
  63. package/dist/{bicep-BXzh26cb.js → bicep-D8Uqs4ET.js} +1 -1
  64. package/dist/{birb-DFVxf9hr.js → birb-DO7bQ36t.js} +1 -1
  65. package/dist/{bison-CnRkH_JU.js → bison-B6xTjpNX.js} +1 -1
  66. package/dist/{blockEditorContent-cOt9C7eo.js → blockEditorContent-D1nEGgBO.js} +1 -1
  67. package/dist/{bnf-Du-ruhla.js → bnf-CXbb4GYO.js} +1 -1
  68. package/dist/{brainfuck-D37zTsBi.js → brainfuck-CTMWKM2q.js} +1 -1
  69. package/dist/{brightscript-DPP5EZMM.js → brightscript-CJ6W_EFd.js} +1 -1
  70. package/dist/{bro-BqXtQVr6.js → bro-3Ila_jrE.js} +1 -1
  71. package/dist/{bsl-BO8tacCG.js → bsl-BivOEl7-.js} +1 -1
  72. package/dist/{c-CFw5x5JZ.js → c-no5Fqvbl.js} +1 -1
  73. package/dist/{calendar-02PmdDke.js → calendar-PkxljIHv.js} +1 -1
  74. package/dist/{cfscript-De0_Y_kU.js → cfscript-tQn6BcLB.js} +1 -1
  75. package/dist/{chaiscript-CcC77JLd.js → chaiscript-Cb1G5I19.js} +1 -1
  76. package/dist/{cil-B5bz3YpF.js → cil-CuWYSotE.js} +1 -1
  77. package/dist/{clike-C1MxZFxV.js → clike-DCJJeiEP.js} +1 -1
  78. package/dist/{clojure-DhYfZmw7.js → clojure-CqGl9-N5.js} +1 -1
  79. package/dist/{cmake-D9vHfYuy.js → cmake-Km90jb37.js} +1 -1
  80. package/dist/{cobol-Dph8NxdA.js → cobol-Dc0dZzud.js} +1 -1
  81. package/dist/{coffeescript-agU8Kqj6.js → coffeescript-ByaASjre.js} +1 -1
  82. package/dist/{concurnas-Bwa2joZx.js → concurnas-GWhWOHTN.js} +1 -1
  83. package/dist/{contactsList-CK-Ub-Zx.js → contactsList-DMCAIG8t.js} +2 -2
  84. package/dist/{copyPreviewToClipboard-BPlno-5B.js → copyPreviewToClipboard-DfH1XzWw.js} +1 -1
  85. package/dist/{coq-CxDBlBi4.js → coq-CPYEa0aA.js} +1 -1
  86. package/dist/{core-XlbUAbYZ.js → core-w5W5R6Lc.js} +1 -1
  87. package/dist/{cpp-CKft7yX8.js → cpp-D5YZy6VH.js} +1 -1
  88. package/dist/{crystal-DkBxfyXk.js → crystal-3V4Me6so.js} +1 -1
  89. package/dist/{csharp-BPIRME4P.js → csharp-DIFgzTzp.js} +1 -1
  90. package/dist/{cshtml-CKAqsV3X.js → cshtml-BF5zEJbs.js} +1 -1
  91. package/dist/{csp-Du4bBN0_.js → csp-Cwapz65r.js} +1 -1
  92. package/dist/{css-BcUE3ZsM.js → css-B1fr86V5.js} +1 -1
  93. package/dist/{css-extras-BJ09KgQB.js → css-extras-B_QkdkZJ.js} +1 -1
  94. package/dist/{csv-Cou5edEj.js → csv-BpbiXzFC.js} +1 -1
  95. package/dist/{cypher-9LhbbKDj.js → cypher-CVIX_mQV.js} +1 -1
  96. package/dist/{d-ClSUOmLS.js → d-C9LXL0K-.js} +1 -1
  97. package/dist/{dart-BnsA4_ty.js → dart-BaWHQWIC.js} +1 -1
  98. package/dist/{dataweave-YmEHlKVZ.js → dataweave-Cyo7UWes.js} +1 -1
  99. package/dist/{dax-D5nAQ5F6.js → dax--44bFImn.js} +1 -1
  100. package/dist/{dhall-B3fZAOLl.js → dhall-DlBD-jUi.js} +1 -1
  101. package/dist/{diff-DLy29QDY.js → diff-Cc1gbVK2.js} +1 -1
  102. package/dist/{django-CrSbldUR.js → django-BP1t2Anl.js} +1 -1
  103. package/dist/{dns-zone-file-CtFEMuOX.js → dns-zone-file-BNtQQwkO.js} +1 -1
  104. package/dist/{docker-B-E0ToE-.js → docker-BFpq8PpO.js} +1 -1
  105. package/dist/{dot-CdBzbaSA.js → dot-ClzjriEI.js} +1 -1
  106. package/dist/{ebnf-D1D5vg60.js → ebnf-BjCeM8gg.js} +1 -1
  107. package/dist/{editCarrierDialog-BF_MEtYF.js → editCarrierDialog-CzeVNuKB.js} +1 -1
  108. package/dist/{editorconfig-D2y6Iwoy.js → editorconfig-Bo_cwY3M.js} +1 -1
  109. package/dist/{eiffel-XBJjC78c.js → eiffel-CvdCA5zv.js} +1 -1
  110. package/dist/{ejs-DF3ugwOn.js → ejs-C-L5am1K.js} +1 -1
  111. package/dist/{elixir-CdwBAcuv.js → elixir-Bu5e_dW3.js} +1 -1
  112. package/dist/{elm-D7ZkFDlk.js → elm-Dt-eIUOp.js} +1 -1
  113. package/dist/{erb-BslOBpn_.js → erb-C0l1xcxA.js} +1 -1
  114. package/dist/{erlang-B_jSlLLf.js → erlang-BxH-HyMJ.js} +1 -1
  115. package/dist/{etlua-CXi8GSJJ.js → etlua-WL-3b72Y.js} +1 -1
  116. package/dist/{excel-formula-BbKyyTaz.js → excel-formula-CGbMO7GW.js} +1 -1
  117. package/dist/{exportFileGeneration-DA7UASLk.js → exportFileGeneration-BuM2qOOZ.js} +1 -1
  118. package/dist/{exportImageReadiness-4Wl1xDju.js → exportImageReadiness-BChyHtH7.js} +1 -1
  119. package/dist/{exportImageReadinessNotifier-BO0VZxL3.js → exportImageReadinessNotifier-BQIBLjLi.js} +1 -1
  120. package/dist/{exportPageHtml-C-czqc38.js → exportPageHtml-CUEih2kT.js} +1 -1
  121. package/dist/exportPreviewToDocx-DmdhNLIi.js +11 -0
  122. package/dist/{exportPreviewToPdf-KlnmktUm.js → exportPreviewToPdf-BgnxneO5.js} +1 -1
  123. package/dist/{factor-D-yZIMs3.js → factor-CbVbxd_Z.js} +1 -1
  124. package/dist/{false-DOb9i3ji.js → false-B68BiBzb.js} +1 -1
  125. package/dist/{firestore-security-rules-B2-2sNY6.js → firestore-security-rules-CfaqG0NQ.js} +1 -1
  126. package/dist/{flask-conical-DDSHQ1yn.js → flask-conical-CWt2mGb-.js} +1 -1
  127. package/dist/{flow-CCHXMgtY.js → flow-GDToJGgg.js} +1 -1
  128. package/dist/{fortran-CqSIZGAu.js → fortran-BFb8M70_.js} +1 -1
  129. package/dist/{fsharp-Cm2XetEE.js → fsharp-Cz3IJvzA.js} +1 -1
  130. package/dist/{ftl-WEyin_KL.js → ftl-C7r0jwdy.js} +1 -1
  131. package/dist/{gap-JMJYFnGS.js → gap-nZHCiz6d.js} +1 -1
  132. package/dist/{gcode-CSVBE99A.js → gcode-BG-gd8Y_.js} +1 -1
  133. package/dist/{gdscript-CHE7TOim.js → gdscript-CJsDphHR.js} +1 -1
  134. package/dist/{gedcom-CWJP9AfG.js → gedcom-XpZDMSQa.js} +1 -1
  135. package/dist/{gherkin-CMonWSJG.js → gherkin-4o12jBh0.js} +1 -1
  136. package/dist/{git-B3U45h9J.js → git-DqUzBp5y.js} +1 -1
  137. package/dist/{glsl-Cw0-bHjJ.js → glsl-zoWRZd14.js} +1 -1
  138. package/dist/{gml-Py3ZFki8.js → gml-DvZWRVGG.js} +1 -1
  139. package/dist/{gn-Bm6KSHsv.js → gn-DviKGHoX.js} +1 -1
  140. package/dist/{go-CRESNpIM.js → go-Cjl3WpBc.js} +1 -1
  141. package/dist/{go-module-DlJCF8nt.js → go-module-seJpKDgV.js} +1 -1
  142. package/dist/{graphql-Cd64pOlI.js → graphql-CpAIvjIa.js} +1 -1
  143. package/dist/{groovy-CwPa9gky.js → groovy-AH2LbWfD.js} +1 -1
  144. package/dist/{haml-Dy-B4CV8.js → haml-CQfvgHRO.js} +1 -1
  145. package/dist/{handlebars-BGMdDUmk.js → handlebars-B9l3Wpz_.js} +1 -1
  146. package/dist/{haskell-Bhp-FYFX.js → haskell-OkYtDV3S.js} +1 -1
  147. package/dist/{haxe-D_99z3rU.js → haxe-CAAXktF5.js} +1 -1
  148. package/dist/{hcl-BCAspB6T.js → hcl-DqDc8hUc.js} +1 -1
  149. package/dist/{highlighter-441tq1jK.js → highlighter-uQf0zbY_.js} +1 -1
  150. package/dist/{hlsl-B_pdIiMk.js → hlsl-oyThU7ft.js} +1 -1
  151. package/dist/{hoon-07ovtuiU.js → hoon-CRrl-26u.js} +1 -1
  152. package/dist/{hpkp-W4BuprmQ.js → hpkp-BflFnPYZ.js} +1 -1
  153. package/dist/{hsts-DX-mHqTJ.js → hsts-B66Je8O6.js} +1 -1
  154. package/dist/{http-BSev006D.js → http-t1sdUjh3.js} +1 -1
  155. package/dist/{ichigojam-DEk_NDyG.js → ichigojam-Bt9z0Hca.js} +1 -1
  156. package/dist/{icon-B2HAqUBb.js → icon-BPBTXowp.js} +1 -1
  157. package/dist/{icu-message-format-B2JxwObX.js → icu-message-format-DSeU6TcY.js} +1 -1
  158. package/dist/{idris-CD2ULo-B.js → idris-FrPZR4S3.js} +1 -1
  159. package/dist/{iecst-CTZWm0B7.js → iecst-CzDmz-8l.js} +1 -1
  160. package/dist/{ignore-8xTZfnaS.js → ignore-DBQMP_9p.js} +1 -1
  161. package/dist/{image-plus-Cxd1cv2I.js → image-plus-DUzVnWlE.js} +1 -1
  162. package/dist/index-2Y8RyUUb.js +1 -0
  163. package/dist/{index-R3_hNUp4.js → index-84cYZci4.js} +1 -1
  164. package/dist/{index-BWo2BOVk.js → index-8nVM9x6B.js} +1 -1
  165. package/dist/{index-6kUcFkJW.js → index-BkFMiqmU.js} +1 -1
  166. package/dist/{index-YLVniasz.js → index-C1kBWd99.js} +1 -1
  167. package/dist/{index-C_WHCLsg.js → index-DSWFIHbs.js} +1 -1
  168. package/dist/{index-DrGP2qXK.js → index-e7HUrljT.js} +1 -1
  169. package/dist/{index.client-BZTm8pIw.js → index.client-GQRx0OMi.js} +1 -1
  170. package/dist/index.js +1 -1
  171. package/dist/{inform7-DueUu6rk.js → inform7-C6SiIj7W.js} +1 -1
  172. package/dist/{ini-CoDI_qlY.js → ini-Fr9btpcc.js} +1 -1
  173. package/dist/{io-fN8n-AP3.js → io-Bob9mDaD.js} +1 -1
  174. package/dist/{j-Dzgq0Buv.js → j-B8dEhV_3.js} +1 -1
  175. package/dist/{java-jqu-OOA_.js → java-BRhuUgBQ.js} +1 -1
  176. package/dist/{javadoc-BuGGe5ry.js → javadoc-DOtq9hu9.js} +1 -1
  177. package/dist/{javadoclike-DwTlhFDH.js → javadoclike-DdvcIp5c.js} +1 -1
  178. package/dist/{javascript-C3W8zrcF.js → javascript-DjCtgtHd.js} +1 -1
  179. package/dist/{javastacktrace-CWg-Pa3I.js → javastacktrace-CRnD6qjT.js} +1 -1
  180. package/dist/{jexl-Bja4nDpf.js → jexl-D2hNAUPD.js} +1 -1
  181. package/dist/{jolie-DY3cCr_F.js → jolie-BmJdWAqP.js} +1 -1
  182. package/dist/{jq-vNnhuOTn.js → jq-CB5fve13.js} +1 -1
  183. package/dist/{js-extras-DP7VhKsg.js → js-extras-BcsagNBl.js} +1 -1
  184. package/dist/{js-templates-D8mthNgM.js → js-templates-Cs-UwghW.js} +1 -1
  185. package/dist/{jsdoc-DO5-FB8p.js → jsdoc-DCFwomVu.js} +1 -1
  186. package/dist/{json-C_a_Br3c.js → json-BWwP_c9r.js} +1 -1
  187. package/dist/{json5-Dec96vpd.js → json5-D4AkXLfp.js} +1 -1
  188. package/dist/{jsonp-By5Gxzzn.js → jsonp-BVJ57hNd.js} +1 -1
  189. package/dist/{jsstacktrace-CgA1Llt8.js → jsstacktrace-DF1BG-6t.js} +1 -1
  190. package/dist/{jsx-C7LWr5Sh.js → jsx-p2U-maPb.js} +1 -1
  191. package/dist/{julia-DYcw0cnQ.js → julia-eQkeC69T.js} +1 -1
  192. package/dist/{keepalived-f7FSwY1z.js → keepalived-CUG7G0mi.js} +1 -1
  193. package/dist/{keyman-Dnl8Nym1.js → keyman-C6vmqb2_.js} +1 -1
  194. package/dist/{kotlin-KeQ0Z08j.js → kotlin-D3scGj4w.js} +1 -1
  195. package/dist/{kumir-BOwHYDAq.js → kumir-Br-WkaJ4.js} +1 -1
  196. package/dist/{kusto-BKwn9HVH.js → kusto-DnN0RUdO.js} +1 -1
  197. package/dist/{latex-Cpvy-fni.js → latex-BLdkNxqO.js} +1 -1
  198. package/dist/{latte-DLkvN2Fo.js → latte-CW4G1zTA.js} +1 -1
  199. package/dist/{less-DucSAs6Z.js → less-m_ARghRW.js} +1 -1
  200. package/dist/{lilypond-baEut3Yc.js → lilypond-DH8H77lm.js} +1 -1
  201. package/dist/{link-2-off-CRRdCIWH.js → link-2-off-BHPhQ9Fe.js} +1 -1
  202. package/dist/{liquid-Dd_2KKW1.js → liquid-Blr_8-qk.js} +1 -1
  203. package/dist/{lisp-AbOq_6XD.js → lisp-BqsiTR2E.js} +1 -1
  204. package/dist/{livescript-CYPuBnBo.js → livescript-Cay_5G59.js} +1 -1
  205. package/dist/{llvm-g_Mdy3-l.js → llvm-DBd2wh_h.js} +1 -1
  206. package/dist/{lock-keyhole-B7cNJP1K.js → lock-keyhole-DwB0jZb9.js} +1 -1
  207. package/dist/{log-Bxuef6Y9.js → log-C8w6K6wl.js} +1 -1
  208. package/dist/{lolcode-B_U88kLR.js → lolcode-iGOFDZ_X.js} +1 -1
  209. package/dist/{lua-BR-YKvEK.js → lua-D-jcgxc2.js} +1 -1
  210. package/dist/{lucide-react-BfKVTZBH.js → lucide-react-DsSIoNqg.js} +1 -1
  211. package/dist/{luckyexcel.umd-T33gDMcN.js → luckyexcel.umd-BG7RRWQ5.js} +1 -1
  212. package/dist/{magma-CHGsJ6zT.js → magma-DLRE9-xS.js} +1 -1
  213. package/dist/{makefile-CweqTgeS.js → makefile-DsrO7LlY.js} +1 -1
  214. package/dist/{markdown-C6Tm-KI8.js → markdown-B12EBN01.js} +1 -1
  215. package/dist/{markup-BBHJPzJ7.js → markup-LrzcDNW8.js} +1 -1
  216. package/dist/{markup-templating-B5Z2Tp0_.js → markup-templating-nC_itgyL.js} +1 -1
  217. package/dist/{matlab-VG8lyYFX.js → matlab-DhcXQFba.js} +1 -1
  218. package/dist/{maxscript-gh8_fxpu.js → maxscript-Co5q3OgH.js} +1 -1
  219. package/dist/{mel-BOnmF1j6.js → mel-vmbnSIgQ.js} +1 -1
  220. package/dist/{mermaid-CWHODlvN.js → mermaid-EwbUHH4M.js} +1 -1
  221. package/dist/{mizar-BwnEAj97.js → mizar-CZwkP8jy.js} +1 -1
  222. package/dist/{mongodb-DBkJe0GZ.js → mongodb-Ch4SGrq-.js} +1 -1
  223. package/dist/{monkey-DnqwFLVO.js → monkey-C2J3hVzP.js} +1 -1
  224. package/dist/{moonscript-DDtzqF4a.js → moonscript-C-2xibE0.js} +1 -1
  225. package/dist/{n1ql-BizhBCmD.js → n1ql-BCBNajHv.js} +1 -1
  226. package/dist/{n4js-CUe7hC9p.js → n4js-DClkyRxs.js} +1 -1
  227. package/dist/{nand2tetris-hdl-DaYgBa5Y.js → nand2tetris-hdl-BTp87epa.js} +1 -1
  228. package/dist/{naniscript-DuPm9JSf.js → naniscript-NuCtVWm7.js} +1 -1
  229. package/dist/{nasm-BVOeqDGV.js → nasm-BZ6SYlkU.js} +1 -1
  230. package/dist/{neon-CjemA2Bi.js → neon-BYsn9jCF.js} +1 -1
  231. package/dist/{nevod-CF3pgy8F.js → nevod-zX25Ysu2.js} +1 -1
  232. package/dist/{nginx-CDt8ECeL.js → nginx-C2D0GaUm.js} +1 -1
  233. package/dist/{nim-h7nlTJBY.js → nim-DDmqYoBT.js} +1 -1
  234. package/dist/{nix-BMZuRgvT.js → nix-_jr8pJ0L.js} +1 -1
  235. package/dist/{nsis-C39cLmRH.js → nsis-D4lk0dWC.js} +1 -1
  236. package/dist/{objectivec-BasNhCfW.js → objectivec-Bd86oCR5.js} +1 -1
  237. package/dist/{ocaml-Bz0i_9U5.js → ocaml-05E82WIs.js} +1 -1
  238. package/dist/{opencl-B8b1nrqo.js → opencl-D-lnL4Ka.js} +1 -1
  239. package/dist/{openqasm-gA_A6qTU.js → openqasm-tW7dB7Ok.js} +1 -1
  240. package/dist/{oz-DZZpkMxi.js → oz-CpVsHe1y.js} +1 -1
  241. package/dist/{paintbrush-CIJANl9X.js → paintbrush-eIDj_RdR.js} +1 -1
  242. package/dist/{parigp-BPpbFJD0.js → parigp-BFdKZdJh.js} +1 -1
  243. package/dist/{parser-iLqczBqj.js → parser-DylJx2dB.js} +1 -1
  244. package/dist/{pascal-B_PpK-ey.js → pascal-DO_yNDsU.js} +1 -1
  245. package/dist/{pascaligo-Cc316Ttp.js → pascaligo-Cy8JmO2T.js} +1 -1
  246. package/dist/{pcaxis-B4MVInmN.js → pcaxis-Cn7ts8I6.js} +1 -1
  247. package/dist/{pen-tool-BZ7oBmmm.js → pen-tool-jnH1CIVs.js} +1 -1
  248. package/dist/{peoplecode-D4Z7F_r1.js → peoplecode-D14_7kks.js} +1 -1
  249. package/dist/{perl-BmSnj-ms.js → perl-CQbEbnsW.js} +1 -1
  250. package/dist/{php-CZ7qz_-j.js → php-Dv63Fhqp.js} +1 -1
  251. package/dist/{php-extras-D4XDXj0-.js → php-extras-E60iRxnG.js} +1 -1
  252. package/dist/{phpdoc-Cy2E2X92.js → phpdoc-DG78xdiU.js} +1 -1
  253. package/dist/{plsql-Cho2eUl5.js → plsql-DDIobotk.js} +1 -1
  254. package/dist/{plyr-i92w2Po_.js → plyr-Qgwtxz_a.js} +1 -1
  255. package/dist/{powerquery-Bx-rg-KZ.js → powerquery-Bo0ST1Q7.js} +1 -1
  256. package/dist/{powershell-Cw9A2ApR.js → powershell-CCaOVj_7.js} +1 -1
  257. package/dist/{processing-B5mBZDw1.js → processing-C6rjr_GE.js} +1 -1
  258. package/dist/{prolog-C1NuTUpu.js → prolog-D8kZVdIf.js} +1 -1
  259. package/dist/{promql-60fY9Aso.js → promql-C2vFBCxB.js} +1 -1
  260. package/dist/{properties-BXbdOpHi.js → properties-sH59kCni.js} +1 -1
  261. package/dist/{protobuf-CC5qtSJR.js → protobuf-fkPop9A-.js} +1 -1
  262. package/dist/{psl-DX0tPo7w.js → psl-B7wWmAdS.js} +1 -1
  263. package/dist/{pug-4-ocmX35.js → pug-BX0N9FDq.js} +1 -1
  264. package/dist/{puppet-BT1z7kcN.js → puppet-DEEVYPS9.js} +1 -1
  265. package/dist/{pure-D0OiKGj6.js → pure-BrWbl_0Y.js} +1 -1
  266. package/dist/{purebasic-BWaSafG1.js → purebasic-CjrSCmL1.js} +1 -1
  267. package/dist/{purescript-CRYiIpnF.js → purescript-BKiZSJaC.js} +1 -1
  268. package/dist/{python-DZBAdGLL.js → python-BjeQqNGg.js} +1 -1
  269. package/dist/{q-D5IjA1Ol.js → q-kUDLAlA-.js} +1 -1
  270. package/dist/{qml-DB2Z7DpA.js → qml-BdyXeaJv.js} +1 -1
  271. package/dist/{qore-CLAh8KDF.js → qore-C0JGwZ1t.js} +1 -1
  272. package/dist/{qsharp-Vl3HQ8Qq.js → qsharp-J2ckxbb8.js} +1 -1
  273. package/dist/{quill-D6tZgwKV.js → quill-DAPYjegM.js} +1 -1
  274. package/dist/{r-t_LsUost.js → r-MrM3knKt.js} +1 -1
  275. package/dist/{racket-BDrpf7nM.js → racket-DmULNk03.js} +1 -1
  276. package/dist/{reason-D_cZoCzn.js → reason-YBJB8xVH.js} +1 -1
  277. package/dist/{regex-Ca5wx86p.js → regex-Bco5sMcd.js} +1 -1
  278. package/dist/{rego-C-7c5YvT.js → rego-Y_l5nrxl.js} +1 -1
  279. package/dist/{renpy-DGDc5wN5.js → renpy-ByRZc0ri.js} +1 -1
  280. package/dist/{rest-BPNhntCy.js → rest-ejEoytjA.js} +1 -1
  281. package/dist/{rip-OSGh86kz.js → rip-DhWnrC0k.js} +1 -1
  282. package/dist/{roboconf-Dgh5mDfF.js → roboconf-BPwLWxtN.js} +1 -1
  283. package/dist/{robotframework-C5oRcK0f.js → robotframework-DIz_rqvo.js} +1 -1
  284. package/dist/{ruby-B_sT9GDm.js → ruby-DgYlOhdN.js} +1 -1
  285. package/dist/{runtime-CmCxTPcG.js → runtime-Ci9GR285.js} +73 -73
  286. package/dist/{rust--xL3MCB-.js → rust-wLe-ezDd.js} +1 -1
  287. package/dist/{sas-aammKV-k.js → sas-DeOyIN8s.js} +1 -1
  288. package/dist/{sass-CHqAEQwn.js → sass-DqCyjbBh.js} +1 -1
  289. package/dist/{scala-DucSWkkP.js → scala-obYmEMLB.js} +1 -1
  290. package/dist/{scheme-iWJJ-nH7.js → scheme-BCSePnXj.js} +1 -1
  291. package/dist/{scss-B7pyOktR.js → scss-CLAQe07V.js} +1 -1
  292. package/dist/{shell-session-CaqRxvUF.js → shell-session-FeVZkDVF.js} +1 -1
  293. package/dist/{smali-2G5Vuu3V.js → smali-Cu0SA_Ws.js} +1 -1
  294. package/dist/{smalltalk-BazKDF6i.js → smalltalk-D4fnCBcP.js} +1 -1
  295. package/dist/{smarty-RSEi9pUM.js → smarty-79tfgjHe.js} +1 -1
  296. package/dist/{sml-CsJwG_fK.js → sml-DD3frLiP.js} +1 -1
  297. package/dist/{solidity-Bb59Ybi4.js → solidity-DIlzHC81.js} +1 -1
  298. package/dist/{solution-file-C0rt2MvJ.js → solution-file-ZL6hMlAv.js} +1 -1
  299. package/dist/{soy-DwQYJn0W.js → soy-Dd2pbPUV.js} +1 -1
  300. package/dist/{sparql-BLfNsnWA.js → sparql-D8alTLZm.js} +1 -1
  301. package/dist/{splunk-spl-Byhm5va6.js → splunk-spl-Ctxd9pfy.js} +1 -1
  302. package/dist/{sqf-DlW26CQZ.js → sqf-C_IOLqrG.js} +1 -1
  303. package/dist/{sql-DwtGS7_-.js → sql-DSHakvQ8.js} +1 -1
  304. package/dist/{squirrel-B-h9OoVn.js → squirrel-6yMYW4SQ.js} +1 -1
  305. package/dist/{stan-C7Us-xct.js → stan-CWKCsUlm.js} +1 -1
  306. package/dist/{stylus-HiFoP3lR.js → stylus-AaWGXwny.js} +1 -1
  307. package/dist/{swift-C6O0K3cr.js → swift-_OcTTkBW.js} +1 -1
  308. package/dist/{systemd-WKo8IJb_.js → systemd-oSqsWqJu.js} +1 -1
  309. package/dist/{t4-cs-9B75PUaO.js → t4-cs-ClTDsC7e.js} +1 -1
  310. package/dist/{t4-templating-3AaQt0Rg.js → t4-templating-B5xkISD3.js} +1 -1
  311. package/dist/{t4-vb-_1wshNmA.js → t4-vb-1-8jAItU.js} +1 -1
  312. package/dist/{table-IRLCsgqL.js → table-CQq2gtQo.js} +1 -1
  313. package/dist/{tap-Bcc-gHEd.js → tap-Bz-JuHqW.js} +1 -1
  314. package/dist/{tcl-BJ0FZNNi.js → tcl-D4CgysPw.js} +1 -1
  315. package/dist/{templateSelectorDialog-BRjELyqr.js → templateSelectorDialog-DJJfHonc.js} +2 -2
  316. package/dist/{textile-DZqhamv_.js → textile-CRt4MOq_.js} +1 -1
  317. package/dist/{toml-DmFxN3l0.js → toml-_nBQCS98.js} +1 -1
  318. package/dist/{tremor-DNmdkIBv.js → tremor-ChZrLM1N.js} +1 -1
  319. package/dist/{tsx-CariDELU.js → tsx-8ra1xGPq.js} +1 -1
  320. package/dist/{tt2-C_kmHBBP.js → tt2-B5LWQbnM.js} +1 -1
  321. package/dist/{turtle-txGLM34c.js → turtle-LpZRmWuv.js} +1 -1
  322. package/dist/{twig-DEmk9H21.js → twig-CoIbzwlB.js} +1 -1
  323. package/dist/{typescript-DhCgI4JK.js → typescript-CE3abAdV.js} +1 -1
  324. package/dist/{typoscript-DnBC3QxX.js → typoscript--qQ14awL.js} +1 -1
  325. package/dist/{unrealscript-Dci4Rzp_.js → unrealscript-Ds2zCaUU.js} +1 -1
  326. package/dist/{uorazor-CLCs2cHr.js → uorazor-BNtXpYIS.js} +1 -1
  327. package/dist/{uri-d6gVm8_M.js → uri-BdvOBqT_.js} +1 -1
  328. package/dist/{usePromptLibraryMutations-Dx5EuhNe.js → usePromptLibraryMutations-5UkGPHSr.js} +1 -1
  329. package/dist/{useSupabaseBlobUrl-CZEHC8pz.js → useSupabaseBlobUrl-CzvfbetS.js} +1 -1
  330. package/dist/{useTermsNotice-od1AmOy2.js → useTermsNotice-Ci0pdx6X.js} +1 -1
  331. package/dist/{user-plus-DVsnHI-R.js → user-plus-DZ2htt41.js} +1 -1
  332. package/dist/{user-round-plus-C2gqc2hE.js → user-round-plus-DucQhHUw.js} +1 -1
  333. package/dist/{v-C5dc3G6U.js → v-BWoiS-LT.js} +1 -1
  334. package/dist/{vala-DaL4_Q-N.js → vala-CqHhqRIp.js} +1 -1
  335. package/dist/{vbnet-D0nNv7JA.js → vbnet-CIINH4_H.js} +1 -1
  336. package/dist/{velocity-CfvW_puR.js → velocity-DamV719W.js} +1 -1
  337. package/dist/{verilog-CdexlNsQ.js → verilog-D3-q39p6.js} +1 -1
  338. package/dist/{vhdl-DySAauQR.js → vhdl-DADT_sb4.js} +1 -1
  339. package/dist/{vim-BS2kEc2C.js → vim-CpnSv6BY.js} +1 -1
  340. package/dist/{visual-basic-CEpLNNJl.js → visual-basic-BvbVpzfn.js} +1 -1
  341. package/dist/{warpscript-ByJ4S8Av.js → warpscript-Cb7wms7m.js} +1 -1
  342. package/dist/{wasm-CUJWh_iS.js → wasm-Co43wBb3.js} +1 -1
  343. package/dist/{web-idl-D8cyxiGY.js → web-idl-CBZR4wvg.js} +1 -1
  344. package/dist/{wiki-BlZ3iWQV.js → wiki-9cChrwrT.js} +1 -1
  345. package/dist/{wolfram-dL66kdZb.js → wolfram-DfMWuNtc.js} +1 -1
  346. package/dist/{wren-Dhbo6G_f.js → wren-C_HPexL-.js} +1 -1
  347. package/dist/{xeora-ANxX-fz4.js → xeora-DIY6JfnM.js} +1 -1
  348. package/dist/{xml-doc-iGF_UzWF.js → xml-doc-BJv4o8mL.js} +1 -1
  349. package/dist/{xojo-1doHCbEE.js → xojo-fl7bKKLX.js} +1 -1
  350. package/dist/{xquery-DyQqKWCI.js → xquery-BdGO7X0x.js} +1 -1
  351. package/dist/{yaml-D2bLfk93.js → yaml-BK2f_eRC.js} +1 -1
  352. package/dist/{yang-B_5hkDxG.js → yang-BRIPwcT0.js} +1 -1
  353. package/dist/{zig-B0MwwVjC.js → zig-YHQJV1Jx.js} +1 -1
  354. package/package.json +2 -2
  355. package/dist/exportPreviewToDocx-DUGQxvzp.js +0 -11
  356. package/dist/index-DcbNiowT.js +0 -1
@@ -1 +1 @@
1
- import{jsx as a,jsxs as e}from"react/jsx-runtime";import{c5 as N,c6 as u,cc as v,c7 as w,bZ as $,dB as d,dC as k}from"./runtime-CmCxTPcG.js";function A(l,c,x){const o=l.find(n=>n.attachmentPoint+n.limit===c)??null,h=l.find(n=>n.attachmentPoint===x)??null;return{layerBelow:o,layerAbove:h}}function g(l,c){return l.carrier||l.layerName||c}function B({open:l,onClose:c,analysis:x,overlapZones:o,layers:h}){const n=x.gaps.length>0,b=o.length>0;return a(N,{open:l,onOpenChange:t=>{t||c()},children:e(u,{style:{width:"min(640px, 95vw)",maxWidth:"min(640px, 95vw)",maxHeight:"85vh",display:"flex",flexDirection:"column",padding:0,borderRadius:12},children:[a(v,{className:"border-b border-border-primary pl-5 pr-3 py-5",children:a(w,{className:"text-[20px] font-semibold leading-[30px] text-primary-text",children:"Tower Alert"})}),e("div",{className:"flex flex-col gap-4 overflow-y-auto p-5",children:[!n&&!b&&a("p",{className:"text-sm text-secondary-text leading-5",children:"No coverage issues detected."}),n&&e("div",{className:"rounded-lg border border-[#fecdca] bg-[#fef3f2] dark:border-red01/40 dark:bg-red01/15",children:[e("div",{className:"flex items-center gap-2 px-4 py-3",children:[a($,{className:"h-5 w-5 text-[#dc2626] dark:text-red02"}),a("span",{className:"text-[16px] font-semibold leading-6 text-primary-text",children:"Uninsured Gap"})]}),a("div",{className:"flex flex-col rounded-lg bg-white dark:bg-neutral-900",children:x.gaps.map((t,i)=>{const{layerBelow:m,layerAbove:p}=A(h,t.start,t.end),r=d(t.start),s=d(t.end),f=m&&p?`No coverage detected between ${r} - ${s}. ${g(m,"the layer below")} exhausted at ${r}, but ${g(p,"the layer above")} does not attach until ${s}.`:`No coverage detected between ${r} - ${s}.`;return a("div",{className:i===0?"flex items-center p-4":"flex items-center p-4 border-t border-border-primary",children:e("div",{className:"flex flex-col gap-2",children:[e("span",{className:"text-[14px] font-semibold leading-5 text-primary-text",children:["Gap: ",r," - ",s]}),a("span",{className:"text-sm text-secondary-text leading-5",children:f})]})},`gap-${i}`)})})]}),b&&e("div",{className:"rounded-lg border border-[#ffca66] bg-[#fff9f5] dark:border-yellow-700 dark:bg-yellow-900/15",children:[e("div",{className:"flex items-center gap-2 px-4 py-3",children:[a(k,{className:"h-5 w-5 text-[#d97706] dark:text-yellow-400"}),e("span",{className:"text-[16px] font-semibold leading-6 text-primary-text",children:["Coverage overlap (",o.length,")"]})]}),a("div",{className:"flex flex-col gap-4 rounded-lg bg-white p-4 dark:bg-neutral-900",children:o.map((t,i)=>{const m=d(t.start),p=d(t.end);return e("div",{className:i===0?"flex flex-col gap-2":"flex flex-col gap-2 border-t border-border-primary pt-4",children:[e("span",{className:"text-[14px] font-semibold leading-5 text-primary-text",children:["Overlap: ",m," - ",p]}),t.layers.length===0?e("span",{className:"text-sm text-secondary-text leading-5",children:["Overlap detected between ",m," and ",p,"."]}):a("ul",{className:"flex flex-col gap-1",children:t.layers.map((r,s)=>{const f=d(r.attachmentPoint),y=d(r.attachmentPoint+r.limit);return e("li",{className:"flex items-baseline justify-between gap-3 text-sm leading-5",children:[e("span",{className:"text-primary-text break-words min-w-0",children:[a("span",{className:"font-semibold",children:g(r,`Layer ${s+1}`)}),e("span",{className:"text-secondary-text",children:[" (",f," - ",y,")"]})]}),e("span",{className:"text-secondary-text whitespace-nowrap shrink-0",children:["Limit: ",d(r.limit)]})]},`zone-${i}-layer-${s}`)})})]},`zone-${i}`)})})]})]})]})})}export{B as TowerAlertModal};
1
+ import{jsx as a,jsxs as e}from"react/jsx-runtime";import{c5 as N,c6 as u,cc as v,c7 as w,bZ as $,dB as d,dC as k}from"./runtime-Ci9GR285.js";function A(l,c,x){const o=l.find(n=>n.attachmentPoint+n.limit===c)??null,h=l.find(n=>n.attachmentPoint===x)??null;return{layerBelow:o,layerAbove:h}}function g(l,c){return l.carrier||l.layerName||c}function B({open:l,onClose:c,analysis:x,overlapZones:o,layers:h}){const n=x.gaps.length>0,b=o.length>0;return a(N,{open:l,onOpenChange:t=>{t||c()},children:e(u,{style:{width:"min(640px, 95vw)",maxWidth:"min(640px, 95vw)",maxHeight:"85vh",display:"flex",flexDirection:"column",padding:0,borderRadius:12},children:[a(v,{className:"border-b border-border-primary pl-5 pr-3 py-5",children:a(w,{className:"text-[20px] font-semibold leading-[30px] text-primary-text",children:"Tower Alert"})}),e("div",{className:"flex flex-col gap-4 overflow-y-auto p-5",children:[!n&&!b&&a("p",{className:"text-sm text-secondary-text leading-5",children:"No coverage issues detected."}),n&&e("div",{className:"rounded-lg border border-[#fecdca] bg-[#fef3f2] dark:border-red01/40 dark:bg-red01/15",children:[e("div",{className:"flex items-center gap-2 px-4 py-3",children:[a($,{className:"h-5 w-5 text-[#dc2626] dark:text-red02"}),a("span",{className:"text-[16px] font-semibold leading-6 text-primary-text",children:"Uninsured Gap"})]}),a("div",{className:"flex flex-col rounded-lg bg-white dark:bg-neutral-900",children:x.gaps.map((t,i)=>{const{layerBelow:m,layerAbove:p}=A(h,t.start,t.end),r=d(t.start),s=d(t.end),f=m&&p?`No coverage detected between ${r} - ${s}. ${g(m,"the layer below")} exhausted at ${r}, but ${g(p,"the layer above")} does not attach until ${s}.`:`No coverage detected between ${r} - ${s}.`;return a("div",{className:i===0?"flex items-center p-4":"flex items-center p-4 border-t border-border-primary",children:e("div",{className:"flex flex-col gap-2",children:[e("span",{className:"text-[14px] font-semibold leading-5 text-primary-text",children:["Gap: ",r," - ",s]}),a("span",{className:"text-sm text-secondary-text leading-5",children:f})]})},`gap-${i}`)})})]}),b&&e("div",{className:"rounded-lg border border-[#ffca66] bg-[#fff9f5] dark:border-yellow-700 dark:bg-yellow-900/15",children:[e("div",{className:"flex items-center gap-2 px-4 py-3",children:[a(k,{className:"h-5 w-5 text-[#d97706] dark:text-yellow-400"}),e("span",{className:"text-[16px] font-semibold leading-6 text-primary-text",children:["Coverage overlap (",o.length,")"]})]}),a("div",{className:"flex flex-col gap-4 rounded-lg bg-white p-4 dark:bg-neutral-900",children:o.map((t,i)=>{const m=d(t.start),p=d(t.end);return e("div",{className:i===0?"flex flex-col gap-2":"flex flex-col gap-2 border-t border-border-primary pt-4",children:[e("span",{className:"text-[14px] font-semibold leading-5 text-primary-text",children:["Overlap: ",m," - ",p]}),t.layers.length===0?e("span",{className:"text-sm text-secondary-text leading-5",children:["Overlap detected between ",m," and ",p,"."]}):a("ul",{className:"flex flex-col gap-1",children:t.layers.map((r,s)=>{const f=d(r.attachmentPoint),y=d(r.attachmentPoint+r.limit);return e("li",{className:"flex items-baseline justify-between gap-3 text-sm leading-5",children:[e("span",{className:"text-primary-text break-words min-w-0",children:[a("span",{className:"font-semibold",children:g(r,`Layer ${s+1}`)}),e("span",{className:"text-secondary-text",children:[" (",f," - ",y,")"]})]}),e("span",{className:"text-secondary-text whitespace-nowrap shrink-0",children:["Limit: ",d(r.limit)]})]},`zone-${i}-layer-${s}`)})})]},`zone-${i}`)})})]})]})]})})}export{B as TowerAlertModal};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as a}from"react/jsx-runtime";import p from"react";import{c5 as x,c6 as h,cc as y,c7 as w,dB as l}from"./runtime-CmCxTPcG.js";function u(r){return r==="excess-follow-form"?"Excess Follow-Form":r}function g(r){const s=r.attachmentPoint+r.limit;return`${l(r.attachmentPoint)} - ${l(s)}`}function f({open:r,onClose:s,layers:n}){const m=p.useMemo(()=>[...n].sort((t,i)=>t.attachmentPoint-i.attachmentPoint),[n]),o=m.reduce((t,i)=>t+i.limit,0),d=m.some(t=>t.premium!=null),c=m.reduce((t,i)=>t+(i.premium??0),0);return e(x,{open:r,onOpenChange:t=>{t||s()},children:a(h,{style:{width:"min(840px, 95vw)",maxWidth:"min(840px, 95vw)",maxHeight:"85vh",display:"flex",flexDirection:"column",padding:0},children:[e(y,{className:"border-b border-border-primary px-5 py-5",children:e(w,{className:"text-[20px] font-semibold leading-[30px] text-primary-text",children:"Tower Summary"})}),e("div",{className:"flex flex-col gap-5 overflow-y-auto p-5",children:e("div",{className:"overflow-hidden rounded-xl border border-border-primary",children:a("table",{className:"w-full border-collapse text-sm",style:{tableLayout:"fixed"},children:[a("colgroup",{children:[e("col",{style:{width:"auto"}}),e("col",{style:{width:130}}),e("col",{style:{width:90}}),e("col",{style:{width:110}})]}),e("thead",{children:a("tr",{className:"bg-neutral08 text-left",children:[e("th",{className:"px-3 py-3 text-sm font-medium leading-[18px] text-primary-text",children:"Carrier & Layer"}),e("th",{className:"px-3 py-3 text-sm font-medium leading-[18px] text-primary-text text-right whitespace-nowrap",children:"Coverage Range"}),e("th",{className:"px-3 py-3 text-sm font-medium leading-[18px] text-primary-text text-right whitespace-nowrap",children:"Limit"}),e("th",{className:"px-3 py-3 text-sm font-medium leading-[18px] text-primary-text text-right whitespace-nowrap",children:"Premium"})]})}),a("tbody",{children:[m.map((t,i)=>a("tr",{className:"border-t border-border-primary align-middle",children:[e("td",{className:"px-3 py-3",children:a("div",{className:"flex flex-col gap-0.5 min-w-0",children:[e("span",{className:"text-sm font-semibold leading-5 text-primary-text break-words",children:t.carrier||t.layerName||"Unknown carrier"}),e("span",{className:"text-sm leading-5 text-secondary-text break-words",children:[u(t.coverageType),t.layerName].filter(Boolean).join(" \xB7 ")})]})}),e("td",{className:"px-3 py-3 text-sm text-primary-text text-right whitespace-nowrap",children:g(t)}),e("td",{className:"px-3 py-3 text-sm text-primary-text text-right whitespace-nowrap",children:l(t.limit)}),e("td",{className:"px-3 py-3 text-sm text-primary-text text-right whitespace-nowrap",children:t.premium!=null?l(t.premium):"\u2014"})]},`${t.carrier}-${t.layerName}-${i}`)),a("tr",{className:"border-t border-border-primary bg-neutral07",children:[e("td",{className:"px-3 py-3 text-sm font-semibold leading-5 text-primary-text",children:"Total"}),e("td",{className:"px-3 py-3"}),e("td",{className:"px-3 py-3 text-sm font-semibold leading-5 text-primary-text text-right whitespace-nowrap",children:l(o)}),e("td",{className:"px-3 py-3 text-sm font-semibold leading-5 text-primary-text text-right whitespace-nowrap",children:d?l(c):"\u2014"})]})]})]})})})]})})}export{f as TowerSummaryModal};
1
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import p from"react";import{c5 as x,c6 as h,cc as y,c7 as w,dB as l}from"./runtime-Ci9GR285.js";function u(r){return r==="excess-follow-form"?"Excess Follow-Form":r}function g(r){const s=r.attachmentPoint+r.limit;return`${l(r.attachmentPoint)} - ${l(s)}`}function f({open:r,onClose:s,layers:n}){const m=p.useMemo(()=>[...n].sort((t,i)=>t.attachmentPoint-i.attachmentPoint),[n]),o=m.reduce((t,i)=>t+i.limit,0),d=m.some(t=>t.premium!=null),c=m.reduce((t,i)=>t+(i.premium??0),0);return e(x,{open:r,onOpenChange:t=>{t||s()},children:a(h,{style:{width:"min(840px, 95vw)",maxWidth:"min(840px, 95vw)",maxHeight:"85vh",display:"flex",flexDirection:"column",padding:0},children:[e(y,{className:"border-b border-border-primary px-5 py-5",children:e(w,{className:"text-[20px] font-semibold leading-[30px] text-primary-text",children:"Tower Summary"})}),e("div",{className:"flex flex-col gap-5 overflow-y-auto p-5",children:e("div",{className:"overflow-hidden rounded-xl border border-border-primary",children:a("table",{className:"w-full border-collapse text-sm",style:{tableLayout:"fixed"},children:[a("colgroup",{children:[e("col",{style:{width:"auto"}}),e("col",{style:{width:130}}),e("col",{style:{width:90}}),e("col",{style:{width:110}})]}),e("thead",{children:a("tr",{className:"bg-neutral08 text-left",children:[e("th",{className:"px-3 py-3 text-sm font-medium leading-[18px] text-primary-text",children:"Carrier & Layer"}),e("th",{className:"px-3 py-3 text-sm font-medium leading-[18px] text-primary-text text-right whitespace-nowrap",children:"Coverage Range"}),e("th",{className:"px-3 py-3 text-sm font-medium leading-[18px] text-primary-text text-right whitespace-nowrap",children:"Limit"}),e("th",{className:"px-3 py-3 text-sm font-medium leading-[18px] text-primary-text text-right whitespace-nowrap",children:"Premium"})]})}),a("tbody",{children:[m.map((t,i)=>a("tr",{className:"border-t border-border-primary align-middle",children:[e("td",{className:"px-3 py-3",children:a("div",{className:"flex flex-col gap-0.5 min-w-0",children:[e("span",{className:"text-sm font-semibold leading-5 text-primary-text break-words",children:t.carrier||t.layerName||"Unknown carrier"}),e("span",{className:"text-sm leading-5 text-secondary-text break-words",children:[u(t.coverageType),t.layerName].filter(Boolean).join(" \xB7 ")})]})}),e("td",{className:"px-3 py-3 text-sm text-primary-text text-right whitespace-nowrap",children:g(t)}),e("td",{className:"px-3 py-3 text-sm text-primary-text text-right whitespace-nowrap",children:l(t.limit)}),e("td",{className:"px-3 py-3 text-sm text-primary-text text-right whitespace-nowrap",children:t.premium!=null?l(t.premium):"\u2014"})]},`${t.carrier}-${t.layerName}-${i}`)),a("tr",{className:"border-t border-border-primary bg-neutral07",children:[e("td",{className:"px-3 py-3 text-sm font-semibold leading-5 text-primary-text",children:"Total"}),e("td",{className:"px-3 py-3"}),e("td",{className:"px-3 py-3 text-sm font-semibold leading-5 text-primary-text text-right whitespace-nowrap",children:l(o)}),e("td",{className:"px-3 py-3 text-sm font-semibold leading-5 text-primary-text text-right whitespace-nowrap",children:d?l(c):"\u2014"})]})]})]})})})]})})}export{f as TowerSummaryModal};
@@ -1 +1 @@
1
- import{jsx as t,jsxs as h,Fragment as K}from"react/jsx-runtime";import se,{useState as w,useMemo as D,useCallback as b,useRef as oe,useEffect as R}from"react";import{bx as X,bS as me,bT as ce,bU as pe,cd as Q,bW as ue,j as P,eD as he,d4 as fe,eE as ve,eF as xe,bG as V,eG as W,eH as Y,eI as ge,bC as Z,bR as ye,bH as k,eJ as B,eK as Ne,eL as ee,eM as we,c5 as be,c6 as Ce,cc as Te,c7 as Se,aB as te,dD as Ae,eN as De}from"./runtime-CmCxTPcG.js";import"react-dom";import"react-dom/client";const Ie=({value:e,onChange:a,disabled:l=!1,ariaLabel:m,placeholder:o="Folder name",containerClassName:c="w-64",testId:r})=>{const i=e.trim().length===0?"Name is required":X(e),u=i!==null;return t("div",{className:P(c),children:t(me,{children:h(ce,{open:u||void 0,children:[t(pe,{asChild:!0,children:t(Q,{size:"sm",variant:"outlined",value:e,disabled:l,placeholder:o,"aria-label":m,"aria-invalid":u||void 0,error:u,"data-testid":r,onChange:s=>a(s.target.value)})}),u&&t(ue,{side:"right",align:"center",className:"bg-error text-white","data-testid":r?`${r}-error`:void 0,children:i})]})})})},$e=e=>e.trim().length===0?!1:X(e)===null,j=200;let ae=0;const le=()=>(ae+=1,`local-${Date.now()}-${ae}`),ke=e=>e.startsWith("local-"),U=e=>e.reduce((a,l)=>a+1+U(l.children),0),je=(e,a,l)=>{const m=o=>o.map(c=>c.id===a?{...c,name:l}:{...c,children:m(c.children)});return m(e)},Fe=(e,a)=>{const l=m=>m.filter(o=>o.id!==a).map(o=>({...o,children:l(o.children)}));return l(e)},ze=e=>e.slice().sort((a,l)=>a.name.localeCompare(l.name)),Ee=e=>{const a=new Set,l=m=>{const o=new Map;for(const c of m){const r=c.name.trim().toLowerCase();if(!r)continue;const i=o.get(r)??[];i.push(c.id),o.set(r,i)}for(const c of o.values())c.length>1&&c.forEach(r=>a.add(r));for(const c of m)l(c.children)};return l(e),a},M=e=>e.map(a=>({...ke(a.id)?{}:{id:a.id},name:a.name,children:M(a.children)})),ne=e=>e.map(a=>({id:a.id,name:a.name,children:ne(a.children)})),ie=(e,a)=>U(e)+1>j?`Templates are limited to ${j} folders.`:null,Le=16,Re=8,Me=({node:e,depth:a,expanded:l,onToggleExpand:m,onAddChild:o,onRename:c,onDelete:r})=>{const i=l.has(e.id),u=e.children.length>0;return t("div",{style:{paddingLeft:Math.min(a,Re)*Le},"data-testid":`template-tree-node-${e.id}`,children:h(he,{open:i,onOpenChange:()=>m(e.id),children:[h("div",{className:"flex items-start gap-2 py-1 group",children:[t("span",{className:"text-neutral03 mt-2",children:t(fe,{size:18,className:"text-neutral02 shrink-0"})}),t(ve,{asChild:!0,children:t("button",{type:"button","aria-label":i?"Collapse":"Expand",className:P("text-neutral03 hover:text-neutral01 transition-transform mt-2",!u&&"invisible",i?"rotate-0":"-rotate-90"),"data-testid":`template-tree-toggle-${e.id}`,children:t(xe,{className:"w-4 h-4"})})}),t(Ie,{value:e.name,onChange:s=>c(e.id,s),ariaLabel:`Folder name: ${e.name}`,testId:`template-tree-name-${e.id}`,containerClassName:"w-64"}),h("div",{className:"ml-auto flex items-center gap-1 mt-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100",children:[t(V,{variant:"ghost",size:"sm",tooltip:"Add folder","aria-label":"Add folder",onClick:()=>o(e.id),"data-testid":`template-tree-add-child-${e.id}`,className:"text-neutral03 hover:text-neutral01",children:t(W,{size:16})}),t(V,{variant:"ghost",size:"sm",tooltip:"Delete folder","aria-label":"Delete folder",onClick:()=>r(e.id),"data-testid":`template-tree-delete-${e.id}`,className:"hover:text-red01/70 text-red01",children:t(Y,{size:16})})]})]}),u&&t(ge,{children:t(de,{nodes:e.children,depth:a+1,expanded:l,onToggleExpand:m,onAddChild:o,onRename:c,onDelete:r})})]})})},de=({nodes:e,depth:a,expanded:l,onToggleExpand:m,onAddChild:o,onRename:c,onDelete:r})=>t(K,{children:ze(e).map(i=>t(Me,{node:i,depth:a,expanded:l,onToggleExpand:m,onAddChild:o,onRename:c,onDelete:r},i.id))}),O=e=>e.flatMap(a=>[a.id,...O(a.children)]),Oe=({templateId:e,initialName:a,initialNodes:l,existingTemplateNames:m,isSaving:o,onSave:c})=>{const{toast:r}=Z(),[i,u]=w(a),[s,x]=w(l),[_,C]=w(()=>new Set(O(l)));se.useEffect(()=>{u(a),x(l),C(new Set(O(l)))},[e,a,l]);const S=D(()=>U(s),[s]),I=D(()=>{const d=f=>f.some(p=>!$e(p.name)||d(p.children));return d(s)},[s]),y=D(()=>Ee(s),[s]).size>0,A=D(()=>{const d=i.trim().toLowerCase();return d?m.some(f=>f.trim().toLowerCase()===d):!1},[i,m]),F=D(()=>JSON.stringify({name:a,nodes:M(l)}),[e,a,l]),T=D(()=>JSON.stringify({name:i,nodes:M(s)}),[i,s])!==F,z=b(()=>{const d=ie(s);if(d){r({title:"Cannot add folder",description:d,variant:"destructive"});return}const f=le();x(p=>[...p,{id:f,name:"New folder",children:[]}])},[s,r]),G=b(d=>{const f=ie(s);if(f){r({title:"Cannot add folder",description:f,variant:"destructive"});return}const p=le(),$=N=>N.map(g=>g.id===d?{...g,children:[...g.children,{id:p,name:"New folder",children:[]}]}:{...g,children:$(g.children)});x(N=>$(N)),C(N=>new Set([...N,d,p]))},[s,r]),J=b((d,f)=>{x(p=>je(p,d,f))},[]),q=b(d=>{x(f=>Fe(f,d))},[]),H=b(d=>{C(f=>{const p=new Set(f);return p.has(d)?p.delete(d):p.add(d),p})},[]),n=b(()=>{u(a),x(l),C(new Set(O(l)))},[a,l]),v=async()=>{if(!i.trim()){r({title:"Name required",description:"Give the template a name before saving.",variant:"destructive"});return}if(S===0){r({title:"Template is empty",description:"Add at least one folder before saving the template.",variant:"destructive"});return}if(S>j){r({title:"Too many folders",description:`Templates are limited to ${j} folders.`,variant:"destructive"});return}if(I){r({title:"Fix folder names",description:"One or more folder names are empty or contain unsupported characters.",variant:"destructive"});return}if(A){r({title:"Name already in use",description:`A template named "${i.trim()}" already exists. Choose a different name.`,variant:"destructive"});return}if(y){r({title:"Duplicate folder names",description:"Folders under the same parent must have different names \u2014 they would merge into one folder at apply time.",variant:"destructive"});return}await c({templateId:e,name:i.trim(),nodes:M(s)})};return h("div",{className:"flex flex-col h-full","data-testid":"template-tree-editor",children:[t("div",{className:"flex items-start justify-between gap-4",children:t("div",{className:"flex flex-col gap-3 flex-1 min-w-0",children:h("div",{className:"flex flex-col gap-2",children:[t(ye,{htmlFor:"template-name",children:"Template Name"}),t(Q,{id:"template-name",value:i,onChange:d=>u(d.target.value),placeholder:"e.g. Standard Client",error:A,"data-testid":"template-name-input"}),A&&h("p",{className:"text-xs text-red01","data-testid":"template-name-duplicate-error",children:['A template named "',i.trim(),'" already exists. Choose a different name.']})]})})}),t("div",{className:"flex-1 overflow-y-auto py-4",children:s.length===0?t("div",{className:"flex flex-col items-center justify-center gap-3 h-full text-neutral03","data-testid":"template-tree-empty-state",children:t(k,{variant:"outline",leftIcon:t(B,{className:"w-4 h-4"}),onClick:z,"data-testid":"template-add-first-root",children:"Add top-level folder"})}):h(K,{children:[t(de,{nodes:s,depth:0,expanded:_,onToggleExpand:H,onAddChild:G,onRename:J,onDelete:q}),t("div",{className:"pt-2",children:t(k,{variant:"ghost",size:"sm",leftIcon:t(B,{className:"w-4 h-4"}),onClick:z,disabled:S>=j,"data-testid":"template-add-root",children:"Add top-level folder"})})]})}),h("div",{className:"flex items-center justify-between gap-4 pt-3 border-t border-neutral06",children:[h("div",{className:"flex flex-col gap-0.5",children:[h("div",{className:"text-sm text-neutral03","data-testid":"template-tree-counter",children:[S," / ",j," folders"]}),y&&t("div",{className:"text-xs text-red01","data-testid":"template-tree-duplicate-warning",children:"Folders under the same parent must have different names."})]}),h("div",{className:"flex items-center gap-2",children:[t(k,{variant:"outline",size:"sm",onClick:n,disabled:o||!T,"data-testid":"template-reset",children:"Reset"}),t(k,{variant:"primary",size:"sm",onClick:v,isLoading:o,disabled:o||!i.trim()||S===0||I||A||y||!T,"data-testid":"template-save",children:"Save"})]})]})]})},L="__new__",_e=()=>({templateId:null,name:"",nodes:[]}),re=e=>({templateId:e.id,name:e.name,nodes:ne(e.nodes??[])});function Ge({isOpen:e,onClose:a}){const{toast:l}=Z(),[m,o]=w([]),[c,r]=w(!1),[i,u]=w(null),[s,x]=w(null),[_,C]=w(!1),[S,I]=w(!1),[y,A]=w(null),F=oe(l);R(()=>{F.current=l},[l]);const T=b(async()=>{r(!0);try{const n=await Ne();n.statusCode>=200&&n.statusCode<300&&Array.isArray(n.data)?o(n.data):F.current({title:"Failed to load templates",description:"Try refreshing the page.",variant:"destructive"})}finally{r(!1)}},[]);R(()=>{if(!e){o([]),u(null),x(null),C(!1),I(!1);return}T()},[e,T]),R(()=>{if(!e)return;const n=m[0];i||!n||u(n.id)},[e,m,i]),R(()=>{if(!e)return;if(!i){x(null);return}if(i===L){x(_e());return}let n=!1;return x(null),C(!0),ee(i).then(v=>{n||(v.statusCode>=200&&v.statusCode<300&&v.data?x(re(v.data)):(u(null),F.current({title:"Failed to load template",description:"Try selecting it again.",variant:"destructive"})))}).finally(()=>{n||C(!1)}),()=>{n=!0}},[e,i]);const z=()=>u(L),G=b((n,v)=>{A({id:n,name:v})},[]),J=b(async()=>{if(!y)return;const{id:n}=y,v=await we(n);v.statusCode>=200&&v.statusCode<300?(l({title:"Template deleted",description:"",variant:"success"}),i===n&&u(null),await T()):l({title:"Failed to delete template",description:"Try again in a moment.",variant:"destructive"})},[y,T,i,l]),q=async n=>{var v;I(!0);try{const d=await De({templateId:n.templateId,name:n.name,nodes:n.nodes}),f=typeof d.data=="string"?d.data:(v=d.data)==null?void 0:v.id;if(d.statusCode>=200&&d.statusCode<300&&f){l({title:"Template saved",description:"",variant:"success"});const p=await ee(f);p.statusCode>=200&&p.statusCode<300&&p.data&&x(re(p.data)),u(f),await T()}else{const p=(d==null?void 0:d.data)??null,$=(p==null?void 0:p.message)??"",N=$.toLowerCase();let g="Failed to save template",E=$||"Try again in a moment.";N.includes("already exists")?(g="Name already in use",E=`A template named "${n.name}" already exists. Choose a different name.`):N.includes("exactly one top-level folder")?(g="Too many top-level folders",E="A template can only have one top-level folder. Nest everything under it."):N.includes("must contain at least one folder")?(g="Template is empty",E="Add at least one folder before saving the template."):N.includes("exceeds maximum of")&&(g="Template too large",E=$),l({title:g,description:E,variant:"destructive"})}}finally{I(!1)}},H=D(()=>(s==null?void 0:s.templateId)??L,[s]);return h(be,{open:e,onOpenChange:n=>{n||a()},children:[h(Ce,{className:"!w-full md:!w-[1024px] max-w-[95vw] h-[95dvh] md:h-[80vh] p-0 gap-0 overflow-hidden flex flex-col","data-testid":"vault-settings-dialog",children:[t(Te,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-neutral06 shrink-0 pr-12",children:t(Se,{className:"text-lg font-semibold",children:"Folder Templates"})}),h("div",{className:"flex flex-col md:flex-row flex-1 min-h-0",children:[h("aside",{className:"md:w-[240px] border-b md:border-b-0 md:border-r border-neutral06 bg-neutral08 flex flex-col shrink-0","data-testid":"vault-settings-templates-rail",children:[t("div",{className:"px-3 py-3 border-b border-neutral06",children:t(k,{size:"sm",variant:"outline",leftIcon:t(W,{className:"w-4 h-4"}),onClick:z,"data-testid":"folder-templates-new",className:"w-full justify-center",children:"New Template"})}),t("div",{className:"flex-1 overflow-y-auto px-2 py-2 flex flex-col gap-1",children:c?t("div",{className:"flex items-center justify-center py-8",children:t(te,{size:8})}):m.length===0&&i!==L?t("div",{className:"text-xs text-neutral03 px-2 py-4",children:"No templates yet. Create one to get started."}):h(K,{children:[i===L&&t("div",{className:"flex items-center justify-between gap-2 px-3 py-2 rounded-md text-sm bg-purple05 text-primary02 font-medium","data-testid":"folder-templates-row-new",children:t("span",{className:"truncate",children:"New Template"})}),m.map(n=>h("div",{className:P("group flex items-center justify-between gap-2 px-3 py-2 rounded-md text-sm cursor-pointer",i===n.id?"bg-purple05 text-primary02 font-medium":"hover:bg-neutral07 text-neutral01"),onClick:()=>u(n.id),"data-testid":`folder-templates-row-${n.id}`,children:[t("span",{className:"truncate min-w-0",children:n.name}),t(V,{variant:"ghost",size:"sm",tooltip:"Delete template","aria-label":"Delete template",onClick:v=>{v.stopPropagation(),G(n.id,n.name)},className:"opacity-0 group-hover:opacity-100 focus-within:opacity-100 hover:text-red01/70 text-red01","data-testid":`folder-templates-row-delete-${n.id}`,children:t(Y,{size:16})})]},n.id))]})})]}),t("main",{className:"flex-1 min-h-0 flex flex-col px-4 py-4 md:px-6 overflow-y-auto","data-testid":"vault-settings-editor",children:i?_||!s?t("div",{className:"flex items-center justify-center h-full",children:t(te,{size:10})}):t(Oe,{templateId:s.templateId,initialName:s.name,initialNodes:s.nodes,existingTemplateNames:m.filter(n=>n.id!==s.templateId).map(n=>n.name),isSaving:S,onSave:q},H):h("div",{className:"flex flex-col items-center justify-center h-full gap-3 text-neutral03",children:[t(B,{className:"w-10 h-10"}),t("p",{className:"text-sm",children:"Select a template on the left or create a new one."}),t(k,{variant:"primary",leftIcon:t(W,{className:"w-4 h-4"}),onClick:z,"data-testid":"folder-templates-empty-new",children:"New Template"})]})})]})]}),t(Ae,{isOpen:y!==null,onClose:()=>A(null),onConfirm:J,title:"Delete template",description:`Delete "${(y==null?void 0:y.name)??""}"? This cannot be undone.`,confirmText:"Delete"})]})}export{Ge as VaultSettingsDialog};
1
+ import{jsx as t,jsxs as h,Fragment as K}from"react/jsx-runtime";import se,{useState as w,useMemo as D,useCallback as b,useRef as oe,useEffect as R}from"react";import{bx as X,bS as me,bT as ce,bU as pe,cd as Q,bW as ue,j as P,eD as he,d4 as fe,eE as ve,eF as xe,bG as V,eG as W,eH as Y,eI as ge,bC as Z,bR as ye,bH as k,eJ as B,eK as Ne,eL as ee,eM as we,c5 as be,c6 as Ce,cc as Te,c7 as Se,aB as te,dD as Ae,eN as De}from"./runtime-Ci9GR285.js";import"react-dom";import"react-dom/client";const Ie=({value:e,onChange:a,disabled:l=!1,ariaLabel:m,placeholder:o="Folder name",containerClassName:c="w-64",testId:r})=>{const i=e.trim().length===0?"Name is required":X(e),u=i!==null;return t("div",{className:P(c),children:t(me,{children:h(ce,{open:u||void 0,children:[t(pe,{asChild:!0,children:t(Q,{size:"sm",variant:"outlined",value:e,disabled:l,placeholder:o,"aria-label":m,"aria-invalid":u||void 0,error:u,"data-testid":r,onChange:s=>a(s.target.value)})}),u&&t(ue,{side:"right",align:"center",className:"bg-error text-white","data-testid":r?`${r}-error`:void 0,children:i})]})})})},$e=e=>e.trim().length===0?!1:X(e)===null,j=200;let ae=0;const le=()=>(ae+=1,`local-${Date.now()}-${ae}`),ke=e=>e.startsWith("local-"),U=e=>e.reduce((a,l)=>a+1+U(l.children),0),je=(e,a,l)=>{const m=o=>o.map(c=>c.id===a?{...c,name:l}:{...c,children:m(c.children)});return m(e)},Fe=(e,a)=>{const l=m=>m.filter(o=>o.id!==a).map(o=>({...o,children:l(o.children)}));return l(e)},ze=e=>e.slice().sort((a,l)=>a.name.localeCompare(l.name)),Ee=e=>{const a=new Set,l=m=>{const o=new Map;for(const c of m){const r=c.name.trim().toLowerCase();if(!r)continue;const i=o.get(r)??[];i.push(c.id),o.set(r,i)}for(const c of o.values())c.length>1&&c.forEach(r=>a.add(r));for(const c of m)l(c.children)};return l(e),a},M=e=>e.map(a=>({...ke(a.id)?{}:{id:a.id},name:a.name,children:M(a.children)})),ne=e=>e.map(a=>({id:a.id,name:a.name,children:ne(a.children)})),ie=(e,a)=>U(e)+1>j?`Templates are limited to ${j} folders.`:null,Le=16,Re=8,Me=({node:e,depth:a,expanded:l,onToggleExpand:m,onAddChild:o,onRename:c,onDelete:r})=>{const i=l.has(e.id),u=e.children.length>0;return t("div",{style:{paddingLeft:Math.min(a,Re)*Le},"data-testid":`template-tree-node-${e.id}`,children:h(he,{open:i,onOpenChange:()=>m(e.id),children:[h("div",{className:"flex items-start gap-2 py-1 group",children:[t("span",{className:"text-neutral03 mt-2",children:t(fe,{size:18,className:"text-neutral02 shrink-0"})}),t(ve,{asChild:!0,children:t("button",{type:"button","aria-label":i?"Collapse":"Expand",className:P("text-neutral03 hover:text-neutral01 transition-transform mt-2",!u&&"invisible",i?"rotate-0":"-rotate-90"),"data-testid":`template-tree-toggle-${e.id}`,children:t(xe,{className:"w-4 h-4"})})}),t(Ie,{value:e.name,onChange:s=>c(e.id,s),ariaLabel:`Folder name: ${e.name}`,testId:`template-tree-name-${e.id}`,containerClassName:"w-64"}),h("div",{className:"ml-auto flex items-center gap-1 mt-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100",children:[t(V,{variant:"ghost",size:"sm",tooltip:"Add folder","aria-label":"Add folder",onClick:()=>o(e.id),"data-testid":`template-tree-add-child-${e.id}`,className:"text-neutral03 hover:text-neutral01",children:t(W,{size:16})}),t(V,{variant:"ghost",size:"sm",tooltip:"Delete folder","aria-label":"Delete folder",onClick:()=>r(e.id),"data-testid":`template-tree-delete-${e.id}`,className:"hover:text-red01/70 text-red01",children:t(Y,{size:16})})]})]}),u&&t(ge,{children:t(de,{nodes:e.children,depth:a+1,expanded:l,onToggleExpand:m,onAddChild:o,onRename:c,onDelete:r})})]})})},de=({nodes:e,depth:a,expanded:l,onToggleExpand:m,onAddChild:o,onRename:c,onDelete:r})=>t(K,{children:ze(e).map(i=>t(Me,{node:i,depth:a,expanded:l,onToggleExpand:m,onAddChild:o,onRename:c,onDelete:r},i.id))}),O=e=>e.flatMap(a=>[a.id,...O(a.children)]),Oe=({templateId:e,initialName:a,initialNodes:l,existingTemplateNames:m,isSaving:o,onSave:c})=>{const{toast:r}=Z(),[i,u]=w(a),[s,x]=w(l),[_,C]=w(()=>new Set(O(l)));se.useEffect(()=>{u(a),x(l),C(new Set(O(l)))},[e,a,l]);const S=D(()=>U(s),[s]),I=D(()=>{const d=f=>f.some(p=>!$e(p.name)||d(p.children));return d(s)},[s]),y=D(()=>Ee(s),[s]).size>0,A=D(()=>{const d=i.trim().toLowerCase();return d?m.some(f=>f.trim().toLowerCase()===d):!1},[i,m]),F=D(()=>JSON.stringify({name:a,nodes:M(l)}),[e,a,l]),T=D(()=>JSON.stringify({name:i,nodes:M(s)}),[i,s])!==F,z=b(()=>{const d=ie(s);if(d){r({title:"Cannot add folder",description:d,variant:"destructive"});return}const f=le();x(p=>[...p,{id:f,name:"New folder",children:[]}])},[s,r]),G=b(d=>{const f=ie(s);if(f){r({title:"Cannot add folder",description:f,variant:"destructive"});return}const p=le(),$=N=>N.map(g=>g.id===d?{...g,children:[...g.children,{id:p,name:"New folder",children:[]}]}:{...g,children:$(g.children)});x(N=>$(N)),C(N=>new Set([...N,d,p]))},[s,r]),J=b((d,f)=>{x(p=>je(p,d,f))},[]),q=b(d=>{x(f=>Fe(f,d))},[]),H=b(d=>{C(f=>{const p=new Set(f);return p.has(d)?p.delete(d):p.add(d),p})},[]),n=b(()=>{u(a),x(l),C(new Set(O(l)))},[a,l]),v=async()=>{if(!i.trim()){r({title:"Name required",description:"Give the template a name before saving.",variant:"destructive"});return}if(S===0){r({title:"Template is empty",description:"Add at least one folder before saving the template.",variant:"destructive"});return}if(S>j){r({title:"Too many folders",description:`Templates are limited to ${j} folders.`,variant:"destructive"});return}if(I){r({title:"Fix folder names",description:"One or more folder names are empty or contain unsupported characters.",variant:"destructive"});return}if(A){r({title:"Name already in use",description:`A template named "${i.trim()}" already exists. Choose a different name.`,variant:"destructive"});return}if(y){r({title:"Duplicate folder names",description:"Folders under the same parent must have different names \u2014 they would merge into one folder at apply time.",variant:"destructive"});return}await c({templateId:e,name:i.trim(),nodes:M(s)})};return h("div",{className:"flex flex-col h-full","data-testid":"template-tree-editor",children:[t("div",{className:"flex items-start justify-between gap-4",children:t("div",{className:"flex flex-col gap-3 flex-1 min-w-0",children:h("div",{className:"flex flex-col gap-2",children:[t(ye,{htmlFor:"template-name",children:"Template Name"}),t(Q,{id:"template-name",value:i,onChange:d=>u(d.target.value),placeholder:"e.g. Standard Client",error:A,"data-testid":"template-name-input"}),A&&h("p",{className:"text-xs text-red01","data-testid":"template-name-duplicate-error",children:['A template named "',i.trim(),'" already exists. Choose a different name.']})]})})}),t("div",{className:"flex-1 overflow-y-auto py-4",children:s.length===0?t("div",{className:"flex flex-col items-center justify-center gap-3 h-full text-neutral03","data-testid":"template-tree-empty-state",children:t(k,{variant:"outline",leftIcon:t(B,{className:"w-4 h-4"}),onClick:z,"data-testid":"template-add-first-root",children:"Add top-level folder"})}):h(K,{children:[t(de,{nodes:s,depth:0,expanded:_,onToggleExpand:H,onAddChild:G,onRename:J,onDelete:q}),t("div",{className:"pt-2",children:t(k,{variant:"ghost",size:"sm",leftIcon:t(B,{className:"w-4 h-4"}),onClick:z,disabled:S>=j,"data-testid":"template-add-root",children:"Add top-level folder"})})]})}),h("div",{className:"flex items-center justify-between gap-4 pt-3 border-t border-neutral06",children:[h("div",{className:"flex flex-col gap-0.5",children:[h("div",{className:"text-sm text-neutral03","data-testid":"template-tree-counter",children:[S," / ",j," folders"]}),y&&t("div",{className:"text-xs text-red01","data-testid":"template-tree-duplicate-warning",children:"Folders under the same parent must have different names."})]}),h("div",{className:"flex items-center gap-2",children:[t(k,{variant:"outline",size:"sm",onClick:n,disabled:o||!T,"data-testid":"template-reset",children:"Reset"}),t(k,{variant:"primary",size:"sm",onClick:v,isLoading:o,disabled:o||!i.trim()||S===0||I||A||y||!T,"data-testid":"template-save",children:"Save"})]})]})]})},L="__new__",_e=()=>({templateId:null,name:"",nodes:[]}),re=e=>({templateId:e.id,name:e.name,nodes:ne(e.nodes??[])});function Ge({isOpen:e,onClose:a}){const{toast:l}=Z(),[m,o]=w([]),[c,r]=w(!1),[i,u]=w(null),[s,x]=w(null),[_,C]=w(!1),[S,I]=w(!1),[y,A]=w(null),F=oe(l);R(()=>{F.current=l},[l]);const T=b(async()=>{r(!0);try{const n=await Ne();n.statusCode>=200&&n.statusCode<300&&Array.isArray(n.data)?o(n.data):F.current({title:"Failed to load templates",description:"Try refreshing the page.",variant:"destructive"})}finally{r(!1)}},[]);R(()=>{if(!e){o([]),u(null),x(null),C(!1),I(!1);return}T()},[e,T]),R(()=>{if(!e)return;const n=m[0];i||!n||u(n.id)},[e,m,i]),R(()=>{if(!e)return;if(!i){x(null);return}if(i===L){x(_e());return}let n=!1;return x(null),C(!0),ee(i).then(v=>{n||(v.statusCode>=200&&v.statusCode<300&&v.data?x(re(v.data)):(u(null),F.current({title:"Failed to load template",description:"Try selecting it again.",variant:"destructive"})))}).finally(()=>{n||C(!1)}),()=>{n=!0}},[e,i]);const z=()=>u(L),G=b((n,v)=>{A({id:n,name:v})},[]),J=b(async()=>{if(!y)return;const{id:n}=y,v=await we(n);v.statusCode>=200&&v.statusCode<300?(l({title:"Template deleted",description:"",variant:"success"}),i===n&&u(null),await T()):l({title:"Failed to delete template",description:"Try again in a moment.",variant:"destructive"})},[y,T,i,l]),q=async n=>{var v;I(!0);try{const d=await De({templateId:n.templateId,name:n.name,nodes:n.nodes}),f=typeof d.data=="string"?d.data:(v=d.data)==null?void 0:v.id;if(d.statusCode>=200&&d.statusCode<300&&f){l({title:"Template saved",description:"",variant:"success"});const p=await ee(f);p.statusCode>=200&&p.statusCode<300&&p.data&&x(re(p.data)),u(f),await T()}else{const p=(d==null?void 0:d.data)??null,$=(p==null?void 0:p.message)??"",N=$.toLowerCase();let g="Failed to save template",E=$||"Try again in a moment.";N.includes("already exists")?(g="Name already in use",E=`A template named "${n.name}" already exists. Choose a different name.`):N.includes("exactly one top-level folder")?(g="Too many top-level folders",E="A template can only have one top-level folder. Nest everything under it."):N.includes("must contain at least one folder")?(g="Template is empty",E="Add at least one folder before saving the template."):N.includes("exceeds maximum of")&&(g="Template too large",E=$),l({title:g,description:E,variant:"destructive"})}}finally{I(!1)}},H=D(()=>(s==null?void 0:s.templateId)??L,[s]);return h(be,{open:e,onOpenChange:n=>{n||a()},children:[h(Ce,{className:"!w-full md:!w-[1024px] max-w-[95vw] h-[95dvh] md:h-[80vh] p-0 gap-0 overflow-hidden flex flex-col","data-testid":"vault-settings-dialog",children:[t(Te,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-neutral06 shrink-0 pr-12",children:t(Se,{className:"text-lg font-semibold",children:"Folder Templates"})}),h("div",{className:"flex flex-col md:flex-row flex-1 min-h-0",children:[h("aside",{className:"md:w-[240px] border-b md:border-b-0 md:border-r border-neutral06 bg-neutral08 flex flex-col shrink-0","data-testid":"vault-settings-templates-rail",children:[t("div",{className:"px-3 py-3 border-b border-neutral06",children:t(k,{size:"sm",variant:"outline",leftIcon:t(W,{className:"w-4 h-4"}),onClick:z,"data-testid":"folder-templates-new",className:"w-full justify-center",children:"New Template"})}),t("div",{className:"flex-1 overflow-y-auto px-2 py-2 flex flex-col gap-1",children:c?t("div",{className:"flex items-center justify-center py-8",children:t(te,{size:8})}):m.length===0&&i!==L?t("div",{className:"text-xs text-neutral03 px-2 py-4",children:"No templates yet. Create one to get started."}):h(K,{children:[i===L&&t("div",{className:"flex items-center justify-between gap-2 px-3 py-2 rounded-md text-sm bg-purple05 text-primary02 font-medium","data-testid":"folder-templates-row-new",children:t("span",{className:"truncate",children:"New Template"})}),m.map(n=>h("div",{className:P("group flex items-center justify-between gap-2 px-3 py-2 rounded-md text-sm cursor-pointer",i===n.id?"bg-purple05 text-primary02 font-medium":"hover:bg-neutral07 text-neutral01"),onClick:()=>u(n.id),"data-testid":`folder-templates-row-${n.id}`,children:[t("span",{className:"truncate min-w-0",children:n.name}),t(V,{variant:"ghost",size:"sm",tooltip:"Delete template","aria-label":"Delete template",onClick:v=>{v.stopPropagation(),G(n.id,n.name)},className:"opacity-0 group-hover:opacity-100 focus-within:opacity-100 hover:text-red01/70 text-red01","data-testid":`folder-templates-row-delete-${n.id}`,children:t(Y,{size:16})})]},n.id))]})})]}),t("main",{className:"flex-1 min-h-0 flex flex-col px-4 py-4 md:px-6 overflow-y-auto","data-testid":"vault-settings-editor",children:i?_||!s?t("div",{className:"flex items-center justify-center h-full",children:t(te,{size:10})}):t(Oe,{templateId:s.templateId,initialName:s.name,initialNodes:s.nodes,existingTemplateNames:m.filter(n=>n.id!==s.templateId).map(n=>n.name),isSaving:S,onSave:q},H):h("div",{className:"flex flex-col items-center justify-center h-full gap-3 text-neutral03",children:[t(B,{className:"w-10 h-10"}),t("p",{className:"text-sm",children:"Select a template on the left or create a new one."}),t(k,{variant:"primary",leftIcon:t(W,{className:"w-4 h-4"}),onClick:z,"data-testid":"folder-templates-empty-new",children:"New Template"})]})})]})]}),t(Ae,{isOpen:y!==null,onClose:()=>A(null),onConfirm:J,title:"Delete template",description:`Delete "${(y==null?void 0:y.name)??""}"? This cannot be undone.`,confirmText:"Delete"})]})}export{Ge as VaultSettingsDialog};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as a}from"react/jsx-runtime";import{c5 as c,c6 as n,cc as o,c7 as d,bR as l,ce as r,bH as m}from"./runtime-CmCxTPcG.js";const p=({isOpen:t,onOpenChange:i,assetDetails:s})=>e(c,{open:t,onOpenChange:i,children:a(n,{className:"sm:max-w-[425px]","data-testid":"view-note-dialog",children:[e(o,{children:e(d,{children:"View Note"})}),a("div",{className:"grid gap-4 py-4 px-4",children:[a("div",{className:"flex flex-col gap-2",children:[e(l,{className:"text-xs font-semibold",children:"Title"}),e("p",{className:"text-sm",children:(s==null?void 0:s.title)||"Note title"})]}),a("div",{className:"flex flex-col gap-2",children:[e(l,{className:"text-xs font-semibold",children:"Description"}),e("div",{className:"overflow-y-auto max-h-40",children:e("p",{className:"text-sm",children:(s==null?void 0:s.data)||"Note description"})})]})]}),e(r,{children:e(m,{onClick:()=>i(!1),variant:"outline","data-testid":"close-note-button",children:"Close"})})]})});export{p as ViewNoteDialog};
1
+ import{jsx as e,jsxs as a}from"react/jsx-runtime";import{c5 as c,c6 as n,cc as o,c7 as d,bR as l,ce as r,bH as m}from"./runtime-Ci9GR285.js";const p=({isOpen:t,onOpenChange:i,assetDetails:s})=>e(c,{open:t,onOpenChange:i,children:a(n,{className:"sm:max-w-[425px]","data-testid":"view-note-dialog",children:[e(o,{children:e(d,{children:"View Note"})}),a("div",{className:"grid gap-4 py-4 px-4",children:[a("div",{className:"flex flex-col gap-2",children:[e(l,{className:"text-xs font-semibold",children:"Title"}),e("p",{className:"text-sm",children:(s==null?void 0:s.title)||"Note title"})]}),a("div",{className:"flex flex-col gap-2",children:[e(l,{className:"text-xs font-semibold",children:"Description"}),e("div",{className:"overflow-y-auto max-h-40",children:e("p",{className:"text-sm",children:(s==null?void 0:s.data)||"Note description"})})]})]}),e(r,{children:e(m,{onClick:()=>i(!1),variant:"outline","data-testid":"close-note-button",children:"Close"})})]})});export{p as ViewNoteDialog};
@@ -1,4 +1,4 @@
1
- var ke=Object.defineProperty,Re=(t,e,n)=>e in t?ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,U=(t,e,n)=>Re(t,typeof e!="symbol"?e+"":e,n);import{jsx as Kt}from"react/jsx-runtime";import{dA as wt,jY as Le,jZ as Yt,j_ as Fe,j$ as _e,k0 as Vt,k1 as qt,k2 as Be,k3 as De,k4 as Zt,bE as je,cP as Me,v as ze,dh as $e,dr as Ue,cy as We,k5 as He,cl as Ge,cm as Ke,k6 as Ye}from"./runtime-CmCxTPcG.js";import S,{useRef as I,useMemo as q,useEffect as z,useState as tt,useCallback as X,isValidElement as Ct,cloneElement as Xt}from"react";import{createPortal as Ve}from"react-dom";function Jt(t){return e=>typeof e===t}var qe=Jt("function"),Ze=t=>t===null,Qt=t=>Object.prototype.toString.call(t).slice(8,-1)==="RegExp",te=t=>!Xe(t)&&!Ze(t)&&(qe(t)||typeof t=="object"),Xe=Jt("undefined");function Je(t,e,n){return sn(n,t,e)?!0:(an(n,t,e),t.constructor!==e.constructor?!1:Array.isArray(t)&&Array.isArray(e)?Qe(t,e,n):t instanceof Map&&e instanceof Map?nn(t,e,n):t instanceof Set&&e instanceof Set?on(t,e):t instanceof WeakMap||t instanceof WeakSet?!1:ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)?tn(t,e):Qt(t)&&Qt(e)?t.source===e.source&&t.flags===e.flags:t instanceof Error&&e instanceof Error?en(t,e,n):t.valueOf!==Object.prototype.valueOf?t.valueOf()===e.valueOf():t.toString!==Object.prototype.toString?t.toString()===e.toString():rn(t,e,n))}function gt(t,e,n){return t===e||Number.isNaN(t)&&Number.isNaN(e)?!0:!t||!te(t)||!e||!te(e)?!1:Je(t,e,n)}function Qe(t,e,n){const{length:r}=t;if(r!==e.length)return!1;for(let o=r;o--!==0;)if(!gt(t[o],e[o],n))return!1;return!0}function tn(t,e){if(t.byteLength!==e.byteLength)return!1;const n=new DataView(t.buffer),r=new DataView(e.buffer);let o=t.byteLength;for(;o--;)if(n.getUint8(o)!==r.getUint8(o))return!1;return!0}function en(t,e,n){return t.message===e.message&&t.name===e.name&&gt(t.cause,e.cause,n)}function nn(t,e,n){if(t.size!==e.size)return!1;for(const r of t.entries())if(!e.has(r[0]))return!1;for(const r of t.entries())if(!gt(r[1],e.get(r[0]),n))return!1;return!0}function rn(t,e,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!1;for(let o=r.length;o--!==0;)if(!Object.prototype.hasOwnProperty.call(e,r[o]))return!1;for(let o=r.length;o--!==0;){const i=r[o];if(!(i==="_owner"&&t.$$typeof)&&!gt(t[i],e[i],n))return!1}return!0}function on(t,e){if(t.size!==e.size)return!1;for(const n of t.entries())if(!e.has(n[0]))return!1;return!0}function sn(t,e,n){var r;return((r=t.get(e))==null?void 0:r.has(n))??!1}function an(t,e,n){let r=t.get(e);r||(r=new WeakSet,t.set(e,r)),r.add(n)}function At(t,e){return gt(t,e,new WeakMap)}function It(){var t;return!!(typeof window<"u"&&(t=window==null?void 0:window.document)!=null&&t.createElement)}function cn(t,...e){t&&t.removeEventListener&&t.removeEventListener(...e)}function ln(t,...e){t&&t.addEventListener&&t.addEventListener(...e)}function un(){const t=I(!0);return t.current?(t.current=!1,!0):t.current}function dn(t,e){const n=un();z(()=>{if(!n)return t()},e)}function ee(t){const e=I(void 0);return z(()=>{e.current=t}),e.current}function pn(t,e){const n=I(e);return At(e,n.current)||(n.current=e),q(t,n.current)}function fn(t){z(()=>{t()},[])}function gn(t=0){const[e,n]=tt({height:It()?window.innerHeight:0,width:It()?window.innerWidth:0}),r=I(0),o=I(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(()=>{n({width:window.innerWidth,height:window.innerHeight})},t)});return z(()=>{if(!It())return()=>{};const i=o.current;return n({height:window.innerHeight,width:window.innerWidth}),ln(window,"resize",i),()=>{cn(window,"resize",i)}},[]),e}var hn=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","URL","WeakMap","WeakSet"],yn=["bigint","boolean","null","number","string","symbol","undefined"];function ht(t){const e=Object.prototype.toString.call(t).slice(8,-1);if(/HTML\w+Element/.test(e))return"HTMLElement";if(mn(e))return e}function Q(t){return e=>ht(e)===t}function mn(t){return hn.includes(t)}function lt(t){return e=>typeof e===t}function bn(t){return yn.includes(t)}var En=["innerHTML","ownerDocument","style","attributes","nodeValue"],yt=t=>Array.isArray(t),wn=t=>ht(t)==="AsyncGeneratorFunction",Tn=Q("AsyncFunction"),Sn=lt("bigint"),On=t=>t===!0||t===!1,vn=Q("Date"),xn=Q("Error"),it=lt("function"),Pn=Q("GeneratorFunction"),Cn=t=>typeof t=="number"&&Number.isInteger(t),Nt=Q("Map"),ne=t=>Number.isNaN(t),kt=t=>t===null,re=Q("Function"),An=Q("Promise"),In=Q("RegExp"),Rt=Q("Set"),mt=lt("string"),Nn=lt("symbol"),Lt=lt("undefined"),kn=Q("WeakMap"),Rn=Q("WeakSet"),Ft=t=>kt(t)||Lt(t),oe=t=>!Lt(t),Ln=t=>lt("number")(t)&&!ne(t),Fn=t=>mt(t)&&t.trim().length>0,_n=t=>{if(!mt(t)||t.length===0)return!1;const e=t.trim();return e.length>0&&Number.isFinite(Number(e))},Tt=t=>!Ft(t)&&(it(t)||typeof t=="object"),ie=t=>{if(ht(t)!=="Object")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})},Bn=t=>kt(t)||bn(typeof t),Dn=t=>ht(t)==="URL",se=t=>!Ft(t)&&it(t[Symbol.iterator]),jn=t=>se(t)&&it(t.next)&&it(t.throw),Mn=t=>it(t)&&/^class\s/.test(t.toString()),zn=(t,e)=>!yt(t)||!it(e)?!1:t.every(n=>e(n)),$n=t=>Tt(t)&&!ie(t)&&t.nodeType===1&&mt(t.nodeName)&&En.every(e=>e in t),Un=t=>mt(t)&&t.length===0||yt(t)&&t.length===0||Tt(t)&&!Nt(t)&&!Rt(t)&&Object.keys(t).length===0||Rt(t)&&t.size===0||Nt(t)&&t.size===0,Wn=(t,e)=>!t||!e?!1:Object.getPrototypeOf(t)===e.prototype,Hn=(t,e)=>yt(t)?t.indexOf(e)>-1:!1,Gn=(t,e,n)=>{if(!Tt(t)||!e)return!1;const r=t[e];return it(n)?n(r):oe(r)};function k(t){if(t===null)return"null";switch(typeof t){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}return yt(t)?"Array":re(t)?"Function":ht(t)||"Object"}k.array=yt,k.arrayOf=zn,k.asyncGeneratorFunction=wn,k.asyncFunction=Tn,k.bigint=Sn,k.boolean=On,k.class=Mn,k.date=vn,k.defined=oe,k.domElement=$n,k.empty=Un,k.error=xn,k.function=it,k.generator=jn,k.generatorFunction=Pn,k.instanceOf=Wn,k.integer=Cn,k.iterable=se,k.map=Nt,k.nan=ne,k.null=kt,k.nullOrUndefined=Ft,k.nonEmptyString=Fn,k.number=Ln,k.numericString=_n,k.object=Tt,k.oneOf=Hn,k.plainFunction=re,k.plainObject=ie,k.primitive=Bn,k.promise=An,k.propertyOf=Gn,k.regexp=In,k.set=Rt,k.string=mt,k.symbol=Nn,k.undefined=Lt,k.url=Dn,k.weakMap=kn,k.weakSet=Rn;var V=k;var _t,ae;function Kn(){if(ae)return _t;ae=1;var t=function(r){return Object.prototype.hasOwnProperty.call(r,"props")},e=function(r,o){return r+n(o)},n=function(r){return r===null||typeof r=="boolean"||typeof r>"u"?"":typeof r=="number"?r.toString():typeof r=="string"?r:Array.isArray(r)?r.reduce(e,""):t(r)&&Object.prototype.hasOwnProperty.call(r.props,"children")?n(r.props.children):""};return n.default=n,_t=n,_t}var Yn=Kn();const Bt=wt(Yn);var ce={exports:{}},le;function Vn(){return le||(le=1,(function(t){const e=Object.getPrototypeOf({});function n(){return function(o){return typeof o=="object"&&o!==null&&!(o instanceof RegExp)&&!(o instanceof Date)}}function r(o){function i(y){return y!=="constructor"&&y!=="prototype"&&y!=="__proto__"}function s(y){let E=0;const O=y.length,T=new Array(O);for(E;E<O;++E)T[E]=l(y[E]);return T}function c(y){const E={};if(f&&Object.getPrototypeOf(y)!==e)return f(y);const O=d(y);let T,B,L;for(T=0,B=O.length;T<B;++T)i(L=O[T])&&(E[L]=l(y[L]));return E}function a(y,E){const O=y.length,T=E.length;let B=0;const L=new Array(O+T);for(B;B<O;++B)L[B]=l(y[B]);for(B=0;B<T;++B)L[B+O]=l(E[B]);return L}const u=Object.prototype.propertyIsEnumerable;function g(y){const E=Object.keys(y),O=Object.getOwnPropertySymbols(y);for(let T=0,B=O.length;T<B;++T)u.call(y,O[T])&&E.push(O[T]);return E}const d=o!=null&&o.symbols?g:Object.keys,f=typeof(o==null?void 0:o.cloneProtoObject)=="function"?o.cloneProtoObject:void 0,p=typeof(o==null?void 0:o.isMergeableObject)=="function"?o.isMergeableObject:n(),h=(o==null?void 0:o.onlyDefinedProperties)===!0;function w(y){return typeof y!="object"||y===null}const N=o&&typeof o.mergeArray=="function"?o.mergeArray({clone:l,deepmerge:P,getKeys:d,isMergeableObject:p}):a;function l(y){return p(y)?Array.isArray(y)?s(y):c(y):y}function b(y,E){const O={},T=d(y),B=d(E);let L,$,v;for(L=0,$=T.length;L<$;++L)i(v=T[L])&&B.indexOf(v)===-1&&(O[v]=l(y[v]));for(L=0,$=B.length;L<$;++L)if(i(v=B[L]))if(v in y)T.indexOf(v)!==-1&&(f&&p(E[v])&&Object.getPrototypeOf(E[v])!==e?O[v]=f(E[v]):O[v]=P(y[v],E[v]));else{if(h&&typeof E[v]>"u")continue;O[v]=l(E[v])}return O}function P(y,E){if(h&&typeof E>"u")return l(y);const O=Array.isArray(E),T=Array.isArray(y);return w(E)?E:p(y)?O&&T?N(y,E):O!==T?l(E):b(y,E):l(E)}function R(){switch(arguments.length){case 0:return{};case 1:return l(arguments[0]);case 2:return P(arguments[0],arguments[1])}let y;for(let E=0,O=arguments.length;E<O;++E)y=P(y,arguments[E]);return y}return o!=null&&o.all?R:P}t.exports=r,t.exports.default=r,t.exports.deepmerge=r,Object.defineProperty(t.exports,"isMergeableObject",{get:n})})(ce)),ce.exports}var qn=Vn();const Zn=wt(qn);var Dt,ue;function Xn(){if(ue)return Dt;ue=1;var t=new Error("Element already at target scroll position"),e=new Error("Scroll cancelled"),n=Math.min,r=Date.now;Dt={left:o("scrollLeft"),top:o("scrollTop")};function o(c){return function(a,u,g,d){g=g||{},typeof g=="function"&&(d=g,g={}),typeof d!="function"&&(d=s);var f=r(),p=a[c],h=g.ease||i,w=isNaN(g.duration)?350:+g.duration,N=!1;return p===u?d(t,a[c]):requestAnimationFrame(b),l;function l(){N=!0}function b(P){if(N)return d(e,a[c]);var R=r(),y=n(1,(R-f)/w),E=h(y);a[c]=E*(u-p)+p,y<1?requestAnimationFrame(b):requestAnimationFrame(function(){d(null,a[c])})}}}function i(c){return .5*(1-Math.cos(Math.PI*c))}function s(){}return Dt}var Jn=Xn();const Qn=wt(Jn);var jt={exports:{}},tr=jt.exports,de;function er(){return de||(de=1,(function(t){(function(e,n){t.exports?t.exports=n():e.Scrollparent=n()})(tr,function(){function e(r){var o=getComputedStyle(r,null).getPropertyValue("overflow");return o.indexOf("scroll")>-1||o.indexOf("auto")>-1}function n(r){if(r instanceof HTMLElement||r instanceof SVGElement){for(var o=r.parentNode;o.parentNode;){if(e(o))return o;o=o.parentNode}return document.scrollingElement||document.documentElement}}return n})})(jt)),jt.exports}var nr=er();const pe=wt(nr),rr={arrowBase:32,arrowColor:"#ffffff",arrowSize:16,arrowSpacing:12,backgroundColor:"#ffffff",beaconSize:36,beaconTrigger:"click",beforeTimeout:5e3,blockTargetInteraction:!1,buttons:["back","close","primary"],closeButtonAction:"close",disableFocusTrap:!1,dismissKeyAction:"close",hideOverlay:!1,loaderDelay:300,offset:10,overlayClickAction:"close",overlayColor:"#00000080",primaryColor:"#000000",scrollDuration:300,scrollOffset:20,showProgress:!1,skipBeacon:!1,skipScroll:!1,spotlightPadding:10,spotlightRadius:4,targetWaitTimeout:1e3,textColor:"#000000",width:380,zIndex:100},or={beaconOptions:{offset:-18}},fe={back:"Back",close:"Close",last:"Last",next:"Next",nextWithProgress:"Next ({current} of {total})",open:"Open the dialog",skip:"Skip"},ir={isFixed:!1,locale:fe,placement:"bottom"},sr={continuous:!1,debug:!1,run:!1,scrollToFirstStep:!1,steps:[]},_={INIT:"init",START:"start",STOP:"stop",RESET:"reset",PREV:"prev",NEXT:"next",GO:"go",CLOSE:"close",SKIP:"skip",UPDATE:"update",COMPLETE:"complete"},H={TOUR_START:"tour:start",STEP_BEFORE_HOOK:"step:before_hook",STEP_BEFORE:"step:before",SCROLL_START:"scroll:start",SCROLL_END:"scroll:end",BEACON:"beacon",TOOLTIP:"tooltip",STEP_AFTER:"step:after",STEP_AFTER_HOOK:"step:after_hook",TOUR_END:"tour:end",TOUR_STATUS:"tour:status",TARGET_NOT_FOUND:"error:target_not_found",ERROR:"error"},m={INIT:"init",READY:"ready",BEACON_BEFORE:"beacon_before",BEACON:"beacon",TOOLTIP_BEFORE:"tooltip_before",TOOLTIP:"tooltip",COMPLETE:"complete"},et={BUTTON_BACK:"button_back",BUTTON_CLOSE:"button_close",BUTTON_PRIMARY:"button_primary",BUTTON_SKIP:"button_skip",KEYBOARD:"keyboard",OVERLAY:"overlay"},F={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished"},ar="react-joyride-portal";function cr(t){const e={};for(const n in t)t[n]!==void 0&&(e[n]=t[n]);return e}function ut(...t){return Zn({all:!0,isMergeableObject:e=>!(!V.plainObject(e)||Ct(e))})(...t)}function ge(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function nt(t,e={}){const{defaultValue:n,step:r,steps:o}=e;let i=Bt(t);if(i)(i.includes("{current}")||i.includes("{total}"))&&r&&o&&(i=i.replace("{current}",r.toString()).replace("{total}",o.toString()));else if(Ct(t)&&!Object.values(t.props).length&&ge(t.type)==="function")try{i=nt(t.type({}),e)}catch{i=Bt(n)}else i=Bt(n);return i}function G(t,e,n,...r){if(!t)return;const o=new Date,i=`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}:${String(o.getSeconds()).padStart(2,"0")}.${String(o.getMilliseconds()).padStart(3,"0")}`;console.log(`${e} %c${n}%c ${i}`,"font-weight: bold","color: gray; font-weight: normal",...r)}function lr(t,e){const n=cr(e);return{...t,...n}}function Mt(){}function ur(t){return Object.keys(t)}function St(t,...e){if(!V.plainObject(t))throw new TypeError("Expected an object");const n={};for(const r in t)({}).hasOwnProperty.call(t,r)&&(e.includes(r)||(n[r]=t[r]));return n}function he(t,...e){if(!V.plainObject(t))throw new TypeError("Expected an object");if(!e.length)return t;const n={};for(const r in t)({}).hasOwnProperty.call(t,r)&&e.includes(r)&&(n[r]=t[r]);return n}function zt(t,e,n){const r=i=>i.replace("{current}",String(e)).replace("{total}",String(n));if(ge(t)==="string")return r(t);if(!Ct(t))return t;const{children:o}=t.props;if(V.string(o)&&o.includes("{current}"))return Xt(t,{children:r(o)});if(Array.isArray(o))return Xt(t,{children:o.map(i=>typeof i=="string"?r(i):zt(i,e,n))});if(V.function(t.type)&&!Object.values(t.props).length)try{return zt(t.type({}),e,n)}catch{return t}return t}function ye(t){return ur(t).sort().reduce((e,n)=>(e[n]=t[n],e),{})}function $t(){var t;return!!(typeof window<"u"&&(t=window.document)!=null&&t.createElement)}function me(t){let e=0,n=0,r=t;for(;r;)e+=r.offsetTop,n+=r.offsetLeft,r=r.offsetParent;return{left:n,top:e}}function Ut(t){return t?t.getBoundingClientRect():null}function dr(t=!1){const{body:e,documentElement:n}=document;if(!e||!n)return 0;if(t){const r=[e.scrollHeight,e.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight].sort((i,s)=>i-s),o=Math.floor(r.length/2);return r.length%2===0?(r[o-1]+r[o])/2:r[o]}return Math.max(e.scrollHeight,e.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight)}function J(t){if(!t)return null;if(typeof t=="function")try{return t()}catch{return null}if(typeof t=="object"&&"current"in t)return t.current;if(typeof t=="string")try{return document.querySelector(t)}catch{return null}return t}function pr(t,e,n){const r=Ut(t),o=dt(t),i=o?!o.isSameNode(Z()):!1,s=n??pt(t);let c=0,a=(r==null?void 0:r.top)??0;return i&&s?a=(r==null?void 0:r.top)??0:o instanceof HTMLElement&&(c=o.scrollTop,!i&&!s&&(a+=c),o.isSameNode(Z())||(a+=Z().scrollTop)),Math.floor(a-e)}function dt(t,e){if(!t)return Z();const n=pe(t);if(n){if(n.isSameNode(Z()))return e?document:Z();if(!(n.scrollHeight>n.offsetHeight))return Z()}return n}function fr(t){const e=t.getBoundingClientRect(),n=Z(),r=e.top+e.height/2,o=window.innerHeight/2;return Math.max(0,n.scrollTop+r-o)}function gr(t,e){if(!t)return 0;const n=pe(t)??Z(),r=parseFloat(getComputedStyle(t).scrollMarginTop)||0,o=Ut(n),i=n.scrollTop??0,{offsetTop:s=0,scrollTop:c=0}=n;let a=t.getBoundingClientRect().top+c;if(s&&(be(t)||hr(t))){const g=t.getBoundingClientRect(),d=g.top-((o==null?void 0:o.top)??0),f=d+g.height,p=n.clientHeight,h=p*.2;d>=h&&f<=p-h?a=i:a=d+i}const u=Math.floor(a-e-r);return u<0?0:u}function hr(t){return t.offsetParent!==document.body}function be(t){if(!t)return!1;const e=dt(t);return e?!e.isSameNode(Z()):!1}function pt(t,e="fixed"){if(!t||!(t instanceof Element))return!1;const{nodeName:n}=t;return n==="BODY"||n==="HTML"?!1:getComputedStyle(t).position===e?!0:t.parentNode?pt(t.parentNode,e):!1}function Ot(t){if(!t)return!1;let e=t;for(;e&&e!==document.body;){if(e instanceof HTMLElement){const{display:n,visibility:r}=getComputedStyle(e);if(n==="none"||r==="hidden")return!1}e=e.parentElement??null}return!0}function Ee(t){const{isFirstStep:e,scrollToFirstStep:n,step:r,target:o,targetLifecycle:i}=t;if(r.skipScroll||e&&!n&&i!==m.TOOLTIP||r.placement==="center")return!1;const s=o!=null&&o.isConnected?dt(o):Z(),c=s?!s.isSameNode(Z()):!1;return(r.isFixed||pt(o))&&!c?!1:s.scrollHeight>s.clientHeight}function Z(){return document.scrollingElement??document.documentElement}function we(t,e){const{duration:n,element:r}=e;let o=()=>{};const i=new Promise(s=>{const{scrollTop:c}=r,a=t>c?t-c:c-t;o=Qn.top(r,t,{duration:a<100?50:n},()=>{s()})});return{cancel:o,promise:i}}function yr(t){const e=t.replace(/^#?([\da-f])([\da-f])([\da-f])$/i,(r,o,i,s)=>o+o+i+i+s+s),n=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})/i.exec(e);return n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:[]}const Te={backgroundColor:"transparent",border:0,borderRadius:0,color:"#555555",cursor:"pointer",fontSize:16,lineHeight:1,padding:0,WebkitAppearance:"none"},vt={...Te,borderRadius:4,padding:8};function mr(t,e){const{styles:n}=t,r=ut(n??{},e.styles??{});let{width:o}=e;$t()&&(o=typeof o=="number"&&window.innerWidth<o?window.innerWidth-30:o);const i={bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0,zIndex:e.zIndex};return ut({arrow:{alignItems:"center",color:e.arrowColor,display:"inline-flex",justifyContent:"center",position:"absolute"},beaconWrapper:{...Te,display:"inline-flex",borderRadius:"50%",position:"relative"},beacon:{height:e.beaconSize,width:e.beaconSize},beaconInner:{animation:"joyride-beacon-inner 1.2s infinite ease-in-out",backgroundColor:e.primaryColor,borderRadius:"50%",display:"block",height:"50%",left:"50%",opacity:.7,position:"absolute",top:"50%",transform:"translate(-50%, -50%)",width:"50%"},beaconOuter:{animation:"joyride-beacon-outer 1.2s infinite ease-in-out",backgroundColor:`rgba(${yr(e.primaryColor).join(",")}, 0.2)`,border:`2px solid ${e.primaryColor}`,borderRadius:"50%",boxSizing:"border-box",display:"block",height:"100%",left:0,opacity:.9,position:"absolute",top:0,transformOrigin:"center",width:"100%"},buttonBack:{...vt,color:e.primaryColor,marginLeft:"auto",marginRight:5},buttonClose:{...vt,color:e.textColor,height:12,padding:8,position:"absolute",right:0,top:0,width:12},buttonPrimary:{...vt,backgroundColor:e.primaryColor,color:e.backgroundColor},buttonSkip:{...vt,color:e.textColor,fontSize:14},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:"100%",transition:"opacity 0.3s"},loader:{alignItems:"center",display:"flex",height:48,inset:0,justifyContent:"center",pointerEvents:"none",position:"fixed",width:48,zIndex:e.zIndex+1},overlay:{...i,backgroundColor:e.overlayColor},spotlight:{},tooltip:{backgroundColor:e.backgroundColor,borderRadius:5,boxSizing:"border-box",color:e.textColor,fontSize:16,maxWidth:"100%",padding:12,position:"relative",width:o},tooltipContainer:{lineHeight:1.4,textAlign:"center"},tooltipTitle:{fontSize:18,margin:0},tooltipContent:{paddingBottom:12,paddingTop:12},tooltipFooter:{alignItems:"center",display:"flex",justifyContent:"flex-end"},tooltipFooterSpacer:{flex:1}},r)}const br=["after","arrowBase","arrowColor","arrowSize","arrowSpacing","backgroundColor","beaconSize","beaconTrigger","before","beforeTimeout","buttons","closeButtonAction","skipBeacon","dismissKeyAction","disableFocusTrap","hideOverlay","skipScroll","blockTargetInteraction","loaderDelay","offset","overlayClickAction","overlayColor","primaryColor","scrollDuration","scrollOffset","showProgress","spotlightPadding","spotlightRadius","targetWaitTimeout","textColor","width","zIndex"];function Wt(t,e){if(!e)return null;const n=ut(ir,he(t,"arrowComponent","beaconComponent","floatingOptions","loaderComponent","locale","styles","tooltipComponent"),e),r=ut(rr,t.options??{},he(e,...br)),o=mr(t,{...n,...r}),i=ut(or,t.floatingOptions??{},n.floatingOptions??{});return{...n,...r,locale:ut(fe,t.locale??{},n.locale||{}),floatingOptions:i,spotlightPadding:Er(r.spotlightPadding),styles:o}}function Er(t){return typeof t=="number"?{top:t,right:t,bottom:t,left:t}:{top:(t==null?void 0:t.top)??0,right:(t==null?void 0:t.right)??0,bottom:(t==null?void 0:t.bottom)??0,left:(t==null?void 0:t.left)??0}}function wr(t,e,n){const{action:r}=e,o=n&&[_.PREV,_.NEXT].includes(r);return t.skipBeacon||t.placement==="center"||o}function Se(t,e=!1){return V.plainObject(t)?t.target?!0:(G(e,"tour","target is missing from the step"),!1):(G(e,"tour","step must be an object"),!1)}function Oe(t,e=!1){return V.array(t)?t.every(n=>Se(n,e)):(G(e,"tour","steps must be an array"),!1)}var Tr=class{constructor(t){U(this,"beaconPosition",null),U(this,"debug"),U(this,"eventListeners",new Map),U(this,"listeners",new Set),U(this,"props"),U(this,"snapshot"),U(this,"state"),U(this,"steps"),U(this,"tooltipPosition",null),U(this,"cleanupPositionData",()=>{this.beaconPosition=null,this.tooltipPosition=null}),U(this,"getPositionData",s=>s==="beacon"?this.beaconPosition:this.tooltipPosition),U(this,"getServerSnapshot",()=>this.snapshot),U(this,"getSnapshot",()=>this.snapshot),U(this,"getEventState",()=>St(this.snapshot,"positioned")),U(this,"getState",()=>St(this.snapshot,"positioned")),U(this,"setPositionData",(s,c)=>{var a,u,g;((a=s==="beacon"?this.beaconPosition:this.tooltipPosition)==null?void 0:a.placement)!==c.placement&&G(this.debug,`step:${this.state.index}`,"positioned",`${s} ${c.placement}`),s==="beacon"?this.beaconPosition=c:this.tooltipPosition=c,(this.state.lifecycle===m.BEACON_BEFORE||this.state.lifecycle===m.TOOLTIP_BEFORE)&&!this.state.positioned&&this.updateState({positioned:!0});const d=(g=(u=this.getStep())==null?void 0:u.floatingOptions)==null?void 0:g.onPosition;d&&d(c)}),U(this,"setSteps",s=>{this.steps=s,this.updateState({size:s.length})}),U(this,"dispatch",(s,c)=>{const a=this.eventListeners.get(s.type);if(a)for(const u of a)try{u(s,c)}catch{}}),U(this,"on",(s,c)=>{let a=this.eventListeners.get(s);return a||(a=new Set,this.eventListeners.set(s,a)),a.add(c),()=>{a.delete(c)}}),U(this,"subscribe",s=>(this.listeners.add(s),()=>{this.listeners.delete(s)})),U(this,"updateState",(s,c=!1)=>{const{controlled:a,index:u}=this.state,g=this.snapshot,d=a&&!c&&s.index!==void 0?u:s.index??u,f={action:s.action??this.state.action,controlled:a,index:d,lifecycle:s.lifecycle??this.state.lifecycle,origin:s.origin??null,positioned:s.positioned??this.state.positioned,scrolling:s.scrolling??this.state.scrolling,size:s.size??this.state.size,status:s.status??this.state.status,waiting:s.waiting??this.state.waiting},p=this.applyTransitions(f);if(this.state=p,!At(g,p)){this.snapshot=Object.freeze({...p});for(const h of this.listeners)h(this.snapshot)}});const{initialStepIndex:e,stepIndex:n,steps:r=[]}=t??{},o=V.number(n);let i=0;this.debug=(t==null?void 0:t.debug)??!1,o?(i=n,V.number(e)&&G(this.debug,"tour","initialStepIndex is ignored in controlled mode")):V.number(e)&&(e>=0&&e<r.length?i=e:r.length>0&&G(this.debug,"tour","initialStepIndex is out of bounds")),this.props=t??{steps:[]},this.steps=r,this.state={action:_.INIT,controlled:o,index:i,lifecycle:m.INIT,origin:null,positioned:!1,scrolling:!1,size:r.length,status:r.length?F.READY:F.IDLE,waiting:!1},this.snapshot=Object.freeze({...this.state})}applyTransitions(t){return t.status===F.WAITING&&t.size>0?{...t,status:F.RUNNING}:t}getStep(t){return Wt(this.props,this.steps[t??this.state.index])}};function Sr(t){return new Tr(t)}function ve(t,e){return Math.min(Math.max(t,0),e)}function Or(t,e,n){const r=I(e),o=I(n);return r.current=e,o.current=n,q(()=>{const i=()=>t.current.getSnapshot();return{close:(s=null)=>{const{index:c,status:a}=i();a===F.RUNNING&&t.current.updateState({action:_.CLOSE,index:c+1,origin:s,lifecycle:m.COMPLETE,positioned:!1,scrolling:!1,waiting:!1})},go:s=>{const{controlled:c,size:a,status:u}=i();if(c){G(r.current,"tour","go() is not supported in controlled mode");return}u===F.RUNNING&&t.current.updateState({action:_.GO,index:s,lifecycle:m.COMPLETE,positioned:!1,scrolling:!1,status:s<a?u:F.FINISHED,waiting:!1})},info:()=>St(t.current.getSnapshot(),"positioned"),next:s=>{const{index:c,size:a,status:u}=i();u===F.RUNNING&&t.current.updateState({action:_.NEXT,index:ve(c+1,a),lifecycle:m.COMPLETE,origin:s,positioned:!1,scrolling:!1,waiting:!1})},open:()=>{const{status:s}=i();s===F.RUNNING&&t.current.updateState({action:_.UPDATE,lifecycle:m.TOOLTIP_BEFORE,positioned:!1,scrolling:!1,waiting:!1})},prev:s=>{const{index:c,size:a,status:u}=i();u===F.RUNNING&&t.current.updateState({action:_.PREV,index:ve(c-1,a),lifecycle:m.COMPLETE,origin:s,positioned:!1,scrolling:!1,waiting:!1})},reset:(s=!1)=>{const{controlled:c}=i();if(c){G(r.current,"tour","reset() is not supported in controlled mode");return}o.current(),t.current.updateState({action:_.RESET,index:0,lifecycle:m.INIT,positioned:!1,scrolling:!1,status:s?F.RUNNING:F.READY,waiting:!1})},skip:s=>{const{status:c}=i();c===F.RUNNING&&t.current.updateState({action:_.SKIP,lifecycle:m.COMPLETE,origin:s,positioned:!1,scrolling:!1,status:F.SKIPPED,waiting:!1})},start:s=>{const{index:c,size:a}=i();o.current(),t.current.updateState({action:_.START,index:V.number(s)?s:c,lifecycle:m.INIT,positioned:!1,scrolling:!1,status:a?F.RUNNING:F.WAITING,waiting:!1},!0)},stop:(s=!1)=>{const{index:c,status:a}=i();[F.FINISHED,F.SKIPPED].includes(a)||t.current.updateState({action:_.STOP,index:c+(s?1:0),lifecycle:m.COMPLETE,positioned:!1,scrolling:!1,status:F.PAUSED,waiting:!1})}}},[t])}const vr=new Set(["origin","positioned"]);function xr(t,e){const n=I(null);z(()=>{if(!e)return;const r=t.current.getSnapshot();return G(!0,"tour","init",r),n.current=r,t.current.subscribe(o=>{const i=n.current;if(n.current=o,!i)return;const s={};let c=!1;for(const a of Object.keys(o))o[a]!==i[a]&&!vr.has(a)&&(s[a]={from:i[a],to:o[a]},(a==="status"||a==="size")&&(c=!0));Object.keys(s).length&&(!c&&o.index>=o.size||G(!0,c?"tour":`step:${o.index}`,"state",s))})},[e,t])}function Pr(t,e,n){const r=I(t),o=I(e);return r.current=t,o.current=e,X((i,s,c)=>{var a;const u={...n.current.getEventState(),error:null,scroll:null,step:s,type:i,...c};(a=r.current)==null||a.call(r,u,o.current),n.current.dispatch(u,o.current)},[n])}function st(t,e){return{hasChanged(n){return t[n]!==e[n]},hasChangedTo(n,r){const o=t[n],i=e[n];return Array.isArray(r)?r.includes(o)&&!r.includes(i):o===r&&i!==r},previous:e}}function Cr(t){const{addFailure:e,controls:n,emitEvent:r,previousState:o,props:i,state:s,step:c,store:a}=t,{action:u,index:g,lifecycle:d,positioned:f,scrolling:p,size:h,status:w}=s,N=ee(c)??null,l=I(null),b=I(i),P=I(s),R=I(o),y=I(c),E=I(N),O=I(n),T=I(null),B=I(null),L=I(null);b.current=i,P.current=s,R.current=o,y.current=c,E.current=N,O.current=n;const $=()=>{T.current&&(clearInterval(T.current),T.current=null),B.current=null,L.current&&(L.current.cancel(),L.current=null)};z(()=>{if(!R.current)return;const{hasChangedTo:v}=st(P.current,R.current);(v("action",[_.NEXT,_.PREV,_.SKIP,_.CLOSE])||l.current===_.CLOSE&&u===_.START)&&(l.current=u)},[u]),z(()=>{if(!R.current)return()=>{$()};const{hasChanged:v}=st(P.current,R.current),C=y.current;if(v("index")&&$(),w!==F.RUNNING||!C||d!==m.INIT)return()=>{$()};const{hasChangedTo:D}=st(P.current,R.current);D("status",F.RUNNING)&&[F.IDLE,F.READY,F.PAUSED].includes(R.current.status)&&r(H.TOUR_START,C),a.current.cleanupPositionData();const{debug:j}=b.current;if(C.before&&!L.current){G(j,`step:${g}`,"before()",C),L.current={cancel:()=>{}},a.current.updateState({waiting:!0}),r(H.STEP_BEFORE_HOOK,C,{action:l.current??P.current.action});const x=()=>{L.current=null,a.current.updateState({action:l.current??P.current.action,waiting:!1,lifecycle:m.READY})},A=new AbortController,M=C.beforeTimeout;L.current={cancel:()=>A.abort()};const W=M?setTimeout(()=>{A.signal.aborted||(G(j,`step:${g}`,"before()","timed out",`${M}ms`),A.abort(),e(C,"before_hook"),r(H.ERROR,C,{error:new Error("Step before hook timed out")}),x())},M):null;C.before({...a.current.getState(),action:l.current??a.current.getState().action,step:C}).then(()=>{A.signal.aborted||(W&&clearTimeout(W),x())}).catch(K=>{A.signal.aborted||(W&&clearTimeout(W),e(C,"before_hook"),r(H.ERROR,C,{error:K instanceof Error?K:new Error(String(K))}),x())})}else if(!L.current){T.current&&B.current!==C.target&&$();const x=J(C.target);if(x&&Ot(x))$(),a.current.updateState({action:l.current??_.UPDATE,lifecycle:m.READY,waiting:!1});else if(C.targetWaitTimeout===0)a.current.updateState({action:l.current??_.UPDATE,lifecycle:m.READY,waiting:!1});else if(!T.current){const{targetWaitTimeout:A}=C,M=Date.now();B.current=C.target,G(j,`step:${g}`,"polling","started",`${A}ms`),a.current.updateState({waiting:!0}),T.current=setInterval(()=>{const W=J(C.target),K=Date.now()-M,at=K>=A;(W&&Ot(W)||at)&&(G(j,`step:${g}`,"polling",W&&Ot(W)?"found":"timed out",`${K}ms`),$(),a.current.updateState({action:l.current??_.UPDATE,lifecycle:m.READY,waiting:!1}))},100)}}return()=>{$()}},[e,r,g,d,w,a]),z(()=>{if(!R.current)return;const{hasChanged:v,hasChangedTo:C,previous:D}=st(P.current,R.current),j=y.current;if(!j)return;const x=J(j.target),A=!!x;if(A&&Ot(x)){if(C("lifecycle",m.READY)&&D.lifecycle===m.INIT&&r(H.STEP_BEFORE,j,{action:l.current??P.current.action}),C("lifecycle",m.READY)){const M=P.current,W=wr(j,M,b.current.continuous)?m.TOOLTIP:m.BEACON,K=J(j.scrollTarget??j.spotlightTarget??j.target),at=Ee({isFirstStep:M.index===0,scrollToFirstStep:b.current.scrollToFirstStep,step:j,target:K,targetLifecycle:W}),xt=W===m.TOOLTIP?m.TOOLTIP_BEFORE:m.BEACON_BEFORE;G(b.current.debug,`step:${g}`,"scroll",at?"needed":"skipped"),a.current.updateState({action:_.UPDATE,lifecycle:xt,scrolling:at})}}else if(P.current.status===F.RUNNING&&d!==m.INIT&&d!==m.COMPLETE&&v("lifecycle")){G(b.current.debug,`step:${g}`,A?"Target not visible":"Target not mounted",j),e(j,"target_not_found"),r(H.TARGET_NOT_FOUND,j);const M=P.current;M.controlled||a.current.updateState({action:_.UPDATE,index:M.index+(M.action===_.PREV?-1:1),lifecycle:m.INIT})}},[e,r,g,d,a]),z(()=>{if(!R.current)return;const{hasChangedTo:v,previous:C}=st(P.current,R.current),D=y.current,j=E.current;if(D&&v("lifecycle",m.TOOLTIP_BEFORE)&&C.lifecycle===m.BEACON){const M=J(D.scrollTarget??D.spotlightTarget??D.target);if(Ee({isFirstStep:P.current.index===0,scrollToFirstStep:b.current.scrollToFirstStep,step:D,target:M,targetLifecycle:m.TOOLTIP})){a.current.updateState({scrolling:!0,positioned:!1});return}}const x=d===m.BEACON_BEFORE||d===m.TOOLTIP_BEFORE;if(D&&x&&!p){const M=d===m.TOOLTIP_BEFORE?m.TOOLTIP:m.BEACON;a.current.updateState({action:_.UPDATE,lifecycle:M})}D&&v("lifecycle",m.BEACON)&&r(H.BEACON,D),D&&v("lifecycle",m.TOOLTIP)&&r(H.TOOLTIP,D);const A=P.current;if((A.status===F.RUNNING||A.controlled&&A.status===F.PAUSED&&D)&&j&&v("lifecycle",m.COMPLETE)&&C.lifecycle===m.TOOLTIP&&(r(H.STEP_AFTER,j,{action:l.current??_.UPDATE,index:C.index??A.index,lifecycle:A.lifecycle}),j.after)){r(H.STEP_AFTER_HOOK,j,{action:l.current??_.UPDATE,index:C.index??A.index,lifecycle:A.lifecycle});try{j.after({...a.current.getState(),action:l.current??_.UPDATE,index:C.index??A.index,lifecycle:A.lifecycle,step:j})}catch{}}},[r,d,f,p,a]),z(()=>{if(!R.current)return;const{hasChangedTo:v,previous:C}=st(P.current,R.current),D=y.current,j=E.current;h&&!D&&d===m.INIT&&a.current.updateState({action:_.UPDATE,lifecycle:m.COMPLETE,status:F.FINISHED}),!P.current.controlled&&w===F.RUNNING&&v("lifecycle",m.COMPLETE)&&g<h&&a.current.updateState({action:_.UPDATE,lifecycle:m.INIT}),v("lifecycle",m.COMPLETE)&&g>=h&&a.current.updateState({action:_.UPDATE,lifecycle:m.COMPLETE,status:F.FINISHED});const x=D??j??Wt(b.current,b.current.steps[g-1]);if(x&&v("status",[F.FINISHED,F.SKIPPED])){let A;D?A=g:j?A=C.index??g:A=g-1,r(H.TOUR_END,x,{index:A}),P.current.controlled||O.current.reset(),l.current=null}D&&v("action",_.STOP)&&(l.current=null,r(H.TOUR_STATUS,D)),D&&v("action",_.RESET)&&(r(H.TOUR_STATUS,D),l.current=null)},[u,r,g,d,h,w,a])}function Ar({controls:t,emitEvent:e,props:n,state:r,store:o}){const{debug:i,initialStepIndex:s,run:c,stepIndex:a,steps:u}=n,g=I(void 0),d=I(r),f=I(t);d.current=r,f.current=t,z(()=>{const p=g.current;if(g.current=n,!p||n===p)return;const{hasChanged:h}=st(n,p);if(At(p.steps,u)||(Oe(u,i)?o.current.setSteps(u):(G(i,"tour","Steps are not valid",u),e(H.ERROR,u[0]??{target:"",content:""},{error:new Error("Steps are not valid")}))),h("run"))c?o.current.getState().size&&f.current.start(a??s):f.current.stop();else if(V.number(a)&&h("stepIndex")){const w=V.number(p.stepIndex)&&p.stepIndex<a?_.NEXT:_.PREV;[F.FINISHED,F.SKIPPED].includes(d.current.status)||o.current.updateState({action:w,index:a,lifecycle:m.INIT,positioned:!1},!0)}},[i,e,s,n,c,a,u,o])}function Ir(t,e){var n,r,o,i;const{beaconPosition:s,lifecycle:c,scrollOffset:a,step:u}=e;if(u.scrollTarget||u.spotlightTarget)return Math.max(0,t);let g=t-u.spotlightPadding.top;if(c===m.BEACON_BEFORE&&s!=null&&s.placement){const d=Nr(s);["bottom"].includes(s.placement)||(g+=Math.floor(d-a))}else if(c===m.TOOLTIP_BEFORE){const{placement:d}=u;if(d==="top"){const f=((n=document.querySelector(".react-joyride__floater"))==null?void 0:n.getBoundingClientRect().height)??0,p=(r=u.floatingOptions)!=null&&r.hideArrow?0:u.arrowSize,h=u.offset+u.spotlightPadding.top+p;g-=f+h}else if(d==="left"||d==="right"){const f=((o=document.querySelector(".react-joyride__floater"))==null?void 0:o.getBoundingClientRect().height)??0,p=((i=J(u.target))==null?void 0:i.getBoundingClientRect().height)??0,h=a+u.spotlightPadding.top+p/2-f/2;h<a&&(g-=a-h)}}return Math.max(0,g)}function Nr(t){var e;const n=(e=t.middlewareData)==null?void 0:e.offset;return n?["left","right"].some(r=>t.placement.startsWith(r))?n.x:n.y:0}function kr({emitEvent:t,previousState:e,props:n,state:r,step:o,store:i}){const{index:s,lifecycle:c,positioned:a,scrolling:u,status:g}=r,d=I(null),f=I(r),p=I(e),h=I(n),w=I(o);f.current=r,p.current=e,h.current=n,w.current=o,z(()=>()=>{var N;(N=d.current)==null||N.call(d)},[]),z(()=>{var N;if(!p.current||!w.current)return;const{hasChangedTo:l}=st(f.current,p.current),b=w.current,{debug:P}=h.current,{scrollDuration:R}=b,y=c===m.BEACON_BEFORE||c===m.TOOLTIP_BEFORE;if(g===F.RUNNING&&y&&u&&l("positioned",!0)){const E=J(b.scrollTarget??b.spotlightTarget??b.target),O=i.current.getPositionData("beacon"),T=dt(E),B=T?!T.isSameNode(Z()):!1;(N=d.current)==null||N.call(d),(async()=>{if(B&&!pt(T)){const x=Z(),A=fr(T),M={initial:x.scrollTop,target:A,element:x,duration:R};t(H.SCROLL_START,b,{scroll:M});const{cancel:W,promise:K}=we(A,{element:x,duration:R});d.current=W,await K,t(H.SCROLL_END,b,{scroll:M})}const L=Math.floor(gr(E,b.scrollOffset))||0,$=B?L:Ir(L,{beaconPosition:O,lifecycle:c,scrollOffset:b.scrollOffset,step:b});G(P,`step:${s}`,"scroll",B?"custom":"document",`${L} \u2192 ${$}`);const v=T,C={initial:v.scrollTop,target:$,element:v,duration:R};t(H.SCROLL_START,b,{scroll:C});const{cancel:D,promise:j}=we($,{element:v,duration:R});d.current=D,await j,t(H.SCROLL_END,b,{scroll:C}),i.current.updateState({scrolling:!1})})().catch(()=>{i.current.updateState({scrolling:!1})})}},[t,s,c,a,u,g,i])}function Rr(t){const e=pn(()=>lr(sr,t),[t]),{debug:n,initialStepIndex:r,onEvent:o,run:i,stepIndex:s,steps:c}=e,a=I(Sr(e)),u=Le.useSyncExternalStore(a.current.subscribe,a.current.getSnapshot,a.current.getServerSnapshot),[g,d]=tt([]),f=X((y,E)=>{d(O=>[...O,{reason:E,step:y}])},[]),p=X(()=>{d([])},[]);xr(a,n);const h=Or(a,n,p),w=Pr(o,h,a),{index:N,size:l,status:b}=u,P=ee(u),R=q(()=>Wt(e,c[N]),[N,e,c]);return fn(()=>{i&&l&&Oe(c,n)&&h.start(s??r)}),dn(()=>{i&&l&&b===F.IDLE&&a.current.updateState({status:F.READY})},[i,l,b]),Ar({controls:h,emitEvent:w,props:e,state:u,store:a}),Cr({addFailure:f,controls:h,emitEvent:w,previousState:P,props:e,state:u,step:R,store:a}),kr({emitEvent:w,previousState:P,props:e,state:u,step:R,store:a}),{controls:h,failures:g,mergedProps:e,state:u,step:R,store:a}}function Lr(t){const[e,n]=tt(null);return z(()=>{let r=null,o=!1;if(t)if(V.domElement(t))r=t,o=!0;else{const i=document.querySelector(t);i&&(r=i)}else{const i=document.createElement("div");i.id=ar,document.body.appendChild(i),r=i}return n(r),()=>{!r||o||r.parentNode===document.body&&document.body.removeChild(r)}},[t]),e}const Fr={animation:"joyride-loader-spin 1s linear infinite",border:"5px solid rgba(0, 0, 0, 0.1)",borderRadius:"50%",borderTopColor:"#555"};function _r({nonce:t,step:e}){const{loaderComponent:n}=e,r=!!n;if(z(()=>{if(r||document.getElementById("joyride-loader-animation"))return Mt;const a=document.createElement("style");return a.id="joyride-loader-animation",t&&a.setAttribute("nonce",t),a.appendChild(document.createTextNode(`
1
+ var ke=Object.defineProperty,Re=(t,e,n)=>e in t?ke(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,U=(t,e,n)=>Re(t,typeof e!="symbol"?e+"":e,n);import{jsx as Kt}from"react/jsx-runtime";import{dA as wt,jZ as Le,j_ as Yt,j$ as Fe,k0 as _e,k1 as Vt,k2 as qt,k3 as Be,k4 as De,k5 as Zt,bE as je,cP as Me,v as ze,dh as $e,dr as Ue,cy as We,k6 as He,cl as Ge,cm as Ke,k7 as Ye}from"./runtime-Ci9GR285.js";import S,{useRef as I,useMemo as q,useEffect as z,useState as tt,useCallback as X,isValidElement as Ct,cloneElement as Xt}from"react";import{createPortal as Ve}from"react-dom";function Jt(t){return e=>typeof e===t}var qe=Jt("function"),Ze=t=>t===null,Qt=t=>Object.prototype.toString.call(t).slice(8,-1)==="RegExp",te=t=>!Xe(t)&&!Ze(t)&&(qe(t)||typeof t=="object"),Xe=Jt("undefined");function Je(t,e,n){return sn(n,t,e)?!0:(an(n,t,e),t.constructor!==e.constructor?!1:Array.isArray(t)&&Array.isArray(e)?Qe(t,e,n):t instanceof Map&&e instanceof Map?nn(t,e,n):t instanceof Set&&e instanceof Set?on(t,e):t instanceof WeakMap||t instanceof WeakSet?!1:ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)?tn(t,e):Qt(t)&&Qt(e)?t.source===e.source&&t.flags===e.flags:t instanceof Error&&e instanceof Error?en(t,e,n):t.valueOf!==Object.prototype.valueOf?t.valueOf()===e.valueOf():t.toString!==Object.prototype.toString?t.toString()===e.toString():rn(t,e,n))}function gt(t,e,n){return t===e||Number.isNaN(t)&&Number.isNaN(e)?!0:!t||!te(t)||!e||!te(e)?!1:Je(t,e,n)}function Qe(t,e,n){const{length:r}=t;if(r!==e.length)return!1;for(let o=r;o--!==0;)if(!gt(t[o],e[o],n))return!1;return!0}function tn(t,e){if(t.byteLength!==e.byteLength)return!1;const n=new DataView(t.buffer),r=new DataView(e.buffer);let o=t.byteLength;for(;o--;)if(n.getUint8(o)!==r.getUint8(o))return!1;return!0}function en(t,e,n){return t.message===e.message&&t.name===e.name&&gt(t.cause,e.cause,n)}function nn(t,e,n){if(t.size!==e.size)return!1;for(const r of t.entries())if(!e.has(r[0]))return!1;for(const r of t.entries())if(!gt(r[1],e.get(r[0]),n))return!1;return!0}function rn(t,e,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!1;for(let o=r.length;o--!==0;)if(!Object.prototype.hasOwnProperty.call(e,r[o]))return!1;for(let o=r.length;o--!==0;){const i=r[o];if(!(i==="_owner"&&t.$$typeof)&&!gt(t[i],e[i],n))return!1}return!0}function on(t,e){if(t.size!==e.size)return!1;for(const n of t.entries())if(!e.has(n[0]))return!1;return!0}function sn(t,e,n){var r;return((r=t.get(e))==null?void 0:r.has(n))??!1}function an(t,e,n){let r=t.get(e);r||(r=new WeakSet,t.set(e,r)),r.add(n)}function At(t,e){return gt(t,e,new WeakMap)}function It(){var t;return!!(typeof window<"u"&&(t=window==null?void 0:window.document)!=null&&t.createElement)}function cn(t,...e){t&&t.removeEventListener&&t.removeEventListener(...e)}function ln(t,...e){t&&t.addEventListener&&t.addEventListener(...e)}function un(){const t=I(!0);return t.current?(t.current=!1,!0):t.current}function dn(t,e){const n=un();z(()=>{if(!n)return t()},e)}function ee(t){const e=I(void 0);return z(()=>{e.current=t}),e.current}function pn(t,e){const n=I(e);return At(e,n.current)||(n.current=e),q(t,n.current)}function fn(t){z(()=>{t()},[])}function gn(t=0){const[e,n]=tt({height:It()?window.innerHeight:0,width:It()?window.innerWidth:0}),r=I(0),o=I(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(()=>{n({width:window.innerWidth,height:window.innerHeight})},t)});return z(()=>{if(!It())return()=>{};const i=o.current;return n({height:window.innerHeight,width:window.innerWidth}),ln(window,"resize",i),()=>{cn(window,"resize",i)}},[]),e}var hn=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","URL","WeakMap","WeakSet"],yn=["bigint","boolean","null","number","string","symbol","undefined"];function ht(t){const e=Object.prototype.toString.call(t).slice(8,-1);if(/HTML\w+Element/.test(e))return"HTMLElement";if(mn(e))return e}function Q(t){return e=>ht(e)===t}function mn(t){return hn.includes(t)}function lt(t){return e=>typeof e===t}function bn(t){return yn.includes(t)}var En=["innerHTML","ownerDocument","style","attributes","nodeValue"],yt=t=>Array.isArray(t),wn=t=>ht(t)==="AsyncGeneratorFunction",Tn=Q("AsyncFunction"),Sn=lt("bigint"),On=t=>t===!0||t===!1,vn=Q("Date"),xn=Q("Error"),it=lt("function"),Pn=Q("GeneratorFunction"),Cn=t=>typeof t=="number"&&Number.isInteger(t),Nt=Q("Map"),ne=t=>Number.isNaN(t),kt=t=>t===null,re=Q("Function"),An=Q("Promise"),In=Q("RegExp"),Rt=Q("Set"),mt=lt("string"),Nn=lt("symbol"),Lt=lt("undefined"),kn=Q("WeakMap"),Rn=Q("WeakSet"),Ft=t=>kt(t)||Lt(t),oe=t=>!Lt(t),Ln=t=>lt("number")(t)&&!ne(t),Fn=t=>mt(t)&&t.trim().length>0,_n=t=>{if(!mt(t)||t.length===0)return!1;const e=t.trim();return e.length>0&&Number.isFinite(Number(e))},Tt=t=>!Ft(t)&&(it(t)||typeof t=="object"),ie=t=>{if(ht(t)!=="Object")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})},Bn=t=>kt(t)||bn(typeof t),Dn=t=>ht(t)==="URL",se=t=>!Ft(t)&&it(t[Symbol.iterator]),jn=t=>se(t)&&it(t.next)&&it(t.throw),Mn=t=>it(t)&&/^class\s/.test(t.toString()),zn=(t,e)=>!yt(t)||!it(e)?!1:t.every(n=>e(n)),$n=t=>Tt(t)&&!ie(t)&&t.nodeType===1&&mt(t.nodeName)&&En.every(e=>e in t),Un=t=>mt(t)&&t.length===0||yt(t)&&t.length===0||Tt(t)&&!Nt(t)&&!Rt(t)&&Object.keys(t).length===0||Rt(t)&&t.size===0||Nt(t)&&t.size===0,Wn=(t,e)=>!t||!e?!1:Object.getPrototypeOf(t)===e.prototype,Hn=(t,e)=>yt(t)?t.indexOf(e)>-1:!1,Gn=(t,e,n)=>{if(!Tt(t)||!e)return!1;const r=t[e];return it(n)?n(r):oe(r)};function k(t){if(t===null)return"null";switch(typeof t){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}return yt(t)?"Array":re(t)?"Function":ht(t)||"Object"}k.array=yt,k.arrayOf=zn,k.asyncGeneratorFunction=wn,k.asyncFunction=Tn,k.bigint=Sn,k.boolean=On,k.class=Mn,k.date=vn,k.defined=oe,k.domElement=$n,k.empty=Un,k.error=xn,k.function=it,k.generator=jn,k.generatorFunction=Pn,k.instanceOf=Wn,k.integer=Cn,k.iterable=se,k.map=Nt,k.nan=ne,k.null=kt,k.nullOrUndefined=Ft,k.nonEmptyString=Fn,k.number=Ln,k.numericString=_n,k.object=Tt,k.oneOf=Hn,k.plainFunction=re,k.plainObject=ie,k.primitive=Bn,k.promise=An,k.propertyOf=Gn,k.regexp=In,k.set=Rt,k.string=mt,k.symbol=Nn,k.undefined=Lt,k.url=Dn,k.weakMap=kn,k.weakSet=Rn;var V=k;var _t,ae;function Kn(){if(ae)return _t;ae=1;var t=function(r){return Object.prototype.hasOwnProperty.call(r,"props")},e=function(r,o){return r+n(o)},n=function(r){return r===null||typeof r=="boolean"||typeof r>"u"?"":typeof r=="number"?r.toString():typeof r=="string"?r:Array.isArray(r)?r.reduce(e,""):t(r)&&Object.prototype.hasOwnProperty.call(r.props,"children")?n(r.props.children):""};return n.default=n,_t=n,_t}var Yn=Kn();const Bt=wt(Yn);var ce={exports:{}},le;function Vn(){return le||(le=1,(function(t){const e=Object.getPrototypeOf({});function n(){return function(o){return typeof o=="object"&&o!==null&&!(o instanceof RegExp)&&!(o instanceof Date)}}function r(o){function i(y){return y!=="constructor"&&y!=="prototype"&&y!=="__proto__"}function s(y){let E=0;const O=y.length,T=new Array(O);for(E;E<O;++E)T[E]=l(y[E]);return T}function c(y){const E={};if(f&&Object.getPrototypeOf(y)!==e)return f(y);const O=d(y);let T,B,L;for(T=0,B=O.length;T<B;++T)i(L=O[T])&&(E[L]=l(y[L]));return E}function a(y,E){const O=y.length,T=E.length;let B=0;const L=new Array(O+T);for(B;B<O;++B)L[B]=l(y[B]);for(B=0;B<T;++B)L[B+O]=l(E[B]);return L}const u=Object.prototype.propertyIsEnumerable;function g(y){const E=Object.keys(y),O=Object.getOwnPropertySymbols(y);for(let T=0,B=O.length;T<B;++T)u.call(y,O[T])&&E.push(O[T]);return E}const d=o!=null&&o.symbols?g:Object.keys,f=typeof(o==null?void 0:o.cloneProtoObject)=="function"?o.cloneProtoObject:void 0,p=typeof(o==null?void 0:o.isMergeableObject)=="function"?o.isMergeableObject:n(),h=(o==null?void 0:o.onlyDefinedProperties)===!0;function w(y){return typeof y!="object"||y===null}const N=o&&typeof o.mergeArray=="function"?o.mergeArray({clone:l,deepmerge:P,getKeys:d,isMergeableObject:p}):a;function l(y){return p(y)?Array.isArray(y)?s(y):c(y):y}function b(y,E){const O={},T=d(y),B=d(E);let L,$,v;for(L=0,$=T.length;L<$;++L)i(v=T[L])&&B.indexOf(v)===-1&&(O[v]=l(y[v]));for(L=0,$=B.length;L<$;++L)if(i(v=B[L]))if(v in y)T.indexOf(v)!==-1&&(f&&p(E[v])&&Object.getPrototypeOf(E[v])!==e?O[v]=f(E[v]):O[v]=P(y[v],E[v]));else{if(h&&typeof E[v]>"u")continue;O[v]=l(E[v])}return O}function P(y,E){if(h&&typeof E>"u")return l(y);const O=Array.isArray(E),T=Array.isArray(y);return w(E)?E:p(y)?O&&T?N(y,E):O!==T?l(E):b(y,E):l(E)}function R(){switch(arguments.length){case 0:return{};case 1:return l(arguments[0]);case 2:return P(arguments[0],arguments[1])}let y;for(let E=0,O=arguments.length;E<O;++E)y=P(y,arguments[E]);return y}return o!=null&&o.all?R:P}t.exports=r,t.exports.default=r,t.exports.deepmerge=r,Object.defineProperty(t.exports,"isMergeableObject",{get:n})})(ce)),ce.exports}var qn=Vn();const Zn=wt(qn);var Dt,ue;function Xn(){if(ue)return Dt;ue=1;var t=new Error("Element already at target scroll position"),e=new Error("Scroll cancelled"),n=Math.min,r=Date.now;Dt={left:o("scrollLeft"),top:o("scrollTop")};function o(c){return function(a,u,g,d){g=g||{},typeof g=="function"&&(d=g,g={}),typeof d!="function"&&(d=s);var f=r(),p=a[c],h=g.ease||i,w=isNaN(g.duration)?350:+g.duration,N=!1;return p===u?d(t,a[c]):requestAnimationFrame(b),l;function l(){N=!0}function b(P){if(N)return d(e,a[c]);var R=r(),y=n(1,(R-f)/w),E=h(y);a[c]=E*(u-p)+p,y<1?requestAnimationFrame(b):requestAnimationFrame(function(){d(null,a[c])})}}}function i(c){return .5*(1-Math.cos(Math.PI*c))}function s(){}return Dt}var Jn=Xn();const Qn=wt(Jn);var jt={exports:{}},tr=jt.exports,de;function er(){return de||(de=1,(function(t){(function(e,n){t.exports?t.exports=n():e.Scrollparent=n()})(tr,function(){function e(r){var o=getComputedStyle(r,null).getPropertyValue("overflow");return o.indexOf("scroll")>-1||o.indexOf("auto")>-1}function n(r){if(r instanceof HTMLElement||r instanceof SVGElement){for(var o=r.parentNode;o.parentNode;){if(e(o))return o;o=o.parentNode}return document.scrollingElement||document.documentElement}}return n})})(jt)),jt.exports}var nr=er();const pe=wt(nr),rr={arrowBase:32,arrowColor:"#ffffff",arrowSize:16,arrowSpacing:12,backgroundColor:"#ffffff",beaconSize:36,beaconTrigger:"click",beforeTimeout:5e3,blockTargetInteraction:!1,buttons:["back","close","primary"],closeButtonAction:"close",disableFocusTrap:!1,dismissKeyAction:"close",hideOverlay:!1,loaderDelay:300,offset:10,overlayClickAction:"close",overlayColor:"#00000080",primaryColor:"#000000",scrollDuration:300,scrollOffset:20,showProgress:!1,skipBeacon:!1,skipScroll:!1,spotlightPadding:10,spotlightRadius:4,targetWaitTimeout:1e3,textColor:"#000000",width:380,zIndex:100},or={beaconOptions:{offset:-18}},fe={back:"Back",close:"Close",last:"Last",next:"Next",nextWithProgress:"Next ({current} of {total})",open:"Open the dialog",skip:"Skip"},ir={isFixed:!1,locale:fe,placement:"bottom"},sr={continuous:!1,debug:!1,run:!1,scrollToFirstStep:!1,steps:[]},_={INIT:"init",START:"start",STOP:"stop",RESET:"reset",PREV:"prev",NEXT:"next",GO:"go",CLOSE:"close",SKIP:"skip",UPDATE:"update",COMPLETE:"complete"},H={TOUR_START:"tour:start",STEP_BEFORE_HOOK:"step:before_hook",STEP_BEFORE:"step:before",SCROLL_START:"scroll:start",SCROLL_END:"scroll:end",BEACON:"beacon",TOOLTIP:"tooltip",STEP_AFTER:"step:after",STEP_AFTER_HOOK:"step:after_hook",TOUR_END:"tour:end",TOUR_STATUS:"tour:status",TARGET_NOT_FOUND:"error:target_not_found",ERROR:"error"},m={INIT:"init",READY:"ready",BEACON_BEFORE:"beacon_before",BEACON:"beacon",TOOLTIP_BEFORE:"tooltip_before",TOOLTIP:"tooltip",COMPLETE:"complete"},et={BUTTON_BACK:"button_back",BUTTON_CLOSE:"button_close",BUTTON_PRIMARY:"button_primary",BUTTON_SKIP:"button_skip",KEYBOARD:"keyboard",OVERLAY:"overlay"},F={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished"},ar="react-joyride-portal";function cr(t){const e={};for(const n in t)t[n]!==void 0&&(e[n]=t[n]);return e}function ut(...t){return Zn({all:!0,isMergeableObject:e=>!(!V.plainObject(e)||Ct(e))})(...t)}function ge(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function nt(t,e={}){const{defaultValue:n,step:r,steps:o}=e;let i=Bt(t);if(i)(i.includes("{current}")||i.includes("{total}"))&&r&&o&&(i=i.replace("{current}",r.toString()).replace("{total}",o.toString()));else if(Ct(t)&&!Object.values(t.props).length&&ge(t.type)==="function")try{i=nt(t.type({}),e)}catch{i=Bt(n)}else i=Bt(n);return i}function G(t,e,n,...r){if(!t)return;const o=new Date,i=`${String(o.getHours()).padStart(2,"0")}:${String(o.getMinutes()).padStart(2,"0")}:${String(o.getSeconds()).padStart(2,"0")}.${String(o.getMilliseconds()).padStart(3,"0")}`;console.log(`${e} %c${n}%c ${i}`,"font-weight: bold","color: gray; font-weight: normal",...r)}function lr(t,e){const n=cr(e);return{...t,...n}}function Mt(){}function ur(t){return Object.keys(t)}function St(t,...e){if(!V.plainObject(t))throw new TypeError("Expected an object");const n={};for(const r in t)({}).hasOwnProperty.call(t,r)&&(e.includes(r)||(n[r]=t[r]));return n}function he(t,...e){if(!V.plainObject(t))throw new TypeError("Expected an object");if(!e.length)return t;const n={};for(const r in t)({}).hasOwnProperty.call(t,r)&&e.includes(r)&&(n[r]=t[r]);return n}function zt(t,e,n){const r=i=>i.replace("{current}",String(e)).replace("{total}",String(n));if(ge(t)==="string")return r(t);if(!Ct(t))return t;const{children:o}=t.props;if(V.string(o)&&o.includes("{current}"))return Xt(t,{children:r(o)});if(Array.isArray(o))return Xt(t,{children:o.map(i=>typeof i=="string"?r(i):zt(i,e,n))});if(V.function(t.type)&&!Object.values(t.props).length)try{return zt(t.type({}),e,n)}catch{return t}return t}function ye(t){return ur(t).sort().reduce((e,n)=>(e[n]=t[n],e),{})}function $t(){var t;return!!(typeof window<"u"&&(t=window.document)!=null&&t.createElement)}function me(t){let e=0,n=0,r=t;for(;r;)e+=r.offsetTop,n+=r.offsetLeft,r=r.offsetParent;return{left:n,top:e}}function Ut(t){return t?t.getBoundingClientRect():null}function dr(t=!1){const{body:e,documentElement:n}=document;if(!e||!n)return 0;if(t){const r=[e.scrollHeight,e.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight].sort((i,s)=>i-s),o=Math.floor(r.length/2);return r.length%2===0?(r[o-1]+r[o])/2:r[o]}return Math.max(e.scrollHeight,e.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight)}function J(t){if(!t)return null;if(typeof t=="function")try{return t()}catch{return null}if(typeof t=="object"&&"current"in t)return t.current;if(typeof t=="string")try{return document.querySelector(t)}catch{return null}return t}function pr(t,e,n){const r=Ut(t),o=dt(t),i=o?!o.isSameNode(Z()):!1,s=n??pt(t);let c=0,a=(r==null?void 0:r.top)??0;return i&&s?a=(r==null?void 0:r.top)??0:o instanceof HTMLElement&&(c=o.scrollTop,!i&&!s&&(a+=c),o.isSameNode(Z())||(a+=Z().scrollTop)),Math.floor(a-e)}function dt(t,e){if(!t)return Z();const n=pe(t);if(n){if(n.isSameNode(Z()))return e?document:Z();if(!(n.scrollHeight>n.offsetHeight))return Z()}return n}function fr(t){const e=t.getBoundingClientRect(),n=Z(),r=e.top+e.height/2,o=window.innerHeight/2;return Math.max(0,n.scrollTop+r-o)}function gr(t,e){if(!t)return 0;const n=pe(t)??Z(),r=parseFloat(getComputedStyle(t).scrollMarginTop)||0,o=Ut(n),i=n.scrollTop??0,{offsetTop:s=0,scrollTop:c=0}=n;let a=t.getBoundingClientRect().top+c;if(s&&(be(t)||hr(t))){const g=t.getBoundingClientRect(),d=g.top-((o==null?void 0:o.top)??0),f=d+g.height,p=n.clientHeight,h=p*.2;d>=h&&f<=p-h?a=i:a=d+i}const u=Math.floor(a-e-r);return u<0?0:u}function hr(t){return t.offsetParent!==document.body}function be(t){if(!t)return!1;const e=dt(t);return e?!e.isSameNode(Z()):!1}function pt(t,e="fixed"){if(!t||!(t instanceof Element))return!1;const{nodeName:n}=t;return n==="BODY"||n==="HTML"?!1:getComputedStyle(t).position===e?!0:t.parentNode?pt(t.parentNode,e):!1}function Ot(t){if(!t)return!1;let e=t;for(;e&&e!==document.body;){if(e instanceof HTMLElement){const{display:n,visibility:r}=getComputedStyle(e);if(n==="none"||r==="hidden")return!1}e=e.parentElement??null}return!0}function Ee(t){const{isFirstStep:e,scrollToFirstStep:n,step:r,target:o,targetLifecycle:i}=t;if(r.skipScroll||e&&!n&&i!==m.TOOLTIP||r.placement==="center")return!1;const s=o!=null&&o.isConnected?dt(o):Z(),c=s?!s.isSameNode(Z()):!1;return(r.isFixed||pt(o))&&!c?!1:s.scrollHeight>s.clientHeight}function Z(){return document.scrollingElement??document.documentElement}function we(t,e){const{duration:n,element:r}=e;let o=()=>{};const i=new Promise(s=>{const{scrollTop:c}=r,a=t>c?t-c:c-t;o=Qn.top(r,t,{duration:a<100?50:n},()=>{s()})});return{cancel:o,promise:i}}function yr(t){const e=t.replace(/^#?([\da-f])([\da-f])([\da-f])$/i,(r,o,i,s)=>o+o+i+i+s+s),n=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})/i.exec(e);return n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:[]}const Te={backgroundColor:"transparent",border:0,borderRadius:0,color:"#555555",cursor:"pointer",fontSize:16,lineHeight:1,padding:0,WebkitAppearance:"none"},vt={...Te,borderRadius:4,padding:8};function mr(t,e){const{styles:n}=t,r=ut(n??{},e.styles??{});let{width:o}=e;$t()&&(o=typeof o=="number"&&window.innerWidth<o?window.innerWidth-30:o);const i={bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0,zIndex:e.zIndex};return ut({arrow:{alignItems:"center",color:e.arrowColor,display:"inline-flex",justifyContent:"center",position:"absolute"},beaconWrapper:{...Te,display:"inline-flex",borderRadius:"50%",position:"relative"},beacon:{height:e.beaconSize,width:e.beaconSize},beaconInner:{animation:"joyride-beacon-inner 1.2s infinite ease-in-out",backgroundColor:e.primaryColor,borderRadius:"50%",display:"block",height:"50%",left:"50%",opacity:.7,position:"absolute",top:"50%",transform:"translate(-50%, -50%)",width:"50%"},beaconOuter:{animation:"joyride-beacon-outer 1.2s infinite ease-in-out",backgroundColor:`rgba(${yr(e.primaryColor).join(",")}, 0.2)`,border:`2px solid ${e.primaryColor}`,borderRadius:"50%",boxSizing:"border-box",display:"block",height:"100%",left:0,opacity:.9,position:"absolute",top:0,transformOrigin:"center",width:"100%"},buttonBack:{...vt,color:e.primaryColor,marginLeft:"auto",marginRight:5},buttonClose:{...vt,color:e.textColor,height:12,padding:8,position:"absolute",right:0,top:0,width:12},buttonPrimary:{...vt,backgroundColor:e.primaryColor,color:e.backgroundColor},buttonSkip:{...vt,color:e.textColor,fontSize:14},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:"100%",transition:"opacity 0.3s"},loader:{alignItems:"center",display:"flex",height:48,inset:0,justifyContent:"center",pointerEvents:"none",position:"fixed",width:48,zIndex:e.zIndex+1},overlay:{...i,backgroundColor:e.overlayColor},spotlight:{},tooltip:{backgroundColor:e.backgroundColor,borderRadius:5,boxSizing:"border-box",color:e.textColor,fontSize:16,maxWidth:"100%",padding:12,position:"relative",width:o},tooltipContainer:{lineHeight:1.4,textAlign:"center"},tooltipTitle:{fontSize:18,margin:0},tooltipContent:{paddingBottom:12,paddingTop:12},tooltipFooter:{alignItems:"center",display:"flex",justifyContent:"flex-end"},tooltipFooterSpacer:{flex:1}},r)}const br=["after","arrowBase","arrowColor","arrowSize","arrowSpacing","backgroundColor","beaconSize","beaconTrigger","before","beforeTimeout","buttons","closeButtonAction","skipBeacon","dismissKeyAction","disableFocusTrap","hideOverlay","skipScroll","blockTargetInteraction","loaderDelay","offset","overlayClickAction","overlayColor","primaryColor","scrollDuration","scrollOffset","showProgress","spotlightPadding","spotlightRadius","targetWaitTimeout","textColor","width","zIndex"];function Wt(t,e){if(!e)return null;const n=ut(ir,he(t,"arrowComponent","beaconComponent","floatingOptions","loaderComponent","locale","styles","tooltipComponent"),e),r=ut(rr,t.options??{},he(e,...br)),o=mr(t,{...n,...r}),i=ut(or,t.floatingOptions??{},n.floatingOptions??{});return{...n,...r,locale:ut(fe,t.locale??{},n.locale||{}),floatingOptions:i,spotlightPadding:Er(r.spotlightPadding),styles:o}}function Er(t){return typeof t=="number"?{top:t,right:t,bottom:t,left:t}:{top:(t==null?void 0:t.top)??0,right:(t==null?void 0:t.right)??0,bottom:(t==null?void 0:t.bottom)??0,left:(t==null?void 0:t.left)??0}}function wr(t,e,n){const{action:r}=e,o=n&&[_.PREV,_.NEXT].includes(r);return t.skipBeacon||t.placement==="center"||o}function Se(t,e=!1){return V.plainObject(t)?t.target?!0:(G(e,"tour","target is missing from the step"),!1):(G(e,"tour","step must be an object"),!1)}function Oe(t,e=!1){return V.array(t)?t.every(n=>Se(n,e)):(G(e,"tour","steps must be an array"),!1)}var Tr=class{constructor(t){U(this,"beaconPosition",null),U(this,"debug"),U(this,"eventListeners",new Map),U(this,"listeners",new Set),U(this,"props"),U(this,"snapshot"),U(this,"state"),U(this,"steps"),U(this,"tooltipPosition",null),U(this,"cleanupPositionData",()=>{this.beaconPosition=null,this.tooltipPosition=null}),U(this,"getPositionData",s=>s==="beacon"?this.beaconPosition:this.tooltipPosition),U(this,"getServerSnapshot",()=>this.snapshot),U(this,"getSnapshot",()=>this.snapshot),U(this,"getEventState",()=>St(this.snapshot,"positioned")),U(this,"getState",()=>St(this.snapshot,"positioned")),U(this,"setPositionData",(s,c)=>{var a,u,g;((a=s==="beacon"?this.beaconPosition:this.tooltipPosition)==null?void 0:a.placement)!==c.placement&&G(this.debug,`step:${this.state.index}`,"positioned",`${s} ${c.placement}`),s==="beacon"?this.beaconPosition=c:this.tooltipPosition=c,(this.state.lifecycle===m.BEACON_BEFORE||this.state.lifecycle===m.TOOLTIP_BEFORE)&&!this.state.positioned&&this.updateState({positioned:!0});const d=(g=(u=this.getStep())==null?void 0:u.floatingOptions)==null?void 0:g.onPosition;d&&d(c)}),U(this,"setSteps",s=>{this.steps=s,this.updateState({size:s.length})}),U(this,"dispatch",(s,c)=>{const a=this.eventListeners.get(s.type);if(a)for(const u of a)try{u(s,c)}catch{}}),U(this,"on",(s,c)=>{let a=this.eventListeners.get(s);return a||(a=new Set,this.eventListeners.set(s,a)),a.add(c),()=>{a.delete(c)}}),U(this,"subscribe",s=>(this.listeners.add(s),()=>{this.listeners.delete(s)})),U(this,"updateState",(s,c=!1)=>{const{controlled:a,index:u}=this.state,g=this.snapshot,d=a&&!c&&s.index!==void 0?u:s.index??u,f={action:s.action??this.state.action,controlled:a,index:d,lifecycle:s.lifecycle??this.state.lifecycle,origin:s.origin??null,positioned:s.positioned??this.state.positioned,scrolling:s.scrolling??this.state.scrolling,size:s.size??this.state.size,status:s.status??this.state.status,waiting:s.waiting??this.state.waiting},p=this.applyTransitions(f);if(this.state=p,!At(g,p)){this.snapshot=Object.freeze({...p});for(const h of this.listeners)h(this.snapshot)}});const{initialStepIndex:e,stepIndex:n,steps:r=[]}=t??{},o=V.number(n);let i=0;this.debug=(t==null?void 0:t.debug)??!1,o?(i=n,V.number(e)&&G(this.debug,"tour","initialStepIndex is ignored in controlled mode")):V.number(e)&&(e>=0&&e<r.length?i=e:r.length>0&&G(this.debug,"tour","initialStepIndex is out of bounds")),this.props=t??{steps:[]},this.steps=r,this.state={action:_.INIT,controlled:o,index:i,lifecycle:m.INIT,origin:null,positioned:!1,scrolling:!1,size:r.length,status:r.length?F.READY:F.IDLE,waiting:!1},this.snapshot=Object.freeze({...this.state})}applyTransitions(t){return t.status===F.WAITING&&t.size>0?{...t,status:F.RUNNING}:t}getStep(t){return Wt(this.props,this.steps[t??this.state.index])}};function Sr(t){return new Tr(t)}function ve(t,e){return Math.min(Math.max(t,0),e)}function Or(t,e,n){const r=I(e),o=I(n);return r.current=e,o.current=n,q(()=>{const i=()=>t.current.getSnapshot();return{close:(s=null)=>{const{index:c,status:a}=i();a===F.RUNNING&&t.current.updateState({action:_.CLOSE,index:c+1,origin:s,lifecycle:m.COMPLETE,positioned:!1,scrolling:!1,waiting:!1})},go:s=>{const{controlled:c,size:a,status:u}=i();if(c){G(r.current,"tour","go() is not supported in controlled mode");return}u===F.RUNNING&&t.current.updateState({action:_.GO,index:s,lifecycle:m.COMPLETE,positioned:!1,scrolling:!1,status:s<a?u:F.FINISHED,waiting:!1})},info:()=>St(t.current.getSnapshot(),"positioned"),next:s=>{const{index:c,size:a,status:u}=i();u===F.RUNNING&&t.current.updateState({action:_.NEXT,index:ve(c+1,a),lifecycle:m.COMPLETE,origin:s,positioned:!1,scrolling:!1,waiting:!1})},open:()=>{const{status:s}=i();s===F.RUNNING&&t.current.updateState({action:_.UPDATE,lifecycle:m.TOOLTIP_BEFORE,positioned:!1,scrolling:!1,waiting:!1})},prev:s=>{const{index:c,size:a,status:u}=i();u===F.RUNNING&&t.current.updateState({action:_.PREV,index:ve(c-1,a),lifecycle:m.COMPLETE,origin:s,positioned:!1,scrolling:!1,waiting:!1})},reset:(s=!1)=>{const{controlled:c}=i();if(c){G(r.current,"tour","reset() is not supported in controlled mode");return}o.current(),t.current.updateState({action:_.RESET,index:0,lifecycle:m.INIT,positioned:!1,scrolling:!1,status:s?F.RUNNING:F.READY,waiting:!1})},skip:s=>{const{status:c}=i();c===F.RUNNING&&t.current.updateState({action:_.SKIP,lifecycle:m.COMPLETE,origin:s,positioned:!1,scrolling:!1,status:F.SKIPPED,waiting:!1})},start:s=>{const{index:c,size:a}=i();o.current(),t.current.updateState({action:_.START,index:V.number(s)?s:c,lifecycle:m.INIT,positioned:!1,scrolling:!1,status:a?F.RUNNING:F.WAITING,waiting:!1},!0)},stop:(s=!1)=>{const{index:c,status:a}=i();[F.FINISHED,F.SKIPPED].includes(a)||t.current.updateState({action:_.STOP,index:c+(s?1:0),lifecycle:m.COMPLETE,positioned:!1,scrolling:!1,status:F.PAUSED,waiting:!1})}}},[t])}const vr=new Set(["origin","positioned"]);function xr(t,e){const n=I(null);z(()=>{if(!e)return;const r=t.current.getSnapshot();return G(!0,"tour","init",r),n.current=r,t.current.subscribe(o=>{const i=n.current;if(n.current=o,!i)return;const s={};let c=!1;for(const a of Object.keys(o))o[a]!==i[a]&&!vr.has(a)&&(s[a]={from:i[a],to:o[a]},(a==="status"||a==="size")&&(c=!0));Object.keys(s).length&&(!c&&o.index>=o.size||G(!0,c?"tour":`step:${o.index}`,"state",s))})},[e,t])}function Pr(t,e,n){const r=I(t),o=I(e);return r.current=t,o.current=e,X((i,s,c)=>{var a;const u={...n.current.getEventState(),error:null,scroll:null,step:s,type:i,...c};(a=r.current)==null||a.call(r,u,o.current),n.current.dispatch(u,o.current)},[n])}function st(t,e){return{hasChanged(n){return t[n]!==e[n]},hasChangedTo(n,r){const o=t[n],i=e[n];return Array.isArray(r)?r.includes(o)&&!r.includes(i):o===r&&i!==r},previous:e}}function Cr(t){const{addFailure:e,controls:n,emitEvent:r,previousState:o,props:i,state:s,step:c,store:a}=t,{action:u,index:g,lifecycle:d,positioned:f,scrolling:p,size:h,status:w}=s,N=ee(c)??null,l=I(null),b=I(i),P=I(s),R=I(o),y=I(c),E=I(N),O=I(n),T=I(null),B=I(null),L=I(null);b.current=i,P.current=s,R.current=o,y.current=c,E.current=N,O.current=n;const $=()=>{T.current&&(clearInterval(T.current),T.current=null),B.current=null,L.current&&(L.current.cancel(),L.current=null)};z(()=>{if(!R.current)return;const{hasChangedTo:v}=st(P.current,R.current);(v("action",[_.NEXT,_.PREV,_.SKIP,_.CLOSE])||l.current===_.CLOSE&&u===_.START)&&(l.current=u)},[u]),z(()=>{if(!R.current)return()=>{$()};const{hasChanged:v}=st(P.current,R.current),C=y.current;if(v("index")&&$(),w!==F.RUNNING||!C||d!==m.INIT)return()=>{$()};const{hasChangedTo:D}=st(P.current,R.current);D("status",F.RUNNING)&&[F.IDLE,F.READY,F.PAUSED].includes(R.current.status)&&r(H.TOUR_START,C),a.current.cleanupPositionData();const{debug:j}=b.current;if(C.before&&!L.current){G(j,`step:${g}`,"before()",C),L.current={cancel:()=>{}},a.current.updateState({waiting:!0}),r(H.STEP_BEFORE_HOOK,C,{action:l.current??P.current.action});const x=()=>{L.current=null,a.current.updateState({action:l.current??P.current.action,waiting:!1,lifecycle:m.READY})},A=new AbortController,M=C.beforeTimeout;L.current={cancel:()=>A.abort()};const W=M?setTimeout(()=>{A.signal.aborted||(G(j,`step:${g}`,"before()","timed out",`${M}ms`),A.abort(),e(C,"before_hook"),r(H.ERROR,C,{error:new Error("Step before hook timed out")}),x())},M):null;C.before({...a.current.getState(),action:l.current??a.current.getState().action,step:C}).then(()=>{A.signal.aborted||(W&&clearTimeout(W),x())}).catch(K=>{A.signal.aborted||(W&&clearTimeout(W),e(C,"before_hook"),r(H.ERROR,C,{error:K instanceof Error?K:new Error(String(K))}),x())})}else if(!L.current){T.current&&B.current!==C.target&&$();const x=J(C.target);if(x&&Ot(x))$(),a.current.updateState({action:l.current??_.UPDATE,lifecycle:m.READY,waiting:!1});else if(C.targetWaitTimeout===0)a.current.updateState({action:l.current??_.UPDATE,lifecycle:m.READY,waiting:!1});else if(!T.current){const{targetWaitTimeout:A}=C,M=Date.now();B.current=C.target,G(j,`step:${g}`,"polling","started",`${A}ms`),a.current.updateState({waiting:!0}),T.current=setInterval(()=>{const W=J(C.target),K=Date.now()-M,at=K>=A;(W&&Ot(W)||at)&&(G(j,`step:${g}`,"polling",W&&Ot(W)?"found":"timed out",`${K}ms`),$(),a.current.updateState({action:l.current??_.UPDATE,lifecycle:m.READY,waiting:!1}))},100)}}return()=>{$()}},[e,r,g,d,w,a]),z(()=>{if(!R.current)return;const{hasChanged:v,hasChangedTo:C,previous:D}=st(P.current,R.current),j=y.current;if(!j)return;const x=J(j.target),A=!!x;if(A&&Ot(x)){if(C("lifecycle",m.READY)&&D.lifecycle===m.INIT&&r(H.STEP_BEFORE,j,{action:l.current??P.current.action}),C("lifecycle",m.READY)){const M=P.current,W=wr(j,M,b.current.continuous)?m.TOOLTIP:m.BEACON,K=J(j.scrollTarget??j.spotlightTarget??j.target),at=Ee({isFirstStep:M.index===0,scrollToFirstStep:b.current.scrollToFirstStep,step:j,target:K,targetLifecycle:W}),xt=W===m.TOOLTIP?m.TOOLTIP_BEFORE:m.BEACON_BEFORE;G(b.current.debug,`step:${g}`,"scroll",at?"needed":"skipped"),a.current.updateState({action:_.UPDATE,lifecycle:xt,scrolling:at})}}else if(P.current.status===F.RUNNING&&d!==m.INIT&&d!==m.COMPLETE&&v("lifecycle")){G(b.current.debug,`step:${g}`,A?"Target not visible":"Target not mounted",j),e(j,"target_not_found"),r(H.TARGET_NOT_FOUND,j);const M=P.current;M.controlled||a.current.updateState({action:_.UPDATE,index:M.index+(M.action===_.PREV?-1:1),lifecycle:m.INIT})}},[e,r,g,d,a]),z(()=>{if(!R.current)return;const{hasChangedTo:v,previous:C}=st(P.current,R.current),D=y.current,j=E.current;if(D&&v("lifecycle",m.TOOLTIP_BEFORE)&&C.lifecycle===m.BEACON){const M=J(D.scrollTarget??D.spotlightTarget??D.target);if(Ee({isFirstStep:P.current.index===0,scrollToFirstStep:b.current.scrollToFirstStep,step:D,target:M,targetLifecycle:m.TOOLTIP})){a.current.updateState({scrolling:!0,positioned:!1});return}}const x=d===m.BEACON_BEFORE||d===m.TOOLTIP_BEFORE;if(D&&x&&!p){const M=d===m.TOOLTIP_BEFORE?m.TOOLTIP:m.BEACON;a.current.updateState({action:_.UPDATE,lifecycle:M})}D&&v("lifecycle",m.BEACON)&&r(H.BEACON,D),D&&v("lifecycle",m.TOOLTIP)&&r(H.TOOLTIP,D);const A=P.current;if((A.status===F.RUNNING||A.controlled&&A.status===F.PAUSED&&D)&&j&&v("lifecycle",m.COMPLETE)&&C.lifecycle===m.TOOLTIP&&(r(H.STEP_AFTER,j,{action:l.current??_.UPDATE,index:C.index??A.index,lifecycle:A.lifecycle}),j.after)){r(H.STEP_AFTER_HOOK,j,{action:l.current??_.UPDATE,index:C.index??A.index,lifecycle:A.lifecycle});try{j.after({...a.current.getState(),action:l.current??_.UPDATE,index:C.index??A.index,lifecycle:A.lifecycle,step:j})}catch{}}},[r,d,f,p,a]),z(()=>{if(!R.current)return;const{hasChangedTo:v,previous:C}=st(P.current,R.current),D=y.current,j=E.current;h&&!D&&d===m.INIT&&a.current.updateState({action:_.UPDATE,lifecycle:m.COMPLETE,status:F.FINISHED}),!P.current.controlled&&w===F.RUNNING&&v("lifecycle",m.COMPLETE)&&g<h&&a.current.updateState({action:_.UPDATE,lifecycle:m.INIT}),v("lifecycle",m.COMPLETE)&&g>=h&&a.current.updateState({action:_.UPDATE,lifecycle:m.COMPLETE,status:F.FINISHED});const x=D??j??Wt(b.current,b.current.steps[g-1]);if(x&&v("status",[F.FINISHED,F.SKIPPED])){let A;D?A=g:j?A=C.index??g:A=g-1,r(H.TOUR_END,x,{index:A}),P.current.controlled||O.current.reset(),l.current=null}D&&v("action",_.STOP)&&(l.current=null,r(H.TOUR_STATUS,D)),D&&v("action",_.RESET)&&(r(H.TOUR_STATUS,D),l.current=null)},[u,r,g,d,h,w,a])}function Ar({controls:t,emitEvent:e,props:n,state:r,store:o}){const{debug:i,initialStepIndex:s,run:c,stepIndex:a,steps:u}=n,g=I(void 0),d=I(r),f=I(t);d.current=r,f.current=t,z(()=>{const p=g.current;if(g.current=n,!p||n===p)return;const{hasChanged:h}=st(n,p);if(At(p.steps,u)||(Oe(u,i)?o.current.setSteps(u):(G(i,"tour","Steps are not valid",u),e(H.ERROR,u[0]??{target:"",content:""},{error:new Error("Steps are not valid")}))),h("run"))c?o.current.getState().size&&f.current.start(a??s):f.current.stop();else if(V.number(a)&&h("stepIndex")){const w=V.number(p.stepIndex)&&p.stepIndex<a?_.NEXT:_.PREV;[F.FINISHED,F.SKIPPED].includes(d.current.status)||o.current.updateState({action:w,index:a,lifecycle:m.INIT,positioned:!1},!0)}},[i,e,s,n,c,a,u,o])}function Ir(t,e){var n,r,o,i;const{beaconPosition:s,lifecycle:c,scrollOffset:a,step:u}=e;if(u.scrollTarget||u.spotlightTarget)return Math.max(0,t);let g=t-u.spotlightPadding.top;if(c===m.BEACON_BEFORE&&s!=null&&s.placement){const d=Nr(s);["bottom"].includes(s.placement)||(g+=Math.floor(d-a))}else if(c===m.TOOLTIP_BEFORE){const{placement:d}=u;if(d==="top"){const f=((n=document.querySelector(".react-joyride__floater"))==null?void 0:n.getBoundingClientRect().height)??0,p=(r=u.floatingOptions)!=null&&r.hideArrow?0:u.arrowSize,h=u.offset+u.spotlightPadding.top+p;g-=f+h}else if(d==="left"||d==="right"){const f=((o=document.querySelector(".react-joyride__floater"))==null?void 0:o.getBoundingClientRect().height)??0,p=((i=J(u.target))==null?void 0:i.getBoundingClientRect().height)??0,h=a+u.spotlightPadding.top+p/2-f/2;h<a&&(g-=a-h)}}return Math.max(0,g)}function Nr(t){var e;const n=(e=t.middlewareData)==null?void 0:e.offset;return n?["left","right"].some(r=>t.placement.startsWith(r))?n.x:n.y:0}function kr({emitEvent:t,previousState:e,props:n,state:r,step:o,store:i}){const{index:s,lifecycle:c,positioned:a,scrolling:u,status:g}=r,d=I(null),f=I(r),p=I(e),h=I(n),w=I(o);f.current=r,p.current=e,h.current=n,w.current=o,z(()=>()=>{var N;(N=d.current)==null||N.call(d)},[]),z(()=>{var N;if(!p.current||!w.current)return;const{hasChangedTo:l}=st(f.current,p.current),b=w.current,{debug:P}=h.current,{scrollDuration:R}=b,y=c===m.BEACON_BEFORE||c===m.TOOLTIP_BEFORE;if(g===F.RUNNING&&y&&u&&l("positioned",!0)){const E=J(b.scrollTarget??b.spotlightTarget??b.target),O=i.current.getPositionData("beacon"),T=dt(E),B=T?!T.isSameNode(Z()):!1;(N=d.current)==null||N.call(d),(async()=>{if(B&&!pt(T)){const x=Z(),A=fr(T),M={initial:x.scrollTop,target:A,element:x,duration:R};t(H.SCROLL_START,b,{scroll:M});const{cancel:W,promise:K}=we(A,{element:x,duration:R});d.current=W,await K,t(H.SCROLL_END,b,{scroll:M})}const L=Math.floor(gr(E,b.scrollOffset))||0,$=B?L:Ir(L,{beaconPosition:O,lifecycle:c,scrollOffset:b.scrollOffset,step:b});G(P,`step:${s}`,"scroll",B?"custom":"document",`${L} \u2192 ${$}`);const v=T,C={initial:v.scrollTop,target:$,element:v,duration:R};t(H.SCROLL_START,b,{scroll:C});const{cancel:D,promise:j}=we($,{element:v,duration:R});d.current=D,await j,t(H.SCROLL_END,b,{scroll:C}),i.current.updateState({scrolling:!1})})().catch(()=>{i.current.updateState({scrolling:!1})})}},[t,s,c,a,u,g,i])}function Rr(t){const e=pn(()=>lr(sr,t),[t]),{debug:n,initialStepIndex:r,onEvent:o,run:i,stepIndex:s,steps:c}=e,a=I(Sr(e)),u=Le.useSyncExternalStore(a.current.subscribe,a.current.getSnapshot,a.current.getServerSnapshot),[g,d]=tt([]),f=X((y,E)=>{d(O=>[...O,{reason:E,step:y}])},[]),p=X(()=>{d([])},[]);xr(a,n);const h=Or(a,n,p),w=Pr(o,h,a),{index:N,size:l,status:b}=u,P=ee(u),R=q(()=>Wt(e,c[N]),[N,e,c]);return fn(()=>{i&&l&&Oe(c,n)&&h.start(s??r)}),dn(()=>{i&&l&&b===F.IDLE&&a.current.updateState({status:F.READY})},[i,l,b]),Ar({controls:h,emitEvent:w,props:e,state:u,store:a}),Cr({addFailure:f,controls:h,emitEvent:w,previousState:P,props:e,state:u,step:R,store:a}),kr({emitEvent:w,previousState:P,props:e,state:u,step:R,store:a}),{controls:h,failures:g,mergedProps:e,state:u,step:R,store:a}}function Lr(t){const[e,n]=tt(null);return z(()=>{let r=null,o=!1;if(t)if(V.domElement(t))r=t,o=!0;else{const i=document.querySelector(t);i&&(r=i)}else{const i=document.createElement("div");i.id=ar,document.body.appendChild(i),r=i}return n(r),()=>{!r||o||r.parentNode===document.body&&document.body.removeChild(r)}},[t]),e}const Fr={animation:"joyride-loader-spin 1s linear infinite",border:"5px solid rgba(0, 0, 0, 0.1)",borderRadius:"50%",borderTopColor:"#555"};function _r({nonce:t,step:e}){const{loaderComponent:n}=e,r=!!n;if(z(()=>{if(r||document.getElementById("joyride-loader-animation"))return Mt;const a=document.createElement("style");return a.id="joyride-loader-animation",t&&a.setAttribute("nonce",t),a.appendChild(document.createTextNode(`
2
2
  @keyframes joyride-loader-spin {
3
3
  to { transform: rotate(360deg); }
4
4
  }
@@ -1 +1 @@
1
- import{jsx as a,jsxs as J}from"react/jsx-runtime";import{useState as y,useMemo as C,useRef as X,useCallback as q,useEffect as V}from"react";import{v as z,bC as H,cj as Z,eo as K,ep as Y,eq as ee,er as te,es as k,et as ae,bG as re,j as L,eu as oe,ev as se,ew as ie,bZ as ne,ai as le,aB as W,bE as de,ex as me,ey as ce,ez as ue,eA as pe,eB as we,eC as he,aG as ge,aO as fe}from"./runtime-CmCxTPcG.js";import"react-dom";import"react-dom/client";const b=5e4,xe=e=>e==null?"":e instanceof Date?e.toISOString():typeof e=="number"?e:String(e),Ce=(e,s,t)=>{if(s.length===0)return[];const m=new Map((t??[]).map(r=>[r.columnName,r.columnLabel])),c=s.map(r=>m.get(r)??r),n=e.map(r=>s.map(p=>xe(r[z(p)])));return[c,...n]},ve=({exportQueryParams:e,columns:s,datasetColumns:t,fileName:m,dashboardId:c,widgetId:n,widgetType:r})=>{const[p,f]=y(!1),{toast:u}=H(),{captureException:v}=Z(),{logInsightsEvent:i}=K();return{isExporting:p,exportCsv:async()=>{var w;if(s.length===0){u({title:"No columns selected",description:"Select at least one column to export.",variant:"warning"});return}f(!0);try{const o=await Y({...e,rowLimit:b,rowOffset:0}),l=o==null?void 0:o.statusCode;if(l!==void 0&&(l<200||l>=300))throw new Error(`Raw data request failed with status ${l}`);const d=o==null?void 0:o.data,h=(d==null?void 0:d.data)??[],g=((w=d==null?void 0:d.metadata)==null?void 0:w.totalCount)??h.length;if(h.length===0){u({title:"No data to export",description:"This widget has no raw data to export.",variant:"warning"});return}const S=Ce(h,s,t);ee(S,te(m||"raw-data")),c&&i(k.INSIGHTS_V2.EXPORT_DOCUMENT_ACTIONS.VALUE,k.INSIGHTS_V2.EXPORT_DOCUMENT_ACTIONS.ACTIONS.EXPORT_WIDGET_RAW_DATA_CSV,{dashboard_id:c,widget_id:n,widget_type:r}),g>b&&u({title:`Export limited to ${b.toLocaleString()} rows`,description:`Exported the first ${b.toLocaleString()} of ${g.toLocaleString()} rows in the table's default order \u2014 sorting isn't applied to exports, so these may differ from a sorted view. Refine the filters to export a narrower set.`,variant:"warning"})}catch(o){v({error:o instanceof Error?o:new Error(String(o)),contexts:{payload:{datasetName:e.datasetName,fileName:m}}}),u({title:"Export failed",description:"Could not export the raw data as CSV. Please try again.",variant:"destructive"})}finally{f(!1)}}}},De=({isExporting:e,onExport:s,disabled:t})=>{const m=ae()?"border-[var(--dash-card-border)] bg-[var(--dash-card-bg)] text-[color:var(--dash-text-secondary)]":"border-gray-300 bg-white text-gray-500 dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-400";return a("span",{className:"inline-flex shrink-0",children:a(re,{type:"button",variant:"ghost",size:"iconSm",onClick:s,disabled:t||e,icon:e?a(oe,{className:"animate-spin"}):a(se,{}),tooltip:e?"Preparing CSV":"Download CSV","data-testid":"widget-raw-data-export-csv","aria-label":"Download raw data as CSV",className:L("border shadow-sm",m)})})},be=({rawDataQueryParams:e,exportFileName:s,isActive:t,showDateFilter:m=!1,seedDateFilters:c,dashboardId:n,widgetId:r,widgetType:p,compact:f,showExportCapWarning:u=!0,onExportControllerChange:v,hideToolbarExportButton:i=!1})=>{const w=e.datasetName,{datasetColumns:o,availableDateColumns:l,defaultDateColumn:d,isLoading:h}=ie(w,!!w&&t);return J("div",{className:"flex h-full min-h-0 flex-col",children:[u&&J("p",{className:"flex shrink-0 items-center gap-1.5 px-4 text-xs text-warning",children:[a(ne,{className:"h-3 w-3 shrink-0"}),J("span",{children:["CSV export is limited to the first ",b.toLocaleString()," rows."]})]}),t&&a("div",{className:L("min-h-0 flex-1 overflow-y-auto px-4 pt-2"),children:a(le,{children:h?a("div",{className:"flex h-64 items-center justify-center",children:a(W,{})}):a(Ne,{rawDataQueryParams:e,exportFileName:s,showDateFilter:m,seedDateFilters:c,datasetColumns:o,availableDateColumns:l,defaultDateColumn:d,dashboardId:n,widgetId:r,widgetType:p,compact:f,onExportControllerChange:v,hideToolbarExportButton:i})})})]})},Ne=({rawDataQueryParams:e,exportFileName:s,showDateFilter:t,seedDateFilters:m,datasetColumns:c,availableDateColumns:n,defaultDateColumn:r,dashboardId:p,widgetId:f,widgetType:u,compact:v,onExportControllerChange:i,hideToolbarExportButton:w})=>{const o=e.datasetName,{timeWindowDescriptors:l}=de(),d=C(()=>new Set(t?n.map(x=>x.columnName):[]),[t,n]),h=C(()=>me([...e.rawDataFilterJson||[],...e.filterJson||[]]),[e.rawDataFilterJson,e.filterJson]),{permanentNonDateRows:g,panelFilters:S}=C(()=>ce(e.rawDataFilterJson,e.filterJson,x=>d.has(x)),[e.rawDataFilterJson,e.filterJson,d]),[N,j]=y(()=>{if(!t)return[];const x=(m??[]).filter(_=>d.has(_.columnName));return x.length>0?x:ue(h.filter(_=>d.has(_.filterColumn)),n,r)}),[T,M]=y(()=>S),[D,Q]=y(e.columnsToSelect??[]),E=C(()=>t?pe(N,l):[],[t,N,l]),F=t&&l.length===0&&we(N),B=C(()=>({...e,filterJson:null,rawDataFilterJson:[...E,...g]}),[e,E,g]),G=C(()=>({...e,columnsToSelect:D,filterJson:null,rawDataFilterJson:[...E,...g,...T],kpiComparisonPeriod:he.None}),[e,D,E,g,T]),$=s||o||"Raw Data",{isExporting:I,exportCsv:R}=ve({exportQueryParams:G,columns:D,datasetColumns:c,fileName:$,dashboardId:p,widgetId:f,widgetType:u}),O=X(R);O.current=R;const A=q(()=>{O.current()},[]),P=D.length===0;V(()=>{if(F){i==null||i(null);return}i==null||i({exportCsv:A,isExporting:I,disabled:P})},[i,A,I,P,F]),V(()=>()=>i==null?void 0:i(null),[i]);const U=t&&n.length>0&&o?a(ge,{layout:"dropdowns",availableDateColumns:n,defaultDateColumn:r,dateFilters:N,onDateFiltersChange:j,timeWindowDescriptors:l,datasetName:o,allowRemovePrimary:!0,allowFutureDates:!0,lastRemovalDescription:"Removing the last date filter shows all dates in this raw data."}):void 0;return F?a("div",{className:"flex h-64 items-center justify-center",children:a(W,{})}):a(fe,{rawDataQueryParams:B,selectedColumns:D,onColumnsChange:Q,filterMenuItems:T,onFilterMenuChange:M,timeWindowSelector:U,toolbarActions:w?void 0:a(De,{isExporting:I,onExport:R,disabled:P}),compact:v})};export{be as WidgetRawDataView};
1
+ import{jsx as a,jsxs as J}from"react/jsx-runtime";import{useState as y,useMemo as C,useRef as X,useCallback as q,useEffect as V}from"react";import{v as z,bC as H,cj as Z,eo as K,ep as Y,eq as ee,er as te,es as k,et as ae,bG as re,j as L,eu as oe,ev as se,ew as ie,bZ as ne,ai as le,aB as W,bE as de,ex as me,ey as ce,ez as ue,eA as pe,eB as we,eC as he,aG as ge,aO as fe}from"./runtime-Ci9GR285.js";import"react-dom";import"react-dom/client";const b=5e4,xe=e=>e==null?"":e instanceof Date?e.toISOString():typeof e=="number"?e:String(e),Ce=(e,s,t)=>{if(s.length===0)return[];const m=new Map((t??[]).map(r=>[r.columnName,r.columnLabel])),c=s.map(r=>m.get(r)??r),n=e.map(r=>s.map(p=>xe(r[z(p)])));return[c,...n]},ve=({exportQueryParams:e,columns:s,datasetColumns:t,fileName:m,dashboardId:c,widgetId:n,widgetType:r})=>{const[p,f]=y(!1),{toast:u}=H(),{captureException:v}=Z(),{logInsightsEvent:i}=K();return{isExporting:p,exportCsv:async()=>{var w;if(s.length===0){u({title:"No columns selected",description:"Select at least one column to export.",variant:"warning"});return}f(!0);try{const o=await Y({...e,rowLimit:b,rowOffset:0}),l=o==null?void 0:o.statusCode;if(l!==void 0&&(l<200||l>=300))throw new Error(`Raw data request failed with status ${l}`);const d=o==null?void 0:o.data,h=(d==null?void 0:d.data)??[],g=((w=d==null?void 0:d.metadata)==null?void 0:w.totalCount)??h.length;if(h.length===0){u({title:"No data to export",description:"This widget has no raw data to export.",variant:"warning"});return}const S=Ce(h,s,t);ee(S,te(m||"raw-data")),c&&i(k.INSIGHTS_V2.EXPORT_DOCUMENT_ACTIONS.VALUE,k.INSIGHTS_V2.EXPORT_DOCUMENT_ACTIONS.ACTIONS.EXPORT_WIDGET_RAW_DATA_CSV,{dashboard_id:c,widget_id:n,widget_type:r}),g>b&&u({title:`Export limited to ${b.toLocaleString()} rows`,description:`Exported the first ${b.toLocaleString()} of ${g.toLocaleString()} rows in the table's default order \u2014 sorting isn't applied to exports, so these may differ from a sorted view. Refine the filters to export a narrower set.`,variant:"warning"})}catch(o){v({error:o instanceof Error?o:new Error(String(o)),contexts:{payload:{datasetName:e.datasetName,fileName:m}}}),u({title:"Export failed",description:"Could not export the raw data as CSV. Please try again.",variant:"destructive"})}finally{f(!1)}}}},De=({isExporting:e,onExport:s,disabled:t})=>{const m=ae()?"border-[var(--dash-card-border)] bg-[var(--dash-card-bg)] text-[color:var(--dash-text-secondary)]":"border-gray-300 bg-white text-gray-500 dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-400";return a("span",{className:"inline-flex shrink-0",children:a(re,{type:"button",variant:"ghost",size:"iconSm",onClick:s,disabled:t||e,icon:e?a(oe,{className:"animate-spin"}):a(se,{}),tooltip:e?"Preparing CSV":"Download CSV","data-testid":"widget-raw-data-export-csv","aria-label":"Download raw data as CSV",className:L("border shadow-sm",m)})})},be=({rawDataQueryParams:e,exportFileName:s,isActive:t,showDateFilter:m=!1,seedDateFilters:c,dashboardId:n,widgetId:r,widgetType:p,compact:f,showExportCapWarning:u=!0,onExportControllerChange:v,hideToolbarExportButton:i=!1})=>{const w=e.datasetName,{datasetColumns:o,availableDateColumns:l,defaultDateColumn:d,isLoading:h}=ie(w,!!w&&t);return J("div",{className:"flex h-full min-h-0 flex-col",children:[u&&J("p",{className:"flex shrink-0 items-center gap-1.5 px-4 text-xs text-warning",children:[a(ne,{className:"h-3 w-3 shrink-0"}),J("span",{children:["CSV export is limited to the first ",b.toLocaleString()," rows."]})]}),t&&a("div",{className:L("min-h-0 flex-1 overflow-y-auto px-4 pt-2"),children:a(le,{children:h?a("div",{className:"flex h-64 items-center justify-center",children:a(W,{})}):a(Ne,{rawDataQueryParams:e,exportFileName:s,showDateFilter:m,seedDateFilters:c,datasetColumns:o,availableDateColumns:l,defaultDateColumn:d,dashboardId:n,widgetId:r,widgetType:p,compact:f,onExportControllerChange:v,hideToolbarExportButton:i})})})]})},Ne=({rawDataQueryParams:e,exportFileName:s,showDateFilter:t,seedDateFilters:m,datasetColumns:c,availableDateColumns:n,defaultDateColumn:r,dashboardId:p,widgetId:f,widgetType:u,compact:v,onExportControllerChange:i,hideToolbarExportButton:w})=>{const o=e.datasetName,{timeWindowDescriptors:l}=de(),d=C(()=>new Set(t?n.map(x=>x.columnName):[]),[t,n]),h=C(()=>me([...e.rawDataFilterJson||[],...e.filterJson||[]]),[e.rawDataFilterJson,e.filterJson]),{permanentNonDateRows:g,panelFilters:S}=C(()=>ce(e.rawDataFilterJson,e.filterJson,x=>d.has(x)),[e.rawDataFilterJson,e.filterJson,d]),[N,j]=y(()=>{if(!t)return[];const x=(m??[]).filter(_=>d.has(_.columnName));return x.length>0?x:ue(h.filter(_=>d.has(_.filterColumn)),n,r)}),[T,M]=y(()=>S),[D,Q]=y(e.columnsToSelect??[]),E=C(()=>t?pe(N,l):[],[t,N,l]),F=t&&l.length===0&&we(N),B=C(()=>({...e,filterJson:null,rawDataFilterJson:[...E,...g]}),[e,E,g]),G=C(()=>({...e,columnsToSelect:D,filterJson:null,rawDataFilterJson:[...E,...g,...T],kpiComparisonPeriod:he.None}),[e,D,E,g,T]),$=s||o||"Raw Data",{isExporting:I,exportCsv:R}=ve({exportQueryParams:G,columns:D,datasetColumns:c,fileName:$,dashboardId:p,widgetId:f,widgetType:u}),O=X(R);O.current=R;const A=q(()=>{O.current()},[]),P=D.length===0;V(()=>{if(F){i==null||i(null);return}i==null||i({exportCsv:A,isExporting:I,disabled:P})},[i,A,I,P,F]),V(()=>()=>i==null?void 0:i(null),[i]);const U=t&&n.length>0&&o?a(ge,{layout:"dropdowns",availableDateColumns:n,defaultDateColumn:r,dateFilters:N,onDateFiltersChange:j,timeWindowDescriptors:l,datasetName:o,allowRemovePrimary:!0,allowFutureDates:!0,lastRemovalDescription:"Removing the last date filter shows all dates in this raw data."}):void 0;return F?a("div",{className:"flex h-64 items-center justify-center",children:a(W,{})}):a(fe,{rawDataQueryParams:B,selectedColumns:D,onColumnsChange:Q,filterMenuItems:T,onFilterMenuChange:M,timeWindowSelector:U,toolbarActions:w?void 0:a(De,{isExporting:I,onExport:R,disabled:P}),compact:v})};export{be as WidgetRawDataView};
@@ -1 +1 @@
1
- import{dA as L}from"./runtime-CmCxTPcG.js";function D(E,I){for(var O=0;O<I.length;O++){const N=I[O];if(typeof N!="string"&&!Array.isArray(N)){for(const T in N)if(T!=="default"&&!(T in E)){const A=Object.getOwnPropertyDescriptor(N,T);A&&Object.defineProperty(E,T,A.get?A:{enumerable:!0,get:()=>N[T]})}}}return Object.freeze(Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}))}var S,R;function P(){if(R)return S;R=1,S=E,E.displayName="abap",E.aliases=[];function E(I){I.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:SCIENTIFIC_WITH_LEADING_ZERO|SCALE_PRESERVING_SCIENTIFIC|RMC_COMMUNICATION_FAILURE|END-ENHANCEMENT-SECTION|MULTIPLY-CORRESPONDING|SUBTRACT-CORRESPONDING|VERIFICATION-MESSAGE|DIVIDE-CORRESPONDING|ENHANCEMENT-SECTION|CURRENCY_CONVERSION|RMC_SYSTEM_FAILURE|START-OF-SELECTION|MOVE-CORRESPONDING|RMC_INVALID_STATUS|CUSTOMER-FUNCTION|END-OF-DEFINITION|ENHANCEMENT-POINT|SYSTEM-EXCEPTIONS|ADD-CORRESPONDING|SCALE_PRESERVING|SELECTION-SCREEN|CURSOR-SELECTION|END-OF-SELECTION|LOAD-OF-PROGRAM|SCROLL-BOUNDARY|SELECTION-TABLE|EXCEPTION-TABLE|IMPLEMENTATIONS|PARAMETER-TABLE|RIGHT-JUSTIFIED|UNIT_CONVERSION|AUTHORITY-CHECK|LIST-PROCESSING|SIGN_AS_POSTFIX|COL_BACKGROUND|IMPLEMENTATION|INTERFACE-POOL|TRANSFORMATION|IDENTIFICATION|ENDENHANCEMENT|LINE-SELECTION|INITIALIZATION|LEFT-JUSTIFIED|SELECT-OPTIONS|SELECTION-SETS|COMMUNICATION|CORRESPONDING|DECIMAL_SHIFT|PRINT-CONTROL|VALUE-REQUEST|CHAIN-REQUEST|FUNCTION-POOL|FIELD-SYMBOLS|FUNCTIONALITY|INVERTED-DATE|SELECTION-SET|CLASS-METHODS|OUTPUT-LENGTH|CLASS-CODING|COL_NEGATIVE|ERRORMESSAGE|FIELD-GROUPS|HELP-REQUEST|NO-EXTENSION|NO-TOPOFPAGE|REDEFINITION|DISPLAY-MODE|ENDINTERFACE|EXIT-COMMAND|FIELD-SYMBOL|NO-SCROLLING|SHORTDUMP-ID|ACCESSPOLICY|CLASS-EVENTS|COL_POSITIVE|DECLARATIONS|ENHANCEMENTS|FILTER-TABLE|SWITCHSTATES|SYNTAX-CHECK|TRANSPORTING|ASYNCHRONOUS|SYNTAX-TRACE|TOKENIZATION|USER-COMMAND|WITH-HEADING|ABAP-SOURCE|BREAK-POINT|CHAIN-INPUT|COMPRESSION|FIXED-POINT|NEW-SECTION|NON-UNICODE|OCCURRENCES|RESPONSIBLE|SYSTEM-CALL|TRACE-TABLE|ABBREVIATED|CHAR-TO-HEX|END-OF-FILE|ENDFUNCTION|ENVIRONMENT|ASSOCIATION|COL_HEADING|EDITOR-CALL|END-OF-PAGE|ENGINEERING|IMPLEMENTED|INTENSIFIED|RADIOBUTTON|SYSTEM-EXIT|TOP-OF-PAGE|TRANSACTION|APPLICATION|CONCATENATE|DESTINATION|ENHANCEMENT|IMMEDIATELY|NO-GROUPING|PRECOMPILED|REPLACEMENT|TITLE-LINES|ACTIVATION|BYTE-ORDER|CLASS-POOL|CONNECTION|CONVERSION|DEFINITION|DEPARTMENT|EXPIRATION|INHERITING|MESSAGE-ID|NO-HEADING|PERFORMING|QUEUE-ONLY|RIGHTSPACE|SCIENTIFIC|STATUSINFO|STRUCTURES|SYNCPOINTS|WITH-TITLE|ATTRIBUTES|BOUNDARIES|CLASS-DATA|COL_NORMAL|DD\/MM\/YYYY|DESCENDING|INTERFACES|LINE-COUNT|MM\/DD\/YYYY|NON-UNIQUE|PRESERVING|SELECTIONS|STATEMENTS|SUBROUTINE|TRUNCATION|TYPE-POOLS|ARITHMETIC|BACKGROUND|ENDPROVIDE|EXCEPTIONS|IDENTIFIER|INDEX-LINE|OBLIGATORY|PARAMETERS|PERCENTAGE|PUSHBUTTON|RESOLUTION|COMPONENTS|DEALLOCATE|DISCONNECT|DUPLICATES|FIRST-LINE|HEAD-LINES|NO-DISPLAY|OCCURRENCE|RESPECTING|RETURNCODE|SUBMATCHES|TRACE-FILE|ASCENDING|BYPASSING|ENDMODULE|EXCEPTION|EXCLUDING|EXPORTING|INCREMENT|MATCHCODE|PARAMETER|PARTIALLY|PREFERRED|REFERENCE|REPLACING|RETURNING|SELECTION|SEPARATED|SPECIFIED|STATEMENT|TIMESTAMP|TYPE-POOL|ACCEPTING|APPENDAGE|ASSIGNING|COL_GROUP|COMPARING|CONSTANTS|DANGEROUS|IMPORTING|INSTANCES|LEFTSPACE|LOG-POINT|QUICKINFO|READ-ONLY|SCROLLING|SQLSCRIPT|STEP-LOOP|TOP-LINES|TRANSLATE|APPENDING|AUTHORITY|CHARACTER|COMPONENT|CONDITION|DIRECTORY|DUPLICATE|MESSAGING|RECEIVING|SUBSCREEN|ACCORDING|COL_TOTAL|END-LINES|ENDMETHOD|ENDSELECT|EXPANDING|EXTENSION|INCLUDING|INFOTYPES|INTERFACE|INTERVALS|LINE-SIZE|PF-STATUS|PROCEDURE|PROTECTED|REQUESTED|RESUMABLE|RIGHTPLUS|SAP-SPOOL|SECONDARY|STRUCTURE|SUBSTRING|TABLEVIEW|NUMOFCHAR|ADJACENT|ANALYSIS|ASSIGNED|BACKWARD|CHANNELS|CHECKBOX|CONTINUE|CRITICAL|DATAINFO|DD\/MM\/YY|DURATION|ENCODING|ENDCLASS|FUNCTION|LEFTPLUS|LINEFEED|MM\/DD\/YY|OVERFLOW|RECEIVED|SKIPPING|SORTABLE|STANDARD|SUBTRACT|SUPPRESS|TABSTRIP|TITLEBAR|TRUNCATE|UNASSIGN|WHENEVER|ANALYZER|COALESCE|COMMENTS|CONDENSE|DECIMALS|DEFERRED|ENDWHILE|EXPLICIT|KEYWORDS|MESSAGES|POSITION|PRIORITY|RECEIVER|RENAMING|TIMEZONE|TRAILING|ALLOCATE|CENTERED|CIRCULAR|CONTROLS|CURRENCY|DELETING|DESCRIBE|DISTANCE|ENDCATCH|EXPONENT|EXTENDED|GENERATE|IGNORING|INCLUDES|INTERNAL|MAJOR-ID|MODIFIER|NEW-LINE|OPTIONAL|PROPERTY|ROLLBACK|STARTING|SUPPLIED|ABSTRACT|CHANGING|CONTEXTS|CREATING|CUSTOMER|DATABASE|DAYLIGHT|DEFINING|DISTINCT|DIVISION|ENABLING|ENDCHAIN|ESCAPING|HARMLESS|IMPLICIT|INACTIVE|LANGUAGE|MINOR-ID|MULTIPLY|NEW-PAGE|NO-TITLE|POS_HIGH|SEPARATE|TEXTPOOL|TRANSFER|SELECTOR|DBMAXLEN|ITERATOR|ARCHIVE|BIT-XOR|BYTE-CO|COLLECT|COMMENT|CURRENT|DEFAULT|DISPLAY|ENDFORM|EXTRACT|LEADING|LISTBOX|LOCATOR|MEMBERS|METHODS|NESTING|POS_LOW|PROCESS|PROVIDE|RAISING|RESERVE|SECONDS|SUMMARY|VISIBLE|BETWEEN|BIT-AND|BYTE-CS|CLEANUP|COMPUTE|CONTROL|CONVERT|DATASET|ENDCASE|FORWARD|HEADERS|HOTSPOT|INCLUDE|INVERSE|KEEPING|NO-ZERO|OBJECTS|OVERLAY|PADDING|PATTERN|PROGRAM|REFRESH|SECTION|SUMMING|TESTING|VERSION|WINDOWS|WITHOUT|BIT-NOT|BYTE-CA|BYTE-NA|CASTING|CONTEXT|COUNTRY|DYNAMIC|ENABLED|ENDLOOP|EXECUTE|FRIENDS|HANDLER|HEADING|INITIAL|\*-INPUT|LOGFILE|MAXIMUM|MINIMUM|NO-GAPS|NO-SIGN|PRAGMAS|PRIMARY|PRIVATE|REDUCED|REPLACE|REQUEST|RESULTS|UNICODE|WARNING|ALIASES|BYTE-CN|BYTE-NS|CALLING|COL_KEY|COLUMNS|CONNECT|ENDEXEC|ENTRIES|EXCLUDE|FILTERS|FURTHER|HELP-ID|LOGICAL|MAPPING|MESSAGE|NAMETAB|OPTIONS|PACKAGE|PERFORM|RECEIVE|STATICS|VARYING|BINDING|CHARLEN|GREATER|XSTRLEN|ACCEPT|APPEND|DETAIL|ELSEIF|ENDING|ENDTRY|FORMAT|FRAMES|GIVING|HASHED|HEADER|IMPORT|INSERT|MARGIN|MODULE|NATIVE|OBJECT|OFFSET|REMOTE|RESUME|SAVING|SIMPLE|SUBMIT|TABBED|TOKENS|UNIQUE|UNPACK|UPDATE|WINDOW|YELLOW|ACTUAL|ASPECT|CENTER|CURSOR|DELETE|DIALOG|DIVIDE|DURING|ERRORS|EVENTS|EXTEND|FILTER|HANDLE|HAVING|IGNORE|LITTLE|MEMORY|NO-GAP|OCCURS|OPTION|PERSON|PLACES|PUBLIC|REDUCE|REPORT|RESULT|SINGLE|SORTED|SWITCH|SYNTAX|TARGET|VALUES|WRITER|ASSERT|BLOCKS|BOUNDS|BUFFER|CHANGE|COLUMN|COMMIT|CONCAT|COPIES|CREATE|DDMMYY|DEFINE|ENDIAN|ESCAPE|EXPAND|KERNEL|LAYOUT|LEGACY|LEVELS|MMDDYY|NUMBER|OUTPUT|RANGES|READER|RETURN|SCREEN|SEARCH|SELECT|SHARED|SOURCE|STABLE|STATIC|SUBKEY|SUFFIX|TABLES|UNWIND|YYMMDD|ASSIGN|BACKUP|BEFORE|BINARY|BIT-OR|BLANKS|CLIENT|CODING|COMMON|DEMAND|DYNPRO|EXCEPT|EXISTS|EXPORT|FIELDS|GLOBAL|GROUPS|LENGTH|LOCALE|MEDIUM|METHOD|MODIFY|NESTED|OTHERS|REJECT|SCROLL|SUPPLY|SYMBOL|ENDFOR|STRLEN|ALIGN|BEGIN|BOUND|ENDAT|ENTRY|EVENT|FINAL|FLUSH|GRANT|INNER|SHORT|USING|WRITE|AFTER|BLACK|BLOCK|CLOCK|COLOR|COUNT|DUMMY|EMPTY|ENDDO|ENDON|GREEN|INDEX|INOUT|LEAVE|LEVEL|LINES|MODIF|ORDER|OUTER|RANGE|RESET|RETRY|RIGHT|SMART|SPLIT|STYLE|TABLE|THROW|UNDER|UNTIL|UPPER|UTF-8|WHERE|ALIAS|BLANK|CLEAR|CLOSE|EXACT|FETCH|FIRST|FOUND|GROUP|LLANG|LOCAL|OTHER|REGEX|SPOOL|TITLE|TYPES|VALID|WHILE|ALPHA|BOXED|CATCH|CHAIN|CHECK|CLASS|COVER|ENDIF|EQUIV|FIELD|FLOOR|FRAME|INPUT|LOWER|MATCH|NODES|PAGES|PRINT|RAISE|ROUND|SHIFT|SPACE|SPOTS|STAMP|STATE|TASKS|TIMES|TRMAC|ULINE|UNION|VALUE|WIDTH|EQUAL|LOG10|TRUNC|BLOB|CASE|CEIL|CLOB|COND|EXIT|FILE|GAPS|HOLD|INCL|INTO|KEEP|KEYS|LAST|LINE|LONG|LPAD|MAIL|MODE|OPEN|PINK|READ|ROWS|TEST|THEN|ZERO|AREA|BACK|BADI|BYTE|CAST|EDIT|EXEC|FAIL|FIND|FKEQ|FONT|FREE|GKEQ|HIDE|INIT|ITNO|LATE|LOOP|MAIN|MARK|MOVE|NEXT|NULL|RISK|ROLE|UNIT|WAIT|ZONE|BASE|CALL|CODE|DATA|DATE|FKGE|GKGE|HIGH|KIND|LEFT|LIST|MASK|MESH|NAME|NODE|PACK|PAGE|POOL|SEND|SIGN|SIZE|SOME|STOP|TASK|TEXT|TIME|USER|VARY|WITH|WORD|BLUE|CONV|COPY|DEEP|ELSE|FORM|FROM|HINT|ICON|JOIN|LIKE|LOAD|ONLY|PART|SCAN|SKIP|SORT|TYPE|UNIX|VIEW|WHEN|WORK|ACOS|ASIN|ATAN|COSH|EACH|FRAC|LESS|RTTI|SINH|SQRT|TANH|AVG|BIT|DIV|ISO|LET|OUT|PAD|SQL|ALL|CI_|CPI|END|LOB|LPI|MAX|MIN|NEW|OLE|RUN|SET|\?TO|YES|ABS|ADD|AND|BIG|FOR|HDB|JOB|LOW|NOT|SAP|TRY|VIA|XML|ANY|GET|IDS|KEY|MOD|OFF|PUT|RAW|RED|REF|SUM|TAB|XSD|CNT|COS|EXP|LOG|SIN|TAN|XOR|AT|CO|CP|DO|GT|ID|IF|NS|OR|BT|CA|CS|GE|NA|NB|EQ|IN|LT|NE|NO|OF|ON|PF|TO|AS|BY|CN|IS|LE|NP|UP|E|I|M|O|Z|C|X)\b/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/}}return S}var C=P();const M=L(C),U=D({__proto__:null,default:M},[C]);export{U as a};
1
+ import{dA as L}from"./runtime-Ci9GR285.js";function D(E,I){for(var O=0;O<I.length;O++){const N=I[O];if(typeof N!="string"&&!Array.isArray(N)){for(const T in N)if(T!=="default"&&!(T in E)){const A=Object.getOwnPropertyDescriptor(N,T);A&&Object.defineProperty(E,T,A.get?A:{enumerable:!0,get:()=>N[T]})}}}return Object.freeze(Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}))}var S,R;function P(){if(R)return S;R=1,S=E,E.displayName="abap",E.aliases=[];function E(I){I.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:SCIENTIFIC_WITH_LEADING_ZERO|SCALE_PRESERVING_SCIENTIFIC|RMC_COMMUNICATION_FAILURE|END-ENHANCEMENT-SECTION|MULTIPLY-CORRESPONDING|SUBTRACT-CORRESPONDING|VERIFICATION-MESSAGE|DIVIDE-CORRESPONDING|ENHANCEMENT-SECTION|CURRENCY_CONVERSION|RMC_SYSTEM_FAILURE|START-OF-SELECTION|MOVE-CORRESPONDING|RMC_INVALID_STATUS|CUSTOMER-FUNCTION|END-OF-DEFINITION|ENHANCEMENT-POINT|SYSTEM-EXCEPTIONS|ADD-CORRESPONDING|SCALE_PRESERVING|SELECTION-SCREEN|CURSOR-SELECTION|END-OF-SELECTION|LOAD-OF-PROGRAM|SCROLL-BOUNDARY|SELECTION-TABLE|EXCEPTION-TABLE|IMPLEMENTATIONS|PARAMETER-TABLE|RIGHT-JUSTIFIED|UNIT_CONVERSION|AUTHORITY-CHECK|LIST-PROCESSING|SIGN_AS_POSTFIX|COL_BACKGROUND|IMPLEMENTATION|INTERFACE-POOL|TRANSFORMATION|IDENTIFICATION|ENDENHANCEMENT|LINE-SELECTION|INITIALIZATION|LEFT-JUSTIFIED|SELECT-OPTIONS|SELECTION-SETS|COMMUNICATION|CORRESPONDING|DECIMAL_SHIFT|PRINT-CONTROL|VALUE-REQUEST|CHAIN-REQUEST|FUNCTION-POOL|FIELD-SYMBOLS|FUNCTIONALITY|INVERTED-DATE|SELECTION-SET|CLASS-METHODS|OUTPUT-LENGTH|CLASS-CODING|COL_NEGATIVE|ERRORMESSAGE|FIELD-GROUPS|HELP-REQUEST|NO-EXTENSION|NO-TOPOFPAGE|REDEFINITION|DISPLAY-MODE|ENDINTERFACE|EXIT-COMMAND|FIELD-SYMBOL|NO-SCROLLING|SHORTDUMP-ID|ACCESSPOLICY|CLASS-EVENTS|COL_POSITIVE|DECLARATIONS|ENHANCEMENTS|FILTER-TABLE|SWITCHSTATES|SYNTAX-CHECK|TRANSPORTING|ASYNCHRONOUS|SYNTAX-TRACE|TOKENIZATION|USER-COMMAND|WITH-HEADING|ABAP-SOURCE|BREAK-POINT|CHAIN-INPUT|COMPRESSION|FIXED-POINT|NEW-SECTION|NON-UNICODE|OCCURRENCES|RESPONSIBLE|SYSTEM-CALL|TRACE-TABLE|ABBREVIATED|CHAR-TO-HEX|END-OF-FILE|ENDFUNCTION|ENVIRONMENT|ASSOCIATION|COL_HEADING|EDITOR-CALL|END-OF-PAGE|ENGINEERING|IMPLEMENTED|INTENSIFIED|RADIOBUTTON|SYSTEM-EXIT|TOP-OF-PAGE|TRANSACTION|APPLICATION|CONCATENATE|DESTINATION|ENHANCEMENT|IMMEDIATELY|NO-GROUPING|PRECOMPILED|REPLACEMENT|TITLE-LINES|ACTIVATION|BYTE-ORDER|CLASS-POOL|CONNECTION|CONVERSION|DEFINITION|DEPARTMENT|EXPIRATION|INHERITING|MESSAGE-ID|NO-HEADING|PERFORMING|QUEUE-ONLY|RIGHTSPACE|SCIENTIFIC|STATUSINFO|STRUCTURES|SYNCPOINTS|WITH-TITLE|ATTRIBUTES|BOUNDARIES|CLASS-DATA|COL_NORMAL|DD\/MM\/YYYY|DESCENDING|INTERFACES|LINE-COUNT|MM\/DD\/YYYY|NON-UNIQUE|PRESERVING|SELECTIONS|STATEMENTS|SUBROUTINE|TRUNCATION|TYPE-POOLS|ARITHMETIC|BACKGROUND|ENDPROVIDE|EXCEPTIONS|IDENTIFIER|INDEX-LINE|OBLIGATORY|PARAMETERS|PERCENTAGE|PUSHBUTTON|RESOLUTION|COMPONENTS|DEALLOCATE|DISCONNECT|DUPLICATES|FIRST-LINE|HEAD-LINES|NO-DISPLAY|OCCURRENCE|RESPECTING|RETURNCODE|SUBMATCHES|TRACE-FILE|ASCENDING|BYPASSING|ENDMODULE|EXCEPTION|EXCLUDING|EXPORTING|INCREMENT|MATCHCODE|PARAMETER|PARTIALLY|PREFERRED|REFERENCE|REPLACING|RETURNING|SELECTION|SEPARATED|SPECIFIED|STATEMENT|TIMESTAMP|TYPE-POOL|ACCEPTING|APPENDAGE|ASSIGNING|COL_GROUP|COMPARING|CONSTANTS|DANGEROUS|IMPORTING|INSTANCES|LEFTSPACE|LOG-POINT|QUICKINFO|READ-ONLY|SCROLLING|SQLSCRIPT|STEP-LOOP|TOP-LINES|TRANSLATE|APPENDING|AUTHORITY|CHARACTER|COMPONENT|CONDITION|DIRECTORY|DUPLICATE|MESSAGING|RECEIVING|SUBSCREEN|ACCORDING|COL_TOTAL|END-LINES|ENDMETHOD|ENDSELECT|EXPANDING|EXTENSION|INCLUDING|INFOTYPES|INTERFACE|INTERVALS|LINE-SIZE|PF-STATUS|PROCEDURE|PROTECTED|REQUESTED|RESUMABLE|RIGHTPLUS|SAP-SPOOL|SECONDARY|STRUCTURE|SUBSTRING|TABLEVIEW|NUMOFCHAR|ADJACENT|ANALYSIS|ASSIGNED|BACKWARD|CHANNELS|CHECKBOX|CONTINUE|CRITICAL|DATAINFO|DD\/MM\/YY|DURATION|ENCODING|ENDCLASS|FUNCTION|LEFTPLUS|LINEFEED|MM\/DD\/YY|OVERFLOW|RECEIVED|SKIPPING|SORTABLE|STANDARD|SUBTRACT|SUPPRESS|TABSTRIP|TITLEBAR|TRUNCATE|UNASSIGN|WHENEVER|ANALYZER|COALESCE|COMMENTS|CONDENSE|DECIMALS|DEFERRED|ENDWHILE|EXPLICIT|KEYWORDS|MESSAGES|POSITION|PRIORITY|RECEIVER|RENAMING|TIMEZONE|TRAILING|ALLOCATE|CENTERED|CIRCULAR|CONTROLS|CURRENCY|DELETING|DESCRIBE|DISTANCE|ENDCATCH|EXPONENT|EXTENDED|GENERATE|IGNORING|INCLUDES|INTERNAL|MAJOR-ID|MODIFIER|NEW-LINE|OPTIONAL|PROPERTY|ROLLBACK|STARTING|SUPPLIED|ABSTRACT|CHANGING|CONTEXTS|CREATING|CUSTOMER|DATABASE|DAYLIGHT|DEFINING|DISTINCT|DIVISION|ENABLING|ENDCHAIN|ESCAPING|HARMLESS|IMPLICIT|INACTIVE|LANGUAGE|MINOR-ID|MULTIPLY|NEW-PAGE|NO-TITLE|POS_HIGH|SEPARATE|TEXTPOOL|TRANSFER|SELECTOR|DBMAXLEN|ITERATOR|ARCHIVE|BIT-XOR|BYTE-CO|COLLECT|COMMENT|CURRENT|DEFAULT|DISPLAY|ENDFORM|EXTRACT|LEADING|LISTBOX|LOCATOR|MEMBERS|METHODS|NESTING|POS_LOW|PROCESS|PROVIDE|RAISING|RESERVE|SECONDS|SUMMARY|VISIBLE|BETWEEN|BIT-AND|BYTE-CS|CLEANUP|COMPUTE|CONTROL|CONVERT|DATASET|ENDCASE|FORWARD|HEADERS|HOTSPOT|INCLUDE|INVERSE|KEEPING|NO-ZERO|OBJECTS|OVERLAY|PADDING|PATTERN|PROGRAM|REFRESH|SECTION|SUMMING|TESTING|VERSION|WINDOWS|WITHOUT|BIT-NOT|BYTE-CA|BYTE-NA|CASTING|CONTEXT|COUNTRY|DYNAMIC|ENABLED|ENDLOOP|EXECUTE|FRIENDS|HANDLER|HEADING|INITIAL|\*-INPUT|LOGFILE|MAXIMUM|MINIMUM|NO-GAPS|NO-SIGN|PRAGMAS|PRIMARY|PRIVATE|REDUCED|REPLACE|REQUEST|RESULTS|UNICODE|WARNING|ALIASES|BYTE-CN|BYTE-NS|CALLING|COL_KEY|COLUMNS|CONNECT|ENDEXEC|ENTRIES|EXCLUDE|FILTERS|FURTHER|HELP-ID|LOGICAL|MAPPING|MESSAGE|NAMETAB|OPTIONS|PACKAGE|PERFORM|RECEIVE|STATICS|VARYING|BINDING|CHARLEN|GREATER|XSTRLEN|ACCEPT|APPEND|DETAIL|ELSEIF|ENDING|ENDTRY|FORMAT|FRAMES|GIVING|HASHED|HEADER|IMPORT|INSERT|MARGIN|MODULE|NATIVE|OBJECT|OFFSET|REMOTE|RESUME|SAVING|SIMPLE|SUBMIT|TABBED|TOKENS|UNIQUE|UNPACK|UPDATE|WINDOW|YELLOW|ACTUAL|ASPECT|CENTER|CURSOR|DELETE|DIALOG|DIVIDE|DURING|ERRORS|EVENTS|EXTEND|FILTER|HANDLE|HAVING|IGNORE|LITTLE|MEMORY|NO-GAP|OCCURS|OPTION|PERSON|PLACES|PUBLIC|REDUCE|REPORT|RESULT|SINGLE|SORTED|SWITCH|SYNTAX|TARGET|VALUES|WRITER|ASSERT|BLOCKS|BOUNDS|BUFFER|CHANGE|COLUMN|COMMIT|CONCAT|COPIES|CREATE|DDMMYY|DEFINE|ENDIAN|ESCAPE|EXPAND|KERNEL|LAYOUT|LEGACY|LEVELS|MMDDYY|NUMBER|OUTPUT|RANGES|READER|RETURN|SCREEN|SEARCH|SELECT|SHARED|SOURCE|STABLE|STATIC|SUBKEY|SUFFIX|TABLES|UNWIND|YYMMDD|ASSIGN|BACKUP|BEFORE|BINARY|BIT-OR|BLANKS|CLIENT|CODING|COMMON|DEMAND|DYNPRO|EXCEPT|EXISTS|EXPORT|FIELDS|GLOBAL|GROUPS|LENGTH|LOCALE|MEDIUM|METHOD|MODIFY|NESTED|OTHERS|REJECT|SCROLL|SUPPLY|SYMBOL|ENDFOR|STRLEN|ALIGN|BEGIN|BOUND|ENDAT|ENTRY|EVENT|FINAL|FLUSH|GRANT|INNER|SHORT|USING|WRITE|AFTER|BLACK|BLOCK|CLOCK|COLOR|COUNT|DUMMY|EMPTY|ENDDO|ENDON|GREEN|INDEX|INOUT|LEAVE|LEVEL|LINES|MODIF|ORDER|OUTER|RANGE|RESET|RETRY|RIGHT|SMART|SPLIT|STYLE|TABLE|THROW|UNDER|UNTIL|UPPER|UTF-8|WHERE|ALIAS|BLANK|CLEAR|CLOSE|EXACT|FETCH|FIRST|FOUND|GROUP|LLANG|LOCAL|OTHER|REGEX|SPOOL|TITLE|TYPES|VALID|WHILE|ALPHA|BOXED|CATCH|CHAIN|CHECK|CLASS|COVER|ENDIF|EQUIV|FIELD|FLOOR|FRAME|INPUT|LOWER|MATCH|NODES|PAGES|PRINT|RAISE|ROUND|SHIFT|SPACE|SPOTS|STAMP|STATE|TASKS|TIMES|TRMAC|ULINE|UNION|VALUE|WIDTH|EQUAL|LOG10|TRUNC|BLOB|CASE|CEIL|CLOB|COND|EXIT|FILE|GAPS|HOLD|INCL|INTO|KEEP|KEYS|LAST|LINE|LONG|LPAD|MAIL|MODE|OPEN|PINK|READ|ROWS|TEST|THEN|ZERO|AREA|BACK|BADI|BYTE|CAST|EDIT|EXEC|FAIL|FIND|FKEQ|FONT|FREE|GKEQ|HIDE|INIT|ITNO|LATE|LOOP|MAIN|MARK|MOVE|NEXT|NULL|RISK|ROLE|UNIT|WAIT|ZONE|BASE|CALL|CODE|DATA|DATE|FKGE|GKGE|HIGH|KIND|LEFT|LIST|MASK|MESH|NAME|NODE|PACK|PAGE|POOL|SEND|SIGN|SIZE|SOME|STOP|TASK|TEXT|TIME|USER|VARY|WITH|WORD|BLUE|CONV|COPY|DEEP|ELSE|FORM|FROM|HINT|ICON|JOIN|LIKE|LOAD|ONLY|PART|SCAN|SKIP|SORT|TYPE|UNIX|VIEW|WHEN|WORK|ACOS|ASIN|ATAN|COSH|EACH|FRAC|LESS|RTTI|SINH|SQRT|TANH|AVG|BIT|DIV|ISO|LET|OUT|PAD|SQL|ALL|CI_|CPI|END|LOB|LPI|MAX|MIN|NEW|OLE|RUN|SET|\?TO|YES|ABS|ADD|AND|BIG|FOR|HDB|JOB|LOW|NOT|SAP|TRY|VIA|XML|ANY|GET|IDS|KEY|MOD|OFF|PUT|RAW|RED|REF|SUM|TAB|XSD|CNT|COS|EXP|LOG|SIN|TAN|XOR|AT|CO|CP|DO|GT|ID|IF|NS|OR|BT|CA|CS|GE|NA|NB|EQ|IN|LT|NE|NO|OF|ON|PF|TO|AS|BY|CN|IS|LE|NP|UP|E|I|M|O|Z|C|X)\b/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/}}return S}var C=P();const M=L(C),U=D({__proto__:null,default:M},[C]);export{U as a};
@@ -1 +1 @@
1
- import{dA as s}from"./runtime-CmCxTPcG.js";function l(t,i){for(var n=0;n<i.length;n++){const e=i[n];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const a=Object.getOwnPropertyDescriptor(e,r);a&&Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var o,d;function p(){if(d)return o;d=1,o=t,t.displayName="abnf",t.aliases=[];function t(i){(function(n){var e="(?:ALPHA|BIT|CHAR|CR|CRLF|CTL|DIGIT|DQUOTE|HEXDIG|HTAB|LF|LWSP|OCTET|SP|VCHAR|WSP)";n.languages.abnf={comment:/;.*/,string:{pattern:/(?:%[is])?"[^"\n\r]*"/,greedy:!0,inside:{punctuation:/^%[is]/}},range:{pattern:/%(?:b[01]+-[01]+|d\d+-\d+|x[A-F\d]+-[A-F\d]+)/i,alias:"number"},terminal:{pattern:/%(?:b[01]+(?:\.[01]+)*|d\d+(?:\.\d+)*|x[A-F\d]+(?:\.[A-F\d]+)*)/i,alias:"number"},repetition:{pattern:/(^|[^\w-])(?:\d*\*\d*|\d+)/,lookbehind:!0,alias:"operator"},definition:{pattern:/(^[ \t]*)(?:[a-z][\w-]*|<[^<>\r\n]*>)(?=\s*=)/m,lookbehind:!0,alias:"keyword",inside:{punctuation:/<|>/}},"core-rule":{pattern:RegExp("(?:(^|[^<\\w-])"+e+"|<"+e+">)(?![\\w-])","i"),lookbehind:!0,alias:["rule","constant"],inside:{punctuation:/<|>/}},rule:{pattern:/(^|[^<\w-])[a-z][\w-]*|<[^<>\r\n]*>/i,lookbehind:!0,inside:{punctuation:/<|>/}},operator:/=\/?|\//,punctuation:/[()\[\]]/}})(i)}return o}var u=p();const c=s(u),f=l({__proto__:null,default:c},[u]);export{f as a};
1
+ import{dA as s}from"./runtime-Ci9GR285.js";function l(t,i){for(var n=0;n<i.length;n++){const e=i[n];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const a=Object.getOwnPropertyDescriptor(e,r);a&&Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var o,d;function p(){if(d)return o;d=1,o=t,t.displayName="abnf",t.aliases=[];function t(i){(function(n){var e="(?:ALPHA|BIT|CHAR|CR|CRLF|CTL|DIGIT|DQUOTE|HEXDIG|HTAB|LF|LWSP|OCTET|SP|VCHAR|WSP)";n.languages.abnf={comment:/;.*/,string:{pattern:/(?:%[is])?"[^"\n\r]*"/,greedy:!0,inside:{punctuation:/^%[is]/}},range:{pattern:/%(?:b[01]+-[01]+|d\d+-\d+|x[A-F\d]+-[A-F\d]+)/i,alias:"number"},terminal:{pattern:/%(?:b[01]+(?:\.[01]+)*|d\d+(?:\.\d+)*|x[A-F\d]+(?:\.[A-F\d]+)*)/i,alias:"number"},repetition:{pattern:/(^|[^\w-])(?:\d*\*\d*|\d+)/,lookbehind:!0,alias:"operator"},definition:{pattern:/(^[ \t]*)(?:[a-z][\w-]*|<[^<>\r\n]*>)(?=\s*=)/m,lookbehind:!0,alias:"keyword",inside:{punctuation:/<|>/}},"core-rule":{pattern:RegExp("(?:(^|[^<\\w-])"+e+"|<"+e+">)(?![\\w-])","i"),lookbehind:!0,alias:["rule","constant"],inside:{punctuation:/<|>/}},rule:{pattern:/(^|[^<\w-])[a-z][\w-]*|<[^<>\r\n]*>/i,lookbehind:!0,inside:{punctuation:/<|>/}},operator:/=\/?|\//,punctuation:/[()\[\]]/}})(i)}return o}var u=p();const c=s(u),f=l({__proto__:null,default:c},[u]);export{f as a};
@@ -1 +1 @@
1
- import{dA as l}from"./runtime-CmCxTPcG.js";function p(t,e){for(var n=0;n<e.length;n++){const a=e[n];if(typeof a!="string"&&!Array.isArray(a)){for(const r in a)if(r!=="default"&&!(r in t)){const i=Object.getOwnPropertyDescriptor(a,r);i&&Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>a[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var s,o;function u(){if(o)return s;o=1,s=t,t.displayName="actionscript",t.aliases=[];function t(e){e.languages.actionscript=e.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),e.languages.actionscript["class-name"].alias="function",delete e.languages.actionscript.parameter,delete e.languages.actionscript["literal-property"],e.languages.markup&&e.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:e.languages.markup}})}return s}var c=u();const f=l(c),g=p({__proto__:null,default:f},[c]);export{g as a};
1
+ import{dA as l}from"./runtime-Ci9GR285.js";function p(t,e){for(var n=0;n<e.length;n++){const a=e[n];if(typeof a!="string"&&!Array.isArray(a)){for(const r in a)if(r!=="default"&&!(r in t)){const i=Object.getOwnPropertyDescriptor(a,r);i&&Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>a[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var s,o;function u(){if(o)return s;o=1,s=t,t.displayName="actionscript",t.aliases=[];function t(e){e.languages.actionscript=e.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),e.languages.actionscript["class-name"].alias="function",delete e.languages.actionscript.parameter,delete e.languages.actionscript["literal-property"],e.languages.markup&&e.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:e.languages.markup}})}return s}var c=u();const f=l(c),g=p({__proto__:null,default:f},[c]);export{g as a};
@@ -1 +1 @@
1
- import{jsx as a,jsxs as s,Fragment as pe}from"react/jsx-runtime";import Oe,{useState as C,useRef as ae,useMemo as M,useEffect as O}from"react";import{fk as he,fl as fe,fm as ye,fn as q,fo as Re,fp as ge,fq as ve,fr as Y,fs as Be,ft as Ke,eX as qe,fu as Ye,fv as Ge,cC as re,cD as ne,bH as U,fw as We,cE as ie,fx as He,fy as Je,dM as Xe,fz as Ve,fA as Ze,aU as Qe,eF as et,j as R,fB as tt,fC as G,fD as se,fE as W,ct as le,fF as L,P as at,fG as rt,c_ as j,fH as nt,fI as it,fJ as H,fK as be,bS as Ne,bT as xe,bU as we,bW as Te,e5 as Ce,fL as J,bX as st,eG as lt,bV as ot}from"./runtime-CmCxTPcG.js";import"react-dom";import"react-dom/client";import{A as ct,S as dt,U as ut}from"./user-plus-DVsnHI-R.js";function mt(e,t){return he(ye(e,e),fe(e))}function pt(e,t){return he(ye(e,e),q(fe(e),1))}function ht(e,t,n){return Re(e,-1,n)}const ft=new Set(["carrier_created","carrier_updated","contact_created","contact_updated","note_created","note_updated","asset_uploaded"]),Ie=new Set(["today","yesterday","last_7_days","last_30_days","this_month","last_month","custom"]),yt=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,oe=/^\d{4}-\d{2}-\d{2}$/,_e=e=>e.length>0?e:null,gt=e=>e??"";function ke(e){return e.length===0?null:[...e].sort().join(",")}function vt(e){if(!e)return[];const t=[];for(const n of e.split(",")){const r=n.trim();ft.has(r)&&t.push(r)}return t}function Fe(e){return e.length===0?null:[...e].sort().join(",")}function bt(e){return e?e.split(",").map(t=>t.trim()).filter(t=>yt.test(t)):[]}function Pe(e){return e.length===0?null:[...e].sort((t,n)=>t-n).join(",")}function Nt(e){if(!e)return[];const t=[];for(const n of e.split(",")){const r=Number.parseInt(n.trim(),10);Number.isFinite(r)&&r>0&&t.push(r)}return t}function Se(e){return e&&Ie.has(e)?e:null}function xt(e){if(e)return Ie.has(e)?e:void 0}function X(e){return e&&oe.test(e)?e:null}function Me(e){if(e)return oe.test(e)?e:void 0}const b={search:"mal_q",actionTypes:"mal_action",userIds:"mal_user",carrierIds:"mal_carrier",period:"mal_period",dateFrom:"mal_from",dateTo:"mal_to"},wt=new Date(2026,2,14),Tt="Mar 14, 2026",Ae={today:"Today",yesterday:"Yesterday",last_7_days:"Last 7 days",last_30_days:"Last 30 days",this_month:"This month",last_month:"Last month",custom:"Custom"},Ct=["today","last_7_days","last_30_days","custom"];function It(e,t=new Date){const n=i=>Le(i),r=i=>_t(i);switch(e){case"today":return{from:n(Y(t)),to:r(t)};case"yesterday":{const i=q(t,1);return{from:n(Y(i)),to:r(i)}}case"last_7_days":return{from:n(Y(q(t,6))),to:r(t)};case"last_30_days":return{from:n(Y(q(t,29))),to:r(t)};case"this_month":return{from:n(ve(t)),to:r(ge(t))};case"last_month":{const i=ht(t);return{from:n(ve(i)),to:r(ge(i))}}case"custom":return}}function Le(e){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${r}`}function _t(e){return $e(Le(e))}function $e(e){return oe.test(e)?`${e}T23:59:59.999`:e}function kt(e){return!!(e.search&&e.search.length>0||e.actionTypes&&e.actionTypes.length>0||e.userIds&&e.userIds.length>0||e.carrierIds&&e.carrierIds.length>0||e.period||e.dateFrom||e.dateTo)}function Ft(e){if(!e)return;if(!e.period)return e;if(e.period==="custom"){const{period:i,...l}=e;return{...l,dateTo:l.dateTo?$e(l.dateTo):l.dateTo}}const t=It(e.period),{period:n,...r}=e;return{...r,dateFrom:t==null?void 0:t.from,dateTo:t==null?void 0:t.to}}function Pt(e){if(!e)return;const t={};return e.search&&e.search.length>0&&(t.search=e.search),e.actionTypes&&e.actionTypes.length>0&&(t.actionTypes=[...e.actionTypes].sort()),e.userIds&&e.userIds.length>0&&(t.userIds=[...e.userIds].sort()),e.carrierIds&&e.carrierIds.length>0&&(t.carrierIds=[...e.carrierIds].sort((n,r)=>n-r)),e.dateFrom&&(t.dateFrom=e.dateFrom),e.dateTo&&(t.dateTo=e.dateTo),Object.keys(t).length>0?t:void 0}const St=({pageSize:e=50,carrierId:t,enabled:n=!0,filters:r}={})=>{var i,l,o,g;const u=Ft(r),p=Pt(u),y=Be({queryKey:["market-activity-log",e,t,p],queryFn:({pageParam:x=0})=>Ke({limit:e,offset:x*e,carrierId:t,filters:u}),getNextPageParam:(x,T)=>{var I;const m=x.data,c=((I=m==null?void 0:m.metadata)==null?void 0:I.totalCount)??0;return T.length*e<c?T.length:void 0},initialPageParam:0,retry:!1,enabled:n,staleTime:3e4,refetchOnWindowFocus:!1}),_=((i=y.data)==null?void 0:i.pages.flatMap(x=>{var T;return((T=x.data)==null?void 0:T.data)??[]}))??[],N=(g=(o=(l=y.data)==null?void 0:l.pages[0])==null?void 0:o.data)==null?void 0:g.metadata;return{data:_,metadata:N,isLoading:y.isLoading,isFetched:y.isFetched,isFetchingNextPage:y.isFetchingNextPage,hasNextPage:y.hasNextPage,fetchNextPage:y.fetchNextPage,refetch:y.refetch}},Mt=({enabled:e=!0}={})=>{var t,n,r,i;const l=qe({queryKey:["market-activity-log-filter-options"],queryFn:Ye,staleTime:6e4,refetchOnWindowFocus:!1,retry:!1,enabled:e}),o=(t=l.data)==null?void 0:t.data;return{actionTypes:((n=o==null?void 0:o.data)==null?void 0:n.actionTypes)??[],users:((r=o==null?void 0:o.data)==null?void 0:r.users)??[],carriers:((i=o==null?void 0:o.data)==null?void 0:i.carriers)??[],isLoading:l.isLoading,isError:l.isError,isFetched:l.isFetched}},P={action:"action_types",user:"user_ids",carrier:"carrier_ids"};function At(e){if(!(e!=null&&e.length))return[];const t=new Set(e);return je.filter(n=>ce[n].some(r=>t.has(r)))}function Lt(e){const t=[];for(const n of e){const r=ce[n];r&&t.push(...r)}return t}function Ue(e){var t,n;const r={},i=At(e.actionTypes);return i.length&&(r[P.action]=i),(t=e.userIds)!=null&&t.length&&(r[P.user]=[...e.userIds]),(n=e.carrierIds)!=null&&n.length&&(r[P.carrier]=e.carrierIds.map(String)),r}function $t(e){const t=[{columnName:P.action,columnLabel:"Type",datatype:"categorical",supportsMultiple:!0},{columnName:P.user,columnLabel:"User",datatype:"categorical",supportsMultiple:!0}];return e&&t.push({columnName:P.carrier,columnLabel:"Market",datatype:"categorical",supportsMultiple:!0}),t}function Ut(e){const t=Lt(e[P.action]??[]),n=e[P.user]??[],r=e[P.carrier]??[];return{actionTypes:t.length?t:void 0,userIds:n.length?n:void 0,carrierIds:r.length?r.map(Number).filter(Number.isFinite):void 0}}function jt({filters:e,onFiltersChange:t,availableActionTypes:n,availableUsers:r,availableCarriers:i,carrierScopedTo:l}){const o=l===void 0,[g,u]=C(!1),[p,y]=C(()=>Ue(e)),[_,N]=C(P.action),x=ae({}),T=M(()=>$t(o),[o]),I=M(()=>{const d=n?new Set(n):null;return je.filter(f=>!d||ce[f].some($=>d.has($))).map(f=>({value:f,label:zt[f]}))},[n]),m=M(()=>r.map(d=>{var f;return{value:d.id,label:((f=d.name)==null?void 0:f.trim())||d.email||"Unknown user"}}),[r]),c=M(()=>{const d=new Map;for(const f of r)d.set(f.id,f);return d},[r]),h=M(()=>i.map(d=>({value:String(d.id),label:d.name+(d.isActive?"":" (deleted)")})),[i]),w=M(()=>{const d=new Map;for(const f of i)d.set(f.id,f);return d},[i]),k=M(()=>T.map(d=>d.columnName===P.action?{...d,options:I}:d.columnName===P.user?{...d,options:m,renderRow:f=>a(Et,{user:c.get(f.value),fallbackLabel:f.label,isChecked:!1})}:d.columnName===P.carrier?{...d,options:h,renderRow:f=>a(Ot,{carrier:w.get(Number(f.value)),fallbackLabel:f.label,isChecked:!1})}:d),[T,I,m,h,c,w]),F=M(()=>k.find(d=>d.columnName===_),[k,_]),A=Ge(p),Z=M(()=>l===void 0?{}:{carrier_id:l},[l]),B=d=>{var f;if(d){const $=Ue(e);x.current=$,y($),N(((f=k[0])==null?void 0:f.columnName)??P.action)}u(d)},Q=()=>y({}),ee=()=>{y(x.current),u(!1)},K=()=>{t({...e,...Ut(p)}),u(!1)},te=d=>{y(f=>{const{selections:$,firstGeneratedColumn:z}=Ze(f,d);return z&&N(z),$})};return s(re,{open:g,onOpenChange:B,children:[a(ne,{asChild:!0,children:a(U,{variant:"outline",size:"default",className:"font-normal",leftIcon:a(We,{size:15}),"aria-haspopup":"dialog","aria-expanded":g,"data-testid":"mal-filter-button",children:s("span",{className:"inline-flex items-center gap-2",children:["Filter",A>0&&a("span",{className:"inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 rounded-full bg-primary text-white text-[11px] font-semibold tabular-nums",children:A})]})})}),a(ie,{className:"w-[560px] max-w-[calc(100vw-32px)] h-[420px] max-h-[calc(100vh-140px)] p-0 rounded-2xl border border-border-primary shadow-lg overflow-hidden",align:"start",side:"bottom",sideOffset:8,collisionPadding:16,"data-testid":"mal-filter-panel",children:s("div",{className:"dark:bg-neutral-900 flex flex-col h-full bg-white",children:[s("div",{className:"flex flex-1 min-h-0",children:[a("aside",{className:"w-[180px] shrink-0 border-r border-border-primary bg-neutral08 flex flex-col",children:a("div",{className:"flex-1 overflow-y-auto pt-3",children:a(He,{columns:k,selections:p,activeColumnName:_,onPick:N})})}),a("section",{className:"dark:bg-neutral-900 flex-1 min-w-0 bg-white",children:F&&a(Je,{column:F,selections:p,onChange:y},F.columnName)})]}),s("div",{className:"dark:bg-neutral-900 relative h-[56px] shrink-0 px-4 flex items-center gap-2 border-t border-border-primary bg-white",children:[a(U,{variant:"outline",size:"sm",onClick:Q,leftIcon:a(Xe,{size:14}),disabled:A===0,"data-testid":"mal-filter-clear",className:"shrink-0",children:"Clear filters"}),a(Ve,{usecase:"market_activity_log",params:Z,onGenerated:te,className:"flex-1 min-w-0"}),a(U,{variant:"ghost",size:"sm",onClick:ee,"data-testid":"mal-filter-cancel",className:"shrink-0",children:"Cancel"}),a(U,{variant:"primary",size:"sm",onClick:K,"data-testid":"mal-filter-apply",className:"shrink-0",children:s("span",{className:"inline-flex items-center gap-1.5",children:["Apply Filters",A>0&&a("span",{className:"inline-flex items-center justify-center min-w-[22px] h-[22px] px-1.5 rounded-full bg-white dark:bg-neutral-800 text-primary01 text-[11.5px] font-semibold tabular-nums",children:A})]})})]})]})})]})}const je=["market","contact","note","asset"],zt={market:"Market",contact:"Contact",note:"Note",asset:"Asset"},ce={market:["carrier_created","carrier_updated"],contact:["contact_created","contact_updated"],note:["note_created","note_updated"],asset:["asset_uploaded"]};function Dt({filters:e,onFiltersChange:t,searchInput:n,onSearchInputChange:r,availableActionTypes:i,availableUsers:l,availableCarriers:o,carrierScopedTo:g}){const u=p=>{t({...e,...p})};return s("div",{className:"mb-3 flex flex-nowrap items-center gap-2",children:[a("div",{className:"shrink-0",children:a(jt,{filters:e,onFiltersChange:t,availableActionTypes:i,availableUsers:l,availableCarriers:o,carrierScopedTo:g})}),a("div",{className:"min-w-0 flex-1"}),a("div",{className:"h-10 w-56 min-w-0 shrink",children:a(Qe,{placeholder:"Search activity...",value:n,onChange:p=>r(p.target.value),showClear:!0,onClear:()=>r("")})}),a("div",{className:"shrink-0",children:a(Rt,{period:e.period,dateFrom:e.dateFrom,dateTo:e.dateTo,onChange:p=>u(p)})})]})}function Et({user:e,fallbackLabel:t,isChecked:n}){var r;const i=((r=e==null?void 0:e.name)==null?void 0:r.trim())||(e==null?void 0:e.email)||t,l=i.split(" ").map(o=>o[0]).filter(Boolean).join("").slice(0,2).toUpperCase();return s("div",{className:"flex w-full items-center gap-2 min-w-0",children:[s(G,{size:"xs",children:[(e==null?void 0:e.avatar)&&a(se,{src:e.avatar,alt:i}),a(W,{children:l})]}),a("span",{className:"flex-1 truncate text-sm",children:i}),n&&a(le,{className:"h-4 w-4 shrink-0 text-primary"})]})}function Ot({carrier:e,fallbackLabel:t,isChecked:n}){const r=(e==null?void 0:e.name)??t,i=r.split(" ").map(o=>o[0]).filter(Boolean).join("").slice(0,2).toUpperCase(),l=e&&!e.isActive;return s("div",{className:"flex w-full items-center gap-2 min-w-0",children:[s(G,{size:"xs",className:"border border-neutral06",children:[(e==null?void 0:e.logoUrl)&&a(se,{src:e.logoUrl,alt:r}),a(W,{className:"text-[10px]",children:i})]}),a("span",{className:R("flex-1 truncate text-sm",l&&"italic text-tertiary-gray-fg"),children:r}),l&&a("span",{className:"text-[10px] text-tertiary-gray-fg shrink-0",children:"deleted"}),n&&a(le,{className:"h-4 w-4 shrink-0 text-primary"})]})}function Rt({period:e,dateFrom:t,dateTo:n,onChange:r}){const[i,l]=C(!1),[o,g]=C(()=>ue(t,n)),[u,p]=C(e==="custom");Oe.useEffect(()=>{g(ue(t,n)),e==="custom"&&p(!0)},[t,n,e]);const y=Bt(e,t,n),_=!!e,N=c=>{if(c===void 0){r({period:void 0,dateFrom:void 0,dateTo:void 0}),p(!1),l(!1);return}if(c==="custom"){p(!0);return}r({period:c,dateFrom:void 0,dateTo:void 0}),p(!1),l(!1)},x=()=>{const c=o==null?void 0:o.from,h=o==null?void 0:o.to;!c||!h||(r({period:"custom",dateFrom:L(c,"yyyy-MM-dd"),dateTo:L(h,"yyyy-MM-dd")}),l(!1))},T=!!(o!=null&&o.from&&o!=null&&o.to),I=s(pe,{children:[a(de,{label:"Custom\u2026",checked:e==="custom",onSelect:()=>N("custom")}),a(de,{label:"Lifetime",checked:e===void 0,onSelect:()=>N(void 0)}),Ct.filter(c=>c!=="custom").map(c=>a(de,{label:Ae[c],checked:e===c,onSelect:()=>N(c)},c))]}),m=()=>{p(e==="custom"),g(ue(t,n)),l(!1)};return s(re,{open:i,onOpenChange:l,children:[a(ne,{asChild:!0,children:a(U,{variant:"outline",size:"default","aria-haspopup":"dialog","aria-expanded":i,className:R("max-w-[16rem] justify-between font-normal",_&&"border-primary04 bg-primary05 text-primary01"),rightIcon:a(et,{className:"h-3.5 w-3.5 shrink-0 opacity-60","aria-hidden":!0}),"data-testid":"mal-chip-date",children:a("span",{className:"truncate",children:y})})}),a(ie,{className:R("p-0",u?"w-auto":"w-56"),align:"end",sideOffset:4,collisionPadding:16,children:u?s("div",{className:"flex",children:[s("div",{className:"flex flex-col border-r border-neutral06 p-3",children:[a(tt,{mode:"range",selected:o,onSelect:g,classNames:{day_outside:"ui-invisible"},disabled:[{before:wt},{after:new Date}]}),s("div",{className:"mt-2 flex items-center justify-end gap-2 border-t border-neutral06 px-1 pt-2",children:[a(U,{variant:"ghost",size:"sm",onClick:m,children:"Cancel"}),a(U,{variant:"primary",size:"sm",disabled:!T,onClick:x,children:"Apply"})]})]}),s("div",{className:"flex w-56 shrink-0 flex-col p-1",children:[I,a(ze,{})]})]}):s("div",{className:"p-1",children:[I,a(ze,{})]})})]})}function ze(){return s("div",{className:"mt-1 border-t border-neutral06 px-2 pt-2 text-[11px] leading-snug text-tertiary-gray-fg",children:["Activity tracked since ",Tt]})}function de({label:e,checked:t,onSelect:n}){return s("button",{type:"button",onClick:n,className:R("flex w-full items-center justify-between rounded-md px-2 py-1.5 text-left text-sm transition-colors cursor-pointer",t?"bg-primary05 text-primary01":"hover:bg-neutral08 text-foreground"),children:[a("span",{children:e}),t&&a(le,{className:"h-4 w-4 shrink-0 text-primary"})]})}function Bt(e,t,n){if(!e)return"Lifetime";if(e==="custom"){const r=V(t),i=V(n);return r&&i?r.getFullYear()===i.getFullYear()?`${L(r,"MMM d")} \u2013 ${L(i,"MMM d, yyyy")}`:`${L(r,"MMM d, yyyy")} \u2013 ${L(i,"MMM d, yyyy")}`:"Custom"}return Ae[e]}function V(e){if(!e)return;if(/^\d{4}-\d{2}-\d{2}$/.test(e)){const n=at(e);return Number.isNaN(n.getTime())?void 0:n}const t=new Date(e);return Number.isNaN(t.getTime())?void 0:t}function ue(e,t){const n=V(e),r=V(t);if(!(!n&&!r))return{from:n,to:r}}const Kt={carrier_created:lt,carrier_updated:J,contact_created:ut,contact_updated:J,asset_uploaded:st,note_created:dt,note_updated:J},qt=320;function Yt(e){return mt(e)?"Today":pt(e)?"Yesterday":it(e,new Date)?L(e,"MMMM d"):L(e,"MMMM d, yyyy")}function Gt(e){switch(e.actionType){case"carrier_created":return{verb:"added",entity:"a new market",entityIsPii:!1};case"carrier_updated":return{verb:"updated",entity:"market",entityIsPii:!1};case"contact_created":return{verb:"added contact",entity:e.entityName,entityIsPii:!0};case"contact_updated":return{verb:"updated contact",entity:e.entityName,entityIsPii:!0};case"note_created":return e.entityName?{verb:"added note",entity:`"${e.entityName}"`,entityIsPii:!1}:{verb:"added",entity:"a note",entityIsPii:!1};case"note_updated":return e.entityName?{verb:"updated note",entity:`"${e.entityName}"`,entityIsPii:!1}:{verb:"updated",entity:"a note",entityIsPii:!1};case"asset_uploaded":return{verb:"uploaded document",entity:`"${e.entityName}"`,entityIsPii:!1};default:return{verb:e.actionType,entity:e.entityName,entityIsPii:!1}}}function De(e){if(!e)return null;const{newCoveragesCount:t,updatedCoveragesCount:n,newContactsCount:r}=e,i=[];return n>0&&i.push(`Updated ${n} coverages`),t>0&&i.push(`Added ${t} new coverages`),r>0&&i.push(`Added ${r} new ${r===1?"contact":"contacts"}`),i.length===0?null:i.join(" \u2022 ")}const Wt=300,Ht=({carrierId:e,isActive:t=!0})=>{const[n,r]=C(""),[i,l]=C(""),[o,g]=C([]),[u,p]=C([]),[y,_]=C([]),[N,x]=C(void 0),[T,I]=C(void 0),[m,c]=C(void 0);O(()=>{const v=setTimeout(()=>r(i),Wt);return()=>clearTimeout(v)},[i]);const h=M(()=>({search:n||void 0,actionTypes:o.length>0?o:void 0,userIds:u.length>0?u:void 0,carrierIds:y.length>0?y:void 0,period:N,dateFrom:N==="custom"?T:void 0,dateTo:N==="custom"?m:void 0}),[n,o,u,y,N,T,m]),w=kt(h),k=v=>{r(v.search??""),l(v.search??""),g(v.actionTypes??[]),p(v.userIds??[]),_(v.carrierIds??[]),x(v.period),I(v.dateFrom),c(v.dateTo)},{data:F,isLoading:A,isFetched:Z,isFetchingNextPage:B,hasNextPage:Q,fetchNextPage:ee}=St({carrierId:e,enabled:t,filters:h}),{actionTypes:K,users:te,carriers:d}=Mt({enabled:t}),f=rt({hasNextPage:Q,isFetchingNextPage:B,fetchNextPage:ee}),$=M(()=>{const v=[];let S="";for(const D of F){const E=Yt(new Date(D.actionTimestamp));E!==S&&(v.push({label:E,entries:[]}),S=E),v[v.length-1].entries.push(D)}return v},[F]),z=s(pe,{children:[t&&a(Jt,{search:n,setSearch:v=>{r(v),l(v)},actionTypes:o,setActionTypes:g,userIds:u,setUserIds:p,carrierIds:y,setCarrierIds:_,carrierSyncEnabled:e===void 0,period:N,setPeriod:x,dateFrom:T,setDateFrom:I,dateTo:m,setDateTo:c}),a(Dt,{filters:h,onFiltersChange:k,searchInput:i,onSearchInputChange:l,availableActionTypes:K.length>0?K:void 0,availableUsers:te,availableCarriers:d,carrierScopedTo:e})]});return A||!Z?s("div",{className:"pt-1 pb-4",children:[z,a("div",{className:"space-y-6",children:Array.from({length:3}).map((v,S)=>s("div",{children:[a(j,{className:"h-3 w-24 mb-3"}),a("div",{className:"space-y-1",children:Array.from({length:3}).map((D,E)=>s("div",{className:"flex gap-3 py-3 px-4",children:[a(j,{className:"h-9 w-9 rounded-full shrink-0"}),s("div",{className:"flex-1 space-y-2",children:[a(j,{className:"h-3.5 w-1/3"}),a(j,{className:"h-4 w-2/3"})]})]},E))})]},S))})]}):F.length===0?s("div",{className:"pt-1 pb-4",children:[z,a("div",{className:"flex items-center justify-center py-20",children:a(nt,{title:w?"No activity matches these filters":"No activity yet",description:w?"No activity matches these filters. Adjust or clear the filters above to see more.":"Actions like adding markets, uploading documents, and updating contacts will appear here."})})]}):s("div",{className:"pt-1 pb-4",children:[z,a("div",{className:"space-y-6",children:$.map(v=>s("div",{children:[a("div",{className:"px-3 pb-2",children:a("span",{className:"text-xs font-semibold text-tertiary-gray-fg uppercase tracking-wider",children:v.label})}),a("div",{className:"rounded-lg border border-neutral06 divide-y divide-neutral06 bg-card",children:v.entries.map((S,D)=>a(Xt,{entry:S,showCarrier:!e},`${S.entityType}-${S.entityId}-${S.actionType}-${D}`))})]},v.label))}),B&&a("div",{className:"mt-4 rounded-lg border border-neutral06 divide-y divide-neutral06 bg-card",children:Array.from({length:3}).map((v,S)=>s("div",{className:"flex gap-3 py-3 px-4",children:[a(j,{className:"h-9 w-9 rounded-full shrink-0"}),s("div",{className:"flex-1 space-y-2",children:[a(j,{className:"h-3.5 w-1/3"}),a(j,{className:"h-4 w-2/3"})]})]},S))}),a("div",{ref:f,"aria-hidden":!0,className:"h-px"})]})};function Jt({search:e,setSearch:t,actionTypes:n,setActionTypes:r,userIds:i,setUserIds:l,carrierIds:o,setCarrierIds:g,carrierSyncEnabled:u,period:p,setPeriod:y,dateFrom:_,setDateFrom:N,dateTo:x,setDateTo:T}){O(()=>{if(typeof window>"u")return;const m=[[b.search,_e(e)],[b.actionTypes,ke(n)],[b.userIds,Fe(i)],...u?[[b.carrierIds,Pe(o)]]:[],[b.period,Se(p)],[b.dateFrom,X(_)],[b.dateTo,X(x)]];if(m.every(([,w])=>w===null))return;const c=new URLSearchParams(window.location.search);let h=!1;for(const[w,k]of m){const F=c.get(w);k===null?F!==null&&(c.delete(w),h=!0):F!==k&&(c.set(w,k),h=!0)}if(h){const w=c.toString();window.history.replaceState(window.history.state,"",`${window.location.pathname}${w?`?${w}`:""}`)}},[]),H({paramKey:b.search,value:e,onChange:t,serialize:_e,parse:gt}),H({paramKey:b.actionTypes,value:n,onChange:r,serialize:ke,parse:vt}),H({paramKey:b.userIds,value:i,onChange:l,serialize:Fe,parse:bt}),H({paramKey:b.carrierIds,value:o,onChange:g,serialize:Pe,parse:Nt,enabled:u});const I=ae(!1);return O(()=>{if(typeof window>"u")return;const m=()=>{const h=new URLSearchParams(window.location.search);I.current=!0,y(xt(h.get(b.period))),N(Me(h.get(b.dateFrom))),T(Me(h.get(b.dateTo))),setTimeout(()=>{I.current=!1},100)},c=new URLSearchParams(window.location.search);return(c.has(b.period)||c.has(b.dateFrom)||c.has(b.dateTo))&&m(),window.addEventListener("popstate",m),window.addEventListener(be,m),()=>{window.removeEventListener("popstate",m),window.removeEventListener(be,m)}},[]),O(()=>{if(typeof window>"u"||I.current)return;const m=new URLSearchParams(window.location.search),c=[[b.period,Se(p)],[b.dateFrom,X(_)],[b.dateTo,X(x)]];let h=!1;for(const[k,F]of c){const A=m.get(k);F===null?A!==null&&(m.delete(k),h=!0):A!==F&&(m.set(k,F),h=!0)}if(!h)return;const w=m.toString();window.history.replaceState(window.history.state,"",`${window.location.pathname}${w?`?${w}`:""}`)},[p,_,x]),O(()=>()=>{if(typeof window>"u")return;const m=new URLSearchParams(window.location.search);let c=!1;for(const h of Object.values(b))m.has(h)&&(m.delete(h),c=!0);if(c){const h=m.toString();window.history.replaceState(window.history.state,"",`${window.location.pathname}${h?`?${h}`:""}`)}},[]),null}function Xt({entry:e,showCarrier:t}){const n=e.userName||e.userEmail||"System",r=n.split(" ").map(y=>y[0]).filter(Boolean).join("").slice(0,2).toUpperCase(),i=new Date(e.actionTimestamp),l=L(i,"h:mm a"),o=i.toLocaleString(),g=De(e.metadata),u=Gt(e),p=e.carrierIsActive===!1;return a("div",{className:"hover:bg-neutral08/40 transition-colors",children:s("div",{className:"flex items-center gap-3 px-4 py-3",children:[a(Vt,{userAvatar:e.userAvatar,displayName:n,initials:r,actionType:e.actionType}),s("div",{className:"flex-1 min-w-0",children:[s("div",{className:"text-sm leading-tight",children:[a("span",{className:"font-medium text-neutral01",children:n}),s("span",{className:"text-tertiary-gray-fg",children:[" ",u.verb," "]}),u.entity&&a("span",{className:"font-medium text-neutral01","data-pii":u.entityIsPii?"true":void 0,children:u.entity})]}),(e.actionType==="asset_uploaded"||e.actionType==="note_created"||e.actionType==="note_updated")&&g&&e.metadata&&a("div",{className:"mt-1.5",children:a(ea,{impact:g,metadata:e.metadata})})]}),s("div",{className:"shrink-0 grid items-center gap-4 border-l border-neutral06 pl-4",style:{width:qt,gridTemplateColumns:"minmax(0, 1fr) auto auto"},children:[t&&e.carrierName?a(Zt,{carrierId:e.carrierId,carrierName:e.carrierName,carrierLogoUrl:e.carrierLogoUrl,isDeleted:p}):a("span",{"aria-hidden":!0}),a(Ne,{children:s(xe,{children:[a(we,{asChild:!0,children:a("span",{className:"text-xs text-tertiary-gray-fg whitespace-nowrap",children:l})}),a(Te,{children:a("p",{children:o})})]})}),t&&e.carrierName&&!p?a(Ce,{href:`/market/carriers/${e.carrierId}`,className:"text-tertiary-gray-fg hover:text-primary-600",title:`Open ${e.carrierName}`,children:a(ct,{className:"h-4 w-4"})}):a("span",{"aria-hidden":!0,className:"w-4"})]})]})})}function Vt({userAvatar:e,displayName:t,initials:n,actionType:r}){const i=Kt[r]??J;return s("div",{className:"relative shrink-0",children:[s(G,{size:"md",children:[e&&a(se,{src:e,alt:t}),a(W,{children:n})]}),a("span",{className:"absolute -bottom-0.5 -right-0.5 flex h-4 w-4 items-center justify-center rounded-full bg-card border border-neutral06","aria-hidden":!0,children:a(i,{className:"h-2.5 w-2.5 text-neutral02"})})]})}function Ee({carrierName:e,carrierLogoUrl:t}){const[n,r]=C(!1),i=!!t&&!n,l=e.split(" ").map(o=>o[0]).filter(Boolean).join("").slice(0,2).toUpperCase();return s("div",{className:"relative shrink-0",children:[a(G,{size:"xs",className:R("border border-neutral06",{"!bg-transparent":i}),name:e,children:!i&&a(W,{className:"text-[10px]",children:l})}),i&&a("img",{src:t,alt:"",className:"absolute inset-0 w-full h-full object-cover rounded-full",onError:()=>r(!0)})]})}function Zt({carrierId:e,carrierName:t,carrierLogoUrl:n,isDeleted:r}){return r?s("span",{className:"flex items-center gap-2 min-w-0 text-sm text-neutral01",children:[a(Ee,{carrierName:t,carrierLogoUrl:n}),a("span",{className:"truncate",title:t,children:t}),a(Qt,{})]}):s(Ce,{href:`/market/carriers/${e}`,className:"flex items-center gap-2 min-w-0 text-sm font-medium text-neutral01 hover:text-primary-600 transition-colors",title:`Open ${t}`,children:[a(Ee,{carrierName:t,carrierLogoUrl:n}),a("span",{className:"truncate",children:t})]})}function Qt(){return a(Ne,{children:s(xe,{children:[a(we,{asChild:!0,children:s("span",{className:"inline-flex items-center gap-0.5 text-xs text-tertiary-gray-fg italic shrink-0",children:[a(ot,{className:"h-3 w-3"}),"deleted"]})}),a(Te,{children:a("p",{children:"This market has been deleted. The link is unavailable."})})]})})}function ea({impact:e,metadata:t}){const[n,r]=C(!1),i=ae(null),l=()=>{i.current&&(clearTimeout(i.current),i.current=null)},o=()=>{l(),i.current=setTimeout(()=>r(!1),200)},g=t.updatedCoverageNames.length+t.newCoverageNames.length+t.newContactNames.length>0;return s(re,{open:n&&g,onOpenChange:u=>{u||(l(),r(!1))},children:[a(ne,{asChild:!0,children:a("button",{type:"button",className:"inline-flex items-center px-2 py-0.5 text-xs bg-neutral07 border border-neutral06 rounded text-neutral01 hover:bg-neutral06 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 cursor-default",disabled:!g,onMouseEnter:()=>{l(),g&&r(!0)},onMouseLeave:o,onFocus:()=>{l(),g&&r(!0)},onBlur:o,children:e})}),s(ie,{side:"bottom",align:"start",sideOffset:6,className:"w-[28rem] max-h-80 overflow-y-auto p-3 divide-y divide-neutral06",onMouseEnter:l,onMouseLeave:o,onCloseAutoFocus:u=>u.preventDefault(),onOpenAutoFocus:u=>u.preventDefault(),children:[t.updatedCoverageNames.length>0&&a(me,{label:"Updated",labelClass:"text-blue-700 bg-blue-50 border-blue-100",names:t.updatedCoverageNames}),t.newCoverageNames.length>0&&a(me,{label:"New",labelClass:"text-green-700 bg-green-50 border-green-100",names:t.newCoverageNames}),t.newContactsCount>0&&a(me,{label:"Contacts",labelClass:"text-neutral02 bg-neutral07 border-neutral06",names:t.newContactNames,isPii:!0})]})]})}function me({label:e,labelClass:t,names:n,isPii:r=!1}){return s("div",{className:"flex flex-col gap-2 py-3 first:pt-0 last:pb-0",children:[s("span",{className:`self-start text-xs font-medium px-1.5 py-0.5 rounded-md border ${t}`,children:[e," \xB7 ",n.length]}),a("div",{className:"flex flex-wrap gap-1",children:n.map(i=>a("span",{className:"text-xs px-1.5 py-0.5 rounded-md border border-neutral06 bg-card text-neutral01","data-pii":r?"true":void 0,children:i},i))})]})}export{Ht as ActivityLog,De as buildImpactSummary};
1
+ import{jsx as a,jsxs as s,Fragment as pe}from"react/jsx-runtime";import Oe,{useState as C,useRef as ae,useMemo as M,useEffect as O}from"react";import{fk as he,fl as fe,fm as ye,fn as q,fo as Re,fp as ge,fq as ve,fr as Y,fs as Be,ft as Ke,eX as qe,fu as Ye,fv as Ge,cC as re,cD as ne,bH as U,fw as We,cE as ie,fx as He,fy as Je,dM as Xe,fz as Ve,fA as Ze,aU as Qe,eF as et,j as R,fB as tt,fC as G,fD as se,fE as W,ct as le,fF as L,P as at,fG as rt,c_ as j,fH as nt,fI as it,fJ as H,fK as be,bS as Ne,bT as xe,bU as we,bW as Te,e5 as Ce,fL as J,bX as st,eG as lt,bV as ot}from"./runtime-Ci9GR285.js";import"react-dom";import"react-dom/client";import{A as ct,S as dt,U as ut}from"./user-plus-DZ2htt41.js";function mt(e,t){return he(ye(e,e),fe(e))}function pt(e,t){return he(ye(e,e),q(fe(e),1))}function ht(e,t,n){return Re(e,-1,n)}const ft=new Set(["carrier_created","carrier_updated","contact_created","contact_updated","note_created","note_updated","asset_uploaded"]),Ie=new Set(["today","yesterday","last_7_days","last_30_days","this_month","last_month","custom"]),yt=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,oe=/^\d{4}-\d{2}-\d{2}$/,_e=e=>e.length>0?e:null,gt=e=>e??"";function ke(e){return e.length===0?null:[...e].sort().join(",")}function vt(e){if(!e)return[];const t=[];for(const n of e.split(",")){const r=n.trim();ft.has(r)&&t.push(r)}return t}function Fe(e){return e.length===0?null:[...e].sort().join(",")}function bt(e){return e?e.split(",").map(t=>t.trim()).filter(t=>yt.test(t)):[]}function Pe(e){return e.length===0?null:[...e].sort((t,n)=>t-n).join(",")}function Nt(e){if(!e)return[];const t=[];for(const n of e.split(",")){const r=Number.parseInt(n.trim(),10);Number.isFinite(r)&&r>0&&t.push(r)}return t}function Se(e){return e&&Ie.has(e)?e:null}function xt(e){if(e)return Ie.has(e)?e:void 0}function X(e){return e&&oe.test(e)?e:null}function Me(e){if(e)return oe.test(e)?e:void 0}const b={search:"mal_q",actionTypes:"mal_action",userIds:"mal_user",carrierIds:"mal_carrier",period:"mal_period",dateFrom:"mal_from",dateTo:"mal_to"},wt=new Date(2026,2,14),Tt="Mar 14, 2026",Ae={today:"Today",yesterday:"Yesterday",last_7_days:"Last 7 days",last_30_days:"Last 30 days",this_month:"This month",last_month:"Last month",custom:"Custom"},Ct=["today","last_7_days","last_30_days","custom"];function It(e,t=new Date){const n=i=>Le(i),r=i=>_t(i);switch(e){case"today":return{from:n(Y(t)),to:r(t)};case"yesterday":{const i=q(t,1);return{from:n(Y(i)),to:r(i)}}case"last_7_days":return{from:n(Y(q(t,6))),to:r(t)};case"last_30_days":return{from:n(Y(q(t,29))),to:r(t)};case"this_month":return{from:n(ve(t)),to:r(ge(t))};case"last_month":{const i=ht(t);return{from:n(ve(i)),to:r(ge(i))}}case"custom":return}}function Le(e){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${r}`}function _t(e){return $e(Le(e))}function $e(e){return oe.test(e)?`${e}T23:59:59.999`:e}function kt(e){return!!(e.search&&e.search.length>0||e.actionTypes&&e.actionTypes.length>0||e.userIds&&e.userIds.length>0||e.carrierIds&&e.carrierIds.length>0||e.period||e.dateFrom||e.dateTo)}function Ft(e){if(!e)return;if(!e.period)return e;if(e.period==="custom"){const{period:i,...l}=e;return{...l,dateTo:l.dateTo?$e(l.dateTo):l.dateTo}}const t=It(e.period),{period:n,...r}=e;return{...r,dateFrom:t==null?void 0:t.from,dateTo:t==null?void 0:t.to}}function Pt(e){if(!e)return;const t={};return e.search&&e.search.length>0&&(t.search=e.search),e.actionTypes&&e.actionTypes.length>0&&(t.actionTypes=[...e.actionTypes].sort()),e.userIds&&e.userIds.length>0&&(t.userIds=[...e.userIds].sort()),e.carrierIds&&e.carrierIds.length>0&&(t.carrierIds=[...e.carrierIds].sort((n,r)=>n-r)),e.dateFrom&&(t.dateFrom=e.dateFrom),e.dateTo&&(t.dateTo=e.dateTo),Object.keys(t).length>0?t:void 0}const St=({pageSize:e=50,carrierId:t,enabled:n=!0,filters:r}={})=>{var i,l,o,g;const u=Ft(r),p=Pt(u),y=Be({queryKey:["market-activity-log",e,t,p],queryFn:({pageParam:x=0})=>Ke({limit:e,offset:x*e,carrierId:t,filters:u}),getNextPageParam:(x,T)=>{var I;const m=x.data,c=((I=m==null?void 0:m.metadata)==null?void 0:I.totalCount)??0;return T.length*e<c?T.length:void 0},initialPageParam:0,retry:!1,enabled:n,staleTime:3e4,refetchOnWindowFocus:!1}),_=((i=y.data)==null?void 0:i.pages.flatMap(x=>{var T;return((T=x.data)==null?void 0:T.data)??[]}))??[],N=(g=(o=(l=y.data)==null?void 0:l.pages[0])==null?void 0:o.data)==null?void 0:g.metadata;return{data:_,metadata:N,isLoading:y.isLoading,isFetched:y.isFetched,isFetchingNextPage:y.isFetchingNextPage,hasNextPage:y.hasNextPage,fetchNextPage:y.fetchNextPage,refetch:y.refetch}},Mt=({enabled:e=!0}={})=>{var t,n,r,i;const l=qe({queryKey:["market-activity-log-filter-options"],queryFn:Ye,staleTime:6e4,refetchOnWindowFocus:!1,retry:!1,enabled:e}),o=(t=l.data)==null?void 0:t.data;return{actionTypes:((n=o==null?void 0:o.data)==null?void 0:n.actionTypes)??[],users:((r=o==null?void 0:o.data)==null?void 0:r.users)??[],carriers:((i=o==null?void 0:o.data)==null?void 0:i.carriers)??[],isLoading:l.isLoading,isError:l.isError,isFetched:l.isFetched}},P={action:"action_types",user:"user_ids",carrier:"carrier_ids"};function At(e){if(!(e!=null&&e.length))return[];const t=new Set(e);return je.filter(n=>ce[n].some(r=>t.has(r)))}function Lt(e){const t=[];for(const n of e){const r=ce[n];r&&t.push(...r)}return t}function Ue(e){var t,n;const r={},i=At(e.actionTypes);return i.length&&(r[P.action]=i),(t=e.userIds)!=null&&t.length&&(r[P.user]=[...e.userIds]),(n=e.carrierIds)!=null&&n.length&&(r[P.carrier]=e.carrierIds.map(String)),r}function $t(e){const t=[{columnName:P.action,columnLabel:"Type",datatype:"categorical",supportsMultiple:!0},{columnName:P.user,columnLabel:"User",datatype:"categorical",supportsMultiple:!0}];return e&&t.push({columnName:P.carrier,columnLabel:"Market",datatype:"categorical",supportsMultiple:!0}),t}function Ut(e){const t=Lt(e[P.action]??[]),n=e[P.user]??[],r=e[P.carrier]??[];return{actionTypes:t.length?t:void 0,userIds:n.length?n:void 0,carrierIds:r.length?r.map(Number).filter(Number.isFinite):void 0}}function jt({filters:e,onFiltersChange:t,availableActionTypes:n,availableUsers:r,availableCarriers:i,carrierScopedTo:l}){const o=l===void 0,[g,u]=C(!1),[p,y]=C(()=>Ue(e)),[_,N]=C(P.action),x=ae({}),T=M(()=>$t(o),[o]),I=M(()=>{const d=n?new Set(n):null;return je.filter(f=>!d||ce[f].some($=>d.has($))).map(f=>({value:f,label:zt[f]}))},[n]),m=M(()=>r.map(d=>{var f;return{value:d.id,label:((f=d.name)==null?void 0:f.trim())||d.email||"Unknown user"}}),[r]),c=M(()=>{const d=new Map;for(const f of r)d.set(f.id,f);return d},[r]),h=M(()=>i.map(d=>({value:String(d.id),label:d.name+(d.isActive?"":" (deleted)")})),[i]),w=M(()=>{const d=new Map;for(const f of i)d.set(f.id,f);return d},[i]),k=M(()=>T.map(d=>d.columnName===P.action?{...d,options:I}:d.columnName===P.user?{...d,options:m,renderRow:f=>a(Et,{user:c.get(f.value),fallbackLabel:f.label,isChecked:!1})}:d.columnName===P.carrier?{...d,options:h,renderRow:f=>a(Ot,{carrier:w.get(Number(f.value)),fallbackLabel:f.label,isChecked:!1})}:d),[T,I,m,h,c,w]),F=M(()=>k.find(d=>d.columnName===_),[k,_]),A=Ge(p),Z=M(()=>l===void 0?{}:{carrier_id:l},[l]),B=d=>{var f;if(d){const $=Ue(e);x.current=$,y($),N(((f=k[0])==null?void 0:f.columnName)??P.action)}u(d)},Q=()=>y({}),ee=()=>{y(x.current),u(!1)},K=()=>{t({...e,...Ut(p)}),u(!1)},te=d=>{y(f=>{const{selections:$,firstGeneratedColumn:z}=Ze(f,d);return z&&N(z),$})};return s(re,{open:g,onOpenChange:B,children:[a(ne,{asChild:!0,children:a(U,{variant:"outline",size:"default",className:"font-normal",leftIcon:a(We,{size:15}),"aria-haspopup":"dialog","aria-expanded":g,"data-testid":"mal-filter-button",children:s("span",{className:"inline-flex items-center gap-2",children:["Filter",A>0&&a("span",{className:"inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 rounded-full bg-primary text-white text-[11px] font-semibold tabular-nums",children:A})]})})}),a(ie,{className:"w-[560px] max-w-[calc(100vw-32px)] h-[420px] max-h-[calc(100vh-140px)] p-0 rounded-2xl border border-border-primary shadow-lg overflow-hidden",align:"start",side:"bottom",sideOffset:8,collisionPadding:16,"data-testid":"mal-filter-panel",children:s("div",{className:"dark:bg-neutral-900 flex flex-col h-full bg-white",children:[s("div",{className:"flex flex-1 min-h-0",children:[a("aside",{className:"w-[180px] shrink-0 border-r border-border-primary bg-neutral08 flex flex-col",children:a("div",{className:"flex-1 overflow-y-auto pt-3",children:a(He,{columns:k,selections:p,activeColumnName:_,onPick:N})})}),a("section",{className:"dark:bg-neutral-900 flex-1 min-w-0 bg-white",children:F&&a(Je,{column:F,selections:p,onChange:y},F.columnName)})]}),s("div",{className:"dark:bg-neutral-900 relative h-[56px] shrink-0 px-4 flex items-center gap-2 border-t border-border-primary bg-white",children:[a(U,{variant:"outline",size:"sm",onClick:Q,leftIcon:a(Xe,{size:14}),disabled:A===0,"data-testid":"mal-filter-clear",className:"shrink-0",children:"Clear filters"}),a(Ve,{usecase:"market_activity_log",params:Z,onGenerated:te,className:"flex-1 min-w-0"}),a(U,{variant:"ghost",size:"sm",onClick:ee,"data-testid":"mal-filter-cancel",className:"shrink-0",children:"Cancel"}),a(U,{variant:"primary",size:"sm",onClick:K,"data-testid":"mal-filter-apply",className:"shrink-0",children:s("span",{className:"inline-flex items-center gap-1.5",children:["Apply Filters",A>0&&a("span",{className:"inline-flex items-center justify-center min-w-[22px] h-[22px] px-1.5 rounded-full bg-white dark:bg-neutral-800 text-primary01 text-[11.5px] font-semibold tabular-nums",children:A})]})})]})]})})]})}const je=["market","contact","note","asset"],zt={market:"Market",contact:"Contact",note:"Note",asset:"Asset"},ce={market:["carrier_created","carrier_updated"],contact:["contact_created","contact_updated"],note:["note_created","note_updated"],asset:["asset_uploaded"]};function Dt({filters:e,onFiltersChange:t,searchInput:n,onSearchInputChange:r,availableActionTypes:i,availableUsers:l,availableCarriers:o,carrierScopedTo:g}){const u=p=>{t({...e,...p})};return s("div",{className:"mb-3 flex flex-nowrap items-center gap-2",children:[a("div",{className:"shrink-0",children:a(jt,{filters:e,onFiltersChange:t,availableActionTypes:i,availableUsers:l,availableCarriers:o,carrierScopedTo:g})}),a("div",{className:"min-w-0 flex-1"}),a("div",{className:"h-10 w-56 min-w-0 shrink",children:a(Qe,{placeholder:"Search activity...",value:n,onChange:p=>r(p.target.value),showClear:!0,onClear:()=>r("")})}),a("div",{className:"shrink-0",children:a(Rt,{period:e.period,dateFrom:e.dateFrom,dateTo:e.dateTo,onChange:p=>u(p)})})]})}function Et({user:e,fallbackLabel:t,isChecked:n}){var r;const i=((r=e==null?void 0:e.name)==null?void 0:r.trim())||(e==null?void 0:e.email)||t,l=i.split(" ").map(o=>o[0]).filter(Boolean).join("").slice(0,2).toUpperCase();return s("div",{className:"flex w-full items-center gap-2 min-w-0",children:[s(G,{size:"xs",children:[(e==null?void 0:e.avatar)&&a(se,{src:e.avatar,alt:i}),a(W,{children:l})]}),a("span",{className:"flex-1 truncate text-sm",children:i}),n&&a(le,{className:"h-4 w-4 shrink-0 text-primary"})]})}function Ot({carrier:e,fallbackLabel:t,isChecked:n}){const r=(e==null?void 0:e.name)??t,i=r.split(" ").map(o=>o[0]).filter(Boolean).join("").slice(0,2).toUpperCase(),l=e&&!e.isActive;return s("div",{className:"flex w-full items-center gap-2 min-w-0",children:[s(G,{size:"xs",className:"border border-neutral06",children:[(e==null?void 0:e.logoUrl)&&a(se,{src:e.logoUrl,alt:r}),a(W,{className:"text-[10px]",children:i})]}),a("span",{className:R("flex-1 truncate text-sm",l&&"italic text-tertiary-gray-fg"),children:r}),l&&a("span",{className:"text-[10px] text-tertiary-gray-fg shrink-0",children:"deleted"}),n&&a(le,{className:"h-4 w-4 shrink-0 text-primary"})]})}function Rt({period:e,dateFrom:t,dateTo:n,onChange:r}){const[i,l]=C(!1),[o,g]=C(()=>ue(t,n)),[u,p]=C(e==="custom");Oe.useEffect(()=>{g(ue(t,n)),e==="custom"&&p(!0)},[t,n,e]);const y=Bt(e,t,n),_=!!e,N=c=>{if(c===void 0){r({period:void 0,dateFrom:void 0,dateTo:void 0}),p(!1),l(!1);return}if(c==="custom"){p(!0);return}r({period:c,dateFrom:void 0,dateTo:void 0}),p(!1),l(!1)},x=()=>{const c=o==null?void 0:o.from,h=o==null?void 0:o.to;!c||!h||(r({period:"custom",dateFrom:L(c,"yyyy-MM-dd"),dateTo:L(h,"yyyy-MM-dd")}),l(!1))},T=!!(o!=null&&o.from&&o!=null&&o.to),I=s(pe,{children:[a(de,{label:"Custom\u2026",checked:e==="custom",onSelect:()=>N("custom")}),a(de,{label:"Lifetime",checked:e===void 0,onSelect:()=>N(void 0)}),Ct.filter(c=>c!=="custom").map(c=>a(de,{label:Ae[c],checked:e===c,onSelect:()=>N(c)},c))]}),m=()=>{p(e==="custom"),g(ue(t,n)),l(!1)};return s(re,{open:i,onOpenChange:l,children:[a(ne,{asChild:!0,children:a(U,{variant:"outline",size:"default","aria-haspopup":"dialog","aria-expanded":i,className:R("max-w-[16rem] justify-between font-normal",_&&"border-primary04 bg-primary05 text-primary01"),rightIcon:a(et,{className:"h-3.5 w-3.5 shrink-0 opacity-60","aria-hidden":!0}),"data-testid":"mal-chip-date",children:a("span",{className:"truncate",children:y})})}),a(ie,{className:R("p-0",u?"w-auto":"w-56"),align:"end",sideOffset:4,collisionPadding:16,children:u?s("div",{className:"flex",children:[s("div",{className:"flex flex-col border-r border-neutral06 p-3",children:[a(tt,{mode:"range",selected:o,onSelect:g,classNames:{day_outside:"ui-invisible"},disabled:[{before:wt},{after:new Date}]}),s("div",{className:"mt-2 flex items-center justify-end gap-2 border-t border-neutral06 px-1 pt-2",children:[a(U,{variant:"ghost",size:"sm",onClick:m,children:"Cancel"}),a(U,{variant:"primary",size:"sm",disabled:!T,onClick:x,children:"Apply"})]})]}),s("div",{className:"flex w-56 shrink-0 flex-col p-1",children:[I,a(ze,{})]})]}):s("div",{className:"p-1",children:[I,a(ze,{})]})})]})}function ze(){return s("div",{className:"mt-1 border-t border-neutral06 px-2 pt-2 text-[11px] leading-snug text-tertiary-gray-fg",children:["Activity tracked since ",Tt]})}function de({label:e,checked:t,onSelect:n}){return s("button",{type:"button",onClick:n,className:R("flex w-full items-center justify-between rounded-md px-2 py-1.5 text-left text-sm transition-colors cursor-pointer",t?"bg-primary05 text-primary01":"hover:bg-neutral08 text-foreground"),children:[a("span",{children:e}),t&&a(le,{className:"h-4 w-4 shrink-0 text-primary"})]})}function Bt(e,t,n){if(!e)return"Lifetime";if(e==="custom"){const r=V(t),i=V(n);return r&&i?r.getFullYear()===i.getFullYear()?`${L(r,"MMM d")} \u2013 ${L(i,"MMM d, yyyy")}`:`${L(r,"MMM d, yyyy")} \u2013 ${L(i,"MMM d, yyyy")}`:"Custom"}return Ae[e]}function V(e){if(!e)return;if(/^\d{4}-\d{2}-\d{2}$/.test(e)){const n=at(e);return Number.isNaN(n.getTime())?void 0:n}const t=new Date(e);return Number.isNaN(t.getTime())?void 0:t}function ue(e,t){const n=V(e),r=V(t);if(!(!n&&!r))return{from:n,to:r}}const Kt={carrier_created:lt,carrier_updated:J,contact_created:ut,contact_updated:J,asset_uploaded:st,note_created:dt,note_updated:J},qt=320;function Yt(e){return mt(e)?"Today":pt(e)?"Yesterday":it(e,new Date)?L(e,"MMMM d"):L(e,"MMMM d, yyyy")}function Gt(e){switch(e.actionType){case"carrier_created":return{verb:"added",entity:"a new market",entityIsPii:!1};case"carrier_updated":return{verb:"updated",entity:"market",entityIsPii:!1};case"contact_created":return{verb:"added contact",entity:e.entityName,entityIsPii:!0};case"contact_updated":return{verb:"updated contact",entity:e.entityName,entityIsPii:!0};case"note_created":return e.entityName?{verb:"added note",entity:`"${e.entityName}"`,entityIsPii:!1}:{verb:"added",entity:"a note",entityIsPii:!1};case"note_updated":return e.entityName?{verb:"updated note",entity:`"${e.entityName}"`,entityIsPii:!1}:{verb:"updated",entity:"a note",entityIsPii:!1};case"asset_uploaded":return{verb:"uploaded document",entity:`"${e.entityName}"`,entityIsPii:!1};default:return{verb:e.actionType,entity:e.entityName,entityIsPii:!1}}}function De(e){if(!e)return null;const{newCoveragesCount:t,updatedCoveragesCount:n,newContactsCount:r}=e,i=[];return n>0&&i.push(`Updated ${n} coverages`),t>0&&i.push(`Added ${t} new coverages`),r>0&&i.push(`Added ${r} new ${r===1?"contact":"contacts"}`),i.length===0?null:i.join(" \u2022 ")}const Wt=300,Ht=({carrierId:e,isActive:t=!0})=>{const[n,r]=C(""),[i,l]=C(""),[o,g]=C([]),[u,p]=C([]),[y,_]=C([]),[N,x]=C(void 0),[T,I]=C(void 0),[m,c]=C(void 0);O(()=>{const v=setTimeout(()=>r(i),Wt);return()=>clearTimeout(v)},[i]);const h=M(()=>({search:n||void 0,actionTypes:o.length>0?o:void 0,userIds:u.length>0?u:void 0,carrierIds:y.length>0?y:void 0,period:N,dateFrom:N==="custom"?T:void 0,dateTo:N==="custom"?m:void 0}),[n,o,u,y,N,T,m]),w=kt(h),k=v=>{r(v.search??""),l(v.search??""),g(v.actionTypes??[]),p(v.userIds??[]),_(v.carrierIds??[]),x(v.period),I(v.dateFrom),c(v.dateTo)},{data:F,isLoading:A,isFetched:Z,isFetchingNextPage:B,hasNextPage:Q,fetchNextPage:ee}=St({carrierId:e,enabled:t,filters:h}),{actionTypes:K,users:te,carriers:d}=Mt({enabled:t}),f=rt({hasNextPage:Q,isFetchingNextPage:B,fetchNextPage:ee}),$=M(()=>{const v=[];let S="";for(const D of F){const E=Yt(new Date(D.actionTimestamp));E!==S&&(v.push({label:E,entries:[]}),S=E),v[v.length-1].entries.push(D)}return v},[F]),z=s(pe,{children:[t&&a(Jt,{search:n,setSearch:v=>{r(v),l(v)},actionTypes:o,setActionTypes:g,userIds:u,setUserIds:p,carrierIds:y,setCarrierIds:_,carrierSyncEnabled:e===void 0,period:N,setPeriod:x,dateFrom:T,setDateFrom:I,dateTo:m,setDateTo:c}),a(Dt,{filters:h,onFiltersChange:k,searchInput:i,onSearchInputChange:l,availableActionTypes:K.length>0?K:void 0,availableUsers:te,availableCarriers:d,carrierScopedTo:e})]});return A||!Z?s("div",{className:"pt-1 pb-4",children:[z,a("div",{className:"space-y-6",children:Array.from({length:3}).map((v,S)=>s("div",{children:[a(j,{className:"h-3 w-24 mb-3"}),a("div",{className:"space-y-1",children:Array.from({length:3}).map((D,E)=>s("div",{className:"flex gap-3 py-3 px-4",children:[a(j,{className:"h-9 w-9 rounded-full shrink-0"}),s("div",{className:"flex-1 space-y-2",children:[a(j,{className:"h-3.5 w-1/3"}),a(j,{className:"h-4 w-2/3"})]})]},E))})]},S))})]}):F.length===0?s("div",{className:"pt-1 pb-4",children:[z,a("div",{className:"flex items-center justify-center py-20",children:a(nt,{title:w?"No activity matches these filters":"No activity yet",description:w?"No activity matches these filters. Adjust or clear the filters above to see more.":"Actions like adding markets, uploading documents, and updating contacts will appear here."})})]}):s("div",{className:"pt-1 pb-4",children:[z,a("div",{className:"space-y-6",children:$.map(v=>s("div",{children:[a("div",{className:"px-3 pb-2",children:a("span",{className:"text-xs font-semibold text-tertiary-gray-fg uppercase tracking-wider",children:v.label})}),a("div",{className:"rounded-lg border border-neutral06 divide-y divide-neutral06 bg-card",children:v.entries.map((S,D)=>a(Xt,{entry:S,showCarrier:!e},`${S.entityType}-${S.entityId}-${S.actionType}-${D}`))})]},v.label))}),B&&a("div",{className:"mt-4 rounded-lg border border-neutral06 divide-y divide-neutral06 bg-card",children:Array.from({length:3}).map((v,S)=>s("div",{className:"flex gap-3 py-3 px-4",children:[a(j,{className:"h-9 w-9 rounded-full shrink-0"}),s("div",{className:"flex-1 space-y-2",children:[a(j,{className:"h-3.5 w-1/3"}),a(j,{className:"h-4 w-2/3"})]})]},S))}),a("div",{ref:f,"aria-hidden":!0,className:"h-px"})]})};function Jt({search:e,setSearch:t,actionTypes:n,setActionTypes:r,userIds:i,setUserIds:l,carrierIds:o,setCarrierIds:g,carrierSyncEnabled:u,period:p,setPeriod:y,dateFrom:_,setDateFrom:N,dateTo:x,setDateTo:T}){O(()=>{if(typeof window>"u")return;const m=[[b.search,_e(e)],[b.actionTypes,ke(n)],[b.userIds,Fe(i)],...u?[[b.carrierIds,Pe(o)]]:[],[b.period,Se(p)],[b.dateFrom,X(_)],[b.dateTo,X(x)]];if(m.every(([,w])=>w===null))return;const c=new URLSearchParams(window.location.search);let h=!1;for(const[w,k]of m){const F=c.get(w);k===null?F!==null&&(c.delete(w),h=!0):F!==k&&(c.set(w,k),h=!0)}if(h){const w=c.toString();window.history.replaceState(window.history.state,"",`${window.location.pathname}${w?`?${w}`:""}`)}},[]),H({paramKey:b.search,value:e,onChange:t,serialize:_e,parse:gt}),H({paramKey:b.actionTypes,value:n,onChange:r,serialize:ke,parse:vt}),H({paramKey:b.userIds,value:i,onChange:l,serialize:Fe,parse:bt}),H({paramKey:b.carrierIds,value:o,onChange:g,serialize:Pe,parse:Nt,enabled:u});const I=ae(!1);return O(()=>{if(typeof window>"u")return;const m=()=>{const h=new URLSearchParams(window.location.search);I.current=!0,y(xt(h.get(b.period))),N(Me(h.get(b.dateFrom))),T(Me(h.get(b.dateTo))),setTimeout(()=>{I.current=!1},100)},c=new URLSearchParams(window.location.search);return(c.has(b.period)||c.has(b.dateFrom)||c.has(b.dateTo))&&m(),window.addEventListener("popstate",m),window.addEventListener(be,m),()=>{window.removeEventListener("popstate",m),window.removeEventListener(be,m)}},[]),O(()=>{if(typeof window>"u"||I.current)return;const m=new URLSearchParams(window.location.search),c=[[b.period,Se(p)],[b.dateFrom,X(_)],[b.dateTo,X(x)]];let h=!1;for(const[k,F]of c){const A=m.get(k);F===null?A!==null&&(m.delete(k),h=!0):A!==F&&(m.set(k,F),h=!0)}if(!h)return;const w=m.toString();window.history.replaceState(window.history.state,"",`${window.location.pathname}${w?`?${w}`:""}`)},[p,_,x]),O(()=>()=>{if(typeof window>"u")return;const m=new URLSearchParams(window.location.search);let c=!1;for(const h of Object.values(b))m.has(h)&&(m.delete(h),c=!0);if(c){const h=m.toString();window.history.replaceState(window.history.state,"",`${window.location.pathname}${h?`?${h}`:""}`)}},[]),null}function Xt({entry:e,showCarrier:t}){const n=e.userName||e.userEmail||"System",r=n.split(" ").map(y=>y[0]).filter(Boolean).join("").slice(0,2).toUpperCase(),i=new Date(e.actionTimestamp),l=L(i,"h:mm a"),o=i.toLocaleString(),g=De(e.metadata),u=Gt(e),p=e.carrierIsActive===!1;return a("div",{className:"hover:bg-neutral08/40 transition-colors",children:s("div",{className:"flex items-center gap-3 px-4 py-3",children:[a(Vt,{userAvatar:e.userAvatar,displayName:n,initials:r,actionType:e.actionType}),s("div",{className:"flex-1 min-w-0",children:[s("div",{className:"text-sm leading-tight",children:[a("span",{className:"font-medium text-neutral01",children:n}),s("span",{className:"text-tertiary-gray-fg",children:[" ",u.verb," "]}),u.entity&&a("span",{className:"font-medium text-neutral01","data-pii":u.entityIsPii?"true":void 0,children:u.entity})]}),(e.actionType==="asset_uploaded"||e.actionType==="note_created"||e.actionType==="note_updated")&&g&&e.metadata&&a("div",{className:"mt-1.5",children:a(ea,{impact:g,metadata:e.metadata})})]}),s("div",{className:"shrink-0 grid items-center gap-4 border-l border-neutral06 pl-4",style:{width:qt,gridTemplateColumns:"minmax(0, 1fr) auto auto"},children:[t&&e.carrierName?a(Zt,{carrierId:e.carrierId,carrierName:e.carrierName,carrierLogoUrl:e.carrierLogoUrl,isDeleted:p}):a("span",{"aria-hidden":!0}),a(Ne,{children:s(xe,{children:[a(we,{asChild:!0,children:a("span",{className:"text-xs text-tertiary-gray-fg whitespace-nowrap",children:l})}),a(Te,{children:a("p",{children:o})})]})}),t&&e.carrierName&&!p?a(Ce,{href:`/market/carriers/${e.carrierId}`,className:"text-tertiary-gray-fg hover:text-primary-600",title:`Open ${e.carrierName}`,children:a(ct,{className:"h-4 w-4"})}):a("span",{"aria-hidden":!0,className:"w-4"})]})]})})}function Vt({userAvatar:e,displayName:t,initials:n,actionType:r}){const i=Kt[r]??J;return s("div",{className:"relative shrink-0",children:[s(G,{size:"md",children:[e&&a(se,{src:e,alt:t}),a(W,{children:n})]}),a("span",{className:"absolute -bottom-0.5 -right-0.5 flex h-4 w-4 items-center justify-center rounded-full bg-card border border-neutral06","aria-hidden":!0,children:a(i,{className:"h-2.5 w-2.5 text-neutral02"})})]})}function Ee({carrierName:e,carrierLogoUrl:t}){const[n,r]=C(!1),i=!!t&&!n,l=e.split(" ").map(o=>o[0]).filter(Boolean).join("").slice(0,2).toUpperCase();return s("div",{className:"relative shrink-0",children:[a(G,{size:"xs",className:R("border border-neutral06",{"!bg-transparent":i}),name:e,children:!i&&a(W,{className:"text-[10px]",children:l})}),i&&a("img",{src:t,alt:"",className:"absolute inset-0 w-full h-full object-cover rounded-full",onError:()=>r(!0)})]})}function Zt({carrierId:e,carrierName:t,carrierLogoUrl:n,isDeleted:r}){return r?s("span",{className:"flex items-center gap-2 min-w-0 text-sm text-neutral01",children:[a(Ee,{carrierName:t,carrierLogoUrl:n}),a("span",{className:"truncate",title:t,children:t}),a(Qt,{})]}):s(Ce,{href:`/market/carriers/${e}`,className:"flex items-center gap-2 min-w-0 text-sm font-medium text-neutral01 hover:text-primary-600 transition-colors",title:`Open ${t}`,children:[a(Ee,{carrierName:t,carrierLogoUrl:n}),a("span",{className:"truncate",children:t})]})}function Qt(){return a(Ne,{children:s(xe,{children:[a(we,{asChild:!0,children:s("span",{className:"inline-flex items-center gap-0.5 text-xs text-tertiary-gray-fg italic shrink-0",children:[a(ot,{className:"h-3 w-3"}),"deleted"]})}),a(Te,{children:a("p",{children:"This market has been deleted. The link is unavailable."})})]})})}function ea({impact:e,metadata:t}){const[n,r]=C(!1),i=ae(null),l=()=>{i.current&&(clearTimeout(i.current),i.current=null)},o=()=>{l(),i.current=setTimeout(()=>r(!1),200)},g=t.updatedCoverageNames.length+t.newCoverageNames.length+t.newContactNames.length>0;return s(re,{open:n&&g,onOpenChange:u=>{u||(l(),r(!1))},children:[a(ne,{asChild:!0,children:a("button",{type:"button",className:"inline-flex items-center px-2 py-0.5 text-xs bg-neutral07 border border-neutral06 rounded text-neutral01 hover:bg-neutral06 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 cursor-default",disabled:!g,onMouseEnter:()=>{l(),g&&r(!0)},onMouseLeave:o,onFocus:()=>{l(),g&&r(!0)},onBlur:o,children:e})}),s(ie,{side:"bottom",align:"start",sideOffset:6,className:"w-[28rem] max-h-80 overflow-y-auto p-3 divide-y divide-neutral06",onMouseEnter:l,onMouseLeave:o,onCloseAutoFocus:u=>u.preventDefault(),onOpenAutoFocus:u=>u.preventDefault(),children:[t.updatedCoverageNames.length>0&&a(me,{label:"Updated",labelClass:"text-blue-700 bg-blue-50 border-blue-100",names:t.updatedCoverageNames}),t.newCoverageNames.length>0&&a(me,{label:"New",labelClass:"text-green-700 bg-green-50 border-green-100",names:t.newCoverageNames}),t.newContactsCount>0&&a(me,{label:"Contacts",labelClass:"text-neutral02 bg-neutral07 border-neutral06",names:t.newContactNames,isPii:!0})]})]})}function me({label:e,labelClass:t,names:n,isPii:r=!1}){return s("div",{className:"flex flex-col gap-2 py-3 first:pt-0 last:pb-0",children:[s("span",{className:`self-start text-xs font-medium px-1.5 py-0.5 rounded-md border ${t}`,children:[e," \xB7 ",n.length]}),a("div",{className:"flex flex-wrap gap-1",children:n.map(i=>a("span",{className:"text-xs px-1.5 py-0.5 rounded-md border border-neutral06 bg-card text-neutral01","data-pii":r?"true":void 0,children:i},i))})]})}export{Ht as ActivityLog,De as buildImpactSummary};