@datalayer/agent-runtimes 1.5.0 → 1.5.2

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 (304) hide show
  1. package/dist-embed/chunks/{AgentDetails-Bo0dD1KS.js → AgentDetails-KezohVQI.js} +1 -1
  2. package/dist-embed/chunks/{AgentDetailsDialog-JjCHYxMG.js → AgentDetailsDialog-CklhMnk7.js} +1 -1
  3. package/dist-embed/chunks/{AgentInspector-37Onz4of.js → AgentInspector-CtCaRc1L.js} +1 -1
  4. package/dist-embed/chunks/{AgentInspectorDialog-CCzGVAtX.js → AgentInspectorDialog-DB9cx3Gd.js} +1 -1
  5. package/dist-embed/chunks/Avatar-9MpXENSs.js +1 -0
  6. package/dist-embed/chunks/{CellSidebarExtension-CQlXdanG.js → CellSidebarExtension-CfaJL6DQ.js} +6 -6
  7. package/dist-embed/chunks/{ChatView-CaBuPTyG.js → ChatView-B3QqHhAP.js} +4 -4
  8. package/dist-embed/chunks/{ContextPie-DBIUoPrq.js → ContextPie-1vP4f-3N.js} +1 -1
  9. package/dist-embed/chunks/DatalayerAgentBridge-D54Z9BZ3.js +1 -0
  10. package/dist-embed/chunks/{DeckComponent-cRJJMGgt.js → DeckComponent-82GVdsoi.js} +2 -2
  11. package/dist-embed/chunks/{DocumentView-CiqN9ze6.js → DocumentView-SrJloJDo.js} +2 -2
  12. package/dist-embed/chunks/{EphemeralDocument-BjJfn7J-.js → EphemeralDocument-t1KulOH8.js} +1 -1
  13. package/dist-embed/chunks/{EphemeralNotebook-DbS4f6yr.js → EphemeralNotebook-Co-WQWCc.js} +2 -2
  14. package/dist-embed/chunks/{ExcalidrawComponent-BtNXWUN8.js → ExcalidrawComponent-5NeLUYVB.js} +1 -1
  15. package/dist-embed/chunks/{ExcalidrawModal-C6SEKFlD.js → ExcalidrawModal-9ZnOB03n.js} +1 -1
  16. package/dist-embed/chunks/{JupyterLexicalExtension-BuRLImy5.js → JupyterLexicalExtension-Cize8RXy.js} +29 -29
  17. package/dist-embed/chunks/{KernelVariables-KCUfxhF4.js → KernelVariables-Cl57Zze1.js} +2 -2
  18. package/dist-embed/chunks/{LexicalToolRegistry-CXLITkMD.js → LexicalToolRegistry-CoM9ROsx.js} +3 -3
  19. package/dist-embed/chunks/{NotebookSkeleton-HdM76lOj.js → NotebookSkeleton-CI7ovjNW.js} +1 -1
  20. package/dist-embed/chunks/{NotebookToolSurfaces-ktcGRm7d.js → NotebookToolSurfaces-CWfppxBN.js} +1 -1
  21. package/dist-embed/chunks/{NotebookToolbar-DMKCe3c2.js → NotebookToolbar-rtMQZWHQ.js} +1 -1
  22. package/dist-embed/chunks/{NotebookView-Pps9dPZ7.js → NotebookView-DOf_K74b.js} +1 -1
  23. package/dist-embed/chunks/{Output-BscOPLqE.js → Output-9DKTscSv.js} +1 -1
  24. package/dist-embed/chunks/{SandboxDetailsDialog-pkvlbdM2.js → SandboxDetailsDialog-BCfDm6MB.js} +1 -1
  25. package/dist-embed/chunks/{SchemaForm-Bqor7hh8.js → SchemaForm-BOYPrvf8.js} +1 -1
  26. package/dist-embed/chunks/{Toolbar-6Hdi_m3T.js → Toolbar-CGQDY041.js} +1 -1
  27. package/dist-embed/chunks/{WidgetVariableView-CJTAKqh1.js → WidgetVariableView-BTOwHP78.js} +1 -1
  28. package/dist-embed/chunks/YouTubePlugin-Bs4zZIB1.js +1 -0
  29. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-CWj4pFxo.js → abnfDiagram-VCTEODGH-D5p59vS_.js} +1 -1
  30. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-B4x7mfou.js → abnfDiagram-VCTEODGH-DRYbUvhc.js} +1 -1
  31. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-BB82iKLz.js → ar-SA-G6X2FPQ2-D6XRzkBS.js} +1 -1
  32. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-CRIN999O.js → architectureDiagram-5GKGNRK7-B7ITKDup.js} +1 -1
  33. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-B2D6lZbf.js → architectureDiagram-5GKGNRK7-DQGv0imf.js} +1 -1
  34. package/dist-embed/chunks/{az-AZ-76LH7QW2-DsMRKXlw.js → az-AZ-76LH7QW2-DBTdUiqp.js} +1 -1
  35. package/dist-embed/chunks/{bg-BG-XCXSNQG7-43Y1kPxa.js → bg-BG-XCXSNQG7-DuhcsaSL.js} +1 -1
  36. package/dist-embed/chunks/{blockDiagram-868be97b-bBp9uGVj.js → blockDiagram-868be97b-DYe-XTjy.js} +1 -1
  37. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-DNdo_mUi.js → blockDiagram-I7D4REHJ-IltJXCd6.js} +1 -1
  38. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-CPHEppLa.js → blockDiagram-I7D4REHJ-y7tEFo3j.js} +1 -1
  39. package/dist-embed/chunks/{bn-BD-2XOGV67Q-CLqPJBll.js → bn-BD-2XOGV67Q-CPFeLVSN.js} +1 -1
  40. package/dist-embed/chunks/{c4Diagram-3f4bdde3-cYZlcE7E.js → c4Diagram-3f4bdde3-Bybp0wky.js} +1 -1
  41. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-DTmVwmmb.js → c4Diagram-7LVT6UL2-CizxVqqX.js} +1 -1
  42. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-BM2g5U7R.js → c4Diagram-7LVT6UL2-DpaHndz8.js} +1 -1
  43. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-CDFGSEh3.js → ca-ES-6MX7JW3Y-gDR_kEC6.js} +1 -1
  44. package/dist-embed/chunks/{celltoolbartracker-D67W4XWx.js → celltoolbartracker-DLF4PWyW.js} +1 -1
  45. package/dist-embed/chunks/{chunk-2Q5K7J3B-CsB-r261.js → chunk-2Q5K7J3B-BI6lURun.js} +1 -1
  46. package/dist-embed/chunks/{chunk-2Q5K7J3B-CuegvedF.js → chunk-2Q5K7J3B-DWoLSrj9.js} +1 -1
  47. package/dist-embed/chunks/{chunk-5VM5RSS4-D4Ed2_vW.js → chunk-5VM5RSS4-CDh4wYym.js} +1 -1
  48. package/dist-embed/chunks/{chunk-5VM5RSS4-MJQ9uhYe.js → chunk-5VM5RSS4-SleuNqDC.js} +1 -1
  49. package/dist-embed/chunks/{chunk-F27PBJKO-DnjXjdOV.js → chunk-F27PBJKO-AvWsNGYY.js} +1 -1
  50. package/dist-embed/chunks/{chunk-F27PBJKO-BKTrewOm.js → chunk-F27PBJKO-h_FwJMTr.js} +1 -1
  51. package/dist-embed/chunks/{chunk-IMKFNOWR-Bf7PlvQM.js → chunk-IMKFNOWR-DGRceKiU.js} +1 -1
  52. package/dist-embed/chunks/{chunk-IMKFNOWR-BiXdYxxk.js → chunk-IMKFNOWR-Hx4a5yny.js} +1 -1
  53. package/dist-embed/chunks/{chunk-JWPE2WC7-DcVyhh3j.js → chunk-JWPE2WC7-A4gy2qc4.js} +1 -1
  54. package/dist-embed/chunks/{chunk-JWPE2WC7-DmWR08qa.js → chunk-JWPE2WC7-BuJactJo.js} +1 -1
  55. package/dist-embed/chunks/{chunk-POPQ4Y6H-Bw6JH9TT.js → chunk-POPQ4Y6H-CFM-817s.js} +1 -1
  56. package/dist-embed/chunks/{chunk-POPQ4Y6H-snvBGTqY.js → chunk-POPQ4Y6H-CmRF80iG.js} +1 -1
  57. package/dist-embed/chunks/{chunk-SVP7TREG-DLZdx--b.js → chunk-SVP7TREG-CryZx9JE.js} +1 -1
  58. package/dist-embed/chunks/{chunk-SVP7TREG-dE58fUkJ.js → chunk-SVP7TREG-DSNzmytH.js} +1 -1
  59. package/dist-embed/chunks/{chunk-TICWLB2K-DNXzQOV5.js → chunk-TICWLB2K-CEaDF8ZJ.js} +1 -1
  60. package/dist-embed/chunks/{chunk-TICWLB2K-4NdGhPfF.js → chunk-TICWLB2K-DyGS3fIj.js} +1 -1
  61. package/dist-embed/chunks/{chunk-XXDRQBXY-OKsVfhjO.js → chunk-XXDRQBXY-8Cnzpdjz.js} +1 -1
  62. package/dist-embed/chunks/{chunk-XXDRQBXY-D57w8SHP.js → chunk-XXDRQBXY-DxQBcVOz.js} +1 -1
  63. package/dist-embed/chunks/{classDiagram-ZZMXUADV-oYXGLbJe.js → classDiagram-ZZMXUADV-BQkO1UYr.js} +1 -1
  64. package/dist-embed/chunks/{classDiagram-ZZMXUADV-D35oEC_r.js → classDiagram-ZZMXUADV-yvP3zMO3.js} +1 -1
  65. package/dist-embed/chunks/{classDiagram-f62afe4f-DWY2Ws4r.js → classDiagram-f62afe4f-AYfpYKtp.js} +1 -1
  66. package/dist-embed/chunks/{classDiagram-v2-604399ef-By5ijR28.js → classDiagram-v2-604399ef-BWyNcT_y.js} +1 -1
  67. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-oYXGLbJe.js → classDiagram-v2-VYDZK3BY-BQkO1UYr.js} +1 -1
  68. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-D35oEC_r.js → classDiagram-v2-VYDZK3BY-yvP3zMO3.js} +1 -1
  69. package/dist-embed/chunks/{code-block-IT6T5CEO-DvUhQbDq.js → code-block-IT6T5CEO-F4BSIGY6.js} +1 -1
  70. package/dist-embed/chunks/{component-DquJEKgN.js → component-DMQ8W8n1.js} +3 -3
  71. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-j33onHvG.js → cose-bilkent-JH36ORCC-C3HC0XIY.js} +1 -1
  72. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-CfuJvtzg.js → cose-bilkent-JH36ORCC-MVxlcfpd.js} +1 -1
  73. package/dist-embed/chunks/{createText-aed3d8b3-DvlG46OI.js → createText-aed3d8b3-CEJODAXJ.js} +1 -1
  74. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-ByNB8eZd.js → cs-CZ-2BRQDIVT-BXQxcYp6.js} +1 -1
  75. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-YhGHtmc4.js → cynefinDiagram-5FMLGOSQ-D87ENxS0.js} +1 -1
  76. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-CPb2yRsU.js → cynefinDiagram-5FMLGOSQ-DNRKTIHx.js} +1 -1
  77. package/dist-embed/chunks/{da-DK-5WZEPLOC-B7MrVwy8.js → da-DK-5WZEPLOC-Ck3vidj3.js} +1 -1
  78. package/dist-embed/chunks/{dagre-GXQ25YYZ-CSSSVwOB.js → dagre-GXQ25YYZ-BOhThFKd.js} +1 -1
  79. package/dist-embed/chunks/{dagre-GXQ25YYZ-bjTeZGWE.js → dagre-GXQ25YYZ-DscCD5Uq.js} +1 -1
  80. package/dist-embed/chunks/{de-DE-XR44H4JA-CN1cdk94.js → de-DE-XR44H4JA-CPZgrOuc.js} +1 -1
  81. package/dist-embed/chunks/{diagram-S7CK7UJ4-CFdSwdyc.js → diagram-S7CK7UJ4-CUhme3Bl.js} +1 -1
  82. package/dist-embed/chunks/{diagram-S7CK7UJ4-CFDVHfda.js → diagram-S7CK7UJ4-zDQduoQy.js} +1 -1
  83. package/dist-embed/chunks/{diagram-UQ7AKVKN-DDaeau23.js → diagram-UQ7AKVKN-BxhQPjAM.js} +1 -1
  84. package/dist-embed/chunks/{diagram-UQ7AKVKN-GZbDy6ob.js → diagram-UQ7AKVKN-Byi-v8UN.js} +1 -1
  85. package/dist-embed/chunks/{diagram-VSXAHHWV-nXDiS81a.js → diagram-VSXAHHWV-CqihYkDH.js} +1 -1
  86. package/dist-embed/chunks/{diagram-VSXAHHWV-C6q67wko.js → diagram-VSXAHHWV-au-v2v9D.js} +1 -1
  87. package/dist-embed/chunks/{diagram-VX7I27RA-DQUkfMrD.js → diagram-VX7I27RA-Cd5PaF_n.js} +1 -1
  88. package/dist-embed/chunks/{diagram-VX7I27RA-CYLfpYa4.js → diagram-VX7I27RA-ETzwrw79.js} +1 -1
  89. package/dist-embed/chunks/{diagram-Z3DM3KII-DZziYptV.js → diagram-Z3DM3KII-AcMuRFo5.js} +1 -1
  90. package/dist-embed/chunks/{diagram-Z3DM3KII-v-9naUk_.js → diagram-Z3DM3KII-DkbsvY2A.js} +1 -1
  91. package/dist-embed/chunks/{document-BpXPH_dr.js → document-Dluvp7zl.js} +1 -1
  92. package/dist-embed/chunks/{drivecontents-Bg9_6Kmo.js → drivecontents-CxwZz_5W.js} +1 -1
  93. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-EvDUmZgJ.js → ebnfDiagram-PWID7BFC-BrEs-SB2.js} +1 -1
  94. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-CDmryeYY.js → ebnfDiagram-PWID7BFC-DuWfMZcD.js} +1 -1
  95. package/dist-embed/chunks/{edges-b2856ca0-CTakYT6h.js → edges-b2856ca0-Czd3-xvj.js} +1 -1
  96. package/dist-embed/chunks/{el-GR-BZB4AONW-DnaGhWD1.js → el-GR-BZB4AONW-CjQSkw0P.js} +1 -1
  97. package/dist-embed/chunks/{erDiagram-5d81789a-CpiBBm7t.js → erDiagram-5d81789a-JegaF4gy.js} +1 -1
  98. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-B2QZDDaO.js → erDiagram-RLTQ6QDP-Cpn6_cd1.js} +1 -1
  99. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-hsnql-YF.js → erDiagram-RLTQ6QDP-xubaXuKR.js} +1 -1
  100. package/dist-embed/chunks/{es-ES-U4NZUMDT-DE1vZzDE.js → es-ES-U4NZUMDT-CQz3Tsxk.js} +1 -1
  101. package/dist-embed/chunks/{eu-ES-A7QVB2H4-DmHB0zpm.js → eu-ES-A7QVB2H4-DPwxHXvP.js} +1 -1
  102. package/dist-embed/chunks/{fa-IR-HGAKTJCU-CNzE8tJj.js → fa-IR-HGAKTJCU-DlQyRFJP.js} +1 -1
  103. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-Ca2vTFQC.js → fi-FI-Z5N7JZ37-BL9Dv0rT.js} +1 -1
  104. package/dist-embed/chunks/{flowDb-185abca5-D4uRRPhl.js → flowDb-185abca5-BN_8lgCO.js} +1 -1
  105. package/dist-embed/chunks/{flowDiagram-1629c991-B999anFV.js → flowDiagram-1629c991-YRlRqB59.js} +1 -1
  106. package/dist-embed/chunks/{flowDiagram-HODETNUW-DY4I6lzA.js → flowDiagram-HODETNUW-CzRvxVGK.js} +1 -1
  107. package/dist-embed/chunks/{flowDiagram-HODETNUW-D4E8W9uH.js → flowDiagram-HODETNUW-lW-icIxi.js} +1 -1
  108. package/dist-embed/chunks/{flowDiagram-v2-1d953310-2W9bzV_S.js → flowDiagram-v2-1d953310-DBFSFroi.js} +1 -1
  109. package/dist-embed/chunks/{flowchart-elk-definition-6df44142-Cz-ICcxz.js → flowchart-elk-definition-6df44142-RjL83g27.js} +1 -1
  110. package/dist-embed/chunks/{fr-FR-RHASNOE6-B0yWFX3_.js → fr-FR-RHASNOE6-xB7HyFVv.js} +1 -1
  111. package/dist-embed/chunks/{ganttDiagram-3b0b3873-CR9gwUWB.js → ganttDiagram-3b0b3873-Dowe9cKl.js} +1 -1
  112. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-CoCfE73i.js → ganttDiagram-EL5Y4UJY-CLaynGwe.js} +1 -1
  113. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-cZgkz4jA.js → ganttDiagram-EL5Y4UJY-CNQPBdAP.js} +1 -1
  114. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-CZEgVaQ_.js → gitGraphDiagram-WWUBYQGX-CDuBbPX3.js} +1 -1
  115. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-xXoxdFf9.js → gitGraphDiagram-WWUBYQGX-CupHqYWl.js} +1 -1
  116. package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-NdofvPL5.js → gitGraphDiagram-f01e8bc2-C06Sje1n.js} +1 -1
  117. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-2_3FMVJq.js → gl-ES-HMX3MZ6V-BX50ltap.js} +1 -1
  118. package/dist-embed/chunks/{he-IL-6SHJWFNN-BW1lby00.js → he-IL-6SHJWFNN-DR3hLzYG.js} +1 -1
  119. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-DTixfSwB.js → hi-IN-IWLTKZ5I-C3bSDqVc.js} +1 -1
  120. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-DOfYwLWP.js → hu-HU-A5ZG7DT2--mRUDQG6.js} +1 -1
  121. package/dist-embed/chunks/{id-ID-SAP4L64H-Cwtdtkvg.js → id-ID-SAP4L64H-D6psdwdp.js} +1 -1
  122. package/dist-embed/chunks/{index-Dyh5xopp.js → index-3O3ob63z.js} +15 -15
  123. package/dist-embed/chunks/{index-KgE-JGae.js → index-7F_pA42X.js} +4 -4
  124. package/dist-embed/chunks/{index-9bae90f3-D4JbZiwv.js → index-9bae90f3-BY7E8HZU.js} +1 -1
  125. package/dist-embed/chunks/{index-DYkwi0aX.js → index-Azo_wV3K.js} +1 -1
  126. package/dist-embed/chunks/{index-BFPUYxvD.js → index-B063q-PC.js} +4 -4
  127. package/dist-embed/chunks/index-B0KVfQGJ.js +1 -0
  128. package/dist-embed/chunks/{index-BRBFWMMG.js → index-B2He8CnP.js} +1 -1
  129. package/dist-embed/chunks/{index-BAr0Q6NS.js → index-BExwmtFS.js} +1 -1
  130. package/dist-embed/chunks/{index-B3WvcNQa.js → index-BJhxZF_K.js} +1 -1
  131. package/dist-embed/chunks/{index-CXL3UCHy.js → index-BYMZi_1t.js} +1 -1
  132. package/dist-embed/chunks/{index-wovGU2zp.js → index-BblwlEJB.js} +1 -1
  133. package/dist-embed/chunks/{index-DvpdAlVH.js → index-BdvS7Q4t.js} +1 -1
  134. package/dist-embed/chunks/{index-S-sjhoD3.js → index-BhU2ra4k.js} +3 -3
  135. package/dist-embed/chunks/{index-j-oeqTuo.js → index-BipXK1tF.js} +1 -1
  136. package/dist-embed/chunks/{index-B_9UD0bt.js → index-BlWZloLe.js} +3 -3
  137. package/dist-embed/chunks/{index-B-UP9DlM.js → index-BzXMsI1v.js} +1 -1
  138. package/dist-embed/chunks/{index-CPY91aGL.js → index-BzxtV5-v.js} +1 -1
  139. package/dist-embed/chunks/{index-C17RrmNV.js → index-C01nR1dW.js} +1 -1
  140. package/dist-embed/chunks/{index-t_gNTVoL.js → index-C643Hfu1.js} +1 -1
  141. package/dist-embed/chunks/{index-BAwsCLGT.js → index-C6wF35Kk.js} +10 -10
  142. package/dist-embed/chunks/{index--qMT5k1q.js → index-C8IekrmL.js} +1 -1
  143. package/dist-embed/chunks/{index-BxjlpSy4.js → index-C9CpG6Nf.js} +1 -1
  144. package/dist-embed/chunks/{index-BITOMOWN.js → index-CA8D7U2s.js} +2 -2
  145. package/dist-embed/chunks/{index-DEn5R18M.js → index-CUL9WiLS.js} +5 -5
  146. package/dist-embed/chunks/{index-DFEBhySA.js → index-Cknn3VQD.js} +1 -1
  147. package/dist-embed/chunks/{index-BJ7Yskx5.js → index-CpcHHQd7.js} +1 -1
  148. package/dist-embed/chunks/{index-wzK_9qZx.js → index-CvBxCcaE.js} +1 -1
  149. package/dist-embed/chunks/{index-DkUimZI8.js → index-CzXnKkqM.js} +1 -1
  150. package/dist-embed/chunks/{index-Ck-wonpc.js → index-D0DBuFMt.js} +1 -1
  151. package/dist-embed/chunks/{index-CMUTS_sA.js → index-D1lY79hS.js} +4 -4
  152. package/dist-embed/chunks/{index-sQy5cmWo.js → index-DB46n9Tf.js} +2 -2
  153. package/dist-embed/chunks/{index-Cgf7tlW3.js → index-DToDguC3.js} +1 -1
  154. package/dist-embed/chunks/{index-Bi5hexj-.js → index-DVDREi21.js} +1 -1
  155. package/dist-embed/chunks/{index-TRLGqZaF.js → index-DVUMPcVw.js} +1 -1
  156. package/dist-embed/chunks/{index-YcqCoWJl.js → index-DcZQ2Oqj.js} +1 -1
  157. package/dist-embed/chunks/{index-bRwN_nxZ.js → index-DvWWLOj6.js} +1 -1
  158. package/dist-embed/chunks/{index-Clp8quV1.js → index-Dv_XGY6Q.js} +1 -1
  159. package/dist-embed/chunks/{index-C3oDHYfa.js → index-DxsDy6PY.js} +1 -1
  160. package/dist-embed/chunks/{index-Jt4bWLoz.js → index-EpYurdzk.js} +6 -6
  161. package/dist-embed/chunks/{index-CzuLxFBK.js → index-MTdX216X.js} +1 -1
  162. package/dist-embed/chunks/{index-B2OWWcCj.js → index-YqGHzM2S.js} +1 -1
  163. package/dist-embed/chunks/{index-BvvaLLhn.js → index-a51XM5L8.js} +3 -3
  164. package/dist-embed/chunks/{index-CrNfUmIU.js → index-jy9kOmqu.js} +1 -1
  165. package/dist-embed/chunks/{index-e5PkgYFg.js → index-kpqZuE4J.js} +1 -1
  166. package/dist-embed/chunks/{index-BgFbP5P0.js → index-qsUgit40.js} +1 -1
  167. package/dist-embed/chunks/{index-Cq19rGjf.js → index-rfsiH_M6.js} +1 -1
  168. package/dist-embed/chunks/{index-BYQwy0Zx.js → index-s3hayhRS.js} +2 -2
  169. package/dist-embed/chunks/{index.esm-RCuogyl2.js → index.esm-CWygaJYM.js} +1 -1
  170. package/dist-embed/chunks/{index.esm-CVNfNVDy.js → index.esm-DYeUXS4c.js} +1 -1
  171. package/dist-embed/chunks/{infoDiagram-27XIBGKW-DpFWmHEH.js → infoDiagram-27XIBGKW-Ctm-zk09.js} +1 -1
  172. package/dist-embed/chunks/{infoDiagram-27XIBGKW-DRf2y76w.js → infoDiagram-27XIBGKW-DRzH33_4.js} +1 -1
  173. package/dist-embed/chunks/{infoDiagram-a29d40f1-CehVkLUM.js → infoDiagram-a29d40f1-c78-ZMuT.js} +1 -1
  174. package/dist-embed/chunks/{isEqual-BybBNsZK.js → isEqual-niFNV5MZ.js} +1 -1
  175. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-C_d1mmp3.js → ishikawaDiagram-5VMMS53U-CILSTTqm.js} +1 -1
  176. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-B534qRQJ.js → ishikawaDiagram-5VMMS53U-DKv5KL85.js} +1 -1
  177. package/dist-embed/chunks/{it-IT-JPQ66NNP-C3xZ61-6.js → it-IT-JPQ66NNP-BfrG_atL.js} +1 -1
  178. package/dist-embed/chunks/{ja-JP-DBVTYXUO-CeTmglEb.js → ja-JP-DBVTYXUO-sahpmNGY.js} +1 -1
  179. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-DEeA8WJr.js → journeyDiagram-3NMN7TZE-CSMQRlsr.js} +1 -1
  180. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-C0GQLJYz.js → journeyDiagram-3NMN7TZE-DlMPiHSP.js} +1 -1
  181. package/dist-embed/chunks/{journeyDiagram-95396277-Cwx_BI95.js → journeyDiagram-95396277-VzHClVrX.js} +1 -1
  182. package/dist-embed/chunks/{kaa-6HZHGXH3-D6Jr6B6Y.js → kaa-6HZHGXH3-BrkhtXQj.js} +1 -1
  183. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-pEXBqeuG.js → kab-KAB-ZGHBKWFO-DwtFIV_I.js} +1 -1
  184. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DucvIyR1.js → kanban-definition-UXKFOSKX-BkxvAXq2.js} +1 -1
  185. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-Dww2l0wQ.js → kanban-definition-UXKFOSKX-esf1amn7.js} +1 -1
  186. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-BRJunmHm.js → kk-KZ-P5N5QNE5-UxN1LGH5.js} +1 -1
  187. package/dist-embed/chunks/{km-KH-HSX4SM5Z--GJgT9rN.js → km-KH-HSX4SM5Z-B7lolfpy.js} +1 -1
  188. package/dist-embed/chunks/{ko-KR-MTYHY66A-Bjnez4qR.js → ko-KR-MTYHY66A-CnxefCaN.js} +1 -1
  189. package/dist-embed/chunks/{ku-TR-6OUDTVRD-DgOdYJrS.js → ku-TR-6OUDTVRD-Bt7bmFnv.js} +1 -1
  190. package/dist-embed/chunks/{layout-DiAMrtPi.js → layout-D7Mk1riq.js} +1 -1
  191. package/dist-embed/chunks/{layout-LNJhMVxV.js → layout-Sl9Lf6Ae.js} +1 -1
  192. package/dist-embed/chunks/{lexicalHooks-DEzWXVZY.js → lexicalHooks-DKF-DsxG.js} +1 -1
  193. package/dist-embed/chunks/{lt-LT-XHIRWOB4-BMwhrtjM.js → lt-LT-XHIRWOB4-D6qkXs9m.js} +1 -1
  194. package/dist-embed/chunks/{lv-LV-5QDEKY6T-0pxW7YE0.js → lv-LV-5QDEKY6T-D8g27j86.js} +1 -1
  195. package/dist-embed/chunks/{mermaid.core-huvnfV8t.js → mermaid.core-BhiOhb5K.js} +3 -3
  196. package/dist-embed/chunks/{mermaid.core-Dw1n-Hii.js → mermaid.core-CRlujv29.js} +5 -5
  197. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-DWUezf-k.js → mindmap-definition-YA3MSWOX-BJQsz4H1.js} +1 -1
  198. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-DKQu2lXp.js → mindmap-definition-YA3MSWOX-eCxs0BsL.js} +1 -1
  199. package/dist-embed/chunks/{mindmap-definition-e4c1d938-DSDPusnk.js → mindmap-definition-e4c1d938-DoGG9eDO.js} +1 -1
  200. package/dist-embed/chunks/{model-BHONoBA6.js → model-BziAhKNp.js} +1 -1
  201. package/dist-embed/chunks/{mr-IN-CRQNXWMA-tndp8BXC.js → mr-IN-CRQNXWMA-CMbVGyJm.js} +1 -1
  202. package/dist-embed/chunks/{my-MM-5M5IBNSE-sispDhO4.js → my-MM-5M5IBNSE-B-KPsx1j.js} +1 -1
  203. package/dist-embed/chunks/{nb-NO-T6EIAALU-CjBurOuS.js → nb-NO-T6EIAALU-Cl7QLAt7.js} +1 -1
  204. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-B58EVmr3.js → nl-NL-IS3SIHDZ-Brzte_o2.js} +1 -1
  205. package/dist-embed/chunks/{nn-NO-6E72VCQL-D1p7LZSq.js → nn-NO-6E72VCQL-CzCKEx02.js} +1 -1
  206. package/dist-embed/chunks/{oc-FR-POXYY2M6-C1M8sddP.js → oc-FR-POXYY2M6-DA72PkVY.js} +1 -1
  207. package/dist-embed/chunks/{pa-IN-N4M65BXN-D8ESzASl.js → pa-IN-N4M65BXN-CzkFYtL0.js} +1 -1
  208. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-ChXFZFas.js → pegDiagram-XKGWAZYB-CD3xZvKE.js} +1 -1
  209. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-BUPTGFu3.js → pegDiagram-XKGWAZYB-CV-d6HkK.js} +1 -1
  210. package/dist-embed/chunks/{percentages-BXMCSKIN-BihMTsFR.js → percentages-BXMCSKIN-mjCCp4uI.js} +6 -6
  211. package/dist-embed/chunks/{pica-BQREYloS.js → pica-5TeyVfIV.js} +1 -1
  212. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-DAuVz3z-.js → pieDiagram-E7YTZNPT-DipS--g7.js} +1 -1
  213. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-BORvsKK0.js → pieDiagram-E7YTZNPT-toANOh_O.js} +1 -1
  214. package/dist-embed/chunks/{pieDiagram-c941bede-FM1PHjj3.js → pieDiagram-c941bede-DytniBrW.js} +1 -1
  215. package/dist-embed/chunks/{pl-PL-T2D74RX3-DQGe6LHC.js → pl-PL-T2D74RX3-F4ebFTYK.js} +1 -1
  216. package/dist-embed/chunks/{plugin-BoxsYxwM.js → plugin-Cf3g-jak.js} +1 -1
  217. package/dist-embed/chunks/plugin-DA_NCYQX.js +1 -0
  218. package/dist-embed/chunks/{pt-BR-5N22H2LF-CvXBgZQs.js → pt-BR-5N22H2LF-B5i8LuE4.js} +1 -1
  219. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-BMnnlIUJ.js → pt-PT-UZXXM6DQ-BQ7hfRRg.js} +1 -1
  220. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-DpGcSrR9.js → quadrantDiagram-AXDQQJYC-D_j5dzK-.js} +1 -1
  221. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-CZe_C7e2.js → quadrantDiagram-AXDQQJYC-DlhtjZ-k.js} +1 -1
  222. package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-DZNznYqD.js → quadrantDiagram-cf8b8fe0-BQ2yjLYu.js} +1 -1
  223. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-CuL_zbZ8.js → railroadDiagram-O6MQD6OU-CZFkdwSz.js} +1 -1
  224. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-BnCn-tIV.js → railroadDiagram-O6MQD6OU-aWlxxhLc.js} +1 -1
  225. package/dist-embed/chunks/{renderer-lVFw9lw7.js → renderer-2D5v6hpK.js} +1 -1
  226. package/dist-embed/chunks/{requirementDiagram-53bda41b-BLToEv8I.js → requirementDiagram-53bda41b-CWV_b9FE.js} +1 -1
  227. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-KU7DW76t.js → requirementDiagram-BXWQKSXE-BSF51uZZ.js} +1 -1
  228. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-W6Oaw9v0.js → requirementDiagram-BXWQKSXE-EVwiX2gg.js} +1 -1
  229. package/dist-embed/chunks/{ro-RO-JPDTUUEW-DZ-9UUH7.js → ro-RO-JPDTUUEW-BdcZRS6h.js} +1 -1
  230. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-JlRBwjob.js → ru-RU-B4JR7IUQ-Cta1z8f6.js} +1 -1
  231. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-y5tPDHfE.js → sankeyDiagram-P5KCCOFB-BqD6w06O.js} +1 -1
  232. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-1UXJ4wHP.js → sankeyDiagram-P5KCCOFB-t6rHaBZJ.js} +1 -1
  233. package/dist-embed/chunks/{sankeyDiagram-c3ef121a-6gF3bcjb.js → sankeyDiagram-c3ef121a-C9O52Zx9.js} +1 -1
  234. package/dist-embed/chunks/{sequenceDiagram-82a5b84f-CglVrG1T.js → sequenceDiagram-82a5b84f-Dga-BwWi.js} +1 -1
  235. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-CG-4aOyN.js → sequenceDiagram-WJ2MYXX4-DphVeQVS.js} +1 -1
  236. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-DVcXqRnq.js → sequenceDiagram-WJ2MYXX4-ih6W0378.js} +1 -1
  237. package/dist-embed/chunks/{sessions-3PQsLINe.js → sessions-APuuDN3K.js} +2 -2
  238. package/dist-embed/chunks/{si-LK-N5RQ5JYF-Bx8kHnkd.js → si-LK-N5RQ5JYF-DYy_OKHx.js} +1 -1
  239. package/dist-embed/chunks/{sizeCapture-INFHLROL-e294GOp7.js → sizeCapture-INFHLROL-CxIMCruL.js} +1 -1
  240. package/dist-embed/chunks/{sizeCapture-INFHLROL-CCZ7JXfm.js → sizeCapture-INFHLROL-o0dzt8-T.js} +1 -1
  241. package/dist-embed/chunks/{sk-SK-C5VTKIMK-xsfEfbZb.js → sk-SK-C5VTKIMK-B4A8rgzq.js} +1 -1
  242. package/dist-embed/chunks/{sl-SI-NN7IZMDC-SQYUECnr.js → sl-SI-NN7IZMDC-Dn2yU1RA.js} +1 -1
  243. package/dist-embed/chunks/{stateDiagram-43e79a5f-DktiQR1L.js → stateDiagram-43e79a5f-RBFnM6HD.js} +1 -1
  244. package/dist-embed/chunks/{stateDiagram-D77RDMKH-Czz7slb9.js → stateDiagram-D77RDMKH-DUbaZs3a.js} +1 -1
  245. package/dist-embed/chunks/{stateDiagram-D77RDMKH-DvgDxPXs.js → stateDiagram-D77RDMKH-R5RRRvFY.js} +1 -1
  246. package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-CGEkaZYz.js → stateDiagram-v2-2041ed4f-O5FpnsEz.js} +1 -1
  247. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-CbzbC1qh.js → stateDiagram-v2-MP3YSRHH-CxTXB7mT.js} +1 -1
  248. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-DGG9ROyK.js → stateDiagram-v2-MP3YSRHH-xKTLvXGN.js} +1 -1
  249. package/dist-embed/chunks/{styles-455b33cd-BpfBULhz.js → styles-455b33cd-D4Xv2qYx.js} +1 -1
  250. package/dist-embed/chunks/{styles-f932cba9-DsM5quNh.js → styles-f932cba9-BRIqeB8k.js} +1 -1
  251. package/dist-embed/chunks/{styles-fcc2142b-bC7I59Fx.js → styles-fcc2142b-CSNd2DtU.js} +1 -1
  252. package/dist-embed/chunks/{subset-shared.chunk-Ch6j8nKC.js → subset-shared.chunk-SugOGKH0.js} +1 -1
  253. package/dist-embed/chunks/{subset-worker.chunk-pJjck5pR.js → subset-worker.chunk-CHn-RJwQ.js} +1 -1
  254. package/dist-embed/chunks/{sv-SE-XGPEYMSR-BxcjSHE2.js → sv-SE-XGPEYMSR-DIGNKjA1.js} +1 -1
  255. package/dist-embed/chunks/{svgDrawCommon-148a3cd9-OC_CIhNw.js → svgDrawCommon-148a3cd9-ioBjWI45.js} +1 -1
  256. package/dist-embed/chunks/{swimlanes-42K2YHIH-DLiqjxvc.js → swimlanes-42K2YHIH-BPXSOfWl.js} +1 -1
  257. package/dist-embed/chunks/{swimlanes-42K2YHIH-nfpJsGfW.js → swimlanes-42K2YHIH-DID4P1mJ.js} +1 -1
  258. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-DVkRheaE.js → swimlanesDiagram-VR7AAH4N-B216TpFb.js} +1 -1
  259. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-DjeQ0TlI.js → swimlanesDiagram-VR7AAH4N-C5LAWW5q.js} +1 -1
  260. package/dist-embed/chunks/{ta-IN-2NMHFXQM-rItSkDUS.js → ta-IN-2NMHFXQM-h5n2V9ms.js} +1 -1
  261. package/dist-embed/chunks/{th-TH-HPSO5L25-B7UzESFj.js → th-TH-HPSO5L25-DPUFV7b6.js} +1 -1
  262. package/dist-embed/chunks/{timeline-definition-24CTP7MA-CapVlXMl.js → timeline-definition-24CTP7MA-CsrTDzso.js} +1 -1
  263. package/dist-embed/chunks/{timeline-definition-24CTP7MA-eOK0mNc7.js → timeline-definition-24CTP7MA-Y3tUsmSp.js} +1 -1
  264. package/dist-embed/chunks/{timeline-definition-7545f45a-afx9iuZR.js → timeline-definition-7545f45a-Dwe7O50H.js} +1 -1
  265. package/dist-embed/chunks/{tokens-BfuLIPUq.js → tokens-DTIgYcNS.js} +1 -1
  266. package/dist-embed/chunks/{tr-TR-DEFEU3FU-Ci6oNfEX.js → tr-TR-DEFEU3FU-BezJkdMx.js} +1 -1
  267. package/dist-embed/chunks/{uk-UA-QMV73CPH-C9csqvO6.js → uk-UA-QMV73CPH-CqILlosm.js} +1 -1
  268. package/dist-embed/chunks/{usePrimerThemeBridge-D_1NuGKb.js → usePrimerThemeBridge-CoHussa9.js} +1 -1
  269. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-D12hHdDQ.js → vennDiagram-4TSXK5OY-BhVdyHxt.js} +1 -1
  270. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-CJ0VIZqI.js → vennDiagram-4TSXK5OY-ClTlC2ql.js} +1 -1
  271. package/dist-embed/chunks/{vi-VN-M7AON7JQ-DRAj2kZj.js → vi-VN-M7AON7JQ-CnkPVQ0a.js} +1 -1
  272. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-B1FfO2GD.js → wardleyDiagram-VM6X3IG4-DbWIMpvU.js} +1 -1
  273. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-BfuBJbTV.js → wardleyDiagram-VM6X3IG4-kS16z5iB.js} +1 -1
  274. package/dist-embed/chunks/{xychartDiagram-3f383b91-BMDhPCCG.js → xychartDiagram-3f383b91-DYoT_EjG.js} +1 -1
  275. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-xLO3w9Bz.js → xychartDiagram-S5SC5T6Z-CdwuwQAF.js} +1 -1
  276. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-DZ-XUHKl.js → xychartDiagram-S5SC5T6Z-KeQp-cQ1.js} +1 -1
  277. package/dist-embed/chunks/{zh-CN-LNUGB5OW-DLOyW8hH.js → zh-CN-LNUGB5OW-CNdfctAT.js} +1 -1
  278. package/dist-embed/chunks/{zh-HK-E62DVLB3-DwC6_2Ws.js → zh-HK-E62DVLB3-DEXwa5-T.js} +1 -1
  279. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-DEMugIwa.js → zh-TW-RAJ6MFWO-BF7cCYAK.js} +1 -1
  280. package/dist-embed/datalayer-app-main.js +21 -21
  281. package/lib/apps/core/index.d.ts +16 -0
  282. package/lib/apps/index.d.ts +2 -2
  283. package/lib/apps/index.js +1 -1
  284. package/lib/apps/plugins/agents/DatalayerAgentBridge.js +9 -14
  285. package/lib/apps/plugins/agents/index.d.ts +1 -1
  286. package/lib/apps/plugins/agents/index.js +1 -1
  287. package/lib/apps/plugins/agents/plugin.d.ts +10 -0
  288. package/lib/apps/plugins/agents/plugin.js +10 -0
  289. package/lib/apps/plugins/chat/ChatView.js +13 -1
  290. package/lib/apps/shell/LoopWorkspace.d.ts +8 -1
  291. package/lib/apps/shell/LoopWorkspace.js +5 -3
  292. package/lib/chat/header/ChatHeaderBase.d.ts +3 -1
  293. package/lib/chat/header/ChatHeaderBase.js +2 -2
  294. package/lib/chat/header/ChatViewModeToggle.d.ts +7 -1
  295. package/lib/chat/header/ChatViewModeToggle.js +5 -2
  296. package/lib/protocols/agentProtocols.js +3 -1
  297. package/lib/protocols/pap/index.d.ts +4 -0
  298. package/lib/protocols/pap/index.js +41 -0
  299. package/package.json +2 -2
  300. package/dist-embed/chunks/Avatar-DbU3YP4x.js +0 -1
  301. package/dist-embed/chunks/DatalayerAgentBridge-Bz2KWRXK.js +0 -1
  302. package/dist-embed/chunks/YouTubePlugin-xBjNr2Iu.js +0 -1
  303. package/dist-embed/chunks/index-DlK9qLPz.js +0 -1
  304. package/dist-embed/chunks/plugin-Dz5L6Xn8.js +0 -1
