collabmd 0.1.44 → 0.1.45

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 (170) hide show
  1. package/dist/client/assets/{chunk-AXR3VHVW-0GTk_evH.js → chunk-ERSWUTIN-ME9RVNel.js} +3 -3
  2. package/dist/client/assets/{chunk-CZQZEIFA-DT3N9fo7.js → chunk-YGJVY4SA-CjSe7Bx7.js} +2 -2
  3. package/dist/client/assets/{comment-threads-D-iKphIp.js → comment-threads-DDegmaFO.js} +1 -1
  4. package/dist/client/assets/drawio-editor-ClE8jpoG.js +9 -0
  5. package/dist/client/assets/drawioEditor-CXaTM9Ds.js +2 -0
  6. package/dist/client/assets/editor-session-GTwZS6Df.js +16 -0
  7. package/dist/client/assets/embedded-editor-base-CiNEc8vy.css +1 -0
  8. package/dist/client/assets/{en-GADW4C6J-DQ6zyCEM.js → en-7NFCYGKX-BrgYZAEe.js} +1 -1
  9. package/dist/client/assets/{excalidraw-editor-BHu6k8d4.js → excalidraw-editor-BZVM81BO.js} +2 -2
  10. package/dist/client/assets/excalidraw-editor-CyGwOhLz.css +1 -0
  11. package/dist/client/assets/excalidraw-scene-C8n9CHsK.js +176 -0
  12. package/dist/client/assets/excalidrawEditor-DxJanCze.js +2 -0
  13. package/dist/client/assets/export-page-CUfws2T-.js +39 -0
  14. package/dist/client/assets/exportDocument-BCuxqXDY.js +2 -0
  15. package/dist/client/assets/exportDocument-DV-OX74E.css +1 -0
  16. package/dist/client/assets/image-QXRYHUNP-lfTHE3bb.js +1 -0
  17. package/dist/client/assets/index-C3YnUgMD.css +1 -0
  18. package/dist/client/assets/index-D2wXraJ1.js +2 -0
  19. package/dist/client/assets/main-DtiGz7uI.js +795 -0
  20. package/dist/client/assets/modulepreload-polyfill-P2Xu9kJm.js +1 -0
  21. package/dist/client/assets/preview-diagram-utils-txBCoW8d.js +1 -0
  22. package/dist/client/assets/quick-switcher-controller-shW_6vPY.js +12 -0
  23. package/dist/client/assets/room-CQLoqtMo.js +1 -0
  24. package/dist/client/assets/runtime-config-DSGmGE9V.js +1 -0
  25. package/dist/client/assets/vault-api-client-C6bcGwy-.js +5 -0
  26. package/dist/client/assets/{yjs-provider-reset-guard-Cox4nxwu.js → yjs-provider-reset-guard-DE0vINDP.js} +1 -1
  27. package/dist/client/drawio-editor.html +3 -2
  28. package/dist/client/excalidraw-editor.html +3 -2
  29. package/dist/client/export-document.html +4 -3
  30. package/dist/client/index.html +97 -27
  31. package/package.json +10 -12
  32. package/src/client/app/drawio-editor-entry.js +0 -3
  33. package/src/client/app/drawio-editor.html +1 -0
  34. package/src/client/app/excalidraw-editor-entry.js +0 -3
  35. package/src/client/app/excalidraw-editor.html +1 -0
  36. package/src/client/app/export-document-entry.js +0 -3
  37. package/src/client/app/export-document.html +1 -0
  38. package/src/client/app/index.html +94 -24
  39. package/src/client/app/main-entry.js +0 -5
  40. package/src/client/application/app-shell/chat-feature.js +180 -124
  41. package/src/client/application/app-shell/comments-feature.js +1 -1
  42. package/src/client/application/app-shell/git-feature.js +4 -9
  43. package/src/client/application/app-shell/presence-feature.js +16 -10
  44. package/src/client/application/app-shell/ui-feature-shell.js +33 -15
  45. package/src/client/application/app-shell/ui-feature-sidebar.js +74 -1
  46. package/src/client/application/app-shell/ui-feature-tab-activity.js +2 -2
  47. package/src/client/application/app-shell/workspace-feature.js +22 -83
  48. package/src/client/application/app-shell-elements.js +7 -1
  49. package/src/client/application/diagram-chrome.js +161 -166
  50. package/src/client/application/diagram-preview-export.js +7 -34
  51. package/src/client/application/diagram-preview-hydrator.js +1 -19
  52. package/src/client/application/markdown-frontmatter.js +0 -2
  53. package/src/client/application/mermaid-preview-hydrator.js +1 -14
  54. package/src/client/application/plantuml-preview-hydrator.js +0 -10
  55. package/src/client/application/preview-diagram-utils.js +31 -2
  56. package/src/client/application/preview-render-compiler.js +2 -1
  57. package/src/client/application/preview-renderer.js +2 -2
  58. package/src/client/application/quick-switcher-loader.js +3 -1
  59. package/src/client/application/workspace-preview-controller.js +0 -3
  60. package/src/client/bootstrap/collabmd-app-shell.js +125 -39
  61. package/src/client/domain/excalidraw-collaboration.js +0 -2
  62. package/src/client/domain/room.js +38 -0
  63. package/src/client/export/export-pipeline.js +6 -34
  64. package/src/client/infrastructure/auth-client.js +4 -10
  65. package/src/client/infrastructure/browser-notification-port.js +33 -20
  66. package/src/client/infrastructure/browser-preferences-port.js +36 -9
  67. package/src/client/infrastructure/editor-view-adapter.js +87 -3
  68. package/src/client/infrastructure/lobby-presence.js +1 -0
  69. package/src/client/infrastructure/vault-api-client.js +25 -0
  70. package/src/client/infrastructure/workspace-sync-client.js +13 -1
  71. package/src/client/presentation/comment-overview-controller.js +18 -53
  72. package/src/client/presentation/comment-ui/comment-ui-card.js +1 -12
  73. package/src/client/presentation/comment-ui/comment-ui-layout.js +242 -219
  74. package/src/client/presentation/comment-ui/comment-ui-render.js +32 -45
  75. package/src/client/presentation/comment-ui/comment-ui-shared.js +65 -14
  76. package/src/client/presentation/comment-ui-controller.js +5 -1
  77. package/src/client/presentation/file-action-controller.js +32 -0
  78. package/src/client/presentation/file-explorer-controller.js +33 -3
  79. package/src/client/presentation/file-explorer-view.js +49 -5
  80. package/src/client/presentation/file-tree-state.js +10 -4
  81. package/src/client/presentation/quick-switcher-controller.js +243 -72
  82. package/src/client/presentation/quick-switcher-text-search.js +2 -2
  83. package/src/client/presentation/toast-controller.js +3 -0
  84. package/src/client/styles/components/feedback.css +6 -0
  85. package/src/client/styles/features/collaboration-chat.css +49 -53
  86. package/src/client/styles/features/collaboration-presence.css +9 -7
  87. package/src/client/styles/features/comment-card.css +25 -11
  88. package/src/client/styles/features/comment-overlays.css +0 -4
  89. package/src/client/styles/features/comment-overview.css +44 -21
  90. package/src/client/styles/features/comments-drawer.css +2 -100
  91. package/src/client/styles/features/diagram-preview.css +5 -18
  92. package/src/client/styles/features/embedded-preview.css +8 -33
  93. package/src/client/styles/features/quick-switcher.css +8 -0
  94. package/src/client/styles/foundation/tokens.css +1 -0
  95. package/src/client/styles/layout/editor-page.css +40 -0
  96. package/src/client/styles/layout/responsive.css +31 -1
  97. package/src/client/styles/layout/shell.css +25 -6
  98. package/src/client/styles/layout/sidebar.css +47 -15
  99. package/src/client/styles/overrides/codemirror.css +217 -15
  100. package/src/server/application/workspace-reconciliation.js +1 -1
  101. package/src/server/create-app-server.js +2 -3
  102. package/src/server/domain/bases/base-query-service.js +1 -77
  103. package/src/server/domain/comment-overview.js +10 -3
  104. package/src/server/domain/docx-exporter.js +24 -33
  105. package/src/server/domain/ripgrep-search-service.js +3 -1
  106. package/src/server/domain/workspace-state.js +32 -11
  107. package/src/server/infrastructure/git/diff-service.js +24 -13
  108. package/src/server/infrastructure/git/git-service.js +40 -10
  109. package/src/server/infrastructure/git/history-service.js +42 -29
  110. package/src/server/infrastructure/git/path-utils.js +1 -1
  111. package/src/server/infrastructure/git/responses.js +0 -95
  112. package/src/server/infrastructure/github/github-app-client.js +22 -15
  113. package/src/server/infrastructure/http/create-request-handler.js +2 -8
  114. package/src/server/infrastructure/http/create-vault-api-command-handler.js +5 -5
  115. package/src/server/infrastructure/http/http-errors.js +7 -1
  116. package/dist/client/assets/bases-preview-controller-2pLHk0uk.js +0 -143
  117. package/dist/client/assets/button-BCEiw4Rw.js +0 -1
  118. package/dist/client/assets/diagram-action-icons-aa_KOv9h.js +0 -36
  119. package/dist/client/assets/drawio-editor-DDvFoarP.js +0 -9
  120. package/dist/client/assets/drawio-embed-controller-BD1GTRwn.js +0 -1
  121. package/dist/client/assets/drawioEditor-Bu5grlH5.js +0 -2
  122. package/dist/client/assets/editor-session-DGlpiAsK.js +0 -16
  123. package/dist/client/assets/embedded-editor-base-C9roKYpW.css +0 -1
  124. package/dist/client/assets/excalidraw-editor-Cr_184EF.css +0 -1
  125. package/dist/client/assets/excalidraw-embed-controller-y2fenN_g.js +0 -1
  126. package/dist/client/assets/excalidraw-embed-reconciler-DGiagExg.js +0 -1
  127. package/dist/client/assets/excalidraw-scene-BvsQ6mLP.js +0 -176
  128. package/dist/client/assets/excalidrawEditor-4vFE--Uw.js +0 -2
  129. package/dist/client/assets/export-page-Cby8JzPO.js +0 -39
  130. package/dist/client/assets/exportDocument-C9v-bc7I.css +0 -1
  131. package/dist/client/assets/exportDocument-CRHCfsdo.js +0 -2
  132. package/dist/client/assets/file-history-view-controller-BDjEV9xJ.js +0 -112
  133. package/dist/client/assets/git-diff-view-controller-DgdM1aqb.js +0 -150
  134. package/dist/client/assets/git-panel-controller-BDTR2HVp.js +0 -207
  135. package/dist/client/assets/image-XGD7JQR6-XDUWHRpO.js +0 -1
  136. package/dist/client/assets/index-7xOyXDhP.css +0 -1
  137. package/dist/client/assets/index-Bz1KuQ6y.js +0 -2
  138. package/dist/client/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  139. package/dist/client/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  140. package/dist/client/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  141. package/dist/client/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  142. package/dist/client/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  143. package/dist/client/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  144. package/dist/client/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  145. package/dist/client/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
  146. package/dist/client/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
  147. package/dist/client/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
  148. package/dist/client/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
  149. package/dist/client/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
  150. package/dist/client/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  151. package/dist/client/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  152. package/dist/client/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
  153. package/dist/client/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
  154. package/dist/client/assets/main-Ci07m9oP.js +0 -152
  155. package/dist/client/assets/preview-diagram-utils-n_bbJA9V.js +0 -1
  156. package/dist/client/assets/quick-switcher-controller-CoiYvllm.js +0 -12
  157. package/dist/client/assets/room-CDrmIdDt.js +0 -1
  158. package/dist/client/assets/runtime-config-CDgeuPWN.js +0 -1
  159. package/dist/client/assets/runtime-config-loader-BHGniHP5.js +0 -1
  160. package/dist/client/assets/runtime-paths-DvpihCEq.js +0 -1
  161. package/dist/client/assets/segmented-control-DJrHSz8M.js +0 -1
  162. package/dist/client/assets/vault-api-client-sLB2bo56.js +0 -1
  163. package/dist/client/assets/vault-paths-CVkuh0j-.js +0 -5
  164. package/src/client/bootstrap/lazy-controller-feature.js +0 -433
  165. package/src/client/infrastructure/backlinks-api-client.js +0 -16
  166. package/src/client/infrastructure/plantuml-api-client.js +0 -19
  167. package/src/client/infrastructure/runtime-config-loader.js +0 -56
  168. package/src/server/infrastructure/git/command-runner.js +0 -49
  169. package/src/server/infrastructure/git/errors.js +0 -8
  170. package/src/server/infrastructure/http/create-esm-proxy-handler.js +0 -130
