@juki-team/base-ui 1.5.4 → 1.5.13

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 (202) hide show
  1. package/dist/esm/ArrowForwardIcon-DelUFdaJ.js +1 -0
  2. package/dist/esm/{BarChart-4YVL8qrU.js → BarChart-D2X8Qu4u.js} +1 -1
  3. package/dist/esm/{CartesianChart-CaeqB_2y.js → CartesianChart-DYpkf6Ou.js} +1 -1
  4. package/dist/esm/{ChangePasswordModal-OWm3MyKW.js → ChangePasswordModal-yc4D7RMs.js} +1 -1
  5. package/dist/esm/CodeEditor-Dxp5QnTB.js +1 -0
  6. package/dist/esm/{CodeViewer-CZwCWtf1.js → CodeViewer-BSZXIngC.js} +1 -1
  7. package/dist/esm/{Collapse-C6FDlfoR.js → Collapse-D-w5SKss.js} +1 -1
  8. package/dist/esm/{DataGrid-bZJxnNpn.js → DataGrid-BdFgb8IP.js} +1 -1
  9. package/dist/esm/DataViewer-DVVGkDSK.js +1 -0
  10. package/dist/esm/{DrawerView-O8ivFKAG.js → DrawerView-DCRvckZd.js} +1 -1
  11. package/dist/esm/{ExcalidrawButton-Dx-6TOuw.js → ExcalidrawButton-_a-eNbyb.js} +1 -1
  12. package/dist/esm/{GraphvizViewer-AxmRC6e5.js → GraphvizViewer-B2-JVx0t.js} +1 -1
  13. package/dist/esm/{ImageLoaderCropper-B5z4gQda.js → ImageLoaderCropper-wV-hPOjq.js} +1 -1
  14. package/dist/esm/{InputCellPhoneNumber-12U8BtmT.js → InputCellPhoneNumber-Bcl22QsC.js} +1 -1
  15. package/dist/esm/{InputColor-Cpd36Uei.js → InputColor-CHgGjI3f.js} +1 -1
  16. package/dist/esm/{LineChart-Cp3YgIYB.js → LineChart-ByKPkVhP.js} +1 -1
  17. package/dist/esm/{LoaderLayer-Cv80UCdL.js → LoaderLayer-ECtsj85k.js} +1 -1
  18. package/dist/esm/{MdMath-CVxzEaJK.js → MdMath-DljkRDxR.js} +1 -1
  19. package/dist/esm/{MdMathEditor-himmiyoG.js → MdMathEditor-Dvq5oODw.js} +2 -2
  20. package/dist/esm/{Popover-CEc-CYlJ.js → Popover-CX8YffOd.js} +1 -1
  21. package/dist/esm/ReplyIcon-BNYBKbgb.js +1 -0
  22. package/dist/esm/{SettingsIcon-C3sN1TNw.js → SettingsIcon-B9nmP4lD.js} +1 -1
  23. package/dist/esm/{SlideDeck-I221o0di.js → SlideDeck-C0n93gz0.js} +1 -1
  24. package/dist/esm/{TableEyeIcon-BFfTLgKU.js → TableEyeIcon-Mb5aFvN0.js} +1 -1
  25. package/dist/esm/{TableOfContents-DqdT3oFH.js → TableOfContents-BBAEZx6Z.js} +1 -1
  26. package/dist/esm/{Tooltip-DCefNWu7.js → Tooltip-DB0S1ErV.js} +1 -1
  27. package/dist/esm/UserCodeEditor-B1d5gyVE.js +61 -0
  28. package/dist/esm/{VirtualizedRowsFixed-D9Yuhs6Z.js → VirtualizedRowsFixed-ChX4ON0l.js} +1 -1
  29. package/dist/esm/{WorksheetAsSlides-DJJreHkG.js → WorksheetAsSlides-CpiXbUML.js} +1 -1
  30. package/dist/esm/{WorksheetBodies-VeYRksK3.js → WorksheetBodies-CO67-rEz.js} +1 -1
  31. package/dist/esm/{WorksheetContents-CmB2azPo.js → WorksheetContents-ClZpiXB-.js} +1 -1
  32. package/dist/esm/{WorksheetEditor-CwF_HNWx.js → WorksheetEditor-CjAvgOx6.js} +1 -1
  33. package/dist/esm/WorksheetNode-BgNNzY8I.js +1 -0
  34. package/dist/esm/{WorksheetViewer-8nk0Y7Pu.js → WorksheetViewer-DVQitUzi.js} +1 -1
  35. package/dist/esm/{abnfDiagram-WEYOIA3C-DEKNEQ23.js → abnfDiagram-WEYOIA3C-CwJ1V2U1.js} +1 -1
  36. package/dist/esm/{arc-BXMOYbEk.js → arc-COK0VEkT.js} +1 -1
  37. package/dist/esm/{architectureDiagram-ZHVYKT53-D8Cc0szw.js → architectureDiagram-ZHVYKT53-CM6AQFKG.js} +1 -1
  38. package/dist/esm/{basic-setup-DnHlH_GN.js → basic-setup-DtpgwOSH.js} +1 -1
  39. package/dist/esm/{blockDiagram-RJAE7QA3-CVAxF28b.js → blockDiagram-RJAE7QA3-CdSNo9Pe.js} +1 -1
  40. package/dist/esm/{c4Diagram-XDPPPE54-DfOddOsg.js → c4Diagram-XDPPPE54-BhfYKASq.js} +1 -1
  41. package/dist/esm/channel-DWjyymG_.js +1 -0
  42. package/dist/esm/{chunk-2E7WHVMD-DzrxCta9.js → chunk-2E7WHVMD-CVBqw5fR.js} +1 -1
  43. package/dist/esm/{chunk-2Q5K7J3B-BAvN2osA.js → chunk-2Q5K7J3B-CyZYeWxE.js} +1 -1
  44. package/dist/esm/{chunk-4EMNKR2T-WzMQveGn.js → chunk-4EMNKR2T-D1yHHif8.js} +1 -1
  45. package/dist/esm/{chunk-55XCU76K-Co_JK6zS.js → chunk-55XCU76K-CvYWAV_o.js} +1 -1
  46. package/dist/esm/{chunk-5VM5RSS4-2Alz3VU-.js → chunk-5VM5RSS4-CS0kZLYA.js} +1 -1
  47. package/dist/esm/{chunk-JWPE2WC7-BM31szoD.js → chunk-JWPE2WC7-Ct5OBLCL.js} +1 -1
  48. package/dist/esm/{chunk-NQOKRVIF-BvuLXPDI.js → chunk-NQOKRVIF-D0-2mmH4.js} +1 -1
  49. package/dist/esm/{chunk-VQ5W62QI-BM9st1eu.js → chunk-VQ5W62QI-CsGo0PTx.js} +1 -1
  50. package/dist/esm/{chunk-XXDRQBXY-B7eZEtxE.js → chunk-XXDRQBXY-DPPGTM3w.js} +1 -1
  51. package/dist/esm/{chunk-ZCHMQSOR-BfEzwJnw.js → chunk-ZCHMQSOR-Bvjutmxm.js} +1 -1
  52. package/dist/esm/{classDiagram-v2-4MYWR3UA-BBYOuONr.js → classDiagram-v2-4MYWR3UA-J_cOAAHS.js} +1 -1
  53. package/dist/esm/{commons-BHuDJzTw.js → commons-iref2pEJ.js} +1 -1
  54. package/dist/esm/constants.js +1 -1
  55. package/dist/esm/{cose-bilkent-JH36ORCC-BBL1Y3YR.js → cose-bilkent-JH36ORCC-BHzp2aV0.js} +1 -1
  56. package/dist/esm/{cynefinDiagram-WF24UDRP-B6GLAQp-.js → cynefinDiagram-WF24UDRP-B3Y9mCh3.js} +1 -1
  57. package/dist/esm/{dagre-NK4GIZVX-B5sHdjHr.js → dagre-NK4GIZVX-BSfh-C_i.js} +1 -1
  58. package/dist/esm/{diagram-CBK3MWTC-Dcv51W2u.js → diagram-CBK3MWTC-w-BT1S7I.js} +1 -1
  59. package/dist/esm/{diagram-I5XIIV2D-BqonTetl.js → diagram-I5XIIV2D-wMqo87b_.js} +1 -1
  60. package/dist/esm/{diagram-ODIL2UCW-CriVrDQT.js → diagram-ODIL2UCW-DQhUXqDu.js} +1 -1
  61. package/dist/esm/{diagram-PFBEJUXE-B03iAEwx.js → diagram-PFBEJUXE-BlCntZMJ.js} +1 -1
  62. package/dist/esm/{diagram-RJA3I4VV-Dj3xghQ1.js → diagram-RJA3I4VV-Cev21A9i.js} +1 -1
  63. package/dist/esm/{diagram-TYUNFSNR-CcvVCW9_.js → diagram-TYUNFSNR-BiiLNoPs.js} +1 -1
  64. package/dist/esm/{ebnfDiagram-V4P3TTPT-BXu5Kifr.js → ebnfDiagram-V4P3TTPT-BWNnHl88.js} +1 -1
  65. package/dist/esm/{elk-QONTBCTQ-Jkx0FK2o.js → elk-QONTBCTQ-DhvgoeNg.js} +1 -1
  66. package/dist/esm/{erDiagram-KYQIGQAA-BF9vCEaf.js → erDiagram-KYQIGQAA-DkFGw08p.js} +1 -1
  67. package/dist/esm/flowDiagram-IUGLLWBU-B-Bxdnen.js +1 -0
  68. package/dist/esm/{ganttDiagram-R7GPNTJY-CQC15o39.js → ganttDiagram-R7GPNTJY-Bvr90Acy.js} +1 -1
  69. package/dist/esm/{gitGraphDiagram-PDYL7XHY-D_f2t3KD.js → gitGraphDiagram-PDYL7XHY-DHszoB7b.js} +1 -1
  70. package/dist/esm/helpers.js +1 -1
  71. package/dist/esm/{index-_kF3_0-k.js → index-2PTQqTnK.js} +1 -1
  72. package/dist/esm/{index-ID6vqTYe.js → index-6pAHrAuD.js} +1 -1
  73. package/dist/esm/{index-JPCp_Z3V.js → index-70SVfF-m.js} +1 -1
  74. package/dist/esm/{index-D5FWzr0h.js → index-B46RgSF9.js} +1 -1
  75. package/dist/esm/{index-Dz8ISdDG.js → index-B5Soolr4.js} +1 -1
  76. package/dist/esm/{index-CWL6W5WQ.js → index-B9JSZpaA.js} +1 -1
  77. package/dist/esm/{index-C_HL-Da-.js → index-BDQ8194g.js} +1 -1
  78. package/dist/esm/{index-bPHO9OeP.js → index-BNvG4PUn.js} +1 -1
  79. package/dist/esm/{index-CRj4pqRR.js → index-BS7YTgMe.js} +1 -1
  80. package/dist/esm/{index-CAH_9Jug.js → index-Bohl_WFx.js} +1 -1
  81. package/dist/esm/{index-DPe-z7ci.js → index-BpFtavDh.js} +1 -1
  82. package/dist/esm/index-BpcqEzEG.js +1 -0
  83. package/dist/esm/{index-DM4Zc3sU.js → index-CHVYA2P8.js} +1 -1
  84. package/dist/esm/{index-CoVpfkO8.js → index-CHgqN-d9.js} +1 -1
  85. package/dist/esm/{index-2Mitl1QB.js → index-CJtYjUlf.js} +1 -1
  86. package/dist/esm/{index-Dx6l5ueb.js → index-CffiBbeH.js} +1 -1
  87. package/dist/esm/{index-DRSSYmEF.js → index-CiHwAkdd.js} +1 -1
  88. package/dist/esm/{index-C9ua7WYO.js → index-CmWQEzQl.js} +1 -1
  89. package/dist/esm/{index-D5tgPh4d.js → index-D5AIo8KT.js} +1 -1
  90. package/dist/esm/{index-D5WiSbCh.js → index-D6A8P_xS.js} +1 -1
  91. package/dist/esm/{index-CGmB9AM1.js → index-D9BPo-_o.js} +1 -1
  92. package/dist/esm/{index-8mEJamTc.js → index-DBWowQHL.js} +1 -1
  93. package/dist/esm/{index-C4KISU3M.js → index-DDBuqExW.js} +1 -1
  94. package/dist/esm/{index-V9oZCW09.js → index-DjrtJ8R4.js} +1 -1
  95. package/dist/esm/{index-DH4SMqQP.js → index-DkZReaeM.js} +1 -1
  96. package/dist/esm/{index-ChphKFtR.js → index-YYM2ZvZ6.js} +1 -1
  97. package/dist/esm/{index-nUMXMsLO.js → index-mLZqgXD7.js} +1 -1
  98. package/dist/esm/{index-BMPFttUB.js → index-nNMK7HvL.js} +1 -1
  99. package/dist/esm/{index-myBmcWfr.js → index-vxKx70Pe.js} +1 -1
  100. package/dist/esm/{index-CkaLE__v.js → index-wJyG4Gm6.js} +1 -1
  101. package/dist/esm/{infoDiagram-MVDRKAX5-04QJzIoW.js → infoDiagram-MVDRKAX5-D05SjyVf.js} +1 -1
  102. package/dist/esm/{ishikawaDiagram-HPEHV2GE-4pDsX60A.js → ishikawaDiagram-HPEHV2GE-50RQ8Owd.js} +1 -1
  103. package/dist/esm/{journeyDiagram-BOSHW7O7-BJFwx5Hu.js → journeyDiagram-BOSHW7O7-DnHu8DYt.js} +1 -1
  104. package/dist/esm/{kanban-definition-FNSA4HC5-MrsniETV.js → kanban-definition-FNSA4HC5-BF3y0Q5O.js} +1 -1
  105. package/dist/esm/main.js +1 -1
  106. package/dist/esm/{mermaid.core-DBVKQvxW.js → mermaid.core-DRk6tt5W.js} +2 -2
  107. package/dist/esm/{mindmap-definition-6OY57UG3-DnT4Ihuj.js → mindmap-definition-6OY57UG3-D2VvQCn5.js} +1 -1
  108. package/dist/esm/{pegDiagram-ECIUJNBX-C3s5Vuxq.js → pegDiagram-ECIUJNBX-LCa_e2vp.js} +1 -1
  109. package/dist/esm/{pieDiagram-GNMPY74T-CTjQZ9yP.js → pieDiagram-GNMPY74T-BFxRc695.js} +1 -1
  110. package/dist/esm/{quadrantDiagram-D57K4MC3-JTRqBH1z.js → quadrantDiagram-D57K4MC3-m-v5Oved.js} +1 -1
  111. package/dist/esm/{railroadDiagram-Y72NRBL7-DtAwxQ6F.js → railroadDiagram-Y72NRBL7-CGhQNkt2.js} +1 -1
  112. package/dist/esm/{requirementDiagram-EQYSW5RA-CR7SUMC-.js → requirementDiagram-EQYSW5RA-D4TUJX2j.js} +1 -1
  113. package/dist/esm/{sankeyDiagram-SY24JHO5-DbxpJ7pE.js → sankeyDiagram-SY24JHO5-qeunG13D.js} +1 -1
  114. package/dist/esm/{sequenceDiagram-BLEHNHQU-CvZHKbjd.js → sequenceDiagram-BLEHNHQU-Bf8dSGiP.js} +1 -1
  115. package/dist/esm/server.js +1 -1
  116. package/dist/esm/settings-CBGV-lz3.js +1 -0
  117. package/dist/esm/settings.js +1 -1
  118. package/dist/esm/{sizeCapture-INFHLROL-f_GRBQe5.js → sizeCapture-INFHLROL-B0tQoQkY.js} +1 -1
  119. package/dist/esm/{stateDiagram-v2-A6IESKWZ-DxF8GOQW.js → stateDiagram-v2-A6IESKWZ-D-bM5qVN.js} +1 -1
  120. package/dist/esm/{swimlanes-B3ENRKFQ-YbCv2QO2.js → swimlanes-B3ENRKFQ-DR9euVhL.js} +1 -1
  121. package/dist/esm/swimlanesDiagram-AYQRV4AK-D0-BBYnj.js +1 -0
  122. package/dist/esm/{timeline-definition-JXYKGLGB-C1x6bOWf.js → timeline-definition-JXYKGLGB-ChsOD2es.js} +1 -1
  123. package/dist/esm/{types-C3mmJ376.js → types-DsZvEANP.js} +1 -1
  124. package/dist/esm/{usecaseDiagram-WPOLBNNX-QdEejhhn.js → usecaseDiagram-WPOLBNNX-DZFg1Zof.js} +1 -1
  125. package/dist/esm/{vennDiagram-Q3Y3IDCW-B0EVPCrz.js → vennDiagram-Q3Y3IDCW-DAW-dDy7.js} +1 -1
  126. package/dist/esm/{wardleyDiagram-IVAIDKWA-Dlo4JFKg.js → wardleyDiagram-IVAIDKWA-B-gsebc8.js} +1 -1
  127. package/dist/esm/websocket-CdeP8N_S.js +1 -0
  128. package/dist/esm/{xychartDiagram-4URNHDU4-CU8TcG1V.js → xychartDiagram-4URNHDU4-DS3Qm0VA.js} +1 -1
  129. package/dist/module-types/src/components/molecules/_lazy_/CodeEditor/codemirror/types.d.ts +15 -1
  130. package/dist/module-types/src/components/molecules/_lazy_/CodeEditor/types.d.ts +6 -0
  131. package/dist/module-types/src/components/organisms/_layz_/DataViewer/CardList/DataViewerCard.d.ts +6 -2
  132. package/dist/module-types/src/components/organisms/_layz_/DataViewer/CardList/types.d.ts +9 -6
  133. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableHead/index.d.ts +2 -2
  134. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableRow.d.ts +21 -0
  135. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/ViewContainerRows.d.ts +0 -2
  136. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/columnLayout.d.ts +23 -0
  137. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/useScrollEdges.d.ts +13 -0
  138. package/dist/module-types/src/components/organisms/_layz_/DataViewer/types.d.ts +12 -8
  139. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/FileTreePanel/FileTreePanel.d.ts +3 -1
  140. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/FileTreePanel/types.d.ts +8 -2
  141. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/FirstPane.d.ts +6 -1
  142. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/Header/RunCodeButton.d.ts +2 -1
  143. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/Header/index.d.ts +3 -1
  144. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/TestCases/index.d.ts +3 -1
  145. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/types.d.ts +21 -2
  146. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/types.d.ts +11 -0
  147. package/dist/module-types/src/stores/websocket/topicChannels.d.ts +37 -0
  148. package/package.json +12 -13
  149. package/src/styles/components/atoms/_button.scss +3 -3
  150. package/src/styles/components/atoms/_data-viewer.scss +34 -16
  151. package/src/styles/index.scss +6 -0
  152. package/src/styles/vendor/index.scss +0 -2
  153. package/src/vendor/reveal.js/css/theme/fonts/league-gothic/league-gothic.woff +0 -0
  154. package/src/vendor/reveal.js/css/theme/fonts/source-sans-pro/source-sans-pro-italic.woff +0 -0
  155. package/src/vendor/reveal.js/css/theme/fonts/source-sans-pro/source-sans-pro-regular.woff +0 -0
  156. package/src/vendor/reveal.js/css/theme/fonts/source-sans-pro/source-sans-pro-semibold.woff +0 -0
  157. package/src/vendor/reveal.js/css/theme/fonts/source-sans-pro/source-sans-pro-semibolditalic.woff +0 -0
  158. package/dist/esm/ArrowForwardIcon-1RdVdC78.js +0 -1
  159. package/dist/esm/CodeEditor-B6RhGNP7.js +0 -1
  160. package/dist/esm/DataViewer-CU0QwQQa.js +0 -1
  161. package/dist/esm/ReplyIcon-BlBLARCH.js +0 -1
  162. package/dist/esm/UserCodeEditor-D4O5es0E.js +0 -61
  163. package/dist/esm/WorksheetNode-BTVi2Iol.js +0 -1
  164. package/dist/esm/channel-DaoqdAiW.js +0 -1
  165. package/dist/esm/flowDiagram-IUGLLWBU-DDMbhdom.js +0 -1
  166. package/dist/esm/index-Cso1rXtQ.js +0 -1
  167. package/dist/esm/settings-BONQQsPx.js +0 -1
  168. package/dist/esm/swimlanesDiagram-AYQRV4AK-CuclTt9Y.js +0 -1
  169. package/dist/esm/websocket-B2hJys_Q.js +0 -1
  170. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/component/code-block.d.ts +0 -0
  171. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/component/diff.d.ts +0 -0
  172. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/component/image-block.d.ts +0 -0
  173. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/component/image-inline.d.ts +0 -0
  174. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/component/index.d.ts +0 -0
  175. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/component/link-tooltip.d.ts +0 -0
  176. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/component/list-item-block.d.ts +0 -0
  177. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/component/table-block.d.ts +0 -0
  178. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/core.d.ts +0 -0
  179. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/ctx.d.ts +0 -0
  180. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/exception.d.ts +0 -0
  181. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/plugin/block.d.ts +0 -0
  182. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/plugin/clipboard.d.ts +0 -0
  183. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/plugin/cursor.d.ts +0 -0
  184. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/plugin/diff.d.ts +0 -0
  185. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/plugin/history.d.ts +0 -0
  186. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/plugin/indent.d.ts +0 -0
  187. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/plugin/listener.d.ts +0 -0
  188. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/plugin/slash.d.ts +0 -0
  189. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/plugin/streaming.d.ts +0 -0
  190. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/plugin/tooltip.d.ts +0 -0
  191. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/plugin/trailing.d.ts +0 -0
  192. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/plugin/upload.d.ts +0 -0
  193. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/preset/commonmark.d.ts +0 -0
  194. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/preset/gfm.d.ts +0 -0
  195. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/prose/history.d.ts +0 -0
  196. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/prose/index.d.ts +0 -0
  197. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/prose/inputrules.d.ts +0 -0
  198. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/prose/keymap.d.ts +0 -0
  199. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/prose/model.d.ts +0 -0
  200. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/prose/state.d.ts +0 -0
  201. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/prose/view.d.ts +0 -0
  202. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3 → @milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+vi_3301ef378947b358eb17e6850a1dc747}/node_modules/@milkdown/kit/lib/utils.d.ts +0 -0