@@ -1 +1 @@
1
- import{r as j,cu as Y,cv as Z,c5 as C,J as X,ak as S,c1 as ee,v as k,b_ as te,af as I,cw as oe,ai as F,cx as re,cy as V,bZ as _,cz as ie,cA as W,cB as ne,cC as L,cD as se,aj as ae,c7 as le,c4 as O,cE as E,cF as ce,cG as de,cH as pe,cI as ue,cJ as me,c2 as he,cK as fe,cL as ge,cM as we,cN as be,cO as ye,cP as _e,cQ as ve,cR as A}from"../datalayer-app-main.js";import{T as q,G as Fe,b as U,I as xe,d as H}from"./index-BvvaLLhn.js";import{I as Be}from"./tokens-BHMD_ju9.js";import{d as Ce,e as ke,J as Pe,c as R,f as Te,g as Se,F as Ie,h as je}from"./index-B_9UD0bt.js";import{I as J}from"./tokens-CENaHAHm.js";import{a as B,I as P,b as G}from"./tokens-BvmYCqiu.js";import{I as M}from"./tokens-BHLmeqjP.js";import{I as We}from"./treepathupdater-BPaxwIOs.js";import{g as Ne}from"./kernelfilestypes-D2B-sFfi.js";import"./hoverbox-CStlKQWE.js";import"./Output-BscOPLqE.js";import"./index-BYQwy0Zx.js";import"./index-BJ7Yskx5.js";import"./color-CG7_7V2-.js";import"./isEqual-BybBNsZK.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./PaintbrushIcon-CLU8RilX.js";import"./index-B3WvcNQa.js";import"./RestartIcon-Ca6_HoK0.js";import"./CellSidebarExtension-CQlXdanG.js";import"./NotebookSkeleton-HdM76lOj.js";import"./Avatar-DbU3YP4x.js";import"./renderer-lVFw9lw7.js";import"./SquareIcon-e3ygcjpv.js";import"./SortAscIcon-CVKVWIWQ.js";import"./url-DuKx0yk0.js";/* empty css */import"./index-Dro44tIm.js";/* empty css *//* empty css */import"./index-DsG9xhMj.js";/* empty css */import"./index-CNU-WVhQ.js";import"./index--OLIX362.js";import"./index-DYGslHkf.js";import"./index-BSRVX3UN.js";import"./index-BH2OX5l8.js";import"./index-C3vDfO5_.js";import"./index-Ko8lxXFd.js";import"./index-CB9u17_J.js";import"./index-BUVtc_FV.js";import"./ArrowLeftIcon-Y3PTljcl.js";import"./SkubbleIcon-tlg17jBG.js";import"./usePrimerThemeBridge-D_1NuGKb.js";import"./index-j-oeqTuo.js";import"./KernelVariables-KCUfxhF4.js";import"./index-BvgsWH_d.js";import"./SortDescIcon-CS4EzHeS.js";import"./NotebookToolbar-DMKCe3c2.js";import"./RepoPushIcon-Cm8g9NuL.js";import"./Toolbar-6Hdi_m3T.js";import"./sessions-3PQsLINe.js";import"./tokens-BfuLIPUq.js";import"./drivecontents-Bg9_6Kmo.js";import"./kernel-BI-BLP-K.js";function Me(o){const{width:a,percentage:u,...p}=o;return j.createElement("div",{className:"jp-Statusbar-ProgressBar-progress-bar",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u},j.createElement(Le,{percentage:u,...p,contentWidth:a}))}function Le(o){return j.createElement("div",{style:{width:`${o.percentage}%`}},j.createElement("p",null,o.content))}class K extends Y{constructor(a){super({icon:Z,label:a.label,onClick:()=>{this._input.click()},tooltip:N.translateToolTip(a.translator),enabled:a.model.allowFileUploads}),this._onInputChanged=()=>{const p=Array.prototype.slice.call(this._input.files).map(r=>this.fileBrowserModel.upload(r));Promise.all(p).then(r=>{this._filesUploaded.emit(r)}).catch(r=>{C(this._trans._p("showErrorMessage","Upload Error"),r)})},this._onInputClicked=()=>{this._input.value=""},this._input=N.createUploadInput(),this._filesUploaded=new X(this),this.fileBrowserModel=a.model,this.translator=a.translator||S,this._trans=this.translator.load("jupyterlab"),this._input.onclick=this._onInputClicked,this._input.onchange=this._onInputChanged,this.addClass("jp-id-upload")}get filesUploaded(){return this._filesUploaded}}var N;(function(o){function a(){const p=document.createElement("input");return p.type="file",p.multiple=!0,p}o.createUploadInput=a;function u(p){return p=p||S,p.load("jupyterlab").__("Upload Files")}o.translateToolTip=u})(N||(N={}));const Oe=4;function z(o){const u=(o.translator||S).load("jupyterlab");return k.createElement(Fe,{spacing:Oe},k.createElement(q,{source:u.__("Uploading…")}),k.createElement(Me,{percentage:o.upload}))}const Ue=2e3;class T extends ee{constructor(a){super(new T.Model(a.tracker.currentWidget&&a.tracker.currentWidget.model)),this._onBrowserChange=(u,p)=>{p===null?this.model.browserModel=null:this.model.browserModel=p.model},this.translator=a.translator||S,this._trans=this.translator.load("jupyterlab"),this._tracker=a.tracker,this._tracker.currentChanged.connect(this._onBrowserChange)}render(){return this.model.items.length>0?this.model.items[0].complete?k.createElement(q,{source:this._trans.__("Complete!")}):k.createElement(z,{upload:this.model.items[0].progress,translator:this.translator}):k.createElement(z,{upload:100,translator:this.translator})}dispose(){super.dispose(),this._tracker.currentChanged.disconnect(this._onBrowserChange)}}(function(o){class a extends te{constructor(p){super(),this._uploadChanged=(r,s)=>{if(s.name==="start")this._items.push({path:s.newValue.path,progress:s.newValue.progress*100,complete:!1});else if(s.name==="update"){const t=I.findFirstIndex(this._items,l=>l.path===s.oldValue.path);t!==-1&&(this._items[t].progress=s.newValue.progress*100)}else if(s.name==="finish"){const t=I.findFirstValue(this._items,l=>l.path===s.oldValue.path);t&&(t.complete=!0,setTimeout(()=>{I.removeFirstOf(this._items,t),this.stateChanged.emit(void 0)},Ue))}else if(s.name==="failure")I.removeFirstWhere(this._items,t=>t.path===s.newValue.path);else return;this.stateChanged.emit(void 0)},this._items=[],this._browserModel=null,this.browserModel=p}get items(){return this._items}get browserModel(){return this._browserModel}set browserModel(p){const r=this._browserModel;r&&r.uploadChanged.disconnect(this._uploadChanged),this._browserModel=p,this._items=[],this._browserModel!==null&&this._browserModel.uploadChanged.connect(this._uploadChanged),this.stateChanged.emit(void 0)}}o.Model=a})(T||(T={}));const $="FileBrowser",y="@jupyterlab/filebrowser-extension:browser";var m;(function(o){o.copy="filebrowser:copy",o.copyDownloadLink="filebrowser:copy-download-link",o.cut="filebrowser:cut",o.del="filebrowser:delete",o.download="filebrowser:download",o.duplicate="filebrowser:duplicate",o.selectAll="filebrowser:select-all",o.hideBrowser="filebrowser:hide-main",o.goToPath="filebrowser:go-to-path",o.goUp="filebrowser:go-up",o.openPath="filebrowser:open-path",o.openUrl="filebrowser:open-url",o.open="filebrowser:open",o.openBrowserTab="filebrowser:open-browser-tab",o.paste="filebrowser:paste",o.createNewDirectory="filebrowser:create-new-directory",o.createNewFile="filebrowser:create-new-file",o.createNewMarkdownFile="filebrowser:create-new-markdown-file",o.refresh="filebrowser:refresh",o.rename="filebrowser:rename",o.copyShareableLink="filebrowser:share-main",o.copyPath="filebrowser:copy-path",o.showBrowser="filebrowser:activate",o.shutdown="filebrowser:shutdown",o.toggleBrowser="filebrowser:toggle-main",o.toggleFileFilter="filebrowser:toggle-file-filter",o.toggleNavigateToCurrentDirectory="filebrowser:toggle-navigate-to-current-directory",o.toggleLastModified="filebrowser:toggle-last-modified",o.toggleShowFullPath="filebrowser:toggle-show-full-path",o.toggleFileSize="filebrowser:toggle-file-size",o.toggleSortNotebooksFirst="filebrowser:toggle-sort-notebooks-first",o.toggleHiddenFiles="filebrowser:toggle-hidden-files",o.toggleSingleClick="filebrowser:toggle-single-click-navigation",o.toggleFileCheckboxes="filebrowser:toggle-file-checkboxes"})(m||(m={}));const D="filebrowser",Ee={id:y,description:"Set up the default file browser commands and state restoration",requires:[P,B,F],optional:[Te,M,We,U],provides:G,autoStart:!0,activate:async(o,a,u,p,r,s,t,l)=>{const i=a;r&&r.add(i,D);const c=_.PageConfig.getOption("preferredPath");return c&&await i.model.cd(c),Qe(o,i,u,p,s,l),Promise.all([o.restored,i.model.restored]).then(()=>{t&&i.model.pathChanged.connect((h,e)=>{t(e.newValue)})}),{openPath:m.openPath}}},Ae={id:"@jupyterlab/filebrowser-extension:settings",description:"Set up the default file browser settings",requires:[P],optional:[M],autoStart:!0,activate:(o,a,u)=>{u&&u.load(y).then(p=>{const r={navigateToCurrentDirectory:!1,singleClickNavigation:!1,showLastModifiedColumn:!0,showFileSizeColumn:!1,showHiddenFiles:!1,showFileCheckboxes:!1,sortNotebooksFirst:!1,showFullPath:!1,allowFileUploads:!0};function s(t){let l;for(l in r){const e=t.get(l).composite;a[l]=e}const i=t.get("breadcrumbs").composite;a.minimumBreadcrumbsLeftItems=i.minimumLeftItems,a.minimumBreadcrumbsRightItems=i.minimumRightItems;const c=t.get("filterDirectories").composite,h=t.get("useFuzzyFilter").composite;a.model.filterDirectories=c,a.model.useFuzzyFilter=h}p.changed.connect(s),s(p)})}},ze={id:"@jupyterlab/filebrowser-extension:factory",description:"Provides the file browser factory.",provides:B,requires:[J,F],optional:[oe.IStateDB,Ce.IInfo],activate:async(o,a,u,p,r)=>{const s=new re({namespace:D});return{createFileBrowser:(l,i={})=>{var c,h;const e=i.state===null?void 0:i.state||p||void 0,n=new Ie({translator:u,auto:(c=i.auto)!==null&&c!==void 0?c:!0,manager:a,driveName:i.driveName||"",refreshInterval:i.refreshInterval,refreshStandby:()=>r&&!r.isConnected||"when-hidden",state:e,allowFileUploads:(h=i.allowFileUploads)!==null&&h!==void 0?h:!0}),d=i.restore,f=new je({id:l,model:n,restore:d,translator:u,state:e});return s.add(f),f},tracker:s}}},$e={id:"@jupyterlab/filebrowser-extension:default-file-browser",description:"Provides the default file browser",provides:P,requires:[B],optional:[ke,Pe.ITreeResolver,R,F],activate:async(o,a,u,p,r,s)=>{const{commands:t}=o,l=(s??S).load("jupyterlab"),i=a.createFileBrowser("filebrowser",{auto:!1,restore:!1});i.node.setAttribute("role","region"),i.node.setAttribute("aria-label",l.__("File Browser Section")),i.title.icon=V;const c=()=>{const h=o.commands.keyBindings.find(e=>e.command===m.toggleBrowser);if(h){const e=h.keys.map(ce.formatKeystroke).join(", ");i.title.caption=l.__("File Browser (%1)",e)}else i.title.caption=l.__("File Browser")};return c(),o.commands.keyBindingChanged.connect(()=>{c()}),v.restoreBrowser(i,t,u,p,o,r),i}},Ve={id:"@jupyterlab/filebrowser-extension:download",description:"Adds the download file commands. Disabling this plugin will NOT disable downloading files from the server, if the user enters the appropriate download URLs.",requires:[B,F],autoStart:!0,activate:(o,a,u)=>{const p=u.load("jupyterlab"),{commands:r}=o,{tracker:s}=a;r.addCommand(m.download,{execute:()=>{const t=s.currentWidget;if(t)return t.download()},icon:ne.bindprops({stylesheet:"menuItem"}),label:p.__("Download"),describedBy:{args:{type:"object",properties:{}}}}),r.addCommand(m.copyDownloadLink,{execute:()=>{const t=s.currentWidget;if(t)return t.model.manager.services.contents.getDownloadUrl(t.selectedItems().next().value.path).then(l=>{W.copyToSystem(l)})},isVisible:()=>!!s.currentWidget&&Array.from(s.currentWidget.selectedItems()).length===1,icon:L.bindprops({stylesheet:"menuItem"}),label:p.__("Copy Download Link"),mnemonic:0,describedBy:{args:{type:"object",properties:{}}}})}},qe={id:"@jupyterlab/filebrowser-extension:create-new-language-file",description:"Adds context menu entries for creating Python/R/Julia files",requires:[F],autoStart:!0,activate:async(o,a)=>{const u=a.load("jupyterlab");let p=new A;const r=o.serviceManager.kernelspecs,s=async()=>{var t,l;p&&(p.dispose(),p=new A);const i=await Ne(r);for(const c of i)p.add(o.contextMenu.addItem({command:m.createNewFile,selector:".jp-DirListing-content",args:{ext:c.extensions[0],label:u.__("New %1 File",c.displayName),iconName:(l=(t=c.icon)===null||t===void 0?void 0:t.toString())!==null&&l!==void 0?l:""},rank:52}))};r.specsChanged.connect(s),s().catch(console.warn)}},Q={id:"@jupyterlab/filebrowser-extension:widget",description:"Adds the file browser to the application shell.",requires:[J,P,B,M,xe,F,R,G],optional:[U],autoStart:!0,activate:(o,a,u,p,r,s,t,l,i,c)=>{const{commands:h}=o,{tracker:e}=p,n=t.load("jupyterlab");s.addFactory($,"uploader",d=>new K({model:d.model,translator:t})),se(u,ae(s,r,$,Q.id,t)),l.add(u,"left",{rank:100,type:"File Browser"}),h.addCommand(m.toggleBrowser,{label:n.__("File Browser"),describedBy:{args:{type:"object",properties:{}}},execute:()=>u.isHidden?h.execute(m.showBrowser,void 0):h.execute(m.hideBrowser,void 0)}),h.addCommand(m.showBrowser,{label:n.__("Open the file browser for the provided `path`."),describedBy:{args:{type:"object",properties:{path:{type:"string",description:n.__("The path to open in the file browser")}}}},execute:d=>{const f=d.path||"",w=v.getBrowserForPath(f,u,p);if(w)if(u===w){l.activateById(u.id);return}else{const g=["left","right"];for(const b of g)for(const x of l.widgets(b))if(x.contains(w)){l.activateById(x.id);return}}}}),h.addCommand(m.hideBrowser,{label:n.__("Hide the file browser."),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const d=e.currentWidget;d&&!d.isHidden&&l.collapseLeft()}}),h.addCommand(m.toggleNavigateToCurrentDirectory,{label:n.__("Show Active File in File Browser"),isToggled:()=>u.navigateToCurrentDirectory,execute:()=>{const d=!u.navigateToCurrentDirectory;return r.set(y,"navigateToCurrentDirectory",d).catch(w=>{console.error("Failed to set navigateToCurrentDirectory setting")})},describedBy:{args:{type:"object",properties:{}}}}),c&&c.addItem({command:m.toggleNavigateToCurrentDirectory,category:n.__("File Operations")}),l.restored.then(d=>{d.fresh&&l.mode!=="single-document"&&h.execute(m.showBrowser,void 0)}),Promise.all([o.restored,u.model.restored]).then(()=>{l.currentChanged.connect(async(d,f)=>{if(u.navigateToCurrentDirectory&&f.newValue){const{newValue:w}=f,g=a.contextForWidget(w);if(g){const{path:b}=g;try{await v.navigateToPath(b,u,p,t)}catch(x){console.warn(`${m.goToPath} failed to open: ${b}`,x)}}}})})}},He={id:"@jupyterlab/filebrowser-extension:share-file",description:'Adds the "Copy Shareable Link" command; useful for JupyterHub deployment for example.',requires:[B,F],autoStart:!0,activate:(o,a,u)=>{const p=u.load("jupyterlab"),{commands:r}=o,{tracker:s}=a;r.addCommand(m.copyShareableLink,{execute:()=>{const t=s.currentWidget,l=t?.selectedItems().next();l===void 0||l.done||W.copyToSystem(_.PageConfig.getUrl({workspace:_.PageConfig.defaultWorkspace,treePath:l.value.path,toShare:!0}))},isVisible:()=>!!s.currentWidget&&Array.from(s.currentWidget.selectedItems()).length===1,icon:ie.bindprops({stylesheet:"menuItem"}),label:p.__("Copy Shareable Link"),describedBy:{args:{type:"object",properties:{}}}})}},Re={id:"@jupyterlab/filebrowser-extension:open-with",description:"Adds the open-with feature allowing an user to pick the non-preferred document viewer.",requires:[B],autoStart:!0,activate:(o,a)=>{const{docRegistry:u}=o,{tracker:p}=a;let r=[];function s(t){var l,i;const c=(i=(l=t.menu.items.find(e=>{var n;return e.type==="submenu"&&((n=e.submenu)===null||n===void 0?void 0:n.id)==="jp-contextmenu-open-with"}))===null||l===void 0?void 0:l.submenu)!==null&&i!==void 0?i:null;if(!c)return;r.forEach(e=>e.dispose()),r.length=0,c.clearItems(),r=[...p.currentWidget?v.OpenWith.intersection(O(p.currentWidget.selectedItems(),e=>v.OpenWith.getFactories(u,e))):new Set].map(e=>c.addItem({args:{factory:e.name,label:e.label||e.name},command:m.open}))}o.contextMenu.opened.connect(s)}},Je={id:"@jupyterlab/filebrowser-extension:open-browser-tab",description:"Adds the open-in-new-browser-tab features.",requires:[B,F],autoStart:!0,activate:(o,a,u)=>{const{commands:p}=o,r=u.load("jupyterlab"),{tracker:s}=a;p.addCommand(m.openBrowserTab,{execute:t=>{const l=s.currentWidget;if(!l)return;const i=t.mode;return Promise.all(Array.from(O(l.selectedItems(),c=>{if(i==="single-document"){const h=_.PageConfig.getUrl({mode:"single-document",treePath:c.path}),e=window.open();if(e)e.opener=null,e.location.href=h;else throw new Error("Failed to open new browser tab.")}else return p.execute("docmanager:open-browser-tab",{path:c.path})})))},icon:le.bindprops({stylesheet:"menuItem"}),label:t=>t.mode==="single-document"?r.__("Open in Simple Mode"):r.__("Open in New Browser Tab"),mnemonic:0,describedBy:{args:{type:"object",properties:{mode:{type:"string",description:r.__("Mode for opening files (e.g., single-document)")}}}}})}},Ge={id:"@jupyterlab/filebrowser-extension:file-upload-status",description:"Adds a file upload status widget.",autoStart:!0,requires:[B,F],optional:[Be],activate:(o,a,u,p)=>{if(!p)return;const r=new T({tracker:a.tracker,translator:u});p.registerStatusItem("@jupyterlab/filebrowser-extension:file-upload-status",{item:r,align:"middle",isActive:()=>!!r.model&&r.model.items.length>0,activeStateChanged:r.model.stateChanged})}},Ke={id:"@jupyterlab/filebrowser-extension:open-url",description:'Adds the feature "Open files from remote URLs".',autoStart:!0,requires:[P,F],optional:[U],activate:(o,a,u,p)=>{const{commands:r}=o,s=u.load("jupyterlab"),t=m.openUrl;r.addCommand(t,{label:l=>l.url?s.__("Open %1",l.url):s.__("Open from URL…"),caption:l=>l.url?s.__("Open %1",l.url):s.__("Open from URL"),execute:async l=>{var i,c,h;let e=(i=l?.url)!==null&&i!==void 0?i:"";if(e||(e=(c=(await H.getText({label:s.__("URL"),placeholder:"https://example.com/path/to/file",title:s.__("Open URL"),okLabel:s.__("Open")})).value)!==null&&c!==void 0?c:void 0),!e)return;let n="",d;try{const f=await fetch(e);d=await f.blob(),n=(h=f.headers.get("Content-Type"))!==null&&h!==void 0?h:""}catch(f){return f.response&&f.response.status!==200&&(f.message=s.__("Could not open URL: %1",e)),C(s.__("Cannot fetch"),f)}try{const f=_.PathExt.basename(e),w=new File([d],f,{type:n}),g=await a.model.upload(w);return r.execute("docmanager:open",{path:g.path})}catch(f){return C(s._p("showErrorMessage","Upload Error"),f)}},describedBy:{args:{type:"object",properties:{url:{type:"string",description:s.__("URL of the file to open")}}}}}),p&&p.addItem({command:t,category:s.__("File Operations")})}},De={id:"@jupyterlab/filebrowser-extension:notify-upload",requires:[P,M,F],description:"Adds feature to auto-open supported files after upload",autoStart:!0,activate:async(o,a,u,p)=>{const r=p.load("jupyterlab"),s=await u.load(y);let t=s.get("autoOpenUploads").composite,l=s.get("maxAutoOpenSizeMB").composite*1024*1024;s.changed.connect(()=>{t=s.get("autoOpenUploads").composite,l=s.get("maxAutoOpenSizeMB").composite*1024*1024}),o.restored.then(()=>{const c=Array.from(a.toolbar.children()).find(h=>h instanceof K);if(!c){console.warn("Uploader widget not found");return}c.filesUploaded.connect((h,e)=>{const d=Array.from(o.docRegistry.fileTypes()).reduce((g,b)=>{if(b.extensions)for(const x of b.extensions)g.push(x.toLowerCase());return g},[]),f=e[0].name.toLowerCase(),w=d.some(g=>f.endsWith(g));if(e.length===1&&(e[0].type==="notebook"||e[0].type==="file")){const g=e[0];t&&g.size&&g.size<=l&&w?o.commands.execute("docmanager:open",{path:g.path}).catch(b=>{C(`Opening ${g.name} failed`,b)}):E.emit(r.__("Uploaded %1%2",g.name,g.size?` (${Se(g.size,1,1024)})`:""),"info",{autoClose:5e3,actions:[{label:r.__("Open File"),callback:()=>{o.commands.execute("docmanager:open",{path:g.path}).catch(b=>{C(`Could not open ${g.name}`,b)})}}]})}else E.emit(r.__("Upload complete (%1 files)",e.length),"info",{autoClose:5e3,actions:[{label:r.__("Open All"),callback:()=>{e.forEach(g=>{o.commands.execute("docmanager:open",{path:g.path}).catch(b=>{C(`Could not open ${g.path}`,b)})})}}]})})})}};function Qe(o,a,u,p,r,s){const t=p.load("jupyterlab"),{docRegistry:l,commands:i}=o,{tracker:c}=u,h=_.PageConfig.getOption("delete_to_trash")==="true";i.addCommand(m.del,{execute:()=>{const e=c.currentWidget;if(e)return e.delete()},icon:de.bindprops({stylesheet:"menuItem"}),label:h?t.__("Move to Trash"):t.__("Delete"),mnemonic:0,describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.copy,{execute:()=>{const e=c.currentWidget;if(e)return e.copy()},icon:L.bindprops({stylesheet:"menuItem"}),label:t.__("Copy"),mnemonic:0,describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.cut,{execute:()=>{const e=c.currentWidget;if(e)return e.cut()},icon:pe.bindprops({stylesheet:"menuItem"}),label:t.__("Cut"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.duplicate,{execute:()=>{const e=c.currentWidget;if(e)return e.duplicate()},icon:L.bindprops({stylesheet:"menuItem"}),label:t.__("Duplicate"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.selectAll,{execute:()=>{const e=c.currentWidget;if(e)return e.selectAll()},label:t.__("Select All"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.goToPath,{label:t.__("Update the file browser to display the provided `path`."),describedBy:{args:{type:"object",properties:{path:{type:"string",description:t.__("The path to navigate to")},dontShowBrowser:{type:"boolean",description:t.__("Whether to avoid showing the browser")}}}},execute:async e=>{var n;const d=e.path||"",f=!((n=e?.dontShowBrowser)!==null&&n!==void 0&&n);try{if((await v.navigateToPath(d,a,u,p)).type!=="directory"&&f){const g=v.getBrowserForPath(d,a,u);if(g){g.clearSelectedItems();const b=d.split("/"),x=b[b.length-1];x&&await g.selectItemByName(x)}}}catch(w){console.warn(`${m.goToPath} failed to go to: ${d}`,w)}if(f)return i.execute(m.showBrowser,{path:d})}}),i.addCommand(m.goUp,{label:"go up",execute:async()=>{const e=v.getBrowserForPath("",a,u);if(!e)return;const{model:n}=e;await n.restored,e.goUp()},describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.openPath,{label:e=>e.path?t.__("Open %1",e.path):t.__("Open from Path…"),caption:e=>e.path?t.__("Open %1",e.path):t.__("Open from path"),execute:async e=>{var n;let d;if(e?.path?d=e.path:d=(n=(await H.getText({label:t.__("Path"),placeholder:"/path/relative/to/jlab/root",title:t.__("Open Path"),okLabel:t.__("Open")})).value)!==null&&n!==void 0?n:void 0,!!d)try{const f=d!=="/"&&d.endsWith("/");f&&(d=d.slice(0,d.length-1));const w=v.getBrowserForPath(d,a,u),{services:g}=w.model.manager,b=await g.contents.get(d,{content:!1});if(f&&b.type!=="directory")throw new Error(`Path ${d}/ is not a directory`);return await i.execute(m.goToPath,{path:d,dontShowBrowser:e.dontShowBrowser}),b.type==="directory"?void 0:i.execute("docmanager:open",{path:d})}catch(f){return f.response&&f.response.status===404&&(f.message=t.__("Could not find path: %1",d)),C(t.__("Cannot open"),f)}},describedBy:{args:{type:"object",properties:{path:{type:"string",description:t.__("Path to the file or directory to open")},dontShowBrowser:{type:"boolean",description:t.__("Whether to avoid showing the file browser")}}}}}),s&&s.addItem({command:m.openPath,category:t.__("File Operations")}),i.addCommand(m.open,{execute:e=>{const n=e.factory||void 0,d=c.currentWidget;if(!d)return;const{contents:f}=d.model.manager.services;return Promise.all(Array.from(O(d.selectedItems(),w=>{if(w.type==="directory"){const g=f.localPath(w.path);return d.model.cd(`/${g}`)}return i.execute("docmanager:open",{factory:n,path:w.path,kernelPreference:e.kernelPreference})})))},icon:e=>{var n;const d=e.factory||void 0;if(d){const f=l.getFileType(d);return(n=f?.icon)===null||n===void 0?void 0:n.bindprops({stylesheet:"menuItem"})}else return V.bindprops({stylesheet:"menuItem"})},label:e=>e.label||e.factory||t.__("Open"),mnemonic:0,describedBy:{args:{type:"object",properties:{factory:{type:"string",description:t.__("The name of the widget factory to use")},label:{type:"string",description:t.__("The label to display for the command")}}}}}),i.addCommand(m.paste,{execute:()=>{const e=c.currentWidget;if(e)return e.paste()},icon:ue.bindprops({stylesheet:"menuItem"}),label:t.__("Paste"),mnemonic:0,describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.createNewDirectory,{execute:()=>{const e=c.currentWidget;if(e)return e.createNewDirectory()},icon:me.bindprops({stylesheet:"menuItem"}),label:t.__("New Folder"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.createNewFile,{execute:e=>{var n;const d=c.currentWidget;if(d)return d.createNewFile({ext:(n=e.ext)!==null&&n!==void 0?n:"txt"})},icon:e=>e.iconName?he.resolve({icon:e.iconName}):fe.bindprops({stylesheet:"menuItem"}),label:e=>{var n;return t.__((n=e.label)!==null&&n!==void 0?n:"New File")},describedBy:{args:{type:"object",properties:{label:{type:"string",default:"New File",description:t.__("The command label.")},iconName:{type:"string",description:t.__("The command icon.")},ext:{type:"string",default:"txt",description:t.__("The file extension.")}}}}}),i.addCommand(m.createNewMarkdownFile,{execute:()=>{const e=c.currentWidget;if(e)return e.createNewFile({ext:"md"})},icon:ge.bindprops({stylesheet:"menuItem"}),label:t.__("New Markdown File"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.refresh,{execute:e=>{const n=c.currentWidget;if(n)return n.model.refresh()},icon:we.bindprops({stylesheet:"menuItem"}),caption:t.__("Refresh the file browser."),label:t.__("Refresh File List"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.rename,{execute:e=>{const n=c.currentWidget;if(n)return n.rename()},isVisible:()=>!!c.currentWidget&&Array.from(c.currentWidget.selectedItems()).length===1,icon:be.bindprops({stylesheet:"menuItem"}),label:t.__("Rename"),mnemonic:0,describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.copyPath,{execute:()=>{var e;const n=c.currentWidget;if(!n)return;const d=n.selectedItems().next();if(!d.done)if(_.PageConfig.getOption("copyAbsolutePath")==="true"){const f=_.PathExt.joinWithLeadingSlash((e=_.PageConfig.getOption("serverRoot"))!==null&&e!==void 0?e:"",d.value.path);W.copyToSystem(f)}else W.copyToSystem(d.value.path)},isVisible:()=>!!c.currentWidget&&Array.from(c.currentWidget.selectedItems()).length===1,icon:ye.bindprops({stylesheet:"menuItem"}),label:t.__("Copy Path"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.shutdown,{execute:()=>{const e=c.currentWidget;if(e)return e.shutdownKernels()},icon:_e.bindprops({stylesheet:"menuItem"}),label:t.__("Shut Down Kernel"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.toggleFileFilter,{execute:()=>{a.showFileFilter=!a.showFileFilter,i.notifyCommandChanged(m.toggleFileFilter)},isToggled:()=>a.showFileFilter,icon:ve.bindprops({stylesheet:"menuItem"}),label:t.__("Toggle File Filter"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.toggleLastModified,{label:t.__("Show Last Modified Column"),isToggled:()=>a.showLastModifiedColumn,execute:()=>{const e=!a.showLastModifiedColumn,n="showLastModifiedColumn";if(r)return r.set(y,n,e).catch(d=>{console.error(`Failed to set ${n} setting`)})},describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.toggleShowFullPath,{label:t.__("Show Full Path"),isToggled:()=>a.showFullPath,execute:()=>{const e=!a.showFullPath,n="showFullPath";if(r)return r.set(y,n,e).catch(d=>{console.error(`Failed to set ${n} setting`)})},describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.toggleSortNotebooksFirst,{label:t.__("Sort Notebooks Above Files"),isToggled:()=>a.sortNotebooksFirst,execute:()=>{const e=!a.sortNotebooksFirst,n="sortNotebooksFirst";if(r)return r.set(y,n,e).catch(d=>{console.error(`Failed to set ${n} setting`)})},describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.toggleFileSize,{label:t.__("Show File Size Column"),isToggled:()=>a.showFileSizeColumn,execute:()=>{const e=!a.showFileSizeColumn,n="showFileSizeColumn";if(r)return r.set(y,n,e).catch(d=>{console.error(`Failed to set ${n} setting`)})},describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.toggleSingleClick,{label:t.__("Enable Single Click Navigation"),isToggled:()=>a.singleClickNavigation,execute:()=>{const e=!a.singleClickNavigation,n="singleClickNavigation";if(r)return r.set(y,n,e).catch(d=>{console.error("Failed to set singleClickNavigation setting")})},describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.toggleHiddenFiles,{label:t.__("Show Hidden Files"),isToggled:()=>a.showHiddenFiles,isVisible:()=>_.PageConfig.getOption("allow_hidden_files")==="true",execute:()=>{const e=!a.showHiddenFiles,n="showHiddenFiles";if(r)return r.set(y,n,e).catch(d=>{console.error("Failed to set showHiddenFiles setting")})},describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.toggleFileCheckboxes,{label:t.__("Show File Checkboxes"),isToggled:()=>a.showFileCheckboxes,execute:()=>{const e=!a.showFileCheckboxes,n="showFileCheckboxes";if(r)return r.set(y,n,e).catch(d=>{console.error("Failed to set showFileCheckboxes setting")})},describedBy:{args:{type:"object",properties:{}}}})}const eo=[ze,$e,Ee,Ae,He,Ge,Ve,Q,Re,Je,Ke,De,qe];var v;(function(o){function a(r,s,t){const{tracker:l}=t,i=s.model.manager.services.contents.driveName(r);if(i){const c=l.find(h=>h.model.driveName===i);if(!c){console.warn(`${m.goToPath} failed to find filebrowser for path: ${r}`);return}return c}return s}o.getBrowserForPath=a;async function u(r,s,t,l){const i=l.load("jupyterlab"),c=o.getBrowserForPath(r,s,t);if(!c)throw new Error(i.__("No browser for path"));const{services:h}=c.model.manager,e=h.contents.localPath(r);await h.ready;const n=await h.contents.get(r,{content:!1}),{model:d}=c;return await d.restored,n.type==="directory"?await d.cd(`/${e}`):await d.cd(`/${_.PathExt.dirname(e)}`),n}o.navigateToPath=u;async function p(r,s,t,l,i,c){const h="jp-mod-restoring";if(r.addClass(h),!t){await r.model.restore(r.id),await r.model.refresh(),r.removeClass(h);return}const e=async()=>{t.routed.disconnect(e);const n=await l?.paths;n?.file||n?.browser?(await r.model.restore(r.id,!1),n.file&&await s.execute(m.openPath,{path:n.file,dontShowBrowser:!0}),n.browser&&await s.execute(m.openPath,{path:n.browser,dontShowBrowser:!0})):(await r.model.restore(r.id),await r.model.refresh()),r.removeClass(h),c?.isEmpty("main")&&s.execute("launcher:create")};t.routed.connect(e)}o.restoreBrowser=p,(function(r){function s(l,i){const c=l.preferredWidgetFactories(i.path),h=l.getWidgetFactory("notebook");return h&&i.type==="notebook"&&c.indexOf(h)===-1&&c.unshift(h),c}r.getFactories=s;function t(l){let i;for(const c of l){if(i===void 0){i=new Set(c);continue}if(i.size===0)return i;let h=new Set;for(const e of c)i.has(e)&&h.add(e);i=h}return i??new Set}r.intersection=t})(o.OpenWith||(o.OpenWith={}))})(v||(v={}));export{eo as default,Ge as fileUploadStatus};
1
+ import{r as j,cv as Y,cw as X,c6 as C,J as Z,ak as S,c2 as ee,v as k,b$ as te,af as I,cx as oe,ai as F,cy as re,cz as V,b_ as _,cA as ie,cB as W,cC as ne,cD as L,cE as se,aj as ae,c8 as le,c5 as O,cF as E,cG as ce,cH as de,cI as pe,cJ as ue,cK as me,c3 as he,cL as fe,cM as ge,cN as we,cO as be,cP as ye,cQ as _e,cR as ve,cS as A}from"../datalayer-app-main.js";import{T as q,G as Fe,b as U,I as xe,d as H}from"./index-a51XM5L8.js";import{I as Be}from"./tokens-BHMD_ju9.js";import{d as Ce,e as ke,J as Pe,c as R,f as Te,g as Se,F as Ie,h as je}from"./index-BlWZloLe.js";import{I as J}from"./tokens-CENaHAHm.js";import{a as B,I as P,b as G}from"./tokens-BvmYCqiu.js";import{I as M}from"./tokens-BHLmeqjP.js";import{I as We}from"./treepathupdater-BPaxwIOs.js";import{g as Ne}from"./kernelfilestypes-D2B-sFfi.js";import"./hoverbox-CStlKQWE.js";import"./Output-9DKTscSv.js";import"./index-s3hayhRS.js";import"./index-CpcHHQd7.js";import"./color-CG7_7V2-.js";import"./isEqual-niFNV5MZ.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./PaintbrushIcon-CLU8RilX.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";import"./CellSidebarExtension-CfaJL6DQ.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./renderer-2D5v6hpK.js";import"./SquareIcon-e3ygcjpv.js";import"./SortAscIcon-CVKVWIWQ.js";import"./url-DuKx0yk0.js";/* empty css */import"./index-Dro44tIm.js";/* empty css *//* empty css */import"./index-DsG9xhMj.js";/* empty css */import"./index-CNU-WVhQ.js";import"./index--OLIX362.js";import"./index-DYGslHkf.js";import"./index-BSRVX3UN.js";import"./index-BH2OX5l8.js";import"./index-C3vDfO5_.js";import"./index-Ko8lxXFd.js";import"./index-CB9u17_J.js";import"./index-BUVtc_FV.js";import"./ArrowLeftIcon-Y3PTljcl.js";import"./SkubbleIcon-tlg17jBG.js";import"./usePrimerThemeBridge-CoHussa9.js";import"./index-BipXK1tF.js";import"./KernelVariables-Cl57Zze1.js";import"./index-BvgsWH_d.js";import"./SortDescIcon-CS4EzHeS.js";import"./NotebookToolbar-rtMQZWHQ.js";import"./RepoPushIcon-Cm8g9NuL.js";import"./Toolbar-CGQDY041.js";import"./sessions-APuuDN3K.js";import"./tokens-DTIgYcNS.js";import"./drivecontents-CxwZz_5W.js";import"./kernel-BI-BLP-K.js";function Me(o){const{width:a,percentage:u,...p}=o;return j.createElement("div",{className:"jp-Statusbar-ProgressBar-progress-bar",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u},j.createElement(Le,{percentage:u,...p,contentWidth:a}))}function Le(o){return j.createElement("div",{style:{width:`${o.percentage}%`}},j.createElement("p",null,o.content))}class K extends Y{constructor(a){super({icon:X,label:a.label,onClick:()=>{this._input.click()},tooltip:N.translateToolTip(a.translator),enabled:a.model.allowFileUploads}),this._onInputChanged=()=>{const p=Array.prototype.slice.call(this._input.files).map(r=>this.fileBrowserModel.upload(r));Promise.all(p).then(r=>{this._filesUploaded.emit(r)}).catch(r=>{C(this._trans._p("showErrorMessage","Upload Error"),r)})},this._onInputClicked=()=>{this._input.value=""},this._input=N.createUploadInput(),this._filesUploaded=new Z(this),this.fileBrowserModel=a.model,this.translator=a.translator||S,this._trans=this.translator.load("jupyterlab"),this._input.onclick=this._onInputClicked,this._input.onchange=this._onInputChanged,this.addClass("jp-id-upload")}get filesUploaded(){return this._filesUploaded}}var N;(function(o){function a(){const p=document.createElement("input");return p.type="file",p.multiple=!0,p}o.createUploadInput=a;function u(p){return p=p||S,p.load("jupyterlab").__("Upload Files")}o.translateToolTip=u})(N||(N={}));const Oe=4;function z(o){const u=(o.translator||S).load("jupyterlab");return k.createElement(Fe,{spacing:Oe},k.createElement(q,{source:u.__("Uploading…")}),k.createElement(Me,{percentage:o.upload}))}const Ue=2e3;class T extends ee{constructor(a){super(new T.Model(a.tracker.currentWidget&&a.tracker.currentWidget.model)),this._onBrowserChange=(u,p)=>{p===null?this.model.browserModel=null:this.model.browserModel=p.model},this.translator=a.translator||S,this._trans=this.translator.load("jupyterlab"),this._tracker=a.tracker,this._tracker.currentChanged.connect(this._onBrowserChange)}render(){return this.model.items.length>0?this.model.items[0].complete?k.createElement(q,{source:this._trans.__("Complete!")}):k.createElement(z,{upload:this.model.items[0].progress,translator:this.translator}):k.createElement(z,{upload:100,translator:this.translator})}dispose(){super.dispose(),this._tracker.currentChanged.disconnect(this._onBrowserChange)}}(function(o){class a extends te{constructor(p){super(),this._uploadChanged=(r,s)=>{if(s.name==="start")this._items.push({path:s.newValue.path,progress:s.newValue.progress*100,complete:!1});else if(s.name==="update"){const t=I.findFirstIndex(this._items,l=>l.path===s.oldValue.path);t!==-1&&(this._items[t].progress=s.newValue.progress*100)}else if(s.name==="finish"){const t=I.findFirstValue(this._items,l=>l.path===s.oldValue.path);t&&(t.complete=!0,setTimeout(()=>{I.removeFirstOf(this._items,t),this.stateChanged.emit(void 0)},Ue))}else if(s.name==="failure")I.removeFirstWhere(this._items,t=>t.path===s.newValue.path);else return;this.stateChanged.emit(void 0)},this._items=[],this._browserModel=null,this.browserModel=p}get items(){return this._items}get browserModel(){return this._browserModel}set browserModel(p){const r=this._browserModel;r&&r.uploadChanged.disconnect(this._uploadChanged),this._browserModel=p,this._items=[],this._browserModel!==null&&this._browserModel.uploadChanged.connect(this._uploadChanged),this.stateChanged.emit(void 0)}}o.Model=a})(T||(T={}));const $="FileBrowser",y="@jupyterlab/filebrowser-extension:browser";var m;(function(o){o.copy="filebrowser:copy",o.copyDownloadLink="filebrowser:copy-download-link",o.cut="filebrowser:cut",o.del="filebrowser:delete",o.download="filebrowser:download",o.duplicate="filebrowser:duplicate",o.selectAll="filebrowser:select-all",o.hideBrowser="filebrowser:hide-main",o.goToPath="filebrowser:go-to-path",o.goUp="filebrowser:go-up",o.openPath="filebrowser:open-path",o.openUrl="filebrowser:open-url",o.open="filebrowser:open",o.openBrowserTab="filebrowser:open-browser-tab",o.paste="filebrowser:paste",o.createNewDirectory="filebrowser:create-new-directory",o.createNewFile="filebrowser:create-new-file",o.createNewMarkdownFile="filebrowser:create-new-markdown-file",o.refresh="filebrowser:refresh",o.rename="filebrowser:rename",o.copyShareableLink="filebrowser:share-main",o.copyPath="filebrowser:copy-path",o.showBrowser="filebrowser:activate",o.shutdown="filebrowser:shutdown",o.toggleBrowser="filebrowser:toggle-main",o.toggleFileFilter="filebrowser:toggle-file-filter",o.toggleNavigateToCurrentDirectory="filebrowser:toggle-navigate-to-current-directory",o.toggleLastModified="filebrowser:toggle-last-modified",o.toggleShowFullPath="filebrowser:toggle-show-full-path",o.toggleFileSize="filebrowser:toggle-file-size",o.toggleSortNotebooksFirst="filebrowser:toggle-sort-notebooks-first",o.toggleHiddenFiles="filebrowser:toggle-hidden-files",o.toggleSingleClick="filebrowser:toggle-single-click-navigation",o.toggleFileCheckboxes="filebrowser:toggle-file-checkboxes"})(m||(m={}));const D="filebrowser",Ee={id:y,description:"Set up the default file browser commands and state restoration",requires:[P,B,F],optional:[Te,M,We,U],provides:G,autoStart:!0,activate:async(o,a,u,p,r,s,t,l)=>{const i=a;r&&r.add(i,D);const c=_.PageConfig.getOption("preferredPath");return c&&await i.model.cd(c),Qe(o,i,u,p,s,l),Promise.all([o.restored,i.model.restored]).then(()=>{t&&i.model.pathChanged.connect((h,e)=>{t(e.newValue)})}),{openPath:m.openPath}}},Ae={id:"@jupyterlab/filebrowser-extension:settings",description:"Set up the default file browser settings",requires:[P],optional:[M],autoStart:!0,activate:(o,a,u)=>{u&&u.load(y).then(p=>{const r={navigateToCurrentDirectory:!1,singleClickNavigation:!1,showLastModifiedColumn:!0,showFileSizeColumn:!1,showHiddenFiles:!1,showFileCheckboxes:!1,sortNotebooksFirst:!1,showFullPath:!1,allowFileUploads:!0};function s(t){let l;for(l in r){const e=t.get(l).composite;a[l]=e}const i=t.get("breadcrumbs").composite;a.minimumBreadcrumbsLeftItems=i.minimumLeftItems,a.minimumBreadcrumbsRightItems=i.minimumRightItems;const c=t.get("filterDirectories").composite,h=t.get("useFuzzyFilter").composite;a.model.filterDirectories=c,a.model.useFuzzyFilter=h}p.changed.connect(s),s(p)})}},ze={id:"@jupyterlab/filebrowser-extension:factory",description:"Provides the file browser factory.",provides:B,requires:[J,F],optional:[oe.IStateDB,Ce.IInfo],activate:async(o,a,u,p,r)=>{const s=new re({namespace:D});return{createFileBrowser:(l,i={})=>{var c,h;const e=i.state===null?void 0:i.state||p||void 0,n=new Ie({translator:u,auto:(c=i.auto)!==null&&c!==void 0?c:!0,manager:a,driveName:i.driveName||"",refreshInterval:i.refreshInterval,refreshStandby:()=>r&&!r.isConnected||"when-hidden",state:e,allowFileUploads:(h=i.allowFileUploads)!==null&&h!==void 0?h:!0}),d=i.restore,f=new je({id:l,model:n,restore:d,translator:u,state:e});return s.add(f),f},tracker:s}}},$e={id:"@jupyterlab/filebrowser-extension:default-file-browser",description:"Provides the default file browser",provides:P,requires:[B],optional:[ke,Pe.ITreeResolver,R,F],activate:async(o,a,u,p,r,s)=>{const{commands:t}=o,l=(s??S).load("jupyterlab"),i=a.createFileBrowser("filebrowser",{auto:!1,restore:!1});i.node.setAttribute("role","region"),i.node.setAttribute("aria-label",l.__("File Browser Section")),i.title.icon=V;const c=()=>{const h=o.commands.keyBindings.find(e=>e.command===m.toggleBrowser);if(h){const e=h.keys.map(ce.formatKeystroke).join(", ");i.title.caption=l.__("File Browser (%1)",e)}else i.title.caption=l.__("File Browser")};return c(),o.commands.keyBindingChanged.connect(()=>{c()}),v.restoreBrowser(i,t,u,p,o,r),i}},Ve={id:"@jupyterlab/filebrowser-extension:download",description:"Adds the download file commands. Disabling this plugin will NOT disable downloading files from the server, if the user enters the appropriate download URLs.",requires:[B,F],autoStart:!0,activate:(o,a,u)=>{const p=u.load("jupyterlab"),{commands:r}=o,{tracker:s}=a;r.addCommand(m.download,{execute:()=>{const t=s.currentWidget;if(t)return t.download()},icon:ne.bindprops({stylesheet:"menuItem"}),label:p.__("Download"),describedBy:{args:{type:"object",properties:{}}}}),r.addCommand(m.copyDownloadLink,{execute:()=>{const t=s.currentWidget;if(t)return t.model.manager.services.contents.getDownloadUrl(t.selectedItems().next().value.path).then(l=>{W.copyToSystem(l)})},isVisible:()=>!!s.currentWidget&&Array.from(s.currentWidget.selectedItems()).length===1,icon:L.bindprops({stylesheet:"menuItem"}),label:p.__("Copy Download Link"),mnemonic:0,describedBy:{args:{type:"object",properties:{}}}})}},qe={id:"@jupyterlab/filebrowser-extension:create-new-language-file",description:"Adds context menu entries for creating Python/R/Julia files",requires:[F],autoStart:!0,activate:async(o,a)=>{const u=a.load("jupyterlab");let p=new A;const r=o.serviceManager.kernelspecs,s=async()=>{var t,l;p&&(p.dispose(),p=new A);const i=await Ne(r);for(const c of i)p.add(o.contextMenu.addItem({command:m.createNewFile,selector:".jp-DirListing-content",args:{ext:c.extensions[0],label:u.__("New %1 File",c.displayName),iconName:(l=(t=c.icon)===null||t===void 0?void 0:t.toString())!==null&&l!==void 0?l:""},rank:52}))};r.specsChanged.connect(s),s().catch(console.warn)}},Q={id:"@jupyterlab/filebrowser-extension:widget",description:"Adds the file browser to the application shell.",requires:[J,P,B,M,xe,F,R,G],optional:[U],autoStart:!0,activate:(o,a,u,p,r,s,t,l,i,c)=>{const{commands:h}=o,{tracker:e}=p,n=t.load("jupyterlab");s.addFactory($,"uploader",d=>new K({model:d.model,translator:t})),se(u,ae(s,r,$,Q.id,t)),l.add(u,"left",{rank:100,type:"File Browser"}),h.addCommand(m.toggleBrowser,{label:n.__("File Browser"),describedBy:{args:{type:"object",properties:{}}},execute:()=>u.isHidden?h.execute(m.showBrowser,void 0):h.execute(m.hideBrowser,void 0)}),h.addCommand(m.showBrowser,{label:n.__("Open the file browser for the provided `path`."),describedBy:{args:{type:"object",properties:{path:{type:"string",description:n.__("The path to open in the file browser")}}}},execute:d=>{const f=d.path||"",w=v.getBrowserForPath(f,u,p);if(w)if(u===w){l.activateById(u.id);return}else{const g=["left","right"];for(const b of g)for(const x of l.widgets(b))if(x.contains(w)){l.activateById(x.id);return}}}}),h.addCommand(m.hideBrowser,{label:n.__("Hide the file browser."),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const d=e.currentWidget;d&&!d.isHidden&&l.collapseLeft()}}),h.addCommand(m.toggleNavigateToCurrentDirectory,{label:n.__("Show Active File in File Browser"),isToggled:()=>u.navigateToCurrentDirectory,execute:()=>{const d=!u.navigateToCurrentDirectory;return r.set(y,"navigateToCurrentDirectory",d).catch(w=>{console.error("Failed to set navigateToCurrentDirectory setting")})},describedBy:{args:{type:"object",properties:{}}}}),c&&c.addItem({command:m.toggleNavigateToCurrentDirectory,category:n.__("File Operations")}),l.restored.then(d=>{d.fresh&&l.mode!=="single-document"&&h.execute(m.showBrowser,void 0)}),Promise.all([o.restored,u.model.restored]).then(()=>{l.currentChanged.connect(async(d,f)=>{if(u.navigateToCurrentDirectory&&f.newValue){const{newValue:w}=f,g=a.contextForWidget(w);if(g){const{path:b}=g;try{await v.navigateToPath(b,u,p,t)}catch(x){console.warn(`${m.goToPath} failed to open: ${b}`,x)}}}})})}},He={id:"@jupyterlab/filebrowser-extension:share-file",description:'Adds the "Copy Shareable Link" command; useful for JupyterHub deployment for example.',requires:[B,F],autoStart:!0,activate:(o,a,u)=>{const p=u.load("jupyterlab"),{commands:r}=o,{tracker:s}=a;r.addCommand(m.copyShareableLink,{execute:()=>{const t=s.currentWidget,l=t?.selectedItems().next();l===void 0||l.done||W.copyToSystem(_.PageConfig.getUrl({workspace:_.PageConfig.defaultWorkspace,treePath:l.value.path,toShare:!0}))},isVisible:()=>!!s.currentWidget&&Array.from(s.currentWidget.selectedItems()).length===1,icon:ie.bindprops({stylesheet:"menuItem"}),label:p.__("Copy Shareable Link"),describedBy:{args:{type:"object",properties:{}}}})}},Re={id:"@jupyterlab/filebrowser-extension:open-with",description:"Adds the open-with feature allowing an user to pick the non-preferred document viewer.",requires:[B],autoStart:!0,activate:(o,a)=>{const{docRegistry:u}=o,{tracker:p}=a;let r=[];function s(t){var l,i;const c=(i=(l=t.menu.items.find(e=>{var n;return e.type==="submenu"&&((n=e.submenu)===null||n===void 0?void 0:n.id)==="jp-contextmenu-open-with"}))===null||l===void 0?void 0:l.submenu)!==null&&i!==void 0?i:null;if(!c)return;r.forEach(e=>e.dispose()),r.length=0,c.clearItems(),r=[...p.currentWidget?v.OpenWith.intersection(O(p.currentWidget.selectedItems(),e=>v.OpenWith.getFactories(u,e))):new Set].map(e=>c.addItem({args:{factory:e.name,label:e.label||e.name},command:m.open}))}o.contextMenu.opened.connect(s)}},Je={id:"@jupyterlab/filebrowser-extension:open-browser-tab",description:"Adds the open-in-new-browser-tab features.",requires:[B,F],autoStart:!0,activate:(o,a,u)=>{const{commands:p}=o,r=u.load("jupyterlab"),{tracker:s}=a;p.addCommand(m.openBrowserTab,{execute:t=>{const l=s.currentWidget;if(!l)return;const i=t.mode;return Promise.all(Array.from(O(l.selectedItems(),c=>{if(i==="single-document"){const h=_.PageConfig.getUrl({mode:"single-document",treePath:c.path}),e=window.open();if(e)e.opener=null,e.location.href=h;else throw new Error("Failed to open new browser tab.")}else return p.execute("docmanager:open-browser-tab",{path:c.path})})))},icon:le.bindprops({stylesheet:"menuItem"}),label:t=>t.mode==="single-document"?r.__("Open in Simple Mode"):r.__("Open in New Browser Tab"),mnemonic:0,describedBy:{args:{type:"object",properties:{mode:{type:"string",description:r.__("Mode for opening files (e.g., single-document)")}}}}})}},Ge={id:"@jupyterlab/filebrowser-extension:file-upload-status",description:"Adds a file upload status widget.",autoStart:!0,requires:[B,F],optional:[Be],activate:(o,a,u,p)=>{if(!p)return;const r=new T({tracker:a.tracker,translator:u});p.registerStatusItem("@jupyterlab/filebrowser-extension:file-upload-status",{item:r,align:"middle",isActive:()=>!!r.model&&r.model.items.length>0,activeStateChanged:r.model.stateChanged})}},Ke={id:"@jupyterlab/filebrowser-extension:open-url",description:'Adds the feature "Open files from remote URLs".',autoStart:!0,requires:[P,F],optional:[U],activate:(o,a,u,p)=>{const{commands:r}=o,s=u.load("jupyterlab"),t=m.openUrl;r.addCommand(t,{label:l=>l.url?s.__("Open %1",l.url):s.__("Open from URL…"),caption:l=>l.url?s.__("Open %1",l.url):s.__("Open from URL"),execute:async l=>{var i,c,h;let e=(i=l?.url)!==null&&i!==void 0?i:"";if(e||(e=(c=(await H.getText({label:s.__("URL"),placeholder:"https://example.com/path/to/file",title:s.__("Open URL"),okLabel:s.__("Open")})).value)!==null&&c!==void 0?c:void 0),!e)return;let n="",d;try{const f=await fetch(e);d=await f.blob(),n=(h=f.headers.get("Content-Type"))!==null&&h!==void 0?h:""}catch(f){return f.response&&f.response.status!==200&&(f.message=s.__("Could not open URL: %1",e)),C(s.__("Cannot fetch"),f)}try{const f=_.PathExt.basename(e),w=new File([d],f,{type:n}),g=await a.model.upload(w);return r.execute("docmanager:open",{path:g.path})}catch(f){return C(s._p("showErrorMessage","Upload Error"),f)}},describedBy:{args:{type:"object",properties:{url:{type:"string",description:s.__("URL of the file to open")}}}}}),p&&p.addItem({command:t,category:s.__("File Operations")})}},De={id:"@jupyterlab/filebrowser-extension:notify-upload",requires:[P,M,F],description:"Adds feature to auto-open supported files after upload",autoStart:!0,activate:async(o,a,u,p)=>{const r=p.load("jupyterlab"),s=await u.load(y);let t=s.get("autoOpenUploads").composite,l=s.get("maxAutoOpenSizeMB").composite*1024*1024;s.changed.connect(()=>{t=s.get("autoOpenUploads").composite,l=s.get("maxAutoOpenSizeMB").composite*1024*1024}),o.restored.then(()=>{const c=Array.from(a.toolbar.children()).find(h=>h instanceof K);if(!c){console.warn("Uploader widget not found");return}c.filesUploaded.connect((h,e)=>{const d=Array.from(o.docRegistry.fileTypes()).reduce((g,b)=>{if(b.extensions)for(const x of b.extensions)g.push(x.toLowerCase());return g},[]),f=e[0].name.toLowerCase(),w=d.some(g=>f.endsWith(g));if(e.length===1&&(e[0].type==="notebook"||e[0].type==="file")){const g=e[0];t&&g.size&&g.size<=l&&w?o.commands.execute("docmanager:open",{path:g.path}).catch(b=>{C(`Opening ${g.name} failed`,b)}):E.emit(r.__("Uploaded %1%2",g.name,g.size?` (${Se(g.size,1,1024)})`:""),"info",{autoClose:5e3,actions:[{label:r.__("Open File"),callback:()=>{o.commands.execute("docmanager:open",{path:g.path}).catch(b=>{C(`Could not open ${g.name}`,b)})}}]})}else E.emit(r.__("Upload complete (%1 files)",e.length),"info",{autoClose:5e3,actions:[{label:r.__("Open All"),callback:()=>{e.forEach(g=>{o.commands.execute("docmanager:open",{path:g.path}).catch(b=>{C(`Could not open ${g.path}`,b)})})}}]})})})}};function Qe(o,a,u,p,r,s){const t=p.load("jupyterlab"),{docRegistry:l,commands:i}=o,{tracker:c}=u,h=_.PageConfig.getOption("delete_to_trash")==="true";i.addCommand(m.del,{execute:()=>{const e=c.currentWidget;if(e)return e.delete()},icon:de.bindprops({stylesheet:"menuItem"}),label:h?t.__("Move to Trash"):t.__("Delete"),mnemonic:0,describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.copy,{execute:()=>{const e=c.currentWidget;if(e)return e.copy()},icon:L.bindprops({stylesheet:"menuItem"}),label:t.__("Copy"),mnemonic:0,describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.cut,{execute:()=>{const e=c.currentWidget;if(e)return e.cut()},icon:pe.bindprops({stylesheet:"menuItem"}),label:t.__("Cut"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.duplicate,{execute:()=>{const e=c.currentWidget;if(e)return e.duplicate()},icon:L.bindprops({stylesheet:"menuItem"}),label:t.__("Duplicate"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.selectAll,{execute:()=>{const e=c.currentWidget;if(e)return e.selectAll()},label:t.__("Select All"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.goToPath,{label:t.__("Update the file browser to display the provided `path`."),describedBy:{args:{type:"object",properties:{path:{type:"string",description:t.__("The path to navigate to")},dontShowBrowser:{type:"boolean",description:t.__("Whether to avoid showing the browser")}}}},execute:async e=>{var n;const d=e.path||"",f=!((n=e?.dontShowBrowser)!==null&&n!==void 0&&n);try{if((await v.navigateToPath(d,a,u,p)).type!=="directory"&&f){const g=v.getBrowserForPath(d,a,u);if(g){g.clearSelectedItems();const b=d.split("/"),x=b[b.length-1];x&&await g.selectItemByName(x)}}}catch(w){console.warn(`${m.goToPath} failed to go to: ${d}`,w)}if(f)return i.execute(m.showBrowser,{path:d})}}),i.addCommand(m.goUp,{label:"go up",execute:async()=>{const e=v.getBrowserForPath("",a,u);if(!e)return;const{model:n}=e;await n.restored,e.goUp()},describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.openPath,{label:e=>e.path?t.__("Open %1",e.path):t.__("Open from Path…"),caption:e=>e.path?t.__("Open %1",e.path):t.__("Open from path"),execute:async e=>{var n;let d;if(e?.path?d=e.path:d=(n=(await H.getText({label:t.__("Path"),placeholder:"/path/relative/to/jlab/root",title:t.__("Open Path"),okLabel:t.__("Open")})).value)!==null&&n!==void 0?n:void 0,!!d)try{const f=d!=="/"&&d.endsWith("/");f&&(d=d.slice(0,d.length-1));const w=v.getBrowserForPath(d,a,u),{services:g}=w.model.manager,b=await g.contents.get(d,{content:!1});if(f&&b.type!=="directory")throw new Error(`Path ${d}/ is not a directory`);return await i.execute(m.goToPath,{path:d,dontShowBrowser:e.dontShowBrowser}),b.type==="directory"?void 0:i.execute("docmanager:open",{path:d})}catch(f){return f.response&&f.response.status===404&&(f.message=t.__("Could not find path: %1",d)),C(t.__("Cannot open"),f)}},describedBy:{args:{type:"object",properties:{path:{type:"string",description:t.__("Path to the file or directory to open")},dontShowBrowser:{type:"boolean",description:t.__("Whether to avoid showing the file browser")}}}}}),s&&s.addItem({command:m.openPath,category:t.__("File Operations")}),i.addCommand(m.open,{execute:e=>{const n=e.factory||void 0,d=c.currentWidget;if(!d)return;const{contents:f}=d.model.manager.services;return Promise.all(Array.from(O(d.selectedItems(),w=>{if(w.type==="directory"){const g=f.localPath(w.path);return d.model.cd(`/${g}`)}return i.execute("docmanager:open",{factory:n,path:w.path,kernelPreference:e.kernelPreference})})))},icon:e=>{var n;const d=e.factory||void 0;if(d){const f=l.getFileType(d);return(n=f?.icon)===null||n===void 0?void 0:n.bindprops({stylesheet:"menuItem"})}else return V.bindprops({stylesheet:"menuItem"})},label:e=>e.label||e.factory||t.__("Open"),mnemonic:0,describedBy:{args:{type:"object",properties:{factory:{type:"string",description:t.__("The name of the widget factory to use")},label:{type:"string",description:t.__("The label to display for the command")}}}}}),i.addCommand(m.paste,{execute:()=>{const e=c.currentWidget;if(e)return e.paste()},icon:ue.bindprops({stylesheet:"menuItem"}),label:t.__("Paste"),mnemonic:0,describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.createNewDirectory,{execute:()=>{const e=c.currentWidget;if(e)return e.createNewDirectory()},icon:me.bindprops({stylesheet:"menuItem"}),label:t.__("New Folder"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.createNewFile,{execute:e=>{var n;const d=c.currentWidget;if(d)return d.createNewFile({ext:(n=e.ext)!==null&&n!==void 0?n:"txt"})},icon:e=>e.iconName?he.resolve({icon:e.iconName}):fe.bindprops({stylesheet:"menuItem"}),label:e=>{var n;return t.__((n=e.label)!==null&&n!==void 0?n:"New File")},describedBy:{args:{type:"object",properties:{label:{type:"string",default:"New File",description:t.__("The command label.")},iconName:{type:"string",description:t.__("The command icon.")},ext:{type:"string",default:"txt",description:t.__("The file extension.")}}}}}),i.addCommand(m.createNewMarkdownFile,{execute:()=>{const e=c.currentWidget;if(e)return e.createNewFile({ext:"md"})},icon:ge.bindprops({stylesheet:"menuItem"}),label:t.__("New Markdown File"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.refresh,{execute:e=>{const n=c.currentWidget;if(n)return n.model.refresh()},icon:we.bindprops({stylesheet:"menuItem"}),caption:t.__("Refresh the file browser."),label:t.__("Refresh File List"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.rename,{execute:e=>{const n=c.currentWidget;if(n)return n.rename()},isVisible:()=>!!c.currentWidget&&Array.from(c.currentWidget.selectedItems()).length===1,icon:be.bindprops({stylesheet:"menuItem"}),label:t.__("Rename"),mnemonic:0,describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.copyPath,{execute:()=>{var e;const n=c.currentWidget;if(!n)return;const d=n.selectedItems().next();if(!d.done)if(_.PageConfig.getOption("copyAbsolutePath")==="true"){const f=_.PathExt.joinWithLeadingSlash((e=_.PageConfig.getOption("serverRoot"))!==null&&e!==void 0?e:"",d.value.path);W.copyToSystem(f)}else W.copyToSystem(d.value.path)},isVisible:()=>!!c.currentWidget&&Array.from(c.currentWidget.selectedItems()).length===1,icon:ye.bindprops({stylesheet:"menuItem"}),label:t.__("Copy Path"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.shutdown,{execute:()=>{const e=c.currentWidget;if(e)return e.shutdownKernels()},icon:_e.bindprops({stylesheet:"menuItem"}),label:t.__("Shut Down Kernel"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.toggleFileFilter,{execute:()=>{a.showFileFilter=!a.showFileFilter,i.notifyCommandChanged(m.toggleFileFilter)},isToggled:()=>a.showFileFilter,icon:ve.bindprops({stylesheet:"menuItem"}),label:t.__("Toggle File Filter"),describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.toggleLastModified,{label:t.__("Show Last Modified Column"),isToggled:()=>a.showLastModifiedColumn,execute:()=>{const e=!a.showLastModifiedColumn,n="showLastModifiedColumn";if(r)return r.set(y,n,e).catch(d=>{console.error(`Failed to set ${n} setting`)})},describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.toggleShowFullPath,{label:t.__("Show Full Path"),isToggled:()=>a.showFullPath,execute:()=>{const e=!a.showFullPath,n="showFullPath";if(r)return r.set(y,n,e).catch(d=>{console.error(`Failed to set ${n} setting`)})},describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.toggleSortNotebooksFirst,{label:t.__("Sort Notebooks Above Files"),isToggled:()=>a.sortNotebooksFirst,execute:()=>{const e=!a.sortNotebooksFirst,n="sortNotebooksFirst";if(r)return r.set(y,n,e).catch(d=>{console.error(`Failed to set ${n} setting`)})},describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.toggleFileSize,{label:t.__("Show File Size Column"),isToggled:()=>a.showFileSizeColumn,execute:()=>{const e=!a.showFileSizeColumn,n="showFileSizeColumn";if(r)return r.set(y,n,e).catch(d=>{console.error(`Failed to set ${n} setting`)})},describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.toggleSingleClick,{label:t.__("Enable Single Click Navigation"),isToggled:()=>a.singleClickNavigation,execute:()=>{const e=!a.singleClickNavigation,n="singleClickNavigation";if(r)return r.set(y,n,e).catch(d=>{console.error("Failed to set singleClickNavigation setting")})},describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.toggleHiddenFiles,{label:t.__("Show Hidden Files"),isToggled:()=>a.showHiddenFiles,isVisible:()=>_.PageConfig.getOption("allow_hidden_files")==="true",execute:()=>{const e=!a.showHiddenFiles,n="showHiddenFiles";if(r)return r.set(y,n,e).catch(d=>{console.error("Failed to set showHiddenFiles setting")})},describedBy:{args:{type:"object",properties:{}}}}),i.addCommand(m.toggleFileCheckboxes,{label:t.__("Show File Checkboxes"),isToggled:()=>a.showFileCheckboxes,execute:()=>{const e=!a.showFileCheckboxes,n="showFileCheckboxes";if(r)return r.set(y,n,e).catch(d=>{console.error("Failed to set showFileCheckboxes setting")})},describedBy:{args:{type:"object",properties:{}}}})}const eo=[ze,$e,Ee,Ae,He,Ge,Ve,Q,Re,Je,Ke,De,qe];var v;(function(o){function a(r,s,t){const{tracker:l}=t,i=s.model.manager.services.contents.driveName(r);if(i){const c=l.find(h=>h.model.driveName===i);if(!c){console.warn(`${m.goToPath} failed to find filebrowser for path: ${r}`);return}return c}return s}o.getBrowserForPath=a;async function u(r,s,t,l){const i=l.load("jupyterlab"),c=o.getBrowserForPath(r,s,t);if(!c)throw new Error(i.__("No browser for path"));const{services:h}=c.model.manager,e=h.contents.localPath(r);await h.ready;const n=await h.contents.get(r,{content:!1}),{model:d}=c;return await d.restored,n.type==="directory"?await d.cd(`/${e}`):await d.cd(`/${_.PathExt.dirname(e)}`),n}o.navigateToPath=u;async function p(r,s,t,l,i,c){const h="jp-mod-restoring";if(r.addClass(h),!t){await r.model.restore(r.id),await r.model.refresh(),r.removeClass(h);return}const e=async()=>{t.routed.disconnect(e);const n=await l?.paths;n?.file||n?.browser?(await r.model.restore(r.id,!1),n.file&&await s.execute(m.openPath,{path:n.file,dontShowBrowser:!0}),n.browser&&await s.execute(m.openPath,{path:n.browser,dontShowBrowser:!0})):(await r.model.restore(r.id),await r.model.refresh()),r.removeClass(h),c?.isEmpty("main")&&s.execute("launcher:create")};t.routed.connect(e)}o.restoreBrowser=p,(function(r){function s(l,i){const c=l.preferredWidgetFactories(i.path),h=l.getWidgetFactory("notebook");return h&&i.type==="notebook"&&c.indexOf(h)===-1&&c.unshift(h),c}r.getFactories=s;function t(l){let i;for(const c of l){if(i===void 0){i=new Set(c);continue}if(i.size===0)return i;let h=new Set;for(const e of c)i.has(e)&&h.add(e);i=h}return i??new Set}r.intersection=t})(o.OpenWith||(o.OpenWith={}))})(v||(v={}));export{eo as default,Ge as fileUploadStatus};
@@ -1 +1 @@
1
- import{ak as I,J as P,ae as T,ai as R,ci as E,cj as B,ag as A,c9 as j}from"../datalayer-app-main.js";import{b as M}from"./index-BvvaLLhn.js";import{I as N}from"./tokens-BHLmeqjP.js";import{I as C}from"./tokens-DXLxGbDM.js";import{c as k}from"./index-B_9UD0bt.js";import"./hoverbox-CStlKQWE.js";import"./Output-BscOPLqE.js";import"./index-BYQwy0Zx.js";import"./index-BJ7Yskx5.js";import"./color-CG7_7V2-.js";import"./isEqual-BybBNsZK.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./PaintbrushIcon-CLU8RilX.js";import"./index-B3WvcNQa.js";import"./RestartIcon-Ca6_HoK0.js";import"./CellSidebarExtension-CQlXdanG.js";import"./NotebookSkeleton-HdM76lOj.js";import"./Avatar-DbU3YP4x.js";import"./renderer-lVFw9lw7.js";import"./SquareIcon-e3ygcjpv.js";import"./SortAscIcon-CVKVWIWQ.js";import"./url-DuKx0yk0.js";/* empty css */import"./index-Dro44tIm.js";/* empty css *//* empty css */import"./index-DsG9xhMj.js";/* empty css */import"./index-CNU-WVhQ.js";import"./index--OLIX362.js";import"./index-DYGslHkf.js";import"./index-BSRVX3UN.js";import"./index-BH2OX5l8.js";import"./index-C3vDfO5_.js";import"./index-Ko8lxXFd.js";import"./index-CB9u17_J.js";import"./index-BUVtc_FV.js";import"./ArrowLeftIcon-Y3PTljcl.js";import"./SkubbleIcon-tlg17jBG.js";import"./usePrimerThemeBridge-D_1NuGKb.js";import"./index-j-oeqTuo.js";import"./KernelVariables-KCUfxhF4.js";import"./index-BvgsWH_d.js";import"./SortDescIcon-CS4EzHeS.js";import"./NotebookToolbar-DMKCe3c2.js";import"./RepoPushIcon-Cm8g9NuL.js";import"./Toolbar-6Hdi_m3T.js";import"./sessions-3PQsLINe.js";import"./tokens-BfuLIPUq.js";import"./drivecontents-Bg9_6Kmo.js";import"./kernel-BI-BLP-K.js";class V{constructor(n=I){this.translator=n,this._changed=new P(this),this._providerMap=new Map}add(n,c){return this._providerMap.set(n,c),this._changed.emit(),new T(()=>{this._providerMap.delete(n),this._changed.emit()})}getProvider(n){for(const c of this._providerMap.values())if(c.isApplicable(n))return c.createNew(n,this.translator)}hasProvider(n){for(const c of this._providerMap.values())if(c.isApplicable(n))return!0;return!1}get changed(){return this._changed}}const v="jp-mod-searchable",S="jp-mod-search-active";var o;(function(t){t.search="documentsearch:start",t.searchAndReplace="documentsearch:startWithReplace",t.findNext="documentsearch:highlightNext",t.findPrevious="documentsearch:highlightPrevious",t.end="documentsearch:end",t.toggleSearchInSelection="documentsearch:toggleSearchInSelection"})(o||(o={}));const F={id:"@jupyterlab/documentsearch-extension:labShellWidgetListener",description:"Active search on valid document",requires:[k,C],autoStart:!0,activate:(t,n,c)=>{const h=s=>{s&&(c.hasProvider(s)?s.addClass(v):s.removeClass(v))};c.changed.connect(()=>h(n.activeWidget)),n.activeChanged.connect((s,d)=>{const u=d.oldValue;u&&u.removeClass(v),h(d.newValue)})}};class L{constructor(n){this._commandRegistry=n,this._cache=this._buildCache(),this._commandRegistry.keyBindingChanged.connect(this._rebuildCache,this)}get next(){return this._cache.next}get previous(){return this._cache.previous}get toggleSearchInSelection(){return this._cache.toggleSearchInSelection}_rebuildCache(){this._cache=this._buildCache()}_buildCache(){const n=this._commandRegistry.keyBindings.find(s=>s.command===o.findNext),c=this._commandRegistry.keyBindings.find(s=>s.command===o.findPrevious),h=this._commandRegistry.keyBindings.find(s=>s.command===o.toggleSearchInSelection);return{next:n,previous:c,toggleSearchInSelection:h}}dispose(){this._commandRegistry.keyBindingChanged.disconnect(this._rebuildCache,this)}}const W={id:"@jupyterlab/documentsearch-extension:plugin",description:"Provides the document search registry.",provides:C,requires:[R],optional:[M,N],autoStart:!0,activate:(t,n,c,h)=>{var s;const d=n.load("jupyterlab");let u=500,_="never";const p=new V(n),l=new Map;if(h){const e=h.load(W.id),i=r=>{u=r.get("searchDebounceTime").composite,_=r.get("autoSearchInSelection").composite};Promise.all([e,t.restored]).then(([r])=>{i(r),r.changed.connect(a=>{i(a)})}).catch(r=>{console.error(r.message)})}const b=()=>{const e=t.shell.currentWidget;return e?p.hasProvider(e):!1},y=e=>{if(!e)return;const i=e.id;let r=l.get(i);if(!r){const a=p.getProvider(e);if(!a)return;const m=new E(a,u),x=new L(t.commands),g=new B(m,n,x);l.set(i,g),[o.findNext,o.findPrevious,o.end,o.toggleSearchInSelection].forEach(f=>{t.commands.notifyCommandChanged(f)}),g.closed.connect(()=>{e.isDisposed||(e.activate(),e.removeClass(S))}),g.disposed.connect(()=>{e.isDisposed||(e.activate(),e.removeClass(S)),l.delete(i),[o.findNext,o.findPrevious,o.end,o.toggleSearchInSelection].forEach(f=>{t.commands.notifyCommandChanged(f)})}),e.disposed.connect(()=>{g.dispose(),m.dispose(),a.dispose(),x.dispose()}),r=g}return r.isAttached||(A.attach(r,e.node),e.addClass(S),e instanceof j&&(r.node.style.top=`${e.toolbar.node.getBoundingClientRect().height+e.contentHeader.node.getBoundingClientRect().height}px`),r.model.searchExpression&&r.model.refresh()),r};return t.commands.addCommand(o.search,{label:d.__("Find…"),isEnabled:b,describedBy:{args:{type:"object",properties:{searchText:{type:"string",description:d.__("The text to search for")}}}},execute:async e=>{const i=y(t.shell.currentWidget);if(i){const r=e.searchText;r?i.setSearchText(r):i.setSearchText(i.model.suggestedInitialQuery);const a=i.model.selectionState;let m=!1;switch(_){case"multiple-selected":m=a==="multiple";break;case"any-selected":m=a==="multiple"||a==="single";break}m&&await i.model.setFilter("selection",!0),i.focusSearchInput()}}}),t.commands.addCommand(o.searchAndReplace,{label:d.__("Find and Replace…"),isEnabled:b,describedBy:{args:{type:"object",properties:{searchText:{type:"string",description:d.__("The text to search for")},replaceText:{type:"string",description:d.__("The text to replace with")}}}},execute:e=>{const i=y(t.shell.currentWidget);if(i){const r=e.searchText;r?i.setSearchText(r):i.setSearchText(i.model.suggestedInitialQuery);const a=e.replaceText;a&&i.setReplaceText(a),i.showReplace(),i.focusSearchInput()}}}),t.commands.addCommand(o.findNext,{label:d.__("Find Next"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id),describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const i=t.shell.currentWidget;i&&await((e=l.get(i.id))===null||e===void 0?void 0:e.model.highlightNext())}}),t.commands.addCommand(o.findPrevious,{label:d.__("Find Previous"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id),describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const i=t.shell.currentWidget;i&&await((e=l.get(i.id))===null||e===void 0?void 0:e.model.highlightPrevious())}}),t.commands.addCommand(o.end,{label:d.__("End Search"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id),describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const i=t.shell.currentWidget;i&&((e=l.get(i.id))===null||e===void 0||e.close())}}),t.commands.addCommand(o.toggleSearchInSelection,{label:d.__("Search in Selection"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id)&&"selection"in l.get(t.shell.currentWidget.id).model.filtersDefinition,describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const i=t.shell.currentWidget;if(!i)return;const r=(e=l.get(i.id))===null||e===void 0?void 0:e.model;if(!r)return;const a=r.filters.selection;return r.setFilter("selection",!a)}}),(s=t.shell.currentChanged)===null||s===void 0||s.connect(()=>{Object.values(o).forEach(e=>{t.commands.notifyCommandChanged(e)})}),c&&[o.search,o.findNext,o.findPrevious,o.end,o.toggleSearchInSelection].forEach(e=>{c.addItem({command:e,category:d.__("Main Area")})}),p}},Le=[W,F];export{Le as default};
1
+ import{ak as I,J as P,ae as T,ai as R,cj as E,ck as B,ag as A,ca as j}from"../datalayer-app-main.js";import{b as M}from"./index-a51XM5L8.js";import{I as N}from"./tokens-BHLmeqjP.js";import{I as C}from"./tokens-DXLxGbDM.js";import{c as k}from"./index-BlWZloLe.js";import"./hoverbox-CStlKQWE.js";import"./Output-9DKTscSv.js";import"./index-s3hayhRS.js";import"./index-CpcHHQd7.js";import"./color-CG7_7V2-.js";import"./isEqual-niFNV5MZ.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./PaintbrushIcon-CLU8RilX.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";import"./CellSidebarExtension-CfaJL6DQ.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./renderer-2D5v6hpK.js";import"./SquareIcon-e3ygcjpv.js";import"./SortAscIcon-CVKVWIWQ.js";import"./url-DuKx0yk0.js";/* empty css */import"./index-Dro44tIm.js";/* empty css *//* empty css */import"./index-DsG9xhMj.js";/* empty css */import"./index-CNU-WVhQ.js";import"./index--OLIX362.js";import"./index-DYGslHkf.js";import"./index-BSRVX3UN.js";import"./index-BH2OX5l8.js";import"./index-C3vDfO5_.js";import"./index-Ko8lxXFd.js";import"./index-CB9u17_J.js";import"./index-BUVtc_FV.js";import"./ArrowLeftIcon-Y3PTljcl.js";import"./SkubbleIcon-tlg17jBG.js";import"./usePrimerThemeBridge-CoHussa9.js";import"./index-BipXK1tF.js";import"./KernelVariables-Cl57Zze1.js";import"./index-BvgsWH_d.js";import"./SortDescIcon-CS4EzHeS.js";import"./NotebookToolbar-rtMQZWHQ.js";import"./RepoPushIcon-Cm8g9NuL.js";import"./Toolbar-CGQDY041.js";import"./sessions-APuuDN3K.js";import"./tokens-DTIgYcNS.js";import"./drivecontents-CxwZz_5W.js";import"./kernel-BI-BLP-K.js";class V{constructor(n=I){this.translator=n,this._changed=new P(this),this._providerMap=new Map}add(n,c){return this._providerMap.set(n,c),this._changed.emit(),new T(()=>{this._providerMap.delete(n),this._changed.emit()})}getProvider(n){for(const c of this._providerMap.values())if(c.isApplicable(n))return c.createNew(n,this.translator)}hasProvider(n){for(const c of this._providerMap.values())if(c.isApplicable(n))return!0;return!1}get changed(){return this._changed}}const v="jp-mod-searchable",S="jp-mod-search-active";var o;(function(t){t.search="documentsearch:start",t.searchAndReplace="documentsearch:startWithReplace",t.findNext="documentsearch:highlightNext",t.findPrevious="documentsearch:highlightPrevious",t.end="documentsearch:end",t.toggleSearchInSelection="documentsearch:toggleSearchInSelection"})(o||(o={}));const F={id:"@jupyterlab/documentsearch-extension:labShellWidgetListener",description:"Active search on valid document",requires:[k,C],autoStart:!0,activate:(t,n,c)=>{const h=s=>{s&&(c.hasProvider(s)?s.addClass(v):s.removeClass(v))};c.changed.connect(()=>h(n.activeWidget)),n.activeChanged.connect((s,d)=>{const u=d.oldValue;u&&u.removeClass(v),h(d.newValue)})}};class L{constructor(n){this._commandRegistry=n,this._cache=this._buildCache(),this._commandRegistry.keyBindingChanged.connect(this._rebuildCache,this)}get next(){return this._cache.next}get previous(){return this._cache.previous}get toggleSearchInSelection(){return this._cache.toggleSearchInSelection}_rebuildCache(){this._cache=this._buildCache()}_buildCache(){const n=this._commandRegistry.keyBindings.find(s=>s.command===o.findNext),c=this._commandRegistry.keyBindings.find(s=>s.command===o.findPrevious),h=this._commandRegistry.keyBindings.find(s=>s.command===o.toggleSearchInSelection);return{next:n,previous:c,toggleSearchInSelection:h}}dispose(){this._commandRegistry.keyBindingChanged.disconnect(this._rebuildCache,this)}}const W={id:"@jupyterlab/documentsearch-extension:plugin",description:"Provides the document search registry.",provides:C,requires:[R],optional:[M,N],autoStart:!0,activate:(t,n,c,h)=>{var s;const d=n.load("jupyterlab");let u=500,_="never";const p=new V(n),l=new Map;if(h){const e=h.load(W.id),i=r=>{u=r.get("searchDebounceTime").composite,_=r.get("autoSearchInSelection").composite};Promise.all([e,t.restored]).then(([r])=>{i(r),r.changed.connect(a=>{i(a)})}).catch(r=>{console.error(r.message)})}const b=()=>{const e=t.shell.currentWidget;return e?p.hasProvider(e):!1},y=e=>{if(!e)return;const i=e.id;let r=l.get(i);if(!r){const a=p.getProvider(e);if(!a)return;const m=new E(a,u),x=new L(t.commands),g=new B(m,n,x);l.set(i,g),[o.findNext,o.findPrevious,o.end,o.toggleSearchInSelection].forEach(f=>{t.commands.notifyCommandChanged(f)}),g.closed.connect(()=>{e.isDisposed||(e.activate(),e.removeClass(S))}),g.disposed.connect(()=>{e.isDisposed||(e.activate(),e.removeClass(S)),l.delete(i),[o.findNext,o.findPrevious,o.end,o.toggleSearchInSelection].forEach(f=>{t.commands.notifyCommandChanged(f)})}),e.disposed.connect(()=>{g.dispose(),m.dispose(),a.dispose(),x.dispose()}),r=g}return r.isAttached||(A.attach(r,e.node),e.addClass(S),e instanceof j&&(r.node.style.top=`${e.toolbar.node.getBoundingClientRect().height+e.contentHeader.node.getBoundingClientRect().height}px`),r.model.searchExpression&&r.model.refresh()),r};return t.commands.addCommand(o.search,{label:d.__("Find…"),isEnabled:b,describedBy:{args:{type:"object",properties:{searchText:{type:"string",description:d.__("The text to search for")}}}},execute:async e=>{const i=y(t.shell.currentWidget);if(i){const r=e.searchText;r?i.setSearchText(r):i.setSearchText(i.model.suggestedInitialQuery);const a=i.model.selectionState;let m=!1;switch(_){case"multiple-selected":m=a==="multiple";break;case"any-selected":m=a==="multiple"||a==="single";break}m&&await i.model.setFilter("selection",!0),i.focusSearchInput()}}}),t.commands.addCommand(o.searchAndReplace,{label:d.__("Find and Replace…"),isEnabled:b,describedBy:{args:{type:"object",properties:{searchText:{type:"string",description:d.__("The text to search for")},replaceText:{type:"string",description:d.__("The text to replace with")}}}},execute:e=>{const i=y(t.shell.currentWidget);if(i){const r=e.searchText;r?i.setSearchText(r):i.setSearchText(i.model.suggestedInitialQuery);const a=e.replaceText;a&&i.setReplaceText(a),i.showReplace(),i.focusSearchInput()}}}),t.commands.addCommand(o.findNext,{label:d.__("Find Next"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id),describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const i=t.shell.currentWidget;i&&await((e=l.get(i.id))===null||e===void 0?void 0:e.model.highlightNext())}}),t.commands.addCommand(o.findPrevious,{label:d.__("Find Previous"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id),describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const i=t.shell.currentWidget;i&&await((e=l.get(i.id))===null||e===void 0?void 0:e.model.highlightPrevious())}}),t.commands.addCommand(o.end,{label:d.__("End Search"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id),describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const i=t.shell.currentWidget;i&&((e=l.get(i.id))===null||e===void 0||e.close())}}),t.commands.addCommand(o.toggleSearchInSelection,{label:d.__("Search in Selection"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id)&&"selection"in l.get(t.shell.currentWidget.id).model.filtersDefinition,describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const i=t.shell.currentWidget;if(!i)return;const r=(e=l.get(i.id))===null||e===void 0?void 0:e.model;if(!r)return;const a=r.filters.selection;return r.setFilter("selection",!a)}}),(s=t.shell.currentChanged)===null||s===void 0||s.connect(()=>{Object.values(o).forEach(e=>{t.commands.notifyCommandChanged(e)})}),c&&[o.search,o.findNext,o.findPrevious,o.end,o.toggleSearchInSelection].forEach(e=>{c.addItem({command:e,category:d.__("Main Area")})}),p}},Le=[W,F];export{Le as default};
@@ -1,4 +1,4 @@
1
- import{b as Yn,t as p6,_ as me,c as v6,d as m6,a as or}from"./slicedToArray-C6MrPRv_.js";import{v as k,r as Q,bc as n0,a8 as vt,sG as b6,ri as O1,sH as y6,sI as k6,sJ as w6,sK as hc,sL as sd,sM as yv,sa as Kf,sN as E6,lk as mt,sO as S6,qZ as o0,cl as _6,sP as ye,sQ as I1,sR as A5}from"../datalayer-app-main.js";import{r as C6}from"./index-jGGzfal6.js";import{_ as ta}from"./extends-CF3RwP-h.js";import{R as x6,b as P6,K as O6,s as of,d as ld,r as tr,D as I6,h as T6,e as Vs,W as zt,f as ya,g as T1,i as R1,j as df,k as R6,m as A6,a as D6,c as N6,l as M6,n as F6,o as D5,t as N5,p as L6,q as pb,u as U6,v as B6,w as M5,x as H6}from"./Middleware-BiLBmIq0.js";import{O as Yf}from"./ua-parser-BgekE870.js";function ii(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function zr(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function mr(e){zr(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Yn(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function z6(e,t){zr(2,arguments);var r=mr(e),a=ii(t);return isNaN(a)?new Date(NaN):(a&&r.setDate(r.getDate()+a),r)}function V6(e,t){zr(2,arguments);var r=mr(e),a=ii(t);if(isNaN(a))return new Date(NaN);if(!a)return r;var o=r.getDate(),n=new Date(r.getTime());n.setMonth(r.getMonth()+a+1,0);var i=n.getDate();return o>=i?n:(r.setFullYear(n.getFullYear(),n.getMonth(),o),r)}function cd(e,t){if(zr(2,arguments),!t||Yn(t)!=="object")return new Date(NaN);var r=t.years?ii(t.years):0,a=t.months?ii(t.months):0,o=t.weeks?ii(t.weeks):0,n=t.days?ii(t.days):0,i=t.hours?ii(t.hours):0,s=t.minutes?ii(t.minutes):0,l=t.seconds?ii(t.seconds):0,c=mr(e),u=a||r?V6(c,a+r*12):c,d=n||o?z6(u,n+o*7):u,m=s+i*60,b=l+m*60,v=b*1e3,g=new Date(d.getTime()+v);return g}function A1(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function D1(e){zr(1,arguments);var t=mr(e);return t.setHours(0,0,0,0),t}var W6=864e5;function j6(e,t){zr(2,arguments);var r=D1(e),a=D1(t),o=r.getTime()-A1(r),n=a.getTime()-A1(a);return Math.round((o-n)/W6)}function Mc(e,t){zr(2,arguments);var r=mr(e),a=mr(t),o=r.getTime()-a.getTime();return o<0?-1:o>0?1:o}var G6=6e4,K6=36e5;function Y6(e,t){zr(2,arguments);var r=mr(e),a=mr(t),o=r.getFullYear()-a.getFullYear(),n=r.getMonth()-a.getMonth();return o*12+n}function X6(e,t){zr(2,arguments);var r=mr(e),a=mr(t);return r.getFullYear()-a.getFullYear()}function N1(e,t){var r=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return r<0?-1:r>0?1:r}function J6(e,t){zr(2,arguments);var r=mr(e),a=mr(t),o=N1(r,a),n=Math.abs(j6(r,a));r.setDate(r.getDate()-o*n);var i=+(N1(r,a)===-o),s=o*(n-i);return s===0?0:s}function i0(e,t){return zr(2,arguments),mr(e).getTime()-mr(t).getTime()}var Z6={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Q6="trunc";function s0(e){return Z6[Q6]}function q6(e,t,r){zr(2,arguments);var a=i0(e,t)/K6;return s0()(a)}function $6(e,t,r){zr(2,arguments);var a=i0(e,t)/G6;return s0()(a)}function eR(e){zr(1,arguments);var t=mr(e);return t.setHours(23,59,59,999),t}function tR(e){zr(1,arguments);var t=mr(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function rR(e){zr(1,arguments);var t=mr(e);return eR(t).getTime()===tR(t).getTime()}function aR(e,t){zr(2,arguments);var r=mr(e),a=mr(t),o=Mc(r,a),n=Math.abs(Y6(r,a)),i;if(n<1)i=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-o*n);var s=Mc(r,a)===-o;rR(mr(e))&&n===1&&Mc(e,a)===1&&(s=!1),i=o*(n-Number(s))}return i===0?0:i}function nR(e,t,r){zr(2,arguments);var a=i0(e,t)/1e3;return s0()(a)}function oR(e,t){zr(2,arguments);var r=mr(e),a=mr(t),o=Mc(r,a),n=Math.abs(X6(r,a));r.setFullYear(1584),a.setFullYear(1584);var i=Mc(r,a)===-o,s=o*(n-Number(i));return s===0?0:s}function F5(e){zr(1,arguments);var t=mr(e.start),r=mr(e.end);if(isNaN(t.getTime()))throw new RangeError("Start Date is invalid");if(isNaN(r.getTime()))throw new RangeError("End Date is invalid");var a={};a.years=Math.abs(oR(r,t));var o=Mc(r,t),n=cd(t,{years:o*a.years});a.months=Math.abs(aR(r,n));var i=cd(n,{months:o*a.months});a.days=Math.abs(J6(r,i));var s=cd(i,{days:o*a.days});a.hours=Math.abs(q6(r,s));var l=cd(s,{hours:o*a.hours});a.minutes=Math.abs($6(r,l));var c=cd(l,{minutes:o*a.minutes});return a.seconds=Math.abs(nR(r,c)),a}function vb(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gc(e,t){return Gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Gc(e,t)}function l0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gc(e,t)}function Xn(e){return Xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xn(e)}function L5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(L5=function(){return!!e})()}function c0(e,t){if(t&&(Yn(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vb(e)}function ur(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M1(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,p6(a.key),a)}}function dr(e,t,r){return t&&M1(e.prototype,t),r&&M1(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wn(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(o){return"'"+o+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Qi(e){return!!e&&!!e[vr]}function ci(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var a=Object.getPrototypeOf(r);if(a===null)return!0;var o=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;return o===Object||typeof o=="function"&&Function.toString.call(o)===fR})(e)||Array.isArray(e)||!!e[V1]||!!(!((t=e.constructor)===null||t===void 0)&&t[V1])||u0(e)||d0(e))}function ml(e,t,r){r===void 0&&(r=!1),qc(e)===0?(r?Object.keys:Lc)(e).forEach((function(a){r&&typeof a=="symbol"||t(a,e[a],e)})):e.forEach((function(a,o){return t(o,a,e)}))}function qc(e){var t=e[vr];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:u0(e)?2:d0(e)?3:0}function Fc(e,t){return qc(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function iR(e,t){return qc(e)===2?e.get(t):e[t]}function U5(e,t,r){var a=qc(e);a===2?e.set(t,r):a===3?e.add(r):e[t]=r}function B5(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function u0(e){return hR&&e instanceof Map}function d0(e){return gR&&e instanceof Set}function hl(e){return e.o||e.t}function h0(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=z5(e);delete t[vr];for(var r=Lc(t),a=0;a<r.length;a++){var o=r[a],n=t[o];n.writable===!1&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(t[o]={configurable:!0,writable:!0,enumerable:n.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function g0(e,t){return t===void 0&&(t=!1),f0(e)||Qi(e)||!ci(e)||(qc(e)>1&&(e.set=e.add=e.clear=e.delete=sR),Object.freeze(e),t&&ml(e,(function(r,a){return g0(a,!0)}),!0)),e}function sR(){Wn(2)}function f0(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Co(e){var t=kb[e];return t||Wn(18,e),t}function lR(e,t){kb[e]||(kb[e]=t)}function mb(){return Fh}function kv(e,t){t&&(Co("Patches"),e.u=[],e.s=[],e.v=t)}function hf(e){bb(e),e.p.forEach(cR),e.p=null}function bb(e){e===Fh&&(Fh=e.l)}function F1(e){return Fh={p:[],l:Fh,h:e,m:!0,_:0}}function cR(e){var t=e[vr];t.i===0||t.i===1?t.j():t.g=!0}function wv(e,t){t._=t.p.length;var r=t.p[0],a=e!==void 0&&e!==r;return t.h.O||Co("ES5").S(t,e,a),a?(r[vr].P&&(hf(t),Wn(4)),ci(e)&&(e=gf(t,e),t.l||ff(t,e)),t.u&&Co("Patches").M(r[vr].t,e,t.u,t.s)):e=gf(t,r,[]),hf(t),t.u&&t.v(t.u,t.s),e!==H5?e:void 0}function gf(e,t,r){if(f0(t))return t;var a=t[vr];if(!a)return ml(t,(function(s,l){return L1(e,a,t,s,l,r)}),!0),t;if(a.A!==e)return t;if(!a.P)return ff(e,a.t,!0),a.t;if(!a.I){a.I=!0,a.A._--;var o=a.i===4||a.i===5?a.o=h0(a.k):a.o,n=o,i=!1;a.i===3&&(n=new Set(o),o.clear(),i=!0),ml(n,(function(s,l){return L1(e,a,o,s,l,r,i)})),ff(e,o,!1),r&&e.u&&Co("Patches").N(a,r,e.u,e.s)}return a.o}function L1(e,t,r,a,o,n,i){if(Qi(o)){var s=gf(e,o,n&&t&&t.i!==3&&!Fc(t.R,a)?n.concat(a):void 0);if(U5(r,a,s),!Qi(s))return;e.m=!1}else i&&r.add(o);if(ci(o)&&!f0(o)){if(!e.h.D&&e._<1)return;gf(e,o),t&&t.A.l||ff(e,o)}}function ff(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&g0(t,r)}function Ev(e,t){var r=e[vr];return(r?hl(r):e)[t]}function U1(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var a=Object.getOwnPropertyDescriptor(r,t);if(a)return a;r=Object.getPrototypeOf(r)}}function Ki(e){e.P||(e.P=!0,e.l&&Ki(e.l))}function Sv(e){e.o||(e.o=h0(e.t))}function yb(e,t,r){var a=u0(t)?Co("MapSet").F(t,r):d0(t)?Co("MapSet").T(t,r):e.O?(function(o,n){var i=Array.isArray(o),s={i:i?1:0,A:n?n.A:mb(),P:!1,I:!1,R:{},l:n,t:o,k:null,o:null,j:null,C:!1},l=s,c=Lh;i&&(l=[s],c=yh);var u=Proxy.revocable(l,c),d=u.revoke,m=u.proxy;return s.k=m,s.j=d,m})(t,r):Co("ES5").J(t,r);return(r?r.A:mb()).p.push(a),a}function uR(e){return Qi(e)||Wn(22,e),(function t(r){if(!ci(r))return r;var a,o=r[vr],n=qc(r);if(o){if(!o.P&&(o.i<4||!Co("ES5").K(o)))return o.t;o.I=!0,a=B1(r,n),o.I=!1}else a=B1(r,n);return ml(a,(function(i,s){o&&iR(o.t,i)===s||U5(a,i,t(s))})),n===3?new Set(a):a})(e)}function B1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return h0(e)}function dR(){function e(n,i){var s=o[n];return s?s.enumerable=i:o[n]=s={configurable:!0,enumerable:i,get:function(){var l=this[vr];return Lh.get(l,n)},set:function(l){var c=this[vr];Lh.set(c,n,l)}},s}function t(n){for(var i=n.length-1;i>=0;i--){var s=n[i][vr];if(!s.P)switch(s.i){case 5:a(s)&&Ki(s);break;case 4:r(s)&&Ki(s)}}}function r(n){for(var i=n.t,s=n.k,l=Lc(s),c=l.length-1;c>=0;c--){var u=l[c];if(u!==vr){var d=i[u];if(d===void 0&&!Fc(i,u))return!0;var m=s[u],b=m&&m[vr];if(b?b.t!==d:!B5(m,d))return!0}}var v=!!i[vr];return l.length!==Lc(i).length+(v?0:1)}function a(n){var i=n.k;if(i.length!==n.t.length)return!0;var s=Object.getOwnPropertyDescriptor(i,i.length-1);if(s&&!s.get)return!0;for(var l=0;l<i.length;l++)if(!i.hasOwnProperty(l))return!0;return!1}var o={};lR("ES5",{J:function(n,i){var s=Array.isArray(n),l=(function(u,d){if(u){for(var m=Array(d.length),b=0;b<d.length;b++)Object.defineProperty(m,""+b,e(b,!0));return m}var v=z5(d);delete v[vr];for(var g=Lc(v),w=0;w<g.length;w++){var E=g[w];v[E]=e(E,u||!!v[E].enumerable)}return Object.create(Object.getPrototypeOf(d),v)})(s,n),c={i:s?5:4,A:i?i.A:mb(),P:!1,I:!1,R:{},l:i,t:n,k:l,o:null,g:!1,C:!1};return Object.defineProperty(l,vr,{value:c,writable:!0}),l},S:function(n,i,s){s?Qi(i)&&i[vr].A===n&&t(n.p):(n.u&&(function l(c){if(c&&typeof c=="object"){var u=c[vr];if(u){var d=u.t,m=u.k,b=u.R,v=u.i;if(v===4)ml(m,(function(P){P!==vr&&(d[P]!==void 0||Fc(d,P)?b[P]||l(m[P]):(b[P]=!0,Ki(u)))})),ml(d,(function(P){m[P]!==void 0||Fc(m,P)||(b[P]=!1,Ki(u))}));else if(v===5){if(a(u)&&(Ki(u),b.length=!0),m.length<d.length)for(var g=m.length;g<d.length;g++)b[g]=!1;else for(var w=d.length;w<m.length;w++)b[w]=!0;for(var E=Math.min(m.length,d.length),S=0;S<E;S++)m.hasOwnProperty(S)||(b[S]=!0),b[S]===void 0&&l(m[S])}}}})(n.p[0]),t(n.p))},K:function(n){return n.i===4?r(n):a(n)}})}var H1,Fh,p0=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",hR=typeof Map<"u",gR=typeof Set<"u",z1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",H5=p0?Symbol.for("immer-nothing"):((H1={})["immer-nothing"]=!0,H1),V1=p0?Symbol.for("immer-draftable"):"__$immer_draftable",vr=p0?Symbol.for("immer-state"):"__$immer_state",fR=""+Object.prototype.constructor,Lc=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,z5=Object.getOwnPropertyDescriptors||function(e){var t={};return Lc(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},kb={},Lh={get:function(e,t){if(t===vr)return e;var r=hl(e);if(!Fc(r,t))return(function(o,n,i){var s,l=U1(n,i);return l?"value"in l?l.value:(s=l.get)===null||s===void 0?void 0:s.call(o.k):void 0})(e,r,t);var a=r[t];return e.I||!ci(a)?a:a===Ev(e.t,t)?(Sv(e),e.o[t]=yb(e.A.h,a,e)):a},has:function(e,t){return t in hl(e)},ownKeys:function(e){return Reflect.ownKeys(hl(e))},set:function(e,t,r){var a=U1(hl(e),t);if(a?.set)return a.set.call(e.k,r),!0;if(!e.P){var o=Ev(hl(e),t),n=o?.[vr];if(n&&n.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(B5(r,o)&&(r!==void 0||Fc(e.t,t)))return!0;Sv(e),Ki(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Ev(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Sv(e),Ki(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=hl(e),a=Reflect.getOwnPropertyDescriptor(r,t);return a&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:a.enumerable,value:r[t]}},defineProperty:function(){Wn(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Wn(12)}},yh={};ml(Lh,(function(e,t){yh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),yh.deleteProperty=function(e,t){return yh.set.call(this,e,t,void 0)},yh.set=function(e,t,r){return Lh.set.call(this,e[0],t,r,e[0])};var pR=(function(){function e(r){var a=this;this.O=z1,this.D=!0,this.produce=function(o,n,i){if(typeof o=="function"&&typeof n!="function"){var s=n;n=o;var l=a;return function(g){var w=this;g===void 0&&(g=s);for(var E=arguments.length,S=Array(E>1?E-1:0),P=1;P<E;P++)S[P-1]=arguments[P];return l.produce(g,(function(I){var O;return(O=n).call.apply(O,[w,I].concat(S))}))}}var c;if(typeof n!="function"&&Wn(6),i!==void 0&&typeof i!="function"&&Wn(7),ci(o)){var u=F1(a),d=yb(a,o,void 0),m=!0;try{c=n(d),m=!1}finally{m?hf(u):bb(u)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(g){return kv(u,i),wv(g,u)}),(function(g){throw hf(u),g})):(kv(u,i),wv(c,u))}if(!o||typeof o!="object"){if((c=n(o))===void 0&&(c=o),c===H5&&(c=void 0),a.D&&g0(c,!0),i){var b=[],v=[];Co("Patches").M(o,c,b,v),i(b,v)}return c}Wn(21,o)},this.produceWithPatches=function(o,n){if(typeof o=="function")return function(c){for(var u=arguments.length,d=Array(u>1?u-1:0),m=1;m<u;m++)d[m-1]=arguments[m];return a.produceWithPatches(c,(function(b){return o.apply(void 0,[b].concat(d))}))};var i,s,l=a.produce(o,n,(function(c,u){i=c,s=u}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,i,s]})):[l,i,s]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){ci(r)||Wn(8),Qi(r)&&(r=uR(r));var a=F1(this),o=yb(this,r,void 0);return o[vr].C=!0,bb(a),o},t.finishDraft=function(r,a){var o=r&&r[vr],n=o.A;return kv(n,a),wv(void 0,n)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!z1&&Wn(20),this.O=r},t.applyPatches=function(r,a){var o;for(o=a.length-1;o>=0;o--){var n=a[o];if(n.path.length===0&&n.op==="replace"){r=n.value;break}}o>-1&&(a=a.slice(o+1));var i=Co("Patches").$;return Qi(r)?i(r,a):this.produce(r,(function(s){return i(s,a)}))},e})(),sn=new pR,V5=sn.produce;sn.produceWithPatches.bind(sn);sn.setAutoFreeze.bind(sn);sn.setUseProxies.bind(sn);sn.applyPatches.bind(sn);sn.createDraft.bind(sn);sn.finishDraft.bind(sn);function W1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function j1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?W1(Object(r),!0).forEach(function(a){me(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W1(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function ka(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var G1=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),_v=function(){return Math.random().toString(36).substring(7).split("").join(".")},pf={INIT:"@@redux/INIT"+_v(),REPLACE:"@@redux/REPLACE"+_v(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+_v()}};function vR(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function W5(e,t,r){var a;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ka(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ka(1));return r(W5)(e,t)}if(typeof e!="function")throw new Error(ka(2));var o=e,n=t,i=[],s=i,l=!1;function c(){s===i&&(s=i.slice())}function u(){if(l)throw new Error(ka(3));return n}function d(g){if(typeof g!="function")throw new Error(ka(4));if(l)throw new Error(ka(5));var w=!0;return c(),s.push(g),function(){if(w){if(l)throw new Error(ka(6));w=!1,c();var S=s.indexOf(g);s.splice(S,1),i=null}}}function m(g){if(!vR(g))throw new Error(ka(7));if(typeof g.type>"u")throw new Error(ka(8));if(l)throw new Error(ka(9));try{l=!0,n=o(n,g)}finally{l=!1}for(var w=i=s,E=0;E<w.length;E++){var S=w[E];S()}return g}function b(g){if(typeof g!="function")throw new Error(ka(10));o=g,m({type:pf.REPLACE})}function v(){var g,w=d;return g={subscribe:function(S){if(typeof S!="object"||S===null)throw new Error(ka(11));function P(){S.next&&S.next(u())}P();var I=w(P);return{unsubscribe:I}}},g[G1]=function(){return this},g}return m({type:pf.INIT}),a={dispatch:m,subscribe:d,getState:u,replaceReducer:b},a[G1]=v,a}function mR(e){Object.keys(e).forEach(function(t){var r=e[t],a=r(void 0,{type:pf.INIT});if(typeof a>"u")throw new Error(ka(12));if(typeof r(void 0,{type:pf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ka(13))})}function v0(e){for(var t=Object.keys(e),r={},a=0;a<t.length;a++){var o=t[a];typeof e[o]=="function"&&(r[o]=e[o])}var n=Object.keys(r),i;try{mR(r)}catch(s){i=s}return function(l,c){if(l===void 0&&(l={}),i)throw i;for(var u=!1,d={},m=0;m<n.length;m++){var b=n[m],v=r[b],g=l[b],w=v(g,c);if(typeof w>"u")throw c&&c.type,new Error(ka(14));d[b]=w,u=u||w!==g}return u=u||n.length!==Object.keys(l).length,u?d:l}}function vf(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(a){return a}:t.length===1?t[0]:t.reduce(function(a,o){return function(){return a(o.apply(void 0,arguments))}})}function bR(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(a){return function(){var o=a.apply(void 0,arguments),n=function(){throw new Error(ka(15))},i={getState:o.getState,dispatch:function(){return n.apply(void 0,arguments)}},s=t.map(function(l){return l(i)});return n=vf.apply(void 0,s)(o.dispatch),j1(j1({},o),{},{dispatch:n})}}}var mf="NOT_FOUND";function yR(e){var t;return{get:function(a){return t&&e(t.key,a)?t.value:mf},put:function(a,o){t={key:a,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function kR(e,t){var r=[];function a(s){var l=r.findIndex(function(u){return t(s,u.key)});if(l>-1){var c=r[l];return l>0&&(r.splice(l,1),r.unshift(c)),c.value}return mf}function o(s,l){a(s)===mf&&(r.unshift({key:s,value:l}),r.length>e&&r.pop())}function n(){return r}function i(){r=[]}return{get:a,put:o,getEntries:n,clear:i}}var wR=function(t,r){return t===r};function ER(e){return function(r,a){if(r===null||a===null||r.length!==a.length)return!1;for(var o=r.length,n=0;n<o;n++)if(!e(r[n],a[n]))return!1;return!0}}function SR(e,t){var r=typeof t=="object"?t:{equalityCheck:t},a=r.equalityCheck,o=a===void 0?wR:a,n=r.maxSize,i=n===void 0?1:n,s=r.resultEqualityCheck,l=ER(o),c=i===1?yR(l):kR(i,l);function u(){var d=c.get(arguments);if(d===mf){if(d=e.apply(null,arguments),s){var m=c.getEntries(),b=m.find(function(v){return s(v.value,d)});b&&(d=b.value)}c.put(arguments,d)}return d}return u.clearCache=function(){return c.clear()},u}function _R(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(a){return typeof a=="function"})){var r=t.map(function(a){return typeof a=="function"?"function "+(a.name||"unnamed")+"()":typeof a}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}function CR(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];var o=function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];var c=0,u,d={memoizeOptions:void 0},m=s.pop();if(typeof m=="object"&&(d=m,m=s.pop()),typeof m!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof m+"]");var b=d,v=b.memoizeOptions,g=v===void 0?r:v,w=Array.isArray(g)?g:[g],E=_R(s),S=e.apply(void 0,[function(){return c++,m.apply(null,arguments)}].concat(w)),P=e(function(){for(var O=[],T=E.length,C=0;C<T;C++)O.push(E[C].apply(null,arguments));return u=S.apply(null,O),u});return Object.assign(P,{resultFunc:m,memoizedResultFunc:S,dependencies:E,lastResult:function(){return u},recomputations:function(){return c},resetRecomputations:function(){return c=0}}),P};return o}var xe=CR(SR);function j5(e){var t=function(a){var o=a.dispatch,n=a.getState;return function(i){return function(s){return typeof s=="function"?s(o,n,e):i(s)}}};return t}var wb=j5();wb.withExtraArgument=j5;var G5=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(a[n]=o[n])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function a(){this.constructor=t}t.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}})(),xR=function(e,t){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},a,o,n,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(u){return l([c,u])}}function l(c){if(a)throw new TypeError("Generator is already executing.");for(;r;)try{if(a=1,o&&(n=c[0]&2?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[c[0]&2,n.value]),c[0]){case 0:case 1:n=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(n=r.trys,!(n=n.length>0&&n[n.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!n||c[1]>n[0]&&c[1]<n[3])){r.label=c[1];break}if(c[0]===6&&r.label<n[1]){r.label=n[1],n=c;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(c);break}n[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(u){c=[6,u],o=0}finally{a=n=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Kc=function(e,t){for(var r=0,a=t.length,o=e.length;r<a;r++,o++)e[o]=t[r];return e},PR=Object.defineProperty,OR=Object.defineProperties,IR=Object.getOwnPropertyDescriptors,K1=Object.getOwnPropertySymbols,TR=Object.prototype.hasOwnProperty,RR=Object.prototype.propertyIsEnumerable,Y1=function(e,t,r){return t in e?PR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Xi=function(e,t){for(var r in t||(t={}))TR.call(t,r)&&Y1(e,r,t[r]);if(K1)for(var a=0,o=K1(t);a<o.length;a++){var r=o[a];RR.call(t,r)&&Y1(e,r,t[r])}return e},Cv=function(e,t){return OR(e,IR(t))},AR=function(e,t,r){return new Promise(function(a,o){var n=function(l){try{s(r.next(l))}catch(c){o(c)}},i=function(l){try{s(r.throw(l))}catch(c){o(c)}},s=function(l){return l.done?a(l.value):Promise.resolve(l.value).then(n,i)};s((r=r.apply(e,t)).next())})},DR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?vf:vf.apply(null,arguments)};function NR(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function na(e,t){function r(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];if(t){var n=t.apply(void 0,a);if(!n)throw new Error("prepareAction did not return an object");return Xi(Xi({type:e,payload:n.payload},"meta"in n&&{meta:n.meta}),"error"in n&&{error:n.error})}return{type:e,payload:a[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(a){return a.type===e},r}var MR=(function(e){G5(t,e);function t(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var o=e.apply(this,r)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Kc([void 0],r[0].concat(this)))):new(t.bind.apply(t,Kc([void 0],r.concat(this))))},t})(Array),FR=(function(e){G5(t,e);function t(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var o=e.apply(this,r)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Kc([void 0],r[0].concat(this)))):new(t.bind.apply(t,Kc([void 0],r.concat(this))))},t})(Array);function Eb(e){return ci(e)?V5(e,function(){}):e}function LR(e){return typeof e=="boolean"}function UR(){return function(t){return BR(t)}}function BR(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t;e.immutableCheck,e.serializableCheck,e.actionCreatorCheck;var a=new MR;return r&&(LR(r)?a.push(wb):a.push(wb.withExtraArgument(r.extraArgument))),a}function HR(e){var t=UR(),r=e||{},a=r.reducer,o=a===void 0?void 0:a,n=r.middleware,i=n===void 0?t():n,s=r.devTools,l=s===void 0?!0:s,c=r.preloadedState,u=c===void 0?void 0:c,d=r.enhancers,m=d===void 0?void 0:d,b;if(typeof o=="function")b=o;else if(NR(o))b=v0(o);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=i;typeof v=="function"&&(v=v(t));var g=bR.apply(void 0,v),w=vf;l&&(w=DR(Xi({trace:!1},typeof l=="object"&&l)));var E=new FR(g),S=E;Array.isArray(m)?S=Kc([g],m):typeof m=="function"&&(S=m(E));var P=w.apply(void 0,S);return W5(b,u,P)}function K5(e){var t={},r=[],a,o={addCase:function(n,i){var s=typeof n=="string"?n:n.type;if(!s)throw new Error("`builder.addCase` cannot be called with an empty action type");if(s in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[s]=i,o},addMatcher:function(n,i){return r.push({matcher:n,reducer:i}),o},addDefaultCase:function(n){return a=n,o}};return e(o),[t,r,a]}function zR(e){return typeof e=="function"}function VR(e,t,r,a){r===void 0&&(r=[]);var o=typeof t=="function"?K5(t):[t,r,a],n=o[0],i=o[1],s=o[2],l;if(zR(e))l=function(){return Eb(e())};else{var c=Eb(e);l=function(){return c}}function u(d,m){d===void 0&&(d=l());var b=Kc([n[m.type]],i.filter(function(v){var g=v.matcher;return g(m)}).map(function(v){var g=v.reducer;return g}));return b.filter(function(v){return!!v}).length===0&&(b=[s]),b.reduce(function(v,g){if(g)if(Qi(v)){var w=v,E=g(w,m);return E===void 0?v:E}else{if(ci(v))return V5(v,function(S){return g(S,m)});var E=g(v,m);if(E===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return v},d)}return u.getInitialState=l,u}function WR(e,t){return e+"/"+t}function At(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var r=typeof e.initialState=="function"?e.initialState:Eb(e.initialState),a=e.reducers||{},o=Object.keys(a),n={},i={},s={};o.forEach(function(u){var d=a[u],m=WR(t,u),b,v;"reducer"in d?(b=d.reducer,v=d.prepare):b=d,n[u]=b,i[m]=b,s[u]=v?na(m,v):na(m)});function l(){var u=typeof e.extraReducers=="function"?K5(e.extraReducers):[e.extraReducers],d=u[0],m=d===void 0?{}:d,b=u[1],v=b===void 0?[]:b,g=u[2],w=g===void 0?void 0:g,E=Xi(Xi({},m),i);return VR(r,function(S){for(var P in E)S.addCase(P,E[P]);for(var I=0,O=v;I<O.length;I++){var T=O[I];S.addMatcher(T.matcher,T.reducer)}w&&S.addDefaultCase(w)})}var c;return{name:t,reducer:function(u,d){return c||(c=l()),c(u,d)},actions:s,caseReducers:n,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var jR="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",GR=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=jR[Math.random()*64|0];return t},KR=["name","message","stack","code"],xv=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),X1=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),YR=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,a=KR;r<a.length;r++){var o=a[r];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}};(function(){function e(t,r,a){var o=na(t+"/fulfilled",function(c,u,d,m){return{payload:c,meta:Cv(Xi({},m||{}),{arg:d,requestId:u,requestStatus:"fulfilled"})}}),n=na(t+"/pending",function(c,u,d){return{payload:void 0,meta:Cv(Xi({},d||{}),{arg:u,requestId:c,requestStatus:"pending"})}}),i=na(t+"/rejected",function(c,u,d,m,b){return{payload:m,error:(a&&a.serializeError||YR)(c||"Rejected"),meta:Cv(Xi({},b||{}),{arg:d,requestId:u,rejectedWithValue:!!m,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"})}}),s=typeof AbortController<"u"?AbortController:(function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c})();function l(c){return function(u,d,m){var b=a?.idGenerator?a.idGenerator(c):GR(),v=new s,g;function w(S){g=S,v.abort()}var E=(function(){return AR(this,null,function(){var S,P,I,O,T,C,R;return xR(this,function(N){switch(N.label){case 0:return N.trys.push([0,4,,5]),O=(S=a?.condition)==null?void 0:S.call(a,c,{getState:d,extra:m}),JR(O)?[4,O]:[3,2];case 1:O=N.sent(),N.label=2;case 2:if(O===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return T=new Promise(function(U,B){return v.signal.addEventListener("abort",function(){return B({name:"AbortError",message:g||"Aborted"})})}),u(n(b,c,(P=a?.getPendingMeta)==null?void 0:P.call(a,{requestId:b,arg:c},{getState:d,extra:m}))),[4,Promise.race([T,Promise.resolve(r(c,{dispatch:u,getState:d,extra:m,requestId:b,signal:v.signal,abort:w,rejectWithValue:function(U,B){return new xv(U,B)},fulfillWithValue:function(U,B){return new X1(U,B)}})).then(function(U){if(U instanceof xv)throw U;return U instanceof X1?o(U.payload,b,c,U.meta):o(U,b,c)})])];case 3:return I=N.sent(),[3,5];case 4:return C=N.sent(),I=C instanceof xv?i(null,b,c,C.payload,C.meta):i(C,b,c),[3,5];case 5:return R=a&&!a.dispatchConditionRejection&&i.match(I)&&I.meta.condition,R||u(I),[2,I]}})})})();return Object.assign(E,{abort:w,requestId:b,arg:c,unwrap:function(){return E.then(XR)}})}}return Object.assign(l,{pending:n,rejected:i,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e})();function XR(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function JR(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var m0="listenerMiddleware";na(m0+"/add");na(m0+"/removeAll");na(m0+"/remove");var J1;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window<"u"?window:globalThis);dR();var qi=k.createContext(null);function ZR(e){e()}var Y5=ZR,QR=function(t){return Y5=t},qR=function(){return Y5};function $R(){var e=qR(),t=null,r=null;return{clear:function(){t=null,r=null},notify:function(){e(function(){for(var o=t;o;)o.callback(),o=o.next})},get:function(){for(var o=[],n=t;n;)o.push(n),n=n.next;return o},subscribe:function(o){var n=!0,i=r={callback:o,next:null,prev:r};return i.prev?i.prev.next=i:t=i,function(){!n||t===null||(n=!1,i.next?i.next.prev=i.prev:r=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var Z1={notify:function(){},get:function(){return[]}};function X5(e,t){var r,a=Z1;function o(d){return l(),a.subscribe(d)}function n(){a.notify()}function i(){u.onStateChange&&u.onStateChange()}function s(){return!!r}function l(){r||(r=t?t.addNestedSub(i):e.subscribe(i),a=$R())}function c(){r&&(r(),r=void 0,a.clear(),a=Z1)}var u={addNestedSub:o,notifyNestedSubs:n,handleChangeWrapper:i,isSubscribed:s,trySubscribe:l,tryUnsubscribe:c,getListeners:function(){return a}};return u}var Sb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Q.useLayoutEffect:Q.useEffect;function e4(e){var t=e.store,r=e.context,a=e.children,o=Q.useMemo(function(){var s=X5(t);return{store:t,subscription:s}},[t]),n=Q.useMemo(function(){return t.getState()},[t]);Sb(function(){var s=o.subscription;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),n!==t.getState()&&s.notifyNestedSubs(),function(){s.tryUnsubscribe(),s.onStateChange=null}},[o,n]);var i=r||qi;return k.createElement(i.Provider,{value:o},a)}function Pc(e,t){if(e==null)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;r[a]=e[a]}return r}var Pv={exports:{}},Zt={};var Q1;function t4(){if(Q1)return Zt;Q1=1;var e=60103,t=60106,r=60107,a=60108,o=60114,n=60109,i=60110,s=60112,l=60113,c=60120,u=60115,d=60116,m=60121,b=60122,v=60117,g=60129,w=60131;if(typeof Symbol=="function"&&Symbol.for){var E=Symbol.for;e=E("react.element"),t=E("react.portal"),r=E("react.fragment"),a=E("react.strict_mode"),o=E("react.profiler"),n=E("react.provider"),i=E("react.context"),s=E("react.forward_ref"),l=E("react.suspense"),c=E("react.suspense_list"),u=E("react.memo"),d=E("react.lazy"),m=E("react.block"),b=E("react.server.block"),v=E("react.fundamental"),g=E("react.debug_trace_mode"),w=E("react.legacy_hidden")}function S(F){if(typeof F=="object"&&F!==null){var H=F.$$typeof;switch(H){case e:switch(F=F.type,F){case r:case o:case a:case l:case c:return F;default:switch(F=F&&F.$$typeof,F){case i:case s:case d:case u:case n:return F;default:return H}}case t:return H}}}var P=n,I=e,O=s,T=r,C=d,R=u,N=t,U=o,B=a,Y=l;return Zt.ContextConsumer=i,Zt.ContextProvider=P,Zt.Element=I,Zt.ForwardRef=O,Zt.Fragment=T,Zt.Lazy=C,Zt.Memo=R,Zt.Portal=N,Zt.Profiler=U,Zt.StrictMode=B,Zt.Suspense=Y,Zt.isAsyncMode=function(){return!1},Zt.isConcurrentMode=function(){return!1},Zt.isContextConsumer=function(F){return S(F)===i},Zt.isContextProvider=function(F){return S(F)===n},Zt.isElement=function(F){return typeof F=="object"&&F!==null&&F.$$typeof===e},Zt.isForwardRef=function(F){return S(F)===s},Zt.isFragment=function(F){return S(F)===r},Zt.isLazy=function(F){return S(F)===d},Zt.isMemo=function(F){return S(F)===u},Zt.isPortal=function(F){return S(F)===t},Zt.isProfiler=function(F){return S(F)===o},Zt.isStrictMode=function(F){return S(F)===a},Zt.isSuspense=function(F){return S(F)===l},Zt.isValidElementType=function(F){return typeof F=="string"||typeof F=="function"||F===r||F===o||F===g||F===a||F===l||F===c||F===w||typeof F=="object"&&F!==null&&(F.$$typeof===d||F.$$typeof===u||F.$$typeof===n||F.$$typeof===i||F.$$typeof===s||F.$$typeof===v||F.$$typeof===m||F[0]===b)},Zt.typeOf=S,Zt}var q1;function r4(){return q1||(q1=1,Pv.exports=t4()),Pv.exports}r4();function $1(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function bf(e,t){if($1(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(var o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(t,r[o])||!$1(e[r[o]],t[r[o]]))return!1;return!0}function J5(){var e=Q.useContext(qi);return e}function Z5(e){e===void 0&&(e=qi);var t=e===qi?J5:function(){return Q.useContext(e)};return function(){var a=t(),o=a.store;return o}}var Q5=Z5();function a4(e){e===void 0&&(e=qi);var t=e===qi?Q5:Z5(e);return function(){var a=t();return a.dispatch}}var Er=a4(),n4=function(t,r){return t===r};function o4(e,t,r,a){var o=Q.useReducer(function(v){return v+1},0),n=o[1],i=Q.useMemo(function(){return X5(r,a)},[r,a]),s=Q.useRef(),l=Q.useRef(),c=Q.useRef(),u=Q.useRef(),d=r.getState(),m;try{if(e!==l.current||d!==c.current||s.current){var b=e(d);u.current===void 0||!t(b,u.current)?m=b:m=u.current}else m=u.current}catch(v){throw s.current&&(v.message+=`
1
+ import{b as Yn,t as p6,_ as me,c as v6,d as m6,a as or}from"./slicedToArray-C6MrPRv_.js";import{v as k,r as Q,bd as n0,a8 as vt,sH as b6,rj as O1,sI as y6,sJ as k6,sK as w6,sL as hc,sM as sd,sN as yv,sb as Kf,sO as E6,ll as mt,sP as S6,q_ as o0,cm as _6,sQ as ye,sR as I1,sS as A5}from"../datalayer-app-main.js";import{r as C6}from"./index-jGGzfal6.js";import{_ as ta}from"./extends-CF3RwP-h.js";import{R as x6,b as P6,K as O6,s as of,d as ld,r as tr,D as I6,h as T6,e as Vs,W as zt,f as ya,g as T1,i as R1,j as df,k as R6,m as A6,a as D6,c as N6,l as M6,n as F6,o as D5,t as N5,p as L6,q as pb,u as U6,v as B6,w as M5,x as H6}from"./Middleware-BiLBmIq0.js";import{O as Yf}from"./ua-parser-BgekE870.js";function ii(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function zr(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function mr(e){zr(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Yn(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function z6(e,t){zr(2,arguments);var r=mr(e),a=ii(t);return isNaN(a)?new Date(NaN):(a&&r.setDate(r.getDate()+a),r)}function V6(e,t){zr(2,arguments);var r=mr(e),a=ii(t);if(isNaN(a))return new Date(NaN);if(!a)return r;var o=r.getDate(),n=new Date(r.getTime());n.setMonth(r.getMonth()+a+1,0);var i=n.getDate();return o>=i?n:(r.setFullYear(n.getFullYear(),n.getMonth(),o),r)}function cd(e,t){if(zr(2,arguments),!t||Yn(t)!=="object")return new Date(NaN);var r=t.years?ii(t.years):0,a=t.months?ii(t.months):0,o=t.weeks?ii(t.weeks):0,n=t.days?ii(t.days):0,i=t.hours?ii(t.hours):0,s=t.minutes?ii(t.minutes):0,l=t.seconds?ii(t.seconds):0,c=mr(e),u=a||r?V6(c,a+r*12):c,d=n||o?z6(u,n+o*7):u,m=s+i*60,b=l+m*60,v=b*1e3,g=new Date(d.getTime()+v);return g}function A1(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function D1(e){zr(1,arguments);var t=mr(e);return t.setHours(0,0,0,0),t}var W6=864e5;function j6(e,t){zr(2,arguments);var r=D1(e),a=D1(t),o=r.getTime()-A1(r),n=a.getTime()-A1(a);return Math.round((o-n)/W6)}function Mc(e,t){zr(2,arguments);var r=mr(e),a=mr(t),o=r.getTime()-a.getTime();return o<0?-1:o>0?1:o}var G6=6e4,K6=36e5;function Y6(e,t){zr(2,arguments);var r=mr(e),a=mr(t),o=r.getFullYear()-a.getFullYear(),n=r.getMonth()-a.getMonth();return o*12+n}function X6(e,t){zr(2,arguments);var r=mr(e),a=mr(t);return r.getFullYear()-a.getFullYear()}function N1(e,t){var r=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return r<0?-1:r>0?1:r}function J6(e,t){zr(2,arguments);var r=mr(e),a=mr(t),o=N1(r,a),n=Math.abs(j6(r,a));r.setDate(r.getDate()-o*n);var i=+(N1(r,a)===-o),s=o*(n-i);return s===0?0:s}function i0(e,t){return zr(2,arguments),mr(e).getTime()-mr(t).getTime()}var Z6={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Q6="trunc";function s0(e){return Z6[Q6]}function q6(e,t,r){zr(2,arguments);var a=i0(e,t)/K6;return s0()(a)}function $6(e,t,r){zr(2,arguments);var a=i0(e,t)/G6;return s0()(a)}function eR(e){zr(1,arguments);var t=mr(e);return t.setHours(23,59,59,999),t}function tR(e){zr(1,arguments);var t=mr(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function rR(e){zr(1,arguments);var t=mr(e);return eR(t).getTime()===tR(t).getTime()}function aR(e,t){zr(2,arguments);var r=mr(e),a=mr(t),o=Mc(r,a),n=Math.abs(Y6(r,a)),i;if(n<1)i=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-o*n);var s=Mc(r,a)===-o;rR(mr(e))&&n===1&&Mc(e,a)===1&&(s=!1),i=o*(n-Number(s))}return i===0?0:i}function nR(e,t,r){zr(2,arguments);var a=i0(e,t)/1e3;return s0()(a)}function oR(e,t){zr(2,arguments);var r=mr(e),a=mr(t),o=Mc(r,a),n=Math.abs(X6(r,a));r.setFullYear(1584),a.setFullYear(1584);var i=Mc(r,a)===-o,s=o*(n-Number(i));return s===0?0:s}function F5(e){zr(1,arguments);var t=mr(e.start),r=mr(e.end);if(isNaN(t.getTime()))throw new RangeError("Start Date is invalid");if(isNaN(r.getTime()))throw new RangeError("End Date is invalid");var a={};a.years=Math.abs(oR(r,t));var o=Mc(r,t),n=cd(t,{years:o*a.years});a.months=Math.abs(aR(r,n));var i=cd(n,{months:o*a.months});a.days=Math.abs(J6(r,i));var s=cd(i,{days:o*a.days});a.hours=Math.abs(q6(r,s));var l=cd(s,{hours:o*a.hours});a.minutes=Math.abs($6(r,l));var c=cd(l,{minutes:o*a.minutes});return a.seconds=Math.abs(nR(r,c)),a}function vb(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gc(e,t){return Gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Gc(e,t)}function l0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gc(e,t)}function Xn(e){return Xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xn(e)}function L5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(L5=function(){return!!e})()}function c0(e,t){if(t&&(Yn(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vb(e)}function ur(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M1(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,p6(a.key),a)}}function dr(e,t,r){return t&&M1(e.prototype,t),r&&M1(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wn(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map((function(o){return"'"+o+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Qi(e){return!!e&&!!e[vr]}function ci(e){var t;return!!e&&((function(r){if(!r||typeof r!="object")return!1;var a=Object.getPrototypeOf(r);if(a===null)return!0;var o=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;return o===Object||typeof o=="function"&&Function.toString.call(o)===fR})(e)||Array.isArray(e)||!!e[V1]||!!(!((t=e.constructor)===null||t===void 0)&&t[V1])||u0(e)||d0(e))}function ml(e,t,r){r===void 0&&(r=!1),qc(e)===0?(r?Object.keys:Lc)(e).forEach((function(a){r&&typeof a=="symbol"||t(a,e[a],e)})):e.forEach((function(a,o){return t(o,a,e)}))}function qc(e){var t=e[vr];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:u0(e)?2:d0(e)?3:0}function Fc(e,t){return qc(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function iR(e,t){return qc(e)===2?e.get(t):e[t]}function U5(e,t,r){var a=qc(e);a===2?e.set(t,r):a===3?e.add(r):e[t]=r}function B5(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function u0(e){return hR&&e instanceof Map}function d0(e){return gR&&e instanceof Set}function hl(e){return e.o||e.t}function h0(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=z5(e);delete t[vr];for(var r=Lc(t),a=0;a<r.length;a++){var o=r[a],n=t[o];n.writable===!1&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(t[o]={configurable:!0,writable:!0,enumerable:n.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function g0(e,t){return t===void 0&&(t=!1),f0(e)||Qi(e)||!ci(e)||(qc(e)>1&&(e.set=e.add=e.clear=e.delete=sR),Object.freeze(e),t&&ml(e,(function(r,a){return g0(a,!0)}),!0)),e}function sR(){Wn(2)}function f0(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Co(e){var t=kb[e];return t||Wn(18,e),t}function lR(e,t){kb[e]||(kb[e]=t)}function mb(){return Fh}function kv(e,t){t&&(Co("Patches"),e.u=[],e.s=[],e.v=t)}function hf(e){bb(e),e.p.forEach(cR),e.p=null}function bb(e){e===Fh&&(Fh=e.l)}function F1(e){return Fh={p:[],l:Fh,h:e,m:!0,_:0}}function cR(e){var t=e[vr];t.i===0||t.i===1?t.j():t.g=!0}function wv(e,t){t._=t.p.length;var r=t.p[0],a=e!==void 0&&e!==r;return t.h.O||Co("ES5").S(t,e,a),a?(r[vr].P&&(hf(t),Wn(4)),ci(e)&&(e=gf(t,e),t.l||ff(t,e)),t.u&&Co("Patches").M(r[vr].t,e,t.u,t.s)):e=gf(t,r,[]),hf(t),t.u&&t.v(t.u,t.s),e!==H5?e:void 0}function gf(e,t,r){if(f0(t))return t;var a=t[vr];if(!a)return ml(t,(function(s,l){return L1(e,a,t,s,l,r)}),!0),t;if(a.A!==e)return t;if(!a.P)return ff(e,a.t,!0),a.t;if(!a.I){a.I=!0,a.A._--;var o=a.i===4||a.i===5?a.o=h0(a.k):a.o,n=o,i=!1;a.i===3&&(n=new Set(o),o.clear(),i=!0),ml(n,(function(s,l){return L1(e,a,o,s,l,r,i)})),ff(e,o,!1),r&&e.u&&Co("Patches").N(a,r,e.u,e.s)}return a.o}function L1(e,t,r,a,o,n,i){if(Qi(o)){var s=gf(e,o,n&&t&&t.i!==3&&!Fc(t.R,a)?n.concat(a):void 0);if(U5(r,a,s),!Qi(s))return;e.m=!1}else i&&r.add(o);if(ci(o)&&!f0(o)){if(!e.h.D&&e._<1)return;gf(e,o),t&&t.A.l||ff(e,o)}}function ff(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&g0(t,r)}function Ev(e,t){var r=e[vr];return(r?hl(r):e)[t]}function U1(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var a=Object.getOwnPropertyDescriptor(r,t);if(a)return a;r=Object.getPrototypeOf(r)}}function Ki(e){e.P||(e.P=!0,e.l&&Ki(e.l))}function Sv(e){e.o||(e.o=h0(e.t))}function yb(e,t,r){var a=u0(t)?Co("MapSet").F(t,r):d0(t)?Co("MapSet").T(t,r):e.O?(function(o,n){var i=Array.isArray(o),s={i:i?1:0,A:n?n.A:mb(),P:!1,I:!1,R:{},l:n,t:o,k:null,o:null,j:null,C:!1},l=s,c=Lh;i&&(l=[s],c=yh);var u=Proxy.revocable(l,c),d=u.revoke,m=u.proxy;return s.k=m,s.j=d,m})(t,r):Co("ES5").J(t,r);return(r?r.A:mb()).p.push(a),a}function uR(e){return Qi(e)||Wn(22,e),(function t(r){if(!ci(r))return r;var a,o=r[vr],n=qc(r);if(o){if(!o.P&&(o.i<4||!Co("ES5").K(o)))return o.t;o.I=!0,a=B1(r,n),o.I=!1}else a=B1(r,n);return ml(a,(function(i,s){o&&iR(o.t,i)===s||U5(a,i,t(s))})),n===3?new Set(a):a})(e)}function B1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return h0(e)}function dR(){function e(n,i){var s=o[n];return s?s.enumerable=i:o[n]=s={configurable:!0,enumerable:i,get:function(){var l=this[vr];return Lh.get(l,n)},set:function(l){var c=this[vr];Lh.set(c,n,l)}},s}function t(n){for(var i=n.length-1;i>=0;i--){var s=n[i][vr];if(!s.P)switch(s.i){case 5:a(s)&&Ki(s);break;case 4:r(s)&&Ki(s)}}}function r(n){for(var i=n.t,s=n.k,l=Lc(s),c=l.length-1;c>=0;c--){var u=l[c];if(u!==vr){var d=i[u];if(d===void 0&&!Fc(i,u))return!0;var m=s[u],b=m&&m[vr];if(b?b.t!==d:!B5(m,d))return!0}}var v=!!i[vr];return l.length!==Lc(i).length+(v?0:1)}function a(n){var i=n.k;if(i.length!==n.t.length)return!0;var s=Object.getOwnPropertyDescriptor(i,i.length-1);if(s&&!s.get)return!0;for(var l=0;l<i.length;l++)if(!i.hasOwnProperty(l))return!0;return!1}var o={};lR("ES5",{J:function(n,i){var s=Array.isArray(n),l=(function(u,d){if(u){for(var m=Array(d.length),b=0;b<d.length;b++)Object.defineProperty(m,""+b,e(b,!0));return m}var v=z5(d);delete v[vr];for(var g=Lc(v),w=0;w<g.length;w++){var E=g[w];v[E]=e(E,u||!!v[E].enumerable)}return Object.create(Object.getPrototypeOf(d),v)})(s,n),c={i:s?5:4,A:i?i.A:mb(),P:!1,I:!1,R:{},l:i,t:n,k:l,o:null,g:!1,C:!1};return Object.defineProperty(l,vr,{value:c,writable:!0}),l},S:function(n,i,s){s?Qi(i)&&i[vr].A===n&&t(n.p):(n.u&&(function l(c){if(c&&typeof c=="object"){var u=c[vr];if(u){var d=u.t,m=u.k,b=u.R,v=u.i;if(v===4)ml(m,(function(P){P!==vr&&(d[P]!==void 0||Fc(d,P)?b[P]||l(m[P]):(b[P]=!0,Ki(u)))})),ml(d,(function(P){m[P]!==void 0||Fc(m,P)||(b[P]=!1,Ki(u))}));else if(v===5){if(a(u)&&(Ki(u),b.length=!0),m.length<d.length)for(var g=m.length;g<d.length;g++)b[g]=!1;else for(var w=d.length;w<m.length;w++)b[w]=!0;for(var E=Math.min(m.length,d.length),S=0;S<E;S++)m.hasOwnProperty(S)||(b[S]=!0),b[S]===void 0&&l(m[S])}}}})(n.p[0]),t(n.p))},K:function(n){return n.i===4?r(n):a(n)}})}var H1,Fh,p0=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",hR=typeof Map<"u",gR=typeof Set<"u",z1=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",H5=p0?Symbol.for("immer-nothing"):((H1={})["immer-nothing"]=!0,H1),V1=p0?Symbol.for("immer-draftable"):"__$immer_draftable",vr=p0?Symbol.for("immer-state"):"__$immer_state",fR=""+Object.prototype.constructor,Lc=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,z5=Object.getOwnPropertyDescriptors||function(e){var t={};return Lc(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},kb={},Lh={get:function(e,t){if(t===vr)return e;var r=hl(e);if(!Fc(r,t))return(function(o,n,i){var s,l=U1(n,i);return l?"value"in l?l.value:(s=l.get)===null||s===void 0?void 0:s.call(o.k):void 0})(e,r,t);var a=r[t];return e.I||!ci(a)?a:a===Ev(e.t,t)?(Sv(e),e.o[t]=yb(e.A.h,a,e)):a},has:function(e,t){return t in hl(e)},ownKeys:function(e){return Reflect.ownKeys(hl(e))},set:function(e,t,r){var a=U1(hl(e),t);if(a?.set)return a.set.call(e.k,r),!0;if(!e.P){var o=Ev(hl(e),t),n=o?.[vr];if(n&&n.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(B5(r,o)&&(r!==void 0||Fc(e.t,t)))return!0;Sv(e),Ki(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return Ev(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Sv(e),Ki(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=hl(e),a=Reflect.getOwnPropertyDescriptor(r,t);return a&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:a.enumerable,value:r[t]}},defineProperty:function(){Wn(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Wn(12)}},yh={};ml(Lh,(function(e,t){yh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),yh.deleteProperty=function(e,t){return yh.set.call(this,e,t,void 0)},yh.set=function(e,t,r){return Lh.set.call(this,e[0],t,r,e[0])};var pR=(function(){function e(r){var a=this;this.O=z1,this.D=!0,this.produce=function(o,n,i){if(typeof o=="function"&&typeof n!="function"){var s=n;n=o;var l=a;return function(g){var w=this;g===void 0&&(g=s);for(var E=arguments.length,S=Array(E>1?E-1:0),P=1;P<E;P++)S[P-1]=arguments[P];return l.produce(g,(function(I){var O;return(O=n).call.apply(O,[w,I].concat(S))}))}}var c;if(typeof n!="function"&&Wn(6),i!==void 0&&typeof i!="function"&&Wn(7),ci(o)){var u=F1(a),d=yb(a,o,void 0),m=!0;try{c=n(d),m=!1}finally{m?hf(u):bb(u)}return typeof Promise<"u"&&c instanceof Promise?c.then((function(g){return kv(u,i),wv(g,u)}),(function(g){throw hf(u),g})):(kv(u,i),wv(c,u))}if(!o||typeof o!="object"){if((c=n(o))===void 0&&(c=o),c===H5&&(c=void 0),a.D&&g0(c,!0),i){var b=[],v=[];Co("Patches").M(o,c,b,v),i(b,v)}return c}Wn(21,o)},this.produceWithPatches=function(o,n){if(typeof o=="function")return function(c){for(var u=arguments.length,d=Array(u>1?u-1:0),m=1;m<u;m++)d[m-1]=arguments[m];return a.produceWithPatches(c,(function(b){return o.apply(void 0,[b].concat(d))}))};var i,s,l=a.produce(o,n,(function(c,u){i=c,s=u}));return typeof Promise<"u"&&l instanceof Promise?l.then((function(c){return[c,i,s]})):[l,i,s]},typeof r?.useProxies=="boolean"&&this.setUseProxies(r.useProxies),typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){ci(r)||Wn(8),Qi(r)&&(r=uR(r));var a=F1(this),o=yb(this,r,void 0);return o[vr].C=!0,bb(a),o},t.finishDraft=function(r,a){var o=r&&r[vr],n=o.A;return kv(n,a),wv(void 0,n)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!z1&&Wn(20),this.O=r},t.applyPatches=function(r,a){var o;for(o=a.length-1;o>=0;o--){var n=a[o];if(n.path.length===0&&n.op==="replace"){r=n.value;break}}o>-1&&(a=a.slice(o+1));var i=Co("Patches").$;return Qi(r)?i(r,a):this.produce(r,(function(s){return i(s,a)}))},e})(),sn=new pR,V5=sn.produce;sn.produceWithPatches.bind(sn);sn.setAutoFreeze.bind(sn);sn.setUseProxies.bind(sn);sn.applyPatches.bind(sn);sn.createDraft.bind(sn);sn.finishDraft.bind(sn);function W1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,a)}return r}function j1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?W1(Object(r),!0).forEach(function(a){me(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W1(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function ka(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var G1=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),_v=function(){return Math.random().toString(36).substring(7).split("").join(".")},pf={INIT:"@@redux/INIT"+_v(),REPLACE:"@@redux/REPLACE"+_v(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+_v()}};function vR(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function W5(e,t,r){var a;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ka(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ka(1));return r(W5)(e,t)}if(typeof e!="function")throw new Error(ka(2));var o=e,n=t,i=[],s=i,l=!1;function c(){s===i&&(s=i.slice())}function u(){if(l)throw new Error(ka(3));return n}function d(g){if(typeof g!="function")throw new Error(ka(4));if(l)throw new Error(ka(5));var w=!0;return c(),s.push(g),function(){if(w){if(l)throw new Error(ka(6));w=!1,c();var S=s.indexOf(g);s.splice(S,1),i=null}}}function m(g){if(!vR(g))throw new Error(ka(7));if(typeof g.type>"u")throw new Error(ka(8));if(l)throw new Error(ka(9));try{l=!0,n=o(n,g)}finally{l=!1}for(var w=i=s,E=0;E<w.length;E++){var S=w[E];S()}return g}function b(g){if(typeof g!="function")throw new Error(ka(10));o=g,m({type:pf.REPLACE})}function v(){var g,w=d;return g={subscribe:function(S){if(typeof S!="object"||S===null)throw new Error(ka(11));function P(){S.next&&S.next(u())}P();var I=w(P);return{unsubscribe:I}}},g[G1]=function(){return this},g}return m({type:pf.INIT}),a={dispatch:m,subscribe:d,getState:u,replaceReducer:b},a[G1]=v,a}function mR(e){Object.keys(e).forEach(function(t){var r=e[t],a=r(void 0,{type:pf.INIT});if(typeof a>"u")throw new Error(ka(12));if(typeof r(void 0,{type:pf.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ka(13))})}function v0(e){for(var t=Object.keys(e),r={},a=0;a<t.length;a++){var o=t[a];typeof e[o]=="function"&&(r[o]=e[o])}var n=Object.keys(r),i;try{mR(r)}catch(s){i=s}return function(l,c){if(l===void 0&&(l={}),i)throw i;for(var u=!1,d={},m=0;m<n.length;m++){var b=n[m],v=r[b],g=l[b],w=v(g,c);if(typeof w>"u")throw c&&c.type,new Error(ka(14));d[b]=w,u=u||w!==g}return u=u||n.length!==Object.keys(l).length,u?d:l}}function vf(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.length===0?function(a){return a}:t.length===1?t[0]:t.reduce(function(a,o){return function(){return a(o.apply(void 0,arguments))}})}function bR(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(a){return function(){var o=a.apply(void 0,arguments),n=function(){throw new Error(ka(15))},i={getState:o.getState,dispatch:function(){return n.apply(void 0,arguments)}},s=t.map(function(l){return l(i)});return n=vf.apply(void 0,s)(o.dispatch),j1(j1({},o),{},{dispatch:n})}}}var mf="NOT_FOUND";function yR(e){var t;return{get:function(a){return t&&e(t.key,a)?t.value:mf},put:function(a,o){t={key:a,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function kR(e,t){var r=[];function a(s){var l=r.findIndex(function(u){return t(s,u.key)});if(l>-1){var c=r[l];return l>0&&(r.splice(l,1),r.unshift(c)),c.value}return mf}function o(s,l){a(s)===mf&&(r.unshift({key:s,value:l}),r.length>e&&r.pop())}function n(){return r}function i(){r=[]}return{get:a,put:o,getEntries:n,clear:i}}var wR=function(t,r){return t===r};function ER(e){return function(r,a){if(r===null||a===null||r.length!==a.length)return!1;for(var o=r.length,n=0;n<o;n++)if(!e(r[n],a[n]))return!1;return!0}}function SR(e,t){var r=typeof t=="object"?t:{equalityCheck:t},a=r.equalityCheck,o=a===void 0?wR:a,n=r.maxSize,i=n===void 0?1:n,s=r.resultEqualityCheck,l=ER(o),c=i===1?yR(l):kR(i,l);function u(){var d=c.get(arguments);if(d===mf){if(d=e.apply(null,arguments),s){var m=c.getEntries(),b=m.find(function(v){return s(v.value,d)});b&&(d=b.value)}c.put(arguments,d)}return d}return u.clearCache=function(){return c.clear()},u}function _R(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(a){return typeof a=="function"})){var r=t.map(function(a){return typeof a=="function"?"function "+(a.name||"unnamed")+"()":typeof a}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}function CR(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];var o=function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];var c=0,u,d={memoizeOptions:void 0},m=s.pop();if(typeof m=="object"&&(d=m,m=s.pop()),typeof m!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof m+"]");var b=d,v=b.memoizeOptions,g=v===void 0?r:v,w=Array.isArray(g)?g:[g],E=_R(s),S=e.apply(void 0,[function(){return c++,m.apply(null,arguments)}].concat(w)),P=e(function(){for(var O=[],T=E.length,C=0;C<T;C++)O.push(E[C].apply(null,arguments));return u=S.apply(null,O),u});return Object.assign(P,{resultFunc:m,memoizedResultFunc:S,dependencies:E,lastResult:function(){return u},recomputations:function(){return c},resetRecomputations:function(){return c=0}}),P};return o}var xe=CR(SR);function j5(e){var t=function(a){var o=a.dispatch,n=a.getState;return function(i){return function(s){return typeof s=="function"?s(o,n,e):i(s)}}};return t}var wb=j5();wb.withExtraArgument=j5;var G5=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(a[n]=o[n])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function a(){this.constructor=t}t.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}})(),xR=function(e,t){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},a,o,n,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(u){return l([c,u])}}function l(c){if(a)throw new TypeError("Generator is already executing.");for(;r;)try{if(a=1,o&&(n=c[0]&2?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[c[0]&2,n.value]),c[0]){case 0:case 1:n=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(n=r.trys,!(n=n.length>0&&n[n.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!n||c[1]>n[0]&&c[1]<n[3])){r.label=c[1];break}if(c[0]===6&&r.label<n[1]){r.label=n[1],n=c;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(c);break}n[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(u){c=[6,u],o=0}finally{a=n=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Kc=function(e,t){for(var r=0,a=t.length,o=e.length;r<a;r++,o++)e[o]=t[r];return e},PR=Object.defineProperty,OR=Object.defineProperties,IR=Object.getOwnPropertyDescriptors,K1=Object.getOwnPropertySymbols,TR=Object.prototype.hasOwnProperty,RR=Object.prototype.propertyIsEnumerable,Y1=function(e,t,r){return t in e?PR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Xi=function(e,t){for(var r in t||(t={}))TR.call(t,r)&&Y1(e,r,t[r]);if(K1)for(var a=0,o=K1(t);a<o.length;a++){var r=o[a];RR.call(t,r)&&Y1(e,r,t[r])}return e},Cv=function(e,t){return OR(e,IR(t))},AR=function(e,t,r){return new Promise(function(a,o){var n=function(l){try{s(r.next(l))}catch(c){o(c)}},i=function(l){try{s(r.throw(l))}catch(c){o(c)}},s=function(l){return l.done?a(l.value):Promise.resolve(l.value).then(n,i)};s((r=r.apply(e,t)).next())})},DR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?vf:vf.apply(null,arguments)};function NR(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return t===r}function na(e,t){function r(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];if(t){var n=t.apply(void 0,a);if(!n)throw new Error("prepareAction did not return an object");return Xi(Xi({type:e,payload:n.payload},"meta"in n&&{meta:n.meta}),"error"in n&&{error:n.error})}return{type:e,payload:a[0]}}return r.toString=function(){return""+e},r.type=e,r.match=function(a){return a.type===e},r}var MR=(function(e){G5(t,e);function t(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var o=e.apply(this,r)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Kc([void 0],r[0].concat(this)))):new(t.bind.apply(t,Kc([void 0],r.concat(this))))},t})(Array),FR=(function(e){G5(t,e);function t(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];var o=e.apply(this,r)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return e.prototype.concat.apply(this,r)},t.prototype.prepend=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return r.length===1&&Array.isArray(r[0])?new(t.bind.apply(t,Kc([void 0],r[0].concat(this)))):new(t.bind.apply(t,Kc([void 0],r.concat(this))))},t})(Array);function Eb(e){return ci(e)?V5(e,function(){}):e}function LR(e){return typeof e=="boolean"}function UR(){return function(t){return BR(t)}}function BR(e){e===void 0&&(e={});var t=e.thunk,r=t===void 0?!0:t;e.immutableCheck,e.serializableCheck,e.actionCreatorCheck;var a=new MR;return r&&(LR(r)?a.push(wb):a.push(wb.withExtraArgument(r.extraArgument))),a}function HR(e){var t=UR(),r=e||{},a=r.reducer,o=a===void 0?void 0:a,n=r.middleware,i=n===void 0?t():n,s=r.devTools,l=s===void 0?!0:s,c=r.preloadedState,u=c===void 0?void 0:c,d=r.enhancers,m=d===void 0?void 0:d,b;if(typeof o=="function")b=o;else if(NR(o))b=v0(o);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var v=i;typeof v=="function"&&(v=v(t));var g=bR.apply(void 0,v),w=vf;l&&(w=DR(Xi({trace:!1},typeof l=="object"&&l)));var E=new FR(g),S=E;Array.isArray(m)?S=Kc([g],m):typeof m=="function"&&(S=m(E));var P=w.apply(void 0,S);return W5(b,u,P)}function K5(e){var t={},r=[],a,o={addCase:function(n,i){var s=typeof n=="string"?n:n.type;if(!s)throw new Error("`builder.addCase` cannot be called with an empty action type");if(s in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[s]=i,o},addMatcher:function(n,i){return r.push({matcher:n,reducer:i}),o},addDefaultCase:function(n){return a=n,o}};return e(o),[t,r,a]}function zR(e){return typeof e=="function"}function VR(e,t,r,a){r===void 0&&(r=[]);var o=typeof t=="function"?K5(t):[t,r,a],n=o[0],i=o[1],s=o[2],l;if(zR(e))l=function(){return Eb(e())};else{var c=Eb(e);l=function(){return c}}function u(d,m){d===void 0&&(d=l());var b=Kc([n[m.type]],i.filter(function(v){var g=v.matcher;return g(m)}).map(function(v){var g=v.reducer;return g}));return b.filter(function(v){return!!v}).length===0&&(b=[s]),b.reduce(function(v,g){if(g)if(Qi(v)){var w=v,E=g(w,m);return E===void 0?v:E}else{if(ci(v))return V5(v,function(S){return g(S,m)});var E=g(v,m);if(E===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}return v},d)}return u.getInitialState=l,u}function WR(e,t){return e+"/"+t}function At(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var r=typeof e.initialState=="function"?e.initialState:Eb(e.initialState),a=e.reducers||{},o=Object.keys(a),n={},i={},s={};o.forEach(function(u){var d=a[u],m=WR(t,u),b,v;"reducer"in d?(b=d.reducer,v=d.prepare):b=d,n[u]=b,i[m]=b,s[u]=v?na(m,v):na(m)});function l(){var u=typeof e.extraReducers=="function"?K5(e.extraReducers):[e.extraReducers],d=u[0],m=d===void 0?{}:d,b=u[1],v=b===void 0?[]:b,g=u[2],w=g===void 0?void 0:g,E=Xi(Xi({},m),i);return VR(r,function(S){for(var P in E)S.addCase(P,E[P]);for(var I=0,O=v;I<O.length;I++){var T=O[I];S.addMatcher(T.matcher,T.reducer)}w&&S.addDefaultCase(w)})}var c;return{name:t,reducer:function(u,d){return c||(c=l()),c(u,d)},actions:s,caseReducers:n,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var jR="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",GR=function(e){e===void 0&&(e=21);for(var t="",r=e;r--;)t+=jR[Math.random()*64|0];return t},KR=["name","message","stack","code"],xv=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),X1=(function(){function e(t,r){this.payload=t,this.meta=r}return e})(),YR=function(e){if(typeof e=="object"&&e!==null){for(var t={},r=0,a=KR;r<a.length;r++){var o=a[r];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}};(function(){function e(t,r,a){var o=na(t+"/fulfilled",function(c,u,d,m){return{payload:c,meta:Cv(Xi({},m||{}),{arg:d,requestId:u,requestStatus:"fulfilled"})}}),n=na(t+"/pending",function(c,u,d){return{payload:void 0,meta:Cv(Xi({},d||{}),{arg:u,requestId:c,requestStatus:"pending"})}}),i=na(t+"/rejected",function(c,u,d,m,b){return{payload:m,error:(a&&a.serializeError||YR)(c||"Rejected"),meta:Cv(Xi({},b||{}),{arg:d,requestId:u,rejectedWithValue:!!m,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"})}}),s=typeof AbortController<"u"?AbortController:(function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c})();function l(c){return function(u,d,m){var b=a?.idGenerator?a.idGenerator(c):GR(),v=new s,g;function w(S){g=S,v.abort()}var E=(function(){return AR(this,null,function(){var S,P,I,O,T,C,R;return xR(this,function(N){switch(N.label){case 0:return N.trys.push([0,4,,5]),O=(S=a?.condition)==null?void 0:S.call(a,c,{getState:d,extra:m}),JR(O)?[4,O]:[3,2];case 1:O=N.sent(),N.label=2;case 2:if(O===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return T=new Promise(function(U,B){return v.signal.addEventListener("abort",function(){return B({name:"AbortError",message:g||"Aborted"})})}),u(n(b,c,(P=a?.getPendingMeta)==null?void 0:P.call(a,{requestId:b,arg:c},{getState:d,extra:m}))),[4,Promise.race([T,Promise.resolve(r(c,{dispatch:u,getState:d,extra:m,requestId:b,signal:v.signal,abort:w,rejectWithValue:function(U,B){return new xv(U,B)},fulfillWithValue:function(U,B){return new X1(U,B)}})).then(function(U){if(U instanceof xv)throw U;return U instanceof X1?o(U.payload,b,c,U.meta):o(U,b,c)})])];case 3:return I=N.sent(),[3,5];case 4:return C=N.sent(),I=C instanceof xv?i(null,b,c,C.payload,C.meta):i(C,b,c),[3,5];case 5:return R=a&&!a.dispatchConditionRejection&&i.match(I)&&I.meta.condition,R||u(I),[2,I]}})})})();return Object.assign(E,{abort:w,requestId:b,arg:c,unwrap:function(){return E.then(XR)}})}}return Object.assign(l,{pending:n,rejected:i,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e})();function XR(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function JR(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var m0="listenerMiddleware";na(m0+"/add");na(m0+"/removeAll");na(m0+"/remove");var J1;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window<"u"?window:globalThis);dR();var qi=k.createContext(null);function ZR(e){e()}var Y5=ZR,QR=function(t){return Y5=t},qR=function(){return Y5};function $R(){var e=qR(),t=null,r=null;return{clear:function(){t=null,r=null},notify:function(){e(function(){for(var o=t;o;)o.callback(),o=o.next})},get:function(){for(var o=[],n=t;n;)o.push(n),n=n.next;return o},subscribe:function(o){var n=!0,i=r={callback:o,next:null,prev:r};return i.prev?i.prev.next=i:t=i,function(){!n||t===null||(n=!1,i.next?i.next.prev=i.prev:r=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var Z1={notify:function(){},get:function(){return[]}};function X5(e,t){var r,a=Z1;function o(d){return l(),a.subscribe(d)}function n(){a.notify()}function i(){u.onStateChange&&u.onStateChange()}function s(){return!!r}function l(){r||(r=t?t.addNestedSub(i):e.subscribe(i),a=$R())}function c(){r&&(r(),r=void 0,a.clear(),a=Z1)}var u={addNestedSub:o,notifyNestedSubs:n,handleChangeWrapper:i,isSubscribed:s,trySubscribe:l,tryUnsubscribe:c,getListeners:function(){return a}};return u}var Sb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Q.useLayoutEffect:Q.useEffect;function e4(e){var t=e.store,r=e.context,a=e.children,o=Q.useMemo(function(){var s=X5(t);return{store:t,subscription:s}},[t]),n=Q.useMemo(function(){return t.getState()},[t]);Sb(function(){var s=o.subscription;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),n!==t.getState()&&s.notifyNestedSubs(),function(){s.tryUnsubscribe(),s.onStateChange=null}},[o,n]);var i=r||qi;return k.createElement(i.Provider,{value:o},a)}function Pc(e,t){if(e==null)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;r[a]=e[a]}return r}var Pv={exports:{}},Zt={};var Q1;function t4(){if(Q1)return Zt;Q1=1;var e=60103,t=60106,r=60107,a=60108,o=60114,n=60109,i=60110,s=60112,l=60113,c=60120,u=60115,d=60116,m=60121,b=60122,v=60117,g=60129,w=60131;if(typeof Symbol=="function"&&Symbol.for){var E=Symbol.for;e=E("react.element"),t=E("react.portal"),r=E("react.fragment"),a=E("react.strict_mode"),o=E("react.profiler"),n=E("react.provider"),i=E("react.context"),s=E("react.forward_ref"),l=E("react.suspense"),c=E("react.suspense_list"),u=E("react.memo"),d=E("react.lazy"),m=E("react.block"),b=E("react.server.block"),v=E("react.fundamental"),g=E("react.debug_trace_mode"),w=E("react.legacy_hidden")}function S(F){if(typeof F=="object"&&F!==null){var H=F.$$typeof;switch(H){case e:switch(F=F.type,F){case r:case o:case a:case l:case c:return F;default:switch(F=F&&F.$$typeof,F){case i:case s:case d:case u:case n:return F;default:return H}}case t:return H}}}var P=n,I=e,O=s,T=r,C=d,R=u,N=t,U=o,B=a,Y=l;return Zt.ContextConsumer=i,Zt.ContextProvider=P,Zt.Element=I,Zt.ForwardRef=O,Zt.Fragment=T,Zt.Lazy=C,Zt.Memo=R,Zt.Portal=N,Zt.Profiler=U,Zt.StrictMode=B,Zt.Suspense=Y,Zt.isAsyncMode=function(){return!1},Zt.isConcurrentMode=function(){return!1},Zt.isContextConsumer=function(F){return S(F)===i},Zt.isContextProvider=function(F){return S(F)===n},Zt.isElement=function(F){return typeof F=="object"&&F!==null&&F.$$typeof===e},Zt.isForwardRef=function(F){return S(F)===s},Zt.isFragment=function(F){return S(F)===r},Zt.isLazy=function(F){return S(F)===d},Zt.isMemo=function(F){return S(F)===u},Zt.isPortal=function(F){return S(F)===t},Zt.isProfiler=function(F){return S(F)===o},Zt.isStrictMode=function(F){return S(F)===a},Zt.isSuspense=function(F){return S(F)===l},Zt.isValidElementType=function(F){return typeof F=="string"||typeof F=="function"||F===r||F===o||F===g||F===a||F===l||F===c||F===w||typeof F=="object"&&F!==null&&(F.$$typeof===d||F.$$typeof===u||F.$$typeof===n||F.$$typeof===i||F.$$typeof===s||F.$$typeof===v||F.$$typeof===m||F[0]===b)},Zt.typeOf=S,Zt}var q1;function r4(){return q1||(q1=1,Pv.exports=t4()),Pv.exports}r4();function $1(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function bf(e,t){if($1(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(var o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(t,r[o])||!$1(e[r[o]],t[r[o]]))return!1;return!0}function J5(){var e=Q.useContext(qi);return e}function Z5(e){e===void 0&&(e=qi);var t=e===qi?J5:function(){return Q.useContext(e)};return function(){var a=t(),o=a.store;return o}}var Q5=Z5();function a4(e){e===void 0&&(e=qi);var t=e===qi?Q5:Z5(e);return function(){var a=t();return a.dispatch}}var Er=a4(),n4=function(t,r){return t===r};function o4(e,t,r,a){var o=Q.useReducer(function(v){return v+1},0),n=o[1],i=Q.useMemo(function(){return X5(r,a)},[r,a]),s=Q.useRef(),l=Q.useRef(),c=Q.useRef(),u=Q.useRef(),d=r.getState(),m;try{if(e!==l.current||d!==c.current||s.current){var b=e(d);u.current===void 0||!t(b,u.current)?m=b:m=u.current}else m=u.current}catch(v){throw s.current&&(v.message+=`
2
2
  The error may be correlated with this previous error:
3
3
  `+s.current.stack+`
4
4
 
@@ -1 +1 @@
1
- import{ac as u,ak as _,bX as g,ag as c,bY as p,J as d,an as C}from"../datalayer-app-main.js";const y=new u("@jupyterlab/property-inspector:IPropertyInspectorProvider","A service to register new widgets in the property inspector side panel.");class w extends c{constructor(){super(),this._tracker=new p,this._inspectors=new Map,this.addClass("jp-PropertyInspector"),this._tracker=new p,this._tracker.currentChanged.connect(this._onCurrentChanged,this)}register(t){if(this._inspectors.has(t))throw new Error("Widget is already registered");const e=new i.PropertyInspector(t);return t.disposed.connect(this._onWidgetDisposed,this),this._inspectors.set(t,e),e.onAction.connect(this._onInspectorAction,this),this._tracker.add(t),e}get currentWidget(){return this._tracker.currentWidget}refresh(){const t=this._tracker.currentWidget;if(!t){this.setContent(null);return}const e=this._inspectors.get(t);e&&this.setContent(e.content)}_onWidgetDisposed(t){const e=this._inspectors.get(t);e&&(e.dispose(),this._inspectors.delete(t))}_onInspectorAction(t,e){const s=t.owner,n=this._tracker.currentWidget;switch(e){case"content":n===s&&this.setContent(t.content);break;case"dispose":s&&(this._tracker.remove(s),this._inspectors.delete(s));break;case"show-panel":n===s&&this.showPanel();break;default:throw new Error("Unsupported inspector action")}}_onCurrentChanged(){const t=this._tracker.currentWidget;if(t){const s=this._inspectors.get(t).content;this.setContent(s)}else this.setContent(null)}}class P extends w{constructor({shell:t,placeholder:e,translator:s}){super(),this._labshell=t,this.translator=s||_,this._trans=this.translator.load("jupyterlab");const n=this.layout=new g;if(e)this._placeholder=e;else{const a=document.createElement("div"),r=document.createElement("div"),h=document.createElement("h3"),l=document.createElement("p");h.textContent=this._trans.__("No Properties"),l.textContent=this._trans.__("The property inspector allows to view and edit properties of a selected notebook."),r.className="jp-PropertyInspector-placeholderContent",r.appendChild(h),r.appendChild(l),a.appendChild(r),this._placeholder=new c({node:a}),this._placeholder.addClass("jp-PropertyInspector-placeholder")}n.widget=this._placeholder,this._labshell.currentChanged.connect(this._onShellCurrentChanged,this),this._onShellCurrentChanged()}setContent(t){const e=this.layout;e.widget&&(e.widget.removeClass("jp-PropertyInspector-content"),e.removeWidget(e.widget)),t||(t=this._placeholder),t.addClass("jp-PropertyInspector-content"),e.widget=t}showPanel(){this._labshell.activateById(this.id)}_onShellCurrentChanged(){const t=this.currentWidget;if(!t){this.setContent(null);return}const e=this._labshell.currentWidget;e?.node.contains(t.node)?this.refresh():this.setContent(null)}}var i;(function(o){class t{constructor(s){this._isDisposed=!1,this._content=null,this._owner=null,this._onAction=new d(this),this._owner=s}get owner(){return this._owner}get content(){return this._content}get isDisposed(){return this._isDisposed}get onAction(){return this._onAction}showPanel(){this._isDisposed||this._onAction.emit("show-panel")}render(s){this._isDisposed||(s instanceof c?this._content=s:this._content=C.create(s),this._onAction.emit("content"))}dispose(){this._isDisposed||(this._isDisposed=!0,this._content=null,this._owner=null,d.clearData(this))}}o.PropertyInspector=t})(i||(i={}));export{y as I,P as S};
1
+ import{ac as u,ak as _,bY as g,ag as c,bZ as p,J as d,an as C}from"../datalayer-app-main.js";const y=new u("@jupyterlab/property-inspector:IPropertyInspectorProvider","A service to register new widgets in the property inspector side panel.");class w extends c{constructor(){super(),this._tracker=new p,this._inspectors=new Map,this.addClass("jp-PropertyInspector"),this._tracker=new p,this._tracker.currentChanged.connect(this._onCurrentChanged,this)}register(t){if(this._inspectors.has(t))throw new Error("Widget is already registered");const e=new i.PropertyInspector(t);return t.disposed.connect(this._onWidgetDisposed,this),this._inspectors.set(t,e),e.onAction.connect(this._onInspectorAction,this),this._tracker.add(t),e}get currentWidget(){return this._tracker.currentWidget}refresh(){const t=this._tracker.currentWidget;if(!t){this.setContent(null);return}const e=this._inspectors.get(t);e&&this.setContent(e.content)}_onWidgetDisposed(t){const e=this._inspectors.get(t);e&&(e.dispose(),this._inspectors.delete(t))}_onInspectorAction(t,e){const s=t.owner,n=this._tracker.currentWidget;switch(e){case"content":n===s&&this.setContent(t.content);break;case"dispose":s&&(this._tracker.remove(s),this._inspectors.delete(s));break;case"show-panel":n===s&&this.showPanel();break;default:throw new Error("Unsupported inspector action")}}_onCurrentChanged(){const t=this._tracker.currentWidget;if(t){const s=this._inspectors.get(t).content;this.setContent(s)}else this.setContent(null)}}class P extends w{constructor({shell:t,placeholder:e,translator:s}){super(),this._labshell=t,this.translator=s||_,this._trans=this.translator.load("jupyterlab");const n=this.layout=new g;if(e)this._placeholder=e;else{const a=document.createElement("div"),r=document.createElement("div"),h=document.createElement("h3"),l=document.createElement("p");h.textContent=this._trans.__("No Properties"),l.textContent=this._trans.__("The property inspector allows to view and edit properties of a selected notebook."),r.className="jp-PropertyInspector-placeholderContent",r.appendChild(h),r.appendChild(l),a.appendChild(r),this._placeholder=new c({node:a}),this._placeholder.addClass("jp-PropertyInspector-placeholder")}n.widget=this._placeholder,this._labshell.currentChanged.connect(this._onShellCurrentChanged,this),this._onShellCurrentChanged()}setContent(t){const e=this.layout;e.widget&&(e.widget.removeClass("jp-PropertyInspector-content"),e.removeWidget(e.widget)),t||(t=this._placeholder),t.addClass("jp-PropertyInspector-content"),e.widget=t}showPanel(){this._labshell.activateById(this.id)}_onShellCurrentChanged(){const t=this.currentWidget;if(!t){this.setContent(null);return}const e=this._labshell.currentWidget;e?.node.contains(t.node)?this.refresh():this.setContent(null)}}var i;(function(o){class t{constructor(s){this._isDisposed=!1,this._content=null,this._owner=null,this._onAction=new d(this),this._owner=s}get owner(){return this._owner}get content(){return this._content}get isDisposed(){return this._isDisposed}get onAction(){return this._onAction}showPanel(){this._isDisposed||this._onAction.emit("show-panel")}render(s){this._isDisposed||(s instanceof c?this._content=s:this._content=C.create(s),this._onAction.emit("content"))}dispose(){this._isDisposed||(this._isDisposed=!0,this._content=null,this._owner=null,d.clearData(this))}}o.PropertyInspector=t})(i||(i={}));export{y as I,P as S};
@@ -1 +1 @@
1
- import{bZ as ce,aW as ue}from"../datalayer-app-main.js";import{B as de}from"./kernel-BI-BLP-K.js";import{D as $}from"./drivecontents-Bg9_6Kmo.js";const j={ipykernel:{releases:{"6.9.2":[{url:"https://assets.datalayer.tech/pypi/ipykernel-6.9.2-py3-none-any.whl"}]}},piplite:{releases:{"0.5.1":[{url:"https://assets.datalayer.tech/pypi/piplite-0.5.1-py3-none-any.whl"}]}},"pyodide-kernel":{releases:{"0.5.1":[{url:"https://assets.datalayer.tech/pypi/pyodide_kernel-0.5.1-py3-none-any.whl"}]}},widgetsnbextension:{releases:{"3.6.999":[{url:"https://assets.datalayer.tech/pypi/widgetsnbextension-3.6.999-py3-none-any.whl"}],"4.0.999":[{url:"https://assets.datalayer.tech/pypi/widgetsnbextension-4.0.999-py3-none-any.whl"}]}}};function A(t,e){const n=j[t];if(!n)throw console.error("all.json contents:",j),console.error("Looking for package:",t),new Error(`Package ${t} not found in all.json`);const a=Object.keys(n.releases),r=e||a[a.length-1],s=n.releases[r];if(!s||s.length===0)throw new Error(`No releases found for ${t}@${r}`);return s[0].url}const pe={default:j.piplite?.releases["0.5.1"]?.[0]?.url?.replace(/piplite-.*\.whl$/,"all.json")||"https://assets.datalayer.tech/pypi/all.json"},he={default:A("piplite","0.5.1")};A("ipykernel","6.9.2");A("pyodide-kernel","0.5.1");A("widgetsnbextension","3.6.999");A("widgetsnbextension","4.0.999");const V="function",M="64e10b34-2bf7-4616-9668-f99de5aa046e",ye="get",fe="has",me="set",{isArray:T}=Array;let{SharedArrayBuffer:W,window:we}=globalThis,{notify:Q,wait:X,waitAsync:v}=Atomics,Z=null;v||(v=t=>({value:new Promise(e=>{let n=new Worker("data:application/javascript,onmessage%3D(%7Bdata%3Ab%7D)%3D%3E(Atomics.wait(b%2C0)%2CpostMessage(0))");n.onmessage=e,n.postMessage(t)})}));try{new W(4)}catch{W=ArrayBuffer;const e=new WeakMap;if(we){const n=new Map,{prototype:{postMessage:a}}=Worker,r=s=>{const o=s.data?.[M];if(!T(o)){s.stopImmediatePropagation();const{id:i,sb:p}=o;n.get(i)(p)}};Z=function(s,...o){const i=s?.[M];if(T(i)){const[p,c]=i;e.set(c,p),this.addEventListener("message",r)}return a.call(this,s,...o)},v=s=>({value:new Promise(o=>{n.set(e.get(s),o)}).then(o=>{n.delete(e.get(s)),e.delete(s);for(let i=0;i<o.length;i++)s[i]=o[i];return"ok"})})}else{const n=(a,r)=>({[M]:{id:a,sb:r}});Q=a=>{postMessage(n(e.get(a),a))},addEventListener("message",a=>{const r=a.data?.[M];if(T(r)){const[s,o]=r;e.set(o,s)}})}}const{Int32Array:z,Map:Y,Uint16Array:K}=globalThis,{BYTES_PER_ELEMENT:G}=z,{BYTES_PER_ELEMENT:ge}=K,be=(t,e,n)=>{for(;X(t,0,0,e)==="timed-out";)n()},q=new WeakSet,H=new WeakMap,_e={value:{then:t=>t()}};let ke=0;const ee=(t,{parse:e=JSON.parse,stringify:n=JSON.stringify,transform:a,interrupt:r}=JSON)=>{if(!H.has(t)){const s=Z||t.postMessage,o=(l,...u)=>s.call(t,{[M]:u},{transfer:l}),i=typeof r===V?r:r?.handler,p=r?.delay||42,c=new TextDecoder("utf-16"),d=(l,u)=>l?v(u,0):(i?be(u,p,i):X(u,0),_e);let h=!1;H.set(t,new Proxy(new Y,{[fe]:(l,u)=>typeof u=="string"&&!u.startsWith("_"),[ye]:(l,u)=>u==="then"?null:((...w)=>{const P=ke++;let y=new z(new W(G*2)),b=[];q.has(w.at(-1)||b)&&q.delete(b=w.pop()),o(b,P,y,u,a?w.map(a):w);const _=t!==globalThis;let k=0;return h&&_&&(k=setTimeout(console.warn,1e3,`💀🔒 - Possible deadlock if proxy.${u}(...args) is awaited`)),d(_,y).value.then(()=>{clearTimeout(k);const m=y[1];if(!m)return;const R=ge*m;return y=new z(new W(R+R%G)),o([],P,y),d(_,y).value.then(()=>e(c.decode(new K(y.buffer).slice(0,m))))})}),[me](l,u,w){const P=typeof w;if(P!==V)throw new Error(`Unable to assign ${u} as ${P}`);if(!l.size){const y=new Y;t.addEventListener("message",async b=>{const _=b.data?.[M];if(T(_)){b.stopImmediatePropagation();const[k,m,...R]=_;let O;if(R.length){const[E,L]=R;if(l.has(E)){h=!0;try{const f=await l.get(E)(...L);if(f!==void 0){const F=n(a?a(f):f);y.set(k,F),m[1]=F.length}}catch(f){O=f}finally{h=!1}}else O=new Error(`Unsupported action: ${E}`);m[0]=1}else{const E=y.get(k);y.delete(k);for(let L=new K(m.buffer),f=0;f<E.length;f++)L[f]=E.charCodeAt(f)}if(Q(m,0),O)throw O}})}return!!l.set(u,w)}}))}return H.get(t)};ee.transfer=(...t)=>(q.add(t),t);const te=Symbol("Comlink.proxy"),Ee=Symbol("Comlink.endpoint"),xe=Symbol("Comlink.releaseProxy"),N=Symbol("Comlink.finalizer"),C=Symbol("Comlink.thrown"),ne=t=>typeof t=="object"&&t!==null||typeof t=="function",Me={canHandle:t=>ne(t)&&t[te],serialize(t){const{port1:e,port2:n}=new MessageChannel;return se(t,e),[n,[n]]},deserialize(t){return t.start(),oe(t)}},Pe={canHandle:t=>ne(t)&&C in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},re=new Map([["proxy",Me],["throw",Pe]]);function Re(t,e){for(const n of t)if(e===n||n==="*"||n instanceof RegExp&&n.test(e))return!0;return!1}function se(t,e=globalThis,n=["*"]){e.addEventListener("message",function a(r){if(!r||!r.data)return;if(!Re(n,r.origin)){console.warn(`Invalid origin '${r.origin}' for comlink proxy`);return}const{id:s,type:o,path:i}=Object.assign({path:[]},r.data),p=(r.data.argumentList||[]).map(g);let c;try{const d=i.slice(0,-1).reduce((l,u)=>l[u],t),h=i.reduce((l,u)=>l[u],t);switch(o){case"GET":c=h;break;case"SET":d[i.slice(-1)[0]]=g(r.data.value),c=!0;break;case"APPLY":c=h.apply(d,p);break;case"CONSTRUCT":{const l=new h(...p);c=We(l)}break;case"ENDPOINT":{const{port1:l,port2:u}=new MessageChannel;se(t,u),c=Ce(l,[l])}break;case"RELEASE":c=void 0;break;default:return}}catch(d){c={value:d,[C]:0}}Promise.resolve(c).catch(d=>({value:d,[C]:0})).then(d=>{const[h,l]=I(d);e.postMessage(Object.assign(Object.assign({},h),{id:s}),l),o==="RELEASE"&&(e.removeEventListener("message",a),ae(e),N in t&&typeof t[N]=="function"&&t[N]())}).catch(d=>{const[h,l]=I({value:new TypeError("Unserializable return value"),[C]:0});e.postMessage(Object.assign(Object.assign({},h),{id:s}),l)})}),e.start&&e.start()}function Ae(t){return t.constructor.name==="MessagePort"}function ae(t){Ae(t)&&t.close()}function oe(t,e){const n=new Map;return t.addEventListener("message",function(r){const{data:s}=r;if(!s||!s.id)return;const o=n.get(s.id);if(o)try{o(s)}finally{n.delete(s.id)}}),B(t,n,[],e)}function S(t){if(t)throw new Error("Proxy has been released and is not useable")}function ie(t){return x(t,new Map,{type:"RELEASE"}).then(()=>{ae(t)})}const U=new WeakMap,D="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(U.get(t)||0)-1;U.set(t,e),e===0&&ie(t)});function Oe(t,e){const n=(U.get(e)||0)+1;U.set(e,n),D&&D.register(t,e,t)}function Se(t){D&&D.unregister(t)}function B(t,e,n=[],a=function(){}){let r=!1;const s=new Proxy(a,{get(o,i){if(S(r),i===xe)return()=>{Se(s),ie(t),e.clear(),r=!0};if(i==="then"){if(n.length===0)return{then:()=>s};const p=x(t,e,{type:"GET",path:n.map(c=>c.toString())}).then(g);return p.then.bind(p)}return B(t,e,[...n,i])},set(o,i,p){S(r);const[c,d]=I(p);return x(t,e,{type:"SET",path:[...n,i].map(h=>h.toString()),value:c},d).then(g)},apply(o,i,p){S(r);const c=n[n.length-1];if(c===Ee)return x(t,e,{type:"ENDPOINT"}).then(g);if(c==="bind")return B(t,e,n.slice(0,-1));const[d,h]=J(p);return x(t,e,{type:"APPLY",path:n.map(l=>l.toString()),argumentList:d},h).then(g)},construct(o,i){S(r);const[p,c]=J(i);return x(t,e,{type:"CONSTRUCT",path:n.map(d=>d.toString()),argumentList:p},c).then(g)}});return Oe(s,t),s}function Te(t){return Array.prototype.concat.apply([],t)}function J(t){const e=t.map(I);return[e.map(n=>n[0]),Te(e.map(n=>n[1]))]}const le=new WeakMap;function Ce(t,e){return le.set(t,e),t}function We(t){return Object.assign(t,{[te]:!0})}function I(t){for(const[e,n]of re)if(n.canHandle(t)){const[a,r]=n.serialize(t);return[{type:"HANDLER",name:e,value:a},r]}return[{type:"RAW",value:t},le.get(t)||[]]}function g(t){switch(t.type){case"HANDLER":return re.get(t.name).deserialize(t.value);case"RAW":return t.value}}function x(t,e,n,a){return new Promise(r=>{const s=ve();e.set(s,r),t.start&&t.start(),t.postMessage(Object.assign({id:s},n),a)})}function ve(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}class Le extends de{constructor(e){super(e),this._worker=this.initWorker(e),this._remoteKernel=this.initRemote(e),this._contentsManager=e.contentsManager}initWorker(e){return crossOriginIsolated?new Worker(new URL(""+new URL("../assets/coincident.worker-Dd47v4fq.js",import.meta.url).href,import.meta.url),{type:"module"}):new Worker(new URL(""+new URL("../assets/comlink.worker-DmOp1QjG.js",import.meta.url).href,import.meta.url),{type:"module"})}initRemote(e){let n;crossOriginIsolated?(n=ee(this._worker),n.processWorkerMessage=this._processWorkerMessage.bind(this),n.processDriveRequest=async r=>{if(!$)throw new Error("File system calls over Atomics.wait is only supported with jupyterlite>=0.4.0a3");return this._contentsProcessor===void 0&&(this._contentsProcessor=new $({contentsManager:this._contentsManager})),await this._contentsProcessor.processDriveRequest(r)}):(n=oe(this._worker),this._worker.addEventListener("message",r=>{typeof r?.data?._kernelMessage<"u"&&this._processWorkerMessage(r.data._kernelMessage)}));const a=this.initRemoteOptions(e);return n.initialize(a).then(this._ready.resolve.bind(this._ready)),n}initRemoteOptions(e){const{pyodideUrl:n}=e,a=n.slice(0,n.lastIndexOf("/")+1),r=ce.PageConfig.getBaseUrl(),s=[...e.pipliteUrls||[],pe.default],o=!!e.disablePyPIFallback;return{baseUrl:r,pyodideUrl:n,indexUrl:a,pipliteWheelUrl:e.pipliteWheelUrl||he.default,pipliteUrls:s,disablePyPIFallback:o,location:this.location,mountDrive:e.mountDrive,loadPyodideOptions:e.loadPyodideOptions||{}}}dispose(){this.isDisposed||(this._worker.terminate(),this._worker=null,super.dispose())}get ready(){return this._ready.promise}_processWorkerMessage(e){if(e.type)switch(e.type){case"stream":{const n=e.bundle??{name:"stdout",text:""};this.stream(n,e.parentHeader);break}case"input_request":{const n=e.content??{prompt:"",password:!1};this.inputRequest(n,e.parentHeader);break}case"display_data":{const n=e.bundle??{data:{},metadata:{},transient:{}};this.displayData(n,e.parentHeader);break}case"update_display_data":{const n=e.bundle??{data:{},metadata:{},transient:{}};this.updateDisplayData(n,e.parentHeader);break}case"clear_output":{const n=e.bundle??{wait:!1};this.clearOutput(n,e.parentHeader);break}case"execute_result":{const n=e.bundle??{execution_count:0,data:{},metadata:{}};this.publishExecuteResult(n,e.parentHeader);break}case"execute_error":{const n=e.bundle??{ename:"",evalue:"",traceback:[]};this.publishExecuteError(n,e.parentHeader);break}case"comm_msg":case"comm_open":case"comm_close":{this.handleComm(e.type,e.content,e.metadata,e.buffers,e.parentHeader);break}}}async kernelInfoRequest(){return{implementation:"pyodide",implementation_version:"0.1.0",language_info:{codemirror_mode:{name:"python",version:3},file_extension:".py",mimetype:"text/x-python",name:"python",nbconvert_exporter:"python",pygments_lexer:"ipython3",version:"3.8"},protocol_version:"5.3",status:"ok",banner:"A WebAssembly-powered Python kernel backed by Pyodide",help_links:[{text:"Python (WASM) Kernel",url:"https://pyodide.org"}]}}async executeRequest(e){await this.ready;const n=await this._remoteKernel.execute(e,this.parent);return n.execution_count=this.executionCount,n}async completeRequest(e){return await this._remoteKernel.complete(e,this.parent)}async inspectRequest(e){return await this._remoteKernel.inspect(e,this.parent)}async isCompleteRequest(e){return await this._remoteKernel.isComplete(e,this.parent)}async commInfoRequest(e){return await this._remoteKernel.commInfo(e,this.parent)}async commOpen(e){return await this._remoteKernel.commOpen(e,this.parent)}async commMsg(e){return await this._remoteKernel.commMsg(e,this.parent)}async commClose(e){return await this._remoteKernel.commClose(e,this.parent)}async inputReply(e){return await this._remoteKernel.inputReply(e,this.parent)}_contentsManager;_contentsProcessor;_worker;_remoteKernel;_ready=new ue}export{Le as PyodideKernel,pe as allJSONUrl,he as pipliteWheelUrl};
1
+ import{b_ as ce,aW as ue}from"../datalayer-app-main.js";import{B as de}from"./kernel-BI-BLP-K.js";import{D as $}from"./drivecontents-CxwZz_5W.js";const j={ipykernel:{releases:{"6.9.2":[{url:"https://assets.datalayer.tech/pypi/ipykernel-6.9.2-py3-none-any.whl"}]}},piplite:{releases:{"0.5.1":[{url:"https://assets.datalayer.tech/pypi/piplite-0.5.1-py3-none-any.whl"}]}},"pyodide-kernel":{releases:{"0.5.1":[{url:"https://assets.datalayer.tech/pypi/pyodide_kernel-0.5.1-py3-none-any.whl"}]}},widgetsnbextension:{releases:{"3.6.999":[{url:"https://assets.datalayer.tech/pypi/widgetsnbextension-3.6.999-py3-none-any.whl"}],"4.0.999":[{url:"https://assets.datalayer.tech/pypi/widgetsnbextension-4.0.999-py3-none-any.whl"}]}}};function A(t,e){const n=j[t];if(!n)throw console.error("all.json contents:",j),console.error("Looking for package:",t),new Error(`Package ${t} not found in all.json`);const a=Object.keys(n.releases),r=e||a[a.length-1],s=n.releases[r];if(!s||s.length===0)throw new Error(`No releases found for ${t}@${r}`);return s[0].url}const pe={default:j.piplite?.releases["0.5.1"]?.[0]?.url?.replace(/piplite-.*\.whl$/,"all.json")||"https://assets.datalayer.tech/pypi/all.json"},he={default:A("piplite","0.5.1")};A("ipykernel","6.9.2");A("pyodide-kernel","0.5.1");A("widgetsnbextension","3.6.999");A("widgetsnbextension","4.0.999");const V="function",M="64e10b34-2bf7-4616-9668-f99de5aa046e",ye="get",fe="has",me="set",{isArray:T}=Array;let{SharedArrayBuffer:W,window:we}=globalThis,{notify:Q,wait:X,waitAsync:v}=Atomics,Z=null;v||(v=t=>({value:new Promise(e=>{let n=new Worker("data:application/javascript,onmessage%3D(%7Bdata%3Ab%7D)%3D%3E(Atomics.wait(b%2C0)%2CpostMessage(0))");n.onmessage=e,n.postMessage(t)})}));try{new W(4)}catch{W=ArrayBuffer;const e=new WeakMap;if(we){const n=new Map,{prototype:{postMessage:a}}=Worker,r=s=>{const o=s.data?.[M];if(!T(o)){s.stopImmediatePropagation();const{id:i,sb:p}=o;n.get(i)(p)}};Z=function(s,...o){const i=s?.[M];if(T(i)){const[p,c]=i;e.set(c,p),this.addEventListener("message",r)}return a.call(this,s,...o)},v=s=>({value:new Promise(o=>{n.set(e.get(s),o)}).then(o=>{n.delete(e.get(s)),e.delete(s);for(let i=0;i<o.length;i++)s[i]=o[i];return"ok"})})}else{const n=(a,r)=>({[M]:{id:a,sb:r}});Q=a=>{postMessage(n(e.get(a),a))},addEventListener("message",a=>{const r=a.data?.[M];if(T(r)){const[s,o]=r;e.set(o,s)}})}}const{Int32Array:z,Map:Y,Uint16Array:K}=globalThis,{BYTES_PER_ELEMENT:G}=z,{BYTES_PER_ELEMENT:ge}=K,be=(t,e,n)=>{for(;X(t,0,0,e)==="timed-out";)n()},q=new WeakSet,H=new WeakMap,_e={value:{then:t=>t()}};let ke=0;const ee=(t,{parse:e=JSON.parse,stringify:n=JSON.stringify,transform:a,interrupt:r}=JSON)=>{if(!H.has(t)){const s=Z||t.postMessage,o=(l,...u)=>s.call(t,{[M]:u},{transfer:l}),i=typeof r===V?r:r?.handler,p=r?.delay||42,c=new TextDecoder("utf-16"),d=(l,u)=>l?v(u,0):(i?be(u,p,i):X(u,0),_e);let h=!1;H.set(t,new Proxy(new Y,{[fe]:(l,u)=>typeof u=="string"&&!u.startsWith("_"),[ye]:(l,u)=>u==="then"?null:((...w)=>{const P=ke++;let y=new z(new W(G*2)),b=[];q.has(w.at(-1)||b)&&q.delete(b=w.pop()),o(b,P,y,u,a?w.map(a):w);const _=t!==globalThis;let k=0;return h&&_&&(k=setTimeout(console.warn,1e3,`💀🔒 - Possible deadlock if proxy.${u}(...args) is awaited`)),d(_,y).value.then(()=>{clearTimeout(k);const m=y[1];if(!m)return;const R=ge*m;return y=new z(new W(R+R%G)),o([],P,y),d(_,y).value.then(()=>e(c.decode(new K(y.buffer).slice(0,m))))})}),[me](l,u,w){const P=typeof w;if(P!==V)throw new Error(`Unable to assign ${u} as ${P}`);if(!l.size){const y=new Y;t.addEventListener("message",async b=>{const _=b.data?.[M];if(T(_)){b.stopImmediatePropagation();const[k,m,...R]=_;let O;if(R.length){const[E,L]=R;if(l.has(E)){h=!0;try{const f=await l.get(E)(...L);if(f!==void 0){const F=n(a?a(f):f);y.set(k,F),m[1]=F.length}}catch(f){O=f}finally{h=!1}}else O=new Error(`Unsupported action: ${E}`);m[0]=1}else{const E=y.get(k);y.delete(k);for(let L=new K(m.buffer),f=0;f<E.length;f++)L[f]=E.charCodeAt(f)}if(Q(m,0),O)throw O}})}return!!l.set(u,w)}}))}return H.get(t)};ee.transfer=(...t)=>(q.add(t),t);const te=Symbol("Comlink.proxy"),Ee=Symbol("Comlink.endpoint"),xe=Symbol("Comlink.releaseProxy"),N=Symbol("Comlink.finalizer"),C=Symbol("Comlink.thrown"),ne=t=>typeof t=="object"&&t!==null||typeof t=="function",Me={canHandle:t=>ne(t)&&t[te],serialize(t){const{port1:e,port2:n}=new MessageChannel;return se(t,e),[n,[n]]},deserialize(t){return t.start(),oe(t)}},Pe={canHandle:t=>ne(t)&&C in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},re=new Map([["proxy",Me],["throw",Pe]]);function Re(t,e){for(const n of t)if(e===n||n==="*"||n instanceof RegExp&&n.test(e))return!0;return!1}function se(t,e=globalThis,n=["*"]){e.addEventListener("message",function a(r){if(!r||!r.data)return;if(!Re(n,r.origin)){console.warn(`Invalid origin '${r.origin}' for comlink proxy`);return}const{id:s,type:o,path:i}=Object.assign({path:[]},r.data),p=(r.data.argumentList||[]).map(g);let c;try{const d=i.slice(0,-1).reduce((l,u)=>l[u],t),h=i.reduce((l,u)=>l[u],t);switch(o){case"GET":c=h;break;case"SET":d[i.slice(-1)[0]]=g(r.data.value),c=!0;break;case"APPLY":c=h.apply(d,p);break;case"CONSTRUCT":{const l=new h(...p);c=We(l)}break;case"ENDPOINT":{const{port1:l,port2:u}=new MessageChannel;se(t,u),c=Ce(l,[l])}break;case"RELEASE":c=void 0;break;default:return}}catch(d){c={value:d,[C]:0}}Promise.resolve(c).catch(d=>({value:d,[C]:0})).then(d=>{const[h,l]=I(d);e.postMessage(Object.assign(Object.assign({},h),{id:s}),l),o==="RELEASE"&&(e.removeEventListener("message",a),ae(e),N in t&&typeof t[N]=="function"&&t[N]())}).catch(d=>{const[h,l]=I({value:new TypeError("Unserializable return value"),[C]:0});e.postMessage(Object.assign(Object.assign({},h),{id:s}),l)})}),e.start&&e.start()}function Ae(t){return t.constructor.name==="MessagePort"}function ae(t){Ae(t)&&t.close()}function oe(t,e){const n=new Map;return t.addEventListener("message",function(r){const{data:s}=r;if(!s||!s.id)return;const o=n.get(s.id);if(o)try{o(s)}finally{n.delete(s.id)}}),B(t,n,[],e)}function S(t){if(t)throw new Error("Proxy has been released and is not useable")}function ie(t){return x(t,new Map,{type:"RELEASE"}).then(()=>{ae(t)})}const U=new WeakMap,D="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(U.get(t)||0)-1;U.set(t,e),e===0&&ie(t)});function Oe(t,e){const n=(U.get(e)||0)+1;U.set(e,n),D&&D.register(t,e,t)}function Se(t){D&&D.unregister(t)}function B(t,e,n=[],a=function(){}){let r=!1;const s=new Proxy(a,{get(o,i){if(S(r),i===xe)return()=>{Se(s),ie(t),e.clear(),r=!0};if(i==="then"){if(n.length===0)return{then:()=>s};const p=x(t,e,{type:"GET",path:n.map(c=>c.toString())}).then(g);return p.then.bind(p)}return B(t,e,[...n,i])},set(o,i,p){S(r);const[c,d]=I(p);return x(t,e,{type:"SET",path:[...n,i].map(h=>h.toString()),value:c},d).then(g)},apply(o,i,p){S(r);const c=n[n.length-1];if(c===Ee)return x(t,e,{type:"ENDPOINT"}).then(g);if(c==="bind")return B(t,e,n.slice(0,-1));const[d,h]=J(p);return x(t,e,{type:"APPLY",path:n.map(l=>l.toString()),argumentList:d},h).then(g)},construct(o,i){S(r);const[p,c]=J(i);return x(t,e,{type:"CONSTRUCT",path:n.map(d=>d.toString()),argumentList:p},c).then(g)}});return Oe(s,t),s}function Te(t){return Array.prototype.concat.apply([],t)}function J(t){const e=t.map(I);return[e.map(n=>n[0]),Te(e.map(n=>n[1]))]}const le=new WeakMap;function Ce(t,e){return le.set(t,e),t}function We(t){return Object.assign(t,{[te]:!0})}function I(t){for(const[e,n]of re)if(n.canHandle(t)){const[a,r]=n.serialize(t);return[{type:"HANDLER",name:e,value:a},r]}return[{type:"RAW",value:t},le.get(t)||[]]}function g(t){switch(t.type){case"HANDLER":return re.get(t.name).deserialize(t.value);case"RAW":return t.value}}function x(t,e,n,a){return new Promise(r=>{const s=ve();e.set(s,r),t.start&&t.start(),t.postMessage(Object.assign({id:s},n),a)})}function ve(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}class Le extends de{constructor(e){super(e),this._worker=this.initWorker(e),this._remoteKernel=this.initRemote(e),this._contentsManager=e.contentsManager}initWorker(e){return crossOriginIsolated?new Worker(new URL(""+new URL("../assets/coincident.worker-Dd47v4fq.js",import.meta.url).href,import.meta.url),{type:"module"}):new Worker(new URL(""+new URL("../assets/comlink.worker-DmOp1QjG.js",import.meta.url).href,import.meta.url),{type:"module"})}initRemote(e){let n;crossOriginIsolated?(n=ee(this._worker),n.processWorkerMessage=this._processWorkerMessage.bind(this),n.processDriveRequest=async r=>{if(!$)throw new Error("File system calls over Atomics.wait is only supported with jupyterlite>=0.4.0a3");return this._contentsProcessor===void 0&&(this._contentsProcessor=new $({contentsManager:this._contentsManager})),await this._contentsProcessor.processDriveRequest(r)}):(n=oe(this._worker),this._worker.addEventListener("message",r=>{typeof r?.data?._kernelMessage<"u"&&this._processWorkerMessage(r.data._kernelMessage)}));const a=this.initRemoteOptions(e);return n.initialize(a).then(this._ready.resolve.bind(this._ready)),n}initRemoteOptions(e){const{pyodideUrl:n}=e,a=n.slice(0,n.lastIndexOf("/")+1),r=ce.PageConfig.getBaseUrl(),s=[...e.pipliteUrls||[],pe.default],o=!!e.disablePyPIFallback;return{baseUrl:r,pyodideUrl:n,indexUrl:a,pipliteWheelUrl:e.pipliteWheelUrl||he.default,pipliteUrls:s,disablePyPIFallback:o,location:this.location,mountDrive:e.mountDrive,loadPyodideOptions:e.loadPyodideOptions||{}}}dispose(){this.isDisposed||(this._worker.terminate(),this._worker=null,super.dispose())}get ready(){return this._ready.promise}_processWorkerMessage(e){if(e.type)switch(e.type){case"stream":{const n=e.bundle??{name:"stdout",text:""};this.stream(n,e.parentHeader);break}case"input_request":{const n=e.content??{prompt:"",password:!1};this.inputRequest(n,e.parentHeader);break}case"display_data":{const n=e.bundle??{data:{},metadata:{},transient:{}};this.displayData(n,e.parentHeader);break}case"update_display_data":{const n=e.bundle??{data:{},metadata:{},transient:{}};this.updateDisplayData(n,e.parentHeader);break}case"clear_output":{const n=e.bundle??{wait:!1};this.clearOutput(n,e.parentHeader);break}case"execute_result":{const n=e.bundle??{execution_count:0,data:{},metadata:{}};this.publishExecuteResult(n,e.parentHeader);break}case"execute_error":{const n=e.bundle??{ename:"",evalue:"",traceback:[]};this.publishExecuteError(n,e.parentHeader);break}case"comm_msg":case"comm_open":case"comm_close":{this.handleComm(e.type,e.content,e.metadata,e.buffers,e.parentHeader);break}}}async kernelInfoRequest(){return{implementation:"pyodide",implementation_version:"0.1.0",language_info:{codemirror_mode:{name:"python",version:3},file_extension:".py",mimetype:"text/x-python",name:"python",nbconvert_exporter:"python",pygments_lexer:"ipython3",version:"3.8"},protocol_version:"5.3",status:"ok",banner:"A WebAssembly-powered Python kernel backed by Pyodide",help_links:[{text:"Python (WASM) Kernel",url:"https://pyodide.org"}]}}async executeRequest(e){await this.ready;const n=await this._remoteKernel.execute(e,this.parent);return n.execution_count=this.executionCount,n}async completeRequest(e){return await this._remoteKernel.complete(e,this.parent)}async inspectRequest(e){return await this._remoteKernel.inspect(e,this.parent)}async isCompleteRequest(e){return await this._remoteKernel.isComplete(e,this.parent)}async commInfoRequest(e){return await this._remoteKernel.commInfo(e,this.parent)}async commOpen(e){return await this._remoteKernel.commOpen(e,this.parent)}async commMsg(e){return await this._remoteKernel.commMsg(e,this.parent)}async commClose(e){return await this._remoteKernel.commClose(e,this.parent)}async inputReply(e){return await this._remoteKernel.inputReply(e,this.parent)}_contentsManager;_contentsProcessor;_worker;_remoteKernel;_ready=new ue}export{Le as PyodideKernel,pe as allJSONUrl,he as pipliteWheelUrl};