@@ -1,4 +1,4 @@
1
- var e={paste:`Paste`,pasteAsPlaintext:`Paste as plaintext`,pasteCharts:`Paste charts`,chartType_bar:`Bar chart`,chartType_line:`Line chart`,chartType_radar:`Radar chart`,chartType_plaintext:`Plain text`,selectAll:`Select all`,multiSelect:`Add element to selection`,moveCanvas:`Move canvas`,cut:`Cut`,copy:`Copy`,copyAsPng:`Copy to clipboard as PNG`,copyAsSvg:`Copy to clipboard as SVG`,copyText:`Copy to clipboard as text`,copySource:`Copy source to clipboard`,convertToCode:`Convert to code`,bringForward:`Bring forward`,sendToBack:`Send to back`,bringToFront:`Bring to front`,sendBackward:`Send backward`,delete:`Delete`,copyStyles:`Copy styles`,pasteStyles:`Paste styles`,stroke:`Stroke`,changeStroke:`Change stroke color`,background:`Background`,changeBackground:`Change background color`,fill:`Fill`,strokeWidth:`Stroke width`,strokeStyle:`Stroke style`,strokeStyle_solid:`Solid`,strokeStyle_dashed:`Dashed`,strokeStyle_dotted:`Dotted`,sloppiness:`Sloppiness`,pressure:`Pressure`,pressure_constant:`Constant`,pressure_variable:`Variable`,opacity:`Opacity`,textAlign:`Text align`,edges:`Edges`,sharp:`Sharp`,round:`Round`,arrowheads:`Arrowheads`,arrowhead_none:`None`,arrowhead_arrow:`Arrow`,arrowhead_bar:`Bar`,arrowhead_circle:`Circle`,arrowhead_circle_outline:`Circle (outline)`,arrowhead_triangle:`Triangle`,arrowhead_triangle_outline:`Triangle (outline)`,arrowhead_diamond:`Diamond`,arrowhead_diamond_outline:`Diamond (outline)`,arrowhead_crowfoot_many:`Crow's foot (many)`,arrowhead_crowfoot_one:`Crow's foot (one)`,arrowhead_crowfoot_one_or_many:`Crow's foot (one or many)`,arrowhead_cardinality_one:`Cardinality (one)`,arrowhead_cardinality_many:`Cardinality (many)`,arrowhead_cardinality_one_or_many:`Cardinality (one or many)`,arrowhead_cardinality_exactly_one:`Cardinality (exactly one)`,arrowhead_cardinality_zero_or_one:`Cardinality (zero or one)`,arrowhead_cardinality_zero_or_many:`Cardinality (zero or many)`,more_options:`More options`,cardinality:`Cardinality`,arrowtypes:`Arrow type`,arrowtype_sharp:`Sharp arrow`,arrowtype_round:`Curved arrow`,arrowtype_elbowed:`Elbow arrow`,fontSize:`Font size`,fontFamily:`Font family`,addWatermark:`Add "Made with Excalidraw"`,handDrawn:`Hand-drawn`,normal:`Normal`,code:`Code`,small:`Small`,medium:`Medium`,large:`Large`,veryLarge:`Very large`,solid:`Solid`,hachure:`Hachure`,zigzag:`Zigzag`,crossHatch:`Cross-hatch`,thin:`Thin`,bold:`Bold`,left:`Left`,center:`Center`,right:`Right`,extraBold:`Extra bold`,architect:`Architect`,artist:`Artist`,cartoonist:`Cartoonist`,fileTitle:`File name`,colorPicker:`Color picker`,canvasColors:`Used on canvas`,canvasBackground:`Canvas background`,drawingCanvas:`Drawing canvas`,clearCanvas:`Clear canvas`,layers:`Layers`,actions:`Actions`,language:`Language`,liveCollaboration:`Live collaboration...`,duplicateSelection:`Duplicate`,untitled:`Untitled`,name:`Name`,yourName:`Your name`,madeWithExcalidraw:`Made with Excalidraw`,group:`Group selection`,ungroup:`Ungroup selection`,collaborators:`Collaborators`,toggleGrid:`Toggle grid`,addToLibrary:`Add to library`,removeFromLibrary:`Remove from library`,libraryLoadingMessage:`Loading library…`,libraries:`Browse libraries`,loadingScene:`Loading scene…`,loadScene:`Load scene from file`,align:`Align`,alignTop:`Align top`,alignBottom:`Align bottom`,alignLeft:`Align left`,alignRight:`Align right`,centerVertically:`Center vertically`,centerHorizontally:`Center horizontally`,distributeHorizontally:`Distribute horizontally`,distributeVertically:`Distribute vertically`,flipHorizontal:`Flip horizontal`,flipVertical:`Flip vertical`,viewMode:`View mode`,share:`Share`,showStroke:`Show stroke color picker`,showBackground:`Show background color picker`,showFonts:`Show font picker`,toggleTheme:`Toggle light/dark theme`,theme:`Theme`,personalLib:`Personal Library`,excalidrawLib:`Excalidraw Library`,decreaseFontSize:`Decrease font size`,increaseFontSize:`Increase font size`,unbindText:`Unbind text`,bindText:`Bind text to the container`,createContainerFromText:`Wrap text in a container`,link:{edit:`Edit link`,editEmbed:`Edit embeddable link`,create:`Add link`,label:`Link`,labelEmbed:`Link & embed`,empty:`No link is set`,hint:`Type or paste your link here`,goToElement:`Go to target element`},lineEditor:{edit:`Edit line`,editArrow:`Edit arrow`},polygon:{breakPolygon:`Break polygon`,convertToPolygon:`Convert to polygon`},elementLock:{lock:`Lock`,unlock:`Unlock`,lockAll:`Lock all`,unlockAll:`Unlock all`},statusPublished:`Published`,sidebarLock:`Keep sidebar open`,selectAllElementsInFrame:`Select all elements in frame`,removeAllElementsFromFrame:`Remove all elements from frame`,eyeDropper:`Pick color from canvas`,textToDiagram:`Text to diagram`,prompt:`Prompt`,followUs:`Follow us`,discordChat:`Discord chat`,zoomToFitViewport:`Zoom to fit in viewport`,zoomToFitSelection:`Zoom to fit selection`,zoomToFit:`Zoom to fit all elements`,installPWA:`Install Excalidraw locally (PWA)`,autoResize:`Enable text auto-resizing`,imageCropping:`Image cropping`,unCroppedDimension:`Uncropped dimension`,copyElementLink:`Copy link to object`,linkToElement:`Link to object`,wrapSelectionInFrame:`Wrap selection in frame`,tab:`Tab`,shapeSwitch:`Switch shape`,preferences:`Preferences`,preferences_toolLock:`Tool lock`,boxSelectionMode:`Select on`,boxSelectionContain:`Wrap`,boxSelectionOverlap:`Overlap`,arrowBinding:`Arrow binding`,midpointSnapping:`Snap to midpoints`},t={title:`Link to object`,desc:`Click on a shape on canvas or paste a link.`,notFound:`Linked object wasn't found on canvas.`},n={noItems:`No items added yet...`,hint_emptyLibrary:`Select an item on canvas to add it here, or install a library from the public repository, below.`,hint_emptyPrivateLibrary:`Select an item on canvas to add it here.`,search:{inputPlaceholder:`Search library`,heading:`Library matches`,noResults:`No matching items found...`,clearSearch:`Clear search`}},r={title:`Find on canvas`,noMatch:`No matches found...`,singleResult:`result`,multipleResults:`results`,placeholder:`Find text on canvas...`,frames:`Frames`,texts:`Texts`},i={clearReset:`Reset the canvas`,exportJSON:`Export to file`,exportImage:`Export image...`,export:`Save to...`,copyToClipboard:`Copy to clipboard`,copyLink:`Copy link`,save:`Save to current file`,saveAs:`Save as`,load:`Open`,getShareableLink:`Get shareable link`,close:`Close`,selectLanguage:`Select language`,scrollBackToContent:`Scroll back to content`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,resetZoom:`Reset zoom`,menu:`Menu`,done:`Done`,edit:`Edit`,undo:`Undo`,redo:`Redo`,resetLibrary:`Reset library`,createNewRoom:`Create new room`,fullScreen:`Full screen`,darkMode:`Dark mode`,lightMode:`Light mode`,systemMode:`System mode`,zenMode:`Zen mode`,objectsSnapMode:`Snap to objects`,exitZenMode:`Exit zen mode`,cancel:`Cancel`,saveLibNames:`Save name(s) and exit`,clear:`Clear`,remove:`Remove`,embed:`Toggle embedding`,publishLibrary:`Rename or publish`,submit:`Submit`,confirm:`Confirm`,embeddableInteractionButton:`Click to interact`},a={clearReset:`This will clear the whole canvas. Are you sure?`,couldNotCreateShareableLink:`Couldn't create shareable link.`,couldNotCreateShareableLinkTooBig:`Couldn't create shareable link: the scene is too big`,couldNotLoadInvalidFile:`Couldn't load invalid file`,importBackendFailed:`Importing from backend failed.`,cannotExportEmptyCanvas:`Cannot export empty canvas.`,couldNotCopyToClipboard:`Couldn't copy to clipboard.`,decryptFailed:`Couldn't decrypt data.`,uploadedSecurly:`The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can't read the content.`,loadSceneOverridePrompt:`Loading external drawing will replace your existing content. Do you wish to continue?`,collabStopOverridePrompt:`Stopping the session will overwrite your previous, locally stored drawing. Are you sure?
1
+ var e={paste:`Paste`,pasteAsPlaintext:`Paste as plaintext`,pasteCharts:`Paste charts`,chartType_bar:`Bar chart`,chartType_line:`Line chart`,chartType_radar:`Radar chart`,chartType_plaintext:`Plain text`,selectAll:`Select all`,multiSelect:`Add element to selection`,moveCanvas:`Move canvas`,cut:`Cut`,copy:`Copy`,copyAsPng:`Copy to clipboard as PNG`,copyAsSvg:`Copy to clipboard as SVG`,copyText:`Copy to clipboard as text`,copySource:`Copy source to clipboard`,convertToCode:`Convert to code`,bringForward:`Bring forward`,sendToBack:`Send to back`,bringToFront:`Bring to front`,sendBackward:`Send backward`,delete:`Delete`,copyStyles:`Copy styles`,pasteStyles:`Paste styles`,stroke:`Stroke`,changeStroke:`Change stroke color`,background:`Background`,changeBackground:`Change background color`,fill:`Fill`,strokeWidth:`Stroke width`,strokeStyle:`Stroke style`,strokeStyle_solid:`Solid`,strokeStyle_dashed:`Dashed`,strokeStyle_dotted:`Dotted`,sloppiness:`Sloppiness`,pressure:`Pressure`,pressure_constant:`Constant`,pressure_variable:`Variable`,opacity:`Opacity`,textAlign:`Text align`,edges:`Edges`,sharp:`Sharp`,round:`Round`,arrowheads:`Arrowheads`,arrowhead_none:`None`,arrowhead_arrow:`Arrow`,arrowhead_bar:`Bar`,arrowhead_circle:`Circle`,arrowhead_circle_outline:`Circle (outline)`,arrowhead_triangle:`Triangle`,arrowhead_triangle_outline:`Triangle (outline)`,arrowhead_diamond:`Diamond`,arrowhead_diamond_outline:`Diamond (outline)`,arrowhead_crowfoot_many:`Crow's foot (many)`,arrowhead_crowfoot_one:`Crow's foot (one)`,arrowhead_crowfoot_one_or_many:`Crow's foot (one or many)`,arrowhead_cardinality_one:`Cardinality (one)`,arrowhead_cardinality_many:`Cardinality (many)`,arrowhead_cardinality_one_or_many:`Cardinality (one or many)`,arrowhead_cardinality_exactly_one:`Cardinality (exactly one)`,arrowhead_cardinality_zero_or_one:`Cardinality (zero or one)`,arrowhead_cardinality_zero_or_many:`Cardinality (zero or many)`,more_options:`More options`,cardinality:`Cardinality`,arrowtypes:`Arrow type`,arrowtype_sharp:`Sharp arrow`,arrowtype_round:`Curved arrow`,arrowtype_elbowed:`Elbow arrow`,fontSize:`Font size`,fontFamily:`Font family`,addWatermark:`Add "Made with Excalidraw"`,handDrawn:`Hand-drawn`,normal:`Normal`,code:`Code`,small:`Small`,medium:`Medium`,large:`Large`,veryLarge:`Very large`,solid:`Solid`,hachure:`Hachure`,zigzag:`Zigzag`,crossHatch:`Cross-hatch`,thin:`Thin`,bold:`Bold`,left:`Left`,center:`Center`,right:`Right`,extraBold:`Extra bold`,architect:`Architect`,artist:`Artist`,cartoonist:`Cartoonist`,fileTitle:`File name`,colorPicker:`Color picker`,canvasColors:`Used on canvas`,canvasBackground:`Canvas background`,drawingCanvas:`Drawing canvas`,clearCanvas:`Clear canvas`,layers:`Layers`,actions:`Actions`,language:`Language`,liveCollaboration:`Live collaboration...`,duplicateSelection:`Duplicate`,untitled:`Untitled`,name:`Name`,yourName:`Your name`,madeWithExcalidraw:`Made with Excalidraw`,group:`Group selection`,ungroup:`Ungroup selection`,collaborators:`Collaborators`,you:`You`,toggleGrid:`Toggle grid`,addToLibrary:`Add to library`,removeFromLibrary:`Remove from library`,libraryLoadingMessage:`Loading library…`,libraries:`Browse libraries`,loadingScene:`Loading scene…`,loadScene:`Load scene from file`,align:`Align`,alignTop:`Align top`,alignBottom:`Align bottom`,alignLeft:`Align left`,alignRight:`Align right`,centerVertically:`Center vertically`,centerHorizontally:`Center horizontally`,distributeHorizontally:`Distribute horizontally`,distributeVertically:`Distribute vertically`,flipHorizontal:`Flip horizontal`,flipVertical:`Flip vertical`,viewMode:`View mode`,share:`Share`,showStroke:`Show stroke color picker`,showBackground:`Show background color picker`,showFonts:`Show font picker`,toggleTheme:`Toggle light/dark theme`,theme:`Theme`,personalLib:`Personal Library`,excalidrawLib:`Excalidraw Library`,decreaseFontSize:`Decrease font size`,increaseFontSize:`Increase font size`,unbindText:`Unbind text`,bindText:`Bind text to the container`,createContainerFromText:`Wrap text in a container`,link:{edit:`Edit link`,editEmbed:`Edit embeddable link`,create:`Add link`,label:`Link`,labelEmbed:`Link & embed`,empty:`No link is set`,hint:`Type or paste your link here`,goToElement:`Go to target element`},lineEditor:{edit:`Edit line`,editArrow:`Edit arrow`},polygon:{breakPolygon:`Break polygon`,convertToPolygon:`Convert to polygon`},elementLock:{lock:`Lock`,unlock:`Unlock`,lockAll:`Lock all`,unlockAll:`Unlock all`},statusPublished:`Published`,sidebarLock:`Keep sidebar open`,selectAllElementsInFrame:`Select all elements in frame`,removeAllElementsFromFrame:`Remove all elements from frame`,eyeDropper:`Pick color from canvas`,textToDiagram:`Text to diagram`,prompt:`Prompt`,followUs:`Follow us`,discordChat:`Discord chat`,zoomToFitViewport:`Zoom to fit in viewport`,zoomToFitSelection:`Zoom to fit selection`,zoomToFit:`Zoom to fit all elements`,installPWA:`Install Excalidraw locally (PWA)`,autoResize:`Enable text auto-resizing`,imageCropping:`Image cropping`,unCroppedDimension:`Uncropped dimension`,copyElementLink:`Copy link to object`,linkToElement:`Link to object`,wrapSelectionInFrame:`Wrap selection in frame`,tab:`Tab`,shapeSwitch:`Switch shape`,preferences:`Preferences`,preferences_toolLock:`Tool lock`,boxSelectionMode:`Select on`,boxSelectionContain:`Wrap`,boxSelectionOverlap:`Overlap`,arrowBinding:`Arrow binding`,midpointSnapping:`Snap to midpoints`},t={title:`Link to object`,desc:`Click on a shape on canvas or paste a link.`,notFound:`Linked object wasn't found on canvas.`},n={noItems:`No items added yet...`,hint_emptyLibrary:`Select an item on canvas to add it here, or install a library from the public repository, below.`,hint_emptyPrivateLibrary:`Select an item on canvas to add it here.`,search:{inputPlaceholder:`Search library`,heading:`Library matches`,noResults:`No matching items found...`,clearSearch:`Clear search`}},r={title:`Find on canvas`,noMatch:`No matches found...`,singleResult:`result`,multipleResults:`results`,placeholder:`Find text on canvas...`,frames:`Frames`,texts:`Texts`},i={clearReset:`Reset the canvas`,exportJSON:`Export to file`,exportImage:`Export image...`,export:`Save to...`,copyToClipboard:`Copy to clipboard`,copyLink:`Copy link`,save:`Save to current file`,saveAs:`Save as`,load:`Open`,getShareableLink:`Get shareable link`,close:`Close`,selectLanguage:`Select language`,scrollBackToContent:`Scroll back to content`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,resetZoom:`Reset zoom`,menu:`Menu`,done:`Done`,edit:`Edit`,undo:`Undo`,redo:`Redo`,resetLibrary:`Reset library`,createNewRoom:`Create new room`,fullScreen:`Full screen`,darkMode:`Dark mode`,lightMode:`Light mode`,systemMode:`System mode`,zenMode:`Zen mode`,objectsSnapMode:`Snap to objects`,exitZenMode:`Exit zen mode`,cancel:`Cancel`,saveLibNames:`Save name(s) and exit`,clear:`Clear`,remove:`Remove`,embed:`Toggle embedding`,publishLibrary:`Rename or publish`,submit:`Submit`,confirm:`Confirm`,embeddableInteractionButton:`Click to interact`},a={clearReset:`This will clear the whole canvas. Are you sure?`,couldNotCreateShareableLink:`Couldn't create shareable link.`,couldNotCreateShareableLinkTooBig:`Couldn't create shareable link: the scene is too big`,couldNotLoadInvalidFile:`Couldn't load invalid file`,importBackendFailed:`Importing from backend failed.`,cannotExportEmptyCanvas:`Cannot export empty canvas.`,couldNotCopyToClipboard:`Couldn't copy to clipboard.`,decryptFailed:`Couldn't decrypt data.`,uploadedSecurly:`The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can't read the content.`,loadSceneOverridePrompt:`Loading external drawing will replace your existing content. Do you wish to continue?`,collabStopOverridePrompt:`Stopping the session will overwrite your previous, locally stored drawing. Are you sure?
2
2
 
3
3
  (If you want to keep your local drawing, simply close the browser tab instead.)`,errorAddingToLibrary:`Couldn't add item to the library`,errorRemovingFromLibrary:`Couldn't remove item from the library`,confirmAddLibrary:`This will add {{numShapes}} shape(s) to your library. Are you sure?`,imageDoesNotContainScene:`This image does not seem to contain any scene data. Have you enabled scene embedding during export?`,cannotRestoreFromImage:`Scene couldn't be restored from this image file`,invalidSceneUrl:`Couldn't import scene from the supplied URL. It's either malformed, or doesn't contain valid Excalidraw JSON data.`,resetLibrary:`This will clear your library. Are you sure?`,removeItemsFromsLibrary:`Delete {{count}} item(s) from library?`,invalidEncryptionKey:`Encryption key must be of 22 characters. Live collaboration is disabled.`,collabOfflineWarning:`No internet connection available.
4
4
  Your changes will not be saved!`,localStorageQuotaExceeded:`Browser storage quota exceeded. Changes will not be saved.`},o={unsupportedFileType:`Unsupported file type.`,imageInsertError:`Couldn't insert image. Try again later...`,fileTooBig:`File is too big. Maximum allowed size is {{maxSize}}.`,svgImageInsertError:`Couldn't insert SVG image. The SVG markup looks invalid.`,failedToFetchImage:`Failed to fetch image.`,cannotResolveCollabServer:`Couldn't connect to the collab server. Please reload the page and try again.`,importLibraryError:`Couldn't load library`,saveLibraryError:`Couldn't save library to storage. Please save your library to a file locally to make sure you don't lose changes.`,collabSaveFailed:`Couldn't save to the backend database. If problems persist, you should save your file locally to ensure you don't lose your work.`,collabSaveFailed_sizeExceeded:`Couldn't save to the backend database, the canvas seems to be too big. You should save the file locally to ensure you don't lose your work.`,imageToolNotSupported:`Images are disabled.`,brave_measure_text_error:{line1:`Looks like you are using Brave browser with the <bold>Aggressively Block Fingerprinting</bold> setting enabled.`,line2:`This could result in breaking the <bold>Text Elements</bold> in your drawings.`,line3:`We strongly recommend disabling this setting. You can follow <link>these steps</link> on how to do so.`,line4:`If disabling this setting doesn't fix the display of text elements, please open an <issueLink>issue</issueLink> on our GitHub, or write us on <discordLink>Discord</discordLink>`},libraryElementTypeError:{embeddable:`Embeddable elements cannot be added to the library.`,iframe:`IFrame elements cannot be added to the library.`,image:`Support for adding images to the library coming soon!`},asyncPasteFailedOnRead:`Couldn't paste (couldn't read from system clipboard).`,asyncPasteFailedOnParse:`Couldn't paste.`,copyToSystemClipboardFailed:`Couldn't copy to clipboard.`},s={selection:`Selection`,lasso:`Lasso selection`,image:`Insert image`,rectangle:`Rectangle`,diamond:`Diamond`,ellipse:`Ellipse`,arrow:`Arrow`,line:`Line`,freedraw:`Draw`,text:`Text`,library:`Library`,lock:`Keep selected tool active after drawing`,penMode:`Pen mode - prevent touch`,link:`Add / Update link for a selected shape`,eraser:`Eraser`,frame:`Frame tool`,magicframe:`Wireframe to code`,embeddable:`Web Embed`,laser:`Laser pointer`,autoshape:`Draw to shape`,bucketfill:`Bucket fill`,hand:`Hand (panning tool)`,extraTools:`More tools`,mermaidToExcalidraw:`Mermaid to Excalidraw`,convertElementType:`Toggle shape type`},c={noRegion:`Couldn't find an enclosed region to fill here.`,tooComplex:`This region is too complex to fill.`},l={rectangle:`Rectangle`,diamond:`Diamond`,ellipse:`Ellipse`,arrow:`Arrow`,line:`Line`,freedraw:`Freedraw`,text:`Text`,image:`Image`,group:`Group`,frame:`Frame`,magicframe:`Wireframe to code`,embeddable:`Web Embed`,selection:`Selection`,iframe:`IFrame`},u={canvasActions:`Canvas actions`,selectedShapeActions:`Selected shape actions`,shapes:`Shapes`},d={dismissSearch:`{{shortcut}} to dismiss search`,canvasPanning:`To move canvas, hold {{shortcut_1}} or {{shortcut_2}} while dragging, or use the hand tool`,linearElement:`Click to start multiple points, drag for single line`,arrowTool:`Click to start multiple points, drag for single line. Press {{shortcut}} again to change arrow type.`,arrowBindModifiers:`Hold {{shortcut_1}} to disable binding, or {{shortcut_2}} to bind at a fixed point`,freeDraw:`Click and drag, release when you're finished`,text:`Tip: you can also add text by double-clicking anywhere with the selection tool`,embeddable:`Click-drag to create a website embed`,autoshape:`Draw rectangles, circles, diamonds, lines and arrows`,text_selected:`Double-click or press {{shortcut}} to edit text`,text_editing:`Press {{shortcut_1}} or {{shortcut_2}} to finish editing`,linearElementMulti:`Click on last point or press {{shortcut_1}} or {{shortcut_2}} to finish`,lockAngle:`You can constrain angle by holding {{shortcut}}`,resize:`You can constrain proportions by holding {{shortcut_1}} while resizing,
@@ -9,4 +9,4 @@ or hold {{shortcut_2}} and click to add new points`,publishLibrary:`Publish your
9
9
  Will increase exported file size.`},title:{exportToPng:`Export to PNG`,exportToSvg:`Export to SVG`,copyPngToClipboard:`Copy PNG to clipboard`},button:{exportToPng:`PNG`,exportToSvg:`SVG`,copyPngToClipboard:`Copy to clipboard`}},T={tooltip:`Your drawings are end-to-end encrypted so Excalidraw's servers will never see them.`,link:`Blog post on end-to-end encryption in Excalidraw`},E={angle:`Angle`,shapes:`Shapes`,height:`Height`,scene:`Scene`,selected:`Selected`,storage:`Storage`,fullTitle:`Canvas & Shape properties`,title:`Properties`,generalStats:`General`,elementProperties:`Shape properties`,total:`Total`,version:`Version`,versionCopy:`Click to copy`,versionNotAvailable:`Version not available`,width:`Width`},D={addedToLibrary:`Added to library`,copyStyles:`Copied styles.`,copyToClipboard:`Copied to clipboard.`,copyToClipboardAsPng:`Copied {{exportSelection}} to clipboard as PNG
10
10
  ({{exportColorScheme}})`,copyToClipboardAsSvg:`Copied {{exportSelection}} to clipboard as SVG
11
11
  ({{exportColorScheme}})`,fileSaved:`File saved.`,fileSavedToFilename:`Saved to {filename}`,canvas:`canvas`,selection:`selection`,pasteAsSingleElement:`Use {{shortcut}} to paste as a single element,
12
- or paste into an existing text editor`,unableToEmbed:`Embedding this url is currently not allowed. Raise an issue on GitHub to request the url whitelisted`,unrecognizedLinkFormat:`The link you embedded does not match the expected format. Please try to paste the 'embed' string provided by the source site`,elementLinkCopied:`Link copied to clipboard`},O={transparent:`Transparent`,black:`Black`,white:`White`,red:`Red`,pink:`Pink`,grape:`Grape`,violet:`Violet`,gray:`Gray`,blue:`Blue`,cyan:`Cyan`,teal:`Teal`,green:`Green`,yellow:`Yellow`,orange:`Orange`,bronze:`Bronze`},k={app:{center_heading:`Your drawings are saved in your browser's storage.`,center_heading_line2:`Browser storage can be cleared unexpectedly.`,center_heading_line3:`Save your work to a file regularly to avoid losing it.`,center_heading_plus:`Did you want to go to the Excalidraw+ instead?`,menuHint:`Export, preferences, languages, ...`},defaults:{menuHint:`Export, preferences, and more...`,center_heading:`Diagrams. Made. Simple.`,toolbarHint:`Pick a tool & Start drawing!`,helpHint:`Shortcuts & help`}},A={color:`Color`,mostUsedCustomColors:`Most used custom colors`,colors:`Colors`,shades:`Shades`,hexCode:`Hex code`,noShades:`No shades available for this color`,invalidColor:`Not a valid color`,invalidHexLength:`Hex code must be 3, 4, 6, or 8 characters`},j={action:{exportToImage:{title:`Export as image`,button:`Export as image`,description:`Export the scene data as an image from which you can import later.`},saveToDisk:{title:`Save to disk`,button:`Save to disk`,description:`Export the scene data to a file from which you can import later.`},excalidrawPlus:{title:`Excalidraw+`,button:`Export to Excalidraw+`,description:`Save the scene to your Excalidraw+ workspace.`}},modal:{loadFromFile:{title:`Load from file`,button:`Load from file`,description:`Loading from a file will <bold>replace your existing content</bold>.<br></br>You can back up your drawing first using one of the options below.`},shareableLink:{title:`Load from link`,button:`Replace my content`,description:`Loading external drawing will <bold>replace your existing content</bold>.<br></br>You can back up your drawing first by using one of the options below.`}}},M={title:`Mermaid to Excalidraw`,button:`Insert`,description:`Currently only <flowchartLink>Flowchart</flowchartLink>, <sequenceLink>Sequence</sequenceLink>, <classLink>Class</classLink>, and <erdLink>Entity Relationship</erdLink> Diagrams are supported. The other types will be rendered as image in Excalidraw.`,syntax:`Mermaid Syntax`,preview:`Preview`,label:`Mermaid`,inputPlaceholder:`Write Mermaid diagram defintion here...`,autoFixAvailable:`Auto-fix is available`},N={error:`Error!`},P={inputPlaceholder:`Start typing your diagram idea here... ({{shortcut}} for new line)`,inputPlaceholderWithMessages:`Continue refining your diagram...`,generating:`Generating...`,rateLimitRemaining:`{{count}} requests left today`,role:{user:`You`,assistant:`AI Assistant`,system:`System`},aiBeta:`AI Beta`,label:`Chat`,menu:`Menu`,newChat:`New Chat`,deleteChat:`Delete chat`,deleteMessage:`Delete message`,viewAsMermaid:`View as Mermaid`,placeholder:{title:`Let's design your diagram`,description:`Describe the diagram you want to create, and we'll generate it for you.`,hint:`At the moment we know Flowchart, Sequence, Class, State, and Entity Relationship diagrams.`},preview:`Preview`,insert:`Insert`,retry:`Retry`,errors:{promptTooShort:`Prompt is too short (min {{min}} characters)`,promptTooLong:`Prompt is too long (max {{max}} characters)`,generationFailed:`Generation failed`,invalidDiagram:`Generated an invalid diagram :(. You may edit manually, retry with auto-fix, or try a different prompt.`,fixInMermaid:`Edit Mermaid manually →`,aiRepair:`Regenerate (auto-fix) →`,requestAborted:`Request aborted`,requestFailed:`Request failed`,mermaidParseError:`Mermaid syntax error`},rateLimit:{messageLimit:`You've hit your AI limit on the free plan. Try out Excalidraw+ for more or come back tomorrow.`,generalRateLimit:`Hold your horses, you're too fast for us! Please wait a moment before trying again.`,messageLimitInputPlaceholder:`You've reached your message limit`},upsellBtnLabel:`Upgrade to Plus`},F={placeholder:`Quick search`},I={badge:{old:`old`},sceneFonts:`In this scene`,availableFonts:`Available fonts`,empty:`No fonts found`},L={empty:`No users found`,hint:{text:`Click on user to follow`,followStatus:`You're currently following this user`,inCall:`User is in a voice call`,micMuted:`User's microphone is muted`,isSpeaking:`User is speaking`}},R={title:`Command palette`,shortcuts:{select:`Select`,confirm:`Confirm`,close:`Close`},recents:`Recently used`,search:{placeholder:`Search menus, commands, and discover hidden gems`,noMatch:`No matching commands...`},itemNotAvailable:`Command is not available...`,shortcutHint:`For Command palette, use {{shortcut}}`},z={ctrl:`Ctrl`,option:`Option`,cmd:`Cmd`,alt:`Alt`,escape:`Esc`,enter:`Enter`,shift:`Shift`,spacebar:`Space`,delete:`Delete`,mmb:`Scroll wheel`},B={labels:e,elementLink:t,library:n,search:r,buttons:i,alerts:a,errors:o,toolBar:s,bucketfill:c,element:l,headings:u,hints:d,canvasError:f,errorSplash:p,shareDialog:m,roomDialog:h,errorDialog:g,progressDialog:_,exportDialog:v,helpDialog:y,clearCanvasDialog:b,publishDialog:x,publishSuccessDialog:S,confirmDialog:C,imageExportDialog:w,encrypted:T,stats:E,toast:D,colors:O,welcomeScreen:k,colorPicker:A,overwriteConfirm:j,mermaid:M,ttd:N,chat:P,quickSearch:F,fontList:I,userList:L,commandPalette:R,keys:z};export{d as A,h as B,s as C,r as D,f as E,e as F,l as I,v as L,u as M,t as N,y as O,o as P,g as R,c as S,p as T,F as V,z as _,E as a,n as b,R as c,N as d,P as f,C as g,b as h,A as i,i as j,a as k,j as l,M as m,I as n,O as o,D as p,x as r,L as s,k as t,w as u,B as v,_ as w,m as x,T as y,S as z};
12
+ or paste into an existing text editor`,unableToEmbed:`Embedding this url is currently not allowed. Raise an issue on GitHub to request the url whitelisted`,unrecognizedLinkFormat:`The link you embedded does not match the expected format. Please try to paste the 'embed' string provided by the source site`,elementLinkCopied:`Link copied to clipboard`},O={transparent:`Transparent`,black:`Black`,white:`White`,red:`Red`,pink:`Pink`,grape:`Grape`,violet:`Violet`,gray:`Gray`,blue:`Blue`,cyan:`Cyan`,teal:`Teal`,green:`Green`,yellow:`Yellow`,orange:`Orange`,bronze:`Bronze`},k={app:{center_heading:`Your drawings are saved in your browser's storage.`,center_heading_line2:`Browser storage can be cleared unexpectedly.`,center_heading_line3:`Save your work to a file regularly to avoid losing it.`,center_heading_plus:`Did you want to go to the Excalidraw+ instead?`,menuHint:`Export, preferences, languages, ...`},defaults:{menuHint:`Export, preferences, and more...`,center_heading:`Diagrams. Made. Simple.`,toolbarHint:`Pick a tool & Start drawing!`,helpHint:`Shortcuts & help`}},A={color:`Color`,mostUsedCustomColors:`Most used custom colors`,colors:`Colors`,shades:`Shades`,hexCode:`Hex code`,noShades:`No shades available for this color`,invalidColor:`Not a valid color`,invalidHexLength:`Hex code must be 3, 4, 6, or 8 characters`},j={action:{exportToImage:{title:`Export as image`,button:`Export as image`,description:`Export the scene data as an image from which you can import later.`},saveToDisk:{title:`Save to disk`,button:`Save to disk`,description:`Export the scene data to a file from which you can import later.`},excalidrawPlus:{title:`Excalidraw+`,button:`Export to Excalidraw+`,description:`Save the scene to your Excalidraw+ workspace.`}},modal:{loadFromFile:{title:`Load from file`,button:`Load from file`,description:`Loading from a file will <bold>replace your existing content</bold>.<br></br>You can back up your drawing first using one of the options below.`},shareableLink:{title:`Load from link`,button:`Replace my content`,description:`Loading external drawing will <bold>replace your existing content</bold>.<br></br>You can back up your drawing first by using one of the options below.`}}},M={title:`Mermaid to Excalidraw`,button:`Insert`,description:`Currently only <flowchartLink>Flowchart</flowchartLink>, <sequenceLink>Sequence</sequenceLink>, <classLink>Class</classLink>, and <erdLink>Entity Relationship</erdLink> Diagrams are supported. The other types will be rendered as image in Excalidraw.`,syntax:`Mermaid Syntax`,preview:`Preview`,label:`Mermaid`,inputPlaceholder:`Write Mermaid diagram defintion here...`,autoFixAvailable:`Auto-fix is available`},N={error:`Error!`},P={inputPlaceholder:`Start typing your diagram idea here... ({{shortcut}} for new line)`,inputPlaceholderWithMessages:`Continue refining your diagram...`,generating:`Generating...`,rateLimitRemaining:`{{count}} requests left today`,role:{user:`You`,assistant:`AI Assistant`,system:`System`},aiBeta:`AI Beta`,label:`Chat`,menu:`Menu`,newChat:`New Chat`,deleteChat:`Delete chat`,deleteMessage:`Delete message`,viewAsMermaid:`View as Mermaid`,placeholder:{title:`Let's design your diagram`,description:`Describe the diagram you want to create, and we'll generate it for you.`,hint:`At the moment we know Flowchart, Sequence, Class, State, and Entity Relationship diagrams.`},preview:`Preview`,insert:`Insert`,retry:`Retry`,errors:{promptTooShort:`Prompt is too short (min {{min}} characters)`,promptTooLong:`Prompt is too long (max {{max}} characters)`,generationFailed:`Generation failed`,invalidDiagram:`Generated an invalid diagram :(. You may edit manually, retry with auto-fix, or try a different prompt.`,fixInMermaid:`Edit Mermaid manually →`,aiRepair:`Regenerate (auto-fix) →`,requestAborted:`Request aborted`,requestFailed:`Request failed`,mermaidParseError:`Mermaid syntax error`},rateLimit:{messageLimit:`You've hit your AI limit on the free plan. Try out Excalidraw+ for more or come back tomorrow.`,generalRateLimit:`Hold your horses, you're too fast for us! Please wait a moment before trying again.`,messageLimitInputPlaceholder:`You've reached your message limit`},upsellBtnLabel:`Upgrade to Plus`},F={placeholder:`Quick search`},I={badge:{old:`old`},sceneFonts:`In this scene`,availableFonts:`Available fonts`,empty:`No fonts found`},L={empty:`No users found`,hint:{text:`Click on user to follow`,followStatus:`You're currently following this user`,inCall:`User is in a voice call`,micMuted:`User's microphone is muted`,isSpeaking:`User is speaking`}},R={title:`Command palette`,shortcuts:{select:`Select`,confirm:`Confirm`,close:`Close`},recents:`Recently used`,search:{placeholder:`Search menus, commands, and discover hidden gems`,noMatch:`No matching commands...`},itemNotAvailable:`Command is not available...`,shortcutHint:`For Command palette, use {{shortcut}}`},z={ctrl:`Ctrl`,option:`Option`,cmd:`Cmd`,alt:`Alt`,escape:`Esc`,enter:`Enter`,shift:`Shift`,spacebar:`Space`,delete:`Delete`,mmb:`Scroll wheel`},B={labels:e,elementLink:t,library:n,search:r,buttons:i,alerts:a,errors:o,toolBar:s,bucketfill:c,element:l,headings:u,hints:d,canvasError:f,errorSplash:p,shareDialog:m,roomDialog:h,errorDialog:g,progressDialog:_,exportDialog:v,helpDialog:y,clearCanvasDialog:b,publishDialog:x,publishSuccessDialog:S,confirmDialog:C,imageExportDialog:w,encrypted:T,stats:E,toast:D,colors:O,welcomeScreen:k,colorPicker:A,overwriteConfirm:j,mermaid:M,ttd:N,chat:P,quickSearch:F,fontList:I,userList:L,commandPalette:R,keys:z};export{d as A,h as B,s as C,r as D,f as E,e as F,l as I,v as L,u as M,t as N,y as O,o as P,g as R,c as S,p as T,F as V,B as _,E as a,n as b,R as c,N as d,P as f,C as g,b as h,A as i,i as j,a as k,j as l,M as m,I as n,O as o,D as p,x as r,L as s,k as t,w as u,z as v,_ as w,m as x,T as y,S as z};
@@ -1,4 +1,4 @@
1
- import{a as e,o as t}from"./yjs-provider-reset-guard-Cox4nxwu.js";var n=2e3,r=new Set([`line`,`text`]);function i(e){return Number.isFinite(e)?e:null}function a(e){return e instanceof t?e.toJSON():e&&typeof e==`object`&&!Array.isArray(e)?e:null}function o(e){return typeof e==`string`?e:``}function s(t){return t instanceof e?t.toArray():Array.isArray(t)?t:[]}function c(e,n){return e instanceof t?e.get(n):e?.[n]}function l(e){return i(c(e,`resolvedAt`))!==null}function u(e,n){return e instanceof t?e.get(n):e?.[n]}function d(e){return r.has(e)?e:null}function f(e){return String(e??``).replace(/\r\n?/g,`
1
+ import{a as e,o as t}from"./yjs-provider-reset-guard-DE0vINDP.js";var n=2e3,r=new Set([`line`,`text`]);function i(e){return Number.isFinite(e)?e:null}function a(e){return e instanceof t?e.toJSON():e&&typeof e==`object`&&!Array.isArray(e)?e:null}function o(e){return typeof e==`string`?e:``}function s(t){return t instanceof e?t.toArray():Array.isArray(t)?t:[]}function c(e,n){return e instanceof t?e.get(n):e?.[n]}function l(e){return i(c(e,`resolvedAt`))!==null}function u(e,n){return e instanceof t?e.get(n):e?.[n]}function d(e){return r.has(e)?e:null}function f(e){return String(e??``).replace(/\r\n?/g,`
2
2
  `).trim().slice(0,2e3)||null}function p(e){return String(e??``).replace(/\r\n?/g,`
3
3
  `).trim().slice(0,280)||``}function m(e){return String(e??``).replace(/\r\n?/g,`
4
4
  `).replace(/\s+/g,` `).trim()}function h(e,t=160){let n=m(e);return n?n.length<=t?n:`${n.slice(0,Math.max(t-1,1)).trimEnd()}…`:``}function g(e){return Array.from(String(e??``).trim()).slice(0,16).join(``)}function _(e){let t=o(u(e,`userId`)).trim();return t?{reactedAt:i(u(e,`reactedAt`))??Date.now(),userColor:o(u(e,`userColor`)),userId:t,userName:o(u(e,`userName`))||`Anonymous`}:null}function v(e){let t=g(u(e,`emoji`));if(!t)return null;let n=new Map;return s(u(e,`users`)).forEach(e=>{let t=_(e);t&&n.set(t.userId,t)}),n.size===0?null:{emoji:t,users:Array.from(n.values())}}function y(e){let t=new Map;return s(e).forEach(e=>{let n=v(e);if(!n)return;let r=t.get(n.emoji);if(!r){t.set(n.emoji,n);return}let i=new Map(r.users.map(e=>[e.userId,e]));n.users.forEach(e=>i.set(e.userId,e)),t.set(n.emoji,{emoji:n.emoji,users:Array.from(i.values())})}),Array.from(t.values())}function b(e){let t=f(u(e,`body`));return t?{body:t,createdAt:i(u(e,`createdAt`))??Date.now(),id:o(u(e,`id`))||S(`comment`),peerId:o(u(e,`peerId`)),reactions:y(u(e,`reactions`)),userColor:o(u(e,`userColor`)),userName:o(u(e,`userName`))||`Anonymous`}:null}function x(e){return s(e).map(e=>b(e)).filter(Boolean)}function S(e=`comment`){return globalThis.crypto?.randomUUID?`${e}-${globalThis.crypto.randomUUID()}`:`${e}-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function C(e={}){let t=d(e.anchorKind),n=a(e.anchorStart),r=a(e.anchorEnd),o=i(e.anchorStartLine),s=i(e.anchorEndLine),c=p(e.anchorQuote);return!t||!n||!r||o===null||s===null?null:{anchorEnd:r,anchorEndLine:Math.max(s,o),anchorKind:t,anchorQuote:c,anchorStart:n,anchorStartLine:Math.max(o,1)}}function w(n={}){if(i(n.resolvedAt)!==null)return null;let r=C(n),a=b(n.messages?.[0]);if(!r||!a)return null;let s=new e,c=n.messages?.map(e=>b(e)).filter(Boolean)??[];s.push(c.length>0?c:[a]);let l=new t;return l.set(`anchorEnd`,r.anchorEnd),l.set(`anchorEndLine`,r.anchorEndLine),l.set(`anchorKind`,r.anchorKind),l.set(`anchorQuote`,r.anchorQuote),l.set(`anchorStart`,r.anchorStart),l.set(`anchorStartLine`,r.anchorStartLine),l.set(`createdAt`,i(n.createdAt)??Date.now()),l.set(`createdByColor`,o(n.createdByColor)),l.set(`createdByName`,o(n.createdByName)||a.userName),l.set(`createdByPeerId`,o(n.createdByPeerId)||a.peerId),l.set(`id`,o(n.id)||S(`thread`)),l.set(`messages`,s),l.set(`resolvedAt`,i(n.resolvedAt)),l.set(`resolvedByColor`,o(n.resolvedByColor)),l.set(`resolvedByName`,o(n.resolvedByName)),l.set(`resolvedByPeerId`,o(n.resolvedByPeerId)),l}function T(e){if(l(e))return null;let t=C({anchorEnd:c(e,`anchorEnd`),anchorEndLine:c(e,`anchorEndLine`),anchorKind:c(e,`anchorKind`),anchorQuote:c(e,`anchorQuote`),anchorStart:c(e,`anchorStart`),anchorStartLine:c(e,`anchorStartLine`)}),n=x(c(e,`messages`));return!t||n.length===0?null:{...t,createdAt:i(c(e,`createdAt`))??n[0].createdAt,createdByColor:o(c(e,`createdByColor`))||n[0].userColor,createdByName:o(c(e,`createdByName`))||n[0].userName,createdByPeerId:o(c(e,`createdByPeerId`))||n[0].peerId,id:o(c(e,`id`))||S(`thread`),messages:n,resolvedAt:i(c(e,`resolvedAt`)),resolvedByColor:o(c(e,`resolvedByColor`)),resolvedByName:o(c(e,`resolvedByName`)),resolvedByPeerId:o(c(e,`resolvedByPeerId`))}}function E(t){return(t instanceof e?t.toArray():Array.isArray(t)?t:[]).map(e=>T(e)).filter(Boolean)}export{f as a,E as c,C as i,h as l,S as n,p as o,w as r,m as s,n as t};
@@ -0,0 +1,9 @@
1
+ /* empty css */import{h as e,m as t,t as n}from"./vault-api-client-C6bcGwy-.js";import{f as r,n as i}from"./runtime-config-DSGmGE9V.js";import{n as ee,r as te,t as a}from"./yjs-provider-reset-guard-DE0vINDP.js";import{n as o,t as ne}from"./drawio-room-yBUzk-vg.js";function s({currentTheme:e=`dark`,currentXml:t=``,isEditor:n=!1,isExportImageMode:r=!1}={}){return{autosave:n&&!r?1:0,dark:+(e===`dark`),modified:`unsavedChanges`,noExitBtn:1,noSaveBtn:r?1:+!n,saveAndExit:0,theme:e===`light`?`simple`:`dark`,xml:String(t||``)}}function c(e={}){return JSON.stringify({autosave:e.autosave??0,dark:e.dark??0,noSaveBtn:e.noSaveBtn??1,theme:e.theme??`dark`,xml:String(e.xml??``)})}var l=4e3;function u(e,t=0){let n=Number(e);return Number.isFinite(n)?n:t}var d=class{constructor({clearIntervalFn:e=e=>window.clearInterval(e),filePath:t=``,heartbeatIntervalMs:n=ne,now:i=()=>Date.now(),onStateChange:a=()=>{},resolveWsBaseUrlFn:s=r,roomName:c=``,setIntervalFn:u=(e,t)=>window.setInterval(e,t),setTimeoutFn:d=(e,t)=>window.setTimeout(e,t),staleLeaseMs:f=o,syncTimeoutMs:p=l,websocketProviderFactory:m=(e,t,n,r)=>new ee(e,t,n,r),ydocFactory:h=()=>new te}){this.clearIntervalFn=e,this.filePath=t,this.heartbeatIntervalMs=n,this.now=i,this.onStateChange=a,this.resolveWsBaseUrlFn=s,this.roomName=c,this.setIntervalFn=u,this.setTimeoutFn=d,this.staleLeaseMs=f,this.syncTimeoutMs=p,this.websocketProviderFactory=m,this.ydocFactory=h,this.ydoc=null,this.provider=null,this.awareness=null,this.leaseMap=null,this.statusMap=null,this.localUser=null,this.localMode=`viewer`,this.heartbeatTimer=null,this.currentState=this.createState(),this.handleLeaseChange=()=>this.emitState(),this.handleStatusChange=()=>this.emitState(),this.handleAwarenessChange=()=>this.emitState()}createState(e={}){return{acquiredAt:0,canClaim:!1,hasHealthyHolder:!1,heartbeatAt:0,holderClientId:``,holderName:``,holderPeerId:``,isEditor:!1,isStale:!0,mode:`viewer`,savedAt:0,savedVersion:0,...e}}async connect({initialUser:e=null,requestedMode:t=`edit`}={}){return this.localUser=e??null,this.localMode=`viewer`,this.roomName?(this.ydoc=this.ydocFactory(),this.provider=this.websocketProviderFactory(this.resolveWsBaseUrlFn(),this.roomName,this.ydoc,{disableBc:!0,maxBackoffTime:5e3}),a(this.provider),this.awareness=this.provider.awareness,this.leaseMap=this.ydoc.getMap(`lease`),this.statusMap=this.ydoc.getMap(`status`),this.setLocalAwareness({mode:`viewer`}),this.leaseMap.observe(this.handleLeaseChange),this.statusMap.observe(this.handleStatusChange),this.awareness.on(`change`,this.handleAwarenessChange),await this.waitForSync(),t===`edit`?this.tryAcquireLease():this.emitState(),this.currentState):(this.currentState=this.createState(),this.onStateChange(this.currentState),this.currentState)}waitForSync(){return this.provider?new Promise(e=>{let t=!1,n=this.setTimeoutFn(()=>{t||(t=!0,this.provider.off?.(`sync`,r),e(!1))},this.syncTimeoutMs),r=i=>{!i||t||(t=!0,clearTimeout(n),this.provider.off?.(`sync`,r),e(!0))};this.provider.on?.(`sync`,r)}):Promise.resolve(!1)}setLocalUser(e=null){return this.localUser=e??null,this.setLocalAwareness({mode:this.currentState.isEditor?`editor`:`viewer`}),this.localUser}setLocalAwareness({mode:e=`viewer`}={}){this.localMode=e,this.awareness&&this.awareness.setLocalStateField(`drawio`,{filePath:this.filePath,mode:e,name:this.localUser?.name||``,peerId:this.localUser?.peerId||``})}getLocalClientId(){return this.ydoc?String(this.ydoc.clientID):``}getLeaseSnapshot(){return{acquiredAt:u(this.leaseMap?.get(`acquiredAt`)),heartbeatAt:u(this.leaseMap?.get(`heartbeatAt`)),holderClientId:String(this.leaseMap?.get(`holderClientId`)||``),holderName:String(this.leaseMap?.get(`holderName`)||``),holderPeerId:String(this.leaseMap?.get(`holderPeerId`)||``)}}findHolderAwarenessState(e){if(!e||!this.awareness)return null;for(let[t,n]of this.awareness.getStates())if(String(t)===String(e)&&n?.drawio?.filePath===this.filePath)return n.drawio;return null}isLeaseStale(e=this.getLeaseSnapshot()){return!e.holderClientId||!this.findHolderAwarenessState(e.holderClientId)||this.now()-e.heartbeatAt>this.staleLeaseMs}isLeaseHeldByLocal(e=this.getLeaseSnapshot()){return!!e.holderClientId&&e.holderClientId===this.getLocalClientId()}tryAcquireLease(){if(!this.leaseMap)return!1;let e=this.getLeaseSnapshot();if(e.holderClientId&&!this.isLeaseStale(e)&&!this.isLeaseHeldByLocal(e))return this.emitState(),!1;let t=this.now();return this.ydoc.transact(()=>{this.leaseMap.set(`holderClientId`,this.getLocalClientId()),this.leaseMap.set(`holderName`,this.localUser?.name||``),this.leaseMap.set(`holderPeerId`,this.localUser?.peerId||``),this.leaseMap.set(`acquiredAt`,t),this.leaseMap.set(`heartbeatAt`,t)},`drawio-lease-acquire`),this.emitState(),this.currentState.isEditor}renewLeaseHeartbeat(){return!this.leaseMap||!this.isLeaseHeldByLocal()?!1:(this.leaseMap.set(`heartbeatAt`,this.now()),!0)}startHeartbeat(){this.heartbeatTimer||=this.setIntervalFn(()=>{this.renewLeaseHeartbeat()},this.heartbeatIntervalMs)}stopHeartbeat(){this.heartbeatTimer&&=(this.clearIntervalFn(this.heartbeatTimer),null)}releaseLease(){return!this.leaseMap||!this.isLeaseHeldByLocal()?!1:(this.stopHeartbeat(),this.ydoc.transact(()=>{this.leaseMap.delete(`holderClientId`),this.leaseMap.delete(`holderName`),this.leaseMap.delete(`holderPeerId`),this.leaseMap.delete(`acquiredAt`),this.leaseMap.delete(`heartbeatAt`)},`drawio-lease-release`),this.setLocalAwareness({mode:`viewer`}),this.emitState(),!0)}publishSave(){if(!this.statusMap)return 0;let e=u(this.statusMap.get(`savedVersion`))+1,t=this.now();return this.ydoc.transact(()=>{this.statusMap.set(`savedVersion`,e),this.statusMap.set(`savedAt`,t)},`drawio-save-status`),this.emitState(),e}emitState(){let e=this.getLeaseSnapshot(),t=this.isLeaseStale(e),n=this.isLeaseHeldByLocal(e),r=this.createState({acquiredAt:e.acquiredAt,canClaim:!n&&t,hasHealthyHolder:!!e.holderClientId&&!t,heartbeatAt:e.heartbeatAt,holderClientId:e.holderClientId,holderName:e.holderName,holderPeerId:e.holderPeerId,isEditor:n,isStale:t,mode:n?`editor`:`viewer`,savedAt:u(this.statusMap?.get(`savedAt`)),savedVersion:u(this.statusMap?.get(`savedVersion`))});return n?(this.startHeartbeat(),this.setLocalAwareness({mode:`editor`})):(this.stopHeartbeat(),this.setLocalAwareness({mode:`viewer`})),this.currentState=r,this.onStateChange(r),r}destroy(){this.releaseLease(),this.stopHeartbeat(),this.leaseMap?.unobserve?.(this.handleLeaseChange),this.statusMap?.unobserve?.(this.handleStatusChange),this.awareness?.off?.(`change`,this.handleAwarenessChange),this.provider?.destroy?.(),this.ydoc?.destroy?.(),this.provider=null,this.ydoc=null,this.awareness=null,this.leaseMap=null,this.statusMap=null}},f=1e3,p=15e3,m=window.location.origin,h=new URLSearchParams(window.location.search),g=h.get(`file`)||``,_=h.get(`leaseRoom`)||``,re=h.get(`mode`)===`view`?`view`:`edit`,v=h.get(`hostMode`)||``,ie=h.get(`instanceId`)||``,ae=h.get(`theme`)===`light`?`light`:`dark`,y=v===`export-image`,b=Number.parseInt(h.get(`previewWidth`)||``,10),x=i(),S=``,C=ae,w=null,T=null,E=!1,D=null,O=null,k=null,A=null,j=``,M=0,N=!1,P=!1,F=document.getElementById(`loadingState`),I=document.getElementById(`root`),L={bannerText:``,canClaim:!1,isEditor:!1},R=document.createElement(`div`);R.className=`drawio-shell`;var z=document.createElement(`div`);z.className=`drawio-banner`,z.innerHTML=`
2
+ <div class="drawio-banner-status">
3
+ <span class="drawio-banner-pill" id="drawioModePill">Loading</span>
4
+ <span class="drawio-banner-copy" id="drawioBannerText">Connecting…</span>
5
+ </div>
6
+ <div class="drawio-banner-actions">
7
+ <button type="button" class="drawio-toolbar-btn" id="claimEditBtn" hidden>Claim edit</button>
8
+ </div>
9
+ `;var B=document.createElement(`div`);B.className=`drawio-frame-shell`;var V=_?new d({filePath:g,onStateChange:e=>fe(e),roomName:_}):null;function H(e,t={}){window.parent!==window&&window.parent.postMessage({source:`drawio-editor`,instanceId:ie,type:e,...t},m)}function oe(e){t(e)&&(e.preventDefault(),e.stopPropagation(),H(`request-toggle-quick-switcher`))}function se(e){if(typeof e==`string`)try{return JSON.parse(e)}catch{return null}return e&&typeof e==`object`?e:null}function U(e){document.body.dataset.theme=e===`light`?`light`:`dark`}function W(e,{isError:t=!1}={}){F&&(F.className=t?`drawio-error`:`drawio-loading`,F.textContent=e)}function G(){let e=document.getElementById(`drawioModePill`),t=document.getElementById(`drawioBannerText`),n=document.getElementById(`claimEditBtn`);!e||!t||!n||(e.textContent=L.isEditor?`Editing`:`Read-only`,t.textContent=L.bannerText||(L.isEditor?`Editing`:`Read-only mode`),n.hidden=!L.canClaim,n.disabled=!L.canClaim)}function K(){D&&=(window.clearTimeout(D),null)}function q(){K(),O&&=(window.removeEventListener(`message`,O),null),T?.remove(),T=null,E=!1,j=``,N=!1,P=!1}function ce(){let e=x.drawioBaseUrl||`https://embed.diagrams.net`,t=new URL(e);return t.searchParams.set(`embed`,`1`),t.searchParams.set(`proto`,`json`),t.searchParams.set(`spin`,`1`),t.searchParams.set(`ui`,C===`light`?`simple`:`dark`),t.searchParams.set(`libraries`,`1`),t.toString()}function J(e,t={}){return T?.contentWindow?(T.contentWindow.postMessage(JSON.stringify({action:e,...t}),`*`),!0):!1}function Y(){let e=s({currentTheme:C,currentXml:S,isEditor:L.isEditor,isExportImageMode:y}),t=c(e);if(t===j)return!1;let n=J(`load`,e);return n&&(j=t),n}function le(){T&&(T.classList.toggle(`is-read-only`,!L.isEditor),E&&Y())}function X(e,{fallbackToText:t=!1}={}){console.error(`[drawio] Failed to initialize:`,e),q(),I.replaceChildren(R),B.replaceChildren(),B.appendChild(Object.assign(document.createElement(`div`),{className:`drawio-error`,textContent:e})),L.bannerText=e,L.isEditor=!1,L.canClaim=!1,G(),H(t?`fallback-text`:`error`,{filePath:g,message:e})}function ue(){P||!E||(P=!0,J(`export`,{border:0,currentPage:!0,format:`png`,grid:!1,keepTheme:!0,scale:2,shadow:!1,size:`diagram`,transparent:!1,...Number.isFinite(b)&&b>0?{width:b}:{}}))}async function Z(){if(!A||!g||!L.isEditor)return null;let e=A;return A=null,n.writeFile({content:e,path:g}).then(()=>(S=e,M=V?.publishSave?.()??M,!0)).catch(t=>{throw console.error(`[drawio] Failed to save diagram:`,t),A=e,t})}function Q(e,{immediate:t=!1}={}){if(!(!L.isEditor||!e)){if(A=e,k&&=(window.clearTimeout(k),null),t){Z();return}k=window.setTimeout(()=>{k=null,Z()},f)}}async function de(){if(!g)return;let e=await n.readFile(g),t=String(e?.content??``);t!==S&&(S=t,E&&Y())}function $(){q();let e=document.createElement(`iframe`);e.className=`drawio-frame`,e.title=`draw.io`,e.allow=`clipboard-read; clipboard-write`,e.src=ce(),B.replaceChildren(e),T=e,le(),O=e=>{if(e.source!==T?.contentWindow)return;let t=se(e.data);if(t?.event){if(t.event===`ready`||t.event===`init`){E=!0,K(),Y(),N||(N=!0,H(`ready`,{filePath:g,instanceMode:L.isEditor?`edit`:`view`}));return}if(t.event===`load`){y&&ue();return}if(t.event===`autosave`){Q(String(t.xml||``));return}if(t.event===`save`){Q(String(t.xml||``),{immediate:!0});return}if(t.event===`export`){if(y&&typeof t.data==`string`&&t.data){H(`export-image`,{data:t.data,filePath:g,format:t.format||`svg`});return}y&&X(`Failed to export draw.io preview`);return}t.event===`exit`&&v===`file-preview`&&!L.isEditor&&H(`request-open-file`,{filePath:g})}},window.addEventListener(`message`,O),D=window.setTimeout(()=>{X(`Failed to initialize draw.io editor`,{fallbackToText:v===`file-preview`})},p)}function fe(e){let t=w;w=e,L.isEditor=!!e?.isEditor,L.canClaim=!!e?.canClaim,L.bannerText=L.isEditor?`Editing`:e?.hasHealthyHolder?`${e.holderName||`Another user`} is editing this diagram. Read-only mode. Updates appear after they save.`:e?.isStale?`Editor disconnected. Claim edit to continue editing.`:`Read-only mode. Updates appear after save.`,G();let n=t&&t.isEditor!==e.isEditor;if(!t||n){$();return}let r=e.savedVersion!==M;M=e.savedVersion,!L.isEditor&&r&&de()}function pe(e){let t=e.data;!t||t.source!==`collabmd-host`||t.type===`set-theme`&&(C=t.theme===`light`?`light`:`dark`,U(C),$())}async function me(){V&&V.tryAcquireLease()}window.addEventListener(`keydown`,oe,{capture:!0});async function he(){U(C);try{if(await e(),x=i(),!g)throw Error(`Missing draw.io file path`);let t=await n.readFile(g);if(S=String(t?.content??``),F?.remove(),I.replaceChildren(R),R.replaceChildren(z,B),document.getElementById(`claimEditBtn`)?.addEventListener(`click`,()=>{me()}),window.addEventListener(`message`,pe),window.addEventListener(`beforeunload`,()=>{k&&window.clearTimeout(k),V?.releaseLease?.()}),window.addEventListener(`pagehide`,()=>{k&&window.clearTimeout(k),V?.releaseLease?.()}),re===`view`||!V){L.isEditor=!1,L.canClaim=!1,L.bannerText=y?`Rendering preview…`:`Read-only mode`,y||G(),$();return}await V.connect({initialUser:{name:h.get(`userName`)||localStorage.getItem(`collabmd-user-name`)||``,peerId:h.get(`peerId`)||``},requestedMode:`edit`})}catch(e){let t=e instanceof Error?e.message:String(e);X(t,{fallbackToText:v===`file-preview`}),W(`Failed to load draw.io: ${t}`,{isError:!0})}}he();
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./drawio-editor-ClE8jpoG.js","./vault-api-client-C6bcGwy-.js","./file-kind-BKPOIRPE.js","./runtime-config-DSGmGE9V.js","./browser-utils-CKtI_rZl.js","./vault-api-client-C3mlS_4N.css","./yjs-provider-reset-guard-DE0vINDP.js","./drawio-room-yBUzk-vg.js","./drawio-editor-UQQ8XHou.css","./embedded-editor-base-CiNEc8vy.css"])))=>i.map(i=>d[i]);
2
+ import"./modulepreload-polyfill-P2Xu9kJm.js";import{t as e}from"./preload-helper-HclGiUj8.js";await e(()=>import(`./drawio-editor-ClE8jpoG.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url);
@@ -0,0 +1,16 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dist-DhLvC8DS.js","./dist-C11hHqv_.js","./dist-MvcV4190.js","./dist-BqCsFpx4.js","./dist-DK5Gs2wa.js","./dist-D7G-n87v.js","./dist-CnL7Y2sM.js","./dist-BH87JoHx.js","./dist-DRqOrNgN.js","./dist-JYEDRrPT.js","./dist-CYZmbokb.js","./dist-D2AQ-76g.js","./dist-CZjTtmTu.js","./dist-DGb27Dl6.js","./dist-Cig4Ov_X.js","./dist-DetkMS_4.js","./dist-DCzuX1AF.js","./dist-CqQEC8gR.js","./dist-BIkPRZO7.js","./dist-Dp6FVkQ1.js","./dist-D5sn-mwk.js","./dist-RTa81Km7.js","./dist-D4Rzqod1.js","./dist-C2JHCt8U.js","./dist-HmEpWUow.js","./dist-DyrYcvpo2.js","./dist-DtbjNB28.js","./dockerfile-DJkHQgkl.js","./simple-mode-DXiLM1-G.js","./factor-LKH5gN8L.js","./javascript-BWjar7HY.js","./javascript-D-FtdkNC.js","./nsis-CfSuhXs5.js","./pug-Wky5Dnfy.js","./dist-Drp8uu5J.js","./dist-3bgCp7iY.js"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./preload-helper-HclGiUj8.js";import{$ as t,A as n,B as r,F as i,G as a,H as o,J as s,K as c,L as l,P as u,Q as d,R as f,St as p,Tt as m,V as h,W as g,Z as _,_t as ee,a as v,bt as te,c as ne,ct as y,et as re,f as ie,ft as ae,g as oe,gt as b,l as se,lt as x,mt as ce,nt as S,o as le,ot as C,pt as ue,q as de,rt as fe,st as pe,t as me,ut as w,v as he,w as ge,wt as _e,xt as ve,z as ye}from"./dist-C11hHqv_.js";import{i as be,n as xe,r as Se}from"./dist-BqCsFpx4.js";import{a as Ce,s as we}from"./dist-BIkPRZO7.js";import{t as Te}from"./dist-DtbjNB28.js";import{a as Ee,c as De,i as Oe,n as ke,o as Ae,r as je,s as Me,t as Ne}from"./dist-GrygD2zE.js";import{d as Pe,i as Fe,u as Ie}from"./file-kind-BKPOIRPE.js";import{f as Le}from"./runtime-config-DSGmGE9V.js";import{a as Re,c as T,d as ze,f as Be,g as Ve,h as He,i as Ue,l as E,m as We,n as Ge,o as D,p as O,r as Ke,s as qe,t as Je,u as k}from"./yjs-provider-reset-guard-DE0vINDP.js";import{i as Ye,t as Xe}from"./room-CQLoqtMo.js";import{a as Ze,c as Qe,i as $e,l as et,n as tt,o as nt,r as rt}from"./comment-threads-DDegmaFO.js";function it({body:e,user:t}){return{body:e,createdAt:Date.now(),id:tt(`comment`),peerId:t?.peerId??``,reactions:[],userColor:t?.color??``,userName:t?.name??`Anonymous`}}function at(e,t){return e instanceof D?e.get(t):e?.[t]}function ot(e=[]){return Array.isArray(e)?e.map(e=>({emoji:typeof e?.emoji==`string`?e.emoji:``,users:Array.isArray(e?.users)?e.users.map(e=>({reactedAt:Number.isFinite(e?.reactedAt)?e.reactedAt:Date.now(),userColor:typeof e?.userColor==`string`?e.userColor:``,userId:typeof e?.userId==`string`?e.userId:``,userName:typeof e?.userName==`string`&&e.userName?e.userName:`Anonymous`})).filter(e=>e.userId):[]})).filter(e=>e.emoji&&e.users.length>0):[]}function st(e,t){let n=t?.doc;if(!n)return null;let r=e?.anchor??e,i=r?.anchorKind===`text`?`text`:`line`,a=n.lines,o=Math.min(Math.max(Math.round(r?.startLine??1),1),a),s=Math.min(Math.max(Math.round(r?.endLine??o),o),a),c=n.line(o).from,l=n.line(s).to,u=Math.min(Math.max(Math.round(r?.startIndex??c),0),n.length),d=Math.min(Math.max(Math.round(r?.endIndex??l),u),n.length);return{anchorEndLine:s,anchorKind:i,anchorQuote:nt(r?.anchorQuote||n.sliceString(u,d)),anchorStartLine:o,endIndex:d,startIndex:u}}var ct=class{constructor({getDoc:e,getEditorState:t,getLocalUser:n,onCommentsChange:r=null}){this.getDoc=e,this.getEditorState=t,this.getLocalUser=n,this.onCommentsChange=r,this.commentThreads=null,this.ydoc=null,this.ytext=null,this.handleCommentThreadsChange=null,this.handleTextChange=null}bind({commentThreads:e,ydoc:t,ytext:n}){this.unbind(),this.commentThreads=e,this.ydoc=t,this.ytext=n,this.handleCommentThreadsChange=()=>{this.emitCommentsChange()},this.handleTextChange=()=>{this.emitCommentsChange()},this.commentThreads.observeDeep(this.handleCommentThreadsChange),this.ytext?.observe?.(this.handleTextChange),this.emitCommentsChange()}unbind(){this.commentThreads&&this.handleCommentThreadsChange&&this.commentThreads.unobserveDeep(this.handleCommentThreadsChange),this.ytext&&this.handleTextChange&&this.ytext.unobserve(this.handleTextChange),this.commentThreads=null,this.ydoc=null,this.ytext=null,this.handleCommentThreadsChange=null,this.handleTextChange=null}emitCommentsChange(){this.onCommentsChange?.(this.getCommentThreads())}refreshComments(){this.emitCommentsChange()}getCommentThreads(){return this.commentThreads?Qe(this.commentThreads).map(e=>this.resolveCommentThread(e)).filter(Boolean):[]}createCommentThread({anchor:e,body:t}){let n=this.getEditorState();if(!n||!this.commentThreads||!this.ytext||!this.ydoc)return null;let r=Ze(t),i=st(e,n);if(!r||!i)return null;let a=rt({anchorEnd:ze(k(this.ytext,i.endIndex)),anchorEndLine:i.anchorEndLine,anchorKind:i.anchorKind,anchorQuote:i.anchorQuote,anchorStart:ze(k(this.ytext,i.startIndex)),anchorStartLine:i.anchorStartLine,createdAt:Date.now(),createdByColor:this.getLocalUser()?.color??``,createdByName:this.getLocalUser()?.name??`Anonymous`,createdByPeerId:this.getLocalUser()?.peerId??``,id:tt(`thread`),messages:[it({body:r,user:this.getLocalUser()})]});return a?(this.ydoc.transact(()=>{this.commentThreads.push([a])},`comment-thread-create`),a.get(`id`)):null}replyToCommentThread(e,t){let n=Ze(t);if(!n||!this.ydoc)return null;let r=this.findSharedCommentThread(e)?.get(`messages`);if(!(r instanceof Re))return null;let i=it({body:n,user:this.getLocalUser()});return this.ydoc.transact(()=>{r.push([i])},`comment-thread-reply`),i.id}toggleCommentReaction(e,t,n){if(!this.ydoc||!e||!t||typeof n!=`string`||!n.trim())return!1;let r=this.getLocalUser?.(),i=typeof r?.userId==`string`?r.userId:``;if(!i)return!1;let a=this.findSharedCommentThread(e)?.get(`messages`);if(!(a instanceof Re))return!1;let o=a.toArray(),s=o.findIndex(e=>at(e,`id`)===t);if(s<0)return!1;let c=o[s]instanceof D?o[s].toJSON():{...o[s]},l=ot(c.reactions),u=l.findIndex(e=>e.emoji===n);if(u>=0){let e=l[u].users.filter(e=>e.userId!==i);e.length===l[u].users.length&&e.push({reactedAt:Date.now(),userColor:r?.color??``,userId:i,userName:r?.name??`Anonymous`}),e.length===0?l.splice(u,1):l[u]={...l[u],users:e}}else l.push({emoji:n,users:[{reactedAt:Date.now(),userColor:r?.color??``,userId:i,userName:r?.name??`Anonymous`}]});let d={...c,reactions:l};return this.ydoc.transact(()=>{a.delete(s,1),a.insert(s,[d])},`comment-reaction-toggle`),!0}deleteCommentThread(e){if(!this.commentThreads||!this.ydoc)return!1;let t=this.findSharedCommentThreadIndex(e);return t<0?!1:(this.ydoc.transact(()=>{this.commentThreads.delete(t,1)},`comment-thread-resolve`),!0)}findSharedCommentThread(e){return this.commentThreads?this.commentThreads.toArray().find(t=>t instanceof D&&t.get(`id`)===e)??null:null}findSharedCommentThreadIndex(e){return this.commentThreads?this.commentThreads.toArray().findIndex(t=>t instanceof D&&t.get(`id`)===e):-1}resolveCommentThread(e){let t=this.getEditorState();if(!e||!t||!this.ydoc)return null;let n=$e(e);if(!n)return null;let r=this.resolveCommentPosition(n.anchorStart),i=this.resolveCommentPosition(n.anchorEnd),a=r?.index??t.doc.line(n.anchorStartLine).from,o=Math.min(Math.max(n.anchorEndLine??n.anchorStartLine,n.anchorStartLine),t.doc.lines),s=i?.index??t.doc.line(o).to,c=t.doc.lineAt(a).number,l=Math.min(Math.max(s,a),t.doc.length),u=t.doc.lineAt(l).number,d=t.doc.sliceString(a,n.anchorKind===`text`?Math.max(s,a):t.doc.line(u).to),f=et(d)||n.anchorQuote;return{...e,anchor:{endIndex:s,endLine:u,excerpt:f,quote:n.anchorQuote,startIndex:a,startLine:c,kind:n.anchorKind},anchorEnd:n.anchorEnd,anchorEndLine:n.anchorEndLine,anchorKind:n.anchorKind,anchorQuote:n.anchorQuote,anchorStart:n.anchorStart,anchorStartLine:n.anchorStartLine}}resolveCommentPosition(e){if(!e||!this.ydoc||!this.ytext)return null;try{let t=E(e),n=T(t,this.ydoc);return!n||n.type!==this.ytext?null:n}catch{return null}}},lt=class{constructor({localUser:e=null,onAwarenessChange:t=null,onConnectionChange:n=null,onInitialSync:r=null,preferredUserName:i,resolveAwarenessCursor:a=null}){this.onAwarenessChange=t,this.onConnectionChange=n,this.onInitialSync=r,this.preferredUserName=i,this.providedLocalUser=e,this.resolveAwarenessCursor=a??(()=>null),this.provider=null,this.awareness=null,this.localUser=null,this.ydoc=null,this.ytext=null,this.commentThreads=null,this.wsBaseUrl=``,this.initialSyncComplete=!1,this.initialSyncPromise=Promise.resolve(),this.resolveInitialSync=null}normalizeViewport(e){if(!e||typeof e!=`object`)return null;let t=Number(e.topLine),n=Number(e.viewportRatio);return!Number.isFinite(t)||t<1?null:{topLine:Math.max(1,Math.round(t)),viewportRatio:Number.isFinite(n)?Math.min(Math.max(n,0),1):.35}}async initialize(e){this.wsBaseUrl=Le(),this.ydoc=new Ke,this.ytext=this.ydoc.getText(`codemirror`),this.commentThreads=this.ydoc.getArray(`comments`);let t=new Ue(this.ytext),n=new Ge(this.wsBaseUrl,e,this.ydoc,{disableBc:!0,maxBackoffTime:5e3});Je(n);let r=n.awareness,i=this.providedLocalUser??Xe(this.preferredUserName);this.provider=n,this.awareness=r,this.localUser=i,this.initialSyncComplete=!1,this.initialSyncPromise=new Promise(e=>{this.resolveInitialSync=e}),r.setLocalStateField(`user`,i),r.on(`change`,()=>{this.onAwarenessChange?.(this.collectUsers(this.resolveAwarenessCursor))}),this.trackConnectionStatus();let a=!1;return n.on(`sync`,e=>{!e||a||(a=!0,this.initialSyncComplete=!0,this.resolveInitialSync?.(),this.resolveInitialSync=null,this.onInitialSync?.())}),{awareness:r,commentThreads:this.commentThreads,localUser:this.localUser,undoManager:t,ydoc:this.ydoc,ytext:this.ytext}}destroy(){this.resolveInitialSync?.(),this.resolveInitialSync=null,this.initialSyncComplete=!1,this.initialSyncPromise=Promise.resolve(),this.provider?.disconnect(),this.provider?.destroy(),this.provider=null,this.awareness=null,this.localUser=null,this.ydoc?.destroy(),this.ydoc=null,this.ytext=null,this.commentThreads=null}waitForInitialSync(e=1500){return this.initialSyncComplete?Promise.resolve():e==null||e===!1?this.initialSyncPromise:Promise.race([this.initialSyncPromise,new Promise(t=>{window.setTimeout(t,e)})])}getText(){return this.ytext?.toString()??``}getLocalUser(){return this.localUser}setUserName(e){let t=Ye(e);return!t||!this.awareness||!this.localUser?null:(this.localUser={...this.localUser,name:t},this.awareness.setLocalStateField(`user`,this.localUser),t)}getUserCursor(e,t){return this.awareness?t(this.awareness.getStates().get(e)?.cursor):null}getUserViewport(e){if(!this.awareness)return null;let t=this.awareness.getStates().get(e);return this.normalizeViewport(t?.viewport)}setLocalViewport(e){if(!this.awareness)return null;let t=this.normalizeViewport(e);return this.awareness.setLocalStateField(`viewport`,t),t}collectUsers(e=()=>null){if(!this.awareness)return[];let t=[];return this.awareness.getStates().forEach((n,r)=>{if(!n.user)return;let i=e(n.cursor);t.push({...i??{},...n.user,clientId:r,hasCursor:!!i,isLocal:r===this.awareness.clientID,viewport:this.normalizeViewport(n.viewport)})}),t}trackConnectionStatus(){if(!this.provider)return;let e=0,t=!1;this.provider.on(`status`,({status:n})=>{n===`connecting`&&(e+=1);let r=n===`connected`&&!t;n===`connected`&&(e=0,t=!0),this.onConnectionChange?.({attempts:e,firstConnection:r,hasEverConnected:t,status:n,unreachable:!t&&e>=3,wsBaseUrl:this.wsBaseUrl})})}};function A(e){return new le(ne.define(e))}function j(t){return e(()=>import(`./dist-DhLvC8DS.js`).then(e=>e.sql({dialect:e[t]})),__vite__mapDeps([0,1,2,3]),import.meta.url)}var ut=[v.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return e(()=>import(`./dist-DK5Gs2wa.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,2]),import.meta.url)}}),v.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return e(()=>import(`./dist-DK5Gs2wa.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,2]),import.meta.url)}}),v.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return j(`Cassandra`)}}),v.of({name:`CSS`,extensions:[`css`],load(){return e(()=>import(`./dist-D7G-n87v.js`).then(e=>e.css()),__vite__mapDeps([5,6,1,2]),import.meta.url)}}),v.of({name:`Go`,extensions:[`go`],load(){return e(()=>import(`./dist-BH87JoHx.js`).then(e=>e.go()),__vite__mapDeps([7,1,2,3]),import.meta.url)}}),v.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return e(()=>import(`./dist-DRqOrNgN.js`).then(e=>e.html()),__vite__mapDeps([8,9,1,2,6,10,3]),import.meta.url)}}),v.of({name:`Java`,extensions:[`java`],load(){return e(()=>import(`./dist-D2AQ-76g.js`).then(e=>e.java()),__vite__mapDeps([11,1,2]),import.meta.url)}}),v.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return e(()=>import(`./dist-CZjTtmTu.js`).then(e=>e.javascript()),__vite__mapDeps([12,10,1,2,3]),import.meta.url)}}),v.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return e(()=>import(`./dist-DGb27Dl6.js`).then(e=>e.jinja()),__vite__mapDeps([13,1,2,9,6,10,3]),import.meta.url)}}),v.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return e(()=>import(`./dist-Cig4Ov_X.js`).then(e=>e.json()),__vite__mapDeps([14,1,2]),import.meta.url)}}),v.of({name:`JSX`,extensions:[`jsx`],load(){return e(()=>import(`./dist-CZjTtmTu.js`).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([12,10,1,2,3]),import.meta.url)}}),v.of({name:`LESS`,extensions:[`less`],load(){return e(()=>import(`./dist-DetkMS_4.js`).then(e=>e.less()),__vite__mapDeps([15,1,2,6]),import.meta.url)}}),v.of({name:`Liquid`,extensions:[`liquid`],load(){return e(()=>import(`./dist-DCzuX1AF.js`).then(e=>e.liquid()),__vite__mapDeps([16,1,2,9,6,10,3]),import.meta.url)}}),v.of({name:`MariaDB SQL`,load(){return j(`MariaSQL`)}}),v.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return e(()=>import(`./dist-CqQEC8gR.js`).then(e=>e.markdown()),__vite__mapDeps([17,18,1,9,2,6,10,3]),import.meta.url)}}),v.of({name:`MS SQL`,load(){return j(`MSSQL`)}}),v.of({name:`MySQL`,load(){return j(`MySQL`)}}),v.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return e(()=>import(`./dist-Dp6FVkQ1.js`).then(e=>e.php()),__vite__mapDeps([19,1,2,9,6,10,3]),import.meta.url)}}),v.of({name:`PLSQL`,extensions:[`pls`],load(){return j(`PLSQL`)}}),v.of({name:`PostgreSQL`,load(){return j(`PostgreSQL`)}}),v.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return e(()=>import(`./dist-D5sn-mwk.js`).then(e=>e.python()),__vite__mapDeps([20,1,2,3]),import.meta.url)}}),v.of({name:`Rust`,extensions:[`rs`],load(){return e(()=>import(`./dist-RTa81Km7.js`).then(e=>e.rust()),__vite__mapDeps([21,1,2]),import.meta.url)}}),v.of({name:`Sass`,extensions:[`sass`],load(){return e(()=>import(`./dist-D4Rzqod1.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([22,1,2,6]),import.meta.url)}}),v.of({name:`SCSS`,extensions:[`scss`],load(){return e(()=>import(`./dist-D4Rzqod1.js`).then(e=>e.sass()),__vite__mapDeps([22,1,2,6]),import.meta.url)}}),v.of({name:`SQL`,extensions:[`sql`],load(){return j(`StandardSQL`)}}),v.of({name:`SQLite`,load(){return j(`SQLite`)}}),v.of({name:`TSX`,extensions:[`tsx`],load(){return e(()=>import(`./dist-CZjTtmTu.js`).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([12,10,1,2,3]),import.meta.url)}}),v.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return e(()=>import(`./dist-CZjTtmTu.js`).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([12,10,1,2,3]),import.meta.url)}}),v.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return e(()=>import(`./dist-C2JHCt8U.js`).then(e=>e.wast()),__vite__mapDeps([23,1,2]),import.meta.url)}}),v.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return e(()=>import(`./dist-HmEpWUow.js`).then(e=>e.xml()),__vite__mapDeps([24,1,2]),import.meta.url)}}),v.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return e(()=>import(`./dist-DyrYcvpo2.js`).then(e=>e.yaml()),__vite__mapDeps([25,26,1,2]),import.meta.url)}}),v.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return e(()=>import(`./apl-gfMMiTNf.js`).then(e=>A(e.apl)),[],import.meta.url)}}),v.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return e(()=>import(`./asciiarmor-C_eisQCp.js`).then(e=>A(e.asciiArmor)),[],import.meta.url)}}),v.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return e(()=>import(`./asn1-DCl_8MCW.js`).then(e=>A(e.asn1({}))),[],import.meta.url)}}),v.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return e(()=>import(`./asterisk-BEn0Cwpx.js`).then(e=>A(e.asterisk)),[],import.meta.url)}}),v.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return e(()=>import(`./brainfuck-D5EjA2JK.js`).then(e=>A(e.brainfuck)),[],import.meta.url)}}),v.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return e(()=>import(`./cobol-DHLQUbN7.js`).then(e=>A(e.cobol)),[],import.meta.url)}}),v.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return e(()=>import(`./clike-D_6L3tnO.js`).then(e=>A(e.csharp)),[],import.meta.url)}}),v.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return e(()=>import(`./clojure-BflJGmDX.js`).then(e=>A(e.clojure)),[],import.meta.url)}}),v.of({name:`ClojureScript`,extensions:[`cljs`],load(){return e(()=>import(`./clojure-BflJGmDX.js`).then(e=>A(e.clojure)),[],import.meta.url)}}),v.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return e(()=>import(`./css-CnaYoQib.js`).then(e=>A(e.gss)),[],import.meta.url)}}),v.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return e(()=>import(`./cmake-84nbDH0I.js`).then(e=>A(e.cmake)),[],import.meta.url)}}),v.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return e(()=>import(`./coffeescript-De_zI4J0.js`).then(e=>A(e.coffeeScript)),[],import.meta.url)}}),v.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return e(()=>import(`./commonlisp-DgAKBe0r.js`).then(e=>A(e.commonLisp)),[],import.meta.url)}}),v.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return e(()=>import(`./cypher-p9eYesGn.js`).then(e=>A(e.cypher)),[],import.meta.url)}}),v.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return e(()=>import(`./python-B_1Jd8HM.js`).then(e=>A(e.cython)),[],import.meta.url)}}),v.of({name:`Crystal`,extensions:[`cr`],load(){return e(()=>import(`./crystal-Bsdphhtm.js`).then(e=>A(e.crystal)),[],import.meta.url)}}),v.of({name:`D`,extensions:[`d`],load(){return e(()=>import(`./d-DWkQyNnU.js`).then(e=>A(e.d)),[],import.meta.url)}}),v.of({name:`Dart`,extensions:[`dart`],load(){return e(()=>import(`./clike-D_6L3tnO.js`).then(e=>A(e.dart)),[],import.meta.url)}}),v.of({name:`diff`,extensions:[`diff`,`patch`],load(){return e(()=>import(`./diff-ChtP43wD.js`).then(e=>A(e.diff)),[],import.meta.url)}}),v.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return e(()=>import(`./dockerfile-DJkHQgkl.js`).then(e=>A(e.dockerFile)),__vite__mapDeps([27,28]),import.meta.url)}}),v.of({name:`DTD`,extensions:[`dtd`],load(){return e(()=>import(`./dtd-DTF72YNO.js`).then(e=>A(e.dtd)),[],import.meta.url)}}),v.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return e(()=>import(`./dylan-BCDoL_-p.js`).then(e=>A(e.dylan)),[],import.meta.url)}}),v.of({name:`EBNF`,load(){return e(()=>import(`./ebnf-D4c0_ac3.js`).then(e=>A(e.ebnf)),[],import.meta.url)}}),v.of({name:`ECL`,extensions:[`ecl`],load(){return e(()=>import(`./ecl-BVIeWmwY.js`).then(e=>A(e.ecl)),[],import.meta.url)}}),v.of({name:`edn`,extensions:[`edn`],load(){return e(()=>import(`./clojure-BflJGmDX.js`).then(e=>A(e.clojure)),[],import.meta.url)}}),v.of({name:`Eiffel`,extensions:[`e`],load(){return e(()=>import(`./eiffel-BEjRio4Q.js`).then(e=>A(e.eiffel)),[],import.meta.url)}}),v.of({name:`Elm`,extensions:[`elm`],load(){return e(()=>import(`./elm-Cshzl8qu.js`).then(e=>A(e.elm)),[],import.meta.url)}}),v.of({name:`Erlang`,extensions:[`erl`],load(){return e(()=>import(`./erlang-BV0c4Hdn.js`).then(e=>A(e.erlang)),[],import.meta.url)}}),v.of({name:`Esper`,load(){return e(()=>import(`./sql-DuQMFDvy.js`).then(e=>A(e.esper)),[],import.meta.url)}}),v.of({name:`Factor`,extensions:[`factor`],load(){return e(()=>import(`./factor-LKH5gN8L.js`).then(e=>A(e.factor)),__vite__mapDeps([29,28]),import.meta.url)}}),v.of({name:`FCL`,load(){return e(()=>import(`./fcl-ClOhbFR7.js`).then(e=>A(e.fcl)),[],import.meta.url)}}),v.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return e(()=>import(`./forth-Cezjo90N.js`).then(e=>A(e.forth)),[],import.meta.url)}}),v.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return e(()=>import(`./fortran-Bt6PBEDR.js`).then(e=>A(e.fortran)),[],import.meta.url)}}),v.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return e(()=>import(`./mllike-B45xgp2S.js`).then(e=>A(e.fSharp)),[],import.meta.url)}}),v.of({name:`Gas`,extensions:[`s`],load(){return e(()=>import(`./gas-BHEdbvp9.js`).then(e=>A(e.gas)),[],import.meta.url)}}),v.of({name:`Gherkin`,extensions:[`feature`],load(){return e(()=>import(`./gherkin-oBAE_ms0.js`).then(e=>A(e.gherkin)),[],import.meta.url)}}),v.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return e(()=>import(`./groovy-CUpZ7dEl.js`).then(e=>A(e.groovy)),[],import.meta.url)}}),v.of({name:`Haskell`,extensions:[`hs`],load(){return e(()=>import(`./haskell-BRsoo5mP.js`).then(e=>A(e.haskell)),[],import.meta.url)}}),v.of({name:`Haxe`,extensions:[`hx`],load(){return e(()=>import(`./haxe-DjVOVvNP.js`).then(e=>A(e.haxe)),[],import.meta.url)}}),v.of({name:`HXML`,extensions:[`hxml`],load(){return e(()=>import(`./haxe-DjVOVvNP.js`).then(e=>A(e.hxml)),[],import.meta.url)}}),v.of({name:`HTTP`,load(){return e(()=>import(`./http-CLVgA2GD.js`).then(e=>A(e.http)),[],import.meta.url)}}),v.of({name:`IDL`,extensions:[`pro`],load(){return e(()=>import(`./idl-BUZw3wgd.js`).then(e=>A(e.idl)),[],import.meta.url)}}),v.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return e(()=>import(`./javascript-BWjar7HY.js`).then(e=>A(e.jsonld)),__vite__mapDeps([30,31]),import.meta.url)}}),v.of({name:`Julia`,extensions:[`jl`],load(){return e(()=>import(`./julia-CQfgDRfP.js`).then(e=>A(e.julia)),[],import.meta.url)}}),v.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return e(()=>import(`./clike-D_6L3tnO.js`).then(e=>A(e.kotlin)),[],import.meta.url)}}),v.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return e(()=>import(`./livescript-BXxG0Yva.js`).then(e=>A(e.liveScript)),[],import.meta.url)}}),v.of({name:`Lua`,extensions:[`lua`],load(){return e(()=>import(`./lua-CL1SqxuB.js`).then(e=>A(e.lua)),[],import.meta.url)}}),v.of({name:`mIRC`,extensions:[`mrc`],load(){return e(()=>import(`./mirc-C9zpzAZU.js`).then(e=>A(e.mirc)),[],import.meta.url)}}),v.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return e(()=>import(`./mathematica-u8YMmbU0.js`).then(e=>A(e.mathematica)),[],import.meta.url)}}),v.of({name:`Modelica`,extensions:[`mo`],load(){return e(()=>import(`./modelica-CqHI_q-D.js`).then(e=>A(e.modelica)),[],import.meta.url)}}),v.of({name:`MUMPS`,extensions:[`mps`],load(){return e(()=>import(`./mumps-BSzj6Xyz.js`).then(e=>A(e.mumps)),[],import.meta.url)}}),v.of({name:`Mbox`,extensions:[`mbox`],load(){return e(()=>import(`./mbox-BEMVcqjs.js`).then(e=>A(e.mbox)),[],import.meta.url)}}),v.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return e(()=>import(`./nginx-BMaDbqW3.js`).then(e=>A(e.nginx)),[],import.meta.url)}}),v.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return e(()=>import(`./nsis-CfSuhXs5.js`).then(e=>A(e.nsis)),__vite__mapDeps([32,28]),import.meta.url)}}),v.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return e(()=>import(`./ntriples-B9h1VB_g.js`).then(e=>A(e.ntriples)),[],import.meta.url)}}),v.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return e(()=>import(`./clike-D_6L3tnO.js`).then(e=>A(e.objectiveC)),[],import.meta.url)}}),v.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return e(()=>import(`./clike-D_6L3tnO.js`).then(e=>A(e.objectiveCpp)),[],import.meta.url)}}),v.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return e(()=>import(`./mllike-B45xgp2S.js`).then(e=>A(e.oCaml)),[],import.meta.url)}}),v.of({name:`Octave`,extensions:[`m`],load(){return e(()=>import(`./octave-D2Q8cUp1.js`).then(e=>A(e.octave)),[],import.meta.url)}}),v.of({name:`Oz`,extensions:[`oz`],load(){return e(()=>import(`./oz-BwTct_5T.js`).then(e=>A(e.oz)),[],import.meta.url)}}),v.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return e(()=>import(`./pascal-Dp_KdFgX.js`).then(e=>A(e.pascal)),[],import.meta.url)}}),v.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return e(()=>import(`./perl-BkSkiI9m.js`).then(e=>A(e.perl)),[],import.meta.url)}}),v.of({name:`Pig`,extensions:[`pig`],load(){return e(()=>import(`./pig-AF4Hwhju.js`).then(e=>A(e.pig)),[],import.meta.url)}}),v.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return e(()=>import(`./powershell-BcIto6Sf.js`).then(e=>A(e.powerShell)),[],import.meta.url)}}),v.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return e(()=>import(`./properties-C357ku5U.js`).then(e=>A(e.properties)),[],import.meta.url)}}),v.of({name:`ProtoBuf`,extensions:[`proto`],load(){return e(()=>import(`./protobuf-D1ij_kNL.js`).then(e=>A(e.protobuf)),[],import.meta.url)}}),v.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return e(()=>import(`./pug-Wky5Dnfy.js`).then(e=>A(e.pug)),__vite__mapDeps([33,31]),import.meta.url)}}),v.of({name:`Puppet`,extensions:[`pp`],load(){return e(()=>import(`./puppet-BZyAS7I4.js`).then(e=>A(e.puppet)),[],import.meta.url)}}),v.of({name:`Q`,extensions:[`q`],load(){return e(()=>import(`./q-B9NhS7L_.js`).then(e=>A(e.q)),[],import.meta.url)}}),v.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return e(()=>import(`./r-CxDmU1I4.js`).then(e=>A(e.r)),[],import.meta.url)}}),v.of({name:`RPM Changes`,load(){return e(()=>import(`./rpm-gpDK5sbt.js`).then(e=>A(e.rpmChanges)),[],import.meta.url)}}),v.of({name:`RPM Spec`,extensions:[`spec`],load(){return e(()=>import(`./rpm-gpDK5sbt.js`).then(e=>A(e.rpmSpec)),[],import.meta.url)}}),v.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return e(()=>import(`./ruby-BjXV7-Qa.js`).then(e=>A(e.ruby)),[],import.meta.url)}}),v.of({name:`SAS`,extensions:[`sas`],load(){return e(()=>import(`./sas-C2OyD2Y6.js`).then(e=>A(e.sas)),[],import.meta.url)}}),v.of({name:`Scala`,extensions:[`scala`],load(){return e(()=>import(`./clike-D_6L3tnO.js`).then(e=>A(e.scala)),[],import.meta.url)}}),v.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return e(()=>import(`./scheme-D9qYN0V5.js`).then(e=>A(e.scheme)),[],import.meta.url)}}),v.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return e(()=>import(`./shell-DwuoZtxw.js`).then(e=>A(e.shell)),[],import.meta.url)}}),v.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return e(()=>import(`./sieve-BAxa3IjF.js`).then(e=>A(e.sieve)),[],import.meta.url)}}),v.of({name:`Smalltalk`,extensions:[`st`],load(){return e(()=>import(`./smalltalk-BLp5-jwC.js`).then(e=>A(e.smalltalk)),[],import.meta.url)}}),v.of({name:`Solr`,load(){return e(()=>import(`./solr-BBopId9w.js`).then(e=>A(e.solr)),[],import.meta.url)}}),v.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return e(()=>import(`./mllike-B45xgp2S.js`).then(e=>A(e.sml)),[],import.meta.url)}}),v.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return e(()=>import(`./sparql-Dz-mlCAC.js`).then(e=>A(e.sparql)),[],import.meta.url)}}),v.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return e(()=>import(`./spreadsheet-CTIncYxj.js`).then(e=>A(e.spreadsheet)),[],import.meta.url)}}),v.of({name:`Squirrel`,extensions:[`nut`],load(){return e(()=>import(`./clike-D_6L3tnO.js`).then(e=>A(e.squirrel)),[],import.meta.url)}}),v.of({name:`Stylus`,extensions:[`styl`],load(){return e(()=>import(`./stylus-BOVgKnng.js`).then(e=>A(e.stylus)),[],import.meta.url)}}),v.of({name:`Swift`,extensions:[`swift`],load(){return e(()=>import(`./swift-DKB6_1j6.js`).then(e=>A(e.swift)),[],import.meta.url)}}),v.of({name:`sTeX`,load(){return e(()=>import(`./stex-DNzd62Q_.js`).then(e=>A(e.stex)),[],import.meta.url)}}),v.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return e(()=>import(`./stex-DNzd62Q_.js`).then(e=>A(e.stex)),[],import.meta.url)}}),v.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return e(()=>import(`./verilog-7LoJAqYT.js`).then(e=>A(e.verilog)),[],import.meta.url)}}),v.of({name:`Tcl`,extensions:[`tcl`],load(){return e(()=>import(`./tcl-BGfruO1u.js`).then(e=>A(e.tcl)),[],import.meta.url)}}),v.of({name:`Textile`,extensions:[`textile`],load(){return e(()=>import(`./textile-C4jVoHG1.js`).then(e=>A(e.textile)),[],import.meta.url)}}),v.of({name:`TiddlyWiki`,load(){return e(()=>import(`./tiddlywiki-VlUiK86J.js`).then(e=>A(e.tiddlyWiki)),[],import.meta.url)}}),v.of({name:`Tiki wiki`,load(){return e(()=>import(`./tiki-AK6FwT8q.js`).then(e=>A(e.tiki)),[],import.meta.url)}}),v.of({name:`TOML`,extensions:[`toml`],load(){return e(()=>import(`./toml-BPTmHmyx.js`).then(e=>A(e.toml)),[],import.meta.url)}}),v.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return e(()=>import(`./troff-C2dAgh7P.js`).then(e=>A(e.troff)),[],import.meta.url)}}),v.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return e(()=>import(`./ttcn-PPSTk1ow.js`).then(e=>A(e.ttcn)),[],import.meta.url)}}),v.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return e(()=>import(`./ttcn-cfg-2b4Gb5sE.js`).then(e=>A(e.ttcnCfg)),[],import.meta.url)}}),v.of({name:`Turtle`,extensions:[`ttl`],load(){return e(()=>import(`./turtle-Cx3rYX2g.js`).then(e=>A(e.turtle)),[],import.meta.url)}}),v.of({name:`Web IDL`,extensions:[`webidl`],load(){return e(()=>import(`./webidl-D5jiJvOU.js`).then(e=>A(e.webIDL)),[],import.meta.url)}}),v.of({name:`VB.NET`,extensions:[`vb`],load(){return e(()=>import(`./vb-BthdM_4N.js`).then(e=>A(e.vb)),[],import.meta.url)}}),v.of({name:`VBScript`,extensions:[`vbs`],load(){return e(()=>import(`./vbscript-D9f6rSsU.js`).then(e=>A(e.vbScript)),[],import.meta.url)}}),v.of({name:`Velocity`,extensions:[`vtl`],load(){return e(()=>import(`./velocity-CqftRsjg.js`).then(e=>A(e.velocity)),[],import.meta.url)}}),v.of({name:`Verilog`,extensions:[`v`],load(){return e(()=>import(`./verilog-7LoJAqYT.js`).then(e=>A(e.verilog)),[],import.meta.url)}}),v.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return e(()=>import(`./vhdl-kS471soi.js`).then(e=>A(e.vhdl)),[],import.meta.url)}}),v.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return e(()=>import(`./xquery-BKJx4mf9.js`).then(e=>A(e.xQuery)),[],import.meta.url)}}),v.of({name:`Yacas`,extensions:[`ys`],load(){return e(()=>import(`./yacas-CXXgtw0p.js`).then(e=>A(e.yacas)),[],import.meta.url)}}),v.of({name:`Z80`,extensions:[`z80`],load(){return e(()=>import(`./z80-Co3PbHdE.js`).then(e=>A(e.z80)),[],import.meta.url)}}),v.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return e(()=>import(`./mscgen-qgSLujhx.js`).then(e=>A(e.mscgen)),[],import.meta.url)}}),v.of({name:`Xù`,extensions:[`xu`],load(){return e(()=>import(`./mscgen-qgSLujhx.js`).then(e=>A(e.xu)),[],import.meta.url)}}),v.of({name:`MsGenny`,extensions:[`msgenny`],load(){return e(()=>import(`./mscgen-qgSLujhx.js`).then(e=>A(e.msgenny)),[],import.meta.url)}}),v.of({name:`Vue`,extensions:[`vue`],load(){return e(()=>import(`./dist-Drp8uu5J.js`).then(e=>e.vue()),__vite__mapDeps([34,1,2,9,6,10,3]),import.meta.url)}}),v.of({name:`Angular Template`,load(){return e(()=>import(`./dist-3bgCp7iY.js`).then(e=>e.angular()),__vite__mapDeps([35,1,2,9,6,10,3]),import.meta.url)}})],dt=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,M=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(dt(e)):dt,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return te(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=m(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=ve(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n,a=!0;;e++){let n=r.charCodeAt(e),o=this.match(n,i,a,this.bufferPos+this.bufferStart,e==r.length-1);if(o)return this.value=o,this;if(e==r.length-1)break;a&&e<t.length&&t.charCodeAt(e)==n?i++:a=!1}}}match(e,t,n,r,i){let a=null;for(let t=0;t<this.matches.length;){let n=this.matches[t],o=!1;this.query.charCodeAt(n.index)==e&&(n.index==this.query.length-1?a={from:n.from,to:r,precise:i&&n.precise}:(n.index++,o=!0)),o?t++:this.matches.splice(t,1)}return this.query.charCodeAt(0)==e&&(this.query.length==1?a={from:t,to:r,precise:n&&i}:this.matches.push({from:t,index:1,precise:n})),a&&this.test&&!this.test(a.from,a.to,this.buffer,this.bufferStart)&&(a=null),a}};typeof Symbol<`u`&&(M.prototype[Symbol.iterator]=function(){return this});var ft={from:-1,to:-1,match:/.*/.exec(``),precise:!0},pt=`gm`+(/x/.unicode==null?``:`u`),mt=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=ft,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new _t(e,t,n,r,i);this.re=new RegExp(t,pt+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter();let a=e.lineAt(r);this.curLineStart=a.from,this.matchPos=N(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=N(this.text,r+ +(n==r)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},ht=new WeakMap,gt=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=ht.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return ht.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),ht.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},_t=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=ft,this.matchPos=N(e,r),this.re=new RegExp(t,pt+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=gt.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,precise:!0,match:t},this.matchPos=N(this.text,n+ +(e==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=gt.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(mt.prototype[Symbol.iterator]=_t.prototype[Symbol.iterator]=function(){return this});function vt(e){try{return new RegExp(e,pt),!0}catch{return!1}}function N(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}var yt=e=>{let{state:n}=e,r=String(n.doc.lineAt(e.state.selection.main.head).number),{close:i,result:a}=t(e,{label:n.phrase(`Go to line`),input:{type:`text`,name:`line`,value:r},focus:!0,submitLabel:n.phrase(`go`)});return a.then(t=>{let r=t&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.elements.line.value);if(!r){e.dispatch({effects:i});return}let a=n.doc.lineAt(n.selection.main.head),[,o,s,c,u]=r,d=c?+c.slice(1):0,f=s?+s:a.number;if(s&&u){let e=f/100;o&&(e=e*(o==`-`?-1:1)+a.number/n.doc.lines),f=Math.round(n.doc.lines*e)}else s&&o&&(f=f*(o==`-`?-1:1)+a.number);let p=n.doc.line(Math.max(1,Math.min(n.doc.lines,f))),m=y.cursor(p.from+Math.max(0,Math.min(d,p.length)));e.dispatch({effects:[i,l.scrollIntoView(m.from,{y:`center`})],selection:m})}),!0},bt={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},xt=w.define({combine(e){return p(e,bt,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function St(e){let t=[Ot,Dt];return e&&t.push(xt.of(e)),t}var Ct=i.mark({class:`cm-selectionMatch`}),wt=i.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function Tt(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=C.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=C.Word)}function Et(e,t,n,r){return e(t.sliceDoc(n,n+1))==C.Word&&e(t.sliceDoc(r-1,r))==C.Word}var Dt=f.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(xt),{state:n}=e,r=n.selection;if(r.ranges.length>1)return i.none;let a=r.main,o,s=null;if(a.empty){if(!t.highlightWordAroundCursor)return i.none;let e=n.wordAt(a.head);if(!e)return i.none;s=n.charCategorizer(a.head),o=n.sliceDoc(e.from,e.to)}else{let e=a.to-a.from;if(e<t.minSelectionLength||e>200)return i.none;if(t.wholeWords){if(o=n.sliceDoc(a.from,a.to),s=n.charCategorizer(a.head),!(Tt(s,n,a.from,a.to)&&Et(s,n,a.from,a.to)))return i.none}else if(o=n.sliceDoc(a.from,a.to),!o)return i.none}let c=[];for(let r of e.visibleRanges){let e=new M(n.doc,o,r.from,r.to);for(;!e.next().done;){let{from:r,to:o}=e.value;if((!s||Tt(s,n,r,o))&&(a.empty&&r<=a.from&&o>=a.to?c.push(wt.range(r,o)):(r>=a.to||o<=a.from)&&c.push(Ct.range(r,o)),c.length>t.maxMatches))return i.none}}return i.set(c)}},{decorations:e=>e.decorations}),Ot=l.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),kt=({state:e,dispatch:t})=>{let{selection:n}=e,r=y.create(n.ranges.map(t=>e.wordAt(t.head)||y.cursor(t.head)),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)};function At(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new M(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new M(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var jt=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return kt({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=At(e,r);return i?(t(e.update({selection:e.selection.addRange(y.range(i.from,i.to),!1),effects:l.scrollIntoView(i.to)})),!0):!1},P=w.define({combine(e){return p(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new rn(e),scrollToMatch:e=>l.scrollIntoView(e)})}}),Mt=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||vt(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`
3
+ `:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new Bt(this):new It(this)}getCursor(e,t=0,n){let r=e.doc?e:x.create({doc:e});return n??=r.doc.length,this.regexp?I(this,r,t,n):F(this,r,t,n)}},Nt=class{constructor(e){this.spec=e}};function Pt(e,t,n){return(r,i,a,o)=>n&&!n(r,i,a,o)?!1:e(r>=o&&i<=o+a.length?a.slice(r-o,i-o):t.doc.sliceString(r,i),t,r,i)}function F(e,t,n,r){let i;return e.wholeWord&&(i=Ft(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=Pt(e.test,t,i)),new M(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),i)}function Ft(e,t){return(n,r,i,a)=>((a>n||a+i.length<r)&&(a=Math.max(0,n-2),i=e.sliceString(a,Math.min(e.length,r+2))),(t(Rt(i,n-a))!=C.Word||t(L(i,n-a))!=C.Word)&&(t(L(i,r-a))!=C.Word||t(Rt(i,r-a))!=C.Word))}var It=class extends Nt{constructor(e){super(e)}nextMatch(e,t,n){let r=F(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=F(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=F(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=F(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=F(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function Lt(e,t,n){return(r,i,a)=>(!n||n(r,i,a))&&e(a[0],t,r,i)}function I(e,t,n,r){let i;return e.wholeWord&&(i=zt(t.charCategorizer(t.selection.main.head))),e.test&&(i=Lt(e.test,t,i)),new mt(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}function Rt(e,t){return e.slice(_e(e,t,!1),t)}function L(e,t){return e.slice(t,_e(e,t))}function zt(e){return(t,n,r)=>!r[0].length||(e(Rt(r.input,r.index))!=C.Word||e(L(r.input,r.index))!=C.Word)&&(e(L(r.input,r.index+r[0].length))!=C.Word||e(Rt(r.input,r.index+r[0].length))!=C.Word)}var Bt=class extends Nt{nextMatch(e,t,n){let r=I(this.spec,e,n,e.doc.length).next();return r.done&&(r=I(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=I(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=I(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=I(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},R=b.define(),Vt=b.define(),z=ee.define({create(e){return new Wt(U(e).create(),null)},update(e,t){for(let n of t.effects)n.is(R)?e=new Wt(n.value.create(),e.panel):n.is(Vt)&&(e=new Wt(e.query,n.value?Qt:null));return e},provide:e=>re.from(e,e=>e.panel)});function Ht(e){let t=e.field(z,!1);return t?t.query.spec:U(e)}function Ut(e){return e.field(z,!1)?.panel!=null}var Wt=class{constructor(e,t){this.query=e,this.panel=t}},Gt=i.mark({class:`cm-searchMatch`}),Kt=i.mark({class:`cm-searchMatch cm-searchMatch-selected`}),qt=f.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(z))}update(e){let t=e.state.field(z);(t!=e.startState.field(z)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return i.none;let{view:n}=this,r=new ce;for(let t=0,i=n.visibleRanges,a=i.length;t<a;t++){let{from:o,to:s}=i[t];for(;t<a-1&&s>i[t+1].from-500;)s=i[++t].to;e.highlight(n.state,o,s,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?Kt:Gt)})}return r.finish()}},{decorations:e=>e.decorations});function B(e){return t=>{let n=t.state.field(z,!1);return n&&n.query.spec.valid?e(t,n):W(t)}}var V=B((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=y.single(r.from,r.to),a=e.state.facet(P);return e.dispatch({selection:i,effects:[an(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),en(e),!0}),H=B((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=y.single(i.from,i.to),o=e.state.facet(P);return e.dispatch({selection:a,effects:[an(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),en(e),!0}),Jt=B((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:y.create(n.map(e=>y.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),Yt=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new M(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(y.range(t.value.from,t.value.to))}return t(e.update({selection:y.create(a,o),userEvent:`select.search.matches`})),!0},Xt=B((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,u,d=[];o.precise?o.from==r&&o.to==i&&(u=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:u}),o=t.nextMatch(n,o.from,o.to),d.push(l.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`))):o=t.nextMatch(n,o.from,o.to);let f=e.state.changes(s);return o&&(c=y.single(o.from,o.to).map(f),d.push(an(e,o)),d.push(n.facet(P).scrollToMatch(c.main,e))),e.dispatch({changes:f,selection:c,effects:d,userEvent:`input.replace`}),!0}),Zt=B((e,{query:t})=>{if(e.state.readOnly)return!1;let n=[];for(let r of t.matchAll(e.state,1e9)){let{from:e,to:i,precise:a}=r;a&&n.push({from:e,to:i,insert:t.getReplacement(r)})}if(!n.length)return!1;let r=e.state.phrase(`replaced $ matches`,n.length)+`.`;return e.dispatch({changes:n,effects:l.announce.of(r),userEvent:`input.replace.all`}),!0});function Qt(e){return e.state.facet(P).createPanel(e)}function U(e,t){let n=e.selection.main,r=n.empty||n.to>n.from+100?``:e.sliceDoc(n.from,n.to);if(t&&!r)return t;let i=e.facet(P);return new Mt({search:t?.literal??i.literal?r:r.replace(/\n/g,`\\n`),caseSensitive:t?.caseSensitive??i.caseSensitive,literal:t?.literal??i.literal,regexp:t?.regexp??i.regexp,wholeWord:t?.wholeWord??i.wholeWord})}function $t(e){let t=o(e,Qt);return t&&t.dom.querySelector(`[main-field]`)}function en(e){let t=$t(e);t&&t==e.root.activeElement&&t.select()}var W=e=>{let t=e.state.field(z,!1);if(t&&t.panel){let n=$t(e);if(n&&n!=e.root.activeElement){let r=U(e.state,t.query.spec);r.valid&&e.dispatch({effects:R.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[Vt.of(!0),t?R.of(U(e.state,t.query.spec)):b.appendConfig.of(sn)]});return!0},tn=e=>{let t=e.state.field(z,!1);if(!t||!t.panel)return!1;let n=o(e,Qt);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:Vt.of(!1)}),!0},nn=[{key:`Mod-f`,run:W,scope:`editor search-panel`},{key:`F3`,run:V,shift:H,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:V,shift:H,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:tn,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:Yt},{key:`Mod-Alt-g`,run:yt},{key:`Mod-d`,run:jt,preventDefault:!0}],rn=class{constructor(e){this.view=e;let t=this.query=e.state.field(z).query.spec;this.commit=this.commit.bind(this),this.searchField=S(`input`,{value:t.search,placeholder:G(e,`Find`),"aria-label":G(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=S(`input`,{value:t.replace,placeholder:G(e,`Replace`),"aria-label":G(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=S(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=S(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=S(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return S(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=S(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>V(e),[G(e,`next`)]),n(`prev`,()=>H(e),[G(e,`previous`)]),n(`select`,()=>Jt(e),[G(e,`all`)]),S(`label`,null,[this.caseField,G(e,`match case`)]),S(`label`,null,[this.reField,G(e,`regexp`)]),S(`label`,null,[this.wordField,G(e,`by word`)]),...e.state.readOnly?[]:[S(`br`),this.replaceField,n(`replace`,()=>Xt(e),[G(e,`replace`)]),n(`replaceAll`,()=>Zt(e),[G(e,`replace all`)])],S(`button`,{name:`close`,onclick:()=>tn(e),"aria-label":G(e,`close`),type:`button`},[`×`])])}commit(){let e=new Mt({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:R.of(e)}))}keydown(e){d(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?H:V)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Xt(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(R)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(P).top}};function G(e,t){return e.state.phrase(t)}var K=30,q=/[\s\.,:;?!]/;function an(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,a=Math.max(r.from,t-K),o=Math.min(i,n+K),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;e<K;e++)if(!q.test(s[e+1])&&q.test(s[e])){s=s.slice(e);break}}if(o!=i){for(let e=s.length-1;e>s.length-K;e--)if(!q.test(s[e-1])&&q.test(s[e])){s=s.slice(0,e);break}}return l.announce.of(`${e.state.phrase(`current match`)}. ${s} ${e.state.phrase(`on line`)} ${r.number}.`)}var on=l.baseTheme({".cm-panel.cm-search":{padding:`2px 6px 4px`,position:`relative`,"& [name=close]":{position:`absolute`,top:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0},"& input, & button, & label":{margin:`.2em .6em .2em 0`},"& input[type=checkbox]":{marginRight:`.2em`},"& label":{fontSize:`80%`,whiteSpace:`pre`}},"&light .cm-searchMatch":{backgroundColor:`#ffff0054`},"&dark .cm-searchMatch":{backgroundColor:`#00ffff8a`},"&light .cm-searchMatch-selected":{backgroundColor:`#ff6a0054`},"&dark .cm-searchMatch-selected":{backgroundColor:`#ff00ff8a`}}),sn=[z,ae.low(qt),on],cn=`#e5c07b`,ln=`#e06c75`,un=`#56b6c2`,dn=`#ffffff`,J=`#abb2bf`,fn=`#7d8799`,pn=`#61afef`,mn=`#98c379`,hn=`#d19a66`,gn=`#c678dd`,_n=`#21252b`,vn=`#2c313a`,yn=`#282c34`,bn=`#353a42`,xn=`#3E4451`,Sn=`#528bff`,Cn=l.theme({"&":{color:J,backgroundColor:yn},".cm-content":{caretColor:Sn},".cm-cursor, .cm-dropCursor":{borderLeftColor:Sn},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:xn},".cm-panels":{backgroundColor:_n,color:J},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:yn,color:fn,border:`none`},".cm-activeLineGutter":{backgroundColor:vn},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:bn},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:bn,borderBottomColor:bn},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:vn,color:J}}},{dark:!0}),wn=me.define([{tag:u.keyword,color:gn},{tag:[u.name,u.deleted,u.character,u.propertyName,u.macroName],color:ln},{tag:[u.function(u.variableName),u.labelName],color:pn},{tag:[u.color,u.constant(u.name),u.standard(u.name)],color:hn},{tag:[u.definition(u.name),u.separator],color:J},{tag:[u.typeName,u.className,u.number,u.changed,u.annotation,u.modifier,u.self,u.namespace],color:cn},{tag:[u.operator,u.operatorKeyword,u.url,u.escape,u.regexp,u.link,u.special(u.string)],color:un},{tag:[u.meta,u.comment],color:fn},{tag:u.strong,fontWeight:`bold`},{tag:u.emphasis,fontStyle:`italic`},{tag:u.strikethrough,textDecoration:`line-through`},{tag:u.link,color:fn,textDecoration:`underline`},{tag:u.heading,fontWeight:`bold`,color:ln},{tag:[u.atom,u.bool,u.special(u.variableName)],color:hn},{tag:[u.processingInstruction,u.string,u.inserted],color:mn},{tag:u.invalid,color:dn}]),Tn=[Cn,n(wn)],En=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:ze(this.yanchor),yhead:ze(this.yhead)}}static fromJSON(t){return new e(E(t.yanchor),E(t.yhead))}},Dn=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new Ue(e)}toYPos(e,t=0){return k(this.ytext,e,t)}fromYPos(e){let t=T(E(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new En(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?y.cursor(n.pos,n.assoc):y.range(t.pos,n.pos)}},Y=w.define({combine(e){return e[e.length-1]}}),On=fe.define(),kn=class{constructor(e){this.view=e,this.conf=e.state.facet(Y),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[On.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(On)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
4
+ `);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},An=f.fromClass(kn),jn=l.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),Mn=fe.define(),Nn=class extends ye{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return Be(`span`,[We(`class`,`cm-ySelectionCaret`),We(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[O(`⁠`),Be(`div`,[We(`class`,`cm-ySelectionCaretDot`)]),O(`⁠`),Be(`div`,[We(`class`,`cm-ySelectionInfo`)],[O(this.name)]),O(`⁠`)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},Pn=class{constructor(e){this.conf=e.state.facet(Y),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[Mn.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=ue.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let t=this.conf.ytext,n=t.doc,r=this.conf.awareness,a=[],o=this.conf.awareness.getLocalState();if(o!=null){let n=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),i=n?e.state.selection.main:null,a=o.cursor==null?null:E(o.cursor.anchor),s=o.cursor==null?null:E(o.cursor.head);if(i!=null){let e=k(t,i.anchor),n=k(t,i.head);(o.cursor==null||!qe(a,e)||!qe(s,n))&&r.setLocalStateField(`cursor`,{anchor:e,head:n})}else o.cursor!=null&&n&&r.setLocalStateField(`cursor`,null)}r.getStates().forEach((o,s)=>{if(s===r.doc.clientID)return;let c=o.cursor;if(c==null||c.anchor==null||c.head==null)return;let l=T(c.anchor,n),u=T(c.head,n);if(l==null||u==null||l.type!==t||u.type!==t)return;let{color:d=`#30bced`,name:f=`Anonymous`}=o.user||{},p=o.user&&o.user.colorLight||d+`33`,m=Ve(l.index,u.index),h=He(l.index,u.index),g=e.view.state.doc.lineAt(m),_=e.view.state.doc.lineAt(h);if(g.number===_.number)a.push({from:m,to:h,value:i.mark({attributes:{style:`background-color: ${p}`},class:`cm-ySelection`})});else{a.push({from:m,to:g.from+g.length,value:i.mark({attributes:{style:`background-color: ${p}`},class:`cm-ySelection`})}),a.push({from:_.from,to:h,value:i.mark({attributes:{style:`background-color: ${p}`},class:`cm-ySelection`})});for(let t=g.number+1;t<_.number;t++){let n=e.view.state.doc.line(t).from;a.push({from:n,to:n,value:i.line({attributes:{style:`background-color: ${p}`,class:`cm-yLineSelection`}})})}}a.push({from:u.index,to:u.index,value:i.widget({side:u.index-l.index>0?-1:1,block:!1,widget:new Nn(d,f)})})}),this.decorations=i.set(a,!0)}},Fn=f.fromClass(Pn,{decorations:e=>e.decorations}),In=()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else n!==void 0&&n()}},Ln=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},X=w.define({combine(e){return e[e.length-1]}});fe.define();var Rn=class{constructor(e){this.view=e,this.conf=e.state.facet(X),this._undoManager=this.conf.undoManager,this.syncConf=e.state.facet(Y),this._beforeChangeSelection=null,this._mux=In(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:t})=>{let n=t.meta.get(this);if(n){let t=this.syncConf.fromYRange(n);e.dispatch(e.state.update({selection:t,effects:[l.scrollIntoView(t)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(On)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},zn=f.fromClass(Rn),Bn=({state:e,dispatch:t})=>e.facet(X).undo()||!0,Vn=({state:e,dispatch:t})=>e.facet(X).redo()||!0,Hn=(e,t,{undoManager:n=new Ue(e)}={})=>{let r=new Dn(e,t),i=[Y.of(r),An];return t&&i.push(jn,Fn),n!==!1&&i.push(X.of(new Ln(n)),zn,l.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?Bn(t):e.inputType===`historyRedo`&&Vn(t)}})),i},Un=Object.freeze({bold:`bold text`,code:`code`,italic:`emphasis`,strikethrough:`struck text`}),Wn=`link text`,Gn=`https://`,Kn=`alt text`,qn=`https://`,Jn=`Video`,Yn=`https://`,Xn=`code`,Zn=Object.freeze([`Column 1`,`Column 2`]),Qn=`Value`,Z=Object.freeze({heading:/^#{1,6}\s+/,quote:/^>\s+/,bulletList:/^[-*+]\s+/,numberedList:/^\d+\.\s+/,taskList:/^-\s\[(?: |x|X)\]\s+/});function $n(e,t){return{from:Math.max(0,Math.min(e.from,e.to,t)),to:Math.max(0,Math.min(Math.max(e.from,e.to),t))}}function er(e,t){return t===0||e[t-1]===`
5
+ `}function tr(e,t){if(t<=0)return 0;let n=e.lastIndexOf(`
6
+ `,t-1);return n<0?0:n+1}function nr(e,t){let n=e.indexOf(`
7
+ `,t);return n<0?e.length:n}function rr(e,t){let{from:n}=t,{to:r}=t;return r>n&&er(e,r)&&--r,{from:tr(e,n),to:nr(e,Math.max(n,r))}}function ir(e,t,n,r){let i=e.slice(t.from,t.to);if(i.length>n.length*2&&i.startsWith(n)&&i.endsWith(n)){let e=i.slice(n.length,i.length-n.length);return{anchor:t.from,from:t.from,head:t.from+e.length,insert:e,to:t.to}}return i.length>0?{anchor:t.from+n.length,from:t.from,head:t.from+n.length+i.length,insert:`${n}${i}${n}`,to:t.to}:{anchor:t.from+n.length,from:t.from,head:t.from+n.length+r.length,insert:`${n}${r}${n}`,to:t.to}}function ar(e){return/^https?:\/\//i.test(e.trim())}function or(e,t){let n=e.slice(t.from,t.to);if(n.length>0&&ar(n))return{anchor:t.from+1,from:t.from,head:t.from+1+9,insert:`[${Wn}](${n})`,to:t.to};if(n.length>0){let e=`[${n}](`;return{anchor:t.from+e.length,from:t.from,head:t.from+e.length+8,insert:`${e}${Gn})`,to:t.to}}return{anchor:t.from+1,from:t.from,head:t.from+1+9,insert:`[${Wn}](${Gn})`,to:t.to}}function sr(e,t){let n=e.slice(t.from,t.to);if(n.length>0&&ar(n))return{anchor:t.from+2,from:t.from,head:t.from+2+8,insert:`![${Kn}](${n})`,to:t.to};if(n.length>0){let e=`![${n}](`;return{anchor:t.from+e.length,from:t.from,head:t.from+e.length+8,insert:`${e}${qn})`,to:t.to}}return{anchor:t.from+2,from:t.from,head:t.from+2+8,insert:`![${Kn}](${qn})`,to:t.to}}function cr(e,t){let n=e.slice(t.from,t.to);if(n.length>0&&ar(n))return{anchor:t.from+2,from:t.from,head:t.from+2+5,insert:`![${Jn}](${n})`,to:t.to};if(n.length>0){let e=`![${n}](`;return{anchor:t.from+e.length,from:t.from,head:t.from+e.length+8,insert:`${e}${Yn})`,to:t.to}}return{anchor:t.from+2,from:t.from,head:t.from+2+5,insert:`![${Jn}](${Yn})`,to:t.to}}function lr(e){return Z.taskList.test(e)?e.replace(Z.taskList,``):Z.numberedList.test(e)?e.replace(Z.numberedList,``):Z.bulletList.test(e)?e.replace(Z.bulletList,``):Z.quote.test(e)?e.replace(Z.quote,``):Z.heading.test(e)?e.replace(Z.heading,``):e}function ur(e,t){switch(t){case`paragraph`:return!(Z.taskList.test(e)||Z.numberedList.test(e)||Z.bulletList.test(e)||Z.quote.test(e)||Z.heading.test(e));case`heading-1`:return/^#\s+/.test(e);case`heading-2`:return/^##\s+/.test(e);case`heading-3`:return/^###\s+/.test(e);case`heading-4`:return/^####\s+/.test(e);case`heading-5`:return/^#####\s+/.test(e);case`heading-6`:return/^######\s+/.test(e);case`quote`:return Z.quote.test(e);case`bullet-list`:return Z.bulletList.test(e)&&!Z.taskList.test(e);case`numbered-list`:return Z.numberedList.test(e);case`task-list`:return Z.taskList.test(e);default:return!1}}function dr(e,t){switch(e){case`heading-1`:return`# `;case`heading-2`:return`## `;case`heading-3`:return`### `;case`heading-4`:return`#### `;case`heading-5`:return`##### `;case`heading-6`:return`###### `;case`quote`:return`> `;case`bullet-list`:return`- `;case`numbered-list`:return`${t+1}. `;case`task-list`:return`- [ ] `;default:return``}}function Q(e,t,n){let r=rr(e,t),i=e.slice(r.from,r.to).split(`
8
+ `),a=i.filter(e=>e.trim().length>0),o=n!==`paragraph`&&a.length>0&&a.every(e=>ur(e,n))?`paragraph`:n,s=0,c=i.map(e=>{if(e.trim().length===0)return e;let t=lr(e);if(o===`paragraph`)return t;let n=dr(o,s);return s+=1,`${n}${t}`});return{anchor:r.from,from:r.from,head:r.from+c.join(`
9
+ `).length,insert:c.join(`
10
+ `),to:r.to}}function $(e,t,n){return Q(e,t,`heading-${n}`)}function fr(e,t){return Q(e,t,`bullet-list`)}function pr(e,t){return Q(e,t,`quote`)}function mr(e,t){return Q(e,t,`task-list`)}function hr(e,t){return Q(e,t,`numbered-list`)}function gr(e,t){let n=rr(e,t),r=_r(e.slice(n.from,n.to));return r===null?Q(e,t,`paragraph`):{anchor:n.from,from:n.from,head:n.from+r.length,insert:r,to:n.to}}function _r(e){let t=e.replace(/\r\n/g,`
11
+ `).match(/^```[^\n]*\n([\s\S]*?)\n```$/);return t?t[1]:null}function vr(e,t){let n=e.slice(t.from,t.to);if(n.length>0){let e=_r(n);return e===null?{anchor:t.from+4,from:t.from,head:t.from+4+n.length,insert:`\`\`\`\n${n}\n\`\`\``,to:t.to}:{anchor:t.from,from:t.from,head:t.from+e.length,insert:e,to:t.to}}return{anchor:t.from+4,from:t.from,head:t.from+4+4,insert:`\`\`\`\n${Xn}\n\`\`\``,to:t.to}}function yr(e,t,n,r,i=0){let a=t.from>0&&e[t.from-1]!==`
12
+ `,o=t.to<e.length&&e[t.to]!==`
13
+ `,s=a?`
14
+ `:``,c=`${s}${n}${o?`
15
+ `:``}`,l=t.from+s.length+r;return{anchor:l,from:t.from,head:l+i,insert:c,to:t.to}}function br(e=``){let t=e.trim()||Qn;return[`| ${Zn.join(` | `)} |`,`| --- | --- |`,`| ${t} | ${Qn} |`].join(`
16
+ `)}function xr(e,t){return yr(e,t,br(e.slice(t.from,t.to)),2,Zn[0].length)}function Sr(e,t){return yr(e,t,`---`,4,0)}function Cr(e,t,n){let r=String(e??``),i=$n(t,r.length),a;switch(n){case`bold`:a=ir(r,i,`**`,Un.bold);break;case`italic`:a=ir(r,i,`_`,Un.italic);break;case`strikethrough`:a=ir(r,i,`~~`,Un.strikethrough);break;case`code`:a=ir(r,i,"`",Un.code);break;case`link`:a=or(r,i);break;case`image`:a=sr(r,i);break;case`video`:a=cr(r,i);break;case`paragraph`:a=gr(r,i);break;case`heading`:a=$(r,i,2);break;case`heading-1`:a=$(r,i,1);break;case`heading-2`:a=$(r,i,2);break;case`heading-3`:a=$(r,i,3);break;case`heading-4`:a=$(r,i,4);break;case`heading-5`:a=$(r,i,5);break;case`heading-6`:a=$(r,i,6);break;case`quote`:a=pr(r,i);break;case`bullet-list`:a=fr(r,i);break;case`numbered-list`:a=hr(r,i);break;case`task-list`:a=mr(r,i);break;case`code-block`:a=vr(r,i);break;case`table`:a=xr(r,i);break;case`horizontal-rule`:a=Sr(r,i);break;default:return null}return a?r.slice(a.from,a.to)===a.insert?null:a:null}var wr=new Set([`block-beta`,`classdiagram`,`erdiagram`,`flowchart`,`gantt`,`gitgraph`,`graph`,`journey`,`mindmap`,`pie`,`quadrantchart`,`sankey-beta`,`sequencediagram`,`statediagram`,`statediagram-v2`,`timeline`,`xychart-beta`]),Tr=new Set(`accdescr.acctitle.actor.alt.and.autonumber.break.callback.class.classdef.click.critical.dateformat.direction.else.end.exclude.include.interpolate.link.linkstyle.loop.note.opt.par.participant.rect.section.state.style.subgraph.theme.title`.split(`.`)),Er=new Set([`false`,`no`,`off`,`on`,`true`,`yes`]),Dr=new Set([`bt`,`lr`,`rl`,`tb`,`td`]);function Or(e){let t=e.match(/[A-Za-z_][\w.]*(?:-[A-Za-z0-9_][\w.]*)*/u,!1);return t?(e.match(/[A-Za-z_][\w.]*(?:-[A-Za-z0-9_][\w.]*)*/u),t[0]):``}function kr(e){return e.match(`%%{`)?(e.skipTo(`}%%`)?e.match(`}%%`):e.skipToEnd(),!0):!1}var Ar=ne.define({languageData:{commentTokens:{line:`%%`}},token(e){if(e.eatSpace())return null;if(kr(e))return`meta`;if(e.match(`%%`))return e.skipToEnd(),`comment`;if(e.match(/"(?:[^"\\]|\\.)*"?/u)||e.match(/'(?:[^'\\]|\\.)*'?/u))return`string`;if(e.match(/#[0-9a-f]{3,8}\b/iu)||e.match(/#[A-Za-z][\w-]*/u))return`atom`;if(e.match(/\b\d+(?:\.\d+)?%?\b/u))return`number`;if(e.match(/[ox*+<#]?[-=.\\/]+(?:left|right|up|down)?[-=.\\/]*[ox*+>#]?/iu))return`operator`;if(e.match(/[{}[\]():,;|]/u))return`punctuation`;let t=Or(e);if(t){let e=t.toLowerCase();return wr.has(e)?`meta`:Tr.has(e)?`keyword`:Er.has(e)?`bool`:Dr.has(e)?`atom`:/^[A-Z][A-Z0-9_]*$/u.test(t)?`typeName`:`variableName`}return e.next(),null}}),jr=new le(Ar),Mr=v.of({alias:[`mermaid`,`mmd`],extensions:[`mermaid`,`mmd`],name:`Mermaid`,support:jr});function Nr(e){return t=>{let n=t.state.doc.lineAt(t.pos),r=n.text.slice(0,t.pos-n.from),i=r.lastIndexOf(`[[`);if(i===-1)return null;let a=r.slice(i+2);if(a.includes(`]]`))return null;let o=a.toLowerCase(),s=n.from+i+2,c=e().map(e=>{let t=e.replace(/\.md$/i,``);return{filePath:e,label:t,fileName:t.split(`/`).pop()}}).filter(({label:e,fileName:t})=>e.toLowerCase().includes(o)||t.toLowerCase().includes(o)).map(({label:e,fileName:t})=>({label:e,detail:e.includes(`/`)?` ${t}`:void 0,apply:(e,t,n,r)=>{let i=e.state.doc.toString(),a=r;i.slice(r,r+2)===`]]`&&(a=r+2),e.dispatch({changes:{from:n,to:a,insert:`${t.label}]]`},selection:{anchor:n+t.label.length+2}})},type:`text`,boost:+!!e.toLowerCase().startsWith(o)}));return c.length===0?null:{from:s,options:c,filter:!1}}}var Pr=new Set([`@startuml`,`@enduml`,`@startmindmap`,`@endmindmap`,`@startwbs`,`@endwbs`,`@startgantt`,`@endgantt`,`@startjson`,`@endjson`,`@startyaml`,`@endyaml`,`@startsalt`,`@endsalt`]),Fr=new Set(`activate.actor.agent.allowmixing.alt.annotation.artifact.as.autonumber.boundary.box.break.caption.card.case.circle.class.cloud.collections.component.control.create.critical.database.deactivate.destroy.detach.else.elseif.end.endlegend.endif.endwhile.entity.enum.exception.file.folder.footer.fork.frame.group.header.hide.hnote.if.interface.json.kill.label.legend.loop.map.namespace.newpage.node.note.object.of.opt.order.over.package.page.par.participant.partition.person.port.protocol.queue.rectangle.ref.repeat.return.rnote.show.skinparam.split.stack.start.state.stop.storage.struct.switch.then.title.usecase.while`.split(`.`)),Ir=new Set([`false`,`no`,`off`,`on`,`true`,`yes`]);function Lr(e){let t=e.match(/[@!A-Za-z_][\w.-]*/u,!1);return t?(e.match(/[@!A-Za-z_][\w.-]*/u),t[0]):``}var Rr=ne.define({languageData:{commentTokens:{block:{close:`'/`,open:`/'`},line:`'`}},startState(){return{inBlockComment:!1}},token(e,t){if(t.inBlockComment)return e.skipTo(`'/`)?(e.match(`'/`),t.inBlockComment=!1):e.skipToEnd(),`comment`;if(e.eatSpace())return null;if(e.match(`/'`))return t.inBlockComment=!0,`comment`;let n=e.pos===0?` `:e.string.charAt(e.pos-1);if(e.peek()===`'`&&(e.sol()||/\s/u.test(n)))return e.skipToEnd(),`comment`;if(e.match(/"(?:[^"\\]|\\.)*"?/u))return`string`;if(e.match(/#[0-9a-f]{3,8}\b/iu)||e.match(/#[A-Za-z][\w-]*/u))return`atom`;if(e.match(/\b\d+(?:\.\d+)?\b/u))return`number`;if(e.match(/[<>{}[\]():,]/u))return`punctuation`;if(e.match(/[ox*+<#]?[-=.\\/]+(?:left|right|up|down)?[-=.\\/]*[ox*+>#]?/iu))return`operator`;let r=Lr(e);if(r){let e=r.toLowerCase();return e.startsWith(`!`)||Pr.has(e)?`meta`:Fr.has(e)?`keyword`:Ir.has(e)?`bool`:/^[A-Z][A-Z0-9_]*$/u.test(r)?`typeName`:`variableName`}return e.next(),null}}),zr=new le(Rr),Br=v.of({alias:[`plantuml`,`puml`],extensions:[`plantuml`,`puml`],name:`PlantUML`,support:zr});function Vr(e){let t=Array.from(e?.clipboardData?.files??[]);for(let e of t)if(e?.type?.startsWith?.(`image/`))return e;let n=Array.from(e?.clipboardData?.items??[]);for(let e of n){if(e.kind!==`file`||!e.type?.startsWith?.(`image/`))continue;let t=e.getAsFile?.();if(t)return t}return null}function Hr(e,t){let n=Vr(e);return n?typeof t==`function`?(console.debug(`[editor] Detected pasted image.`,{name:n.name??``,size:n.size??null,type:n.type??``}),e.preventDefault?.(),Promise.resolve(t(n)).catch(e=>{console.error(`[editor] Failed to process pasted image:`,e)}),!0):(console.warn(`[editor] Ignoring pasted image because no image paste handler is registered.`),!1):!1}var Ur=[...ut,Mr,Br],Wr=i.mark({class:`cm-matchingBracket cm-matchingBracket-paired`}),Gr=i.mark({class:`cm-nonmatchingBracket`}),Kr=i.mark({class:`cm-remoteUpdateFlash`}),qr=1350,Jr=160,Yr=900,Xr=/^(\s*(?:>\s*)*(?:[-+*]|\d+[.)])\s+\[)( |x|X)(\])(\s.*)?$/;function Zr(e){let t=e.scrollDOM.scrollTop,n=e.state.selection,r=W(e);return r&&requestAnimationFrame(()=>{e.dom.isConnected&&e.state.selection.eq(n)&&(e.scrollDOM.scrollTop=t)}),r}function Qr(e){return JSON.stringify([e.search,e.caseSensitive,e.regexp,e.wholeWord])}function $r(){let e=``,t=!1,n=0;return l.updateListener.of(r=>{let i=Ut(r.state),a=Ht(r.state),o=Qr(a),s=i&&a.valid&&(!t||o!==e);t=i,e=o,s&&(n&&cancelAnimationFrame(n),n=requestAnimationFrame(()=>{if(n=0,!r.view.dom.isConnected)return;let e=Ht(r.view.state);if(!Ut(r.view.state)||!e.valid||Qr(e)!==o)return;let t=r.view.dom.querySelector(`.cm-search input[name="search"]`),i=t===r.view.root.activeElement&&t?{end:t.selectionEnd,start:t.selectionStart}:null;V(r.view),i&&t?.setSelectionRange&&t.setSelectionRange(i.start,i.end)}))})}var ei=Object.freeze({indentLess:Oe,indentMore:Ee,openSearch:Zr,redo:Me,undo:De}),ti=class extends ye{toDOM(){let e=document.createElement(`span`);return e.className=`cm-remoteUpdateCaretWidget`,e.setAttribute(`aria-hidden`,`true`),e}ignoreEvent(){return!0}},ni=b.define(),ri=b.define(),ii=ee.define({create:()=>i.none,update(e,t){let n=e.map(t.changes);return t.effects.forEach(e=>{if(e.is(ri)){n=i.none;return}if(e.is(ni)){let{from:t,showCaret:r,to:a}=e.value,o=[];a>t&&o.push(Kr.range(t,a)),r&&o.push(i.widget({side:-1,widget:new ti}).range(t)),n=o.length>0?i.set(o,!0):i.none}}),n},provide:e=>l.decorations.from(e)});function ai(e,t){return t.selection.ranges.some(t=>t.empty&&e.to===t.head)}function oi(e,t){let n=[];if(!e.matched)return n.push(Gr.range(e.start.from,e.start.to)),e.end&&n.push(Gr.range(e.end.from,e.end.to)),n;let r=ai(e.start,t),i=e.end?ai(e.end,t):!1;return r||n.push(Wr.range(e.start.from,e.start.to)),e.end&&!i&&n.push(Wr.range(e.end.from,e.end.to)),n}function si(e){let t=e===`dark`?`oklch(from var(--color-surface-offset) l c h / 0.55)`:`oklch(from var(--color-surface-offset) l c h / 0.75)`,n=e===`dark`?`oklch(from var(--color-primary) l c h / 0.28)`:`oklch(from var(--color-primary) l c h / 0.18)`,r=e===`dark`?`oklch(from var(--color-primary) l c h / 0.4)`:`oklch(from var(--color-primary) l c h / 0.26)`,i=e===`dark`?`oklch(from var(--color-primary) l c h / 0.65)`:`oklch(from var(--color-primary) l c h / 0.5)`,a=e===`dark`?`color-mix(in oklab, var(--color-primary) 78%, white)`:`color-mix(in oklab, var(--color-primary) 84%, black)`,o=e===`dark`?`oklch(from var(--color-primary) l c h / 0.2)`:`oklch(from var(--color-primary) l c h / 0.12)`,s=e===`dark`?`oklch(from var(--color-primary) calc(l + 0.08) c h / 0.85)`:`oklch(from var(--color-primary) calc(l - 0.04) c h / 0.7)`,c=e===`dark`?`oklch(from var(--color-error) l c h / 0.12)`:`oklch(from var(--color-error) l c h / 0.1)`,u=e===`dark`?`oklch(from var(--color-error) calc(l + 0.08) c h / 0.8)`:`oklch(from var(--color-error) calc(l - 0.04) c h / 0.7)`;return l.theme({"&":{backgroundColor:`var(--color-bg)`,color:`var(--color-text)`},".cm-content":{caretColor:a,fontFamily:`var(--font-mono)`,padding:`16px 0`},".cm-cursor, .cm-dropCursor":{borderLeftColor:a,borderLeftWidth:`3px`,marginLeft:`-1px`},".cm-foldPlaceholder":{backgroundColor:`var(--color-surface-dynamic)`,border:`none`,color:`var(--color-text-muted)`},".cm-gutters":{backgroundColor:`var(--color-surface)`,borderRight:`1px solid var(--color-divider)`,color:`var(--color-text-muted)`,minWidth:`44px`},".cm-line":{padding:`0 16px`},".cm-activeLine":{backgroundColor:t,boxShadow:`inset 3px 0 0 ${n}`},".cm-activeLineGutter":{backgroundColor:t,boxShadow:`inset 3px 0 0 ${n}`,color:`var(--color-text-muted)`},".cm-matchingBracket":{borderRadius:`2px`,color:`inherit`},".cm-matchingBracket.cm-matchingBracket-paired":{backgroundColor:o,outline:`1px solid ${s}`},".cm-nonmatchingBracket":{backgroundColor:c,outline:`1px solid ${u}`,borderRadius:`2px`},".cm-selectionMatch":{backgroundColor:`var(--color-primary-highlight)`},".cm-remoteUpdateFlash":{animation:`collabmd-remote-update-flash 1.35s ease-out`,backgroundColor:e===`dark`?`oklch(from var(--color-primary) l c h / 0.22)`:`oklch(from var(--color-primary) l c h / 0.16)`,borderRadius:`3px`,boxShadow:`0 0 0 1px ${e===`dark`?`oklch(from var(--color-primary) calc(l + 0.05) c h / 0.26)`:`oklch(from var(--color-primary) calc(l - 0.04) c h / 0.2)`}`},".cm-remoteUpdateCaretWidget":{animation:`collabmd-remote-update-caret 1s ease-out`,backgroundColor:`transparent`,borderLeft:`2px solid ${e===`dark`?`color-mix(in oklab, var(--color-primary) 78%, white)`:`color-mix(in oklab, var(--color-primary) 84%, black)`}`,borderRadius:`999px`,boxShadow:`0 0 0 1px ${e===`dark`?`oklch(from var(--color-primary) calc(l + 0.06) c h / 0.22)`:`oklch(from var(--color-primary) calc(l - 0.04) c h / 0.16)`}`,display:`inline-block`,height:`1.2em`,marginLeft:`-1px`,marginRight:`-1px`,pointerEvents:`none`,transformOrigin:`center bottom`,verticalAlign:`text-bottom`,width:`0`},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:r},"&.cm-focused .cm-selectionLayer .cm-selectionBackground":{border:`1px solid ${i}`,borderRadius:`2px`},"@keyframes collabmd-remote-update-flash":{"0%":{backgroundColor:e===`dark`?`oklch(from var(--color-primary) l c h / 0.34)`:`oklch(from var(--color-primary) l c h / 0.26)`},"100%":{backgroundColor:`oklch(from var(--color-primary) l c h / 0)`}},"@keyframes collabmd-remote-update-caret":{"0%":{boxShadow:`0 0 0 1px ${e===`dark`?`oklch(from var(--color-primary) calc(l + 0.08) c h / 0.34)`:`oklch(from var(--color-primary) calc(l - 0.04) c h / 0.24)`}`,opacity:`0`,transform:`translateY(0.2em) scaleY(0.7)`},"18%":{opacity:`1`,transform:`translateY(0) scaleY(1)`},"72%":{opacity:`1`,transform:`translateY(0) scaleY(1)`},"100%":{boxShadow:`0 0 0 1px ${e===`dark`?`oklch(from var(--color-primary) calc(l + 0.08) c h / 0)`:`oklch(from var(--color-primary) calc(l - 0.04) c h / 0)`}`,opacity:`0`,transform:`translateY(-0.05em) scaleY(0.9)`}}},{dark:e===`dark`})}function ci(e){return Ie(e)?jr:Pe(e)?zr:Fe(e)?Te():Ce({base:we,codeLanguages:Ur})}function li(e){return{from:Math.min(...e.ranges.map(e=>Math.min(e.from,e.to))),to:Math.max(...e.ranges.map(e=>Math.max(e.from,e.to)))}}var ui=class{constructor({editorContainer:e,getFileList:t,initialTheme:n,lineInfoElement:r,lineWrappingEnabled:i=!0,onDocChanged:a=null,onImagePaste:o=null,onSelectionChanged:s=null,onViewportChanged:c=null}){this.editorContainer=e,this.getFileList=t??(()=>[]),this.initialTheme=n,this.lineInfoElement=r,this.lineWrappingEnabled=i,this.onDocChanged=a,this.onImagePaste=o,this.onSelectionChanged=s,this.onViewportChanged=c,this.editorView=null,this.themeCompartment=new pe,this.syntaxThemeCompartment=new pe,this.lineWrappingCompartment=new pe,this.viewportFrame=0,this.remoteUpdateFlashTimer=0,this.lastLocalInputAt=0,this.handleScroll=()=>{this.viewportFrame||=requestAnimationFrame(()=>{this.viewportFrame=0,this.emitViewportChange()})},this.handleLocalInputActivity=()=>{this.lastLocalInputAt=Date.now()}}createUpdateListener(){return l.updateListener.of(e=>{e.docChanged&&this.onDocChanged?.(),(e.selectionSet||e.docChanged)&&(this.updateCursorInfo(e.state),this.onSelectionChanged?.(e.state))})}getBaseExtensions(e,{readOnly:t=!1}={}){let i=[s(),a(),c(),ke(),oe(),h(),x.allowMultipleSelections.of(!0),ge(),n(ie,{fallback:!0}),se({renderMatch:oi}),Se(),xe({override:[Nr(this.getFileList)]}),_(),r(),g(),St(),$r(),de.of([...be,...Ne,...je,...nn.map(e=>e.run===W?{...e,run:Zr}:e),...he,Ae]),l.contentAttributes.of({"aria-label":`Markdown editor`}),ci(e),this.themeCompartment.of(si(this.initialTheme)),this.syntaxThemeCompartment.of(this.initialTheme===`dark`?Tn:[]),this.lineWrappingCompartment.of(this.lineWrappingEnabled?l.lineWrapping:[]),ii,this.createUpdateListener()];return t?(i.push(x.readOnly.of(!0)),i.push(l.editable.of(!1)),i):(i.splice(13,0,ae.highest(l.domEventHandlers({paste:e=>Hr(e,this.onImagePaste)}))),i)}clearEditorDom({preserveLoadingIndicator:e=!0}={}){if(!this.editorContainer)return;let t=e?this.editorContainer.querySelector(`#editorLoading`):null;Array.from(this.editorContainer.children).forEach(e=>{e!==t&&e.remove()})}teardownEditorView({clearContainer:e=!1}={}){this.editorView?.contentDOM?.removeEventListener(`beforeinput`,this.handleLocalInputActivity),this.editorView?.contentDOM?.removeEventListener(`keydown`,this.handleLocalInputActivity),this.editorView?.contentDOM?.removeEventListener(`paste`,this.handleLocalInputActivity),this.editorView?.contentDOM?.removeEventListener(`compositionstart`,this.handleLocalInputActivity),this.editorView?.scrollDOM?.removeEventListener(`scroll`,this.handleScroll),this.editorView?.destroy(),this.editorView=null,e&&this.editorContainer&&(this.editorContainer.innerHTML=``,delete this.editorContainer.dataset.editorMode)}mountEditor(e,{editorMode:t=`collaborative`,preserveScrollTop:n=0}={}){this.clearEditorDom({preserveLoadingIndicator:!0}),this.teardownEditorView(),this.editorView=new l({parent:this.editorContainer,state:e}),this.editorContainer.dataset.editorMode=t,this.editorView.scrollDOM.addEventListener(`scroll`,this.handleScroll,{passive:!0}),this.editorView.contentDOM.addEventListener(`beforeinput`,this.handleLocalInputActivity),this.editorView.contentDOM.addEventListener(`keydown`,this.handleLocalInputActivity),this.editorView.contentDOM.addEventListener(`paste`,this.handleLocalInputActivity),this.editorView.contentDOM.addEventListener(`compositionstart`,this.handleLocalInputActivity),this.updateCursorInfo(this.editorView.state),this.onSelectionChanged?.(this.editorView.state),this.emitViewportChange(),n>0&&requestAnimationFrame(()=>{this.editorView?.scrollDOM&&(this.editorView.scrollDOM.scrollTop=n)})}initialize({awareness:e,filePath:t,undoManager:n,ytext:r}){let i=this.editorView?.scrollDOM?.scrollTop??0,a=x.create({doc:r.toString(),extensions:[...this.getBaseExtensions(t),Hn(r,e,{undoManager:n})]});this.mountEditor(a,{editorMode:`collaborative`,preserveScrollTop:i})}initializeProvisional({content:e=``,filePath:t}){let n=this.editorView?.scrollDOM?.scrollTop??0,r=x.create({doc:String(e??``),extensions:this.getBaseExtensions(t,{readOnly:!0})});this.mountEditor(r,{editorMode:`provisional`,preserveScrollTop:n})}destroy(){this.viewportFrame&&=(cancelAnimationFrame(this.viewportFrame),0),this.remoteUpdateFlashTimer&&=(clearTimeout(this.remoteUpdateFlashTimer),0),this.teardownEditorView({clearContainer:!0})}getText(){return this.editorView?.state.doc.toString()??``}getDoc(){return this.editorView?.state.doc??null}getState(){return this.editorView?.state??null}getScrollContainer(){return this.editorView?.scrollDOM??null}applyTheme(e){this.editorView&&this.editorView.dispatch({effects:[this.themeCompartment.reconfigure(si(e)),this.syntaxThemeCompartment.reconfigure(e===`dark`?Tn:[])]})}isLineWrappingEnabled(){return this.lineWrappingEnabled}setLineWrapping(e){return this.lineWrappingEnabled=!!e,this.editorView&&this.editorView.dispatch({effects:this.lineWrappingCompartment.reconfigure(this.lineWrappingEnabled?l.lineWrapping:[])}),this.lineWrappingEnabled}requestMeasure(){this.editorView?.requestMeasure()}runEditorCommand(e){if(!this.editorView)return!1;let t=ei[String(e??``)];if(typeof t!=`function`)return!1;let n=t(this.editorView);return n&&e!==`openSearch`&&this.editorView.focus(),n}flashRemoteRange({from:e=0,to:t=0}={},n=qr){let r=this.editorView?.state;if(!r||r.doc.length===0)return!1;let i=Math.min(Math.max(Math.round(e),0),r.doc.length),a=Math.min(Math.max(Math.round(t),0),r.doc.length);if(a<=i){if(i<r.doc.length)a=i+1;else if(i>0)--i,a=i+1;else return!1}let o=Math.max(a-i,0)<=Jr&&Date.now()-this.lastLocalInputAt>Yr;return this.editorView.dispatch({effects:ni.of({from:i,showCaret:o,to:a})}),this.remoteUpdateFlashTimer&&clearTimeout(this.remoteUpdateFlashTimer),this.remoteUpdateFlashTimer=window.setTimeout(()=>{this.remoteUpdateFlashTimer=0,this.editorView?.dispatch({effects:ri.of(null)})},n),!0}getViewportState(e=.35){return{topLine:this.getTopVisibleLineNumber(e),viewportRatio:e}}getTopVisibleLineNumber(e=0){if(!this.editorView)return 1;let t=this.editorView.scrollDOM.getBoundingClientRect(),n=Math.max(t.height*e,8),r=this.editorView.lineBlockAtHeight(t.top+n-this.editorView.documentTop);return r?this.editorView.state.doc.lineAt(r.from).number:1}getCurrentSelectionLineRange(){let e=this.editorView?.state;if(!e)return null;let{doc:t,selection:n}=e,{from:r,to:i}=li(n),a=t.lineAt(r).number,o=Math.min(Math.max(i,r),t.length);return o>r&&t.lineAt(o).from===o&&--o,{endLine:t.lineAt(o).number,startLine:a}}getCurrentSelectionCommentAnchor(){let e=this.editorView?.state;if(!e)return null;let{doc:t,selection:n}=e,{from:r,to:i}=li(n);if(r===i){let e=t.lineAt(r);return{anchorKind:`line`,anchorQuote:nt(e.text),endIndex:e.to,endLine:e.number,startIndex:e.from,startLine:e.number}}let a=Math.min(Math.max(i,r),t.length);return a>r&&t.lineAt(a).from===a&&--a,{anchorKind:`text`,anchorQuote:nt(t.sliceString(r,i)),endIndex:i,endLine:t.lineAt(a).number,startIndex:r,startLine:t.lineAt(r).number}}normalizeLineRange({endLine:e,startLine:t}){let n=this.editorView?.state;if(!n)return{endLine:1,startLine:1};let r=n.doc.lines,i=Math.min(Math.max(Math.round(t??1),1),r);return{endLine:Math.min(Math.max(Math.round(e??i),i),r),startLine:i}}getLineInfoAt(e){let t=this.editorView?.state;if(!t)return null;let n=Math.min(Math.max(e,0),t.doc.length),r=t.doc.lineAt(n);return{line:r,lineNumber:r.number}}getAnchorClientRect(e){let t=this.editorView?.state,n=this.editorView;if(!t||!n||!e)return null;let r=e.anchorKind||e.kind||`line`,i=Math.min(Math.max(Math.round(e.startIndex??0),0),t.doc.length),a=Math.min(Math.max(Math.round(e.endIndex??i),i),t.doc.length);if(r===`text`&&a>i){let e=n.coordsAtPos(i),t=n.coordsAtPos(Math.max(a-1,i));if(e&&t)return{bottom:Math.max(e.bottom,t.bottom),height:Math.max(e.bottom,t.bottom)-Math.min(e.top,t.top),left:Math.min(e.left,t.left),right:Math.max(e.right,t.right),top:Math.min(e.top,t.top),width:Math.max(e.right,t.right)-Math.min(e.left,t.left)}}let o=t.doc.line(Math.min(Math.max(Math.round(e.startLine??1),1),t.doc.lines)),s=n.lineBlockAt(o.from),c=n.scrollDOM.getBoundingClientRect(),l=n.scrollDOM.scrollTop,u=n.contentDOM.getBoundingClientRect(),d=u.left,f=Math.max(u.right,c.right-8),p=c.top+s.top-l;return{bottom:p+s.height,height:s.height,left:d,right:f,top:p,width:Math.max(f-d,0)}}getSelectionChipClientRect(e){let t=this.editorView?.state,n=this.editorView;if(!t||!n||!e)return null;let r=Math.min(Math.max(Math.round(e.startIndex??0),0),t.doc.length),i=t.doc.lineAt(r),a=n.lineBlockAt(i.from),o=n.scrollDOM.getBoundingClientRect(),s=n.scrollDOM.scrollTop,c=n.contentDOM.getBoundingClientRect(),l=Math.max(c.right,o.right-8),u=o.top+a.top-s;return{bottom:u+a.height,height:a.height,left:c.left,right:l,top:u,width:Math.max(l-c.left,0)}}scrollToLine(e,t=0){let n=this.editorView?.state,r=this.editorView?.scrollDOM;if(!n||!r||!this.editorView)return!1;let i=Math.min(Math.max(Math.round(e),1),n.doc.lines),a=n.doc.line(i),o=this.editorView.lineBlockAt(a.from),s=Math.max(r.scrollHeight-r.clientHeight,0),c=t>0?r.clientHeight*t:8,l=Math.min(Math.max(o.top-c,0),s);return r.scrollTo({top:l}),!0}revealSearchMatch({column:e=1,length:t=0,line:n=1}={}){let r=this.editorView?.state;if(!r||!this.editorView)return!1;let i=Math.min(Math.max(Math.round(Number(n)||1),1),r.doc.lines),a=r.doc.line(i),o=Math.min(Math.max(Math.round(Number(e)||1)-1,0),a.length),s=a.from+o,c=Math.min(s+Math.max(Math.round(Number(t)||0),0),a.to);return this.editorView.dispatch({scrollIntoView:!0,selection:y.range(s,Math.max(c,s))}),this.editorView.focus(),this.scrollToLine(i,.2),!0}scrollToPosition(e,t=`center`){let n=this.editorView?.state,r=this.editorView?.scrollDOM;if(!n||!r||!this.editorView)return!1;let i=Math.min(Math.max(Math.round(e),0),n.doc.length),a=this.editorView.lineBlockAt(i),o=Math.max(r.scrollHeight-r.clientHeight,0),s=a.top;return t===`center`&&(s=a.top-(r.clientHeight-a.height)/2),r.scrollTo({top:Math.min(Math.max(s,0),o)}),!0}applyMarkdownToolbarAction(e){if(!this.editorView)return!1;let{state:t}=this.editorView,n=t.doc.toString(),r=!1,i=t.changeByRange(t=>{let i=Cr(n,t,e);return i?(r=!0,{changes:{from:i.from,insert:i.insert,to:i.to},range:y.range(i.anchor,i.head)}):{range:t}});return r?(this.editorView.dispatch(t.update(i,{scrollIntoView:!0,userEvent:`input`})),this.editorView.focus(),!0):!1}insertText(e){if(!this.editorView)return!1;let t=String(e??``),{state:n}=this.editorView,r=n.selection.main,i=r.from+t.length;return this.editorView.dispatch({changes:{from:r.from,insert:t,to:r.to},scrollIntoView:!0,selection:{anchor:i,head:i},userEvent:`input`}),this.editorView.focus(),!0}replaceText(e){if(!this.editorView)return!1;let t=String(e??``),{state:n}=this.editorView;return this.editorView.dispatch({changes:{from:0,insert:t,to:n.doc.length},selection:{anchor:0,head:0},userEvent:`input`}),this.editorView.focus(),!0}toggleTaskListItem(e){let t=this.editorView?.state;if(!this.editorView||!t)return!1;let n=Number.parseInt(String(e??``),10);if(!Number.isFinite(n))return!1;let r=Math.min(Math.max(n,1),t.doc.lines),i=t.doc.line(r),a=Xr.exec(i.text);if(!a)return!1;let[,o,s]=a,c=i.from+o.length,l=s===` `?`x`:` `;return this.editorView.dispatch({changes:{from:c,insert:l,to:c+1},userEvent:`input`}),!0}updateCursorInfo(e){if(!this.lineInfoElement)return;let t=e.selection.main.head,n=e.doc.lineAt(t),r=t-n.from+1;this.lineInfoElement.textContent=`Ln ${n.number}, Col ${r}`}emitViewportChange(){this.onViewportChanged?.(this.getViewportState())}},di=class{constructor({editorContainer:e,lineWrappingEnabled:t=!0,initialTheme:n,lineInfoElement:r,onAwarenessChange:i,onConnectionChange:a,onCommentsChange:o,onContentChange:s,onImagePaste:c,onSelectionChange:l,preferredUserName:u,localUser:d,getFileList:f}){this.onAwarenessChange=i,this.onCommentsChange=o,this.onContentChange=s,this.onSelectionChange=l,this.activeFilePath=``,this.bootstrapContent=null,this.pendingCollaborativeBindings=null,this.hasDeliveredContent=!1,this.lastDeliveredContent=null,this.collaborationClient=new lt({localUser:d,onAwarenessChange:e=>this.onAwarenessChange?.(e),onConnectionChange:a,onInitialSync:()=>this.emitContentChange(),preferredUserName:u,resolveAwarenessCursor:e=>this.resolveAwarenessCursor(e)}),this.viewAdapter=new ui({editorContainer:e,getFileList:f||(()=>[]),initialTheme:n,lineInfoElement:r,lineWrappingEnabled:t,onDocChanged:()=>{this.emitContentChange()},onImagePaste:c,onViewportChanged:e=>{this.collaborationClient.setLocalViewport(e)},onSelectionChanged:()=>{this.onSelectionChange?.(this.getCurrentSelectionCommentAnchor())}}),this.commentThreadStore=new ct({getDoc:()=>this.collaborationClient.ydoc,getEditorState:()=>this.viewAdapter.getState(),getLocalUser:()=>this.collaborationClient.getLocalUser(),onCommentsChange:e=>this.onCommentsChange?.(e)})}async initialize(e){this.activeFilePath=e,this.hasDeliveredContent=!1,this.lastDeliveredContent=null;let t=await this.collaborationClient.initialize(e);this.commentThreadStore.bind({commentThreads:t.commentThreads,ydoc:t.ydoc,ytext:t.ytext}),this.pendingCollaborativeBindings=t,this.collaborationClient.initialSyncComplete&&this.activateCollaborativeView(),this.onAwarenessChange?.(this.collaborationClient.collectUsers(e=>this.resolveAwarenessCursor(e)))}activateCollaborativeView(){return this.pendingCollaborativeBindings?(this.viewAdapter.initialize({awareness:this.pendingCollaborativeBindings.awareness,filePath:this.activeFilePath,undoManager:this.pendingCollaborativeBindings.undoManager,ytext:this.pendingCollaborativeBindings.ytext}),this.commentThreadStore.refreshComments(),this.pendingCollaborativeBindings=null,this.bootstrapContent=null,!0):!1}showBootstrapContent({content:e=``,filePath:t=this.activeFilePath}={}){return!this.collaborationClient.initialSyncComplete&&(this.activeFilePath=t,this.bootstrapContent=String(e??``),this.viewAdapter.initializeProvisional({content:this.bootstrapContent,filePath:this.activeFilePath}),this.commentThreadStore.refreshComments(),this.emitContentChange())}hasBootstrapContent(){return this.bootstrapContent!==null}emitContentChange({force:e=!1}={}){let t=this.getText();return!e&&this.hasDeliveredContent&&t===this.lastDeliveredContent?!1:(this.hasDeliveredContent=!0,this.lastDeliveredContent=t,this.onContentChange?.(),!0)}ensureInitialContent(){return this.emitContentChange()}applyTheme(e){this.viewAdapter.applyTheme(e)}getText(){return this.collaborationClient.getText()||this.viewAdapter.getText()}getScrollContainer(){return this.viewAdapter.getScrollContainer()}getTopVisibleLineNumber(e=0){return this.viewAdapter.getTopVisibleLineNumber(e)}getLocalUser(){return this.collaborationClient.getLocalUser()}get awareness(){return this.collaborationClient.awareness}get provider(){return this.collaborationClient.provider}get ydoc(){return this.collaborationClient.ydoc}get ytext(){return this.collaborationClient.ytext}getCurrentSelectionLineRange(){return this.viewAdapter.getCurrentSelectionLineRange()}getCurrentSelectionCommentAnchor(){return this.viewAdapter.getCurrentSelectionCommentAnchor()}getCommentAnchorClientRect(e){return this.viewAdapter.getAnchorClientRect(e)}getSelectionChipClientRect(e){return this.viewAdapter.getSelectionChipClientRect(e)}getCommentThreads(){return this.commentThreadStore.getCommentThreads()}createCommentThread(e){return this.commentThreadStore.createCommentThread(e)}replyToCommentThread(e,t){return this.commentThreadStore.replyToCommentThread(e,t)}toggleCommentReaction(e,t,n){return this.commentThreadStore.toggleCommentReaction(e,t,n)}deleteCommentThread(e){return this.commentThreadStore.deleteCommentThread(e)}isLineWrappingEnabled(){return this.viewAdapter.isLineWrappingEnabled()}setLineWrapping(e){return this.viewAdapter.setLineWrapping(e)}scrollToLine(e,t=0){return this.viewAdapter.scrollToLine(e,t)}revealSearchMatch(e){return this.viewAdapter.revealSearchMatch(e)}getUserCursor(e){return this.collaborationClient.getUserCursor(e,e=>this.resolveAwarenessCursor(e))}getUserViewport(e){return this.collaborationClient.getUserViewport(e)}scrollToPosition(e,t=`center`){return this.viewAdapter.scrollToPosition(e,t)}scrollToUserViewport(e){let t=this.getUserViewport(e);return t?this.scrollToLine(t.topLine,t.viewportRatio):!1}scrollToUserCursor(e,t=`center`){let n=this.getUserCursor(e);return n?this.scrollToPosition(n.cursorHead,t)||this.scrollToLine(n.cursorLine):!1}setUserName(e){return this.collaborationClient.setUserName(e)}requestMeasure(){this.viewAdapter.requestMeasure()}runEditorCommand(e){return this.viewAdapter.runEditorCommand(e)}applyMarkdownToolbarAction(e){return this.viewAdapter.applyMarkdownToolbarAction(e)}insertText(e){return this.viewAdapter.insertText(e)}replaceText(e){return this.viewAdapter.replaceText(e)}toggleTaskListItem(e){return this.collaborationClient.initialSyncComplete?this.viewAdapter.toggleTaskListItem(e):!1}flashExternalUpdate(e){return this.viewAdapter.flashRemoteRange(e)}waitForInitialSync(e=1500){return this.collaborationClient.waitForInitialSync(e)}destroy(){this.commentThreadStore.unbind(),this.activeFilePath=``,this.bootstrapContent=null,this.pendingCollaborativeBindings=null,this.hasDeliveredContent=!1,this.lastDeliveredContent=null,this.collaborationClient.destroy(),this.viewAdapter.destroy()}resolveAwarenessCursor(e){let t=this.collaborationClient.ydoc,n=this.collaborationClient.ytext,r=this.viewAdapter.getState();if(!e?.anchor||!e?.head||!t||!r||!n)return null;let i=T(e.anchor,t),a=T(e.head,t);if(!i||!a||i.type!==n||a.type!==n)return null;let o=r.doc.lineAt(a.index);return{cursorAnchor:i.index,cursorHead:a.index,cursorLine:o.number}}};export{di as EditorSession};
@@ -0,0 +1 @@
1
+ :root{--text-xs:clamp(.75rem, .7rem + .25vw, .875rem);--text-sm:clamp(.875rem, .8rem + .35vw, 1rem);--text-base:clamp(1rem, .9rem + .5vw, 1.125rem);--text-lg:clamp(1.125rem, .95rem + .85vw, 1.5rem);--text-xl:clamp(1.5rem, 1rem + 1.5vw, 2.25rem);--text-2xl:clamp(2rem, 1.2rem + 2.5vw, 3.5rem);--text-label:12px;--text-meta:12px;--text-caption:11px;--text-micro:10px;--text-code-sm:12px;--text-ui-sm:13px;--text-ui-md:14px;--text-title-sm:15px;--text-title-md:18px;--font-body:"Inter Variable", "Inter", system-ui, sans-serif;--font-display:"Inter Variable", "Inter", system-ui, sans-serif;--font-prose:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:"JetBrains Mono", ui-monospace, "SFMono-Regular", "SF Mono", monospace;--space-1:.25rem;--space-2:.5rem;--space-3:.75rem;--space-4:1rem;--space-5:1.25rem;--space-6:1.5rem;--space-8:2rem;--space-10:2.5rem;--space-12:3rem;--space-16:4rem;--space-20:5rem;--space-24:6rem;--space-32:8rem;--radius-sm:.375rem;--radius-md:.5rem;--radius-lg:.75rem;--radius-xl:1rem;--radius-2xs:2px;--radius-xs:4px;--radius-lg-plus:10px;--radius-xl-plus:18px;--radius-full:9999px;--transition-interactive:.18s cubic-bezier(.16, 1, .3, 1);--content-narrow:640px;--content-default:960px;--content-wide:1200px;--preview-content-width:720px;--panel-comments-width:min(300px, 34vw);--panel-comments-min-width:240px;--panel-outline-width:220px;--toolbar-h:48px;--sidebar-width:260px;--control-h-xs:28px;--control-h-sm:30px;--control-h-md:36px;--control-h-lg:44px;--control-target-min:44px;--control-icon-sm:14px;--control-icon-md:16px;--panel-border-width:1px}:root,[data-theme=light]{--color-bg:#f6f8fa;--color-surface:#fff;--color-surface-2:#fbfcfd;--color-surface-offset:#f0f3f6;--color-surface-offset-2:#e8edf2;--color-surface-dynamic:#dde3ea;--color-surface-raised:#fff;--color-surface-ink:#0b1118;--color-divider:#e3e8ee;--color-border:#cbd4df;--color-text:#17212b;--color-text-muted:#596675;--color-text-faint:#8391a1;--color-text-inverse:#f8fafc;--color-primary:#2563eb;--color-primary-hover:#1d4ed8;--color-primary-active:#1e40af;--color-primary-contrast:#fff;--color-primary-highlight:#dbeafe;--color-comment:#2563eb;--color-comment-soft:#2563eb14;--color-comment-strong:#2563eb24;--color-comment-text:#1e40af;--color-error:#dc2626;--color-danger:#dc2626;--color-error-highlight:#fce8e8;--color-success:#16a34a;--color-success-highlight:#dcfce7;--color-warning:#d97706;--color-warning-highlight:#fef3c7;--diff-add-bg:#16a34a0f;--diff-add-line-bg:#16a34a24;--diff-add-text:#16a34a;--diff-del-bg:#dc26260f;--diff-del-line-bg:#dc262624;--diff-del-text:#dc2626;--diff-hunk-bg:#2563eb14;--diff-hunk-text:#2563eb;--diff-gutter:#8391a1;--surface-fill-subtle:color-mix(in oklab, var(--color-surface) 92%, var(--color-surface-offset) 8%);--surface-fill-strong:color-mix(in oklab, var(--color-surface-offset) 72%, var(--color-surface-offset-2) 28%);--surface-overlay:color-mix(in srgb, var(--color-surface) 84%, var(--color-surface-offset) 16%);--surface-overlay-soft:color-mix(in srgb, var(--color-surface) 88%, var(--color-surface-offset) 12%);--surface-overlay-strong:color-mix(in srgb, var(--color-surface) 90%, var(--color-surface-offset) 10%);--surface-overlay-raised:color-mix(in oklab, var(--color-surface) 94%, transparent);--surface-overlay-header:color-mix(in srgb, var(--color-surface-offset) 76%, var(--color-bg) 24%);--surface-overlay-offset:color-mix(in oklab, var(--color-surface-offset) 82%, transparent);--surface-scrim:oklch(10% 0 0/.42);--surface-scrim-strong:oklch(8% .01 260/.82);--surface-inverse-glass:oklch(18% .02 260/.68);--surface-inverse-glass-hover:oklch(24% .02 260/.82);--surface-media-canvas:#000;--surface-embed-canvas:#fff;--surface-avatar-muted:#ffffff38;--surface-avatar-label:#0f1117d6;--surface-accent-subtle:color-mix(in oklab, var(--color-primary) 8%, var(--color-surface));--surface-accent-soft:color-mix(in oklab, var(--color-primary) 16%, transparent);--surface-accent-strong:color-mix(in oklab, var(--color-primary) 22%, transparent);--surface-success-soft:color-mix(in oklab, var(--color-success) 14%, transparent);--surface-warning-soft:color-mix(in oklab, var(--color-warning) 14%, transparent);--surface-danger-soft:color-mix(in oklab, var(--color-error) 14%, transparent);--surface-comment-shell-header:color-mix(in srgb, var(--color-surface) 97%, var(--color-comment) 3%);--surface-comment-record-hover:color-mix(in srgb, var(--color-surface-2) 92%, var(--color-comment) 8%);--surface-comment-subtle:color-mix(in srgb, var(--color-surface-2) 95%, var(--color-comment) 5%);--surface-comment-subtle-strong:color-mix(in srgb, var(--color-surface-2) 92%, var(--color-comment) 8%);--surface-comment-card:color-mix(in srgb, var(--color-surface) 94%, var(--color-comment) 6%);--surface-comment-elevated:color-mix(in srgb, var(--color-surface) 96%, var(--color-comment) 4%);--surface-comment-offset:color-mix(in srgb, var(--color-surface-offset) 90%, var(--color-comment) 10%);--surface-comment-offset-soft:color-mix(in srgb, var(--color-surface-offset) 88%, var(--color-comment) 12%);--surface-comment-offset-strong:color-mix(in srgb, var(--color-surface-offset) 84%, var(--color-comment) 16%);--surface-comment-offset-active:color-mix(in srgb, var(--color-surface-offset) 72%, var(--color-comment) 28%);--surface-comment-highlight-hover:color-mix(in srgb, var(--color-comment-soft) 74%, var(--color-comment) 26%);--surface-comment-highlight-active:color-mix(in srgb, var(--color-comment-soft) 62%, var(--color-comment) 38%);--surface-comment-selection:color-mix(in srgb, var(--color-surface) 25%, var(--color-comment) 75%);--surface-comment-preview-fade:linear-gradient(180deg, oklch(0% 0 0/0), color-mix(in srgb, var(--color-surface-2) 95%, var(--color-comment) 5%));--border-comment-soft:color-mix(in srgb, var(--color-divider) 90%, var(--color-comment) 10%);--border-comment-muted:color-mix(in srgb, var(--color-divider) 88%, var(--color-comment) 12%);--border-comment-strong:color-mix(in srgb, var(--color-border) 82%, var(--color-comment) 18%);--border-comment-active:color-mix(in srgb, var(--color-border) 78%, var(--color-comment) 22%);--shadow-comment-outline:0 0 0 1px oklch(from var(--color-comment) l c h / .14);--surface-warning-toast:var(--color-warning-highlight);--border-warning-toast:oklab(73.4461% .062398 .147608);--text-warning-toast:#422006;--shadow-warning-toast:var(--shadow-md);--border-accent-soft:color-mix(in oklab, var(--color-primary) 22%, transparent);--border-accent-muted:color-mix(in oklab, var(--color-primary) 24%, var(--color-border));--border-accent-strong:color-mix(in oklab, var(--color-primary) 34%, var(--color-border));--border-accent-stronger:color-mix(in oklab, var(--color-primary) 40%, var(--color-border));--shadow-accent-inset:inset 0 0 0 1px color-mix(in oklab, var(--color-primary) 14%, transparent);--shadow-accent-outline:0 0 0 1px color-mix(in oklab, var(--color-primary) 16%, transparent);--shadow-accent-halo:0 0 0 3px oklch(from var(--color-primary) l c h / .16);--shadow-accent-ring:0 0 0 2px var(--color-surface), 0 0 0 4px oklch(from var(--color-primary) l c h / .18);--shadow-accent-ring-strong:0 0 0 2px var(--color-bg), 0 0 0 4px oklch(from var(--color-primary) l c h / .45);--shadow-accent-ring-solid:0 0 0 2px var(--color-primary), 0 0 0 4px oklch(from var(--color-primary) l c h / .2);--shadow-elevated-soft:0 10px 24px color-mix(in oklab, var(--color-surface-ink) 10%, transparent);--shadow-floating-soft:0 14px 34px oklch(0% 0 0/.18);--shadow-floating-hover:0 18px 40px oklch(0% 0 0/.2);--shadow-media-soft:0 16px 40px oklch(0% 0 0/.24);--shadow-media-stage:0 28px 80px oklch(0% 0 0/.28);--shadow-media-modal:0 10px 40px #00000059;--shadow-card-strong:0 20px 56px oklch(0% 0 0/.24);--shadow-sheet-inset:inset 0 1px 0 color-mix(in oklab, var(--color-text) 4%, transparent);--shadow-focus:0 0 0 3px oklch(from var(--color-primary) l c h / .15);--shadow-focus-compact:0 0 0 2px oklch(from var(--color-primary) l c h / .45);--interactive-border:color-mix(in oklab, var(--color-primary) 22%, transparent);--interactive-surface:color-mix(in oklab, var(--color-primary) 14%, transparent);--color-text-on-dark:#fff;--shadow-sm:0 1px 2px oklch(20% .02 260/.06);--shadow-md:0 4px 12px oklch(20% .02 260/.08);--shadow-lg:0 12px 32px oklch(20% .02 260/.12)}[data-theme=dark]{--color-bg:#0b0f14;--color-surface:#11161d;--color-surface-2:#171d26;--color-surface-offset:#141a22;--color-surface-offset-2:#1c2530;--color-surface-dynamic:#253140;--color-surface-raised:#1a222c;--color-surface-ink:#030608;--color-divider:#242e3a;--color-border:#303c4b;--color-text:#e6edf3;--color-text-muted:#9aa7b4;--color-text-faint:#687584;--color-text-inverse:#0b0f14;--color-primary:#60a5fa;--color-primary-hover:#3b82f6;--color-primary-active:#2563eb;--color-primary-contrast:#07111f;--color-primary-highlight:#172a45;--color-comment:#60a5fa;--color-comment-soft:#60a5fa1a;--color-comment-strong:#60a5fa29;--color-comment-text:#bfdbfe;--color-error:#f87171;--color-danger:#f87171;--color-error-highlight:#2a1a1a;--color-success:#4ade80;--color-success-highlight:#1a2a1a;--color-warning:#fbbf24;--color-warning-highlight:#2a261a;--diff-add-bg:#4ade8014;--diff-add-line-bg:#4ade8026;--diff-add-text:#4ade80;--diff-del-bg:#f8717114;--diff-del-line-bg:#f8717126;--diff-del-text:#f87171;--diff-hunk-bg:#60a5fa1a;--diff-hunk-text:#60a5fa;--diff-gutter:#687584;--surface-fill-subtle:color-mix(in oklab, var(--color-surface) 88%, var(--color-surface-offset) 12%);--surface-fill-strong:color-mix(in oklab, var(--color-surface-offset) 60%, var(--color-surface-offset-2) 40%);--surface-overlay:color-mix(in srgb, var(--color-surface) 84%, var(--color-surface-offset) 16%);--surface-overlay-soft:color-mix(in srgb, var(--color-surface) 88%, var(--color-surface-offset) 12%);--surface-overlay-strong:color-mix(in srgb, var(--color-surface) 90%, var(--color-surface-offset) 10%);--surface-overlay-raised:color-mix(in oklab, var(--color-surface) 94%, transparent);--surface-overlay-header:color-mix(in srgb, var(--color-surface-offset) 76%, var(--color-bg) 24%);--surface-overlay-offset:color-mix(in oklab, var(--color-surface-offset) 82%, transparent);--surface-scrim:oklch(10% 0 0/.42);--surface-scrim-strong:oklch(8% .01 260/.82);--surface-inverse-glass:oklch(18% .02 260/.68);--surface-inverse-glass-hover:oklch(24% .02 260/.82);--surface-media-canvas:#000;--surface-embed-canvas:#121212;--surface-avatar-muted:#ffffff38;--surface-avatar-label:#0f1117d6;--surface-accent-subtle:color-mix(in oklab, var(--color-primary) 8%, var(--color-surface));--surface-accent-soft:color-mix(in oklab, var(--color-primary) 16%, transparent);--surface-accent-strong:color-mix(in oklab, var(--color-primary) 22%, transparent);--surface-success-soft:color-mix(in oklab, var(--color-success) 14%, transparent);--surface-warning-soft:color-mix(in oklab, var(--color-warning) 14%, transparent);--surface-danger-soft:color-mix(in oklab, var(--color-error) 14%, transparent);--surface-comment-shell-header:color-mix(in srgb, var(--color-surface) 97%, var(--color-comment) 3%);--surface-comment-record-hover:color-mix(in srgb, var(--color-surface-2) 92%, var(--color-comment) 8%);--surface-comment-subtle:color-mix(in srgb, var(--color-surface-2) 95%, var(--color-comment) 5%);--surface-comment-subtle-strong:color-mix(in srgb, var(--color-surface-2) 92%, var(--color-comment) 8%);--surface-comment-card:color-mix(in srgb, var(--color-surface) 94%, var(--color-comment) 6%);--surface-comment-elevated:color-mix(in srgb, var(--color-surface) 96%, var(--color-comment) 4%);--surface-comment-offset:color-mix(in srgb, var(--color-surface-offset) 90%, var(--color-comment) 10%);--surface-comment-offset-soft:color-mix(in srgb, var(--color-surface-offset) 88%, var(--color-comment) 12%);--surface-comment-offset-strong:color-mix(in srgb, var(--color-surface-offset) 84%, var(--color-comment) 16%);--surface-comment-offset-active:color-mix(in srgb, var(--color-surface-offset) 72%, var(--color-comment) 28%);--surface-comment-highlight-hover:color-mix(in srgb, var(--color-comment-soft) 74%, var(--color-comment) 26%);--surface-comment-highlight-active:color-mix(in srgb, var(--color-comment-soft) 62%, var(--color-comment) 38%);--surface-comment-selection:color-mix(in srgb, var(--color-surface) 25%, var(--color-comment) 75%);--surface-comment-preview-fade:linear-gradient(180deg, oklch(0% 0 0/0), color-mix(in srgb, var(--color-surface-2) 95%, var(--color-comment) 5%));--border-comment-soft:color-mix(in srgb, var(--color-divider) 90%, var(--color-comment) 10%);--border-comment-muted:color-mix(in srgb, var(--color-divider) 88%, var(--color-comment) 12%);--border-comment-strong:color-mix(in srgb, var(--color-border) 82%, var(--color-comment) 18%);--border-comment-active:color-mix(in srgb, var(--color-border) 78%, var(--color-comment) 22%);--shadow-comment-outline:0 0 0 1px oklch(from var(--color-comment) l c h / .14);--surface-warning-toast:var(--color-warning-highlight);--border-warning-toast:oklab(79.4887% .0497246 .137216/.88);--text-warning-toast:oklab(99.6952% -.000454402 .00461993);--shadow-warning-toast:var(--shadow-md);--border-accent-soft:color-mix(in oklab, var(--color-primary) 22%, transparent);--border-accent-muted:color-mix(in oklab, var(--color-primary) 24%, var(--color-border));--border-accent-strong:color-mix(in oklab, var(--color-primary) 34%, var(--color-border));--border-accent-stronger:color-mix(in oklab, var(--color-primary) 40%, var(--color-border));--shadow-accent-inset:inset 0 0 0 1px color-mix(in oklab, var(--color-primary) 14%, transparent);--shadow-accent-outline:0 0 0 1px color-mix(in oklab, var(--color-primary) 16%, transparent);--shadow-accent-halo:0 0 0 3px oklch(from var(--color-primary) l c h / .16);--shadow-accent-ring:0 0 0 2px var(--color-surface), 0 0 0 4px oklch(from var(--color-primary) l c h / .18);--shadow-accent-ring-strong:0 0 0 2px var(--color-bg), 0 0 0 4px oklch(from var(--color-primary) l c h / .45);--shadow-accent-ring-solid:0 0 0 2px var(--color-primary), 0 0 0 4px oklch(from var(--color-primary) l c h / .2);--shadow-elevated-soft:0 10px 24px color-mix(in oklab, var(--color-surface-ink) 10%, transparent);--shadow-floating-soft:0 14px 34px oklch(0% 0 0/.18);--shadow-floating-hover:0 18px 40px oklch(0% 0 0/.2);--shadow-media-soft:0 16px 40px oklch(0% 0 0/.24);--shadow-media-stage:0 28px 80px oklch(0% 0 0/.28);--shadow-media-modal:0 16px 48px #0009;--shadow-card-strong:0 20px 56px oklch(0% 0 0/.24);--shadow-sheet-inset:inset 0 1px 0 color-mix(in oklab, var(--color-text) 4%, transparent);--shadow-focus:0 0 0 3px oklch(from var(--color-primary) l c h / .15);--shadow-focus-compact:0 0 0 2px oklch(from var(--color-primary) l c h / .45);--interactive-border:color-mix(in oklab, var(--color-primary) 32%, transparent);--interactive-surface:color-mix(in oklab, var(--color-primary) 18%, transparent);--color-text-on-dark:#fff;--shadow-sm:0 1px 2px oklch(0% 0 0/.22);--shadow-md:0 4px 12px oklch(0% 0 0/.3);--shadow-lg:0 16px 40px oklch(0% 0 0/.45)}@media (prefers-color-scheme:dark){:root:not([data-theme]){--color-bg:#0b0f14;--color-surface:#11161d;--color-surface-2:#171d26;--color-surface-offset:#141a22;--color-surface-offset-2:#1c2530;--color-surface-dynamic:#253140;--color-surface-raised:#1a222c;--color-surface-ink:#030608;--color-divider:#242e3a;--color-border:#303c4b;--color-text:#e6edf3;--color-text-muted:#9aa7b4;--color-text-faint:#687584;--color-text-inverse:#0b0f14;--color-primary:#60a5fa;--color-primary-hover:#3b82f6;--color-primary-active:#2563eb;--color-primary-contrast:#07111f;--color-primary-highlight:#172a45;--color-comment:#60a5fa;--color-comment-soft:#60a5fa1a;--color-comment-strong:#60a5fa29;--color-comment-text:#bfdbfe;--color-error:#f87171;--color-error-highlight:#2a1a1a;--color-success:#4ade80;--color-success-highlight:#1a2a1a;--color-warning:#fbbf24;--color-warning-highlight:#2a261a;--surface-fill-subtle:color-mix(in oklab, var(--color-surface) 88%, var(--color-surface-offset) 12%);--surface-fill-strong:color-mix(in oklab, var(--color-surface-offset) 60%, var(--color-surface-offset-2) 40%);--surface-overlay:color-mix(in srgb, var(--color-surface) 84%, var(--color-surface-offset) 16%);--surface-overlay-soft:color-mix(in srgb, var(--color-surface) 88%, var(--color-surface-offset) 12%);--surface-overlay-strong:color-mix(in srgb, var(--color-surface) 90%, var(--color-surface-offset) 10%);--surface-overlay-raised:color-mix(in oklab, var(--color-surface) 94%, transparent);--surface-overlay-header:color-mix(in srgb, var(--color-surface-offset) 76%, var(--color-bg) 24%);--surface-overlay-offset:color-mix(in oklab, var(--color-surface-offset) 82%, transparent);--surface-scrim:oklch(10% 0 0/.42);--surface-scrim-strong:oklch(8% .01 260/.82);--surface-inverse-glass:oklch(18% .02 260/.68);--surface-inverse-glass-hover:oklch(24% .02 260/.82);--surface-media-canvas:#000;--surface-embed-canvas:#121212;--surface-avatar-muted:#ffffff38;--surface-avatar-label:#0f1117d6;--surface-accent-subtle:color-mix(in oklab, var(--color-primary) 8%, var(--color-surface));--surface-accent-soft:color-mix(in oklab, var(--color-primary) 16%, transparent);--surface-accent-strong:color-mix(in oklab, var(--color-primary) 22%, transparent);--surface-success-soft:color-mix(in oklab, var(--color-success) 14%, transparent);--surface-warning-soft:color-mix(in oklab, var(--color-warning) 14%, transparent);--surface-danger-soft:color-mix(in oklab, var(--color-error) 14%, transparent);--surface-comment-shell-header:color-mix(in srgb, var(--color-surface) 97%, var(--color-comment) 3%);--surface-comment-record-hover:color-mix(in srgb, var(--color-surface-2) 92%, var(--color-comment) 8%);--surface-comment-subtle:color-mix(in srgb, var(--color-surface-2) 95%, var(--color-comment) 5%);--surface-comment-subtle-strong:color-mix(in srgb, var(--color-surface-2) 92%, var(--color-comment) 8%);--surface-comment-card:color-mix(in srgb, var(--color-surface) 94%, var(--color-comment) 6%);--surface-comment-elevated:color-mix(in srgb, var(--color-surface) 96%, var(--color-comment) 4%);--surface-comment-offset:color-mix(in srgb, var(--color-surface-offset) 90%, var(--color-comment) 10%);--surface-comment-offset-soft:color-mix(in srgb, var(--color-surface-offset) 88%, var(--color-comment) 12%);--surface-comment-offset-strong:color-mix(in srgb, var(--color-surface-offset) 84%, var(--color-comment) 16%);--surface-comment-offset-active:color-mix(in srgb, var(--color-surface-offset) 72%, var(--color-comment) 28%);--surface-comment-highlight-hover:color-mix(in srgb, var(--color-comment-soft) 74%, var(--color-comment) 26%);--surface-comment-highlight-active:color-mix(in srgb, var(--color-comment-soft) 62%, var(--color-comment) 38%);--surface-comment-selection:color-mix(in srgb, var(--color-surface) 25%, var(--color-comment) 75%);--surface-comment-preview-fade:linear-gradient(180deg, oklch(0% 0 0/0), color-mix(in srgb, var(--color-surface-2) 95%, var(--color-comment) 5%));--border-comment-soft:color-mix(in srgb, var(--color-divider) 90%, var(--color-comment) 10%);--border-comment-muted:color-mix(in srgb, var(--color-divider) 88%, var(--color-comment) 12%);--border-comment-strong:color-mix(in srgb, var(--color-border) 82%, var(--color-comment) 18%);--border-comment-active:color-mix(in srgb, var(--color-border) 78%, var(--color-comment) 22%);--shadow-comment-outline:0 0 0 1px oklch(from var(--color-comment) l c h / .14);--surface-warning-toast:var(--color-warning-highlight);--border-warning-toast:oklab(79.4887% .0497246 .137216/.88);--text-warning-toast:oklab(99.6952% -.000454402 .00461993);--shadow-warning-toast:var(--shadow-md);--border-accent-soft:color-mix(in oklab, var(--color-primary) 22%, transparent);--border-accent-muted:color-mix(in oklab, var(--color-primary) 24%, var(--color-border));--border-accent-strong:color-mix(in oklab, var(--color-primary) 34%, var(--color-border));--border-accent-stronger:color-mix(in oklab, var(--color-primary) 40%, var(--color-border));--shadow-accent-inset:inset 0 0 0 1px color-mix(in oklab, var(--color-primary) 14%, transparent);--shadow-accent-outline:0 0 0 1px color-mix(in oklab, var(--color-primary) 16%, transparent);--shadow-accent-halo:0 0 0 3px oklch(from var(--color-primary) l c h / .16);--shadow-accent-ring:0 0 0 2px var(--color-surface), 0 0 0 4px oklch(from var(--color-primary) l c h / .18);--shadow-accent-ring-strong:0 0 0 2px var(--color-bg), 0 0 0 4px oklch(from var(--color-primary) l c h / .45);--shadow-accent-ring-solid:0 0 0 2px var(--color-primary), 0 0 0 4px oklch(from var(--color-primary) l c h / .2);--shadow-elevated-soft:0 10px 24px color-mix(in oklab, var(--color-surface-ink) 10%, transparent);--shadow-floating-soft:0 14px 34px oklch(0% 0 0/.18);--shadow-floating-hover:0 18px 40px oklch(0% 0 0/.2);--shadow-media-soft:0 16px 40px oklch(0% 0 0/.24);--shadow-media-stage:0 28px 80px oklch(0% 0 0/.28);--shadow-media-modal:0 16px 48px #0009;--shadow-card-strong:0 20px 56px oklch(0% 0 0/.24);--shadow-sheet-inset:inset 0 1px 0 color-mix(in oklab, var(--color-text) 4%, transparent);--shadow-focus:0 0 0 3px oklch(from var(--color-primary) l c h / .15);--shadow-focus-compact:0 0 0 2px oklch(from var(--color-primary) l c h / .45);--interactive-border:color-mix(in oklab, var(--color-primary) 32%, transparent);--interactive-surface:color-mix(in oklab, var(--color-primary) 18%, transparent);--color-text-on-dark:#fff;--shadow-sm:0 1px 2px oklch(0% 0 0/.22);--shadow-md:0 4px 12px oklch(0% 0 0/.3);--shadow-lg:0 16px 40px oklch(0% 0 0/.45)}}html,body{overscroll-behavior:none;width:100%;height:100%;margin:0;overflow:hidden}body[data-surface]{font-family:var(--font-body);font-size:var(--text-ui-sm);color:var(--color-text);background:var(--color-bg);line-height:1.4}#root{width:100%;height:100%}
@@ -1 +1 @@
1
- import"./chunk-SRAX5OIU-KFQikY-4.js";import{A as e,B as t,C as n,D as r,E as i,F as a,I as o,L as s,M as c,N as l,O as u,P as d,R as f,S as p,T as m,V as h,_ as g,a as _,b as v,c as y,d as b,f as x,g as S,h as C,i as w,j as T,k as E,l as D,m as O,n as k,o as A,p as j,r as M,s as N,t as P,u as F,v as I,w as L,x as R,y as z,z as B}from"./chunk-CZQZEIFA-DT3N9fo7.js";export{E as alerts,p as bucketfill,T as buttons,i as canvasError,x as chat,C as clearCanvasDialog,w as colorPicker,A as colors,y as commandPalette,S as confirmDialog,I as default,o as element,l as elementLink,z as encrypted,f as errorDialog,m as errorSplash,d as errors,s as exportDialog,k as fontList,c as headings,u as helpDialog,e as hints,F as imageExportDialog,g as keys,a as labels,v as library,O as mermaid,D as overwriteConfirm,L as progressDialog,M as publishDialog,B as publishSuccessDialog,h as quickSearch,t as roomDialog,r as search,R as shareDialog,_ as stats,j as toast,n as toolBar,b as ttd,N as userList,P as welcomeScreen};
1
+ import"./chunk-SRAX5OIU-KFQikY-4.js";import{A as e,B as t,C as n,D as r,E as i,F as a,I as o,L as s,M as c,N as l,O as u,P as d,R as f,S as p,T as m,V as h,_ as g,a as _,b as v,c as y,d as b,f as x,g as S,h as C,i as w,j as T,k as E,l as D,m as O,n as k,o as A,p as j,r as M,s as N,t as P,u as F,v as I,w as L,x as R,y as z,z as B}from"./chunk-YGJVY4SA-CjSe7Bx7.js";export{E as alerts,p as bucketfill,T as buttons,i as canvasError,x as chat,C as clearCanvasDialog,w as colorPicker,A as colors,y as commandPalette,S as confirmDialog,g as default,o as element,l as elementLink,z as encrypted,f as errorDialog,m as errorSplash,d as errors,s as exportDialog,k as fontList,c as headings,u as helpDialog,e as hints,F as imageExportDialog,I as keys,a as labels,v as library,O as mermaid,D as overwriteConfirm,L as progressDialog,M as publishDialog,B as publishSuccessDialog,h as quickSearch,t as roomDialog,r as search,R as shareDialog,_ as stats,j as toast,n as toolBar,b as ttd,N as userList,P as welcomeScreen};