@@ -1 +1 @@
1
- import{I as t}from"./chunk-2Q5K7J3B-BAvN2osA.js";import{p as r}from"./chunk-JWPE2WC7-BM31szoD.js";import{x as e,v as o,s as n,g as a,a as s,b as i,_ as c,O as d,l as h,k as m,c as $,u as l,P as g,C as p,m as y,Q as f,R as x,S as u}from"./mermaid.core-DBVKQvxW.js";import{p as b}from"./cynefin-EF2NZ3EQ-CaJSaYBh.js";import"./index-Cso1rXtQ.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-BHuDJzTw.js";import"./settings-BONQQsPx.js";import"./constants.js";import"./LoaderLayer-Cv80UCdL.js";import"./websocket-B2hJys_Q.js";import"./index-_kF3_0-k.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./string-DPJhNSkw.js";var w={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},k=x.gitGraph,B=c(()=>f({...k,...d().gitGraph}),"getConfig"),E=new t(()=>{const t=B(),r=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:e}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function C(){return u({length:7})}function L(t,r){const e=Object.create(null);return t.reduce((t,o)=>{const n=r(o);return e[n]||(e[n]=!0,t.push(o)),t},[])}c(C,"getID"),c(L,"uniqBy");var T=c(function(t){E.records.direction=t},"setDirection"),M=c(function(t){h.debug("options str",t),t=t?.trim(),t=t||"{}";try{E.records.options=JSON.parse(t)}catch(t){h.error("error while parsing gitGraph options",t.message)}},"setOptions"),v=c(function(){return E.records.options},"getOptions"),I=c(function(t){let r=t.msg,e=t.id;const o=t.type;let n=t.tags;h.info("commit",r,e,o,n),h.debug("Entering commit:",r,e,o,n);const a=B();e=y.sanitizeText(e,a),r=y.sanitizeText(r,a),n=n?.map(t=>y.sanitizeText(t,a));const s={id:e||E.records.seq+"-"+C(),message:r,seq:E.records.seq++,type:o??w.NORMAL,tags:n??[],parents:null==E.records.head?[]:[E.records.head.id],branch:E.records.currBranch};E.records.head=s,h.info("main branch",a.mainBranchName),E.records.commits.has(s.id)&&h.warn(`Commit ID ${s.id} already exists`),E.records.commits.set(s.id,s),E.records.branches.set(E.records.currBranch,s.id),h.debug("in pushCommit "+s.id)},"commit"),R=c(function(t){let r=t.name;const e=t.order;if(r=y.sanitizeText(r,B()),E.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);E.records.branches.set(r,null!=E.records.head?E.records.head.id:null),E.records.branchConfig.set(r,{name:r,order:e}),A(r),h.debug("in createBranch")},"branch"),P=c(t=>{let r=t.branch,e=t.id;const o=t.type,n=t.tags,a=B();r=y.sanitizeText(r,a),e&&(e=y.sanitizeText(e,a));const s=E.records.branches.get(E.records.currBranch),i=E.records.branches.get(r),c=s?E.records.commits.get(s):void 0,d=i?E.records.commits.get(i):void 0;if(c&&d&&c.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(E.records.currBranch===r){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(void 0===c||!c){const t=new Error(`Incorrect usage of "merge". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},t}if(!E.records.branches.has(r)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},t}if(void 0===d||!d){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},t}if(c===d){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(e&&E.records.commits.has(e)){const t=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom id");throw t.hash={text:`merge ${r} ${e} ${o} ${n?.join(" ")}`,token:`merge ${r} ${e} ${o} ${n?.join(" ")}`,expected:[`merge ${r} ${e}_UNIQUE ${o} ${n?.join(" ")}`]},t}const m=i||"",$={id:e||`${E.records.seq}-${C()}`,message:`merged branch ${r} into ${E.records.currBranch}`,seq:E.records.seq++,parents:null==E.records.head?[]:[E.records.head.id,m],branch:E.records.currBranch,type:w.MERGE,customType:o,customId:!!e,tags:n??[]};E.records.head=$,E.records.commits.set($.id,$),E.records.branches.set(E.records.currBranch,$.id),h.debug(E.records.branches),h.debug("in mergeBranch")},"merge"),O=c(function(t){let r=t.id,e=t.targetId,o=t.tags,n=t.parent;h.debug("Entering cherryPick:",r,e,o);const a=B();if(r=y.sanitizeText(r,a),e=y.sanitizeText(e,a),o=o?.map(t=>y.sanitizeText(t,a)),n=y.sanitizeText(n,a),!r||!E.records.commits.has(r)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const s=E.records.commits.get(r);if(void 0===s||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&(!Array.isArray(s.parents)||!s.parents.includes(n))){throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.")}const i=s.branch;if(s.type===w.MERGE&&!n){throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.")}if(!e||!E.records.commits.has(e)){if(i===E.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const t=E.records.branches.get(E.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const a=E.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const c={id:E.records.seq+"-"+C(),message:`cherry-picked ${s?.message} into ${E.records.currBranch}`,seq:E.records.seq++,parents:null==E.records.head?[]:[E.records.head.id,s.id],branch:E.records.currBranch,type:w.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${s.id}${s.type===w.MERGE?`|parent:${n}`:""}`]};E.records.head=c,E.records.commits.set(c.id,c),E.records.branches.set(E.records.currBranch,c.id),h.debug(E.records.branches),h.debug("in cherryPick")}},"cherryPick"),A=c(function(t){if(t=y.sanitizeText(t,B()),!E.records.branches.has(t)){const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}{E.records.currBranch=t;const r=E.records.branches.get(E.records.currBranch);E.records.head=void 0!==r&&r?E.records.commits.get(r)??null:null}},"checkout");function G(t,r,e){const o=t.indexOf(r);-1===o?t.push(e):t.splice(o,1,e)}function S(t){const r=t.reduce((t,r)=>t.seq>r.seq?t:r,t[0]);let e="";t.forEach(function(t){e+=t===r?"\t*":"\t|"});const o=[e,r.id,r.seq];for(const t in E.records.branches)E.records.branches.get(t)===r.id&&o.push(t);if(h.debug(o.join(" ")),r.parents&&2==r.parents.length&&r.parents[0]&&r.parents[1]){const e=E.records.commits.get(r.parents[0]);G(t,r,e),r.parents[1]&&t.push(E.records.commits.get(r.parents[1]))}else{if(0==r.parents.length)return;if(r.parents[0]){const e=E.records.commits.get(r.parents[0]);G(t,r,e)}}S(t=L(t,t=>t.id))}c(G,"upsert"),c(S,"prettyPrintCommitHistory");var W=c(function(){h.debug(E.records.commits);S([z()[0]])},"prettyPrint"),j=c(function(){E.reset(),p()},"clear"),H=c(function(){return[...E.records.branchConfig.values()].map((t,r)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),q=c(function(){return E.records.branches},"getBranches"),_=c(function(){return E.records.commits},"getCommits"),z=c(function(){const t=[...E.records.commits.values()];return t.forEach(function(t){h.debug(t.id)}),t.sort((t,r)=>t.seq-r.seq),t},"getCommitsArray"),D={commitType:w,getConfig:B,setDirection:T,setOptions:M,getOptions:v,commit:I,branch:R,merge:P,cherryPick:O,checkout:A,prettyPrint:W,clear:j,getBranchesAsObjArray:H,getBranches:q,getCommits:_,getCommitsArray:z,getCurrentBranch:c(function(){return E.records.currBranch},"getCurrentBranch"),getDirection:c(function(){return E.records.direction},"getDirection"),getHead:c(function(){return E.records.head},"getHead"),setAccTitle:i,getAccTitle:s,getAccDescription:a,setAccDescription:n,setDiagramTitle:o,getDiagramTitle:e},F=c((t,e)=>{r(t,e),t.dir&&e.setDirection(t.dir);for(const r of t.statements)N(r,e)},"populate"),N=c((t,r)=>{const e={Commit:c(t=>r.commit(K(t)),"Commit"),Branch:c(t=>r.branch(V(t)),"Branch"),Merge:c(t=>r.merge(Y(t)),"Merge"),Checkout:c(t=>r.checkout(Q(t)),"Checkout"),CherryPicking:c(t=>r.cherryPick(U(t)),"CherryPicking")}[t.$type];e?e(t):h.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),K=c(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?w[t.type]:w.NORMAL,tags:t.tags??void 0}),"parseCommit"),V=c(t=>({name:t.name,order:t.order??0}),"parseBranch"),Y=c(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?w[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Q=c(t=>t.branch,"parseCheckout"),U=c(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),J={parse:c(async t=>{const r=await b("gitGraph",t);h.debug(r),F(r,D)},"parse")},X=10,Z=40,tt=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),rt=new Set(["redux-color","redux-dark-color"]),et=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),ot=c((t,r,e=!1)=>e&&t>0?(t-1)%(r-1)+1:t%r,"calcColorIndex"),nt=new Map,at=new Map,st=new Map,it=[],ct=0,dt="LR",ht=c(()=>{nt.clear(),at.clear(),st.clear(),ct=0,it=[],dt="LR"},"clear"),mt=c(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)}),r},"drawText"),$t=c(t=>{let r,e,o;return"BT"===dt?(e=c((t,r)=>t<=r,"comparisonFunc"),o=1/0):(e=c((t,r)=>t>=r,"comparisonFunc"),o=0),t.forEach(t=>{const n="TB"===dt||"BT"==dt?at.get(t)?.y:at.get(t)?.x;void 0!==n&&e(n,o)&&(r=t,o=n)}),r},"findClosestParent"),lt=c(t=>{let r="",e=1/0;return t.forEach(t=>{const o=at.get(t).y;o<=e&&(r=t,e=o)}),r||void 0},"findClosestParentBT"),gt=c((t,r,e)=>{let o=e,n=e;const a=[];t.forEach(t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);e.parents.length?(o=yt(e),n=Math.max(o,n)):a.push(e),ft(e,o)}),o=n,a.forEach(t=>{xt(t,o,e)}),t.forEach(t=>{const e=r.get(t);if(e?.parents.length){const t=lt(e.parents);o=at.get(t).y-Z,o<=n&&(n=o);const r=nt.get(e.branch).pos,a=o-X;at.set(e.id,{x:r,y:a})}})},"setParallelBTPos"),pt=c(t=>{const r=$t(t.parents.filter(t=>null!==t));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const e=at.get(r)?.y;if(void 0===e)throw new Error(`Closest parent position not found for commit ${t.id}`);return e},"findClosestParentPos"),yt=c(t=>pt(t)+Z,"calculateCommitPosition"),ft=c((t,r)=>{const e=nt.get(t.branch);if(!e)throw new Error(`Branch not found for commit ${t.id}`);const o=e.pos,n=r+X;return at.set(t.id,{x:o,y:n}),{x:o,y:n}},"setCommitPosition"),xt=c((t,r,e)=>{const o=nt.get(t.branch);if(!o)throw new Error(`Branch not found for commit ${t.id}`);const n=r+e,a=o.pos;at.set(t.id,{x:a,y:n})},"setRootPosition"),ut=c((t,r,e,o,n,a)=>{const{theme:s}=$(),i=tt.has(s??""),c=rt.has(s??""),d=et.has(s??"");if(a===w.HIGHLIGHT)t.append("rect").attr("x",e.x-10+(i?3:0)).attr("y",e.y-10+(i?3:0)).attr("width",i?14:20).attr("height",i?14:20).attr("class",`commit ${r.id} commit-highlight${ot(n,8,c)} ${o}-outer`),t.append("rect").attr("x",e.x-6+(i?2:0)).attr("y",e.y-6+(i?2:0)).attr("width",i?8:12).attr("height",i?8:12).attr("class",`commit ${r.id} commit${ot(n,8,c)} ${o}-inner`);else if(a===w.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",i?7:10).attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",i?2.5:2.75).attr("fill",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",i?2.5:2.75).attr("fill",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const s=t.append("circle");if(s.attr("cx",e.x),s.attr("cy",e.y),s.attr("r",i?7:10),s.attr("class",`commit ${r.id} commit${ot(n,8,c)}`),a===w.MERGE){const a=t.append("circle");a.attr("cx",e.x),a.attr("cy",e.y),a.attr("r",i?5:6),a.attr("class",`commit ${o} ${r.id} commit${ot(n,8,c)}`)}if(a===w.REVERSE){const a=i?4:5;t.append("path").attr("d",`M ${e.x-a},${e.y-a}L${e.x+a},${e.y+a}M${e.x-a},${e.y+a}L${e.x+a},${e.y-a}`).attr("class",`commit ${o} ${r.id} commit${ot(n,8,c)}`)}}},"drawCommitBullet"),bt=c((t,r,e,o,n)=>{if(r.type!==w.CHERRY_PICK&&(r.customId&&r.type===w.MERGE||r.type!==w.MERGE)&&n.showCommitLabel){const a=t.append("g"),s=a.insert("rect").attr("class","commit-label-bkg"),i=a.append("text").attr("x",o).attr("y",e.y+25).attr("class","commit-label").text(r.id),c=i.node()?.getBBox();if(c&&(s.attr("x",e.posWithOffset-c.width/2-2).attr("y",e.y+13.5).attr("width",c.width+4).attr("height",c.height+4),"TB"===dt||"BT"===dt?(s.attr("x",e.x-(c.width+16+5)).attr("y",e.y-12),i.attr("x",e.x-(c.width+16)).attr("y",e.y+c.height-12)):i.attr("x",e.posWithOffset-c.width/2),n.rotateCommitLabel))if("TB"===dt||"BT"===dt)i.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),s.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{const t=-7.5-(c.width+10)/25*9.5,r=10+c.width/25*8.5;a.attr("transform","translate("+t+", "+r+") rotate(-45, "+o+", "+e.y+")")}}},"drawCommitLabel"),wt=c((t,r,e,o)=>{if(r.tags.length>0){let n=0,a=0,s=0;const i=[];for(const o of r.tags.reverse()){const r=t.insert("polygon"),c=t.append("circle"),d=t.append("text").attr("y",e.y-16-n).attr("class","tag-label").text(o),h=d.node()?.getBBox();if(!h)throw new Error("Tag bbox not found");a=Math.max(a,h.width),s=Math.max(s,h.height),d.attr("x",e.posWithOffset-h.width/2),i.push({tag:d,hole:c,rect:r,yOffset:n}),n+=20}for(const{tag:t,hole:r,rect:n,yOffset:c}of i){const i=s/2,d=e.y-19.2-c;if(n.attr("class","tag-label-bkg").attr("points",`\n ${o-a/2-2},${d+2} \n ${o-a/2-2},${d-2}\n ${e.posWithOffset-a/2-4},${d-i-2}\n ${e.posWithOffset+a/2+4},${d-i-2}\n ${e.posWithOffset+a/2+4},${d+i+2}\n ${e.posWithOffset-a/2-4},${d+i+2}`),r.attr("cy",d).attr("cx",o-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===dt||"BT"===dt){const s=o+c;n.attr("class","tag-label-bkg").attr("points",`\n ${e.x},${s+2}\n ${e.x},${s-2}\n ${e.x+X},${s-i-2}\n ${e.x+X+a+4},${s-i-2}\n ${e.x+X+a+4},${s+i+2}\n ${e.x+X},${s+i+2}`).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),r.attr("cx",e.x+2).attr("cy",s).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),t.attr("x",e.x+5).attr("y",s+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+o+")")}}}},"drawCommitTags"),kt=c(t=>{switch(t.customType??t.type){case w.NORMAL:return"commit-normal";case w.REVERSE:return"commit-reverse";case w.HIGHLIGHT:return"commit-highlight";case w.MERGE:return"commit-merge";case w.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Bt=c((t,r,e,o)=>{const n={x:0,y:0};if(!(t.parents.length>0)){if("TB"===r)return 30;if("BT"===r){return(o.get(t.id)??n).y-Z}return 0}{const e=$t(t.parents);if(e){const a=o.get(e)??n;if("TB"===r)return a.y+Z;if("BT"===r){return(o.get(t.id)??n).y-Z}return a.x+Z}}return 0},"calculatePosition"),Et=c((t,r,e)=>{const o="BT"===dt&&e?r:r+X,n=nt.get(t.branch)?.pos,a="TB"===dt||"BT"===dt?nt.get(t.branch)?.pos:o;if(void 0===a||void 0===n)throw new Error(`Position were undefined for commit ${t.id}`);const s=tt.has($().theme??"");return{x:a,y:"TB"===dt||"BT"===dt?o:n+(s?7:-2),posWithOffset:o}},"getCommitPosition"),Ct=c((t,r,e,o)=>{const n=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels");let s="TB"===dt||"BT"===dt?30:0;const i=[...r.keys()],d=o.parallelCommits??!1,h=c((t,e)=>{const o=r.get(t)?.seq,n=r.get(e)?.seq;return void 0!==o&&void 0!==n?o-n:0},"sortKeys");let m=i.sort(h);"BT"===dt&&(d&&gt(m,r,s),m=m.reverse()),m.forEach(t=>{const i=r.get(t);if(!i)throw new Error(`Commit not found for key ${t}`);d&&(s=Bt(i,dt,s,at));const c=Et(i,s,d);if(e){const t=kt(i),r=i.customType??i.type,e=nt.get(i.branch)?.index??0;ut(n,i,c,t,e,r),bt(a,i,c,s,o),wt(a,i,c,s)}"TB"===dt||"BT"===dt?at.set(i.id,{x:c.x,y:c.posWithOffset}):at.set(i.id,{x:c.posWithOffset,y:c.y}),s="BT"===dt&&d?s+Z:s+Z+X,s>ct&&(ct=s)})},"drawCommits"),Lt=c((t,r,e,o,n)=>{const a=("TB"===dt||"BT"===dt?e.x<o.x:e.y<o.y)?r.branch:t.branch,s=c(t=>t.branch===a,"isOnBranchToGetCurve"),i=c(e=>e.seq>t.seq&&e.seq<r.seq,"isBetweenCommits");return[...n.values()].some(t=>i(t)&&s(t))},"shouldRerouteArrow"),Tt=c((t,r,e=0)=>{const o=t+Math.abs(t-r)/2;if(e>5)return o;if(it.every(t=>Math.abs(t-o)>=10))return it.push(o),o;const n=Math.abs(t-r);return Tt(t,r-n/5,e+1)},"findLane"),Mt=c((t,r,e,o)=>{const{theme:n}=$(),a=rt.has(n??""),s=at.get(r.id),i=at.get(e.id);if(void 0===s||void 0===i)throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);const c=Lt(r,e,s,i,o);let d,h="",m="",l=0,g=0,p=nt.get(e.branch)?.index;if(e.type===w.MERGE&&r.id!==e.parents[0]&&(p=nt.get(r.branch)?.index),c){h="A 10 10, 0, 0, 0,",m="A 10 10, 0, 0, 1,",l=10,g=10;const t=s.y<i.y?Tt(s.y,i.y):Tt(i.y,s.y),e=s.x<i.x?Tt(s.x,i.x):Tt(i.x,s.x);"TB"===dt?s.x<i.x?d=`M ${s.x} ${s.y} L ${e-l} ${s.y} ${m} ${e} ${s.y+g} L ${e} ${i.y-l} ${h} ${e+g} ${i.y} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${e+l} ${s.y} ${h} ${e} ${s.y+g} L ${e} ${i.y-l} ${m} ${e-g} ${i.y} L ${i.x} ${i.y}`):"BT"===dt?s.x<i.x?d=`M ${s.x} ${s.y} L ${e-l} ${s.y} ${h} ${e} ${s.y-g} L ${e} ${i.y+l} ${m} ${e+g} ${i.y} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${e+l} ${s.y} ${m} ${e} ${s.y-g} L ${e} ${i.y+l} ${h} ${e-g} ${i.y} L ${i.x} ${i.y}`):s.y<i.y?d=`M ${s.x} ${s.y} L ${s.x} ${t-l} ${h} ${s.x+g} ${t} L ${i.x-l} ${t} ${m} ${i.x} ${t+g} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${s.x} ${t+l} ${m} ${s.x+g} ${t} L ${i.x-l} ${t} ${h} ${i.x} ${t-g} L ${i.x} ${i.y}`)}else h="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",l=20,g=20,"TB"===dt?(s.x<i.x&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${h} ${s.x+g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${m} ${i.x} ${s.y+g} L ${i.x} ${i.y}`),s.x>i.x&&(h="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",l=20,g=20,d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${m} ${s.x-g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x+l} ${s.y} ${h} ${i.x} ${s.y+g} L ${i.x} ${i.y}`),s.x===i.x&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`)):"BT"===dt?(s.x<i.x&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${m} ${s.x+g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${h} ${i.x} ${s.y-g} L ${i.x} ${i.y}`),s.x>i.x&&(h="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",l=20,g=20,d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${h} ${s.x-g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x+l} ${s.y} ${m} ${i.x} ${s.y-g} L ${i.x} ${i.y}`),s.x===i.x&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`)):(s.y<i.y&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${m} ${i.x} ${s.y+g} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${h} ${s.x+g} ${i.y} L ${i.x} ${i.y}`),s.y>i.y&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${h} ${i.x} ${s.y-g} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${m} ${s.x+g} ${i.y} L ${i.x} ${i.y}`),s.y===i.y&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`));if(void 0===d)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+ot(p,8,a))},"drawArrow"),vt=c((t,r)=>{const e=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{const o=r.get(t);o.parents&&o.parents.length>0&&o.parents.forEach(t=>{Mt(e,r.get(t),o,r)})})},"drawArrows"),It=c((t,r,e,o)=>{const{look:n,theme:a,themeVariables:s}=$(),{dropShadow:i,THEME_COLOR_LIMIT:c}=s,d=tt.has(a??""),h=rt.has(a??""),m=t.append("g");r.forEach((t,r)=>{const a=ot(r,d?c:8,h),s=nt.get(t.name)?.pos;if(void 0===s)throw new Error(`Position not found for branch ${t.name}`);const $="TB"===dt||"BT"===dt?s:d?s+6+1:s-2,l=m.append("line");l.attr("x1",0),l.attr("y1",$),l.attr("x2",ct),l.attr("y2",$),l.attr("class","branch branch"+a),"TB"===dt?(l.attr("y1",30),l.attr("x1",s),l.attr("y2",ct),l.attr("x2",s)):"BT"===dt&&(l.attr("y1",ct),l.attr("x1",s),l.attr("y2",30),l.attr("x2",s)),it.push($);const g=t.name,p=mt(g),y=m.insert("rect"),f=m.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);f.node().appendChild(p);const x=p.getBBox(),u=d?0:4,b=d?16:0,w=d?12:0;"neo"===n&&y.attr("data-look","neo"),y.attr("class","branchLabelBkg label"+a).attr("style","neo"===n?`filter:${d?`url(#${o}-drop-shadow)`:i}`:"").attr("rx",u).attr("ry",u).attr("x",-x.width-4-(!0===e.rotateCommitLabel?30:0)).attr("y",-x.height/2+10).attr("width",x.width+18+b).attr("height",x.height+4+w),f.attr("transform","translate("+(-x.width-14-(!0===e.rotateCommitLabel?30:0)+b/2)+", "+($-x.height/2-2)+")"),"TB"===dt?(y.attr("x",s-x.width/2-10).attr("y",0),f.attr("transform","translate("+(s-x.width/2-5)+", 0)"),d&&(y.attr("transform",`translate(${-b/2-3}, ${-w-10})`),f.attr("transform","translate("+(s-x.width/2-5)+", "+(2*-w+7)+")"))):"BT"===dt?(y.attr("x",s-x.width/2-10).attr("y",ct),f.attr("transform","translate("+(s-x.width/2-5)+", "+ct+")"),d&&(y.attr("transform",`translate(${-b/2-3}, ${w+10})`),f.attr("transform","translate("+(s-x.width/2-5)+", "+(ct+2*w+4)+")"))):y.attr("transform","translate(-19, "+($-12-w/2)+")")})},"drawBranches"),Rt=c(function(t,r,e,o,n){return nt.set(t,{pos:r,index:e}),r+=50+(n?40:0)+("TB"===dt||"BT"===dt?o.width/2:0)},"setBranchPosition"),Pt={draw:c(function(t,r,e,o){ht(),h.debug("in gitgraph renderer",t+"\n","id:",r,e);const n=o.db;if(!n.getConfig)return void h.error("getConfig method is not available on db");const a=n.getConfig(),s=a.rotateCommitLabel??!1;st=n.getCommits();const i=n.getBranchesAsObjArray();dt=n.getDirection();const c=m(`[id="${r}"]`),{look:d,theme:p,themeVariables:y}=$(),{useGradient:f,gradientStart:x,gradientStop:u,filterColor:b}=y;if(f){const t=c.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("stop").attr("offset","0%").attr("stop-color",x).attr("stop-opacity",1),t.append("stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}"neo"===d&&tt.has(p??"")&&c.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",b);let w=0;i.forEach((t,r)=>{const e=mt(t.name),o=c.append("g"),n=o.insert("g").attr("class","branchLabel"),a=n.insert("g").attr("class","label branch-label");a.node()?.appendChild(e);const i=e.getBBox();w=Rt(t.name,w,r,i,s),a.remove(),n.remove(),o.remove()}),Ct(c,st,!1,a),a.showBranches&&It(c,i,a,r),vt(c,st),Ct(c,st,!0,a),l.insertTitle(c,"gitTitleText",a.titleTopMargin??0,n.getDiagramTitle()),g(void 0,c,a.diagramPadding,a.useMaxWidth)},"draw")},Ot=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),At=new Set(["redux-color","redux-dark-color"]),Gt=new Set(["neo","neo-dark"]),St=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Wt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),jt=c(t=>{const{svgId:r}=t;let e="";if(t.useGradient&&r)for(let o=0;o<t.THEME_COLOR_LIMIT;o++)e+=`\n .label${o} { fill: ${t.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${t.strokeWidth};}\n `;return e},"genGitGraphGradient"),Ht=c(t=>{const r=d(),{theme:e,themeVariables:o}=r,{borderColorArray:n}=o,a=Ot.has(e);if(Gt.has(e)){let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)if(0===e)r+=`\n .branch-label${e} { fill: ${t.nodeBorder};}\n .commit${e} { stroke: ${t.nodeBorder}; }\n .commit-highlight${e} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }\n .arrow${e} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n .commit-cherry-pick${e} { stroke: ${t.nodeBorder}; }\n ${jt(t)}`;else{const o=e%8;r+=`\n .branch-label${e} { fill: ${t["gitBranchLabel"+o]}; }\n .commit${e} { stroke: ${t["git"+o]}; fill: ${t["git"+o]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+o]}; fill: ${t["gitInv"+o]}; }\n .arrow${e} { stroke: ${t["git"+o]}; }\n `}return r}if(At.has(e)){let r="";for(let o=0;o<t.THEME_COLOR_LIMIT;o++)if(0===o)r+=`\n .branch-label${o} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${o} { stroke: ${t.nodeBorder}; }\n .commit-highlight${o} { stroke: ${t.nodeBorder}; fill: ${t.mainBkg}; }\n .label${o} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .arrow${o} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n `;else{const s=o%n.length;r+=`\n .branch-label${o} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${o} { stroke: ${n[s]}; fill: ${n[s]}; }\n .commit-highlight${o} { stroke: ${n[s]}; fill: ${n[s]}; }\n .label${o} { fill: ${St.has(e)?t.mainBkg:n[s]}; stroke: ${n[s]}; stroke-width: ${t.strokeWidth}; }\n .arrow${o} { stroke: ${n[s]}; }\n `}return r}{let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)r+=`\n .branch-label${e} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${e} { stroke: ${t.nodeBorder}; }\n .commit-highlight${e} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }\n .label${e} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${a?`font-weight:${t.noteFontWeight}`:""}}\n .arrow${e} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n .commit-cherry-pick${e} { stroke: ${t.nodeBorder}; }\n `;return r}},"genColor"),qt=c(t=>`${Array.from({length:t.THEME_COLOR_LIMIT},(t,r)=>r).map(r=>{const e=r%8;return`\n .branch-label${r} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${r} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${r} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${r} { fill: ${t["git"+e]}; }\n .arrow${r} { stroke: ${t["git"+e]}; }\n `}).join("\n")}`,"normalTheme"),_t={parser:J,db:D,renderer:Pt,styles:c(t=>{const r=d(),{theme:e}=r,o=Wt.has(e);return`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n \n ${o?Ht(t):qt(t)}\n\n .branch {\n stroke-width: ${t.strokeWidth};\n stroke: ${t.commitLineColor??t.lineColor};\n stroke-dasharray: ${o?"4 2":"2"};\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${o?t.nodeBorder:t.commitLabelColor}; ${o?`font-weight:${t.noteFontWeight};`:""}}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${o?"transparent":t.commitLabelBackground}; opacity: ${o?"":.5}; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${o?t.mainBkg:t.tagLabelBackground}; stroke: ${o?t.nodeBorder:t.tagLabelBorder}; ${o?`filter:${t.dropShadow}`:""} }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n }\n .commit-reverse {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n stroke-width: ${o?t.strokeWidth:3};\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n }\n\n .arrow {\n /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */\n stroke-width: ${Ot.has(e)?t.strokeWidth:8};\n stroke-linecap: round;\n fill: none\n }\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`},"getStyles")};export{_t as diagram};
1
+ import{I as t}from"./chunk-2Q5K7J3B-CyZYeWxE.js";import{p as r}from"./chunk-JWPE2WC7-Ct5OBLCL.js";import{x as e,v as o,s as n,g as a,a as s,b as i,_ as c,O as d,l as h,k as m,c as $,u as l,P as g,C as p,m as y,Q as f,R as x,S as u}from"./mermaid.core-DRk6tt5W.js";import{p as b}from"./cynefin-EF2NZ3EQ-CaJSaYBh.js";import"./index-BpcqEzEG.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-iref2pEJ.js";import"./settings-CBGV-lz3.js";import"./constants.js";import"./LoaderLayer-ECtsj85k.js";import"./websocket-CdeP8N_S.js";import"./index-2PTQqTnK.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./string-DPJhNSkw.js";var w={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},k=x.gitGraph,B=c(()=>f({...k,...d().gitGraph}),"getConfig"),E=new t(()=>{const t=B(),r=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:e}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function C(){return u({length:7})}function L(t,r){const e=Object.create(null);return t.reduce((t,o)=>{const n=r(o);return e[n]||(e[n]=!0,t.push(o)),t},[])}c(C,"getID"),c(L,"uniqBy");var T=c(function(t){E.records.direction=t},"setDirection"),M=c(function(t){h.debug("options str",t),t=t?.trim(),t=t||"{}";try{E.records.options=JSON.parse(t)}catch(t){h.error("error while parsing gitGraph options",t.message)}},"setOptions"),v=c(function(){return E.records.options},"getOptions"),I=c(function(t){let r=t.msg,e=t.id;const o=t.type;let n=t.tags;h.info("commit",r,e,o,n),h.debug("Entering commit:",r,e,o,n);const a=B();e=y.sanitizeText(e,a),r=y.sanitizeText(r,a),n=n?.map(t=>y.sanitizeText(t,a));const s={id:e||E.records.seq+"-"+C(),message:r,seq:E.records.seq++,type:o??w.NORMAL,tags:n??[],parents:null==E.records.head?[]:[E.records.head.id],branch:E.records.currBranch};E.records.head=s,h.info("main branch",a.mainBranchName),E.records.commits.has(s.id)&&h.warn(`Commit ID ${s.id} already exists`),E.records.commits.set(s.id,s),E.records.branches.set(E.records.currBranch,s.id),h.debug("in pushCommit "+s.id)},"commit"),R=c(function(t){let r=t.name;const e=t.order;if(r=y.sanitizeText(r,B()),E.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);E.records.branches.set(r,null!=E.records.head?E.records.head.id:null),E.records.branchConfig.set(r,{name:r,order:e}),A(r),h.debug("in createBranch")},"branch"),P=c(t=>{let r=t.branch,e=t.id;const o=t.type,n=t.tags,a=B();r=y.sanitizeText(r,a),e&&(e=y.sanitizeText(e,a));const s=E.records.branches.get(E.records.currBranch),i=E.records.branches.get(r),c=s?E.records.commits.get(s):void 0,d=i?E.records.commits.get(i):void 0;if(c&&d&&c.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(E.records.currBranch===r){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(void 0===c||!c){const t=new Error(`Incorrect usage of "merge". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},t}if(!E.records.branches.has(r)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},t}if(void 0===d||!d){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},t}if(c===d){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(e&&E.records.commits.has(e)){const t=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom id");throw t.hash={text:`merge ${r} ${e} ${o} ${n?.join(" ")}`,token:`merge ${r} ${e} ${o} ${n?.join(" ")}`,expected:[`merge ${r} ${e}_UNIQUE ${o} ${n?.join(" ")}`]},t}const m=i||"",$={id:e||`${E.records.seq}-${C()}`,message:`merged branch ${r} into ${E.records.currBranch}`,seq:E.records.seq++,parents:null==E.records.head?[]:[E.records.head.id,m],branch:E.records.currBranch,type:w.MERGE,customType:o,customId:!!e,tags:n??[]};E.records.head=$,E.records.commits.set($.id,$),E.records.branches.set(E.records.currBranch,$.id),h.debug(E.records.branches),h.debug("in mergeBranch")},"merge"),O=c(function(t){let r=t.id,e=t.targetId,o=t.tags,n=t.parent;h.debug("Entering cherryPick:",r,e,o);const a=B();if(r=y.sanitizeText(r,a),e=y.sanitizeText(e,a),o=o?.map(t=>y.sanitizeText(t,a)),n=y.sanitizeText(n,a),!r||!E.records.commits.has(r)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const s=E.records.commits.get(r);if(void 0===s||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&(!Array.isArray(s.parents)||!s.parents.includes(n))){throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.")}const i=s.branch;if(s.type===w.MERGE&&!n){throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.")}if(!e||!E.records.commits.has(e)){if(i===E.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const t=E.records.branches.get(E.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const a=E.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const c={id:E.records.seq+"-"+C(),message:`cherry-picked ${s?.message} into ${E.records.currBranch}`,seq:E.records.seq++,parents:null==E.records.head?[]:[E.records.head.id,s.id],branch:E.records.currBranch,type:w.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${s.id}${s.type===w.MERGE?`|parent:${n}`:""}`]};E.records.head=c,E.records.commits.set(c.id,c),E.records.branches.set(E.records.currBranch,c.id),h.debug(E.records.branches),h.debug("in cherryPick")}},"cherryPick"),A=c(function(t){if(t=y.sanitizeText(t,B()),!E.records.branches.has(t)){const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}{E.records.currBranch=t;const r=E.records.branches.get(E.records.currBranch);E.records.head=void 0!==r&&r?E.records.commits.get(r)??null:null}},"checkout");function G(t,r,e){const o=t.indexOf(r);-1===o?t.push(e):t.splice(o,1,e)}function S(t){const r=t.reduce((t,r)=>t.seq>r.seq?t:r,t[0]);let e="";t.forEach(function(t){e+=t===r?"\t*":"\t|"});const o=[e,r.id,r.seq];for(const t in E.records.branches)E.records.branches.get(t)===r.id&&o.push(t);if(h.debug(o.join(" ")),r.parents&&2==r.parents.length&&r.parents[0]&&r.parents[1]){const e=E.records.commits.get(r.parents[0]);G(t,r,e),r.parents[1]&&t.push(E.records.commits.get(r.parents[1]))}else{if(0==r.parents.length)return;if(r.parents[0]){const e=E.records.commits.get(r.parents[0]);G(t,r,e)}}S(t=L(t,t=>t.id))}c(G,"upsert"),c(S,"prettyPrintCommitHistory");var W=c(function(){h.debug(E.records.commits);S([z()[0]])},"prettyPrint"),j=c(function(){E.reset(),p()},"clear"),H=c(function(){return[...E.records.branchConfig.values()].map((t,r)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),q=c(function(){return E.records.branches},"getBranches"),_=c(function(){return E.records.commits},"getCommits"),z=c(function(){const t=[...E.records.commits.values()];return t.forEach(function(t){h.debug(t.id)}),t.sort((t,r)=>t.seq-r.seq),t},"getCommitsArray"),D={commitType:w,getConfig:B,setDirection:T,setOptions:M,getOptions:v,commit:I,branch:R,merge:P,cherryPick:O,checkout:A,prettyPrint:W,clear:j,getBranchesAsObjArray:H,getBranches:q,getCommits:_,getCommitsArray:z,getCurrentBranch:c(function(){return E.records.currBranch},"getCurrentBranch"),getDirection:c(function(){return E.records.direction},"getDirection"),getHead:c(function(){return E.records.head},"getHead"),setAccTitle:i,getAccTitle:s,getAccDescription:a,setAccDescription:n,setDiagramTitle:o,getDiagramTitle:e},F=c((t,e)=>{r(t,e),t.dir&&e.setDirection(t.dir);for(const r of t.statements)N(r,e)},"populate"),N=c((t,r)=>{const e={Commit:c(t=>r.commit(K(t)),"Commit"),Branch:c(t=>r.branch(V(t)),"Branch"),Merge:c(t=>r.merge(Y(t)),"Merge"),Checkout:c(t=>r.checkout(Q(t)),"Checkout"),CherryPicking:c(t=>r.cherryPick(U(t)),"CherryPicking")}[t.$type];e?e(t):h.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),K=c(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?w[t.type]:w.NORMAL,tags:t.tags??void 0}),"parseCommit"),V=c(t=>({name:t.name,order:t.order??0}),"parseBranch"),Y=c(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?w[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Q=c(t=>t.branch,"parseCheckout"),U=c(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),J={parse:c(async t=>{const r=await b("gitGraph",t);h.debug(r),F(r,D)},"parse")},X=10,Z=40,tt=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),rt=new Set(["redux-color","redux-dark-color"]),et=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),ot=c((t,r,e=!1)=>e&&t>0?(t-1)%(r-1)+1:t%r,"calcColorIndex"),nt=new Map,at=new Map,st=new Map,it=[],ct=0,dt="LR",ht=c(()=>{nt.clear(),at.clear(),st.clear(),ct=0,it=[],dt="LR"},"clear"),mt=c(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)}),r},"drawText"),$t=c(t=>{let r,e,o;return"BT"===dt?(e=c((t,r)=>t<=r,"comparisonFunc"),o=1/0):(e=c((t,r)=>t>=r,"comparisonFunc"),o=0),t.forEach(t=>{const n="TB"===dt||"BT"==dt?at.get(t)?.y:at.get(t)?.x;void 0!==n&&e(n,o)&&(r=t,o=n)}),r},"findClosestParent"),lt=c(t=>{let r="",e=1/0;return t.forEach(t=>{const o=at.get(t).y;o<=e&&(r=t,e=o)}),r||void 0},"findClosestParentBT"),gt=c((t,r,e)=>{let o=e,n=e;const a=[];t.forEach(t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);e.parents.length?(o=yt(e),n=Math.max(o,n)):a.push(e),ft(e,o)}),o=n,a.forEach(t=>{xt(t,o,e)}),t.forEach(t=>{const e=r.get(t);if(e?.parents.length){const t=lt(e.parents);o=at.get(t).y-Z,o<=n&&(n=o);const r=nt.get(e.branch).pos,a=o-X;at.set(e.id,{x:r,y:a})}})},"setParallelBTPos"),pt=c(t=>{const r=$t(t.parents.filter(t=>null!==t));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const e=at.get(r)?.y;if(void 0===e)throw new Error(`Closest parent position not found for commit ${t.id}`);return e},"findClosestParentPos"),yt=c(t=>pt(t)+Z,"calculateCommitPosition"),ft=c((t,r)=>{const e=nt.get(t.branch);if(!e)throw new Error(`Branch not found for commit ${t.id}`);const o=e.pos,n=r+X;return at.set(t.id,{x:o,y:n}),{x:o,y:n}},"setCommitPosition"),xt=c((t,r,e)=>{const o=nt.get(t.branch);if(!o)throw new Error(`Branch not found for commit ${t.id}`);const n=r+e,a=o.pos;at.set(t.id,{x:a,y:n})},"setRootPosition"),ut=c((t,r,e,o,n,a)=>{const{theme:s}=$(),i=tt.has(s??""),c=rt.has(s??""),d=et.has(s??"");if(a===w.HIGHLIGHT)t.append("rect").attr("x",e.x-10+(i?3:0)).attr("y",e.y-10+(i?3:0)).attr("width",i?14:20).attr("height",i?14:20).attr("class",`commit ${r.id} commit-highlight${ot(n,8,c)} ${o}-outer`),t.append("rect").attr("x",e.x-6+(i?2:0)).attr("y",e.y-6+(i?2:0)).attr("width",i?8:12).attr("height",i?8:12).attr("class",`commit ${r.id} commit${ot(n,8,c)} ${o}-inner`);else if(a===w.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",i?7:10).attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",i?2.5:2.75).attr("fill",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",i?2.5:2.75).attr("fill",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const s=t.append("circle");if(s.attr("cx",e.x),s.attr("cy",e.y),s.attr("r",i?7:10),s.attr("class",`commit ${r.id} commit${ot(n,8,c)}`),a===w.MERGE){const a=t.append("circle");a.attr("cx",e.x),a.attr("cy",e.y),a.attr("r",i?5:6),a.attr("class",`commit ${o} ${r.id} commit${ot(n,8,c)}`)}if(a===w.REVERSE){const a=i?4:5;t.append("path").attr("d",`M ${e.x-a},${e.y-a}L${e.x+a},${e.y+a}M${e.x-a},${e.y+a}L${e.x+a},${e.y-a}`).attr("class",`commit ${o} ${r.id} commit${ot(n,8,c)}`)}}},"drawCommitBullet"),bt=c((t,r,e,o,n)=>{if(r.type!==w.CHERRY_PICK&&(r.customId&&r.type===w.MERGE||r.type!==w.MERGE)&&n.showCommitLabel){const a=t.append("g"),s=a.insert("rect").attr("class","commit-label-bkg"),i=a.append("text").attr("x",o).attr("y",e.y+25).attr("class","commit-label").text(r.id),c=i.node()?.getBBox();if(c&&(s.attr("x",e.posWithOffset-c.width/2-2).attr("y",e.y+13.5).attr("width",c.width+4).attr("height",c.height+4),"TB"===dt||"BT"===dt?(s.attr("x",e.x-(c.width+16+5)).attr("y",e.y-12),i.attr("x",e.x-(c.width+16)).attr("y",e.y+c.height-12)):i.attr("x",e.posWithOffset-c.width/2),n.rotateCommitLabel))if("TB"===dt||"BT"===dt)i.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),s.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{const t=-7.5-(c.width+10)/25*9.5,r=10+c.width/25*8.5;a.attr("transform","translate("+t+", "+r+") rotate(-45, "+o+", "+e.y+")")}}},"drawCommitLabel"),wt=c((t,r,e,o)=>{if(r.tags.length>0){let n=0,a=0,s=0;const i=[];for(const o of r.tags.reverse()){const r=t.insert("polygon"),c=t.append("circle"),d=t.append("text").attr("y",e.y-16-n).attr("class","tag-label").text(o),h=d.node()?.getBBox();if(!h)throw new Error("Tag bbox not found");a=Math.max(a,h.width),s=Math.max(s,h.height),d.attr("x",e.posWithOffset-h.width/2),i.push({tag:d,hole:c,rect:r,yOffset:n}),n+=20}for(const{tag:t,hole:r,rect:n,yOffset:c}of i){const i=s/2,d=e.y-19.2-c;if(n.attr("class","tag-label-bkg").attr("points",`\n ${o-a/2-2},${d+2} \n ${o-a/2-2},${d-2}\n ${e.posWithOffset-a/2-4},${d-i-2}\n ${e.posWithOffset+a/2+4},${d-i-2}\n ${e.posWithOffset+a/2+4},${d+i+2}\n ${e.posWithOffset-a/2-4},${d+i+2}`),r.attr("cy",d).attr("cx",o-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===dt||"BT"===dt){const s=o+c;n.attr("class","tag-label-bkg").attr("points",`\n ${e.x},${s+2}\n ${e.x},${s-2}\n ${e.x+X},${s-i-2}\n ${e.x+X+a+4},${s-i-2}\n ${e.x+X+a+4},${s+i+2}\n ${e.x+X},${s+i+2}`).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),r.attr("cx",e.x+2).attr("cy",s).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),t.attr("x",e.x+5).attr("y",s+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+o+")")}}}},"drawCommitTags"),kt=c(t=>{switch(t.customType??t.type){case w.NORMAL:return"commit-normal";case w.REVERSE:return"commit-reverse";case w.HIGHLIGHT:return"commit-highlight";case w.MERGE:return"commit-merge";case w.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Bt=c((t,r,e,o)=>{const n={x:0,y:0};if(!(t.parents.length>0)){if("TB"===r)return 30;if("BT"===r){return(o.get(t.id)??n).y-Z}return 0}{const e=$t(t.parents);if(e){const a=o.get(e)??n;if("TB"===r)return a.y+Z;if("BT"===r){return(o.get(t.id)??n).y-Z}return a.x+Z}}return 0},"calculatePosition"),Et=c((t,r,e)=>{const o="BT"===dt&&e?r:r+X,n=nt.get(t.branch)?.pos,a="TB"===dt||"BT"===dt?nt.get(t.branch)?.pos:o;if(void 0===a||void 0===n)throw new Error(`Position were undefined for commit ${t.id}`);const s=tt.has($().theme??"");return{x:a,y:"TB"===dt||"BT"===dt?o:n+(s?7:-2),posWithOffset:o}},"getCommitPosition"),Ct=c((t,r,e,o)=>{const n=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels");let s="TB"===dt||"BT"===dt?30:0;const i=[...r.keys()],d=o.parallelCommits??!1,h=c((t,e)=>{const o=r.get(t)?.seq,n=r.get(e)?.seq;return void 0!==o&&void 0!==n?o-n:0},"sortKeys");let m=i.sort(h);"BT"===dt&&(d&&gt(m,r,s),m=m.reverse()),m.forEach(t=>{const i=r.get(t);if(!i)throw new Error(`Commit not found for key ${t}`);d&&(s=Bt(i,dt,s,at));const c=Et(i,s,d);if(e){const t=kt(i),r=i.customType??i.type,e=nt.get(i.branch)?.index??0;ut(n,i,c,t,e,r),bt(a,i,c,s,o),wt(a,i,c,s)}"TB"===dt||"BT"===dt?at.set(i.id,{x:c.x,y:c.posWithOffset}):at.set(i.id,{x:c.posWithOffset,y:c.y}),s="BT"===dt&&d?s+Z:s+Z+X,s>ct&&(ct=s)})},"drawCommits"),Lt=c((t,r,e,o,n)=>{const a=("TB"===dt||"BT"===dt?e.x<o.x:e.y<o.y)?r.branch:t.branch,s=c(t=>t.branch===a,"isOnBranchToGetCurve"),i=c(e=>e.seq>t.seq&&e.seq<r.seq,"isBetweenCommits");return[...n.values()].some(t=>i(t)&&s(t))},"shouldRerouteArrow"),Tt=c((t,r,e=0)=>{const o=t+Math.abs(t-r)/2;if(e>5)return o;if(it.every(t=>Math.abs(t-o)>=10))return it.push(o),o;const n=Math.abs(t-r);return Tt(t,r-n/5,e+1)},"findLane"),Mt=c((t,r,e,o)=>{const{theme:n}=$(),a=rt.has(n??""),s=at.get(r.id),i=at.get(e.id);if(void 0===s||void 0===i)throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);const c=Lt(r,e,s,i,o);let d,h="",m="",l=0,g=0,p=nt.get(e.branch)?.index;if(e.type===w.MERGE&&r.id!==e.parents[0]&&(p=nt.get(r.branch)?.index),c){h="A 10 10, 0, 0, 0,",m="A 10 10, 0, 0, 1,",l=10,g=10;const t=s.y<i.y?Tt(s.y,i.y):Tt(i.y,s.y),e=s.x<i.x?Tt(s.x,i.x):Tt(i.x,s.x);"TB"===dt?s.x<i.x?d=`M ${s.x} ${s.y} L ${e-l} ${s.y} ${m} ${e} ${s.y+g} L ${e} ${i.y-l} ${h} ${e+g} ${i.y} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${e+l} ${s.y} ${h} ${e} ${s.y+g} L ${e} ${i.y-l} ${m} ${e-g} ${i.y} L ${i.x} ${i.y}`):"BT"===dt?s.x<i.x?d=`M ${s.x} ${s.y} L ${e-l} ${s.y} ${h} ${e} ${s.y-g} L ${e} ${i.y+l} ${m} ${e+g} ${i.y} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${e+l} ${s.y} ${m} ${e} ${s.y-g} L ${e} ${i.y+l} ${h} ${e-g} ${i.y} L ${i.x} ${i.y}`):s.y<i.y?d=`M ${s.x} ${s.y} L ${s.x} ${t-l} ${h} ${s.x+g} ${t} L ${i.x-l} ${t} ${m} ${i.x} ${t+g} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${s.x} ${t+l} ${m} ${s.x+g} ${t} L ${i.x-l} ${t} ${h} ${i.x} ${t-g} L ${i.x} ${i.y}`)}else h="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",l=20,g=20,"TB"===dt?(s.x<i.x&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${h} ${s.x+g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${m} ${i.x} ${s.y+g} L ${i.x} ${i.y}`),s.x>i.x&&(h="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",l=20,g=20,d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${m} ${s.x-g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x+l} ${s.y} ${h} ${i.x} ${s.y+g} L ${i.x} ${i.y}`),s.x===i.x&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`)):"BT"===dt?(s.x<i.x&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${m} ${s.x+g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${h} ${i.x} ${s.y-g} L ${i.x} ${i.y}`),s.x>i.x&&(h="A 20 20, 0, 0, 0,",m="A 20 20, 0, 0, 1,",l=20,g=20,d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${h} ${s.x-g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x+l} ${s.y} ${m} ${i.x} ${s.y-g} L ${i.x} ${i.y}`),s.x===i.x&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`)):(s.y<i.y&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${m} ${i.x} ${s.y+g} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${h} ${s.x+g} ${i.y} L ${i.x} ${i.y}`),s.y>i.y&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${h} ${i.x} ${s.y-g} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${m} ${s.x+g} ${i.y} L ${i.x} ${i.y}`),s.y===i.y&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`));if(void 0===d)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+ot(p,8,a))},"drawArrow"),vt=c((t,r)=>{const e=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{const o=r.get(t);o.parents&&o.parents.length>0&&o.parents.forEach(t=>{Mt(e,r.get(t),o,r)})})},"drawArrows"),It=c((t,r,e,o)=>{const{look:n,theme:a,themeVariables:s}=$(),{dropShadow:i,THEME_COLOR_LIMIT:c}=s,d=tt.has(a??""),h=rt.has(a??""),m=t.append("g");r.forEach((t,r)=>{const a=ot(r,d?c:8,h),s=nt.get(t.name)?.pos;if(void 0===s)throw new Error(`Position not found for branch ${t.name}`);const $="TB"===dt||"BT"===dt?s:d?s+6+1:s-2,l=m.append("line");l.attr("x1",0),l.attr("y1",$),l.attr("x2",ct),l.attr("y2",$),l.attr("class","branch branch"+a),"TB"===dt?(l.attr("y1",30),l.attr("x1",s),l.attr("y2",ct),l.attr("x2",s)):"BT"===dt&&(l.attr("y1",ct),l.attr("x1",s),l.attr("y2",30),l.attr("x2",s)),it.push($);const g=t.name,p=mt(g),y=m.insert("rect"),f=m.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);f.node().appendChild(p);const x=p.getBBox(),u=d?0:4,b=d?16:0,w=d?12:0;"neo"===n&&y.attr("data-look","neo"),y.attr("class","branchLabelBkg label"+a).attr("style","neo"===n?`filter:${d?`url(#${o}-drop-shadow)`:i}`:"").attr("rx",u).attr("ry",u).attr("x",-x.width-4-(!0===e.rotateCommitLabel?30:0)).attr("y",-x.height/2+10).attr("width",x.width+18+b).attr("height",x.height+4+w),f.attr("transform","translate("+(-x.width-14-(!0===e.rotateCommitLabel?30:0)+b/2)+", "+($-x.height/2-2)+")"),"TB"===dt?(y.attr("x",s-x.width/2-10).attr("y",0),f.attr("transform","translate("+(s-x.width/2-5)+", 0)"),d&&(y.attr("transform",`translate(${-b/2-3}, ${-w-10})`),f.attr("transform","translate("+(s-x.width/2-5)+", "+(2*-w+7)+")"))):"BT"===dt?(y.attr("x",s-x.width/2-10).attr("y",ct),f.attr("transform","translate("+(s-x.width/2-5)+", "+ct+")"),d&&(y.attr("transform",`translate(${-b/2-3}, ${w+10})`),f.attr("transform","translate("+(s-x.width/2-5)+", "+(ct+2*w+4)+")"))):y.attr("transform","translate(-19, "+($-12-w/2)+")")})},"drawBranches"),Rt=c(function(t,r,e,o,n){return nt.set(t,{pos:r,index:e}),r+=50+(n?40:0)+("TB"===dt||"BT"===dt?o.width/2:0)},"setBranchPosition"),Pt={draw:c(function(t,r,e,o){ht(),h.debug("in gitgraph renderer",t+"\n","id:",r,e);const n=o.db;if(!n.getConfig)return void h.error("getConfig method is not available on db");const a=n.getConfig(),s=a.rotateCommitLabel??!1;st=n.getCommits();const i=n.getBranchesAsObjArray();dt=n.getDirection();const c=m(`[id="${r}"]`),{look:d,theme:p,themeVariables:y}=$(),{useGradient:f,gradientStart:x,gradientStop:u,filterColor:b}=y;if(f){const t=c.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("stop").attr("offset","0%").attr("stop-color",x).attr("stop-opacity",1),t.append("stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}"neo"===d&&tt.has(p??"")&&c.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",b);let w=0;i.forEach((t,r)=>{const e=mt(t.name),o=c.append("g"),n=o.insert("g").attr("class","branchLabel"),a=n.insert("g").attr("class","label branch-label");a.node()?.appendChild(e);const i=e.getBBox();w=Rt(t.name,w,r,i,s),a.remove(),n.remove(),o.remove()}),Ct(c,st,!1,a),a.showBranches&&It(c,i,a,r),vt(c,st),Ct(c,st,!0,a),l.insertTitle(c,"gitTitleText",a.titleTopMargin??0,n.getDiagramTitle()),g(void 0,c,a.diagramPadding,a.useMaxWidth)},"draw")},Ot=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),At=new Set(["redux-color","redux-dark-color"]),Gt=new Set(["neo","neo-dark"]),St=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Wt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),jt=c(t=>{const{svgId:r}=t;let e="";if(t.useGradient&&r)for(let o=0;o<t.THEME_COLOR_LIMIT;o++)e+=`\n .label${o} { fill: ${t.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${t.strokeWidth};}\n `;return e},"genGitGraphGradient"),Ht=c(t=>{const r=d(),{theme:e,themeVariables:o}=r,{borderColorArray:n}=o,a=Ot.has(e);if(Gt.has(e)){let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)if(0===e)r+=`\n .branch-label${e} { fill: ${t.nodeBorder};}\n .commit${e} { stroke: ${t.nodeBorder}; }\n .commit-highlight${e} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }\n .arrow${e} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n .commit-cherry-pick${e} { stroke: ${t.nodeBorder}; }\n ${jt(t)}`;else{const o=e%8;r+=`\n .branch-label${e} { fill: ${t["gitBranchLabel"+o]}; }\n .commit${e} { stroke: ${t["git"+o]}; fill: ${t["git"+o]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+o]}; fill: ${t["gitInv"+o]}; }\n .arrow${e} { stroke: ${t["git"+o]}; }\n `}return r}if(At.has(e)){let r="";for(let o=0;o<t.THEME_COLOR_LIMIT;o++)if(0===o)r+=`\n .branch-label${o} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${o} { stroke: ${t.nodeBorder}; }\n .commit-highlight${o} { stroke: ${t.nodeBorder}; fill: ${t.mainBkg}; }\n .label${o} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .arrow${o} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n `;else{const s=o%n.length;r+=`\n .branch-label${o} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${o} { stroke: ${n[s]}; fill: ${n[s]}; }\n .commit-highlight${o} { stroke: ${n[s]}; fill: ${n[s]}; }\n .label${o} { fill: ${St.has(e)?t.mainBkg:n[s]}; stroke: ${n[s]}; stroke-width: ${t.strokeWidth}; }\n .arrow${o} { stroke: ${n[s]}; }\n `}return r}{let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)r+=`\n .branch-label${e} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${e} { stroke: ${t.nodeBorder}; }\n .commit-highlight${e} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }\n .label${e} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${a?`font-weight:${t.noteFontWeight}`:""}}\n .arrow${e} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n .commit-cherry-pick${e} { stroke: ${t.nodeBorder}; }\n `;return r}},"genColor"),qt=c(t=>`${Array.from({length:t.THEME_COLOR_LIMIT},(t,r)=>r).map(r=>{const e=r%8;return`\n .branch-label${r} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${r} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${r} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${r} { fill: ${t["git"+e]}; }\n .arrow${r} { stroke: ${t["git"+e]}; }\n `}).join("\n")}`,"normalTheme"),_t={parser:J,db:D,renderer:Pt,styles:c(t=>{const r=d(),{theme:e}=r,o=Wt.has(e);return`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n \n ${o?Ht(t):qt(t)}\n\n .branch {\n stroke-width: ${t.strokeWidth};\n stroke: ${t.commitLineColor??t.lineColor};\n stroke-dasharray: ${o?"4 2":"2"};\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${o?t.nodeBorder:t.commitLabelColor}; ${o?`font-weight:${t.noteFontWeight};`:""}}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${o?"transparent":t.commitLabelBackground}; opacity: ${o?"":.5}; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${o?t.mainBkg:t.tagLabelBackground}; stroke: ${o?t.nodeBorder:t.tagLabelBorder}; ${o?`filter:${t.dropShadow}`:""} }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n }\n .commit-reverse {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n stroke-width: ${o?t.strokeWidth:3};\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n }\n\n .arrow {\n /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */\n stroke-width: ${Ot.has(e)?t.strokeWidth:8};\n stroke-linecap: round;\n fill: none\n }\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`},"getStyles")};export{_t as diagram};
@@ -1 +1 @@
1
- export{c as classNames,d as downloadBlobAsFile,a as downloadDataTableAsCsvFile,b as downloadLink,e as downloadSheetDataAsXlsxFile,f as downloadUrlAsFile,g as getTextContent,h as getXLSX,i as isBrowser,j as isDev,k as isOverflowed,l as isTrigger,n as normalizeFolderPath,o as openNewTab,r as renderChildrenWithProps,s as sheetDataToWorkBook,t as toBlob}from"./commons-BHuDJzTw.js";import{g as S}from"./websocket-B2hJys_Q.js";export{a as authorizedRequest,c as copy,b as cutTimeSplit,d as downloadJukiMarkdownAsPdf,e as downloadWebsiteAsPdf,f as getAuthorizedRequest,h as getContestState,i as getDateLiteral,j as getEditorSettingsStorageKey,k as getHeaders,l as getHref,m as getJudgeOrigin,n as getKeyWebSocketEventDTO,o as getMetaHeaders,p as getProblemsStoreKey,q as getSettingsStoreKey,s as getSourcesStoreKey,t as getStatementData,u as getTestCasesStoreKey,v as getUnsubscribeEvent,w as getVisitorSessionId,x as handleUploadFile,y as handleUploadImage,z as isJudgeWindowLocation,A as publishNote,B as renderReactNodeOrFunction,r as renderReactNodeOrFunctionP1,C as safeReportError,D as showOfDateDisplayType,E as showOfTimeDisplayType,F as toFilterUrl,G as toSortUrl,H as upperFirst}from"./websocket-B2hJys_Q.js";export{g as getHeight}from"./worksheet-CQgex79V.js";export{c as cloneURLSearchParams,p as persistGlobalURLSearchParams}from"./index-_kF3_0-k.js";import"./settings-BONQQsPx.js";import"react";import"./enums.js";import"react/jsx-runtime";import"./constants.js";const T=e=>({"*":{key:"*",header:"",body:e}}),R=e=>null!==e&&"IFRAME"===e.tagName,U={setItem:(e,s)=>{if(S()||"undefined"==typeof document)return;localStorage.setItem(e,s);const t=document.getElementsByClassName("juki-iframe-cross-domain");for(const a of t)if(R(a)&&a.contentWindow){const t=a.contentWindow;t?.postMessage({action:"localStorage.setItem",key:e,value:s},new URL(a.src).origin)}},removeItem:e=>{if(S()||"undefined"==typeof document)return;localStorage.removeItem(e);const s=document.getElementsByClassName("juki-iframe-cross-domain");for(const t of s)if(R(t)&&t.contentWindow){const s=t.contentWindow;s?.postMessage({action:"localStorage.removeItem",key:e},new URL(t.src).origin)}}};export{S as getQuerySessionId,R as isIFrame,U as localStorageCrossDomains,T as oneTab};
1
+ export{c as classNames,d as downloadBlobAsFile,a as downloadDataTableAsCsvFile,b as downloadLink,e as downloadSheetDataAsXlsxFile,f as downloadUrlAsFile,g as getTextContent,h as getXLSX,i as isBrowser,j as isDev,k as isOverflowed,l as isTrigger,n as normalizeFolderPath,o as openNewTab,r as renderChildrenWithProps,s as sheetDataToWorkBook,t as toBlob}from"./commons-iref2pEJ.js";import{g as S}from"./websocket-CdeP8N_S.js";export{a as authorizedRequest,c as copy,b as cutTimeSplit,d as downloadJukiMarkdownAsPdf,e as downloadWebsiteAsPdf,f as getAuthorizedRequest,h as getContestState,i as getDateLiteral,j as getEditorSettingsStorageKey,k as getHeaders,l as getHref,m as getJudgeOrigin,n as getKeyWebSocketEventDTO,o as getMetaHeaders,p as getProblemsStoreKey,q as getSettingsStoreKey,s as getSourcesStoreKey,t as getStatementData,u as getTestCasesStoreKey,v as getUnsubscribeEvent,w as getVisitorSessionId,x as handleUploadFile,y as handleUploadImage,z as isJudgeWindowLocation,A as publishNote,B as renderReactNodeOrFunction,r as renderReactNodeOrFunctionP1,C as safeReportError,D as showOfDateDisplayType,E as showOfTimeDisplayType,F as toFilterUrl,G as toSortUrl,H as upperFirst}from"./websocket-CdeP8N_S.js";export{g as getHeight}from"./worksheet-CQgex79V.js";export{c as cloneURLSearchParams,p as persistGlobalURLSearchParams}from"./index-2PTQqTnK.js";import"./settings-CBGV-lz3.js";import"react";import"./enums.js";import"react/jsx-runtime";import"./constants.js";const T=e=>({"*":{key:"*",header:"",body:e}}),R=e=>null!==e&&"IFRAME"===e.tagName,U={setItem:(e,s)=>{if(S()||"undefined"==typeof document)return;localStorage.setItem(e,s);const t=document.getElementsByClassName("juki-iframe-cross-domain");for(const a of t)if(R(a)&&a.contentWindow){const t=a.contentWindow;t?.postMessage({action:"localStorage.setItem",key:e,value:s},new URL(a.src).origin)}},removeItem:e=>{if(S()||"undefined"==typeof document)return;localStorage.removeItem(e);const s=document.getElementsByClassName("juki-iframe-cross-domain");for(const t of s)if(R(t)&&t.contentWindow){const s=t.contentWindow;s?.postMessage({action:"localStorage.removeItem",key:e},new URL(t.src).origin)}}};export{S as getQuerySessionId,R as isIFrame,U as localStorageCrossDomains,T as oneTab};
@@ -1 +1 @@
1
- import{J as e,H as t,g as a}from"./settings-BONQQsPx.js";import{i as s}from"./commons-BHuDJzTw.js";import{QueryParamKey as r,ContestTab as o,ProblemTab as m,ProfileTab as i}from"./enums.js";const y=e=>e.includes("?")?e:e+"?",d=e=>"?"!==e[e.length-1]?e+"&":e,l=(e,t,a)=>d(y(e))+`page=${t}&pageSize=${a}`,n=(e,t)=>t?d(y(e))+t:e,p=(e,t)=>t?d(y(e))+t:e,u=(e,t)=>t?d(y(e))+`companyKey=${t}`:e;const c=(e,t)=>`${e||""}${t}`,g=e=>new URLSearchParams(e.toString()),b=e=>{const t=g(e);let a=new URLSearchParams;s()&&(a=new URLSearchParams(window.location.search));const o=a.get(r.TOKEN);o&&t.set(r.TOKEN,o);const m=a.get(r.COMPANY);m&&t.set(r.COMPANY,m);const i=a.get(r.SUBMISSION);i&&t.set(r.SUBMISSION,i);const y=a.get(r.SIGN_IN);y&&t.set(r.SIGN_IN,y);const d=a.get(r.SIGN_UP);return d&&t.set(r.SIGN_UP,d),t.toString()},h=e=>{const t=new URL("https://juki.app"+e),a=b(t.searchParams);return a?t.pathname+"?"+a:t.pathname};const S=new class{get API_V2(){const s=(t,a)=>`${e}/${t}${a}`,r=a=>e?a:()=>({url:"",method:t.GET});return{auth:{ping:r(()=>({url:s("auth","/ping"),method:t.GET})),signIn:r(({params:{companyKey:e}={},body:a})=>({url:u(s("auth","/sign-in"),e),method:t.POST,body:JSON.stringify(a)})),signUp:r(({body:e})=>({url:s("auth","/sign-up"),method:t.POST,body:JSON.stringify(e)})),createUser:r(({params:{companyKey:e}={},body:a})=>({url:u(s("auth","/sign-up"),e),method:t.POST,body:JSON.stringify({...a,isGenerated:!0})})),signOut:r(()=>({url:s("auth","/sign-out"),method:t.POST})),initiateResetPassword:r(({body:e})=>({url:s("auth","/initiate-reset-password"),method:t.POST,body:JSON.stringify(e)})),updatePassword:r(({params:{companyKey:e,nickname:r},body:o})=>({url:s("auth",`/user-key/${a(r,e)}/update-password`),method:t.POST,body:JSON.stringify(o)})),resetPassword:r(({params:{companyKey:e,nickname:r}})=>({url:s("auth",`/user-key/${a(r,e)}/reset-password`),method:t.POST})),createSession:r(({params:{companyKey:e}={},body:a})=>({url:u(s("auth","/create-session"),e),method:t.POST,body:JSON.stringify(a)}))},log:{error:r(({body:e})=>({url:s("log","/error"),method:t.POST,body:JSON.stringify(e)})),info:r(({body:e})=>({url:s("log","/info"),method:t.POST,body:JSON.stringify(e)}))},user:{getSummaryList:r(({params:{companyKey:e}={companyKey:""}}={params:{companyKey:""}})=>({url:u(s("user","/summary-list"),e),method:t.GET})),getSystemList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("user","/system-list"),e,a),r),o),method:t.GET})),getSummary:r(({params:{nickname:e,companyKey:r}})=>({url:s("user",`/user-key/${a(e,r)}/summary`),method:t.GET})),getProfile:r(({params:{nickname:e,companyKey:r}})=>({url:s("user",`/user-key/${a(e,r)}/profile`),method:t.GET})),getLogs:r(({params:{nickname:e,companyKey:r}})=>({url:s("user",`/user-key/${a(e,r)}/logs`),method:t.GET})),getMySessions:r(()=>({url:s("user","/my-sessions"),method:t.GET})),getAllOnlineUsers:r(({params:{filterUrl:e,sortUrl:a}})=>({url:n(p(s("user","/all-online-users"),e),a),method:t.GET})),getOnlineUsers:r(({params:{filterUrl:e,sortUrl:a}})=>({url:n(p(s("user","/online-users"),e),a),method:t.GET})),deleteOldSessions:r(()=>({url:s("user","/delete-old-sessions"),method:t.POST})),updateProfileData:r(({params:{nickname:e,companyKey:r},body:o})=>({url:s("user",`/user-key/${a(e,r)}/profile-data`),method:t.PUT,body:JSON.stringify(o)})),updateProfileImage:r(({params:{nickname:e,companyKey:r},body:o})=>({url:s("user",`/user-key/${a(e,r)}/profile-image`),method:t.PUT,body:JSON.stringify(o)})),updatePreferences:r(({params:{nickname:e,companyKey:r},body:o})=>({url:s("user",`/user-key/${a(e,r)}/preferences`),method:t.PUT,body:JSON.stringify(o)})),updateRoles:r(({params:{nickname:e,companyKey:r},body:o})=>({url:s("user",`/user-key/${a(e,r)}/roles`),method:t.PUT,body:JSON.stringify(o)})),deleteSession:r(({params:{sessionId:e}})=>({url:s("user",`/session/${e}`),method:t.DELETE})),checkData:r(({params:{companyKey:e},body:a})=>({url:u(s("user","/check-data"),e),method:t.POST,body:JSON.stringify(a)})),clientTrack:r(({body:e})=>({url:s("user","/client-track"),method:t.POST,body:JSON.stringify(e)}))},problem:{create:r(()=>({url:s("problem",""),method:t.POST})),update:r(({params:{key:e}})=>({url:s("problem",`/${e}`),method:t.PUT})),delete:r(({params:{key:e}})=>({url:s("problem",`/${e}`),method:t.DELETE})),getMetadata:r(({params:{key:e}})=>({url:s("problem",`/${e}/metadata`),method:t.GET})),getData:r(({params:{key:e}})=>({url:s("problem",`/${e}/data`),method:t.GET})),getBasicSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("problem","/basic-summary-list"),e,a),r),o),method:t.GET})),getSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("problem","/summary-list"),e,a),r),o),method:t.GET})),getSystemList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("problem","/system-list"),e,a),r),o),method:t.GET})),getSummary:r(({params:{key:e}})=>({url:s("problem",`/${e}/summary`),method:t.GET})),getLogs:r(({params:{key:e}})=>({url:s("problem",`/${e}/logs`),method:t.GET})),getTestCases:r(({params:{key:e}})=>({url:s("problem",`/${e}/test-cases`),method:t.GET})),submit:r(({params:{key:e},body:a})=>({url:s("problem",`/${e}/submit`),method:t.POST,body:JSON.stringify(a)})),crawl:r(({body:e})=>({url:s("problem","/crawl"),method:t.POST,body:JSON.stringify(e)}))},contest:{getSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("contest","/summary-list"),e,a),r),o),method:t.GET})),getSystemList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("contest","/system-list"),e,a),r),o),method:t.GET})),getMetadata:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/metadata`),a),method:t.GET})),getData:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/data`),a),method:t.GET})),getDataEvents:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/data/events`),a),method:t.GET})),getDataMembers:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/data/members`),a),method:t.GET})),getDataClarifications:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/data/clarifications`),a),method:t.GET})),getScoreboard:r(({params:{key:e,unfrozen:a,companyKey:r,official:o}})=>({url:u(s("contest",`/${e}/data/scoreboard${a?"?state=unfrozen":""}${o?(a?"&":"?")+"official=true":""}`),r),method:t.GET})),getLogs:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/logs`),a),method:t.GET})),submit:r(({params:{key:e,problemKey:a,companyKey:r},body:o})=>({url:u(s("contest",`/${e}/problem/${a}/submit`),r),method:t.POST,body:JSON.stringify(o)})),recalculateScoreboard:r(({params:{key:e,companyKey:a,official:r}})=>({url:u(s("contest",`/${e}/recalculate-scoreboard${r?"?official=true":""}`),a),method:t.POST})),recalculatePrerequisites:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/recalculate-prerequisites`),a),method:t.POST})),problem:{rejudge:r(({params:{key:e,problemKey:a,companyKey:r}})=>({url:u(s("contest",`/${e}/problem/${a}/rejudge`),r),method:t.POST})),retrieve:r(({params:{key:e,problemKey:a,companyKey:r}})=>({url:u(s("contest",`/${e}/problem/${a}/retrieve`),r),method:t.POST}))},retrieve:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/retrieve`),a),method:t.POST})),editGlobal:r(({params:{key:e,companyKey:a},body:r})=>({url:u(s("contest",`/${e}/global`),a),method:t.PUT,body:JSON.stringify(r)})),createGlobal:r(({params:{companyKey:e},body:a})=>({url:u(s("contest","/global"),e),method:t.POST,body:JSON.stringify(a)})),unlinkSubmissions:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/unlink-submissions`),a),method:t.POST}))},submission:{getSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("submission","/summary-list"),e,a),r),o),method:t.GET})),getSystemList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("submission","/system-list"),e,a),r),o),method:t.GET})),getExportSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o,withSourceCodes:m}})=>({url:n(p(l(s("submission","/summary-list-export"+(m?"?withSourceCodes=true":"")),e,a),r),o),method:t.GET})),getData:r(({params:{id:e}})=>({url:s("submission",`/${e}/data`),method:t.GET})),getLogs:r(({params:{id:e}})=>({url:s("submission",`/${e}/logs`),method:t.GET})),rejudge:r(({params:{id:e}})=>({url:s("submission",`/${e}/rejudge`),method:t.POST})),retrieve:r(({params:{id:e}})=>({url:s("submission",`/${e}/retrieve`),method:t.POST})),judge:r(({params:{id:e},body:a})=>({url:s("submission",`/${e}/judge`),method:t.POST,body:JSON.stringify(a)})),archive:r(({params:{id:e}})=>({url:s("submission",`/${e}/archive`),method:t.POST})),release:r(({params:{id:e}})=>({url:s("submission",`/${e}/release`),method:t.POST}))},image:{getPublicList:r(()=>({url:s("image","/public-list"),method:t.GET})),publish:r(({body:e})=>({url:s("image","/publish"),method:t.POST,body:JSON.stringify(e)}))},file:{publish:r(({body:e})=>({url:s("file","/publish"),method:t.POST,body:JSON.stringify(e)}))},note:{publish:r(({body:e})=>({url:s("note","/publish"),method:t.POST,headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})),getPdf:r(({params:{sourceUrl:e}})=>({url:s("note",`/pdf?sourceUrl=${e}`),method:t.GET})),createPdf:r(({body:e})=>({url:s("note","/pdf"),method:t.POST,body:JSON.stringify(e)}))},code:{run:r(({body:e})=>({url:s("code","/run"),method:t.POST,body:JSON.stringify(e)}))},ia:{chatCompletions:r(({body:e})=>({url:s("ia","/chat/completions"),method:t.POST,body:JSON.stringify(e)}))},company:{get:r(({params:{companyKey:e}}={params:{companyKey:""}})=>({url:u(s("company",""),e),method:t.GET})),getPermissionList:r(()=>({url:s("company","/permission-list"),method:t.GET})),getJudgeList:r(({params:{companyKey:e}}={params:{companyKey:""}})=>({url:u(s("company","/judge-list"),e),method:t.GET})),getTrustedCompaniesList:r(({params:{companyKey:e}}={params:{companyKey:""}})=>({url:u(s("company","/trusted-companies-list"),e),method:t.GET})),getResourceSpecifications:r(({params:{companyKey:e}}={params:{companyKey:""}})=>({url:u(s("company","/resource-specifications"),e),method:t.GET})),getEmailData:r(({params:{companyKey:e}}={params:{companyKey:""}})=>({url:u(s("company","/email-data"),e),method:t.GET})),updateImage:r(({params:{companyKey:e}={companyKey:""},body:a})=>({url:u(s("company","/image"),e),method:t.PUT,body:JSON.stringify(a)})),updateData:r(({params:{companyKey:e}={companyKey:""},body:a})=>({url:u(s("company",""),e),method:t.PATCH,body:JSON.stringify(a)})),updateSensitiveData:r(({params:{companyKey:e}={companyKey:""},body:a})=>({url:u(s("company","/sensitive-data"),e),method:t.PATCH,body:JSON.stringify(a)}))},locale:{get:r(({params:{locale:e,namespace:a}})=>({url:s("locale",`/${e}/${a}`),method:t.GET}))},judge:{getData:r(({params:{key:e}})=>({url:s("judge",`/${e}/data`),method:t.GET})),getSummaryList:r(({params:{filterUrl:e,sortUrl:a}={filterUrl:"",sortUrl:""}}={})=>({url:n(p(s("judge","/summary-list"),e),a),method:t.GET})),getSystemList:r(({params:{filterUrl:e,sortUrl:a}={filterUrl:"",sortUrl:""}}={})=>({url:n(p(s("judge","/system-list"),e),a),method:t.GET})),crawlLanguages:r(({params:{key:e}})=>({url:s("judge",`/${e}/crawl-languages`),method:t.POST})),patch:r(({params:{key:e},body:{languages:a,name:r,problemTags:o,isExternal:m,isSubmitSupported:i,url:y,logo:d,logoSize:l}})=>{const n={};return a&&(n.languages=a),"string"==typeof r&&(n.name=r),o&&(n.problemTags=o),"boolean"==typeof m&&(n.isExternal=m),"boolean"==typeof i&&(n.isSubmitSupported=i),"string"==typeof y&&(n.url=y),"string"==typeof d&&(n.logo=d),l&&(n.logoSize=l),{url:s("judge",`/${e}`),method:t.PATCH,body:JSON.stringify(n)}})},worksheet:{getData:r(({params:{key:e,companyKey:a}})=>({url:u(s("worksheet",`/${e}/data`),a),method:t.GET})),update:r(({params:{key:e},body:a})=>({url:s("worksheet",`/${e}`),method:t.PUT,body:JSON.stringify(a)})),getList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("worksheet","/list"),e,a),r),o),method:t.GET})),getSubmissionsUser:r(({params:{key:e,userKey:a,secondaryKey:r}})=>({url:s("worksheet",`/${e}/submissions/user/${a}${r?`?secondaryKey=${r}`:""}`),method:t.GET})),submitJkMd:r(({params:{worksheetKey:e,secondaryKey:a},body:r})=>({url:s("worksheet",`/${e}/submit/jk-md${a?`?secondaryKey=${a}`:""}`),method:t.POST,body:JSON.stringify(r)})),submitCodeEditor:r(({params:{worksheetKey:e,secondaryKey:a},body:r})=>({url:s("worksheet",`/${e}/submit/code-editor${a?`?secondaryKey=${a}`:""}`),method:t.POST,body:JSON.stringify(r)})),submitQuizProblem:r(({params:{worksheetKey:e,secondaryKey:a},body:r})=>({url:s("worksheet",`/${e}/submit/quiz-problem${a?`?secondaryKey=${a}`:""}`),method:t.POST,body:JSON.stringify(r)})),submitQuizOptions:r(({params:{worksheetKey:e,secondaryKey:a},body:r})=>({url:s("worksheet",`/${e}/submit/quiz-options${a?`?secondaryKey=${a}`:""}`),method:t.POST,body:JSON.stringify(r)}))},system:{services:{checkAndStart:r(()=>({url:s("sys","/services/check-and-start"),method:t.POST})),check:r(()=>({url:s("sys","/services/check"),method:t.POST})),clean:r(()=>({url:s("sys","/services/clean"),method:t.POST}))}},comment:{get:r(({params:{key:e}})=>({url:s("comment",`/${e}`),method:t.GET})),post:r(({params:{key:e},body:a})=>({url:s("comment",`/${e}`),method:t.POST,body:JSON.stringify(a)})),reply:r(({params:{key:e,id:a},body:r})=>({url:s("comment",`/${e}/${a}/reply`),method:t.POST,body:JSON.stringify(r)})),react:r(({params:{key:e,id:a},body:r})=>({url:s("comment",`/${e}/${a}/react`),method:t.POST,body:JSON.stringify(r)})),hide:r(({params:{key:e,id:a}})=>({url:s("comment",`/${e}/${a}/hide`),method:t.POST})),unhide:r(({params:{key:e,id:a}})=>({url:s("comment",`/${e}/${a}/unhide`),method:t.POST}))},class:{viewAssignmentMyWorksheetSubmitCodeEditor:r(({params:{classKey:e,cycleId:a,sessionId:r,assignmentId:o},body:m})=>({url:s("class",`/${e}/cycle/${a}/session/${r}/assignment/${o}/worksheet/submit-code-editor`),method:t.POST,body:JSON.stringify(m)}))},documentTemplate:{create:r(({body:e})=>({url:s("document-template",""),method:t.POST,body:JSON.stringify(e)})),getSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("document-template","/summary-list"),e,a),r),o),method:t.GET})),getData:r(({params:{key:e}})=>({url:s("document-template",`/${e}/data`),method:t.GET})),updateData:r(({params:{key:e,companyKey:a},body:r})=>({url:u(s("document-template",`/${e}`),a),method:t.PUT,body:JSON.stringify(r)}))},statistics:{getCompanyStats:r(({params:{companyKey:e,startTimestamp:a,endTimestamp:r,groupBy:o}})=>({url:u(s("statistics",`/company?startTimestamp=${a}&endTimestamp=${r}&groupBy=${o.join(",")}`),e),method:t.GET})),getProblemStats:r(({params:{companyKey:e,problemKey:a,startTimestamp:r,endTimestamp:o}})=>({url:u(s("statistics",`/problem/${a}?startTimestamp=${r}&endTimestamp=${o}`),e),method:t.GET})),getUsersTracksStats:r(({params:{companyKeys:e,startTimestamp:a,endTimestamp:r,groupBy:o}})=>({url:s("statistics",`/users-tracks?startTimestamp=${a}&endTimestamp=${r}&groupBy=${o.join(",")}${e?`&companyKeys=${e}`:""}`),method:t.GET}))},excalidraw:{getSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("excalidraw","/summary-list"),e,a),r),o),method:t.GET})),create:r(({body:e})=>({url:s("excalidraw",""),method:t.POST,body:JSON.stringify(e)})),updateData:r(({params:{key:e},body:a})=>({url:s("excalidraw",`/${e}/data`),method:t.PUT,body:JSON.stringify(a)})),getMetadata:r(({params:{key:e}})=>({url:s("excalidraw",`/${e}/metadata`),method:t.GET})),getData:r(({params:{key:e}})=>({url:s("excalidraw",`/${e}/data`),method:t.GET}))},mermaid:{getSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("mermaid","/summary-list"),e,a),r),o),method:t.GET})),create:r(({body:e})=>({url:s("mermaid",""),method:t.POST,body:JSON.stringify(e)})),updateData:r(({params:{key:e},body:a})=>({url:s("mermaid",`/${e}/data`),method:t.PUT,body:JSON.stringify(a)})),getMetadata:r(({params:{key:e}})=>({url:s("mermaid",`/${e}/metadata`),method:t.GET})),getData:r(({params:{key:e}})=>({url:s("mermaid",`/${e}/data`),method:t.GET}))},markdown:{getSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("markdown","/summary-list"),e,a),r),o),method:t.GET})),create:r(({body:e})=>({url:s("markdown",""),method:t.POST,body:JSON.stringify(e)})),updateData:r(({params:{key:e},body:a})=>({url:s("markdown",`/${e}/data`),method:t.PUT,body:JSON.stringify(a)})),getMetadata:r(({params:{key:e}})=>({url:s("markdown",`/${e}/metadata`),method:t.GET})),getData:r(({params:{key:e}})=>({url:s("markdown",`/${e}/data`),method:t.GET}))},export:{websiteToPdf:r(({params:{url:e,headerTemplate:a,footerTemplate:r,margin:o,format:m}})=>({url:s("export","/website-to-pdf"),method:t.POST,body:JSON.stringify({url:e,headerTemplate:a,footerTemplate:r,margin:o,format:m})})),problem:{statementToPdf:r(({params:{key:e,language:a}})=>({url:s("export","/problem/statement-to-pdf"),method:t.POST,body:JSON.stringify({key:e,language:a})})),statementToPng:r(({params:{key:e,token:a,language:r}})=>({url:s("export","/problem/statement-to-png"),method:t.POST,body:JSON.stringify({key:e,token:a,language:r})}))},contest:{problems:{statementsToPdf:r(({params:{key:e,language:a}})=>({url:s("export","/contest/problems/statements-to-pdf"),method:t.POST,body:JSON.stringify({key:e,language:a})}))}}},webScraping:{codeforces:{problemStatement:r(({params:{contestId:e,index:a}})=>({url:s("web-scraping","/codeforces/problem-statement"),method:t.POST,body:JSON.stringify({contestId:e,index:a})}))},patito:{problemStatement:r(({params:{id:e}})=>({url:s("web-scraping","/patito/problem-statement"),method:t.POST,body:JSON.stringify({id:e})}))}},websocket:{auth:r(()=>({url:s("websocket","/auth"),method:t.POST}))}}}},T=new class{JUDGE(e){const t=e??"";return{home:()=>h("/"),profiles:{view:({nickname:e,companyKey:s,tab:r=i.OVERVIEW})=>c(t,h(`/profiles/${a(e,s)}${r?`?tab=${r}`:""}`))},problems:{list:()=>c(t,h("/problems")),view:({key:e,tab:a=m.STATEMENT})=>c(t,h(`/problems/${e}${a?`?tab=${a}`:""}`)),edit:({key:e,tab:a=m.STATEMENT})=>c(t,h(`/problems/${e}/edit${a?`?tab=${a}`:""}`)),new:({judge:e,tab:a})=>c(t,h(`/problems/new?judge=${e}${a?`&tab=${a}`:""}`))},contests:{list:({tab:e})=>c(t,h("/contests"+(e?`?tab=${e}`:""))),view:({key:e,tab:a=o.OVERVIEW,subTab:s})=>c(t,h(`/contests/${e}${a?`?tab=${a}`:""}${s?(a?"&":"?")+`subTab=${s}`:""}`)),edit:({key:e,tab:a=o.OVERVIEW})=>c(t,h(`/contests/${e}/edit${a?`?tab=${a}`:""}`)),new:({tab:e}={tab:void 0})=>c(t,h("/contests/new"+(e?`?tab=${e}`:"")))},submissions:{view:({id:e})=>c(t,h(`/submissions/${e}`))},boards:{page:()=>c(t,h("/boards"))},ide:{page:()=>c(t,h("/ide"))}}}COACH(e){const t=e??"";return{home:()=>h("/"),worksheets:{list:()=>c(t,h("/worksheets")),view:({key:e,page:a=1})=>c(t,h(`/worksheets/${e}${a?`?page=${a}`:""}`)),edit:({key:e,tab:a,from:s})=>c(t,h(`/worksheets/${e}/edit?tab=${a}${s?`&from=${s}`:""}`)),new:({tab:e})=>c(t,h(`/worksheets/new?tab=${e}`))},classes:{list:()=>c(t,h("/classes")),view:({key:e})=>c(t,h(`/classes/${e}`)),cycleView:({key:e,cycleId:a})=>c(t,h(`/classes/${e}/cycle/${a}`)),edit:({key:e})=>c(t,h(`/classes/${e}/edit`)),new:()=>c(t,h("/classes/new"))},courses:{list:()=>c(t,h("/courses")),view:({key:e})=>c(t,h(`/courses/${e}`)),lessonView:({key:e,lessonIndex:a,page:s=1})=>c(t,h(`/courses/${e}/lessons/${a}${s?`?page=${s}`:""}`)),edit:({key:e})=>c(t,h(`/courses/${e}/edit`)),new:()=>c(t,h("/courses/new"))},profiles:{view:({nickname:e,tab:a=i.OVERVIEW})=>c(t,h(`/profiles/${e}${a?`?tab=${a}`:""}`))}}}};export{T as a,g as c,S as j,b as p};
1
+ import{J as e,H as t,g as a}from"./settings-CBGV-lz3.js";import{i as s}from"./commons-iref2pEJ.js";import{QueryParamKey as r,ContestTab as o,ProblemTab as m,ProfileTab as i}from"./enums.js";const y=e=>e.includes("?")?e:e+"?",d=e=>"?"!==e[e.length-1]?e+"&":e,l=(e,t,a)=>d(y(e))+`page=${t}&pageSize=${a}`,n=(e,t)=>t?d(y(e))+t:e,p=(e,t)=>t?d(y(e))+t:e,u=(e,t)=>t?d(y(e))+`companyKey=${t}`:e;const c=(e,t)=>`${e||""}${t}`,g=e=>new URLSearchParams(e.toString()),b=e=>{const t=g(e);let a=new URLSearchParams;s()&&(a=new URLSearchParams(window.location.search));const o=a.get(r.TOKEN);o&&t.set(r.TOKEN,o);const m=a.get(r.COMPANY);m&&t.set(r.COMPANY,m);const i=a.get(r.SUBMISSION);i&&t.set(r.SUBMISSION,i);const y=a.get(r.SIGN_IN);y&&t.set(r.SIGN_IN,y);const d=a.get(r.SIGN_UP);return d&&t.set(r.SIGN_UP,d),t.toString()},h=e=>{const t=new URL("https://juki.app"+e),a=b(t.searchParams);return a?t.pathname+"?"+a:t.pathname};const S=new class{get API_V2(){const s=(t,a)=>`${e}/${t}${a}`,r=a=>e?a:()=>({url:"",method:t.GET});return{auth:{ping:r(()=>({url:s("auth","/ping"),method:t.GET})),signIn:r(({params:{companyKey:e}={},body:a})=>({url:u(s("auth","/sign-in"),e),method:t.POST,body:JSON.stringify(a)})),signUp:r(({body:e})=>({url:s("auth","/sign-up"),method:t.POST,body:JSON.stringify(e)})),createUser:r(({params:{companyKey:e}={},body:a})=>({url:u(s("auth","/sign-up"),e),method:t.POST,body:JSON.stringify({...a,isGenerated:!0})})),signOut:r(()=>({url:s("auth","/sign-out"),method:t.POST})),initiateResetPassword:r(({body:e})=>({url:s("auth","/initiate-reset-password"),method:t.POST,body:JSON.stringify(e)})),updatePassword:r(({params:{companyKey:e,nickname:r},body:o})=>({url:s("auth",`/user-key/${a(r,e)}/update-password`),method:t.POST,body:JSON.stringify(o)})),resetPassword:r(({params:{companyKey:e,nickname:r}})=>({url:s("auth",`/user-key/${a(r,e)}/reset-password`),method:t.POST})),createSession:r(({params:{companyKey:e}={},body:a})=>({url:u(s("auth","/create-session"),e),method:t.POST,body:JSON.stringify(a)}))},log:{error:r(({body:e})=>({url:s("log","/error"),method:t.POST,body:JSON.stringify(e)})),info:r(({body:e})=>({url:s("log","/info"),method:t.POST,body:JSON.stringify(e)}))},user:{getSummaryList:r(({params:{companyKey:e}={companyKey:""}}={params:{companyKey:""}})=>({url:u(s("user","/summary-list"),e),method:t.GET})),getSystemList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("user","/system-list"),e,a),r),o),method:t.GET})),getSummary:r(({params:{nickname:e,companyKey:r}})=>({url:s("user",`/user-key/${a(e,r)}/summary`),method:t.GET})),getProfile:r(({params:{nickname:e,companyKey:r}})=>({url:s("user",`/user-key/${a(e,r)}/profile`),method:t.GET})),getLogs:r(({params:{nickname:e,companyKey:r}})=>({url:s("user",`/user-key/${a(e,r)}/logs`),method:t.GET})),getMySessions:r(()=>({url:s("user","/my-sessions"),method:t.GET})),getAllOnlineUsers:r(({params:{filterUrl:e,sortUrl:a}})=>({url:n(p(s("user","/all-online-users"),e),a),method:t.GET})),getOnlineUsers:r(({params:{filterUrl:e,sortUrl:a}})=>({url:n(p(s("user","/online-users"),e),a),method:t.GET})),deleteOldSessions:r(()=>({url:s("user","/delete-old-sessions"),method:t.POST})),updateProfileData:r(({params:{nickname:e,companyKey:r},body:o})=>({url:s("user",`/user-key/${a(e,r)}/profile-data`),method:t.PUT,body:JSON.stringify(o)})),updateProfileImage:r(({params:{nickname:e,companyKey:r},body:o})=>({url:s("user",`/user-key/${a(e,r)}/profile-image`),method:t.PUT,body:JSON.stringify(o)})),updatePreferences:r(({params:{nickname:e,companyKey:r},body:o})=>({url:s("user",`/user-key/${a(e,r)}/preferences`),method:t.PUT,body:JSON.stringify(o)})),updateRoles:r(({params:{nickname:e,companyKey:r},body:o})=>({url:s("user",`/user-key/${a(e,r)}/roles`),method:t.PUT,body:JSON.stringify(o)})),deleteSession:r(({params:{sessionId:e}})=>({url:s("user",`/session/${e}`),method:t.DELETE})),checkData:r(({params:{companyKey:e},body:a})=>({url:u(s("user","/check-data"),e),method:t.POST,body:JSON.stringify(a)})),clientTrack:r(({body:e})=>({url:s("user","/client-track"),method:t.POST,body:JSON.stringify(e)}))},problem:{create:r(()=>({url:s("problem",""),method:t.POST})),update:r(({params:{key:e}})=>({url:s("problem",`/${e}`),method:t.PUT})),delete:r(({params:{key:e}})=>({url:s("problem",`/${e}`),method:t.DELETE})),getMetadata:r(({params:{key:e}})=>({url:s("problem",`/${e}/metadata`),method:t.GET})),getData:r(({params:{key:e}})=>({url:s("problem",`/${e}/data`),method:t.GET})),getBasicSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("problem","/basic-summary-list"),e,a),r),o),method:t.GET})),getSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("problem","/summary-list"),e,a),r),o),method:t.GET})),getSystemList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("problem","/system-list"),e,a),r),o),method:t.GET})),getSummary:r(({params:{key:e}})=>({url:s("problem",`/${e}/summary`),method:t.GET})),getLogs:r(({params:{key:e}})=>({url:s("problem",`/${e}/logs`),method:t.GET})),getTestCases:r(({params:{key:e}})=>({url:s("problem",`/${e}/test-cases`),method:t.GET})),submit:r(({params:{key:e},body:a})=>({url:s("problem",`/${e}/submit`),method:t.POST,body:JSON.stringify(a)})),crawl:r(({body:e})=>({url:s("problem","/crawl"),method:t.POST,body:JSON.stringify(e)}))},contest:{getSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("contest","/summary-list"),e,a),r),o),method:t.GET})),getSystemList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("contest","/system-list"),e,a),r),o),method:t.GET})),getMetadata:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/metadata`),a),method:t.GET})),getData:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/data`),a),method:t.GET})),getDataEvents:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/data/events`),a),method:t.GET})),getDataMembers:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/data/members`),a),method:t.GET})),getDataClarifications:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/data/clarifications`),a),method:t.GET})),getScoreboard:r(({params:{key:e,unfrozen:a,companyKey:r,official:o}})=>({url:u(s("contest",`/${e}/data/scoreboard${a?"?state=unfrozen":""}${o?(a?"&":"?")+"official=true":""}`),r),method:t.GET})),getLogs:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/logs`),a),method:t.GET})),submit:r(({params:{key:e,problemKey:a,companyKey:r},body:o})=>({url:u(s("contest",`/${e}/problem/${a}/submit`),r),method:t.POST,body:JSON.stringify(o)})),recalculateScoreboard:r(({params:{key:e,companyKey:a,official:r}})=>({url:u(s("contest",`/${e}/recalculate-scoreboard${r?"?official=true":""}`),a),method:t.POST})),recalculatePrerequisites:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/recalculate-prerequisites`),a),method:t.POST})),problem:{rejudge:r(({params:{key:e,problemKey:a,companyKey:r}})=>({url:u(s("contest",`/${e}/problem/${a}/rejudge`),r),method:t.POST})),retrieve:r(({params:{key:e,problemKey:a,companyKey:r}})=>({url:u(s("contest",`/${e}/problem/${a}/retrieve`),r),method:t.POST}))},retrieve:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/retrieve`),a),method:t.POST})),editGlobal:r(({params:{key:e,companyKey:a},body:r})=>({url:u(s("contest",`/${e}/global`),a),method:t.PUT,body:JSON.stringify(r)})),createGlobal:r(({params:{companyKey:e},body:a})=>({url:u(s("contest","/global"),e),method:t.POST,body:JSON.stringify(a)})),unlinkSubmissions:r(({params:{key:e,companyKey:a}})=>({url:u(s("contest",`/${e}/unlink-submissions`),a),method:t.POST}))},submission:{getSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("submission","/summary-list"),e,a),r),o),method:t.GET})),getSystemList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("submission","/system-list"),e,a),r),o),method:t.GET})),getExportSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o,withSourceCodes:m}})=>({url:n(p(l(s("submission","/summary-list-export"+(m?"?withSourceCodes=true":"")),e,a),r),o),method:t.GET})),getData:r(({params:{id:e}})=>({url:s("submission",`/${e}/data`),method:t.GET})),getLogs:r(({params:{id:e}})=>({url:s("submission",`/${e}/logs`),method:t.GET})),rejudge:r(({params:{id:e}})=>({url:s("submission",`/${e}/rejudge`),method:t.POST})),retrieve:r(({params:{id:e}})=>({url:s("submission",`/${e}/retrieve`),method:t.POST})),judge:r(({params:{id:e},body:a})=>({url:s("submission",`/${e}/judge`),method:t.POST,body:JSON.stringify(a)})),archive:r(({params:{id:e}})=>({url:s("submission",`/${e}/archive`),method:t.POST})),release:r(({params:{id:e}})=>({url:s("submission",`/${e}/release`),method:t.POST}))},image:{getPublicList:r(()=>({url:s("image","/public-list"),method:t.GET})),publish:r(({body:e})=>({url:s("image","/publish"),method:t.POST,body:JSON.stringify(e)}))},file:{publish:r(({body:e})=>({url:s("file","/publish"),method:t.POST,body:JSON.stringify(e)}))},note:{publish:r(({body:e})=>({url:s("note","/publish"),method:t.POST,headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})),getPdf:r(({params:{sourceUrl:e}})=>({url:s("note",`/pdf?sourceUrl=${e}`),method:t.GET})),createPdf:r(({body:e})=>({url:s("note","/pdf"),method:t.POST,body:JSON.stringify(e)}))},code:{run:r(({body:e})=>({url:s("code","/run"),method:t.POST,body:JSON.stringify(e)}))},ia:{chatCompletions:r(({body:e})=>({url:s("ia","/chat/completions"),method:t.POST,body:JSON.stringify(e)}))},company:{get:r(({params:{companyKey:e}}={params:{companyKey:""}})=>({url:u(s("company",""),e),method:t.GET})),getPermissionList:r(()=>({url:s("company","/permission-list"),method:t.GET})),getJudgeList:r(({params:{companyKey:e}}={params:{companyKey:""}})=>({url:u(s("company","/judge-list"),e),method:t.GET})),getTrustedCompaniesList:r(({params:{companyKey:e}}={params:{companyKey:""}})=>({url:u(s("company","/trusted-companies-list"),e),method:t.GET})),getResourceSpecifications:r(({params:{companyKey:e}}={params:{companyKey:""}})=>({url:u(s("company","/resource-specifications"),e),method:t.GET})),getEmailData:r(({params:{companyKey:e}}={params:{companyKey:""}})=>({url:u(s("company","/email-data"),e),method:t.GET})),updateImage:r(({params:{companyKey:e}={companyKey:""},body:a})=>({url:u(s("company","/image"),e),method:t.PUT,body:JSON.stringify(a)})),updateData:r(({params:{companyKey:e}={companyKey:""},body:a})=>({url:u(s("company",""),e),method:t.PATCH,body:JSON.stringify(a)})),updateSensitiveData:r(({params:{companyKey:e}={companyKey:""},body:a})=>({url:u(s("company","/sensitive-data"),e),method:t.PATCH,body:JSON.stringify(a)}))},locale:{get:r(({params:{locale:e,namespace:a}})=>({url:s("locale",`/${e}/${a}`),method:t.GET}))},judge:{getData:r(({params:{key:e}})=>({url:s("judge",`/${e}/data`),method:t.GET})),getSummaryList:r(({params:{filterUrl:e,sortUrl:a}={filterUrl:"",sortUrl:""}}={})=>({url:n(p(s("judge","/summary-list"),e),a),method:t.GET})),getSystemList:r(({params:{filterUrl:e,sortUrl:a}={filterUrl:"",sortUrl:""}}={})=>({url:n(p(s("judge","/system-list"),e),a),method:t.GET})),crawlLanguages:r(({params:{key:e}})=>({url:s("judge",`/${e}/crawl-languages`),method:t.POST})),patch:r(({params:{key:e},body:{languages:a,name:r,problemTags:o,isExternal:m,isSubmitSupported:i,url:y,logo:d,logoSize:l}})=>{const n={};return a&&(n.languages=a),"string"==typeof r&&(n.name=r),o&&(n.problemTags=o),"boolean"==typeof m&&(n.isExternal=m),"boolean"==typeof i&&(n.isSubmitSupported=i),"string"==typeof y&&(n.url=y),"string"==typeof d&&(n.logo=d),l&&(n.logoSize=l),{url:s("judge",`/${e}`),method:t.PATCH,body:JSON.stringify(n)}})},worksheet:{getData:r(({params:{key:e,companyKey:a}})=>({url:u(s("worksheet",`/${e}/data`),a),method:t.GET})),update:r(({params:{key:e},body:a})=>({url:s("worksheet",`/${e}`),method:t.PUT,body:JSON.stringify(a)})),getList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("worksheet","/list"),e,a),r),o),method:t.GET})),getSubmissionsUser:r(({params:{key:e,userKey:a,secondaryKey:r}})=>({url:s("worksheet",`/${e}/submissions/user/${a}${r?`?secondaryKey=${r}`:""}`),method:t.GET})),submitJkMd:r(({params:{worksheetKey:e,secondaryKey:a},body:r})=>({url:s("worksheet",`/${e}/submit/jk-md${a?`?secondaryKey=${a}`:""}`),method:t.POST,body:JSON.stringify(r)})),submitCodeEditor:r(({params:{worksheetKey:e,secondaryKey:a},body:r})=>({url:s("worksheet",`/${e}/submit/code-editor${a?`?secondaryKey=${a}`:""}`),method:t.POST,body:JSON.stringify(r)})),submitQuizProblem:r(({params:{worksheetKey:e,secondaryKey:a},body:r})=>({url:s("worksheet",`/${e}/submit/quiz-problem${a?`?secondaryKey=${a}`:""}`),method:t.POST,body:JSON.stringify(r)})),submitQuizOptions:r(({params:{worksheetKey:e,secondaryKey:a},body:r})=>({url:s("worksheet",`/${e}/submit/quiz-options${a?`?secondaryKey=${a}`:""}`),method:t.POST,body:JSON.stringify(r)}))},system:{services:{checkAndStart:r(()=>({url:s("sys","/services/check-and-start"),method:t.POST})),check:r(()=>({url:s("sys","/services/check"),method:t.POST})),clean:r(()=>({url:s("sys","/services/clean"),method:t.POST}))}},comment:{get:r(({params:{key:e}})=>({url:s("comment",`/${e}`),method:t.GET})),post:r(({params:{key:e},body:a})=>({url:s("comment",`/${e}`),method:t.POST,body:JSON.stringify(a)})),reply:r(({params:{key:e,id:a},body:r})=>({url:s("comment",`/${e}/${a}/reply`),method:t.POST,body:JSON.stringify(r)})),react:r(({params:{key:e,id:a},body:r})=>({url:s("comment",`/${e}/${a}/react`),method:t.POST,body:JSON.stringify(r)})),hide:r(({params:{key:e,id:a}})=>({url:s("comment",`/${e}/${a}/hide`),method:t.POST})),unhide:r(({params:{key:e,id:a}})=>({url:s("comment",`/${e}/${a}/unhide`),method:t.POST}))},class:{viewAssignmentMyWorksheetSubmitCodeEditor:r(({params:{classKey:e,cycleId:a,sessionId:r,assignmentId:o},body:m})=>({url:s("class",`/${e}/cycle/${a}/session/${r}/assignment/${o}/worksheet/submit-code-editor`),method:t.POST,body:JSON.stringify(m)}))},documentTemplate:{create:r(({body:e})=>({url:s("document-template",""),method:t.POST,body:JSON.stringify(e)})),getSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("document-template","/summary-list"),e,a),r),o),method:t.GET})),getData:r(({params:{key:e}})=>({url:s("document-template",`/${e}/data`),method:t.GET})),updateData:r(({params:{key:e,companyKey:a},body:r})=>({url:u(s("document-template",`/${e}`),a),method:t.PUT,body:JSON.stringify(r)}))},statistics:{getCompanyStats:r(({params:{companyKey:e,startTimestamp:a,endTimestamp:r,groupBy:o}})=>({url:u(s("statistics",`/company?startTimestamp=${a}&endTimestamp=${r}&groupBy=${o.join(",")}`),e),method:t.GET})),getProblemStats:r(({params:{companyKey:e,problemKey:a,startTimestamp:r,endTimestamp:o}})=>({url:u(s("statistics",`/problem/${a}?startTimestamp=${r}&endTimestamp=${o}`),e),method:t.GET})),getUsersTracksStats:r(({params:{companyKeys:e,startTimestamp:a,endTimestamp:r,groupBy:o}})=>({url:s("statistics",`/users-tracks?startTimestamp=${a}&endTimestamp=${r}&groupBy=${o.join(",")}${e?`&companyKeys=${e}`:""}`),method:t.GET}))},excalidraw:{getSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("excalidraw","/summary-list"),e,a),r),o),method:t.GET})),create:r(({body:e})=>({url:s("excalidraw",""),method:t.POST,body:JSON.stringify(e)})),updateData:r(({params:{key:e},body:a})=>({url:s("excalidraw",`/${e}/data`),method:t.PUT,body:JSON.stringify(a)})),getMetadata:r(({params:{key:e}})=>({url:s("excalidraw",`/${e}/metadata`),method:t.GET})),getData:r(({params:{key:e}})=>({url:s("excalidraw",`/${e}/data`),method:t.GET}))},mermaid:{getSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("mermaid","/summary-list"),e,a),r),o),method:t.GET})),create:r(({body:e})=>({url:s("mermaid",""),method:t.POST,body:JSON.stringify(e)})),updateData:r(({params:{key:e},body:a})=>({url:s("mermaid",`/${e}/data`),method:t.PUT,body:JSON.stringify(a)})),getMetadata:r(({params:{key:e}})=>({url:s("mermaid",`/${e}/metadata`),method:t.GET})),getData:r(({params:{key:e}})=>({url:s("mermaid",`/${e}/data`),method:t.GET}))},markdown:{getSummaryList:r(({params:{page:e,pageSize:a,filterUrl:r,sortUrl:o}})=>({url:n(p(l(s("markdown","/summary-list"),e,a),r),o),method:t.GET})),create:r(({body:e})=>({url:s("markdown",""),method:t.POST,body:JSON.stringify(e)})),updateData:r(({params:{key:e},body:a})=>({url:s("markdown",`/${e}/data`),method:t.PUT,body:JSON.stringify(a)})),getMetadata:r(({params:{key:e}})=>({url:s("markdown",`/${e}/metadata`),method:t.GET})),getData:r(({params:{key:e}})=>({url:s("markdown",`/${e}/data`),method:t.GET}))},export:{websiteToPdf:r(({params:{url:e,headerTemplate:a,footerTemplate:r,margin:o,format:m}})=>({url:s("export","/website-to-pdf"),method:t.POST,body:JSON.stringify({url:e,headerTemplate:a,footerTemplate:r,margin:o,format:m})})),problem:{statementToPdf:r(({params:{key:e,language:a}})=>({url:s("export","/problem/statement-to-pdf"),method:t.POST,body:JSON.stringify({key:e,language:a})})),statementToPng:r(({params:{key:e,token:a,language:r}})=>({url:s("export","/problem/statement-to-png"),method:t.POST,body:JSON.stringify({key:e,token:a,language:r})}))},contest:{problems:{statementsToPdf:r(({params:{key:e,language:a}})=>({url:s("export","/contest/problems/statements-to-pdf"),method:t.POST,body:JSON.stringify({key:e,language:a})}))}}},webScraping:{codeforces:{problemStatement:r(({params:{contestId:e,index:a}})=>({url:s("web-scraping","/codeforces/problem-statement"),method:t.POST,body:JSON.stringify({contestId:e,index:a})}))},patito:{problemStatement:r(({params:{id:e}})=>({url:s("web-scraping","/patito/problem-statement"),method:t.POST,body:JSON.stringify({id:e})}))}},websocket:{auth:r(()=>({url:s("websocket","/auth"),method:t.POST}))}}}},T=new class{JUDGE(e){const t=e??"";return{home:()=>h("/"),profiles:{view:({nickname:e,companyKey:s,tab:r=i.OVERVIEW})=>c(t,h(`/profiles/${a(e,s)}${r?`?tab=${r}`:""}`))},problems:{list:()=>c(t,h("/problems")),view:({key:e,tab:a=m.STATEMENT})=>c(t,h(`/problems/${e}${a?`?tab=${a}`:""}`)),edit:({key:e,tab:a=m.STATEMENT})=>c(t,h(`/problems/${e}/edit${a?`?tab=${a}`:""}`)),new:({judge:e,tab:a})=>c(t,h(`/problems/new?judge=${e}${a?`&tab=${a}`:""}`))},contests:{list:({tab:e})=>c(t,h("/contests"+(e?`?tab=${e}`:""))),view:({key:e,tab:a=o.OVERVIEW,subTab:s})=>c(t,h(`/contests/${e}${a?`?tab=${a}`:""}${s?(a?"&":"?")+`subTab=${s}`:""}`)),edit:({key:e,tab:a=o.OVERVIEW})=>c(t,h(`/contests/${e}/edit${a?`?tab=${a}`:""}`)),new:({tab:e}={tab:void 0})=>c(t,h("/contests/new"+(e?`?tab=${e}`:"")))},submissions:{view:({id:e})=>c(t,h(`/submissions/${e}`))},boards:{page:()=>c(t,h("/boards"))},ide:{page:()=>c(t,h("/ide"))}}}COACH(e){const t=e??"";return{home:()=>h("/"),worksheets:{list:()=>c(t,h("/worksheets")),view:({key:e,page:a=1})=>c(t,h(`/worksheets/${e}${a?`?page=${a}`:""}`)),edit:({key:e,tab:a,from:s})=>c(t,h(`/worksheets/${e}/edit?tab=${a}${s?`&from=${s}`:""}`)),new:({tab:e})=>c(t,h(`/worksheets/new?tab=${e}`))},classes:{list:()=>c(t,h("/classes")),view:({key:e})=>c(t,h(`/classes/${e}`)),cycleView:({key:e,cycleId:a})=>c(t,h(`/classes/${e}/cycle/${a}`)),edit:({key:e})=>c(t,h(`/classes/${e}/edit`)),new:()=>c(t,h("/classes/new"))},courses:{list:()=>c(t,h("/courses")),view:({key:e})=>c(t,h(`/courses/${e}`)),lessonView:({key:e,lessonIndex:a,page:s=1})=>c(t,h(`/courses/${e}/lessons/${a}${s?`?page=${s}`:""}`)),edit:({key:e})=>c(t,h(`/courses/${e}/edit`)),new:()=>c(t,h("/courses/new"))},profiles:{view:({nickname:e,tab:a=i.OVERVIEW})=>c(t,h(`/profiles/${e}${a?`?tab=${a}`:""}`))}}}};export{T as a,g as c,S as j,b as p};
@@ -1 +1 @@
1
- import{P as t,N as e,a as s,D as i,b as r,T as h,I as n}from"./basic-setup-DnHlH_GN.js";class o{constructor(t,e,s,i,r,h,n,o,a,l=0,c){this.p=t,this.stack=e,this.state=s,this.reducePos=i,this.pos=r,this.score=h,this.buffer=n,this.bufferBase=o,this.curContext=a,this.lookAhead=l,this.parent=c}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,s=0){let i=t.parser.context;return new o(t,[],e,s,s,0,[],0,i?new a(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let s=t>>19,i=65535&t,{parser:r}=this.p,h=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),n=r.dynamicPrecedence(i);if(n&&(this.score+=n),0==s)return this.pushState(r.getGoto(this.state,i,!0),this.reducePos),i<r.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,h?8:4,!0),void this.reduceContext(i,this.reducePos);let o=this.stack.length-3*(s-1)-(262144&t?6:0),a=o?this.stack[o-2]:this.p.ranges[0].from,l=this.reducePos-a;l>=2e3&&!(null===(e=this.p.parser.nodeSet.types[i])||void 0===e?void 0:e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSize<l&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=l));let c=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-c;if(i<r.minRepeatTerm||131072&t){let t=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,t,u+4,!0)}if(262144&t)this.state=this.stack[o];else{let t=this.stack[o-3];this.state=r.getGoto(t,i,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(i,a)}storeNode(t,e,s,i=4,r=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let t=this,i=this.buffer.length;if(0==i&&t.parent&&(i=t.bufferBase-t.parent.bufferBase,t=t.parent),i>0&&0==t.buffer[i-4]&&t.buffer[i-1]>-1){if(e==s)return;if(t.buffer[i-2]>=e)return void(t.buffer[i-2]=s)}}if(r&&this.pos!=s){let r=this.buffer.length;if(r>0&&(0!=this.buffer[r-4]||this.buffer[r-1]<0)){let t=!1;for(let e=r;e>0&&this.buffer[e-2]>s;e-=4)if(this.buffer[e-1]>=0){t=!0;break}if(t)for(;r>0&&this.buffer[r-2]>s;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=s,this.buffer[r+3]=i}else this.buffer.push(t,e,s,i)}shift(t,e,s,i){if(131072&t)this.pushState(65535&t,this.pos);else if(262144&t)this.pos=i,this.shiftContext(e,s),e<=this.p.parser.maxNode&&this.buffer.push(e,s,i,4);else{let r=t,{parser:h}=this.p;this.pos=i;let n=h.stateFlag(r,1);!n&&(i>s||e<=h.maxNode)&&(this.reducePos=i),this.pushState(r,n?s:Math.min(s,this.reducePos)),this.shiftContext(e,s),e<=h.maxNode&&this.buffer.push(e,s,i,4)}}apply(t,e,s,i){65536&t?this.reduce(t):this.shift(t,e,s,i)}useNode(t,e){let s=this.p.reused.length-1;(s<0||this.p.reused[s]!=t)&&(this.p.reused.push(t),s++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(s,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let s=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new o(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let s=t<=this.p.parser.maxNode;s&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,s?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new l(this);;){let s=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==s)return!1;if(!(65536&s))return!0;e.reduce(s)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let s=[];for(let i,r=0;r<e.length;r+=2)(i=e[r+1])!=this.state&&this.p.parser.hasAction(i,t)&&s.push(e[r],i);if(this.stack.length<120)for(let t=0;s.length<8&&t<e.length;t+=2){let i=e[t+1];s.some((t,e)=>1&e&&t==i)||s.push(e[t],i)}e=s}let s=[];for(let t=0;t<e.length&&s.length<4;t+=2){let i=e[t+1];if(i==this.state)continue;let r=this.split();r.pushState(i,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[t],this.pos),r.reducePos=this.pos,r.score-=200,s.push(r)}return s}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if(!(65536&e))return!1;if(!t.validAction(this.state,e)){let s=e>>19,i=65535&e,r=this.stack.length-3*s;if(r<0||t.getGoto(this.stack[r],i,!1)<0){let t=this.findForcedReduction();if(null==t)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],s=(i,r)=>{if(!e.includes(i))return e.push(i),t.allActions(i,e=>{if(393216&e);else if(65536&e){let s=(e>>19)-r;if(s>1){let i=65535&e,r=this.stack.length-3*s;if(r>=0&&t.getGoto(this.stack[r],i,!1)>=0)return s<<19|65536|i}}else{let t=s(e,r+1);if(null!=t)return t}})};return s(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||-3!=this.buffer[t])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||-4!=this.buffer[t])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new a(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){return!(t<=this.lookAhead)&&(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class a{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class l{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,s=t>>19;0==s?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(s-1);let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}}class c{constructor(t,e,s){this.stack=t,this.pos=e,this.index=s,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new c(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new c(this.stack,this.pos,this.index)}}function u(t,e=Uint16Array){if("string"!=typeof t)return t;let s=null;for(let i=0,r=0;i<t.length;){let h=0;for(;;){let e=t.charCodeAt(i++),s=!1;if(126==e){h=65535;break}e>=92&&e--,e>=34&&e--;let r=e-32;if(r>=46&&(r-=46,s=!0),h+=r,s)break;h*=46}s?s[r++]=h:s=new e(h)}return s}class f{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const p=new f;class d{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=p,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let s=this.range,i=this.rangeIndex,r=this.pos+t;for(;r<s.from;){if(!i)return null;let t=this.ranges[--i];r-=s.from-t.to,s=t}for(;e<0?r>s.to:r>=s.to;){if(i==this.ranges.length-1)return null;let t=this.ranges[++i];r+=t.from-s.to,s=t}return r}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e,s,i=this.chunkOff+t;if(i>=0&&i<this.chunk.length)e=this.pos+t,s=this.chunk.charCodeAt(i);else{let i=this.resolveOffset(t,1);if(null==i)return-1;if(e=i,e>=this.chunk2Pos&&e<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(e-this.chunk2Pos);else{let t=this.rangeIndex,i=this.range;for(;i.to<=e;)i=this.ranges[++t];this.chunk2=this.input.chunk(this.chunk2Pos=e),e+this.chunk2.length>i.to&&(this.chunk2=this.chunk2.slice(0,i.to-e)),s=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),s}acceptToken(t,e=0){let s=e?this.resolveOffset(e,-1):this.pos;if(null==s||s<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=s}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=p,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let s="";for(let i of this.ranges){if(i.from>=e)break;i.to>t&&(s+=this.input.read(Math.max(i.from,t),Math.min(i.to,e)))}return s}}class k{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:s}=e.p;x(this.data,t,e,this.id,s.data,s.tokenPrecTable)}}k.prototype.contextual=k.prototype.fallback=k.prototype.extend=!1;class g{constructor(t,e,s){this.precTable=e,this.elseToken=s,this.data="string"==typeof t?u(t):t}token(t,e){let s=t.pos,i=0;for(;;){let s=t.next<0,r=t.resolveOffset(1,1);if(x(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(null==this.elseToken)return;if(s||i++,null==r)break;t.reset(r,t.token)}i&&(t.reset(s,t.token),t.acceptToken(this.elseToken,i))}}g.prototype.contextual=k.prototype.fallback=k.prototype.extend=!1;class m{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function x(t,e,s,i,r,h){let n=0,o=1<<i,{dialect:a}=s.p.parser;t:for(;0!=(o&t[n]);){let s=t[n+1];for(let i=n+3;i<s;i+=2)if((t[i+1]&o)>0){let s=t[i];if(a.allows(s)&&(-1==e.token.value||e.token.value==s||S(s,e.token.value,r,h))){e.acceptToken(s);break}}let i=e.next,l=0,c=t[n+2];if(!(e.next<0&&c>l&&65535==t[s+3*c-3])){for(;l<c;){let r=l+c>>1,h=s+r+(r<<1),o=t[h],a=t[h+1]||65536;if(i<o)c=r;else{if(!(i>=a)){n=t[h+2],e.advance();continue t}l=r+1}}break}n=t[s+3*c-1]}}function b(t,e,s){for(let i,r=e;65535!=(i=t[r]);r++)if(i==s)return r-e;return-1}function S(t,e,s,i){let r=b(s,i,e);return r<0||b(s,i,t)<r}const v="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG);let P=null;function A(t,e,s){let i=t.cursor(n.IncludeAnonymous);for(i.moveTo(e);;)if(!(s<0?i.childBefore(e):i.childAfter(e)))for(;;){if((s<0?i.to<e:i.from>e)&&!i.type.isError)return s<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(s<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return s<0?0:t.length}}class C{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?A(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?A(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let s=this.trees[e],i=this.index[e];if(i==s.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let n=s.children[i],o=this.start[e]+s.positions[i];if(o>t)return this.nextStart=o,null;if(n instanceof h){if(o==t){if(o<this.safeFrom)return null;let t=o+n.length;if(t<=this.safeTo){let e=n.prop(r.lookAhead);if(!e||t+e<this.fragment.to)return n}}this.index[e]++,o+n.length>=Math.max(this.safeFrom,t)&&(this.trees.push(n),this.start.push(o),this.index.push(0))}else this.index[e]++,this.nextStart=o+n.length}}}class y{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(t=>new f)}getActions(t){let e=0,s=null,{parser:i}=t.p,{tokenizers:r}=i,h=i.stateSlot(t.state,3),n=t.curContext?t.curContext.hash:0,o=0;for(let i=0;i<r.length;i++){if(!(1<<i&h))continue;let a=r[i],l=this.tokens[i];if((!s||a.fallback)&&((a.contextual||l.start!=t.pos||l.mask!=h||l.context!=n)&&(this.updateCachedToken(l,a,t),l.mask=h,l.context=n),l.lookAhead>l.end+25&&(o=Math.max(l.lookAhead,o)),0!=l.value)){let i=e;if(l.extended>-1&&(e=this.addActions(t,l.extended,l.end,e)),e=this.addActions(t,l.value,l.end,e),!a.extend&&(s=l,e>i))break}}for(;this.actions.length>e;)this.actions.pop();return o&&t.setLookAhead(o),s||t.pos!=this.stream.end||(s=new f,s.value=t.p.parser.eofTerm,s.start=s.end=t.pos,e=this.addActions(t,s.value,s.end,e)),this.mainToken=s,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new f,{pos:s,p:i}=t;return e.start=s,e.end=Math.min(s+1,i.stream.end),e.value=s==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(t,e,s){let i=this.stream.clipPos(s.pos);if(e.token(this.stream.reset(i,t),s),t.value>-1){let{parser:e}=s.p;for(let i=0;i<e.specialized.length;i++)if(e.specialized[i]==t.value){let r=e.specializers[i](this.stream.read(t.start,t.end),s);if(r>=0&&s.p.parser.dialect.allows(r>>1)){1&r?t.extended=r>>1:t.value=r>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,e,s,i){for(let e=0;e<i;e+=3)if(this.actions[e]==t)return i;return this.actions[i++]=t,this.actions[i++]=e,this.actions[i++]=s,i}addActions(t,e,s,i){let{state:r}=t,{parser:h}=t.p,{data:n}=h;for(let t=0;t<2;t++)for(let o=h.stateSlot(r,t?2:1);;o+=3){if(65535==n[o]){if(1!=n[o+1]){0==i&&2==n[o+1]&&(i=this.putAction(B(n,o+2),e,s,i));break}o=B(n,o+2)}n[o]==e&&(i=this.putAction(B(n,o+1),e,s,i))}return i}}class T{constructor(t,e,s,i){this.parser=t,this.input=e,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new d(e,i),this.tokens=new y(t,this.stream),this.topTerm=t.top[1];let{from:r}=i[0];this.stacks=[o.start(this,t.top[0],r)],this.fragments=s.length&&this.stream.end-r>4*t.bufferLength?new C(s,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,s=this.stacks,i=this.minStackPos,r=this.stacks=[];if(this.bigReductionCount>300&&1==s.length){let[t]=s;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let h=0;h<s.length;h++){let n=s[h];for(;;){if(this.tokens.mainToken=null,n.pos>i)r.push(n);else{if(this.advanceStack(n,r,s))continue;{t||(t=[],e=[]),t.push(n);let s=this.tokens.getMainToken(n);e.push(s.value,s.end)}}break}}if(!r.length){let e=t&&function(t){let e=null;for(let s of t){let t=s.p.stoppedAt;(s.pos==s.p.stream.end||null!=t&&s.pos>t)&&s.p.parser.stateFlag(s.state,2)&&(!e||e.score<s.score)&&(e=s)}return e}(t);if(e)return v&&console.log("Finish with "+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw v&&t&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+i);this.recovering||(this.recovering=5)}if(this.recovering&&t){let s=null!=this.stoppedAt&&t[0].pos>this.stoppedAt?t[0]:this.runRecovery(t,e,r);if(s)return v&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(r.length>t)for(r.sort((t,e)=>e.score-t.score);r.length>t;)r.pop();r.some(t=>t.reducePos>i)&&this.recovering--}else if(r.length>1){t:for(let t=0;t<r.length-1;t++){let e=r[t];for(let s=t+1;s<r.length;s++){let i=r[s];if(e.sameState(i)||e.buffer.length>500&&i.buffer.length>500){if(!((e.score-i.score||e.buffer.length-i.buffer.length)>0)){r.splice(t--,1);continue t}r.splice(s--,1)}}}r.length>12&&(r.sort((t,e)=>e.score-t.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let t=1;t<r.length;t++)r[t].pos<this.minStackPos&&(this.minStackPos=r[t].pos);return null}stopAt(t){if(null!=this.stoppedAt&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,s){let i=t.pos,{parser:n}=this,o=v?this.stackID(t)+" -> ":"";if(null!=this.stoppedAt&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,s=e?t.curContext.hash:0;for(let a=this.fragments.nodeAt(i);a;){let i=this.parser.nodeSet.types[a.type.id]==a.type?n.getGoto(t.state,a.type.id):-1;if(i>-1&&a.length&&(!e||(a.prop(r.contextHash)||0)==s))return t.useNode(a,i),v&&console.log(o+this.stackID(t)+` (via reuse of ${n.getName(a.type.id)})`),!0;if(!(a instanceof h)||0==a.children.length||a.positions[0]>0)break;let l=a.children[0];if(!(l instanceof h&&0==a.positions[0]))break;a=l}}let a=n.stateSlot(t.state,4);if(a>0)return t.reduce(a),v&&console.log(o+this.stackID(t)+` (via always-reduce ${n.getName(65535&a)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let l=this.tokens.getActions(t);for(let r=0;r<l.length;){let h=l[r++],a=l[r++],c=l[r++],u=r==l.length||!s,f=u?t:t.split(),p=this.tokens.mainToken;if(f.apply(h,a,p?p.start:f.pos,c),v&&console.log(o+this.stackID(f)+` (via ${65536&h?`reduce of ${n.getName(65535&h)}`:"shift"} for ${n.getName(a)} @ ${i}${f==t?"":", split"})`),u)return!0;f.pos>i?e.push(f):s.push(f)}return!1}advanceFully(t,e){let s=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>s)return w(t,e),!0}}runRecovery(t,e,s){let i=null,r=!1;for(let h=0;h<t.length;h++){let n=t[h],o=e[h<<1],a=e[1+(h<<1)],l=v?this.stackID(n)+" -> ":"";if(n.deadEnd){if(r)continue;if(r=!0,n.restart(),v&&console.log(l+this.stackID(n)+" (restarted)"),this.advanceFully(n,s))continue}let c=n.split(),u=l;for(let t=0;t<10&&c.forceReduce();t++){if(v&&console.log(u+this.stackID(c)+" (via force-reduce)"),this.advanceFully(c,s))break;v&&(u=this.stackID(c)+" -> ")}for(let t of n.recoverByInsert(o))v&&console.log(l+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,s);this.stream.end>n.pos?(a==n.pos&&(a++,o=0),n.recoverByDelete(o,a),v&&console.log(l+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),w(n,s)):(!i||i.score<c.score)&&(i=c)}return i}stackToTree(t){return t.close(),h.build({buffer:c.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(P||(P=new WeakMap)).get(t);return e||P.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function w(t,e){for(let s=0;s<e.length;s++){let i=e[s];if(i.pos==t.pos&&i.sameState(t))return void(e[s].score<t.score&&(e[s]=t))}e.push(t)}class N{constructor(t,e,s){this.source=t,this.flags=e,this.disabled=s}allows(t){return!this.disabled||0==this.disabled[t]}}const R=t=>t;class z{constructor(t){this.start=t.start,this.shift=t.shift||R,this.reduce=t.reduce||R,this.reuse=t.reuse||R,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class I extends t{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let h=t.nodeNames.split(" ");this.minRepeatTerm=h.length;for(let e=0;e<t.repeatNodeCount;e++)h.push("");let n=Object.keys(t.topRules).map(e=>t.topRules[e][1]),o=[];for(let t=0;t<h.length;t++)o.push([]);function a(t,e,s){o[t].push([e,e.deserialize(String(s))])}if(t.nodeProps)for(let e of t.nodeProps){let t=e[0];"string"==typeof t&&(t=r[t]);for(let s=1;s<e.length;){let i=e[s++];if(i>=0)a(i,t,e[s++]);else{let r=e[s+-i];for(let h=-i;h>0;h--)a(e[s++],t,r);s++}}}this.nodeSet=new e(h.map((e,i)=>s.define({name:i>=this.minRepeatTerm?void 0:e,id:i,props:o[i],top:n.indexOf(i)>-1,error:0==i,skipped:t.skippedNodes&&t.skippedNodes.indexOf(i)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=i;let l=u(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let t=0;t<this.specializerSpecs.length;t++)this.specialized[t]=this.specializerSpecs[t].term;this.specializers=this.specializerSpecs.map(D),this.states=u(t.states,Uint32Array),this.data=u(t.stateData),this.goto=u(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(t=>"number"==typeof t?new k(l,t):t),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,s){let i=new T(this,t,e,s);for(let r of this.wrappers)i=r(i,t,e,s);return i}getGoto(t,e,s=!1){let i=this.goto;if(e>=i[0])return-1;for(let r=i[e+1];;){let e=i[r++],h=1&e,n=i[r++];if(h&&s)return n;for(let s=r+(e>>1);r<s;r++)if(i[r]==t)return n;if(h)return-1}}hasAction(t,e){let s=this.data;for(let i=0;i<2;i++)for(let r,h=this.stateSlot(t,i?2:1);;h+=3){if(65535==(r=s[h])){if(1!=s[h+1]){if(2==s[h+1])return B(s,h+2);break}r=s[h=B(s,h+2)]}if(r==e||0==r)return B(s,h+1)}return 0}stateSlot(t,e){return this.states[6*t+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,t=>t==e||null)}allActions(t,e){let s=this.stateSlot(t,4),i=s?e(s):void 0;for(let s=this.stateSlot(t,1);null==i;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=B(this.data,s+2)}i=e(B(this.data,s+1))}return i}nextStates(t){let e=[];for(let s=this.stateSlot(t,1);;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=B(this.data,s+2)}if(!(1&this.data[s+2])){let t=this.data[s+1];e.some((e,s)=>1&s&&e==t)||e.push(this.data[s],t)}}return e}configure(t){let e=Object.assign(Object.create(I.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let s=this.topRules[t.top];if(!s)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=s}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(e=>{let s=t.tokenizers.find(t=>t.from==e);return s?s.to:e})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((s,i)=>{let r=t.specializers.find(t=>t.from==s.external);if(!r)return s;let h=Object.assign(Object.assign({},s),{external:r.to});return e.specializers[i]=D(h),h})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),s=e.map(()=>!1);if(t)for(let i of t.split(" ")){let t=e.indexOf(i);t>=0&&(s[t]=!0)}let i=null;for(let t=0;t<e.length;t++)if(!s[t])for(let s,r=this.dialects[e[t]];65535!=(s=this.data[r++]);)(i||(i=new Uint8Array(this.maxTerm+1)))[s]=1;return new N(t,s,i)}static deserialize(t){return new I(t)}}function B(t,e){return t[e]|t[e+1]<<16}function D(t){if(t.external){let e=t.extend?1:0;return(s,i)=>t.external(s,i)<<1|e}return t.get}export{z as C,m as E,I as L,g as a};
1
+ import{P as t,N as e,a as s,D as i,b as r,T as h,I as n}from"./basic-setup-DtpgwOSH.js";class o{constructor(t,e,s,i,r,h,n,o,a,l=0,c){this.p=t,this.stack=e,this.state=s,this.reducePos=i,this.pos=r,this.score=h,this.buffer=n,this.bufferBase=o,this.curContext=a,this.lookAhead=l,this.parent=c}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,s=0){let i=t.parser.context;return new o(t,[],e,s,s,0,[],0,i?new a(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let s=t>>19,i=65535&t,{parser:r}=this.p,h=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),n=r.dynamicPrecedence(i);if(n&&(this.score+=n),0==s)return this.pushState(r.getGoto(this.state,i,!0),this.reducePos),i<r.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,h?8:4,!0),void this.reduceContext(i,this.reducePos);let o=this.stack.length-3*(s-1)-(262144&t?6:0),a=o?this.stack[o-2]:this.p.ranges[0].from,l=this.reducePos-a;l>=2e3&&!(null===(e=this.p.parser.nodeSet.types[i])||void 0===e?void 0:e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSize<l&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=l));let c=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-c;if(i<r.minRepeatTerm||131072&t){let t=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,t,u+4,!0)}if(262144&t)this.state=this.stack[o];else{let t=this.stack[o-3];this.state=r.getGoto(t,i,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(i,a)}storeNode(t,e,s,i=4,r=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let t=this,i=this.buffer.length;if(0==i&&t.parent&&(i=t.bufferBase-t.parent.bufferBase,t=t.parent),i>0&&0==t.buffer[i-4]&&t.buffer[i-1]>-1){if(e==s)return;if(t.buffer[i-2]>=e)return void(t.buffer[i-2]=s)}}if(r&&this.pos!=s){let r=this.buffer.length;if(r>0&&(0!=this.buffer[r-4]||this.buffer[r-1]<0)){let t=!1;for(let e=r;e>0&&this.buffer[e-2]>s;e-=4)if(this.buffer[e-1]>=0){t=!0;break}if(t)for(;r>0&&this.buffer[r-2]>s;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=s,this.buffer[r+3]=i}else this.buffer.push(t,e,s,i)}shift(t,e,s,i){if(131072&t)this.pushState(65535&t,this.pos);else if(262144&t)this.pos=i,this.shiftContext(e,s),e<=this.p.parser.maxNode&&this.buffer.push(e,s,i,4);else{let r=t,{parser:h}=this.p;this.pos=i;let n=h.stateFlag(r,1);!n&&(i>s||e<=h.maxNode)&&(this.reducePos=i),this.pushState(r,n?s:Math.min(s,this.reducePos)),this.shiftContext(e,s),e<=h.maxNode&&this.buffer.push(e,s,i,4)}}apply(t,e,s,i){65536&t?this.reduce(t):this.shift(t,e,s,i)}useNode(t,e){let s=this.p.reused.length-1;(s<0||this.p.reused[s]!=t)&&(this.p.reused.push(t),s++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(s,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let s=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new o(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let s=t<=this.p.parser.maxNode;s&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,s?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new l(this);;){let s=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==s)return!1;if(!(65536&s))return!0;e.reduce(s)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let s=[];for(let i,r=0;r<e.length;r+=2)(i=e[r+1])!=this.state&&this.p.parser.hasAction(i,t)&&s.push(e[r],i);if(this.stack.length<120)for(let t=0;s.length<8&&t<e.length;t+=2){let i=e[t+1];s.some((t,e)=>1&e&&t==i)||s.push(e[t],i)}e=s}let s=[];for(let t=0;t<e.length&&s.length<4;t+=2){let i=e[t+1];if(i==this.state)continue;let r=this.split();r.pushState(i,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[t],this.pos),r.reducePos=this.pos,r.score-=200,s.push(r)}return s}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if(!(65536&e))return!1;if(!t.validAction(this.state,e)){let s=e>>19,i=65535&e,r=this.stack.length-3*s;if(r<0||t.getGoto(this.stack[r],i,!1)<0){let t=this.findForcedReduction();if(null==t)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],s=(i,r)=>{if(!e.includes(i))return e.push(i),t.allActions(i,e=>{if(393216&e);else if(65536&e){let s=(e>>19)-r;if(s>1){let i=65535&e,r=this.stack.length-3*s;if(r>=0&&t.getGoto(this.stack[r],i,!1)>=0)return s<<19|65536|i}}else{let t=s(e,r+1);if(null!=t)return t}})};return s(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||-3!=this.buffer[t])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||-4!=this.buffer[t])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new a(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){return!(t<=this.lookAhead)&&(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class a{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class l{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,s=t>>19;0==s?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(s-1);let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}}class c{constructor(t,e,s){this.stack=t,this.pos=e,this.index=s,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new c(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new c(this.stack,this.pos,this.index)}}function u(t,e=Uint16Array){if("string"!=typeof t)return t;let s=null;for(let i=0,r=0;i<t.length;){let h=0;for(;;){let e=t.charCodeAt(i++),s=!1;if(126==e){h=65535;break}e>=92&&e--,e>=34&&e--;let r=e-32;if(r>=46&&(r-=46,s=!0),h+=r,s)break;h*=46}s?s[r++]=h:s=new e(h)}return s}class f{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const p=new f;class d{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=p,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let s=this.range,i=this.rangeIndex,r=this.pos+t;for(;r<s.from;){if(!i)return null;let t=this.ranges[--i];r-=s.from-t.to,s=t}for(;e<0?r>s.to:r>=s.to;){if(i==this.ranges.length-1)return null;let t=this.ranges[++i];r+=t.from-s.to,s=t}return r}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e,s,i=this.chunkOff+t;if(i>=0&&i<this.chunk.length)e=this.pos+t,s=this.chunk.charCodeAt(i);else{let i=this.resolveOffset(t,1);if(null==i)return-1;if(e=i,e>=this.chunk2Pos&&e<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(e-this.chunk2Pos);else{let t=this.rangeIndex,i=this.range;for(;i.to<=e;)i=this.ranges[++t];this.chunk2=this.input.chunk(this.chunk2Pos=e),e+this.chunk2.length>i.to&&(this.chunk2=this.chunk2.slice(0,i.to-e)),s=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),s}acceptToken(t,e=0){let s=e?this.resolveOffset(e,-1):this.pos;if(null==s||s<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=s}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=p,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let s="";for(let i of this.ranges){if(i.from>=e)break;i.to>t&&(s+=this.input.read(Math.max(i.from,t),Math.min(i.to,e)))}return s}}class k{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:s}=e.p;x(this.data,t,e,this.id,s.data,s.tokenPrecTable)}}k.prototype.contextual=k.prototype.fallback=k.prototype.extend=!1;class g{constructor(t,e,s){this.precTable=e,this.elseToken=s,this.data="string"==typeof t?u(t):t}token(t,e){let s=t.pos,i=0;for(;;){let s=t.next<0,r=t.resolveOffset(1,1);if(x(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(null==this.elseToken)return;if(s||i++,null==r)break;t.reset(r,t.token)}i&&(t.reset(s,t.token),t.acceptToken(this.elseToken,i))}}g.prototype.contextual=k.prototype.fallback=k.prototype.extend=!1;class m{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function x(t,e,s,i,r,h){let n=0,o=1<<i,{dialect:a}=s.p.parser;t:for(;0!=(o&t[n]);){let s=t[n+1];for(let i=n+3;i<s;i+=2)if((t[i+1]&o)>0){let s=t[i];if(a.allows(s)&&(-1==e.token.value||e.token.value==s||S(s,e.token.value,r,h))){e.acceptToken(s);break}}let i=e.next,l=0,c=t[n+2];if(!(e.next<0&&c>l&&65535==t[s+3*c-3])){for(;l<c;){let r=l+c>>1,h=s+r+(r<<1),o=t[h],a=t[h+1]||65536;if(i<o)c=r;else{if(!(i>=a)){n=t[h+2],e.advance();continue t}l=r+1}}break}n=t[s+3*c-1]}}function b(t,e,s){for(let i,r=e;65535!=(i=t[r]);r++)if(i==s)return r-e;return-1}function S(t,e,s,i){let r=b(s,i,e);return r<0||b(s,i,t)<r}const v="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG);let P=null;function A(t,e,s){let i=t.cursor(n.IncludeAnonymous);for(i.moveTo(e);;)if(!(s<0?i.childBefore(e):i.childAfter(e)))for(;;){if((s<0?i.to<e:i.from>e)&&!i.type.isError)return s<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(s<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return s<0?0:t.length}}class C{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?A(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?A(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let s=this.trees[e],i=this.index[e];if(i==s.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let n=s.children[i],o=this.start[e]+s.positions[i];if(o>t)return this.nextStart=o,null;if(n instanceof h){if(o==t){if(o<this.safeFrom)return null;let t=o+n.length;if(t<=this.safeTo){let e=n.prop(r.lookAhead);if(!e||t+e<this.fragment.to)return n}}this.index[e]++,o+n.length>=Math.max(this.safeFrom,t)&&(this.trees.push(n),this.start.push(o),this.index.push(0))}else this.index[e]++,this.nextStart=o+n.length}}}class y{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(t=>new f)}getActions(t){let e=0,s=null,{parser:i}=t.p,{tokenizers:r}=i,h=i.stateSlot(t.state,3),n=t.curContext?t.curContext.hash:0,o=0;for(let i=0;i<r.length;i++){if(!(1<<i&h))continue;let a=r[i],l=this.tokens[i];if((!s||a.fallback)&&((a.contextual||l.start!=t.pos||l.mask!=h||l.context!=n)&&(this.updateCachedToken(l,a,t),l.mask=h,l.context=n),l.lookAhead>l.end+25&&(o=Math.max(l.lookAhead,o)),0!=l.value)){let i=e;if(l.extended>-1&&(e=this.addActions(t,l.extended,l.end,e)),e=this.addActions(t,l.value,l.end,e),!a.extend&&(s=l,e>i))break}}for(;this.actions.length>e;)this.actions.pop();return o&&t.setLookAhead(o),s||t.pos!=this.stream.end||(s=new f,s.value=t.p.parser.eofTerm,s.start=s.end=t.pos,e=this.addActions(t,s.value,s.end,e)),this.mainToken=s,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new f,{pos:s,p:i}=t;return e.start=s,e.end=Math.min(s+1,i.stream.end),e.value=s==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(t,e,s){let i=this.stream.clipPos(s.pos);if(e.token(this.stream.reset(i,t),s),t.value>-1){let{parser:e}=s.p;for(let i=0;i<e.specialized.length;i++)if(e.specialized[i]==t.value){let r=e.specializers[i](this.stream.read(t.start,t.end),s);if(r>=0&&s.p.parser.dialect.allows(r>>1)){1&r?t.extended=r>>1:t.value=r>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,e,s,i){for(let e=0;e<i;e+=3)if(this.actions[e]==t)return i;return this.actions[i++]=t,this.actions[i++]=e,this.actions[i++]=s,i}addActions(t,e,s,i){let{state:r}=t,{parser:h}=t.p,{data:n}=h;for(let t=0;t<2;t++)for(let o=h.stateSlot(r,t?2:1);;o+=3){if(65535==n[o]){if(1!=n[o+1]){0==i&&2==n[o+1]&&(i=this.putAction(B(n,o+2),e,s,i));break}o=B(n,o+2)}n[o]==e&&(i=this.putAction(B(n,o+1),e,s,i))}return i}}class T{constructor(t,e,s,i){this.parser=t,this.input=e,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new d(e,i),this.tokens=new y(t,this.stream),this.topTerm=t.top[1];let{from:r}=i[0];this.stacks=[o.start(this,t.top[0],r)],this.fragments=s.length&&this.stream.end-r>4*t.bufferLength?new C(s,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,s=this.stacks,i=this.minStackPos,r=this.stacks=[];if(this.bigReductionCount>300&&1==s.length){let[t]=s;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let h=0;h<s.length;h++){let n=s[h];for(;;){if(this.tokens.mainToken=null,n.pos>i)r.push(n);else{if(this.advanceStack(n,r,s))continue;{t||(t=[],e=[]),t.push(n);let s=this.tokens.getMainToken(n);e.push(s.value,s.end)}}break}}if(!r.length){let e=t&&function(t){let e=null;for(let s of t){let t=s.p.stoppedAt;(s.pos==s.p.stream.end||null!=t&&s.pos>t)&&s.p.parser.stateFlag(s.state,2)&&(!e||e.score<s.score)&&(e=s)}return e}(t);if(e)return v&&console.log("Finish with "+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw v&&t&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+i);this.recovering||(this.recovering=5)}if(this.recovering&&t){let s=null!=this.stoppedAt&&t[0].pos>this.stoppedAt?t[0]:this.runRecovery(t,e,r);if(s)return v&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(r.length>t)for(r.sort((t,e)=>e.score-t.score);r.length>t;)r.pop();r.some(t=>t.reducePos>i)&&this.recovering--}else if(r.length>1){t:for(let t=0;t<r.length-1;t++){let e=r[t];for(let s=t+1;s<r.length;s++){let i=r[s];if(e.sameState(i)||e.buffer.length>500&&i.buffer.length>500){if(!((e.score-i.score||e.buffer.length-i.buffer.length)>0)){r.splice(t--,1);continue t}r.splice(s--,1)}}}r.length>12&&(r.sort((t,e)=>e.score-t.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let t=1;t<r.length;t++)r[t].pos<this.minStackPos&&(this.minStackPos=r[t].pos);return null}stopAt(t){if(null!=this.stoppedAt&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,s){let i=t.pos,{parser:n}=this,o=v?this.stackID(t)+" -> ":"";if(null!=this.stoppedAt&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,s=e?t.curContext.hash:0;for(let a=this.fragments.nodeAt(i);a;){let i=this.parser.nodeSet.types[a.type.id]==a.type?n.getGoto(t.state,a.type.id):-1;if(i>-1&&a.length&&(!e||(a.prop(r.contextHash)||0)==s))return t.useNode(a,i),v&&console.log(o+this.stackID(t)+` (via reuse of ${n.getName(a.type.id)})`),!0;if(!(a instanceof h)||0==a.children.length||a.positions[0]>0)break;let l=a.children[0];if(!(l instanceof h&&0==a.positions[0]))break;a=l}}let a=n.stateSlot(t.state,4);if(a>0)return t.reduce(a),v&&console.log(o+this.stackID(t)+` (via always-reduce ${n.getName(65535&a)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let l=this.tokens.getActions(t);for(let r=0;r<l.length;){let h=l[r++],a=l[r++],c=l[r++],u=r==l.length||!s,f=u?t:t.split(),p=this.tokens.mainToken;if(f.apply(h,a,p?p.start:f.pos,c),v&&console.log(o+this.stackID(f)+` (via ${65536&h?`reduce of ${n.getName(65535&h)}`:"shift"} for ${n.getName(a)} @ ${i}${f==t?"":", split"})`),u)return!0;f.pos>i?e.push(f):s.push(f)}return!1}advanceFully(t,e){let s=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>s)return w(t,e),!0}}runRecovery(t,e,s){let i=null,r=!1;for(let h=0;h<t.length;h++){let n=t[h],o=e[h<<1],a=e[1+(h<<1)],l=v?this.stackID(n)+" -> ":"";if(n.deadEnd){if(r)continue;if(r=!0,n.restart(),v&&console.log(l+this.stackID(n)+" (restarted)"),this.advanceFully(n,s))continue}let c=n.split(),u=l;for(let t=0;t<10&&c.forceReduce();t++){if(v&&console.log(u+this.stackID(c)+" (via force-reduce)"),this.advanceFully(c,s))break;v&&(u=this.stackID(c)+" -> ")}for(let t of n.recoverByInsert(o))v&&console.log(l+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,s);this.stream.end>n.pos?(a==n.pos&&(a++,o=0),n.recoverByDelete(o,a),v&&console.log(l+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),w(n,s)):(!i||i.score<c.score)&&(i=c)}return i}stackToTree(t){return t.close(),h.build({buffer:c.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(P||(P=new WeakMap)).get(t);return e||P.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function w(t,e){for(let s=0;s<e.length;s++){let i=e[s];if(i.pos==t.pos&&i.sameState(t))return void(e[s].score<t.score&&(e[s]=t))}e.push(t)}class N{constructor(t,e,s){this.source=t,this.flags=e,this.disabled=s}allows(t){return!this.disabled||0==this.disabled[t]}}const R=t=>t;class z{constructor(t){this.start=t.start,this.shift=t.shift||R,this.reduce=t.reduce||R,this.reuse=t.reuse||R,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class I extends t{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let h=t.nodeNames.split(" ");this.minRepeatTerm=h.length;for(let e=0;e<t.repeatNodeCount;e++)h.push("");let n=Object.keys(t.topRules).map(e=>t.topRules[e][1]),o=[];for(let t=0;t<h.length;t++)o.push([]);function a(t,e,s){o[t].push([e,e.deserialize(String(s))])}if(t.nodeProps)for(let e of t.nodeProps){let t=e[0];"string"==typeof t&&(t=r[t]);for(let s=1;s<e.length;){let i=e[s++];if(i>=0)a(i,t,e[s++]);else{let r=e[s+-i];for(let h=-i;h>0;h--)a(e[s++],t,r);s++}}}this.nodeSet=new e(h.map((e,i)=>s.define({name:i>=this.minRepeatTerm?void 0:e,id:i,props:o[i],top:n.indexOf(i)>-1,error:0==i,skipped:t.skippedNodes&&t.skippedNodes.indexOf(i)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=i;let l=u(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let t=0;t<this.specializerSpecs.length;t++)this.specialized[t]=this.specializerSpecs[t].term;this.specializers=this.specializerSpecs.map(D),this.states=u(t.states,Uint32Array),this.data=u(t.stateData),this.goto=u(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(t=>"number"==typeof t?new k(l,t):t),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,s){let i=new T(this,t,e,s);for(let r of this.wrappers)i=r(i,t,e,s);return i}getGoto(t,e,s=!1){let i=this.goto;if(e>=i[0])return-1;for(let r=i[e+1];;){let e=i[r++],h=1&e,n=i[r++];if(h&&s)return n;for(let s=r+(e>>1);r<s;r++)if(i[r]==t)return n;if(h)return-1}}hasAction(t,e){let s=this.data;for(let i=0;i<2;i++)for(let r,h=this.stateSlot(t,i?2:1);;h+=3){if(65535==(r=s[h])){if(1!=s[h+1]){if(2==s[h+1])return B(s,h+2);break}r=s[h=B(s,h+2)]}if(r==e||0==r)return B(s,h+1)}return 0}stateSlot(t,e){return this.states[6*t+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,t=>t==e||null)}allActions(t,e){let s=this.stateSlot(t,4),i=s?e(s):void 0;for(let s=this.stateSlot(t,1);null==i;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=B(this.data,s+2)}i=e(B(this.data,s+1))}return i}nextStates(t){let e=[];for(let s=this.stateSlot(t,1);;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=B(this.data,s+2)}if(!(1&this.data[s+2])){let t=this.data[s+1];e.some((e,s)=>1&s&&e==t)||e.push(this.data[s],t)}}return e}configure(t){let e=Object.assign(Object.create(I.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let s=this.topRules[t.top];if(!s)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=s}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(e=>{let s=t.tokenizers.find(t=>t.from==e);return s?s.to:e})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((s,i)=>{let r=t.specializers.find(t=>t.from==s.external);if(!r)return s;let h=Object.assign(Object.assign({},s),{external:r.to});return e.specializers[i]=D(h),h})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),s=e.map(()=>!1);if(t)for(let i of t.split(" ")){let t=e.indexOf(i);t>=0&&(s[t]=!0)}let i=null;for(let t=0;t<e.length;t++)if(!s[t])for(let s,r=this.dialects[e[t]];65535!=(s=this.data[r++]);)(i||(i=new Uint8Array(this.maxTerm+1)))[s]=1;return new N(t,s,i)}static deserialize(t){return new I(t)}}function B(t,e){return t[e]|t[e+1]<<16}function D(t){if(t.external){let e=t.extend?1:0;return(s,i)=>t.external(s,i)<<1|e}return t.get}export{z as C,m as E,I as L,g as a};
@@ -1 +1 @@
1
- import{jsx as r,jsxs as t,Fragment as o}from"react/jsx-runtime";import"./settings-BONQQsPx.js";import"react";import"./enums.js";import"./constants.js";import{r as l}from"./LoaderLayer-Cv80UCdL.js";const a=({color:t})=>r("path",{d:"M11 20V7.825l-5.6 5.6L4 12l8-8 8 8-1.4 1.425-5.6-5.6V20Z",fill:t}),p=r=>l(r,a,"arrow-upward"),i=({up:a,down:p,...i})=>l({...i,viewBox:"0 -960 960 960"},(({up:l,down:a})=>({color:p})=>t(o,{children:[r("path",{fill:l?p:"var(--cr-ht-lt)",d:"M305.87-438.87v-257.61l-90 90-75.09-74.09 218.09-218.65 218.09 218.65-75.09 74.09-90-90v257.61h-106Z"}),r("path",{fill:a?p:"var(--cr-ht-lt)",d:"M601.13-60.78 383.04-279.43l75.09-74.09 90 90v-257.61h106v257.61l90-90 75.09 74.09L601.13-60.78Z"})]}))({up:a,down:p}),"pending");export{p as A,i as S};
1
+ import{jsx as r,jsxs as t,Fragment as o}from"react/jsx-runtime";import"./settings-CBGV-lz3.js";import"react";import"./enums.js";import"./constants.js";import{r as l}from"./LoaderLayer-ECtsj85k.js";const a=({color:t})=>r("path",{d:"M11 20V7.825l-5.6 5.6L4 12l8-8 8 8-1.4 1.425-5.6-5.6V20Z",fill:t}),p=r=>l(r,a,"arrow-upward"),i=({up:a,down:p,...i})=>l({...i,viewBox:"0 -960 960 960"},(({up:l,down:a})=>({color:p})=>t(o,{children:[r("path",{fill:l?p:"var(--cr-ht-lt)",d:"M305.87-438.87v-257.61l-90 90-75.09-74.09 218.09-218.65 218.09 218.65-75.09 74.09-90-90v257.61h-106Z"}),r("path",{fill:a?p:"var(--cr-ht-lt)",d:"M601.13-60.78 383.04-279.43l75.09-74.09 90 90v-257.61h106v257.61l90-90 75.09 74.09L601.13-60.78Z"})]}))({up:a,down:p}),"pending");export{p as A,i as S};