@gsc-basic/components 1.1.7 → 1.1.8

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 (1053) hide show
  1. package/dist/es/Button/index.js +9 -4
  2. package/dist/es/Button/src/Button.css +3 -3
  3. package/dist/es/Button/src/Button.vue.js +44 -4
  4. package/dist/es/Button/src/Button2.css +3 -3
  5. package/dist/es/CodeEditor/index.js +9 -4
  6. package/dist/es/CodeEditor/src/index.css +3 -3
  7. package/dist/es/CodeEditor/src/index.vue.js +148 -4
  8. package/dist/es/CodeEditor/src/index2.css +3 -3
  9. package/dist/es/CodeEditor/src/index3.css +3 -3
  10. package/dist/es/ConfigProvider/index.js +9 -4
  11. package/dist/es/ConfigProvider/src/configProvider.js +17 -4
  12. package/dist/es/ConfigProvider/src/configProviderProps.js +25 -4
  13. package/dist/es/ConfigProvider/src/constants.js +12 -4
  14. package/dist/es/ConfigProvider/src/useGlobalConfig.js +48 -4
  15. package/dist/es/CountTo/index.js +9 -4
  16. package/dist/es/CountTo/src/index.css +3 -3
  17. package/dist/es/CountTo/src/index.vue.js +126 -4
  18. package/dist/es/Ellipsis/index.js +9 -4
  19. package/dist/es/Ellipsis/src/components/JsEllipsis.css +3 -3
  20. package/dist/es/Ellipsis/src/components/JsEllipsis.vue.js +181 -4
  21. package/dist/es/Ellipsis/src/components/NativeEllipsis.css +3 -3
  22. package/dist/es/Ellipsis/src/components/NativeEllipsis.vue.js +44 -4
  23. package/dist/es/Ellipsis/src/components/NativeEllipsis2.css +3 -3
  24. package/dist/es/Ellipsis/src/index.css +3 -3
  25. package/dist/es/Ellipsis/src/index.vue.js +96 -4
  26. package/dist/es/Ellipsis/src/utils/utils.js +59 -4
  27. package/dist/es/Form/index.js +9 -4
  28. package/dist/es/Form/src/Form.css +3 -3
  29. package/dist/es/Form/src/Form.vue.js +377 -4
  30. package/dist/es/Form/src/Form2.css +3 -3
  31. package/dist/es/Form/src/styles/form.css +3 -3
  32. package/dist/es/Marquee/index.js +9 -4
  33. package/dist/es/Marquee/src/index.css +3 -3
  34. package/dist/es/Marquee/src/index.vue.js +191 -4
  35. package/dist/es/Marquee/src/index2.css +3 -3
  36. package/dist/es/Overlay/index.js +64 -4
  37. package/dist/es/Overlay/src/Message.css +3 -3
  38. package/dist/es/Overlay/src/Message.vue.js +39 -4
  39. package/dist/es/Overlay/src/Message2.css +3 -3
  40. package/dist/es/Overlay/src/Modal.css +3 -3
  41. package/dist/es/Overlay/src/Modal.vue.js +70 -4
  42. package/dist/es/Overlay/src/Modal2.css +3 -3
  43. package/dist/es/Overlay/src/Notice.css +3 -3
  44. package/dist/es/Overlay/src/Notice.vue.js +40 -4
  45. package/dist/es/Overlay/src/Notice2.css +3 -3
  46. package/dist/es/Overlay/src/Tooltip.css +3 -3
  47. package/dist/es/Overlay/src/Tooltip.vue.js +87 -4
  48. package/dist/es/Overlay/src/Tooltip2.css +3 -3
  49. package/dist/es/RichTextEditor/index.js +9 -4
  50. package/dist/es/RichTextEditor/src/ToolbarPanel.css +3 -3
  51. package/dist/es/RichTextEditor/src/ToolbarPanel.vue.js +162 -4
  52. package/dist/es/RichTextEditor/src/ToolbarPanel2.css +3 -3
  53. package/dist/es/RichTextEditor/src/components/BlockquoteButton.css +4 -4
  54. package/dist/es/RichTextEditor/src/components/BlockquoteButton.vue.js +40 -4
  55. package/dist/es/RichTextEditor/src/components/CodeBlockButton.css +4 -4
  56. package/dist/es/RichTextEditor/src/components/CodeBlockButton.vue.js +40 -4
  57. package/dist/es/RichTextEditor/src/components/ColorHighlightPopover.css +3 -3
  58. package/dist/es/RichTextEditor/src/components/ColorHighlightPopover.vue.js +40 -4
  59. package/dist/es/RichTextEditor/src/components/FontSizeDropdownMenu.css +3 -3
  60. package/dist/es/RichTextEditor/src/components/FontSizeDropdownMenu.vue.js +58 -4
  61. package/dist/es/RichTextEditor/src/components/HeadingDropdownMenu.css +3 -3
  62. package/dist/es/RichTextEditor/src/components/HeadingDropdownMenu.vue.js +69 -4
  63. package/dist/es/RichTextEditor/src/components/ImageUploadButton.css +4 -4
  64. package/dist/es/RichTextEditor/src/components/ImageUploadButton.vue.js +74 -4
  65. package/dist/es/RichTextEditor/src/components/LinkPopover.css +4 -4
  66. package/dist/es/RichTextEditor/src/components/LinkPopover.vue.js +92 -4
  67. package/dist/es/RichTextEditor/src/components/LinkPopover2.css +4 -4
  68. package/dist/es/RichTextEditor/src/components/ListDropdownMenu.css +3 -3
  69. package/dist/es/RichTextEditor/src/components/ListDropdownMenu.vue.js +76 -4
  70. package/dist/es/RichTextEditor/src/components/MarkButton.css +4 -4
  71. package/dist/es/RichTextEditor/src/components/MarkButton.vue.js +89 -4
  72. package/dist/es/RichTextEditor/src/components/TableButton.css +3 -3
  73. package/dist/es/RichTextEditor/src/components/TableButton.vue.js +165 -4
  74. package/dist/es/RichTextEditor/src/components/TextAlignDropdownMenu.css +3 -3
  75. package/dist/es/RichTextEditor/src/components/TextAlignDropdownMenu.vue.js +85 -4
  76. package/dist/es/RichTextEditor/src/components/TextColorPopover.css +3 -3
  77. package/dist/es/RichTextEditor/src/components/TextColorPopover.vue.js +40 -4
  78. package/dist/es/RichTextEditor/src/components/ToolbarGroup.css +3 -3
  79. package/dist/es/RichTextEditor/src/components/ToolbarGroup.vue.js +19 -4
  80. package/dist/es/RichTextEditor/src/components/ToolbarSeparator.css +3 -3
  81. package/dist/es/RichTextEditor/src/components/ToolbarSeparator.vue.js +17 -4
  82. package/dist/es/RichTextEditor/src/components/UndoRedoButton.css +4 -4
  83. package/dist/es/RichTextEditor/src/components/UndoRedoButton.vue.js +54 -4
  84. package/dist/es/RichTextEditor/src/components/VideoUploadButton.css +4 -4
  85. package/dist/es/RichTextEditor/src/components/VideoUploadButton.vue.js +74 -4
  86. package/dist/es/RichTextEditor/src/components/basic/ColorPicker.css +4 -4
  87. package/dist/es/RichTextEditor/src/components/basic/ColorPicker.vue.js +101 -4
  88. package/dist/es/RichTextEditor/src/components/basic/MediaUploadModal.css +3 -3
  89. package/dist/es/RichTextEditor/src/components/basic/MediaUploadModal.vue.js +364 -4
  90. package/dist/es/RichTextEditor/src/components/basic/MediaUploadModal2.css +3 -3
  91. package/dist/es/RichTextEditor/src/components/basic/SelectMenu.css +4 -4
  92. package/dist/es/RichTextEditor/src/components/basic/SelectMenu.vue.js +137 -4
  93. package/dist/es/RichTextEditor/src/components/basic/SelectMenu2.css +4 -4
  94. package/dist/es/RichTextEditor/src/constant/index.js +53 -4
  95. package/dist/es/RichTextEditor/src/extensions/video.js +68 -4
  96. package/dist/es/RichTextEditor/src/index.css +4 -4
  97. package/dist/es/RichTextEditor/src/index.vue.js +158 -4
  98. package/dist/es/RichTextEditor/src/index2.css +4 -4
  99. package/dist/es/RichTextEditor/src/props.js +24 -4
  100. package/dist/es/ScaleScreen/index.js +9 -4
  101. package/dist/es/ScaleScreen/src/index.css +3 -3
  102. package/dist/es/ScaleScreen/src/index.vue.js +118 -4
  103. package/dist/es/ScaleScreen/src/index2.css +3 -3
  104. package/dist/es/Transition/index.js +30 -4
  105. package/dist/es/Transition/src/CollapseTransition.css +3 -3
  106. package/dist/es/Transition/src/CollapseTransition.vue.js +44 -4
  107. package/dist/es/Transition/src/CollapseTransition2.css +3 -3
  108. package/dist/es/Transition/src/CreateTransition.js +75 -6
  109. package/dist/es/Transition/src/ExpandTransition.js +42 -4
  110. package/dist/es/Transition/src/style/index.css +3 -3
  111. package/dist/es/Transition/style.js +4 -4
  112. package/dist/es/VideoBackground/index.js +9 -4
  113. package/dist/es/VideoBackground/src/helper.js +32 -4
  114. package/dist/es/VideoBackground/src/index.css +3 -3
  115. package/dist/es/VideoBackground/src/index.vue.js +111 -4
  116. package/dist/es/VideoBackground/src/index2.css +3 -3
  117. package/dist/es/VideoBackground/src/index3.css +3 -3
  118. package/dist/es/VideoBackground/src/videoBackground.js +34 -4
  119. package/dist/es/VideoPlayer/index.js +9 -4
  120. package/dist/es/VideoPlayer/src/index.css +3 -3
  121. package/dist/es/VideoPlayer/src/index.vue.js +63 -4
  122. package/dist/es/VirtualScroll/index.js +9 -4
  123. package/dist/es/VirtualScroll/src/index.css +3 -3
  124. package/dist/es/VirtualScroll/src/index.vue.js +11 -4
  125. package/dist/es/VirtualScroll/src/index.vue2.js +107 -4
  126. package/dist/es/VirtualScroll/src/index2.css +3 -3
  127. package/dist/es/_virtual/_commonjsHelpers.js +9 -4
  128. package/dist/es/_virtual/_plugin-vue_export-helper.js +12 -4
  129. package/dist/es/_virtual/delegate.js +10 -4
  130. package/dist/es/_virtual/download.js +10 -4
  131. package/dist/es/_virtual/download2.js +7 -4
  132. package/dist/es/_virtual/index.js +5 -4
  133. package/dist/es/_virtual/index2.js +7 -4
  134. package/dist/es/_virtual/index3.js +21 -0
  135. package/dist/es/{node_modules/@tanstack/store/dist/esm/types.js → _virtual/index4.js} +7 -4
  136. package/dist/es/hooks/useLocale.js +28 -4
  137. package/dist/es/hooks/useNamespace.js +11 -4
  138. package/dist/es/index.js +79 -4
  139. package/dist/es/locale/lang/en-US.js +167 -4
  140. package/dist/es/locale/lang/ja-JP.js +167 -4
  141. package/dist/es/locale/lang/zh-CN.js +167 -4
  142. package/dist/es/node_modules/@codemirror/autocomplete/dist/index.js +1379 -4
  143. package/dist/es/node_modules/@codemirror/commands/dist/index.js +847 -4
  144. package/dist/es/node_modules/@codemirror/lang-java/dist/index.js +41 -6
  145. package/dist/es/node_modules/@codemirror/lang-javascript/dist/index.js +315 -20
  146. package/dist/es/node_modules/@codemirror/lang-json/dist/index.js +51 -6
  147. package/dist/es/node_modules/@codemirror/lang-python/dist/index.js +402 -15
  148. package/dist/es/node_modules/@codemirror/lang-sql/dist/index.js +500 -7
  149. package/dist/es/node_modules/@codemirror/lang-xml/dist/index.js +219 -7
  150. package/dist/es/node_modules/@codemirror/lang-yaml/dist/index.js +54 -6
  151. package/dist/es/node_modules/@codemirror/language/dist/index.js +1304 -4
  152. package/dist/es/node_modules/@codemirror/lint/dist/index.js +660 -6
  153. package/dist/es/node_modules/@codemirror/search/dist/index.js +842 -5
  154. package/dist/es/node_modules/@codemirror/state/dist/index.js +2646 -4
  155. package/dist/es/node_modules/@codemirror/theme-one-dark/dist/index.js +135 -4
  156. package/dist/es/node_modules/@codemirror/view/dist/index.js +7492 -4
  157. package/dist/es/node_modules/@lezer/common/dist/index.js +1433 -5
  158. package/dist/es/node_modules/@lezer/highlight/dist/index.js +640 -4
  159. package/dist/es/node_modules/@lezer/java/dist/index.js +65 -4
  160. package/dist/es/node_modules/@lezer/javascript/dist/index.js +164 -4
  161. package/dist/es/node_modules/@lezer/json/dist/index.js +37 -4
  162. package/dist/es/node_modules/@lezer/lr/dist/index.js +1312 -4
  163. package/dist/es/node_modules/@lezer/python/dist/index.js +224 -4
  164. package/dist/es/node_modules/@lezer/xml/dist/index.js +103 -4
  165. package/dist/es/node_modules/@lezer/yaml/dist/index.js +277 -4
  166. package/dist/es/node_modules/@marijn/find-cluster-break/src/index.js +72 -4
  167. package/dist/es/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js +181 -4
  168. package/dist/es/node_modules/@tanstack/form-core/dist/esm/EventClient.js +16 -4
  169. package/dist/es/node_modules/@tanstack/form-core/dist/esm/FieldApi.js +409 -4
  170. package/dist/es/node_modules/@tanstack/form-core/dist/esm/FormApi.js +792 -4
  171. package/dist/es/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js +58 -4
  172. package/dist/es/node_modules/@tanstack/form-core/dist/esm/metaHelper.js +112 -5
  173. package/dist/es/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js +48 -4
  174. package/dist/es/node_modules/@tanstack/form-core/dist/esm/utils.js +216 -4
  175. package/dist/es/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js +32 -4
  176. package/dist/es/node_modules/@tanstack/store/dist/esm/alien.js +221 -0
  177. package/dist/es/node_modules/@tanstack/store/dist/esm/atom.js +136 -0
  178. package/dist/es/node_modules/@tanstack/store/dist/esm/batch.js +25 -0
  179. package/dist/es/node_modules/@tanstack/store/dist/esm/store.js +47 -4
  180. package/dist/es/node_modules/@tanstack/vue-form/dist/esm/useField.js +41 -4
  181. package/dist/es/node_modules/@tanstack/vue-form/dist/esm/useForm.js +36 -4
  182. package/dist/es/node_modules/@tanstack/vue-store/dist/esm/index.js +51 -4
  183. package/dist/es/node_modules/@tiptap/core/dist/index.js +3984 -4
  184. package/dist/es/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +20 -4
  185. package/dist/es/node_modules/@tiptap/extension-blockquote/dist/index.js +60 -5
  186. package/dist/es/node_modules/@tiptap/extension-bold/dist/index.js +82 -5
  187. package/dist/es/node_modules/@tiptap/extension-character-count/dist/index.js +9 -4
  188. package/dist/es/node_modules/@tiptap/extension-code/dist/index.js +57 -4
  189. package/dist/es/node_modules/@tiptap/extension-code-block/dist/index.js +220 -4
  190. package/dist/es/node_modules/@tiptap/extension-document/dist/index.js +15 -4
  191. package/dist/es/node_modules/@tiptap/extension-hard-break/dist/index.js +62 -4
  192. package/dist/es/node_modules/@tiptap/extension-heading/dist/index.js +66 -4
  193. package/dist/es/node_modules/@tiptap/extension-highlight/dist/index.js +88 -4
  194. package/dist/es/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +59 -4
  195. package/dist/es/node_modules/@tiptap/extension-image/dist/index.js +133 -4
  196. package/dist/es/node_modules/@tiptap/extension-italic/dist/index.js +80 -4
  197. package/dist/es/node_modules/@tiptap/extension-link/dist/index.js +316 -4
  198. package/dist/es/node_modules/@tiptap/extension-list/dist/index.js +731 -4
  199. package/dist/es/node_modules/@tiptap/extension-paragraph/dist/index.js +47 -4
  200. package/dist/es/node_modules/@tiptap/extension-strike/dist/index.js +69 -4
  201. package/dist/es/node_modules/@tiptap/extension-subscript/dist/index.js +44 -4
  202. package/dist/es/node_modules/@tiptap/extension-superscript/dist/index.js +44 -4
  203. package/dist/es/node_modules/@tiptap/extension-table/dist/index.js +383 -4
  204. package/dist/es/node_modules/@tiptap/extension-task-item/dist/index.js +9 -4
  205. package/dist/es/node_modules/@tiptap/extension-task-list/dist/index.js +9 -4
  206. package/dist/es/node_modules/@tiptap/extension-text/dist/index.js +16 -4
  207. package/dist/es/node_modules/@tiptap/extension-text-align/dist/index.js +50 -4
  208. package/dist/es/node_modules/@tiptap/extension-text-style/dist/index.js +243 -4
  209. package/dist/es/node_modules/@tiptap/extension-underline/dist/index.js +68 -4
  210. package/dist/es/node_modules/@tiptap/extensions/dist/index.js +299 -4
  211. package/dist/es/node_modules/@tiptap/html/dist/index.js +28 -0
  212. package/dist/es/node_modules/@tiptap/starter-kit/dist/index.js +32 -4
  213. package/dist/es/node_modules/@tiptap/vue-3/dist/index.js +260 -4
  214. package/dist/es/node_modules/@vueuse/core/dist/index.js +354 -4
  215. package/dist/es/node_modules/@vueuse/shared/dist/index.js +139 -4
  216. package/dist/es/node_modules/codemirror/dist/index.js +43 -4
  217. package/dist/es/node_modules/crelt/index.js +30 -4
  218. package/dist/es/node_modules/delegate/src/closest.js +24 -4
  219. package/dist/es/node_modules/delegate/src/delegate.js +32 -4
  220. package/dist/es/node_modules/downloadjs/download.js +80 -4
  221. package/dist/es/node_modules/eventemitter3/index.js +114 -4
  222. package/dist/es/node_modules/linkifyjs/dist/linkify.js +710 -4
  223. package/dist/es/node_modules/lodash-es/_DataView.js +9 -4
  224. package/dist/es/node_modules/lodash-es/_Hash.js +23 -4
  225. package/dist/es/node_modules/lodash-es/_ListCache.js +23 -4
  226. package/dist/es/node_modules/lodash-es/_Map.js +9 -4
  227. package/dist/es/node_modules/lodash-es/_MapCache.js +23 -4
  228. package/dist/es/node_modules/lodash-es/_Promise.js +9 -4
  229. package/dist/es/node_modules/lodash-es/_Set.js +9 -4
  230. package/dist/es/node_modules/lodash-es/_SetCache.js +26 -0
  231. package/dist/es/node_modules/lodash-es/_Stack.js +21 -4
  232. package/dist/es/node_modules/lodash-es/_Symbol.js +8 -4
  233. package/dist/es/node_modules/lodash-es/_Uint8Array.js +8 -4
  234. package/dist/es/node_modules/lodash-es/_WeakMap.js +9 -4
  235. package/dist/es/node_modules/lodash-es/_apply.js +19 -4
  236. package/dist/es/node_modules/lodash-es/_arrayEach.js +11 -4
  237. package/dist/es/node_modules/lodash-es/_arrayFilter.js +13 -4
  238. package/dist/es/node_modules/lodash-es/_arrayIncludes.js +21 -0
  239. package/dist/es/node_modules/lodash-es/_arrayIncludesWith.js +22 -0
  240. package/dist/es/node_modules/lodash-es/_arrayLikeKeys.js +23 -4
  241. package/dist/es/node_modules/lodash-es/_arrayMap.js +11 -4
  242. package/dist/es/node_modules/lodash-es/_arrayPush.js +11 -4
  243. package/dist/es/node_modules/lodash-es/_arraySome.js +22 -0
  244. package/dist/es/node_modules/lodash-es/_asciiToArray.js +9 -4
  245. package/dist/es/node_modules/lodash-es/_assignMergeValue.js +21 -0
  246. package/dist/es/node_modules/lodash-es/_assignValue.js +13 -4
  247. package/dist/es/node_modules/lodash-es/_assocIndexOf.js +13 -4
  248. package/dist/es/node_modules/lodash-es/_baseAssignValue.js +15 -4
  249. package/dist/es/node_modules/lodash-es/_baseClone.js +57 -4
  250. package/dist/es/node_modules/lodash-es/_baseCreate.js +30 -0
  251. package/dist/es/node_modules/lodash-es/_baseFindIndex.js +22 -0
  252. package/dist/es/node_modules/lodash-es/_baseFlatten.js +16 -4
  253. package/dist/es/node_modules/lodash-es/_baseFor.js +18 -0
  254. package/dist/es/node_modules/lodash-es/_baseGet.js +14 -4
  255. package/dist/es/node_modules/lodash-es/_baseGetAllKeys.js +12 -4
  256. package/dist/es/node_modules/lodash-es/_baseGetTag.js +13 -4
  257. package/dist/es/node_modules/lodash-es/_baseIndexOf.js +22 -0
  258. package/dist/es/node_modules/lodash-es/_baseIntersection.js +42 -0
  259. package/dist/es/node_modules/lodash-es/_baseIsArguments.js +12 -4
  260. package/dist/es/node_modules/lodash-es/_baseIsEqual.js +21 -0
  261. package/dist/es/node_modules/lodash-es/_baseIsEqualDeep.js +45 -0
  262. package/dist/es/node_modules/lodash-es/_baseIsMap.js +12 -4
  263. package/dist/es/node_modules/lodash-es/_baseIsNaN.js +19 -0
  264. package/dist/es/node_modules/lodash-es/_baseIsNative.js +19 -4
  265. package/dist/es/node_modules/lodash-es/_baseIsRegExp.js +12 -4
  266. package/dist/es/node_modules/lodash-es/_baseIsSet.js +12 -4
  267. package/dist/es/node_modules/lodash-es/_baseIsTypedArray.js +15 -4
  268. package/dist/es/node_modules/lodash-es/_baseKeys.js +27 -0
  269. package/dist/es/node_modules/lodash-es/_baseKeysIn.js +18 -4
  270. package/dist/es/node_modules/lodash-es/_baseMerge.js +33 -0
  271. package/dist/es/node_modules/lodash-es/_baseMergeDeep.js +44 -0
  272. package/dist/es/node_modules/lodash-es/_baseRest.js +22 -0
  273. package/dist/es/node_modules/lodash-es/_baseSetToString.js +17 -4
  274. package/dist/es/node_modules/lodash-es/_baseSlice.js +13 -4
  275. package/dist/es/node_modules/lodash-es/_baseTimes.js +11 -4
  276. package/dist/es/node_modules/lodash-es/_baseToString.js +21 -4
  277. package/dist/es/node_modules/lodash-es/_baseUnary.js +11 -4
  278. package/dist/es/node_modules/lodash-es/_baseUniq.js +46 -0
  279. package/dist/es/node_modules/lodash-es/_baseUnset.js +31 -4
  280. package/dist/es/node_modules/lodash-es/_cacheHas.js +19 -0
  281. package/dist/es/node_modules/lodash-es/_castArrayLikeObject.js +20 -0
  282. package/dist/es/node_modules/lodash-es/_castPath.js +13 -4
  283. package/dist/es/node_modules/lodash-es/_castSlice.js +11 -4
  284. package/dist/es/node_modules/lodash-es/_cloneArrayBuffer.js +11 -4
  285. package/dist/es/node_modules/lodash-es/_cloneBuffer.js +14 -4
  286. package/dist/es/node_modules/lodash-es/_cloneDataView.js +11 -4
  287. package/dist/es/node_modules/lodash-es/_cloneRegExp.js +11 -4
  288. package/dist/es/node_modules/lodash-es/_cloneSymbol.js +11 -4
  289. package/dist/es/node_modules/lodash-es/_cloneTypedArray.js +11 -4
  290. package/dist/es/node_modules/lodash-es/_copyArray.js +22 -0
  291. package/dist/es/node_modules/lodash-es/_copyObject.js +17 -4
  292. package/dist/es/node_modules/lodash-es/_coreJsData.js +8 -4
  293. package/dist/es/node_modules/lodash-es/_createAssigner.js +28 -0
  294. package/dist/es/node_modules/lodash-es/_createBaseFor.js +26 -0
  295. package/dist/es/node_modules/lodash-es/_createCaseFirst.js +17 -4
  296. package/dist/es/node_modules/lodash-es/_createSet.js +22 -0
  297. package/dist/es/node_modules/lodash-es/_customOmitClone.js +10 -4
  298. package/dist/es/node_modules/lodash-es/_defineProperty.js +14 -4
  299. package/dist/es/node_modules/lodash-es/_equalArrays.js +53 -0
  300. package/dist/es/node_modules/lodash-es/_equalByTag.js +58 -0
  301. package/dist/es/node_modules/lodash-es/_equalObjects.js +49 -0
  302. package/dist/es/node_modules/lodash-es/_flatRest.js +12 -4
  303. package/dist/es/node_modules/lodash-es/_freeGlobal.js +7 -4
  304. package/dist/es/node_modules/lodash-es/_getAllKeys.js +22 -0
  305. package/dist/es/node_modules/lodash-es/_getAllKeysIn.js +12 -4
  306. package/dist/es/node_modules/lodash-es/_getMapData.js +11 -4
  307. package/dist/es/node_modules/lodash-es/_getNative.js +12 -4
  308. package/dist/es/node_modules/lodash-es/_getPrototype.js +8 -4
  309. package/dist/es/node_modules/lodash-es/_getRawTag.js +18 -4
  310. package/dist/es/node_modules/lodash-es/_getSymbols.js +13 -4
  311. package/dist/es/node_modules/lodash-es/_getSymbolsIn.js +15 -4
  312. package/dist/es/node_modules/lodash-es/_getTag.js +31 -4
  313. package/dist/es/node_modules/lodash-es/_getValue.js +9 -4
  314. package/dist/es/node_modules/lodash-es/_hasUnicode.js +10 -4
  315. package/dist/es/node_modules/lodash-es/_hashClear.js +10 -4
  316. package/dist/es/node_modules/lodash-es/_hashDelete.js +10 -4
  317. package/dist/es/node_modules/lodash-es/_hashGet.js +16 -4
  318. package/dist/es/node_modules/lodash-es/_hashHas.js +12 -4
  319. package/dist/es/node_modules/lodash-es/_hashSet.js +12 -4
  320. package/dist/es/node_modules/lodash-es/_initCloneArray.js +11 -4
  321. package/dist/es/node_modules/lodash-es/_initCloneByTag.js +45 -4
  322. package/dist/es/node_modules/lodash-es/_initCloneObject.js +22 -0
  323. package/dist/es/node_modules/lodash-es/_isFlattenable.js +13 -4
  324. package/dist/es/node_modules/lodash-es/_isIndex.js +11 -4
  325. package/dist/es/node_modules/lodash-es/_isIterateeCall.js +26 -0
  326. package/dist/es/node_modules/lodash-es/_isKey.js +15 -4
  327. package/dist/es/node_modules/lodash-es/_isKeyable.js +10 -4
  328. package/dist/es/node_modules/lodash-es/_isMasked.js +14 -4
  329. package/dist/es/node_modules/lodash-es/_isPrototype.js +11 -4
  330. package/dist/es/node_modules/lodash-es/_listCacheClear.js +9 -4
  331. package/dist/es/node_modules/lodash-es/_listCacheDelete.js +15 -4
  332. package/dist/es/node_modules/lodash-es/_listCacheGet.js +11 -4
  333. package/dist/es/node_modules/lodash-es/_listCacheHas.js +10 -4
  334. package/dist/es/node_modules/lodash-es/_listCacheSet.js +11 -4
  335. package/dist/es/node_modules/lodash-es/_mapCacheClear.js +16 -4
  336. package/dist/es/node_modules/lodash-es/_mapCacheDelete.js +11 -4
  337. package/dist/es/node_modules/lodash-es/_mapCacheGet.js +10 -4
  338. package/dist/es/node_modules/lodash-es/_mapCacheHas.js +10 -4
  339. package/dist/es/node_modules/lodash-es/_mapCacheSet.js +11 -4
  340. package/dist/es/node_modules/lodash-es/_mapToArray.js +22 -0
  341. package/dist/es/node_modules/lodash-es/_memoizeCapped.js +14 -4
  342. package/dist/es/node_modules/lodash-es/_nativeCreate.js +8 -4
  343. package/dist/es/node_modules/lodash-es/_nativeKeys.js +18 -0
  344. package/dist/es/node_modules/lodash-es/_nativeKeysIn.js +13 -4
  345. package/dist/es/node_modules/lodash-es/_nodeUtil.js +14 -4
  346. package/dist/es/node_modules/lodash-es/_objectToString.js +10 -4
  347. package/dist/es/node_modules/lodash-es/_overArg.js +11 -4
  348. package/dist/es/node_modules/lodash-es/_overRest.js +18 -4
  349. package/dist/es/node_modules/lodash-es/_parent.js +11 -4
  350. package/dist/es/node_modules/lodash-es/_root.js +8 -4
  351. package/dist/es/node_modules/lodash-es/_safeGet.js +20 -0
  352. package/dist/es/node_modules/lodash-es/_setCacheAdd.js +20 -0
  353. package/dist/es/node_modules/lodash-es/_setCacheHas.js +19 -0
  354. package/dist/es/node_modules/lodash-es/_setToArray.js +22 -0
  355. package/dist/es/node_modules/lodash-es/_setToString.js +9 -4
  356. package/dist/es/node_modules/lodash-es/_shortOut.js +19 -4
  357. package/dist/es/node_modules/lodash-es/_stackClear.js +10 -4
  358. package/dist/es/node_modules/lodash-es/_stackDelete.js +10 -4
  359. package/dist/es/node_modules/lodash-es/_stackGet.js +9 -4
  360. package/dist/es/node_modules/lodash-es/_stackHas.js +9 -4
  361. package/dist/es/node_modules/lodash-es/_stackSet.js +20 -4
  362. package/dist/es/node_modules/lodash-es/_strictIndexOf.js +22 -0
  363. package/dist/es/node_modules/lodash-es/_stringToArray.js +12 -4
  364. package/dist/es/node_modules/lodash-es/_stringToPath.js +13 -4
  365. package/dist/es/node_modules/lodash-es/_toKey.js +13 -4
  366. package/dist/es/node_modules/lodash-es/_toSource.js +20 -4
  367. package/dist/es/node_modules/lodash-es/_unicodeToArray.js +10 -4
  368. package/dist/es/node_modules/lodash-es/constant.js +11 -4
  369. package/dist/es/node_modules/lodash-es/eq.js +9 -4
  370. package/dist/es/node_modules/lodash-es/flatten.js +11 -4
  371. package/dist/es/node_modules/lodash-es/get.js +11 -4
  372. package/dist/es/node_modules/lodash-es/identity.js +9 -4
  373. package/dist/es/node_modules/lodash-es/intersectionWith.js +25 -0
  374. package/dist/es/node_modules/lodash-es/isArguments.js +13 -4
  375. package/dist/es/node_modules/lodash-es/isArray.js +7 -4
  376. package/dist/es/node_modules/lodash-es/isArrayLike.js +11 -4
  377. package/dist/es/node_modules/lodash-es/isArrayLikeObject.js +21 -0
  378. package/dist/es/node_modules/lodash-es/isBuffer.js +9 -4
  379. package/dist/es/node_modules/lodash-es/isEqual.js +20 -0
  380. package/dist/es/node_modules/lodash-es/isFinite.js +11 -4
  381. package/dist/es/node_modules/lodash-es/isFunction.js +15 -4
  382. package/dist/es/node_modules/lodash-es/isLength.js +10 -4
  383. package/dist/es/node_modules/lodash-es/isMap.js +10 -4
  384. package/dist/es/node_modules/lodash-es/isNaN.js +10 -4
  385. package/dist/es/node_modules/lodash-es/isNil.js +9 -4
  386. package/dist/es/node_modules/lodash-es/isNumber.js +12 -4
  387. package/dist/es/node_modules/lodash-es/isObject.js +10 -4
  388. package/dist/es/node_modules/lodash-es/isObjectLike.js +9 -4
  389. package/dist/es/node_modules/lodash-es/isPlainObject.js +19 -4
  390. package/dist/es/node_modules/lodash-es/isRegExp.js +10 -4
  391. package/dist/es/node_modules/lodash-es/isSet.js +10 -4
  392. package/dist/es/node_modules/lodash-es/isString.js +13 -4
  393. package/dist/es/node_modules/lodash-es/isSymbol.js +12 -4
  394. package/dist/es/node_modules/lodash-es/isTypedArray.js +10 -4
  395. package/dist/es/node_modules/lodash-es/keys.js +22 -0
  396. package/dist/es/node_modules/lodash-es/keysIn.js +12 -4
  397. package/dist/es/node_modules/lodash-es/last.js +10 -4
  398. package/dist/es/node_modules/lodash-es/memoize.js +21 -4
  399. package/dist/es/node_modules/lodash-es/mergeWith.js +21 -0
  400. package/dist/es/node_modules/lodash-es/noop.js +18 -0
  401. package/dist/es/node_modules/lodash-es/omit.js +26 -4
  402. package/dist/es/node_modules/lodash-es/stubArray.js +9 -4
  403. package/dist/es/node_modules/lodash-es/stubFalse.js +9 -4
  404. package/dist/es/node_modules/lodash-es/toPlainObject.js +21 -0
  405. package/dist/es/node_modules/lodash-es/toString.js +10 -4
  406. package/dist/es/node_modules/lodash-es/unionWith.js +25 -0
  407. package/dist/es/node_modules/lodash-es/upperFirst.js +8 -4
  408. package/dist/es/node_modules/orderedmap/dist/index.js +106 -4
  409. package/dist/es/node_modules/path-to-regexp/dist/index.js +275 -0
  410. package/dist/es/node_modules/prosemirror-commands/dist/index.js +391 -4
  411. package/dist/es/node_modules/prosemirror-dropcursor/dist/index.js +89 -4
  412. package/dist/es/node_modules/prosemirror-gapcursor/dist/index.js +207 -4
  413. package/dist/es/node_modules/prosemirror-history/dist/index.js +251 -4
  414. package/dist/es/node_modules/prosemirror-keymap/dist/index.js +65 -4
  415. package/dist/es/node_modules/prosemirror-model/dist/index.js +2736 -4
  416. package/dist/es/node_modules/prosemirror-schema-list/dist/index.js +91 -4
  417. package/dist/es/node_modules/prosemirror-state/dist/index.js +825 -4
  418. package/dist/es/node_modules/prosemirror-tables/dist/index.js +1449 -4
  419. package/dist/es/node_modules/prosemirror-transform/dist/index.js +1539 -4
  420. package/dist/es/node_modules/prosemirror-view/dist/index.js +3797 -4
  421. package/dist/es/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +300 -0
  422. package/dist/es/node_modules/rope-sequence/dist/index.js +103 -4
  423. package/dist/es/node_modules/sortablejs/modular/sortable.esm.js +1283 -0
  424. package/dist/es/node_modules/style-mod/src/style-mod.js +112 -4
  425. package/dist/es/node_modules/title-case/dist/index.js +20 -0
  426. package/dist/es/node_modules/vue-codemirror/dist/vue-codemirror.esm.js +135 -4
  427. package/dist/es/node_modules/w3c-keyname/index.js +96 -4
  428. package/dist/es/node_modules/xgplayer/dist/index.min.css +3 -3
  429. package/dist/es/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +200 -4
  430. package/dist/es/node_modules/xgplayer/es/constant.js +10 -4
  431. package/dist/es/node_modules/xgplayer/es/defaultConfig.js +90 -4
  432. package/dist/es/node_modules/xgplayer/es/error.js +67 -4
  433. package/dist/es/node_modules/xgplayer/es/events.js +70 -4
  434. package/dist/es/node_modules/xgplayer/es/index.umd.js +48 -4
  435. package/dist/es/node_modules/xgplayer/es/instManager.js +104 -4
  436. package/dist/es/node_modules/xgplayer/es/lang/en.js +82 -4
  437. package/dist/es/node_modules/xgplayer/es/lang/i18n.js +78 -4
  438. package/dist/es/node_modules/xgplayer/es/lang/jp.js +82 -4
  439. package/dist/es/node_modules/xgplayer/es/lang/zh-cn.js +82 -4
  440. package/dist/es/node_modules/xgplayer/es/mediaProxy.js +469 -4
  441. package/dist/es/node_modules/xgplayer/es/player.js +1243 -4
  442. package/dist/es/node_modules/xgplayer/es/plugin/basePlugin.js +210 -4
  443. package/dist/es/node_modules/xgplayer/es/plugin/hooksDescriptor.js +133 -4
  444. package/dist/es/node_modules/xgplayer/es/plugin/plugin.js +369 -4
  445. package/dist/es/node_modules/xgplayer/es/plugin/pluginsManager.js +207 -4
  446. package/dist/es/node_modules/xgplayer/es/plugin/preset.js +17 -4
  447. package/dist/es/node_modules/xgplayer/es/plugin/resizeObserver.js +84 -4
  448. package/dist/es/node_modules/xgplayer/es/plugins/assets/back.js +13 -4
  449. package/dist/es/node_modules/xgplayer/es/plugins/assets/download.js +23 -4
  450. package/dist/es/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +12 -4
  451. package/dist/es/node_modules/xgplayer/es/plugins/assets/exitFull.js +12 -4
  452. package/dist/es/node_modules/xgplayer/es/plugins/assets/loading.js +12 -4
  453. package/dist/es/node_modules/xgplayer/es/plugins/assets/pause.js +12 -4
  454. package/dist/es/node_modules/xgplayer/es/plugins/assets/pipIcon.js +13 -4
  455. package/dist/es/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +16 -4
  456. package/dist/es/node_modules/xgplayer/es/plugins/assets/play.js +12 -4
  457. package/dist/es/node_modules/xgplayer/es/plugins/assets/playNext.js +12 -4
  458. package/dist/es/node_modules/xgplayer/es/plugins/assets/replay.js +12 -4
  459. package/dist/es/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +12 -4
  460. package/dist/es/node_modules/xgplayer/es/plugins/assets/requestFull.js +12 -4
  461. package/dist/es/node_modules/xgplayer/es/plugins/assets/rotate.js +20 -4
  462. package/dist/es/node_modules/xgplayer/es/plugins/assets/seekicon.js +15 -4
  463. package/dist/es/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +13 -4
  464. package/dist/es/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +13 -4
  465. package/dist/es/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +13 -4
  466. package/dist/es/node_modules/xgplayer/es/plugins/common/iconPlugin.js +38 -4
  467. package/dist/es/node_modules/xgplayer/es/plugins/common/iconTools.js +15 -4
  468. package/dist/es/node_modules/xgplayer/es/plugins/common/optionList.js +82 -4
  469. package/dist/es/node_modules/xgplayer/es/plugins/common/optionsIcon.js +196 -4
  470. package/dist/es/node_modules/xgplayer/es/plugins/common/thumbnail.js +144 -4
  471. package/dist/es/node_modules/xgplayer/es/plugins/controls/index.js +174 -4
  472. package/dist/es/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +108 -4
  473. package/dist/es/node_modules/xgplayer/es/plugins/definition/index.js +113 -4
  474. package/dist/es/node_modules/xgplayer/es/plugins/download/index.js +86 -4
  475. package/dist/es/node_modules/xgplayer/es/plugins/dynamicBg/index.js +235 -5
  476. package/dist/es/node_modules/xgplayer/es/plugins/enter/index.js +45 -4
  477. package/dist/es/node_modules/xgplayer/es/plugins/error/index.js +71 -4
  478. package/dist/es/node_modules/xgplayer/es/plugins/fpsDetect/index.js +119 -4
  479. package/dist/es/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +71 -4
  480. package/dist/es/node_modules/xgplayer/es/plugins/fullscreen/index.js +153 -4
  481. package/dist/es/node_modules/xgplayer/es/plugins/gapJump/index.js +99 -4
  482. package/dist/es/node_modules/xgplayer/es/plugins/keyboard/index.js +302 -4
  483. package/dist/es/node_modules/xgplayer/es/plugins/loading/index.js +49 -4
  484. package/dist/es/node_modules/xgplayer/es/plugins/logger/index.js +174 -5
  485. package/dist/es/node_modules/xgplayer/es/plugins/miniScreen/index.js +172 -4
  486. package/dist/es/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +58 -4
  487. package/dist/es/node_modules/xgplayer/es/plugins/mobile/index.js +446 -4
  488. package/dist/es/node_modules/xgplayer/es/plugins/mobile/touch.js +141 -4
  489. package/dist/es/node_modules/xgplayer/es/plugins/pc/index.js +125 -4
  490. package/dist/es/node_modules/xgplayer/es/plugins/pip/index.js +219 -4
  491. package/dist/es/node_modules/xgplayer/es/plugins/play/index.js +105 -4
  492. package/dist/es/node_modules/xgplayer/es/plugins/playNext/index.js +81 -4
  493. package/dist/es/node_modules/xgplayer/es/plugins/playbackRate/index.js +103 -4
  494. package/dist/es/node_modules/xgplayer/es/plugins/poster/index.js +122 -4
  495. package/dist/es/node_modules/xgplayer/es/plugins/progress/index.js +434 -4
  496. package/dist/es/node_modules/xgplayer/es/plugins/progress/innerList.js +218 -4
  497. package/dist/es/node_modules/xgplayer/es/plugins/progress/miniProgress.js +96 -4
  498. package/dist/es/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +178 -4
  499. package/dist/es/node_modules/xgplayer/es/plugins/progressPreview/index.js +295 -4
  500. package/dist/es/node_modules/xgplayer/es/plugins/prompt/index.js +89 -4
  501. package/dist/es/node_modules/xgplayer/es/plugins/replay/index.js +95 -4
  502. package/dist/es/node_modules/xgplayer/es/plugins/rotate/index.js +109 -4
  503. package/dist/es/node_modules/xgplayer/es/plugins/screenShot/index.js +137 -4
  504. package/dist/es/node_modules/xgplayer/es/plugins/start/index.js +225 -4
  505. package/dist/es/node_modules/xgplayer/es/plugins/stats/index.js +155 -4
  506. package/dist/es/node_modules/xgplayer/es/plugins/testspeed/index.js +137 -4
  507. package/dist/es/node_modules/xgplayer/es/plugins/time/index.js +167 -4
  508. package/dist/es/node_modules/xgplayer/es/plugins/time/timesegments.js +149 -4
  509. package/dist/es/node_modules/xgplayer/es/plugins/volume/index.js +209 -4
  510. package/dist/es/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +56 -4
  511. package/dist/es/node_modules/xgplayer/es/presets/default.js +64 -4
  512. package/dist/es/node_modules/xgplayer/es/state.js +16 -4
  513. package/dist/es/node_modules/xgplayer/es/stateClassMap.js +37 -4
  514. package/dist/es/node_modules/xgplayer/es/utils/database.js +86 -4
  515. package/dist/es/node_modules/xgplayer/es/utils/debug.js +37 -4
  516. package/dist/es/node_modules/xgplayer/es/utils/draggabilly.js +274 -4
  517. package/dist/es/node_modules/xgplayer/es/utils/sniffer.js +114 -4
  518. package/dist/es/node_modules/xgplayer/es/utils/util.js +520 -4
  519. package/dist/es/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +28 -4
  520. package/dist/es/node_modules/xgplayer/es/version.js +7 -4
  521. package/dist/es/packages/components/index.js +88 -4
  522. package/dist/es/packages/hooks/dist/index.js +81 -0
  523. package/dist/es/packages/utils/dist/index.js +599 -0
  524. package/dist/es/styles/tokens.css +3 -3
  525. package/dist/lib/Button/index.js +4 -4
  526. package/dist/lib/Button/src/Button.css +3 -3
  527. package/dist/lib/Button/src/Button.vue.js +4 -4
  528. package/dist/lib/Button/src/Button2.css +3 -3
  529. package/dist/lib/CodeEditor/index.js +4 -4
  530. package/dist/lib/CodeEditor/src/index.css +3 -3
  531. package/dist/lib/CodeEditor/src/index.vue.js +4 -4
  532. package/dist/lib/CodeEditor/src/index2.css +3 -3
  533. package/dist/lib/CodeEditor/src/index3.css +3 -3
  534. package/dist/lib/ConfigProvider/index.js +4 -4
  535. package/dist/lib/ConfigProvider/src/configProvider.js +4 -4
  536. package/dist/lib/ConfigProvider/src/configProviderProps.js +4 -4
  537. package/dist/lib/ConfigProvider/src/constants.js +4 -4
  538. package/dist/lib/ConfigProvider/src/useGlobalConfig.js +4 -4
  539. package/dist/lib/CountTo/index.js +4 -4
  540. package/dist/lib/CountTo/src/index.css +3 -3
  541. package/dist/lib/CountTo/src/index.vue.js +4 -4
  542. package/dist/lib/Ellipsis/index.js +4 -4
  543. package/dist/lib/Ellipsis/src/components/JsEllipsis.css +3 -3
  544. package/dist/lib/Ellipsis/src/components/JsEllipsis.vue.js +4 -4
  545. package/dist/lib/Ellipsis/src/components/NativeEllipsis.css +3 -3
  546. package/dist/lib/Ellipsis/src/components/NativeEllipsis.vue.js +4 -4
  547. package/dist/lib/Ellipsis/src/components/NativeEllipsis2.css +3 -3
  548. package/dist/lib/Ellipsis/src/index.css +3 -3
  549. package/dist/lib/Ellipsis/src/index.vue.js +4 -4
  550. package/dist/lib/Ellipsis/src/utils/utils.js +4 -4
  551. package/dist/lib/Form/index.js +4 -4
  552. package/dist/lib/Form/src/Form.css +3 -3
  553. package/dist/lib/Form/src/Form.vue.js +4 -4
  554. package/dist/lib/Form/src/Form2.css +3 -3
  555. package/dist/lib/Form/src/styles/form.css +3 -3
  556. package/dist/lib/Marquee/index.js +4 -4
  557. package/dist/lib/Marquee/src/index.css +3 -3
  558. package/dist/lib/Marquee/src/index.vue.js +4 -4
  559. package/dist/lib/Marquee/src/index2.css +3 -3
  560. package/dist/lib/Overlay/index.js +4 -4
  561. package/dist/lib/Overlay/src/Message.css +3 -3
  562. package/dist/lib/Overlay/src/Message.vue.js +4 -4
  563. package/dist/lib/Overlay/src/Message2.css +3 -3
  564. package/dist/lib/Overlay/src/Modal.css +3 -3
  565. package/dist/lib/Overlay/src/Modal.vue.js +4 -4
  566. package/dist/lib/Overlay/src/Modal2.css +3 -3
  567. package/dist/lib/Overlay/src/Notice.css +3 -3
  568. package/dist/lib/Overlay/src/Notice.vue.js +4 -4
  569. package/dist/lib/Overlay/src/Notice2.css +3 -3
  570. package/dist/lib/Overlay/src/Tooltip.css +3 -3
  571. package/dist/lib/Overlay/src/Tooltip.vue.js +4 -4
  572. package/dist/lib/Overlay/src/Tooltip2.css +3 -3
  573. package/dist/lib/RichTextEditor/index.js +4 -4
  574. package/dist/lib/RichTextEditor/src/ToolbarPanel.css +3 -3
  575. package/dist/lib/RichTextEditor/src/ToolbarPanel.vue.js +4 -4
  576. package/dist/lib/RichTextEditor/src/ToolbarPanel2.css +3 -3
  577. package/dist/lib/RichTextEditor/src/components/BlockquoteButton.css +4 -4
  578. package/dist/lib/RichTextEditor/src/components/BlockquoteButton.vue.js +4 -4
  579. package/dist/lib/RichTextEditor/src/components/CodeBlockButton.css +4 -4
  580. package/dist/lib/RichTextEditor/src/components/CodeBlockButton.vue.js +4 -4
  581. package/dist/lib/RichTextEditor/src/components/ColorHighlightPopover.css +3 -3
  582. package/dist/lib/RichTextEditor/src/components/ColorHighlightPopover.vue.js +4 -4
  583. package/dist/lib/RichTextEditor/src/components/FontSizeDropdownMenu.css +3 -3
  584. package/dist/lib/RichTextEditor/src/components/FontSizeDropdownMenu.vue.js +4 -4
  585. package/dist/lib/RichTextEditor/src/components/HeadingDropdownMenu.css +3 -3
  586. package/dist/lib/RichTextEditor/src/components/HeadingDropdownMenu.vue.js +4 -4
  587. package/dist/lib/RichTextEditor/src/components/ImageUploadButton.css +4 -4
  588. package/dist/lib/RichTextEditor/src/components/ImageUploadButton.vue.js +4 -4
  589. package/dist/lib/RichTextEditor/src/components/LinkPopover.css +4 -4
  590. package/dist/lib/RichTextEditor/src/components/LinkPopover.vue.js +4 -4
  591. package/dist/lib/RichTextEditor/src/components/LinkPopover2.css +4 -4
  592. package/dist/lib/RichTextEditor/src/components/ListDropdownMenu.css +3 -3
  593. package/dist/lib/RichTextEditor/src/components/ListDropdownMenu.vue.js +4 -4
  594. package/dist/lib/RichTextEditor/src/components/MarkButton.css +4 -4
  595. package/dist/lib/RichTextEditor/src/components/MarkButton.vue.js +4 -4
  596. package/dist/lib/RichTextEditor/src/components/TableButton.css +3 -3
  597. package/dist/lib/RichTextEditor/src/components/TableButton.vue.js +4 -4
  598. package/dist/lib/RichTextEditor/src/components/TextAlignDropdownMenu.css +3 -3
  599. package/dist/lib/RichTextEditor/src/components/TextAlignDropdownMenu.vue.js +4 -4
  600. package/dist/lib/RichTextEditor/src/components/TextColorPopover.css +3 -3
  601. package/dist/lib/RichTextEditor/src/components/TextColorPopover.vue.js +4 -4
  602. package/dist/lib/RichTextEditor/src/components/ToolbarGroup.css +3 -3
  603. package/dist/lib/RichTextEditor/src/components/ToolbarGroup.vue.js +4 -4
  604. package/dist/lib/RichTextEditor/src/components/ToolbarSeparator.css +3 -3
  605. package/dist/lib/RichTextEditor/src/components/ToolbarSeparator.vue.js +4 -4
  606. package/dist/lib/RichTextEditor/src/components/UndoRedoButton.css +4 -4
  607. package/dist/lib/RichTextEditor/src/components/UndoRedoButton.vue.js +4 -4
  608. package/dist/lib/RichTextEditor/src/components/VideoUploadButton.css +4 -4
  609. package/dist/lib/RichTextEditor/src/components/VideoUploadButton.vue.js +4 -4
  610. package/dist/lib/RichTextEditor/src/components/basic/ColorPicker.css +4 -4
  611. package/dist/lib/RichTextEditor/src/components/basic/ColorPicker.vue.js +4 -4
  612. package/dist/lib/RichTextEditor/src/components/basic/MediaUploadModal.css +3 -3
  613. package/dist/lib/RichTextEditor/src/components/basic/MediaUploadModal.vue.js +4 -4
  614. package/dist/lib/RichTextEditor/src/components/basic/MediaUploadModal2.css +3 -3
  615. package/dist/lib/RichTextEditor/src/components/basic/SelectMenu.css +4 -4
  616. package/dist/lib/RichTextEditor/src/components/basic/SelectMenu.vue.js +4 -4
  617. package/dist/lib/RichTextEditor/src/components/basic/SelectMenu2.css +4 -4
  618. package/dist/lib/RichTextEditor/src/constant/index.js +4 -4
  619. package/dist/lib/RichTextEditor/src/extensions/video.js +4 -4
  620. package/dist/lib/RichTextEditor/src/index.css +4 -4
  621. package/dist/lib/RichTextEditor/src/index.vue.js +4 -4
  622. package/dist/lib/RichTextEditor/src/index2.css +4 -4
  623. package/dist/lib/RichTextEditor/src/props.js +4 -4
  624. package/dist/lib/ScaleScreen/index.js +4 -4
  625. package/dist/lib/ScaleScreen/src/index.css +3 -3
  626. package/dist/lib/ScaleScreen/src/index.vue.js +4 -4
  627. package/dist/lib/ScaleScreen/src/index2.css +3 -3
  628. package/dist/lib/Transition/index.js +4 -4
  629. package/dist/lib/Transition/src/CollapseTransition.css +3 -3
  630. package/dist/lib/Transition/src/CollapseTransition.vue.js +4 -4
  631. package/dist/lib/Transition/src/CollapseTransition2.css +3 -3
  632. package/dist/lib/Transition/src/CreateTransition.js +4 -4
  633. package/dist/lib/Transition/src/ExpandTransition.js +4 -4
  634. package/dist/lib/Transition/src/style/index.css +3 -3
  635. package/dist/lib/Transition/style.js +4 -4
  636. package/dist/lib/VideoBackground/index.js +4 -4
  637. package/dist/lib/VideoBackground/src/helper.js +4 -4
  638. package/dist/lib/VideoBackground/src/index.css +3 -3
  639. package/dist/lib/VideoBackground/src/index.vue.js +4 -4
  640. package/dist/lib/VideoBackground/src/index2.css +3 -3
  641. package/dist/lib/VideoBackground/src/index3.css +3 -3
  642. package/dist/lib/VideoBackground/src/videoBackground.js +4 -4
  643. package/dist/lib/VideoPlayer/index.js +4 -4
  644. package/dist/lib/VideoPlayer/src/index.css +3 -3
  645. package/dist/lib/VideoPlayer/src/index.vue.js +4 -4
  646. package/dist/lib/VirtualScroll/index.js +4 -4
  647. package/dist/lib/VirtualScroll/src/index.css +3 -3
  648. package/dist/lib/VirtualScroll/src/index.vue.js +4 -4
  649. package/dist/lib/VirtualScroll/src/index.vue2.js +4 -4
  650. package/dist/lib/VirtualScroll/src/index2.css +3 -3
  651. package/dist/lib/_virtual/_commonjsHelpers.js +4 -4
  652. package/dist/lib/_virtual/_plugin-vue_export-helper.js +4 -4
  653. package/dist/lib/_virtual/delegate.js +4 -4
  654. package/dist/lib/_virtual/download.js +4 -4
  655. package/dist/lib/_virtual/download2.js +4 -4
  656. package/dist/lib/_virtual/index.js +4 -4
  657. package/dist/lib/_virtual/index2.js +4 -4
  658. package/dist/lib/_virtual/index3.js +14 -0
  659. package/dist/lib/{node_modules/@tanstack/store/dist/esm/types.js → _virtual/index4.js} +4 -4
  660. package/dist/lib/hooks/useLocale.js +4 -4
  661. package/dist/lib/hooks/useNamespace.js +4 -4
  662. package/dist/lib/index.js +4 -4
  663. package/dist/lib/locale/lang/en-US.js +4 -4
  664. package/dist/lib/locale/lang/ja-JP.js +4 -4
  665. package/dist/lib/locale/lang/zh-CN.js +4 -4
  666. package/dist/lib/node_modules/@codemirror/autocomplete/dist/index.js +4 -4
  667. package/dist/lib/node_modules/@codemirror/commands/dist/index.js +4 -4
  668. package/dist/lib/node_modules/@codemirror/lang-java/dist/index.js +4 -4
  669. package/dist/lib/node_modules/@codemirror/lang-javascript/dist/index.js +16 -4
  670. package/dist/lib/node_modules/@codemirror/lang-json/dist/index.js +4 -4
  671. package/dist/lib/node_modules/@codemirror/lang-python/dist/index.js +6 -4
  672. package/dist/lib/node_modules/@codemirror/lang-sql/dist/index.js +5 -4
  673. package/dist/lib/node_modules/@codemirror/lang-xml/dist/index.js +4 -4
  674. package/dist/lib/node_modules/@codemirror/lang-yaml/dist/index.js +4 -4
  675. package/dist/lib/node_modules/@codemirror/language/dist/index.js +4 -4
  676. package/dist/lib/node_modules/@codemirror/lint/dist/index.js +4 -4
  677. package/dist/lib/node_modules/@codemirror/search/dist/index.js +5 -4
  678. package/dist/lib/node_modules/@codemirror/state/dist/index.js +8 -4
  679. package/dist/lib/node_modules/@codemirror/theme-one-dark/dist/index.js +4 -4
  680. package/dist/lib/node_modules/@codemirror/view/dist/index.js +8 -4
  681. package/dist/lib/node_modules/@lezer/common/dist/index.js +4 -4
  682. package/dist/lib/node_modules/@lezer/highlight/dist/index.js +4 -4
  683. package/dist/lib/node_modules/@lezer/java/dist/index.js +4 -4
  684. package/dist/lib/node_modules/@lezer/javascript/dist/index.js +4 -4
  685. package/dist/lib/node_modules/@lezer/json/dist/index.js +4 -4
  686. package/dist/lib/node_modules/@lezer/lr/dist/index.js +4 -4
  687. package/dist/lib/node_modules/@lezer/python/dist/index.js +4 -4
  688. package/dist/lib/node_modules/@lezer/xml/dist/index.js +4 -4
  689. package/dist/lib/node_modules/@lezer/yaml/dist/index.js +4 -4
  690. package/dist/lib/node_modules/@marijn/find-cluster-break/src/index.js +4 -4
  691. package/dist/lib/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js +4 -4
  692. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/EventClient.js +4 -4
  693. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/FieldApi.js +4 -4
  694. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/FormApi.js +4 -4
  695. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js +4 -4
  696. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/metaHelper.js +4 -4
  697. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js +4 -4
  698. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/utils.js +4 -4
  699. package/dist/lib/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js +4 -4
  700. package/dist/lib/node_modules/@tanstack/store/dist/esm/alien.js +14 -0
  701. package/dist/lib/node_modules/@tanstack/store/dist/esm/atom.js +14 -0
  702. package/dist/lib/node_modules/@tanstack/store/dist/esm/batch.js +14 -0
  703. package/dist/lib/node_modules/@tanstack/store/dist/esm/store.js +4 -4
  704. package/dist/lib/node_modules/@tanstack/vue-form/dist/esm/useField.js +4 -4
  705. package/dist/lib/node_modules/@tanstack/vue-form/dist/esm/useForm.js +4 -4
  706. package/dist/lib/node_modules/@tanstack/vue-store/dist/esm/index.js +4 -4
  707. package/dist/lib/node_modules/@tiptap/core/dist/index.js +94 -4
  708. package/dist/lib/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +4 -4
  709. package/dist/lib/node_modules/@tiptap/extension-blockquote/dist/index.js +8 -4
  710. package/dist/lib/node_modules/@tiptap/extension-bold/dist/index.js +4 -4
  711. package/dist/lib/node_modules/@tiptap/extension-character-count/dist/index.js +4 -4
  712. package/dist/lib/node_modules/@tiptap/extension-code/dist/index.js +4 -4
  713. package/dist/lib/node_modules/@tiptap/extension-code-block/dist/index.js +21 -4
  714. package/dist/lib/node_modules/@tiptap/extension-document/dist/index.js +6 -4
  715. package/dist/lib/node_modules/@tiptap/extension-hard-break/dist/index.js +6 -4
  716. package/dist/lib/node_modules/@tiptap/extension-heading/dist/index.js +4 -4
  717. package/dist/lib/node_modules/@tiptap/extension-highlight/dist/index.js +4 -4
  718. package/dist/lib/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +4 -4
  719. package/dist/lib/node_modules/@tiptap/extension-image/dist/index.js +4 -4
  720. package/dist/lib/node_modules/@tiptap/extension-italic/dist/index.js +4 -4
  721. package/dist/lib/node_modules/@tiptap/extension-link/dist/index.js +4 -4
  722. package/dist/lib/node_modules/@tiptap/extension-list/dist/index.js +15 -4
  723. package/dist/lib/node_modules/@tiptap/extension-paragraph/dist/index.js +4 -4
  724. package/dist/lib/node_modules/@tiptap/extension-strike/dist/index.js +4 -4
  725. package/dist/lib/node_modules/@tiptap/extension-subscript/dist/index.js +4 -4
  726. package/dist/lib/node_modules/@tiptap/extension-superscript/dist/index.js +4 -4
  727. package/dist/lib/node_modules/@tiptap/extension-table/dist/index.js +8 -4
  728. package/dist/lib/node_modules/@tiptap/extension-task-item/dist/index.js +4 -4
  729. package/dist/lib/node_modules/@tiptap/extension-task-list/dist/index.js +4 -4
  730. package/dist/lib/node_modules/@tiptap/extension-text/dist/index.js +4 -4
  731. package/dist/lib/node_modules/@tiptap/extension-text-align/dist/index.js +4 -4
  732. package/dist/lib/node_modules/@tiptap/extension-text-style/dist/index.js +4 -4
  733. package/dist/lib/node_modules/@tiptap/extension-underline/dist/index.js +4 -4
  734. package/dist/lib/node_modules/@tiptap/extensions/dist/index.js +4 -4
  735. package/dist/lib/node_modules/@tiptap/html/dist/index.js +14 -0
  736. package/dist/lib/node_modules/@tiptap/starter-kit/dist/index.js +4 -4
  737. package/dist/lib/node_modules/@tiptap/vue-3/dist/index.js +4 -4
  738. package/dist/lib/node_modules/@vueuse/core/dist/index.js +4 -4
  739. package/dist/lib/node_modules/@vueuse/shared/dist/index.js +4 -4
  740. package/dist/lib/node_modules/codemirror/dist/index.js +4 -4
  741. package/dist/lib/node_modules/crelt/index.js +4 -4
  742. package/dist/lib/node_modules/delegate/src/closest.js +4 -4
  743. package/dist/lib/node_modules/delegate/src/delegate.js +4 -4
  744. package/dist/lib/node_modules/downloadjs/download.js +6 -4
  745. package/dist/lib/node_modules/eventemitter3/index.js +4 -4
  746. package/dist/lib/node_modules/linkifyjs/dist/linkify.js +8 -4
  747. package/dist/lib/node_modules/lodash-es/_DataView.js +4 -4
  748. package/dist/lib/node_modules/lodash-es/_Hash.js +4 -4
  749. package/dist/lib/node_modules/lodash-es/_ListCache.js +4 -4
  750. package/dist/lib/node_modules/lodash-es/_Map.js +4 -4
  751. package/dist/lib/node_modules/lodash-es/_MapCache.js +4 -4
  752. package/dist/lib/node_modules/lodash-es/_Promise.js +4 -4
  753. package/dist/lib/node_modules/lodash-es/_Set.js +4 -4
  754. package/dist/lib/node_modules/lodash-es/_SetCache.js +14 -0
  755. package/dist/lib/node_modules/lodash-es/_Stack.js +4 -4
  756. package/dist/lib/node_modules/lodash-es/_Symbol.js +4 -4
  757. package/dist/lib/node_modules/lodash-es/_Uint8Array.js +4 -4
  758. package/dist/lib/node_modules/lodash-es/_WeakMap.js +4 -4
  759. package/dist/lib/node_modules/lodash-es/_apply.js +4 -4
  760. package/dist/lib/node_modules/lodash-es/_arrayEach.js +4 -4
  761. package/dist/lib/node_modules/lodash-es/_arrayFilter.js +4 -4
  762. package/dist/lib/node_modules/lodash-es/_arrayIncludes.js +14 -0
  763. package/dist/lib/node_modules/lodash-es/_arrayIncludesWith.js +14 -0
  764. package/dist/lib/node_modules/lodash-es/_arrayLikeKeys.js +4 -4
  765. package/dist/lib/node_modules/lodash-es/_arrayMap.js +4 -4
  766. package/dist/lib/node_modules/lodash-es/_arrayPush.js +4 -4
  767. package/dist/lib/node_modules/lodash-es/_arraySome.js +14 -0
  768. package/dist/lib/node_modules/lodash-es/_asciiToArray.js +4 -4
  769. package/dist/lib/node_modules/lodash-es/_assignMergeValue.js +14 -0
  770. package/dist/lib/node_modules/lodash-es/_assignValue.js +4 -4
  771. package/dist/lib/node_modules/lodash-es/_assocIndexOf.js +4 -4
  772. package/dist/lib/node_modules/lodash-es/_baseAssignValue.js +4 -4
  773. package/dist/lib/node_modules/lodash-es/_baseClone.js +4 -4
  774. package/dist/lib/node_modules/lodash-es/_baseCreate.js +14 -0
  775. package/dist/lib/node_modules/lodash-es/_baseFindIndex.js +14 -0
  776. package/dist/lib/node_modules/lodash-es/_baseFlatten.js +4 -4
  777. package/dist/lib/node_modules/lodash-es/_baseFor.js +14 -0
  778. package/dist/lib/node_modules/lodash-es/_baseGet.js +4 -4
  779. package/dist/lib/node_modules/lodash-es/_baseGetAllKeys.js +4 -4
  780. package/dist/lib/node_modules/lodash-es/_baseGetTag.js +4 -4
  781. package/dist/lib/node_modules/lodash-es/_baseIndexOf.js +14 -0
  782. package/dist/lib/node_modules/lodash-es/_baseIntersection.js +14 -0
  783. package/dist/lib/node_modules/lodash-es/_baseIsArguments.js +4 -4
  784. package/dist/lib/node_modules/lodash-es/_baseIsEqual.js +14 -0
  785. package/dist/lib/node_modules/lodash-es/_baseIsEqualDeep.js +14 -0
  786. package/dist/lib/node_modules/lodash-es/_baseIsMap.js +4 -4
  787. package/dist/lib/node_modules/lodash-es/_baseIsNaN.js +14 -0
  788. package/dist/lib/node_modules/lodash-es/_baseIsNative.js +4 -4
  789. package/dist/lib/node_modules/lodash-es/_baseIsRegExp.js +4 -4
  790. package/dist/lib/node_modules/lodash-es/_baseIsSet.js +4 -4
  791. package/dist/lib/node_modules/lodash-es/_baseIsTypedArray.js +4 -4
  792. package/dist/lib/node_modules/lodash-es/_baseKeys.js +14 -0
  793. package/dist/lib/node_modules/lodash-es/_baseKeysIn.js +4 -4
  794. package/dist/lib/node_modules/lodash-es/_baseMerge.js +14 -0
  795. package/dist/lib/node_modules/lodash-es/_baseMergeDeep.js +14 -0
  796. package/dist/lib/node_modules/lodash-es/_baseRest.js +14 -0
  797. package/dist/lib/node_modules/lodash-es/_baseSetToString.js +4 -4
  798. package/dist/lib/node_modules/lodash-es/_baseSlice.js +4 -4
  799. package/dist/lib/node_modules/lodash-es/_baseTimes.js +4 -4
  800. package/dist/lib/node_modules/lodash-es/_baseToString.js +4 -4
  801. package/dist/lib/node_modules/lodash-es/_baseUnary.js +4 -4
  802. package/dist/lib/node_modules/lodash-es/_baseUniq.js +14 -0
  803. package/dist/lib/node_modules/lodash-es/_baseUnset.js +4 -4
  804. package/dist/lib/node_modules/lodash-es/_cacheHas.js +14 -0
  805. package/dist/lib/node_modules/lodash-es/_castArrayLikeObject.js +14 -0
  806. package/dist/lib/node_modules/lodash-es/_castPath.js +4 -4
  807. package/dist/lib/node_modules/lodash-es/_castSlice.js +4 -4
  808. package/dist/lib/node_modules/lodash-es/_cloneArrayBuffer.js +4 -4
  809. package/dist/lib/node_modules/lodash-es/_cloneBuffer.js +4 -4
  810. package/dist/lib/node_modules/lodash-es/_cloneDataView.js +4 -4
  811. package/dist/lib/node_modules/lodash-es/_cloneRegExp.js +4 -4
  812. package/dist/lib/node_modules/lodash-es/_cloneSymbol.js +4 -4
  813. package/dist/lib/node_modules/lodash-es/_cloneTypedArray.js +4 -4
  814. package/dist/lib/node_modules/lodash-es/_copyArray.js +14 -0
  815. package/dist/lib/node_modules/lodash-es/_copyObject.js +4 -4
  816. package/dist/lib/node_modules/lodash-es/_coreJsData.js +4 -4
  817. package/dist/lib/node_modules/lodash-es/_createAssigner.js +14 -0
  818. package/dist/lib/node_modules/lodash-es/_createBaseFor.js +14 -0
  819. package/dist/lib/node_modules/lodash-es/_createCaseFirst.js +4 -4
  820. package/dist/lib/node_modules/lodash-es/_createSet.js +14 -0
  821. package/dist/lib/node_modules/lodash-es/_customOmitClone.js +4 -4
  822. package/dist/lib/node_modules/lodash-es/_defineProperty.js +4 -4
  823. package/dist/lib/node_modules/lodash-es/_equalArrays.js +14 -0
  824. package/dist/lib/node_modules/lodash-es/_equalByTag.js +14 -0
  825. package/dist/lib/node_modules/lodash-es/_equalObjects.js +14 -0
  826. package/dist/lib/node_modules/lodash-es/_flatRest.js +4 -4
  827. package/dist/lib/node_modules/lodash-es/_freeGlobal.js +4 -4
  828. package/dist/lib/node_modules/lodash-es/_getAllKeys.js +14 -0
  829. package/dist/lib/node_modules/lodash-es/_getAllKeysIn.js +4 -4
  830. package/dist/lib/node_modules/lodash-es/_getMapData.js +4 -4
  831. package/dist/lib/node_modules/lodash-es/_getNative.js +4 -4
  832. package/dist/lib/node_modules/lodash-es/_getPrototype.js +4 -4
  833. package/dist/lib/node_modules/lodash-es/_getRawTag.js +4 -4
  834. package/dist/lib/node_modules/lodash-es/_getSymbols.js +4 -4
  835. package/dist/lib/node_modules/lodash-es/_getSymbolsIn.js +4 -4
  836. package/dist/lib/node_modules/lodash-es/_getTag.js +4 -4
  837. package/dist/lib/node_modules/lodash-es/_getValue.js +4 -4
  838. package/dist/lib/node_modules/lodash-es/_hasUnicode.js +4 -4
  839. package/dist/lib/node_modules/lodash-es/_hashClear.js +4 -4
  840. package/dist/lib/node_modules/lodash-es/_hashDelete.js +4 -4
  841. package/dist/lib/node_modules/lodash-es/_hashGet.js +4 -4
  842. package/dist/lib/node_modules/lodash-es/_hashHas.js +4 -4
  843. package/dist/lib/node_modules/lodash-es/_hashSet.js +4 -4
  844. package/dist/lib/node_modules/lodash-es/_initCloneArray.js +4 -4
  845. package/dist/lib/node_modules/lodash-es/_initCloneByTag.js +4 -4
  846. package/dist/lib/node_modules/lodash-es/_initCloneObject.js +14 -0
  847. package/dist/lib/node_modules/lodash-es/_isFlattenable.js +4 -4
  848. package/dist/lib/node_modules/lodash-es/_isIndex.js +4 -4
  849. package/dist/lib/node_modules/lodash-es/_isIterateeCall.js +14 -0
  850. package/dist/lib/node_modules/lodash-es/_isKey.js +4 -4
  851. package/dist/lib/node_modules/lodash-es/_isKeyable.js +4 -4
  852. package/dist/lib/node_modules/lodash-es/_isMasked.js +4 -4
  853. package/dist/lib/node_modules/lodash-es/_isPrototype.js +4 -4
  854. package/dist/lib/node_modules/lodash-es/_listCacheClear.js +4 -4
  855. package/dist/lib/node_modules/lodash-es/_listCacheDelete.js +4 -4
  856. package/dist/lib/node_modules/lodash-es/_listCacheGet.js +4 -4
  857. package/dist/lib/node_modules/lodash-es/_listCacheHas.js +4 -4
  858. package/dist/lib/node_modules/lodash-es/_listCacheSet.js +4 -4
  859. package/dist/lib/node_modules/lodash-es/_mapCacheClear.js +4 -4
  860. package/dist/lib/node_modules/lodash-es/_mapCacheDelete.js +4 -4
  861. package/dist/lib/node_modules/lodash-es/_mapCacheGet.js +4 -4
  862. package/dist/lib/node_modules/lodash-es/_mapCacheHas.js +4 -4
  863. package/dist/lib/node_modules/lodash-es/_mapCacheSet.js +4 -4
  864. package/dist/lib/node_modules/lodash-es/_mapToArray.js +14 -0
  865. package/dist/lib/node_modules/lodash-es/_memoizeCapped.js +4 -4
  866. package/dist/lib/node_modules/lodash-es/_nativeCreate.js +4 -4
  867. package/dist/lib/node_modules/lodash-es/_nativeKeys.js +14 -0
  868. package/dist/lib/node_modules/lodash-es/_nativeKeysIn.js +4 -4
  869. package/dist/lib/node_modules/lodash-es/_nodeUtil.js +4 -4
  870. package/dist/lib/node_modules/lodash-es/_objectToString.js +4 -4
  871. package/dist/lib/node_modules/lodash-es/_overArg.js +4 -4
  872. package/dist/lib/node_modules/lodash-es/_overRest.js +4 -4
  873. package/dist/lib/node_modules/lodash-es/_parent.js +4 -4
  874. package/dist/lib/node_modules/lodash-es/_root.js +4 -4
  875. package/dist/lib/node_modules/lodash-es/_safeGet.js +14 -0
  876. package/dist/lib/node_modules/lodash-es/_setCacheAdd.js +14 -0
  877. package/dist/lib/node_modules/lodash-es/_setCacheHas.js +14 -0
  878. package/dist/lib/node_modules/lodash-es/_setToArray.js +14 -0
  879. package/dist/lib/node_modules/lodash-es/_setToString.js +4 -4
  880. package/dist/lib/node_modules/lodash-es/_shortOut.js +4 -4
  881. package/dist/lib/node_modules/lodash-es/_stackClear.js +4 -4
  882. package/dist/lib/node_modules/lodash-es/_stackDelete.js +4 -4
  883. package/dist/lib/node_modules/lodash-es/_stackGet.js +4 -4
  884. package/dist/lib/node_modules/lodash-es/_stackHas.js +4 -4
  885. package/dist/lib/node_modules/lodash-es/_stackSet.js +4 -4
  886. package/dist/lib/node_modules/lodash-es/_strictIndexOf.js +14 -0
  887. package/dist/lib/node_modules/lodash-es/_stringToArray.js +4 -4
  888. package/dist/lib/node_modules/lodash-es/_stringToPath.js +4 -4
  889. package/dist/lib/node_modules/lodash-es/_toKey.js +4 -4
  890. package/dist/lib/node_modules/lodash-es/_toSource.js +4 -4
  891. package/dist/lib/node_modules/lodash-es/_unicodeToArray.js +4 -4
  892. package/dist/lib/node_modules/lodash-es/constant.js +4 -4
  893. package/dist/lib/node_modules/lodash-es/eq.js +4 -4
  894. package/dist/lib/node_modules/lodash-es/flatten.js +4 -4
  895. package/dist/lib/node_modules/lodash-es/get.js +4 -4
  896. package/dist/lib/node_modules/lodash-es/identity.js +4 -4
  897. package/dist/lib/node_modules/lodash-es/intersectionWith.js +14 -0
  898. package/dist/lib/node_modules/lodash-es/isArguments.js +4 -4
  899. package/dist/lib/node_modules/lodash-es/isArray.js +4 -4
  900. package/dist/lib/node_modules/lodash-es/isArrayLike.js +4 -4
  901. package/dist/lib/node_modules/lodash-es/isArrayLikeObject.js +14 -0
  902. package/dist/lib/node_modules/lodash-es/isBuffer.js +4 -4
  903. package/dist/lib/node_modules/lodash-es/isEqual.js +14 -0
  904. package/dist/lib/node_modules/lodash-es/isFinite.js +4 -4
  905. package/dist/lib/node_modules/lodash-es/isFunction.js +4 -4
  906. package/dist/lib/node_modules/lodash-es/isLength.js +4 -4
  907. package/dist/lib/node_modules/lodash-es/isMap.js +4 -4
  908. package/dist/lib/node_modules/lodash-es/isNaN.js +4 -4
  909. package/dist/lib/node_modules/lodash-es/isNil.js +4 -4
  910. package/dist/lib/node_modules/lodash-es/isNumber.js +4 -4
  911. package/dist/lib/node_modules/lodash-es/isObject.js +4 -4
  912. package/dist/lib/node_modules/lodash-es/isObjectLike.js +4 -4
  913. package/dist/lib/node_modules/lodash-es/isPlainObject.js +4 -4
  914. package/dist/lib/node_modules/lodash-es/isRegExp.js +4 -4
  915. package/dist/lib/node_modules/lodash-es/isSet.js +4 -4
  916. package/dist/lib/node_modules/lodash-es/isString.js +4 -4
  917. package/dist/lib/node_modules/lodash-es/isSymbol.js +4 -4
  918. package/dist/lib/node_modules/lodash-es/isTypedArray.js +4 -4
  919. package/dist/lib/node_modules/lodash-es/keys.js +14 -0
  920. package/dist/lib/node_modules/lodash-es/keysIn.js +4 -4
  921. package/dist/lib/node_modules/lodash-es/last.js +4 -4
  922. package/dist/lib/node_modules/lodash-es/memoize.js +4 -4
  923. package/dist/lib/node_modules/lodash-es/mergeWith.js +14 -0
  924. package/dist/lib/node_modules/lodash-es/noop.js +14 -0
  925. package/dist/lib/node_modules/lodash-es/omit.js +4 -4
  926. package/dist/lib/node_modules/lodash-es/stubArray.js +4 -4
  927. package/dist/lib/node_modules/lodash-es/stubFalse.js +4 -4
  928. package/dist/lib/node_modules/lodash-es/toPlainObject.js +14 -0
  929. package/dist/lib/node_modules/lodash-es/toString.js +4 -4
  930. package/dist/lib/node_modules/lodash-es/unionWith.js +14 -0
  931. package/dist/lib/node_modules/lodash-es/upperFirst.js +4 -4
  932. package/dist/lib/node_modules/orderedmap/dist/index.js +4 -4
  933. package/dist/lib/node_modules/path-to-regexp/dist/index.js +14 -0
  934. package/dist/lib/node_modules/prosemirror-commands/dist/index.js +5 -4
  935. package/dist/lib/node_modules/prosemirror-dropcursor/dist/index.js +4 -4
  936. package/dist/lib/node_modules/prosemirror-gapcursor/dist/index.js +4 -4
  937. package/dist/lib/node_modules/prosemirror-history/dist/index.js +4 -4
  938. package/dist/lib/node_modules/prosemirror-keymap/dist/index.js +4 -4
  939. package/dist/lib/node_modules/prosemirror-model/dist/index.js +7 -4
  940. package/dist/lib/node_modules/prosemirror-schema-list/dist/index.js +4 -4
  941. package/dist/lib/node_modules/prosemirror-state/dist/index.js +4 -4
  942. package/dist/lib/node_modules/prosemirror-tables/dist/index.js +4 -4
  943. package/dist/lib/node_modules/prosemirror-transform/dist/index.js +5 -4
  944. package/dist/lib/node_modules/prosemirror-view/dist/index.js +8 -4
  945. package/dist/lib/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +14 -0
  946. package/dist/lib/node_modules/rope-sequence/dist/index.js +4 -4
  947. package/dist/lib/node_modules/sortablejs/modular/sortable.esm.js +14 -0
  948. package/dist/lib/node_modules/style-mod/src/style-mod.js +6 -4
  949. package/dist/lib/node_modules/title-case/dist/index.js +14 -0
  950. package/dist/lib/node_modules/vue-codemirror/dist/vue-codemirror.esm.js +4 -4
  951. package/dist/lib/node_modules/w3c-keyname/index.js +4 -4
  952. package/dist/lib/node_modules/xgplayer/dist/index.min.css +3 -3
  953. package/dist/lib/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +5 -4
  954. package/dist/lib/node_modules/xgplayer/es/constant.js +4 -4
  955. package/dist/lib/node_modules/xgplayer/es/defaultConfig.js +4 -4
  956. package/dist/lib/node_modules/xgplayer/es/error.js +4 -4
  957. package/dist/lib/node_modules/xgplayer/es/events.js +4 -4
  958. package/dist/lib/node_modules/xgplayer/es/index.umd.js +4 -4
  959. package/dist/lib/node_modules/xgplayer/es/instManager.js +4 -4
  960. package/dist/lib/node_modules/xgplayer/es/lang/en.js +4 -4
  961. package/dist/lib/node_modules/xgplayer/es/lang/i18n.js +4 -4
  962. package/dist/lib/node_modules/xgplayer/es/lang/jp.js +4 -4
  963. package/dist/lib/node_modules/xgplayer/es/lang/zh-cn.js +4 -4
  964. package/dist/lib/node_modules/xgplayer/es/mediaProxy.js +4 -4
  965. package/dist/lib/node_modules/xgplayer/es/player.js +4 -4
  966. package/dist/lib/node_modules/xgplayer/es/plugin/basePlugin.js +4 -4
  967. package/dist/lib/node_modules/xgplayer/es/plugin/hooksDescriptor.js +4 -4
  968. package/dist/lib/node_modules/xgplayer/es/plugin/plugin.js +4 -4
  969. package/dist/lib/node_modules/xgplayer/es/plugin/pluginsManager.js +4 -4
  970. package/dist/lib/node_modules/xgplayer/es/plugin/preset.js +4 -4
  971. package/dist/lib/node_modules/xgplayer/es/plugin/resizeObserver.js +4 -4
  972. package/dist/lib/node_modules/xgplayer/es/plugins/assets/back.js +8 -4
  973. package/dist/lib/node_modules/xgplayer/es/plugins/assets/download.js +18 -4
  974. package/dist/lib/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +7 -4
  975. package/dist/lib/node_modules/xgplayer/es/plugins/assets/exitFull.js +7 -4
  976. package/dist/lib/node_modules/xgplayer/es/plugins/assets/loading.js +7 -4
  977. package/dist/lib/node_modules/xgplayer/es/plugins/assets/pause.js +7 -4
  978. package/dist/lib/node_modules/xgplayer/es/plugins/assets/pipIcon.js +8 -4
  979. package/dist/lib/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +11 -4
  980. package/dist/lib/node_modules/xgplayer/es/plugins/assets/play.js +7 -4
  981. package/dist/lib/node_modules/xgplayer/es/plugins/assets/playNext.js +7 -4
  982. package/dist/lib/node_modules/xgplayer/es/plugins/assets/replay.js +7 -4
  983. package/dist/lib/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +7 -4
  984. package/dist/lib/node_modules/xgplayer/es/plugins/assets/requestFull.js +7 -4
  985. package/dist/lib/node_modules/xgplayer/es/plugins/assets/rotate.js +15 -4
  986. package/dist/lib/node_modules/xgplayer/es/plugins/assets/seekicon.js +10 -4
  987. package/dist/lib/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +8 -4
  988. package/dist/lib/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +8 -4
  989. package/dist/lib/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +8 -4
  990. package/dist/lib/node_modules/xgplayer/es/plugins/common/iconPlugin.js +4 -4
  991. package/dist/lib/node_modules/xgplayer/es/plugins/common/iconTools.js +6 -4
  992. package/dist/lib/node_modules/xgplayer/es/plugins/common/optionList.js +4 -4
  993. package/dist/lib/node_modules/xgplayer/es/plugins/common/optionsIcon.js +7 -4
  994. package/dist/lib/node_modules/xgplayer/es/plugins/common/thumbnail.js +4 -4
  995. package/dist/lib/node_modules/xgplayer/es/plugins/controls/index.js +12 -4
  996. package/dist/lib/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +8 -4
  997. package/dist/lib/node_modules/xgplayer/es/plugins/definition/index.js +4 -4
  998. package/dist/lib/node_modules/xgplayer/es/plugins/download/index.js +8 -4
  999. package/dist/lib/node_modules/xgplayer/es/plugins/dynamicBg/index.js +5 -4
  1000. package/dist/lib/node_modules/xgplayer/es/plugins/enter/index.js +4 -4
  1001. package/dist/lib/node_modules/xgplayer/es/plugins/error/index.js +9 -4
  1002. package/dist/lib/node_modules/xgplayer/es/plugins/fpsDetect/index.js +4 -4
  1003. package/dist/lib/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +5 -4
  1004. package/dist/lib/node_modules/xgplayer/es/plugins/fullscreen/index.js +8 -4
  1005. package/dist/lib/node_modules/xgplayer/es/plugins/gapJump/index.js +4 -4
  1006. package/dist/lib/node_modules/xgplayer/es/plugins/keyboard/index.js +4 -4
  1007. package/dist/lib/node_modules/xgplayer/es/plugins/loading/index.js +7 -4
  1008. package/dist/lib/node_modules/xgplayer/es/plugins/logger/index.js +4 -4
  1009. package/dist/lib/node_modules/xgplayer/es/plugins/miniScreen/index.js +16 -4
  1010. package/dist/lib/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +7 -4
  1011. package/dist/lib/node_modules/xgplayer/es/plugins/mobile/index.js +22 -4
  1012. package/dist/lib/node_modules/xgplayer/es/plugins/mobile/touch.js +4 -4
  1013. package/dist/lib/node_modules/xgplayer/es/plugins/pc/index.js +4 -4
  1014. package/dist/lib/node_modules/xgplayer/es/plugins/pip/index.js +11 -4
  1015. package/dist/lib/node_modules/xgplayer/es/plugins/play/index.js +8 -4
  1016. package/dist/lib/node_modules/xgplayer/es/plugins/playNext/index.js +10 -4
  1017. package/dist/lib/node_modules/xgplayer/es/plugins/playbackRate/index.js +4 -4
  1018. package/dist/lib/node_modules/xgplayer/es/plugins/poster/index.js +5 -4
  1019. package/dist/lib/node_modules/xgplayer/es/plugins/progress/index.js +10 -4
  1020. package/dist/lib/node_modules/xgplayer/es/plugins/progress/innerList.js +4 -4
  1021. package/dist/lib/node_modules/xgplayer/es/plugins/progress/miniProgress.js +7 -4
  1022. package/dist/lib/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +4 -4
  1023. package/dist/lib/node_modules/xgplayer/es/plugins/progressPreview/index.js +14 -4
  1024. package/dist/lib/node_modules/xgplayer/es/plugins/prompt/index.js +6 -4
  1025. package/dist/lib/node_modules/xgplayer/es/plugins/replay/index.js +6 -4
  1026. package/dist/lib/node_modules/xgplayer/es/plugins/rotate/index.js +9 -4
  1027. package/dist/lib/node_modules/xgplayer/es/plugins/screenShot/index.js +9 -4
  1028. package/dist/lib/node_modules/xgplayer/es/plugins/start/index.js +7 -4
  1029. package/dist/lib/node_modules/xgplayer/es/plugins/stats/index.js +4 -4
  1030. package/dist/lib/node_modules/xgplayer/es/plugins/testspeed/index.js +4 -4
  1031. package/dist/lib/node_modules/xgplayer/es/plugins/time/index.js +9 -4
  1032. package/dist/lib/node_modules/xgplayer/es/plugins/time/timesegments.js +4 -4
  1033. package/dist/lib/node_modules/xgplayer/es/plugins/volume/index.js +14 -4
  1034. package/dist/lib/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +4 -4
  1035. package/dist/lib/node_modules/xgplayer/es/presets/default.js +4 -4
  1036. package/dist/lib/node_modules/xgplayer/es/state.js +4 -4
  1037. package/dist/lib/node_modules/xgplayer/es/stateClassMap.js +4 -4
  1038. package/dist/lib/node_modules/xgplayer/es/utils/database.js +4 -4
  1039. package/dist/lib/node_modules/xgplayer/es/utils/debug.js +4 -4
  1040. package/dist/lib/node_modules/xgplayer/es/utils/draggabilly.js +4 -4
  1041. package/dist/lib/node_modules/xgplayer/es/utils/sniffer.js +4 -4
  1042. package/dist/lib/node_modules/xgplayer/es/utils/util.js +4 -4
  1043. package/dist/lib/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +4 -4
  1044. package/dist/lib/node_modules/xgplayer/es/version.js +4 -4
  1045. package/dist/lib/packages/components/index.js +4 -4
  1046. package/dist/lib/packages/hooks/dist/index.js +14 -0
  1047. package/dist/lib/packages/utils/dist/index.js +14 -0
  1048. package/dist/lib/styles/tokens.css +3 -3
  1049. package/package.json +28 -29
  1050. package/dist/es/node_modules/@tanstack/store/dist/esm/derived.js +0 -14
  1051. package/dist/es/node_modules/@tanstack/store/dist/esm/scheduler.js +0 -14
  1052. package/dist/lib/node_modules/@tanstack/store/dist/esm/derived.js +0 -14
  1053. package/dist/lib/node_modules/@tanstack/store/dist/esm/scheduler.js +0 -14
@@ -7,8 +7,2650 @@ You shall not disclose such Confidential Information and shall use it only in
7
7
  accordance with the terms of the license agreement.
8
8
 
9
9
  --- Build Info ---
10
- Version: 1.1.6
11
- Build Time: 2026/3/4 16:49:40
12
- Build Commit: 63f88fe7a59965e471017742b570179ac37f5591
10
+ Version: 1.1.7
11
+ Build Time: 2026/3/13 18:25:06
12
+ Build Commit: 0b162dea954baa715e67b70f80401a571205058a
13
13
  */
14
- import{findClusterBreak as t}from"../../../@marijn/find-cluster-break/src/index.js";class e{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,n){[t,e]=c(this,t,e);let s=[];return this.decompose(0,t,s,2),n.length&&n.decompose(0,n.length,s,3),this.decompose(e,this.length,s,1),i.from(s,this.length-(e-t)+n.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=c(this,t,e);let n=[];return this.decompose(t,e,n,0),i.from(n,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),n=this.length-this.scanIdentical(t,-1),i=new h(this),s=new h(t);for(let r=e,h=e;;){if(i.next(r),s.next(r),r=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(h+=i.value.length,i.done||h>=n)return!0}}iter(t=1){return new h(this,t)}iterRange(t,e=this.length){return new o(this,t,e)}iterLines(t,e){let n;if(null==t)n=this.iter();else{null==e&&(e=this.lines+1);let i=this.line(t).from;n=this.iterRange(i,Math.max(i,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new l(n)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new n(t):i.from(n.split(t,[])):e.empty}}class n extends e{constructor(t,e=function(t){let e=-1;for(let n of t)e+=n.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,n,i){for(let s=0;;s++){let r=this.text[s],h=i+r.length;if((e?n:h)>=t)return new a(i,h,n,r);i=h+1,n++}}decompose(t,e,i,h){let o=t<=0&&e>=this.length?this:new n(r(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&h){let t=i.pop(),e=s(o.text,t.text.slice(),0,o.length);if(e.length<=32)i.push(new n(e,t.length+o.length));else{let t=e.length>>1;i.push(new n(e.slice(0,t)),new n(e.slice(t)))}}else i.push(o)}replace(t,e,h){if(!(h instanceof n))return super.replace(t,e,h);[t,e]=c(this,t,e);let o=s(this.text,s(h.text,r(this.text,0,t)),e),l=this.length+h.length-(e-t);return o.length<=32?new n(o,l):i.from(n.split(o,[]),l)}sliceString(t,e=this.length,n="\n"){[t,e]=c(this,t,e);let i="";for(let s=0,r=0;s<=e&&r<this.text.length;r++){let h=this.text[r],o=s+h.length;s>t&&r&&(i+=n),t<o&&e>s&&(i+=h.slice(Math.max(0,t-s),e-s)),s=o+1}return i}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],s=-1;for(let r of t)i.push(r),s+=r.length+1,32==i.length&&(e.push(new n(i,s)),i=[],s=-1);return s>-1&&e.push(new n(i,s)),e}}class i extends e{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let n of t)this.lines+=n.lines}lineInner(t,e,n,i){for(let s=0;;s++){let r=this.children[s],h=i+r.length,o=n+r.lines-1;if((e?o:h)>=t)return r.lineInner(t,e,n,i);i=h+1,n=o+1}}decompose(t,e,n,i){for(let s=0,r=0;r<=e&&s<this.children.length;s++){let h=this.children[s],o=r+h.length;if(t<=o&&e>=r){let s=i&((r<=t?1:0)|(o>=e?2:0));r>=t&&o<=e&&!s?n.push(h):h.decompose(t-r,e-r,n,s)}r=o+1}}replace(t,e,n){if([t,e]=c(this,t,e),n.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let h=this.children[s],o=r+h.length;if(t>=r&&e<=o){let l=h.replace(t-r,e-r,n),a=this.lines-h.lines+l.lines;if(l.lines<a>>4&&l.lines>a>>6){let r=this.children.slice();return r[s]=l,new i(r,this.length-(e-t)+n.length)}return super.replace(r,o,l)}r=o+1}return super.replace(t,e,n)}sliceString(t,e=this.length,n="\n"){[t,e]=c(this,t,e);let i="";for(let s=0,r=0;s<this.children.length&&r<=e;s++){let h=this.children[s],o=r+h.length;r>t&&s&&(i+=n),t<o&&e>r&&(i+=h.sliceString(t-r,e-r,n)),r=o+1}return i}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof i))return 0;let n=0,[s,r,h,o]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;s+=e,r+=e){if(s==h||r==o)return n;let i=this.children[s],l=t.children[r];if(i!=l)return n+i.scanIdentical(l,e);n+=i.length+1}}static from(t,e=t.reduce((t,e)=>t+e.length+1,-1)){let s=0;for(let n of t)s+=n.lines;if(s<32){let i=[];for(let e of t)e.flatten(i);return new n(i,e)}let r=Math.max(32,s>>5),h=r<<1,o=r>>1,l=[],a=0,c=-1,f=[];function u(t){let e;if(t.lines>h&&t instanceof i)for(let n of t.children)u(n);else t.lines>o&&(a>o||!a)?(g(),l.push(t)):t instanceof n&&a&&(e=f[f.length-1])instanceof n&&t.lines+e.lines<=32?(a+=t.lines,c+=t.length+1,f[f.length-1]=new n(e.text.concat(t.text),e.length+1+t.length)):(a+t.lines>r&&g(),a+=t.lines,c+=t.length+1,f.push(t))}function g(){0!=a&&(l.push(1==f.length?f[0]:i.from(f,c)),c=-1,a=f.length=0)}for(let n of t)u(n);return g(),1==l.length?l[0]:new i(l,e)}}function s(t,e,n=0,i=1e9){for(let s=0,r=0,h=!0;r<t.length&&s<=i;r++){let o=t[r],l=s+o.length;l>=n&&(l>i&&(o=o.slice(0,i-s)),s<n&&(o=o.slice(n-s)),h?(e[e.length-1]+=o,h=!1):e.push(o)),s=l+1}return e}function r(t,e,n){return s(t,[""],e,n)}e.empty=/* @__PURE__ */new n([""],0);class h{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof n?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],h=r>>1,o=s instanceof n?s.text.length:s.children.length;if(h==(e>0?o:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&r)==(e>0?0:1)){if(this.offsets[i]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(s instanceof n){let n=s.text[h+(e<0?-1:0)];if(this.offsets[i]+=e,n.length>Math.max(0,t))return this.value=0==t?n:e>0?n.slice(t):n.slice(0,n.length-t),this;t-=n.length}else{let r=s.children[h+(e<0?-1:0)];t>r.length?(t-=r.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(r),this.offsets.push(e>0?1:(r instanceof n?r.text.length:r.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class o{constructor(t,e,n){this.value="",this.done=!1,this.cursor=new h(t,e>n?-1:1),this.pos=e>n?t.length:0,this.from=Math.min(e,n),this.to=Math.max(e,n)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let n=e<0?this.pos-this.from:this.to-this.pos;t>n&&(t=n),n-=t;let{value:i}=this.cursor.next(t);return this.pos+=(i.length+t)*e,this.value=i.length<=n?i:e<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class l{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:n,value:i}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(e.prototype[Symbol.iterator]=function(){return this.iter()},h.prototype[Symbol.iterator]=o.prototype[Symbol.iterator]=l.prototype[Symbol.iterator]=function(){return this});class a{constructor(t,e,n,i){this.from=t,this.to=e,this.number=n,this.text=i}get length(){return this.to-this.from}}function c(t,e,n){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,n))]}function f(e,n,i=!0,s=!0){return t(e,n,i,s)}function u(t,e){let n=t.charCodeAt(e);if(!(i=n,i>=55296&&i<56320&&e+1!=t.length))return n;var i;let s=t.charCodeAt(e+1);return function(t){return t>=56320&&t<57344}(s)?s-56320+(n-55296<<10)+65536:n}function g(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function d(t){return t<65536?1:2}const p=/\r\n?|\n/;var m=/* @__PURE__ */function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(m||(m={}));class v{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let n=this.sections[e+1];t+=n<0?this.sections[e]:n}return t}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(t){for(let e=0,n=0,i=0;e<this.sections.length;){let s=this.sections[e++],r=this.sections[e++];r<0?(t(n,i,s),i+=s):i+=r,n+=s}}iterChangedRanges(t,e=!1){k(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],i=this.sections[e++];i<0?t.push(n,i):t.push(i,n)}return new v(t)}composeDesc(t){return this.empty?t:t.empty?this:I(this,t)}mapDesc(t,e=!1){return t.empty?this:S(this,t,e)}mapPos(t,e=-1,n=m.Simple){let i=0,s=0;for(let r=0;r<this.sections.length;){let h=this.sections[r++],o=this.sections[r++],l=i+h;if(o<0){if(l>t)return s+(t-i);s+=h}else{if(n!=m.Simple&&l>=t&&(n==m.TrackDel&&i<t&&l>t||n==m.TrackBefore&&i<t||n==m.TrackAfter&&l>t))return null;if(l>t||l==t&&e<0&&!h)return t==i||e<0?s:s+o;s+=o}i=l}if(t>i)throw new RangeError(`Position ${t} is out of range for changeset of length ${i}`);return s}touchesRange(t,e=t){for(let n=0,i=0;n<this.sections.length&&i<=e;){let s=i+this.sections[n++];if(this.sections[n++]>=0&&i<=e&&s>=t)return!(i<t&&s>e)||"cover";i=s}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let n=this.sections[e++],i=this.sections[e++];t+=(t?" ":"")+n+(i>=0?":"+i:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(t=>"number"!=typeof t))throw new RangeError("Invalid JSON representation of ChangeDesc");return new v(t)}static create(t){return new v(t)}}class x extends v{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return k(this,(e,n,i,s,r)=>t=t.replace(i,i+(n-e),r),!1),t}mapDesc(t,e=!1){return S(this,t,e,!0)}invert(t){let n=this.sections.slice(),i=[];for(let s=0,r=0;s<n.length;s+=2){let h=n[s],o=n[s+1];if(o>=0){n[s]=o,n[s+1]=h;let l=s>>1;for(;i.length<l;)i.push(e.empty);i.push(h?t.slice(r,r+h):e.empty)}r+=h}return new x(n,i)}compose(t){return this.empty?t:t.empty?this:I(this,t,!0)}map(t,e=!1){return t.empty?this:S(this,t,e,!0)}iterChanges(t,e=!1){k(this,t,e)}get desc(){return v.create(this.sections)}filter(t){let e=[],n=[],i=[],s=new b(this);t:for(let r=0,h=0;;){let o=r==t.length?1e9:t[r++];for(;h<o||h==o&&0==s.len;){if(s.done)break t;let t=Math.min(s.len,o-h);w(i,t,-1);let r=-1==s.ins?-1:0==s.off?s.ins:0;w(e,t,r),r>0&&y(n,e,s.text),s.forward(t),h+=t}let l=t[r++];for(;h<l;){if(s.done)break t;let t=Math.min(s.len,l-h);w(e,t,-1),w(i,t,-1==s.ins?-1:0==s.off?s.ins:0),s.forward(t),h+=t}}return{changes:new x(e,n),filtered:v.create(i)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let n=this.sections[e],i=this.sections[e+1];i<0?t.push(n):0==i?t.push([n]):t.push([n].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,n,i){let s=[],r=[],h=0,o=null;function l(t=!1){if(!t&&!s.length)return;h<n&&w(s,n-h,-1);let e=new x(s,r);o=o?o.compose(e.map(o)):e,s=[],r=[],h=0}return function t(a){if(Array.isArray(a))for(let e of a)t(e);else if(a instanceof x){if(a.length!=n)throw new RangeError(`Mismatched change set length (got ${a.length}, expected ${n})`);l(),o=o?o.compose(a.map(o)):a}else{let{from:t,to:o=t,insert:c}=a;if(t>o||t<0||o>n)throw new RangeError(`Invalid change range ${t} to ${o} (in doc of length ${n})`);let f=c?"string"==typeof c?e.of(c.split(i||p)):c:e.empty,u=f.length;if(t==o&&0==u)return;t<h&&l(),t>h&&w(s,t-h,-1),w(s,o-t,u),y(r,s,f),h=o}}(t),l(!o),o}static empty(t){return new x(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let s=0;s<t.length;s++){let r=t[s];if("number"==typeof r)n.push(r,-1);else{if(!Array.isArray(r)||"number"!=typeof r[0]||r.some((t,e)=>e&&"string"!=typeof t))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==r.length)n.push(r[0],0);else{for(;i.length<s;)i.push(e.empty);i[s]=e.of(r.slice(1)),n.push(r[0],i[s].length)}}}return new x(n,i)}static createSet(t,e){return new x(t,e)}}function w(t,e,n,i=!1){if(0==e&&n<=0)return;let s=t.length-2;s>=0&&n<=0&&n==t[s+1]?t[s]+=e:s>=0&&0==e&&0==t[s]?t[s+1]+=n:i?(t[s]+=e,t[s+1]+=n):t.push(e,n)}function y(t,n,i){if(0==i.length)return;let s=n.length-2>>1;if(s<t.length)t[t.length-1]=t[t.length-1].append(i);else{for(;t.length<s;)t.push(e.empty);t.push(i)}}function k(t,n,i){let s=t.inserted;for(let r=0,h=0,o=0;o<t.sections.length;){let l=t.sections[o++],a=t.sections[o++];if(a<0)r+=l,h+=l;else{let c=r,f=h,u=e.empty;for(;c+=l,f+=a,a&&s&&(u=u.append(s[o-2>>1])),!(i||o==t.sections.length||t.sections[o+1]<0);)l=t.sections[o++],a=t.sections[o++];n(r,c,h,f,u),r=c,h=f}}}function S(t,e,n,i=!1){let s=[],r=i?[]:null,h=new b(t),o=new b(e);for(let l=-1;;){if(h.done&&o.len||o.done&&h.len)throw new Error("Mismatched change set lengths");if(-1==h.ins&&-1==o.ins){let t=Math.min(h.len,o.len);w(s,t,-1),h.forward(t),o.forward(t)}else if(o.ins>=0&&(h.ins<0||l==h.i||0==h.off&&(o.len<h.len||o.len==h.len&&!n))){let t=o.len;for(w(s,o.ins,-1);t;){let e=Math.min(h.len,t);h.ins>=0&&l<h.i&&h.len<=e&&(w(s,0,h.ins),r&&y(r,s,h.text),l=h.i),h.forward(e),t-=e}o.next()}else{if(!(h.ins>=0)){if(h.done&&o.done)return r?x.createSet(s,r):v.create(s);throw new Error("Mismatched change set lengths")}{let t=0,e=h.len;for(;e;)if(-1==o.ins){let n=Math.min(e,o.len);t+=n,e-=n,o.forward(n)}else{if(!(0==o.ins&&o.len<e))break;e-=o.len,o.next()}w(s,t,l<h.i?h.ins:0),r&&l<h.i&&y(r,s,h.text),l=h.i,h.forward(h.len-e)}}}}function I(t,e,n=!1){let i=[],s=n?[]:null,r=new b(t),h=new b(e);for(let o=!1;;){if(r.done&&h.done)return s?x.createSet(i,s):v.create(i);if(0==r.ins)w(i,r.len,0,o),r.next();else if(0!=h.len||h.done){if(r.done||h.done)throw new Error("Mismatched change set lengths");{let t=Math.min(r.len2,h.len),e=i.length;if(-1==r.ins){let e=-1==h.ins?-1:h.off?0:h.ins;w(i,t,e,o),s&&e&&y(s,i,h.text)}else-1==h.ins?(w(i,r.off?0:r.len,t,o),s&&y(s,i,r.textBit(t))):(w(i,r.off?0:r.len,h.off?0:h.ins,o),s&&!h.off&&y(s,i,h.text));o=(r.ins>t||h.ins>=0&&h.len>t)&&(o||i.length>e),r.forward2(t),h.forward(t)}}else w(i,0,h.ins,o),s&&y(s,i,h.text),h.next()}}class b{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length?e.empty:t[n]}textBit(t){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!t?e.empty:n[i].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class P{constructor(t,e,n){this.from=t,this.to=e,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let n,i;return this.empty?n=i=t.mapPos(this.from,e):(n=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new P(n,i,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return E.range(t,e);let n=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return E.range(this.anchor,n)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||this.goalColumn!=t.goalColumn||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return E.range(t.anchor,t.head)}static create(t,e,n){return new P(t,e,n)}}class E{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:E.create(this.ranges.map(n=>n.map(t,e)),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(t.ranges[n],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new E([this.main],0)}addRange(t,e=!0){return E.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let n=this.ranges.slice();return n[e]=t,E.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(t=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new E(t.ranges.map(t=>P.fromJSON(t)),t.main)}static single(t,e=t){return new E([E.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let n=0,i=0;i<t.length;i++){let s=t[i];if(s.empty?s.from<=n:s.from<n)return E.normalized(t.slice(),e);n=s.to}return new E(t,e)}static cursor(t,e=0,n,i){return P.create(t,t,(0==e?0:e<0?8:16)|(null==n?7:Math.min(6,n))|(null!=i?i:16777215)<<6)}static range(t,e,n,i){let s=(null!=n?n:16777215)<<6|(null==i?7:Math.min(6,i));return e<t?P.create(e,t,48|s):P.create(t,e,(e>t?8:0)|s)}static normalized(t,e=0){let n=t[e];t.sort((t,e)=>t.from-e.from),e=t.indexOf(n);for(let i=1;i<t.length;i++){let n=t[i],s=t[i-1];if(n.empty?n.from<=s.to:n.from<s.to){let r=s.from,h=Math.max(n.to,s.to);i<=e&&e--,t.splice(--i,2,n.anchor>n.head?E.range(h,r):E.range(r,h))}}return new E(t,e)}}function M(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let A=0;class O{constructor(t,e,n,i,s){this.combine=t,this.compareInput=e,this.compare=n,this.isStatic=i,this.id=A++,this.default=t([]),this.extensions="function"==typeof s?s(this):s}get reader(){return this}static define(t={}){return new O(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:R),!!t.static,t.enables)}of(t){return new T([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new T(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new T(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],n=>e(n.field(t)))}}function R(t,e){return t==e||t.length==e.length&&t.every((t,n)=>t===e[n])}class T{constructor(t,e,n,i){this.dependencies=t,this.facet=e,this.type=n,this.value=i,this.id=A++}dynamicSlot(t){var e;let n=this.value,i=this.facet.compareInput,s=this.id,r=t[s]>>1,h=2==this.type,o=!1,l=!1,a=[];for(let c of this.dependencies)"doc"==c?o=!0:"selection"==c?l=!0:1&(null!==(e=t[c.id])&&void 0!==e?e:1)||a.push(t[c.id]);return{create:t=>(t.values[r]=n(t),1),update(t,e){if(o&&e.docChanged||l&&(e.docChanged||e.selection)||N(t,a)){let e=n(t);if(h?!C(e,t.values[r],i):!i(e,t.values[r]))return t.values[r]=e,1}return 0},reconfigure:(t,e)=>{let o,l=e.config.address[s];if(null!=l){let s=H(e,l);if(this.dependencies.every(n=>n instanceof O?e.facet(n)===t.facet(n):!(n instanceof J)||e.field(n,!1)==t.field(n,!1))||(h?C(o=n(t),s,i):i(o=n(t),s)))return t.values[r]=s,0}else o=n(t);return t.values[r]=o,1}}}}function C(t,e,n){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!n(t[i],e[i]))return!1;return!0}function N(t,e){let n=!1;for(let i of e)1&G(t,i)&&(n=!0);return n}function B(t,e,n){let i=n.map(e=>t[e.id]),s=n.map(t=>t.type),r=i.filter(t=>!(1&t)),h=t[e.id]>>1;function o(t){let n=[];for(let e=0;e<i.length;e++){let r=H(t,i[e]);if(2==s[e])for(let t of r)n.push(t);else n.push(r)}return e.combine(n)}return{create(t){for(let e of i)G(t,e);return t.values[h]=o(t),1},update(t,n){if(!N(t,r))return 0;let i=o(t);return e.compare(i,t.values[h])?0:(t.values[h]=i,1)},reconfigure(t,s){let r=N(t,i),l=s.config.facets[e.id],a=s.facet(e);if(l&&!r&&R(n,l))return t.values[h]=a,0;let c=o(t);return e.compare(c,a)?(t.values[h]=a,0):(t.values[h]=c,1)}}}const F=/* @__PURE__ */O.define({static:!0});class J{constructor(t,e,n,i,s){this.id=t,this.createF=e,this.updateF=n,this.compareF=i,this.spec=s,this.provides=void 0}static define(t){let e=new J(A++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(F).find(t=>t.field==this);return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,n)=>{let i=t.values[e],s=this.updateF(i,n);return this.compareF(i,s)?0:(t.values[e]=s,1)},reconfigure:(t,n)=>{let i,s=t.facet(F),r=n.facet(F);return(i=s.find(t=>t.field==this))&&i!=r.find(t=>t.field==this)?(t.values[e]=i.create(t),1):null!=n.config.address[this.id]?(t.values[e]=n.field(this),0):(t.values[e]=this.create(t),1)}}}init(t){return[this,F.of({field:this,create:t})]}get extension(){return this}}const D=4,L=3,$=2,j=1;function V(t){return e=>new q(e,t)}const z={highest:/* @__PURE__ */V(0),high:/* @__PURE__ */V(j),default:/* @__PURE__ */V($),low:/* @__PURE__ */V(L),lowest:/* @__PURE__ */V(D)};class q{constructor(t,e){this.inner=t,this.prec=e}}class _{of(t){return new W(this,t)}reconfigure(t){return _.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class W{constructor(t,e){this.compartment=t,this.inner=e}}class U{constructor(t,e,n,i,s,r){for(this.base=t,this.compartments=e,this.dynamicSlots=n,this.address=i,this.staticValues=s,this.facets=r,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return null==e?t.default:this.staticValues[e>>1]}static resolve(t,e,n){let i=[],s=/* @__PURE__ */Object.create(null),r=/* @__PURE__ */new Map;for(let f of function(t,e,n){let i=[[],[],[],[],[]],s=/* @__PURE__ */new Map;function r(t,h){let o=s.get(t);if(null!=o){if(o<=h)return;let e=i[o].indexOf(t);e>-1&&i[o].splice(e,1),t instanceof W&&n.delete(t.compartment)}if(s.set(t,h),Array.isArray(t))for(let e of t)r(e,h);else if(t instanceof W){if(n.has(t.compartment))throw new RangeError("Duplicate use of compartment in extensions");let i=e.get(t.compartment)||t.inner;n.set(t.compartment,i),r(i,h)}else if(t instanceof q)r(t.inner,t.prec);else if(t instanceof J)i[h].push(t),t.provides&&r(t.provides,h);else if(t instanceof T)i[h].push(t),t.facet.extensions&&r(t.facet.extensions,$);else{let e=t.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(e,h)}}return r(t,$),i.reduce((t,e)=>t.concat(e))}(t,e,r))f instanceof J?i.push(f):(s[f.facet.id]||(s[f.facet.id]=[])).push(f);let h=/* @__PURE__ */Object.create(null),o=[],l=[];for(let f of i)h[f.id]=l.length<<1,l.push(t=>f.slot(t));let a=null==n?void 0:n.config.facets;for(let f in s){let t=s[f],e=t[0].facet,i=a&&a[f]||[];if(t.every(t=>0==t.type))if(h[e.id]=o.length<<1|1,R(i,t))o.push(n.facet(e));else{let i=e.combine(t.map(t=>t.value));o.push(n&&e.compare(i,n.facet(e))?n.facet(e):i)}else{for(let e of t)0==e.type?(h[e.id]=o.length<<1|1,o.push(e.value)):(h[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));h[e.id]=l.length<<1,l.push(n=>B(n,e,t))}}let c=l.map(t=>t(h));return new U(t,r,c,h,o,s)}}function G(t,e){if(1&e)return 2;let n=e>>1,i=t.status[n];if(4==i)throw new Error("Cyclic dependency between fields and/or facets");if(2&i)return i;t.status[n]=4;let s=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|s}function H(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const K=/* @__PURE__ */O.define(),Q=/* @__PURE__ */O.define({combine:t=>t.some(t=>t),static:!0}),X=/* @__PURE__ */O.define({combine:t=>t.length?t[0]:void 0,static:!0}),Y=/* @__PURE__ */O.define(),Z=/* @__PURE__ */O.define(),tt=/* @__PURE__ */O.define(),et=/* @__PURE__ */O.define({combine:t=>!!t.length&&t[0]});class nt{constructor(t,e){this.type=t,this.value=e}static define(){return new it}}class it{of(t){return new nt(this,t)}}class st{constructor(t){this.map=t}of(t){return new rt(this,t)}}class rt{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new rt(this.type,e)}is(t){return this.type==t}static define(t={}){return new st(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let n=[];for(let i of t){let t=i.map(e);t&&n.push(t)}return n}}rt.reconfigure=/* @__PURE__ */rt.define(),rt.appendConfig=/* @__PURE__ */rt.define();class ht{constructor(t,e,n,i,s,r){this.startState=t,this.changes=e,this.selection=n,this.effects=i,this.annotations=s,this.scrollIntoView=r,this._doc=null,this._state=null,n&&M(n,e.newLength),s.some(t=>t.type==ht.time)||(this.annotations=s.concat(ht.time.of(Date.now())))}static create(t,e,n,i,s,r){return new ht(t,e,n,i,s,r)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(ht.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function ot(t,e){let n=[];for(let i=0,s=0;;){let r,h;if(i<t.length&&(s==e.length||e[s]>=t[i]))r=t[i++],h=t[i++];else{if(!(s<e.length))return n;r=e[s++],h=e[s++]}!n.length||n[n.length-1]<r?n.push(r,h):n[n.length-1]<h&&(n[n.length-1]=h)}}function lt(t,e,n){var i;let s,r,h;return n?(s=e.changes,r=x.empty(e.changes.length),h=t.changes.compose(e.changes)):(s=e.changes.map(t.changes),r=t.changes.mapDesc(e.changes,!0),h=t.changes.compose(s)),{changes:h,selection:e.selection?e.selection.map(r):null===(i=t.selection)||void 0===i?void 0:i.map(s),effects:rt.mapEffects(t.effects,s).concat(rt.mapEffects(e.effects,r)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function at(t,e,n){let i=e.selection,s=ut(e.annotations);return e.userEvent&&(s=s.concat(ht.userEvent.of(e.userEvent))),{changes:e.changes instanceof x?e.changes:x.of(e.changes||[],n,t.facet(X)),selection:i&&(i instanceof E?i:E.single(i.anchor,i.head)),effects:ut(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function ct(t,e,n){let i=at(t,e.length?e[0]:{},t.doc.length);e.length&&!1===e[0].filter&&(n=!1);for(let r=1;r<e.length;r++){!1===e[r].filter&&(n=!1);let s=!!e[r].sequential;i=lt(i,at(t,e[r],s?i.changes.newLength:t.doc.length),s)}let s=ht.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return function(t){let e=t.startState,n=e.facet(tt),i=t;for(let s=n.length-1;s>=0;s--){let r=n[s](t);r&&Object.keys(r).length&&(i=lt(i,at(e,r,t.changes.newLength),!0))}return i==t?t:ht.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}(n?function(t){let e=t.startState,n=!0;for(let s of e.facet(Y)){let e=s(t);if(!1===e){n=!1;break}Array.isArray(e)&&(n=!0===n?e:ot(n,e))}if(!0!==n){let i,s;if(!1===n)s=t.changes.invertedDesc,i=x.empty(e.doc.length);else{let e=t.changes.filter(n);i=e.changes,s=e.filtered.mapDesc(e.changes).invertedDesc}t=ht.create(e,i,t.selection&&t.selection.map(s),rt.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let i=e.facet(Z);for(let s=i.length-1;s>=0;s--){let n=i[s](t);t=n instanceof ht?n:Array.isArray(n)&&1==n.length&&n[0]instanceof ht?n[0]:ct(e,ut(n),!1)}return t}(s):s)}ht.time=/* @__PURE__ */nt.define(),ht.userEvent=/* @__PURE__ */nt.define(),ht.addToHistory=/* @__PURE__ */nt.define(),ht.remote=/* @__PURE__ */nt.define();const ft=[];function ut(t){return null==t?ft:Array.isArray(t)?t:[t]}var gt=/* @__PURE__ */function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(gt||(gt={}));const dt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let pt;try{pt=/* @__PURE__ */new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(Lt){}function mt(t){return e=>{if(!/\S/.test(e))return gt.Space;if(function(t){if(pt)return pt.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||dt.test(n)))return!0}return!1}(e))return gt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return gt.Word;return gt.Other}}class vt{constructor(t,e,n,i,s,r){this.config=t,this.doc=e,this.selection=n,this.values=i,this.status=t.statusTemplate.slice(),this.computeSlot=s,r&&(r._state=this);for(let h=0;h<this.config.dynamicSlots.length;h++)G(this,h<<1);this.computeSlot=null}field(t,e=!0){let n=this.config.address[t.id];if(null!=n)return G(this,n),H(this,n);if(e)throw new RangeError("Field is not present in this state")}update(...t){return ct(this,t,!0)}applyTransaction(t){let e,n=this.config,{base:i,compartments:s}=n;for(let h of t.effects)h.is(_.reconfigure)?(n&&(s=/* @__PURE__ */new Map,n.compartments.forEach((t,e)=>s.set(e,t)),n=null),s.set(h.value.compartment,h.value.extension)):h.is(rt.reconfigure)?(n=null,i=h.value):h.is(rt.appendConfig)&&(n=null,i=ut(i).concat(h.value));if(n)e=t.startState.values.slice();else{n=U.resolve(i,s,this),e=new vt(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(t,e)=>e.reconfigure(t,this),null).values}let r=t.startState.facet(Q)?t.newSelection:t.newSelection.asSingle();new vt(n,t.newDoc,r,e,(e,n)=>n.update(e,t),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:t},range:E.cursor(e.from+t.length)}))}changeByRange(t){let e=this.selection,n=t(e.ranges[0]),i=this.changes(n.changes),s=[n.range],r=ut(n.effects);for(let h=1;h<e.ranges.length;h++){let n=t(e.ranges[h]),o=this.changes(n.changes),l=o.map(i);for(let t=0;t<h;t++)s[t]=s[t].map(l);let a=i.mapDesc(o,!0);s.push(n.range.map(a)),i=i.compose(l),r=rt.mapEffects(r,l).concat(rt.mapEffects(ut(n.effects),a))}return{changes:i,selection:E.create(s,e.mainIndex),effects:r}}changes(t=[]){return t instanceof x?t:x.of(t,this.doc.length,this.facet(vt.lineSeparator))}toText(t){return e.of(t.split(this.facet(vt.lineSeparator)||p))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return null==e?t.default:(G(this,e),H(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let n in t){let i=t[n];i instanceof J&&null!=this.config.address[i.id]&&(e[n]=i.spec.toJSON(this.field(t[n]),this))}return e}static fromJSON(t,e={},n){if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(n)for(let s in n)if(Object.prototype.hasOwnProperty.call(t,s)){let e=n[s],r=t[s];i.push(e.init(t=>e.spec.fromJSON(r,t)))}return vt.create({doc:t.doc,selection:E.fromJSON(t.selection),extensions:e.extensions?i.concat([e.extensions]):i})}static create(t={}){let n=U.resolve(t.extensions||[],/* @__PURE__ */new Map),i=t.doc instanceof e?t.doc:e.of((t.doc||"").split(n.staticFacet(vt.lineSeparator)||p)),s=t.selection?t.selection instanceof E?t.selection:E.single(t.selection.anchor,t.selection.head):E.single(0);return M(s,i.length),n.staticFacet(Q)||(s=s.asSingle()),new vt(n,i,s,n.dynamicSlots.map(()=>null),(t,e)=>e.create(t),null)}get tabSize(){return this.facet(vt.tabSize)}get lineBreak(){return this.facet(vt.lineSeparator)||"\n"}get readOnly(){return this.facet(et)}phrase(t,...e){for(let n of this.facet(vt.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,(t,n)=>{if("$"==n)return"$";let i=+(n||1);return!i||i>e.length?t:e[i-1]})),t}languageDataAt(t,e,n=-1){let i=[];for(let s of this.facet(K))for(let r of s(this,e,n))Object.prototype.hasOwnProperty.call(r,t)&&i.push(r[t]);return i}charCategorizer(t){let e=this.languageDataAt("wordChars",t);return mt(e.length?e[0]:"")}wordAt(t){let{text:e,from:n,length:i}=this.doc.lineAt(t),s=this.charCategorizer(t),r=t-n,h=t-n;for(;r>0;){let t=f(e,r,!1);if(s(e.slice(t,r))!=gt.Word)break;r=t}for(;h<i;){let t=f(e,h);if(s(e.slice(h,t))!=gt.Word)break;h=t}return r==h?null:E.range(r+n,h+n)}}function xt(t,e,n={}){let i={};for(let s of t)for(let t of Object.keys(s)){let e=s[t],r=i[t];if(void 0===r)i[t]=e;else if(r===e||void 0===e);else{if(!Object.hasOwnProperty.call(n,t))throw new Error("Config merge conflict for field "+t);i[t]=n[t](r,e)}}for(let s in e)void 0===i[s]&&(i[s]=e[s]);return i}vt.allowMultipleSelections=Q,vt.tabSize=/* @__PURE__ */O.define({combine:t=>t.length?t[0]:4}),vt.lineSeparator=X,vt.readOnly=et,vt.phrases=/* @__PURE__ */O.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(n=>t[n]==e[n])}}),vt.languageData=K,vt.changeFilter=Y,vt.transactionFilter=Z,vt.transactionExtender=tt,_.reconfigure=/* @__PURE__ */rt.define();class wt{eq(t){return this==t}range(t,e=t){return kt.create(t,e,this)}}function yt(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}wt.prototype.startSide=wt.prototype.endSide=0,wt.prototype.point=!1,wt.prototype.mapMode=m.TrackDel;class kt{constructor(t,e,n){this.from=t,this.to=e,this.value=n}static create(t,e,n){return new kt(t,e,n)}}function St(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class It{constructor(t,e,n,i){this.from=t,this.to=e,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(t,e,n,i=0){let s=n?this.to:this.from;for(let r=i,h=s.length;;){if(r==h)return r;let i=r+h>>1,o=s[i]-t||(n?this.value[i].endSide:this.value[i].startSide)-e;if(i==r)return o>=0?r:h;o>=0?h=i:r=i+1}}between(t,e,n,i){for(let s=this.findIndex(e,-1e9,!0),r=this.findIndex(n,1e9,!1,s);s<r;s++)if(!1===i(this.from[s]+t,this.to[s]+t,this.value[s]))return!1}map(t,e){let n=[],i=[],s=[],r=-1,h=-1;for(let o=0;o<this.value.length;o++){let l,a,c=this.value[o],f=this.from[o]+t,u=this.to[o]+t;if(f==u){let t=e.mapPos(f,c.startSide,c.mapMode);if(null==t)continue;if(l=a=t,c.startSide!=c.endSide&&(a=e.mapPos(f,c.endSide),a<l))continue}else if(l=e.mapPos(f,c.startSide),a=e.mapPos(u,c.endSide),l>a||l==a&&c.startSide>0&&c.endSide<=0)continue;(a-l||c.endSide-c.startSide)<0||(r<0&&(r=l),c.point&&(h=Math.max(h,a-l)),n.push(c),i.push(l-r),s.push(a-r))}return{mapped:n.length?new It(i,s,n,h):null,pos:r}}}class bt{constructor(t,e,n,i){this.chunkPos=t,this.chunk=e,this.nextLayer=n,this.maxPoint=i}static create(t,e,n,i){return new bt(t,e,n,i)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:n=!1,filterFrom:i=0,filterTo:s=this.length}=t,r=t.filter;if(0==e.length&&!r)return this;if(n&&(e=e.slice().sort(St)),this.isEmpty)return e.length?bt.of(e):this;let h=new Mt(this,null,-1).goto(0),o=0,l=[],a=new Pt;for(;h.value||o<e.length;)if(o<e.length&&(h.from-e[o].from||h.startSide-e[o].value.startSide)>=0){let t=e[o++];a.addInner(t.from,t.to,t.value)||l.push(t)}else 1==h.rangeIndex&&h.chunkIndex<this.chunk.length&&(o==e.length||this.chunkEnd(h.chunkIndex)<e[o].from)&&(!r||i>this.chunkEnd(h.chunkIndex)||s<this.chunkPos[h.chunkIndex])&&a.addChunk(this.chunkPos[h.chunkIndex],this.chunk[h.chunkIndex])?h.nextChunk():((!r||i>h.to||s<h.from||r(h.from,h.to,h.value))&&(a.addInner(h.from,h.to,h.value)||l.push(kt.create(h.from,h.to,h.value))),h.next());return a.finishInner(this.nextLayer.isEmpty&&!l.length?bt.empty:this.nextLayer.update({add:l,filter:r,filterFrom:i,filterTo:s}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],n=[],i=-1;for(let r=0;r<this.chunk.length;r++){let s=this.chunkPos[r],h=this.chunk[r],o=t.touchesRange(s,s+h.length);if(!1===o)i=Math.max(i,h.maxPoint),e.push(h),n.push(t.mapPos(s));else if(!0===o){let{mapped:r,pos:o}=h.map(s,t);r&&(i=Math.max(i,r.maxPoint),e.push(r),n.push(o))}}let s=this.nextLayer.map(t);return 0==e.length?s:new bt(n,e,s||bt.empty,i)}between(t,e,n){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],r=this.chunk[i];if(e>=s&&t<=s+r.length&&!1===r.between(s,t-s,e-s,n))return}this.nextLayer.between(t,e,n)}}iter(t=0){return At.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return At.from(t).goto(e)}static compare(t,e,n,i,s=-1){let r=t.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s),h=e.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s),o=Et(r,h,n),l=new Rt(r,o,s),a=new Rt(h,o,s);n.iterGaps((t,e,n)=>Tt(l,t,a,e,n,i)),n.empty&&0==n.length&&Tt(l,0,a,0,0,i)}static eq(t,e,n=0,i){null==i&&(i=999999999);let s=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0),r=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0);if(s.length!=r.length)return!1;if(!s.length)return!0;let h=Et(s,r),o=new Rt(s,h,0).goto(n),l=new Rt(r,h,0).goto(n);for(;;){if(o.to!=l.to||!Ct(o.active,l.active)||o.point&&(!l.point||!yt(o.point,l.point)))return!1;if(o.to>i)return!0;o.next(),l.next()}}static spans(t,e,n,i,s=-1){let r=new Rt(t,null,s).goto(e),h=e,o=r.openStart;for(;;){let t=Math.min(r.to,n);if(r.point){let n=r.activeForPoint(r.to),s=r.pointFrom<e?n.length+1:r.point.startSide<0?n.length:Math.min(n.length,o);i.point(h,t,r.point,n,s,r.pointRank),o=Math.min(r.openEnd(t),n.length)}else t>h&&(i.span(h,t,r.active,o),o=r.openEnd(t));if(r.to>n)return o+(r.point&&r.to>n?1:0);h=r.to,r.next()}}static of(t,e=!1){let n=new Pt;for(let i of t instanceof kt?[t]:e?function(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let i=t[n];if(St(e,i)>0)return t.slice().sort(St);e=i}return t}(t):t)n.add(i.from,i.to,i.value);return n.finish()}static join(t){if(!t.length)return bt.empty;let e=t[t.length-1];for(let n=t.length-2;n>=0;n--)for(let i=t[n];i!=bt.empty;i=i.nextLayer)e=new bt(i.chunkPos,i.chunk,e,Math.max(i.maxPoint,e.maxPoint));return e}}bt.empty=/* @__PURE__ */new bt([],[],null,-1),bt.empty.nextLayer=bt.empty;class Pt{finishChunk(t){this.chunks.push(new It(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,n){this.addInner(t,e,n)||(this.nextLayer||(this.nextLayer=new Pt)).add(t,e,n)}addInner(t,e,n){let i=t-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&(t-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(i<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=n,this.lastFrom=t,this.lastTo=e,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let n=e.value.length-1;return this.last=e.value[n],this.lastFrom=e.from[n]+t,this.lastTo=e.to[n]+t,!0}finish(){return this.finishInner(bt.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=bt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function Et(t,e,n){let i=/* @__PURE__ */new Map;for(let r of t)for(let t=0;t<r.chunk.length;t++)r.chunk[t].maxPoint<=0&&i.set(r.chunk[t],r.chunkPos[t]);let s=/* @__PURE__ */new Set;for(let r of e)for(let t=0;t<r.chunk.length;t++){let e=i.get(r.chunk[t]);null==e||(n?n.mapPos(e):e)!=r.chunkPos[t]||(null==n?void 0:n.touchesRange(e,e+r.chunk[t].length))||s.add(r.chunk[t])}return s}class Mt{constructor(t,e,n,i=0){this.layer=t,this.skip=e,this.minPoint=n,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,e=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}gotoInner(t,e,n){for(;this.chunkIndex<this.layer.chunk.length;){let e=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(e)||this.layer.chunkEnd(this.chunkIndex)<t||e.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(t,e){(this.to-t||this.endSide-e)<0&&this.gotoInner(t,e,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],n=t+e.from[this.rangeIndex];if(this.from=n,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class At{constructor(t){this.heap=t}static from(t,e=null,n=-1){let i=[];for(let s=0;s<t.length;s++)for(let r=t[s];!r.isEmpty;r=r.nextLayer)r.maxPoint>=n&&i.push(new Mt(r,e,n,s));return 1==i.length?i[0]:new At(i)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let n of this.heap)n.goto(t,e);for(let n=this.heap.length>>1;n>=0;n--)Ot(this.heap,n);return this.next(),this}forward(t,e){for(let n of this.heap)n.forward(t,e);for(let n=this.heap.length>>1;n>=0;n--)Ot(this.heap,n);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Ot(this.heap,0)}}}function Ot(t,e){for(let n=t[e];;){let i=1+(e<<1);if(i>=t.length)break;let s=t[i];if(i+1<t.length&&s.compare(t[i+1])>=0&&(s=t[i+1],i++),n.compare(s)<0)break;t[i]=n,t[e]=s,e=i}}class Rt{constructor(t,e,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=At.from(t,e,n)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){Nt(this.active,t),Nt(this.activeTo,t),Nt(this.activeRank,t),this.minActive=Ft(this.active,this.activeTo)}addActive(t){let e=0,{value:n,to:i,rank:s}=this.cursor;for(;e<this.activeRank.length&&(s-this.activeRank[e]||i-this.activeTo[e])>0;)e++;Bt(this.active,e,n),Bt(this.activeTo,e,i),Bt(this.activeRank,e,s),t&&Bt(t,e,this.cursor.from),this.minActive=Ft(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>t){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&Nt(n,i)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=t,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=t.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}}if(n){this.openStart=0;for(let e=n.length-1;e>=0&&n[e]<t;e--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let e=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>t||this.activeTo[n]==t&&this.active[n].endSide>=this.point.endSide)&&e.push(this.active[n]);return e.reverse()}openEnd(t){let e=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>t;n--)e++;return e}}function Tt(t,e,n,i,s,r){t.goto(e),n.goto(i);let h=i+s,o=i,l=i-e,a=!!r.boundChange;for(let c=!1;;){let e=t.to+l-n.to,i=e||t.endSide-n.endSide,s=i<0?t.to+l:n.to,f=Math.min(s,h);if(t.point||n.point?(t.point&&n.point&&yt(t.point,n.point)&&Ct(t.activeForPoint(t.to),n.activeForPoint(n.to))||r.comparePoint(o,f,t.point,n.point),c=!1):(c&&r.boundChange(o),f>o&&!Ct(t.active,n.active)&&r.compareRange(o,f,t.active,n.active),a&&f<h&&(e||t.openEnd(s)!=n.openEnd(s))&&(c=!0)),s>h)break;o=s,i<=0&&t.next(),i>=0&&n.next()}}function Ct(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!yt(t[n],e[n]))return!1;return!0}function Nt(t,e){for(let n=e,i=t.length-1;n<i;n++)t[n]=t[n+1];t.pop()}function Bt(t,e,n){for(let i=t.length-1;i>=e;i--)t[i+1]=t[i];t[e]=n}function Ft(t,e){let n=-1,i=1e9;for(let s=0;s<e.length;s++)(e[s]-i||t[s].endSide-t[n].endSide)<0&&(n=s,i=e[s]);return n}function Jt(t,e,n=t.length){let i=0;for(let s=0;s<n&&s<t.length;)9==t.charCodeAt(s)?(i+=e-i%e,s++):(i++,s=f(t,s));return i}function Dt(t,e,n,i){for(let s=0,r=0;;){if(r>=e)return s;if(s==t.length)break;r+=9==t.charCodeAt(s)?n-r%n:1,s=f(t,s)}return!0===i?-1:t.length}export{nt as Annotation,it as AnnotationType,v as ChangeDesc,x as ChangeSet,gt as CharCategory,_ as Compartment,E as EditorSelection,vt as EditorState,O as Facet,a as Line,m as MapMode,z as Prec,kt as Range,bt as RangeSet,Pt as RangeSetBuilder,wt as RangeValue,P as SelectionRange,rt as StateEffect,st as StateEffectType,J as StateField,e as Text,ht as Transaction,u as codePointAt,d as codePointSize,xt as combineConfig,Jt as countColumn,f as findClusterBreak,Dt as findColumn,g as fromCodePoint};
14
+ import { findClusterBreak as Ve } from "../../../@marijn/find-cluster-break/src/index.js";
15
+ class x {
16
+ /**
17
+ Get the line description around the given position.
18
+ */
19
+ lineAt(e) {
20
+ if (e < 0 || e > this.length)
21
+ throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);
22
+ return this.lineInner(e, !1, 1, 0);
23
+ }
24
+ /**
25
+ Get the description for the given (1-based) line number.
26
+ */
27
+ line(e) {
28
+ if (e < 1 || e > this.lines)
29
+ throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);
30
+ return this.lineInner(e, !0, 1, 0);
31
+ }
32
+ /**
33
+ Replace a range of the text with the given content.
34
+ */
35
+ replace(e, t, n) {
36
+ [e, t] = J(this, e, t);
37
+ let i = [];
38
+ return this.decompose(
39
+ 0,
40
+ e,
41
+ i,
42
+ 2
43
+ /* Open.To */
44
+ ), n.length && n.decompose(
45
+ 0,
46
+ n.length,
47
+ i,
48
+ 3
49
+ /* Open.To */
50
+ ), this.decompose(
51
+ t,
52
+ this.length,
53
+ i,
54
+ 1
55
+ /* Open.From */
56
+ ), O.from(i, this.length - (t - e) + n.length);
57
+ }
58
+ /**
59
+ Append another document to this one.
60
+ */
61
+ append(e) {
62
+ return this.replace(this.length, this.length, e);
63
+ }
64
+ /**
65
+ Retrieve the text between the given points.
66
+ */
67
+ slice(e, t = this.length) {
68
+ [e, t] = J(this, e, t);
69
+ let n = [];
70
+ return this.decompose(e, t, n, 0), O.from(n, t - e);
71
+ }
72
+ /**
73
+ Test whether this text is equal to another instance.
74
+ */
75
+ eq(e) {
76
+ if (e == this)
77
+ return !0;
78
+ if (e.length != this.length || e.lines != this.lines)
79
+ return !1;
80
+ let t = this.scanIdentical(e, 1), n = this.length - this.scanIdentical(e, -1), i = new D(this), s = new D(e);
81
+ for (let r = t, h = t; ; ) {
82
+ if (i.next(r), s.next(r), r = 0, i.lineBreak != s.lineBreak || i.done != s.done || i.value != s.value)
83
+ return !1;
84
+ if (h += i.value.length, i.done || h >= n)
85
+ return !0;
86
+ }
87
+ }
88
+ /**
89
+ Iterate over the text. When `dir` is `-1`, iteration happens
90
+ from end to start. This will return lines and the breaks between
91
+ them as separate strings.
92
+ */
93
+ iter(e = 1) {
94
+ return new D(this, e);
95
+ }
96
+ /**
97
+ Iterate over a range of the text. When `from` > `to`, the
98
+ iterator will run in reverse.
99
+ */
100
+ iterRange(e, t = this.length) {
101
+ return new Ie(this, e, t);
102
+ }
103
+ /**
104
+ Return a cursor that iterates over the given range of lines,
105
+ _without_ returning the line breaks between, and yielding empty
106
+ strings for empty lines.
107
+
108
+ When `from` and `to` are given, they should be 1-based line numbers.
109
+ */
110
+ iterLines(e, t) {
111
+ let n;
112
+ if (e == null)
113
+ n = this.iter();
114
+ else {
115
+ t == null && (t = this.lines + 1);
116
+ let i = this.line(e).from;
117
+ n = this.iterRange(i, Math.max(i, t == this.lines + 1 ? this.length : t <= 1 ? 0 : this.line(t - 1).to));
118
+ }
119
+ return new Pe(n);
120
+ }
121
+ /**
122
+ Return the document as a string, using newline characters to
123
+ separate lines.
124
+ */
125
+ toString() {
126
+ return this.sliceString(0);
127
+ }
128
+ /**
129
+ Convert the document to an array of lines (which can be
130
+ deserialized again via [`Text.of`](https://codemirror.net/6/docs/ref/#state.Text^of)).
131
+ */
132
+ toJSON() {
133
+ let e = [];
134
+ return this.flatten(e), e;
135
+ }
136
+ /**
137
+ @internal
138
+ */
139
+ constructor() {
140
+ }
141
+ /**
142
+ Create a `Text` instance for the given array of lines.
143
+ */
144
+ static of(e) {
145
+ if (e.length == 0)
146
+ throw new RangeError("A document must have at least one line");
147
+ return e.length == 1 && !e[0] ? x.empty : e.length <= 32 ? new m(e) : O.from(m.split(e, []));
148
+ }
149
+ }
150
+ class m extends x {
151
+ constructor(e, t = Ne(e)) {
152
+ super(), this.text = e, this.length = t;
153
+ }
154
+ get lines() {
155
+ return this.text.length;
156
+ }
157
+ get children() {
158
+ return null;
159
+ }
160
+ lineInner(e, t, n, i) {
161
+ for (let s = 0; ; s++) {
162
+ let r = this.text[s], h = i + r.length;
163
+ if ((t ? n : h) >= e)
164
+ return new De(i, h, n, r);
165
+ i = h + 1, n++;
166
+ }
167
+ }
168
+ decompose(e, t, n, i) {
169
+ let s = e <= 0 && t >= this.length ? this : new m(ve(this.text, e, t), Math.min(t, this.length) - Math.max(0, e));
170
+ if (i & 1) {
171
+ let r = n.pop(), h = Q(s.text, r.text.slice(), 0, s.length);
172
+ if (h.length <= 32)
173
+ n.push(new m(h, r.length + s.length));
174
+ else {
175
+ let o = h.length >> 1;
176
+ n.push(new m(h.slice(0, o)), new m(h.slice(o)));
177
+ }
178
+ } else
179
+ n.push(s);
180
+ }
181
+ replace(e, t, n) {
182
+ if (!(n instanceof m))
183
+ return super.replace(e, t, n);
184
+ [e, t] = J(this, e, t);
185
+ let i = Q(this.text, Q(n.text, ve(this.text, 0, e)), t), s = this.length + n.length - (t - e);
186
+ return i.length <= 32 ? new m(i, s) : O.from(m.split(i, []), s);
187
+ }
188
+ sliceString(e, t = this.length, n = `
189
+ `) {
190
+ [e, t] = J(this, e, t);
191
+ let i = "";
192
+ for (let s = 0, r = 0; s <= t && r < this.text.length; r++) {
193
+ let h = this.text[r], o = s + h.length;
194
+ s > e && r && (i += n), e < o && t > s && (i += h.slice(Math.max(0, e - s), t - s)), s = o + 1;
195
+ }
196
+ return i;
197
+ }
198
+ flatten(e) {
199
+ for (let t of this.text)
200
+ e.push(t);
201
+ }
202
+ scanIdentical() {
203
+ return 0;
204
+ }
205
+ static split(e, t) {
206
+ let n = [], i = -1;
207
+ for (let s of e)
208
+ n.push(s), i += s.length + 1, n.length == 32 && (t.push(new m(n, i)), n = [], i = -1);
209
+ return i > -1 && t.push(new m(n, i)), t;
210
+ }
211
+ }
212
+ class O extends x {
213
+ constructor(e, t) {
214
+ super(), this.children = e, this.length = t, this.lines = 0;
215
+ for (let n of e)
216
+ this.lines += n.lines;
217
+ }
218
+ lineInner(e, t, n, i) {
219
+ for (let s = 0; ; s++) {
220
+ let r = this.children[s], h = i + r.length, o = n + r.lines - 1;
221
+ if ((t ? o : h) >= e)
222
+ return r.lineInner(e, t, n, i);
223
+ i = h + 1, n = o + 1;
224
+ }
225
+ }
226
+ decompose(e, t, n, i) {
227
+ for (let s = 0, r = 0; r <= t && s < this.children.length; s++) {
228
+ let h = this.children[s], o = r + h.length;
229
+ if (e <= o && t >= r) {
230
+ let a = i & ((r <= e ? 1 : 0) | (o >= t ? 2 : 0));
231
+ r >= e && o <= t && !a ? n.push(h) : h.decompose(e - r, t - r, n, a);
232
+ }
233
+ r = o + 1;
234
+ }
235
+ }
236
+ replace(e, t, n) {
237
+ if ([e, t] = J(this, e, t), n.lines < this.lines)
238
+ for (let i = 0, s = 0; i < this.children.length; i++) {
239
+ let r = this.children[i], h = s + r.length;
240
+ if (e >= s && t <= h) {
241
+ let o = r.replace(e - s, t - s, n), a = this.lines - r.lines + o.lines;
242
+ if (o.lines < a >> 4 && o.lines > a >> 6) {
243
+ let u = this.children.slice();
244
+ return u[i] = o, new O(u, this.length - (t - e) + n.length);
245
+ }
246
+ return super.replace(s, h, o);
247
+ }
248
+ s = h + 1;
249
+ }
250
+ return super.replace(e, t, n);
251
+ }
252
+ sliceString(e, t = this.length, n = `
253
+ `) {
254
+ [e, t] = J(this, e, t);
255
+ let i = "";
256
+ for (let s = 0, r = 0; s < this.children.length && r <= t; s++) {
257
+ let h = this.children[s], o = r + h.length;
258
+ r > e && s && (i += n), e < o && t > r && (i += h.sliceString(e - r, t - r, n)), r = o + 1;
259
+ }
260
+ return i;
261
+ }
262
+ flatten(e) {
263
+ for (let t of this.children)
264
+ t.flatten(e);
265
+ }
266
+ scanIdentical(e, t) {
267
+ if (!(e instanceof O))
268
+ return 0;
269
+ let n = 0, [i, s, r, h] = t > 0 ? [0, 0, this.children.length, e.children.length] : [this.children.length - 1, e.children.length - 1, -1, -1];
270
+ for (; ; i += t, s += t) {
271
+ if (i == r || s == h)
272
+ return n;
273
+ let o = this.children[i], a = e.children[s];
274
+ if (o != a)
275
+ return n + o.scanIdentical(a, t);
276
+ n += o.length + 1;
277
+ }
278
+ }
279
+ static from(e, t = e.reduce((n, i) => n + i.length + 1, -1)) {
280
+ let n = 0;
281
+ for (let c of e)
282
+ n += c.lines;
283
+ if (n < 32) {
284
+ let c = [];
285
+ for (let g of e)
286
+ g.flatten(c);
287
+ return new m(c, t);
288
+ }
289
+ let i = Math.max(
290
+ 32,
291
+ n >> 5
292
+ /* Tree.BranchShift */
293
+ ), s = i << 1, r = i >> 1, h = [], o = 0, a = -1, u = [];
294
+ function f(c) {
295
+ let g;
296
+ if (c.lines > s && c instanceof O)
297
+ for (let E of c.children)
298
+ f(E);
299
+ else c.lines > r && (o > r || !o) ? (d(), h.push(c)) : c instanceof m && o && (g = u[u.length - 1]) instanceof m && c.lines + g.lines <= 32 ? (o += c.lines, a += c.length + 1, u[u.length - 1] = new m(g.text.concat(c.text), g.length + 1 + c.length)) : (o + c.lines > i && d(), o += c.lines, a += c.length + 1, u.push(c));
300
+ }
301
+ function d() {
302
+ o != 0 && (h.push(u.length == 1 ? u[0] : O.from(u, a)), a = -1, o = u.length = 0);
303
+ }
304
+ for (let c of e)
305
+ f(c);
306
+ return d(), h.length == 1 ? h[0] : new O(h, t);
307
+ }
308
+ }
309
+ x.empty = /* @__PURE__ */ new m([""], 0);
310
+ function Ne(l) {
311
+ let e = -1;
312
+ for (let t of l)
313
+ e += t.length + 1;
314
+ return e;
315
+ }
316
+ function Q(l, e, t = 0, n = 1e9) {
317
+ for (let i = 0, s = 0, r = !0; s < l.length && i <= n; s++) {
318
+ let h = l[s], o = i + h.length;
319
+ o >= t && (o > n && (h = h.slice(0, n - i)), i < t && (h = h.slice(t - i)), r ? (e[e.length - 1] += h, r = !1) : e.push(h)), i = o + 1;
320
+ }
321
+ return e;
322
+ }
323
+ function ve(l, e, t) {
324
+ return Q(l, [""], e, t);
325
+ }
326
+ class D {
327
+ constructor(e, t = 1) {
328
+ this.dir = t, this.done = !1, this.lineBreak = !1, this.value = "", this.nodes = [e], this.offsets = [t > 0 ? 1 : (e instanceof m ? e.text.length : e.children.length) << 1];
329
+ }
330
+ nextInner(e, t) {
331
+ for (this.done = this.lineBreak = !1; ; ) {
332
+ let n = this.nodes.length - 1, i = this.nodes[n], s = this.offsets[n], r = s >> 1, h = i instanceof m ? i.text.length : i.children.length;
333
+ if (r == (t > 0 ? h : 0)) {
334
+ if (n == 0)
335
+ return this.done = !0, this.value = "", this;
336
+ t > 0 && this.offsets[n - 1]++, this.nodes.pop(), this.offsets.pop();
337
+ } else if ((s & 1) == (t > 0 ? 0 : 1)) {
338
+ if (this.offsets[n] += t, e == 0)
339
+ return this.lineBreak = !0, this.value = `
340
+ `, this;
341
+ e--;
342
+ } else if (i instanceof m) {
343
+ let o = i.text[r + (t < 0 ? -1 : 0)];
344
+ if (this.offsets[n] += t, o.length > Math.max(0, e))
345
+ return this.value = e == 0 ? o : t > 0 ? o.slice(e) : o.slice(0, o.length - e), this;
346
+ e -= o.length;
347
+ } else {
348
+ let o = i.children[r + (t < 0 ? -1 : 0)];
349
+ e > o.length ? (e -= o.length, this.offsets[n] += t) : (t < 0 && this.offsets[n]--, this.nodes.push(o), this.offsets.push(t > 0 ? 1 : (o instanceof m ? o.text.length : o.children.length) << 1));
350
+ }
351
+ }
352
+ }
353
+ next(e = 0) {
354
+ return e < 0 && (this.nextInner(-e, -this.dir), e = this.value.length), this.nextInner(e, this.dir);
355
+ }
356
+ }
357
+ class Ie {
358
+ constructor(e, t, n) {
359
+ this.value = "", this.done = !1, this.cursor = new D(e, t > n ? -1 : 1), this.pos = t > n ? e.length : 0, this.from = Math.min(t, n), this.to = Math.max(t, n);
360
+ }
361
+ nextInner(e, t) {
362
+ if (t < 0 ? this.pos <= this.from : this.pos >= this.to)
363
+ return this.value = "", this.done = !0, this;
364
+ e += Math.max(0, t < 0 ? this.pos - this.to : this.from - this.pos);
365
+ let n = t < 0 ? this.pos - this.from : this.to - this.pos;
366
+ e > n && (e = n), n -= e;
367
+ let { value: i } = this.cursor.next(e);
368
+ return this.pos += (i.length + e) * t, this.value = i.length <= n ? i : t < 0 ? i.slice(i.length - n) : i.slice(0, n), this.done = !this.value, this;
369
+ }
370
+ next(e = 0) {
371
+ return e < 0 ? e = Math.max(e, this.from - this.pos) : e > 0 && (e = Math.min(e, this.to - this.pos)), this.nextInner(e, this.cursor.dir);
372
+ }
373
+ get lineBreak() {
374
+ return this.cursor.lineBreak && this.value != "";
375
+ }
376
+ }
377
+ class Pe {
378
+ constructor(e) {
379
+ this.inner = e, this.afterBreak = !0, this.value = "", this.done = !1;
380
+ }
381
+ next(e = 0) {
382
+ let { done: t, lineBreak: n, value: i } = this.inner.next(e);
383
+ return t && this.afterBreak ? (this.value = "", this.afterBreak = !1) : t ? (this.done = !0, this.value = "") : n ? this.afterBreak ? this.value = "" : (this.afterBreak = !0, this.next()) : (this.value = i, this.afterBreak = !1), this;
384
+ }
385
+ get lineBreak() {
386
+ return !1;
387
+ }
388
+ }
389
+ typeof Symbol < "u" && (x.prototype[Symbol.iterator] = function() {
390
+ return this.iter();
391
+ }, D.prototype[Symbol.iterator] = Ie.prototype[Symbol.iterator] = Pe.prototype[Symbol.iterator] = function() {
392
+ return this;
393
+ });
394
+ class De {
395
+ /**
396
+ @internal
397
+ */
398
+ constructor(e, t, n, i) {
399
+ this.from = e, this.to = t, this.number = n, this.text = i;
400
+ }
401
+ /**
402
+ The length of the line (not including any line break after it).
403
+ */
404
+ get length() {
405
+ return this.to - this.from;
406
+ }
407
+ }
408
+ function J(l, e, t) {
409
+ return e = Math.max(0, Math.min(l.length, e)), [e, Math.max(e, Math.min(l.length, t))];
410
+ }
411
+ function Y(l, e, t = !0, n = !0) {
412
+ return Ve(l, e, t, n);
413
+ }
414
+ function $e(l) {
415
+ return l >= 56320 && l < 57344;
416
+ }
417
+ function ze(l) {
418
+ return l >= 55296 && l < 56320;
419
+ }
420
+ function tt(l, e) {
421
+ let t = l.charCodeAt(e);
422
+ if (!ze(t) || e + 1 == l.length)
423
+ return t;
424
+ let n = l.charCodeAt(e + 1);
425
+ return $e(n) ? (t - 55296 << 10) + (n - 56320) + 65536 : t;
426
+ }
427
+ function nt(l) {
428
+ return l <= 65535 ? String.fromCharCode(l) : (l -= 65536, String.fromCharCode((l >> 10) + 55296, (l & 1023) + 56320));
429
+ }
430
+ function it(l) {
431
+ return l < 65536 ? 1 : 2;
432
+ }
433
+ const se = /\r\n?|\n/;
434
+ var M = /* @__PURE__ */ (function(l) {
435
+ return l[l.Simple = 0] = "Simple", l[l.TrackDel = 1] = "TrackDel", l[l.TrackBefore = 2] = "TrackBefore", l[l.TrackAfter = 3] = "TrackAfter", l;
436
+ })(M || (M = {}));
437
+ class C {
438
+ // Sections are encoded as pairs of integers. The first is the
439
+ // length in the current document, and the second is -1 for
440
+ // unaffected sections, and the length of the replacement content
441
+ // otherwise. So an insertion would be (0, n>0), a deletion (n>0,
442
+ // 0), and a replacement two positive numbers.
443
+ /**
444
+ @internal
445
+ */
446
+ constructor(e) {
447
+ this.sections = e;
448
+ }
449
+ /**
450
+ The length of the document before the change.
451
+ */
452
+ get length() {
453
+ let e = 0;
454
+ for (let t = 0; t < this.sections.length; t += 2)
455
+ e += this.sections[t];
456
+ return e;
457
+ }
458
+ /**
459
+ The length of the document after the change.
460
+ */
461
+ get newLength() {
462
+ let e = 0;
463
+ for (let t = 0; t < this.sections.length; t += 2) {
464
+ let n = this.sections[t + 1];
465
+ e += n < 0 ? this.sections[t] : n;
466
+ }
467
+ return e;
468
+ }
469
+ /**
470
+ False when there are actual changes in this set.
471
+ */
472
+ get empty() {
473
+ return this.sections.length == 0 || this.sections.length == 2 && this.sections[1] < 0;
474
+ }
475
+ /**
476
+ Iterate over the unchanged parts left by these changes. `posA`
477
+ provides the position of the range in the old document, `posB`
478
+ the new position in the changed document.
479
+ */
480
+ iterGaps(e) {
481
+ for (let t = 0, n = 0, i = 0; t < this.sections.length; ) {
482
+ let s = this.sections[t++], r = this.sections[t++];
483
+ r < 0 ? (e(n, i, s), i += s) : i += r, n += s;
484
+ }
485
+ }
486
+ /**
487
+ Iterate over the ranges changed by these changes. (See
488
+ [`ChangeSet.iterChanges`](https://codemirror.net/6/docs/ref/#state.ChangeSet.iterChanges) for a
489
+ variant that also provides you with the inserted text.)
490
+ `fromA`/`toA` provides the extent of the change in the starting
491
+ document, `fromB`/`toB` the extent of the replacement in the
492
+ changed document.
493
+
494
+ When `individual` is true, adjacent changes (which are kept
495
+ separate for [position mapping](https://codemirror.net/6/docs/ref/#state.ChangeDesc.mapPos)) are
496
+ reported separately.
497
+ */
498
+ iterChangedRanges(e, t = !1) {
499
+ re(this, e, t);
500
+ }
501
+ /**
502
+ Get a description of the inverted form of these changes.
503
+ */
504
+ get invertedDesc() {
505
+ let e = [];
506
+ for (let t = 0; t < this.sections.length; ) {
507
+ let n = this.sections[t++], i = this.sections[t++];
508
+ i < 0 ? e.push(n, i) : e.push(i, n);
509
+ }
510
+ return new C(e);
511
+ }
512
+ /**
513
+ Compute the combined effect of applying another set of changes
514
+ after this one. The length of the document after this set should
515
+ match the length before `other`.
516
+ */
517
+ composeDesc(e) {
518
+ return this.empty ? e : e.empty ? this : Ae(this, e);
519
+ }
520
+ /**
521
+ Map this description, which should start with the same document
522
+ as `other`, over another set of changes, so that it can be
523
+ applied after it. When `before` is true, map as if the changes
524
+ in `this` happened before the ones in `other`.
525
+ */
526
+ mapDesc(e, t = !1) {
527
+ return e.empty ? this : le(this, e, t);
528
+ }
529
+ mapPos(e, t = -1, n = M.Simple) {
530
+ let i = 0, s = 0;
531
+ for (let r = 0; r < this.sections.length; ) {
532
+ let h = this.sections[r++], o = this.sections[r++], a = i + h;
533
+ if (o < 0) {
534
+ if (a > e)
535
+ return s + (e - i);
536
+ s += h;
537
+ } else {
538
+ if (n != M.Simple && a >= e && (n == M.TrackDel && i < e && a > e || n == M.TrackBefore && i < e || n == M.TrackAfter && a > e))
539
+ return null;
540
+ if (a > e || a == e && t < 0 && !h)
541
+ return e == i || t < 0 ? s : s + o;
542
+ s += o;
543
+ }
544
+ i = a;
545
+ }
546
+ if (e > i)
547
+ throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);
548
+ return s;
549
+ }
550
+ /**
551
+ Check whether these changes touch a given range. When one of the
552
+ changes entirely covers the range, the string `"cover"` is
553
+ returned.
554
+ */
555
+ touchesRange(e, t = e) {
556
+ for (let n = 0, i = 0; n < this.sections.length && i <= t; ) {
557
+ let s = this.sections[n++], r = this.sections[n++], h = i + s;
558
+ if (r >= 0 && i <= t && h >= e)
559
+ return i < e && h > t ? "cover" : !0;
560
+ i = h;
561
+ }
562
+ return !1;
563
+ }
564
+ /**
565
+ @internal
566
+ */
567
+ toString() {
568
+ let e = "";
569
+ for (let t = 0; t < this.sections.length; ) {
570
+ let n = this.sections[t++], i = this.sections[t++];
571
+ e += (e ? " " : "") + n + (i >= 0 ? ":" + i : "");
572
+ }
573
+ return e;
574
+ }
575
+ /**
576
+ Serialize this change desc to a JSON-representable value.
577
+ */
578
+ toJSON() {
579
+ return this.sections;
580
+ }
581
+ /**
582
+ Create a change desc from its JSON representation (as produced
583
+ by [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeDesc.toJSON).
584
+ */
585
+ static fromJSON(e) {
586
+ if (!Array.isArray(e) || e.length % 2 || e.some((t) => typeof t != "number"))
587
+ throw new RangeError("Invalid JSON representation of ChangeDesc");
588
+ return new C(e);
589
+ }
590
+ /**
591
+ @internal
592
+ */
593
+ static create(e) {
594
+ return new C(e);
595
+ }
596
+ }
597
+ class y extends C {
598
+ constructor(e, t) {
599
+ super(e), this.inserted = t;
600
+ }
601
+ /**
602
+ Apply the changes to a document, returning the modified
603
+ document.
604
+ */
605
+ apply(e) {
606
+ if (this.length != e.length)
607
+ throw new RangeError("Applying change set to a document with the wrong length");
608
+ return re(this, (t, n, i, s, r) => e = e.replace(i, i + (n - t), r), !1), e;
609
+ }
610
+ mapDesc(e, t = !1) {
611
+ return le(this, e, t, !0);
612
+ }
613
+ /**
614
+ Given the document as it existed _before_ the changes, return a
615
+ change set that represents the inverse of this set, which could
616
+ be used to go from the document created by the changes back to
617
+ the document as it existed before the changes.
618
+ */
619
+ invert(e) {
620
+ let t = this.sections.slice(), n = [];
621
+ for (let i = 0, s = 0; i < t.length; i += 2) {
622
+ let r = t[i], h = t[i + 1];
623
+ if (h >= 0) {
624
+ t[i] = h, t[i + 1] = r;
625
+ let o = i >> 1;
626
+ for (; n.length < o; )
627
+ n.push(x.empty);
628
+ n.push(r ? e.slice(s, s + r) : x.empty);
629
+ }
630
+ s += r;
631
+ }
632
+ return new y(t, n);
633
+ }
634
+ /**
635
+ Combine two subsequent change sets into a single set. `other`
636
+ must start in the document produced by `this`. If `this` goes
637
+ `docA` → `docB` and `other` represents `docB` → `docC`, the
638
+ returned value will represent the change `docA` → `docC`.
639
+ */
640
+ compose(e) {
641
+ return this.empty ? e : e.empty ? this : Ae(this, e, !0);
642
+ }
643
+ /**
644
+ Given another change set starting in the same document, maps this
645
+ change set over the other, producing a new change set that can be
646
+ applied to the document produced by applying `other`. When
647
+ `before` is `true`, order changes as if `this` comes before
648
+ `other`, otherwise (the default) treat `other` as coming first.
649
+
650
+ Given two changes `A` and `B`, `A.compose(B.map(A))` and
651
+ `B.compose(A.map(B, true))` will produce the same document. This
652
+ provides a basic form of [operational
653
+ transformation](https://en.wikipedia.org/wiki/Operational_transformation),
654
+ and can be used for collaborative editing.
655
+ */
656
+ map(e, t = !1) {
657
+ return e.empty ? this : le(this, e, t, !0);
658
+ }
659
+ /**
660
+ Iterate over the changed ranges in the document, calling `f` for
661
+ each, with the range in the original document (`fromA`-`toA`)
662
+ and the range that replaces it in the new document
663
+ (`fromB`-`toB`).
664
+
665
+ When `individual` is true, adjacent changes are reported
666
+ separately.
667
+ */
668
+ iterChanges(e, t = !1) {
669
+ re(this, e, t);
670
+ }
671
+ /**
672
+ Get a [change description](https://codemirror.net/6/docs/ref/#state.ChangeDesc) for this change
673
+ set.
674
+ */
675
+ get desc() {
676
+ return C.create(this.sections);
677
+ }
678
+ /**
679
+ @internal
680
+ */
681
+ filter(e) {
682
+ let t = [], n = [], i = [], s = new z(this);
683
+ e: for (let r = 0, h = 0; ; ) {
684
+ let o = r == e.length ? 1e9 : e[r++];
685
+ for (; h < o || h == o && s.len == 0; ) {
686
+ if (s.done)
687
+ break e;
688
+ let u = Math.min(s.len, o - h);
689
+ k(i, u, -1);
690
+ let f = s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0;
691
+ k(t, u, f), f > 0 && b(n, t, s.text), s.forward(u), h += u;
692
+ }
693
+ let a = e[r++];
694
+ for (; h < a; ) {
695
+ if (s.done)
696
+ break e;
697
+ let u = Math.min(s.len, a - h);
698
+ k(t, u, -1), k(i, u, s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0), s.forward(u), h += u;
699
+ }
700
+ }
701
+ return {
702
+ changes: new y(t, n),
703
+ filtered: C.create(i)
704
+ };
705
+ }
706
+ /**
707
+ Serialize this change set to a JSON-representable value.
708
+ */
709
+ toJSON() {
710
+ let e = [];
711
+ for (let t = 0; t < this.sections.length; t += 2) {
712
+ let n = this.sections[t], i = this.sections[t + 1];
713
+ i < 0 ? e.push(n) : i == 0 ? e.push([n]) : e.push([n].concat(this.inserted[t >> 1].toJSON()));
714
+ }
715
+ return e;
716
+ }
717
+ /**
718
+ Create a change set for the given changes, for a document of the
719
+ given length, using `lineSep` as line separator.
720
+ */
721
+ static of(e, t, n) {
722
+ let i = [], s = [], r = 0, h = null;
723
+ function o(u = !1) {
724
+ if (!u && !i.length)
725
+ return;
726
+ r < t && k(i, t - r, -1);
727
+ let f = new y(i, s);
728
+ h = h ? h.compose(f.map(h)) : f, i = [], s = [], r = 0;
729
+ }
730
+ function a(u) {
731
+ if (Array.isArray(u))
732
+ for (let f of u)
733
+ a(f);
734
+ else if (u instanceof y) {
735
+ if (u.length != t)
736
+ throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${t})`);
737
+ o(), h = h ? h.compose(u.map(h)) : u;
738
+ } else {
739
+ let { from: f, to: d = f, insert: c } = u;
740
+ if (f > d || f < 0 || d > t)
741
+ throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${t})`);
742
+ let g = c ? typeof c == "string" ? x.of(c.split(n || se)) : c : x.empty, E = g.length;
743
+ if (f == d && E == 0)
744
+ return;
745
+ f < r && o(), f > r && k(i, f - r, -1), k(i, d - f, E), b(s, i, g), r = d;
746
+ }
747
+ }
748
+ return a(e), o(!h), h;
749
+ }
750
+ /**
751
+ Create an empty changeset of the given length.
752
+ */
753
+ static empty(e) {
754
+ return new y(e ? [e, -1] : [], []);
755
+ }
756
+ /**
757
+ Create a changeset from its JSON representation (as produced by
758
+ [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeSet.toJSON).
759
+ */
760
+ static fromJSON(e) {
761
+ if (!Array.isArray(e))
762
+ throw new RangeError("Invalid JSON representation of ChangeSet");
763
+ let t = [], n = [];
764
+ for (let i = 0; i < e.length; i++) {
765
+ let s = e[i];
766
+ if (typeof s == "number")
767
+ t.push(s, -1);
768
+ else {
769
+ if (!Array.isArray(s) || typeof s[0] != "number" || s.some((r, h) => h && typeof r != "string"))
770
+ throw new RangeError("Invalid JSON representation of ChangeSet");
771
+ if (s.length == 1)
772
+ t.push(s[0], 0);
773
+ else {
774
+ for (; n.length < i; )
775
+ n.push(x.empty);
776
+ n[i] = x.of(s.slice(1)), t.push(s[0], n[i].length);
777
+ }
778
+ }
779
+ }
780
+ return new y(t, n);
781
+ }
782
+ /**
783
+ @internal
784
+ */
785
+ static createSet(e, t) {
786
+ return new y(e, t);
787
+ }
788
+ }
789
+ function k(l, e, t, n = !1) {
790
+ if (e == 0 && t <= 0)
791
+ return;
792
+ let i = l.length - 2;
793
+ i >= 0 && t <= 0 && t == l[i + 1] ? l[i] += e : i >= 0 && e == 0 && l[i] == 0 ? l[i + 1] += t : n ? (l[i] += e, l[i + 1] += t) : l.push(e, t);
794
+ }
795
+ function b(l, e, t) {
796
+ if (t.length == 0)
797
+ return;
798
+ let n = e.length - 2 >> 1;
799
+ if (n < l.length)
800
+ l[l.length - 1] = l[l.length - 1].append(t);
801
+ else {
802
+ for (; l.length < n; )
803
+ l.push(x.empty);
804
+ l.push(t);
805
+ }
806
+ }
807
+ function re(l, e, t) {
808
+ let n = l.inserted;
809
+ for (let i = 0, s = 0, r = 0; r < l.sections.length; ) {
810
+ let h = l.sections[r++], o = l.sections[r++];
811
+ if (o < 0)
812
+ i += h, s += h;
813
+ else {
814
+ let a = i, u = s, f = x.empty;
815
+ for (; a += h, u += o, o && n && (f = f.append(n[r - 2 >> 1])), !(t || r == l.sections.length || l.sections[r + 1] < 0); )
816
+ h = l.sections[r++], o = l.sections[r++];
817
+ e(i, a, s, u, f), i = a, s = u;
818
+ }
819
+ }
820
+ }
821
+ function le(l, e, t, n = !1) {
822
+ let i = [], s = n ? [] : null, r = new z(l), h = new z(e);
823
+ for (let o = -1; ; ) {
824
+ if (r.done && h.len || h.done && r.len)
825
+ throw new Error("Mismatched change set lengths");
826
+ if (r.ins == -1 && h.ins == -1) {
827
+ let a = Math.min(r.len, h.len);
828
+ k(i, a, -1), r.forward(a), h.forward(a);
829
+ } else if (h.ins >= 0 && (r.ins < 0 || o == r.i || r.off == 0 && (h.len < r.len || h.len == r.len && !t))) {
830
+ let a = h.len;
831
+ for (k(i, h.ins, -1); a; ) {
832
+ let u = Math.min(r.len, a);
833
+ r.ins >= 0 && o < r.i && r.len <= u && (k(i, 0, r.ins), s && b(s, i, r.text), o = r.i), r.forward(u), a -= u;
834
+ }
835
+ h.next();
836
+ } else if (r.ins >= 0) {
837
+ let a = 0, u = r.len;
838
+ for (; u; )
839
+ if (h.ins == -1) {
840
+ let f = Math.min(u, h.len);
841
+ a += f, u -= f, h.forward(f);
842
+ } else if (h.ins == 0 && h.len < u)
843
+ u -= h.len, h.next();
844
+ else
845
+ break;
846
+ k(i, a, o < r.i ? r.ins : 0), s && o < r.i && b(s, i, r.text), o = r.i, r.forward(r.len - u);
847
+ } else {
848
+ if (r.done && h.done)
849
+ return s ? y.createSet(i, s) : C.create(i);
850
+ throw new Error("Mismatched change set lengths");
851
+ }
852
+ }
853
+ }
854
+ function Ae(l, e, t = !1) {
855
+ let n = [], i = t ? [] : null, s = new z(l), r = new z(e);
856
+ for (let h = !1; ; ) {
857
+ if (s.done && r.done)
858
+ return i ? y.createSet(n, i) : C.create(n);
859
+ if (s.ins == 0)
860
+ k(n, s.len, 0, h), s.next();
861
+ else if (r.len == 0 && !r.done)
862
+ k(n, 0, r.ins, h), i && b(i, n, r.text), r.next();
863
+ else {
864
+ if (s.done || r.done)
865
+ throw new Error("Mismatched change set lengths");
866
+ {
867
+ let o = Math.min(s.len2, r.len), a = n.length;
868
+ if (s.ins == -1) {
869
+ let u = r.ins == -1 ? -1 : r.off ? 0 : r.ins;
870
+ k(n, o, u, h), i && u && b(i, n, r.text);
871
+ } else r.ins == -1 ? (k(n, s.off ? 0 : s.len, o, h), i && b(i, n, s.textBit(o))) : (k(n, s.off ? 0 : s.len, r.off ? 0 : r.ins, h), i && !r.off && b(i, n, r.text));
872
+ h = (s.ins > o || r.ins >= 0 && r.len > o) && (h || n.length > a), s.forward2(o), r.forward(o);
873
+ }
874
+ }
875
+ }
876
+ }
877
+ class z {
878
+ constructor(e) {
879
+ this.set = e, this.i = 0, this.next();
880
+ }
881
+ next() {
882
+ let { sections: e } = this.set;
883
+ this.i < e.length ? (this.len = e[this.i++], this.ins = e[this.i++]) : (this.len = 0, this.ins = -2), this.off = 0;
884
+ }
885
+ get done() {
886
+ return this.ins == -2;
887
+ }
888
+ get len2() {
889
+ return this.ins < 0 ? this.len : this.ins;
890
+ }
891
+ get text() {
892
+ let { inserted: e } = this.set, t = this.i - 2 >> 1;
893
+ return t >= e.length ? x.empty : e[t];
894
+ }
895
+ textBit(e) {
896
+ let { inserted: t } = this.set, n = this.i - 2 >> 1;
897
+ return n >= t.length && !e ? x.empty : t[n].slice(this.off, e == null ? void 0 : this.off + e);
898
+ }
899
+ forward(e) {
900
+ e == this.len ? this.next() : (this.len -= e, this.off += e);
901
+ }
902
+ forward2(e) {
903
+ this.ins == -1 ? this.forward(e) : e == this.ins ? this.next() : (this.ins -= e, this.off += e);
904
+ }
905
+ }
906
+ class B {
907
+ constructor(e, t, n) {
908
+ this.from = e, this.to = t, this.flags = n;
909
+ }
910
+ /**
911
+ The anchor of the range—the side that doesn't move when you
912
+ extend it.
913
+ */
914
+ get anchor() {
915
+ return this.flags & 32 ? this.to : this.from;
916
+ }
917
+ /**
918
+ The head of the range, which is moved when the range is
919
+ [extended](https://codemirror.net/6/docs/ref/#state.SelectionRange.extend).
920
+ */
921
+ get head() {
922
+ return this.flags & 32 ? this.from : this.to;
923
+ }
924
+ /**
925
+ True when `anchor` and `head` are at the same position.
926
+ */
927
+ get empty() {
928
+ return this.from == this.to;
929
+ }
930
+ /**
931
+ If this is a cursor that is explicitly associated with the
932
+ character on one of its sides, this returns the side. -1 means
933
+ the character before its position, 1 the character after, and 0
934
+ means no association.
935
+ */
936
+ get assoc() {
937
+ return this.flags & 8 ? -1 : this.flags & 16 ? 1 : 0;
938
+ }
939
+ /**
940
+ The bidirectional text level associated with this cursor, if
941
+ any.
942
+ */
943
+ get bidiLevel() {
944
+ let e = this.flags & 7;
945
+ return e == 7 ? null : e;
946
+ }
947
+ /**
948
+ The goal column (stored vertical offset) associated with a
949
+ cursor. This is used to preserve the vertical position when
950
+ [moving](https://codemirror.net/6/docs/ref/#view.EditorView.moveVertically) across
951
+ lines of different length.
952
+ */
953
+ get goalColumn() {
954
+ let e = this.flags >> 6;
955
+ return e == 16777215 ? void 0 : e;
956
+ }
957
+ /**
958
+ Map this range through a change, producing a valid range in the
959
+ updated document.
960
+ */
961
+ map(e, t = -1) {
962
+ let n, i;
963
+ return this.empty ? n = i = e.mapPos(this.from, t) : (n = e.mapPos(this.from, 1), i = e.mapPos(this.to, -1)), n == this.from && i == this.to ? this : new B(n, i, this.flags);
964
+ }
965
+ /**
966
+ Extend this range to cover at least `from` to `to`.
967
+ */
968
+ extend(e, t = e, n = 0) {
969
+ if (e <= this.anchor && t >= this.anchor)
970
+ return p.range(e, t, void 0, void 0, n);
971
+ let i = Math.abs(e - this.anchor) > Math.abs(t - this.anchor) ? e : t;
972
+ return p.range(this.anchor, i, void 0, void 0, n);
973
+ }
974
+ /**
975
+ Compare this range to another range.
976
+ */
977
+ eq(e, t = !1) {
978
+ return this.anchor == e.anchor && this.head == e.head && this.goalColumn == e.goalColumn && (!t || !this.empty || this.assoc == e.assoc);
979
+ }
980
+ /**
981
+ Return a JSON-serializable object representing the range.
982
+ */
983
+ toJSON() {
984
+ return { anchor: this.anchor, head: this.head };
985
+ }
986
+ /**
987
+ Convert a JSON representation of a range to a `SelectionRange`
988
+ instance.
989
+ */
990
+ static fromJSON(e) {
991
+ if (!e || typeof e.anchor != "number" || typeof e.head != "number")
992
+ throw new RangeError("Invalid JSON representation for SelectionRange");
993
+ return p.range(e.anchor, e.head);
994
+ }
995
+ /**
996
+ @internal
997
+ */
998
+ static create(e, t, n) {
999
+ return new B(e, t, n);
1000
+ }
1001
+ }
1002
+ class p {
1003
+ constructor(e, t) {
1004
+ this.ranges = e, this.mainIndex = t;
1005
+ }
1006
+ /**
1007
+ Map a selection through a change. Used to adjust the selection
1008
+ position for changes.
1009
+ */
1010
+ map(e, t = -1) {
1011
+ return e.empty ? this : p.create(this.ranges.map((n) => n.map(e, t)), this.mainIndex);
1012
+ }
1013
+ /**
1014
+ Compare this selection to another selection. By default, ranges
1015
+ are compared only by position. When `includeAssoc` is true,
1016
+ cursor ranges must also have the same
1017
+ [`assoc`](https://codemirror.net/6/docs/ref/#state.SelectionRange.assoc) value.
1018
+ */
1019
+ eq(e, t = !1) {
1020
+ if (this.ranges.length != e.ranges.length || this.mainIndex != e.mainIndex)
1021
+ return !1;
1022
+ for (let n = 0; n < this.ranges.length; n++)
1023
+ if (!this.ranges[n].eq(e.ranges[n], t))
1024
+ return !1;
1025
+ return !0;
1026
+ }
1027
+ /**
1028
+ Get the primary selection range. Usually, you should make sure
1029
+ your code applies to _all_ ranges, by using methods like
1030
+ [`changeByRange`](https://codemirror.net/6/docs/ref/#state.EditorState.changeByRange).
1031
+ */
1032
+ get main() {
1033
+ return this.ranges[this.mainIndex];
1034
+ }
1035
+ /**
1036
+ Make sure the selection only has one range. Returns a selection
1037
+ holding only the main range from this selection.
1038
+ */
1039
+ asSingle() {
1040
+ return this.ranges.length == 1 ? this : new p([this.main], 0);
1041
+ }
1042
+ /**
1043
+ Extend this selection with an extra range.
1044
+ */
1045
+ addRange(e, t = !0) {
1046
+ return p.create([e].concat(this.ranges), t ? 0 : this.mainIndex + 1);
1047
+ }
1048
+ /**
1049
+ Replace a given range with another range, and then normalize the
1050
+ selection to merge and sort ranges if necessary.
1051
+ */
1052
+ replaceRange(e, t = this.mainIndex) {
1053
+ let n = this.ranges.slice();
1054
+ return n[t] = e, p.create(n, this.mainIndex);
1055
+ }
1056
+ /**
1057
+ Convert this selection to an object that can be serialized to
1058
+ JSON.
1059
+ */
1060
+ toJSON() {
1061
+ return { ranges: this.ranges.map((e) => e.toJSON()), main: this.mainIndex };
1062
+ }
1063
+ /**
1064
+ Create a selection from a JSON representation.
1065
+ */
1066
+ static fromJSON(e) {
1067
+ if (!e || !Array.isArray(e.ranges) || typeof e.main != "number" || e.main >= e.ranges.length)
1068
+ throw new RangeError("Invalid JSON representation for EditorSelection");
1069
+ return new p(e.ranges.map((t) => B.fromJSON(t)), e.main);
1070
+ }
1071
+ /**
1072
+ Create a selection holding a single range.
1073
+ */
1074
+ static single(e, t = e) {
1075
+ return new p([p.range(e, t)], 0);
1076
+ }
1077
+ /**
1078
+ Sort and merge the given set of ranges, creating a valid
1079
+ selection.
1080
+ */
1081
+ static create(e, t = 0) {
1082
+ if (e.length == 0)
1083
+ throw new RangeError("A selection needs at least one range");
1084
+ for (let n = 0, i = 0; i < e.length; i++) {
1085
+ let s = e[i];
1086
+ if (s.empty ? s.from <= n : s.from < n)
1087
+ return p.normalized(e.slice(), t);
1088
+ n = s.to;
1089
+ }
1090
+ return new p(e, t);
1091
+ }
1092
+ /**
1093
+ Create a cursor selection range at the given position. You can
1094
+ safely ignore the optional arguments in most situations.
1095
+ */
1096
+ static cursor(e, t = 0, n, i) {
1097
+ return B.create(e, e, (t == 0 ? 0 : t < 0 ? 8 : 16) | (n == null ? 7 : Math.min(6, n)) | (i ?? 16777215) << 6);
1098
+ }
1099
+ /**
1100
+ Create a selection range.
1101
+ */
1102
+ static range(e, t, n, i, s) {
1103
+ let r = (n ?? 16777215) << 6 | (i == null ? 7 : Math.min(6, i));
1104
+ return !s && e != t && (s = t < e ? 1 : -1), t < e ? B.create(t, e, 48 | r) : B.create(e, t, (s ? s < 0 ? 8 : 16 : 0) | r);
1105
+ }
1106
+ /**
1107
+ @internal
1108
+ */
1109
+ static normalized(e, t = 0) {
1110
+ let n = e[t];
1111
+ e.sort((i, s) => i.from - s.from), t = e.indexOf(n);
1112
+ for (let i = 1; i < e.length; i++) {
1113
+ let s = e[i], r = e[i - 1];
1114
+ if (s.empty ? s.from <= r.to : s.from < r.to) {
1115
+ let h = r.from, o = Math.max(s.to, r.to);
1116
+ i <= t && t--, e.splice(--i, 2, s.anchor > s.head ? p.range(o, h) : p.range(h, o));
1117
+ }
1118
+ }
1119
+ return new p(e, t);
1120
+ }
1121
+ }
1122
+ function Ee(l, e) {
1123
+ for (let t of l.ranges)
1124
+ if (t.to > e)
1125
+ throw new RangeError("Selection points outside of document");
1126
+ }
1127
+ let ge = 0;
1128
+ class A {
1129
+ constructor(e, t, n, i, s) {
1130
+ this.combine = e, this.compareInput = t, this.compare = n, this.isStatic = i, this.id = ge++, this.default = e([]), this.extensions = typeof s == "function" ? s(this) : s;
1131
+ }
1132
+ /**
1133
+ Returns a facet reader for this facet, which can be used to
1134
+ [read](https://codemirror.net/6/docs/ref/#state.EditorState.facet) it but not to define values for it.
1135
+ */
1136
+ get reader() {
1137
+ return this;
1138
+ }
1139
+ /**
1140
+ Define a new facet.
1141
+ */
1142
+ static define(e = {}) {
1143
+ return new A(e.combine || ((t) => t), e.compareInput || ((t, n) => t === n), e.compare || (e.combine ? (t, n) => t === n : pe), !!e.static, e.enables);
1144
+ }
1145
+ /**
1146
+ Returns an extension that adds the given value to this facet.
1147
+ */
1148
+ of(e) {
1149
+ return new X([], this, 0, e);
1150
+ }
1151
+ /**
1152
+ Create an extension that computes a value for the facet from a
1153
+ state. You must take care to declare the parts of the state that
1154
+ this value depends on, since your function is only called again
1155
+ for a new state when one of those parts changed.
1156
+
1157
+ In cases where your value depends only on a single field, you'll
1158
+ want to use the [`from`](https://codemirror.net/6/docs/ref/#state.Facet.from) method instead.
1159
+ */
1160
+ compute(e, t) {
1161
+ if (this.isStatic)
1162
+ throw new Error("Can't compute a static facet");
1163
+ return new X(e, this, 1, t);
1164
+ }
1165
+ /**
1166
+ Create an extension that computes zero or more values for this
1167
+ facet from a state.
1168
+ */
1169
+ computeN(e, t) {
1170
+ if (this.isStatic)
1171
+ throw new Error("Can't compute a static facet");
1172
+ return new X(e, this, 2, t);
1173
+ }
1174
+ from(e, t) {
1175
+ return t || (t = (n) => n), this.compute([e], (n) => t(n.field(e)));
1176
+ }
1177
+ }
1178
+ function pe(l, e) {
1179
+ return l == e || l.length == e.length && l.every((t, n) => t === e[n]);
1180
+ }
1181
+ class X {
1182
+ constructor(e, t, n, i) {
1183
+ this.dependencies = e, this.facet = t, this.type = n, this.value = i, this.id = ge++;
1184
+ }
1185
+ dynamicSlot(e) {
1186
+ var t;
1187
+ let n = this.value, i = this.facet.compareInput, s = this.id, r = e[s] >> 1, h = this.type == 2, o = !1, a = !1, u = [];
1188
+ for (let f of this.dependencies)
1189
+ f == "doc" ? o = !0 : f == "selection" ? a = !0 : (((t = e[f.id]) !== null && t !== void 0 ? t : 1) & 1) == 0 && u.push(e[f.id]);
1190
+ return {
1191
+ create(f) {
1192
+ return f.values[r] = n(f), 1;
1193
+ },
1194
+ update(f, d) {
1195
+ if (o && d.docChanged || a && (d.docChanged || d.selection) || he(f, u)) {
1196
+ let c = n(f);
1197
+ if (h ? !xe(c, f.values[r], i) : !i(c, f.values[r]))
1198
+ return f.values[r] = c, 1;
1199
+ }
1200
+ return 0;
1201
+ },
1202
+ reconfigure: (f, d) => {
1203
+ let c, g = d.config.address[s];
1204
+ if (g != null) {
1205
+ let E = j(d, g);
1206
+ if (this.dependencies.every((v) => v instanceof A ? d.facet(v) === f.facet(v) : v instanceof L ? d.field(v, !1) == f.field(v, !1) : !0) || (h ? xe(c = n(f), E, i) : i(c = n(f), E)))
1207
+ return f.values[r] = E, 0;
1208
+ } else
1209
+ c = n(f);
1210
+ return f.values[r] = c, 1;
1211
+ }
1212
+ };
1213
+ }
1214
+ }
1215
+ function xe(l, e, t) {
1216
+ if (l.length != e.length)
1217
+ return !1;
1218
+ for (let n = 0; n < l.length; n++)
1219
+ if (!t(l[n], e[n]))
1220
+ return !1;
1221
+ return !0;
1222
+ }
1223
+ function he(l, e) {
1224
+ let t = !1;
1225
+ for (let n of e)
1226
+ $(l, n) & 1 && (t = !0);
1227
+ return t;
1228
+ }
1229
+ function qe(l, e, t) {
1230
+ let n = t.map((o) => l[o.id]), i = t.map((o) => o.type), s = n.filter((o) => !(o & 1)), r = l[e.id] >> 1;
1231
+ function h(o) {
1232
+ let a = [];
1233
+ for (let u = 0; u < n.length; u++) {
1234
+ let f = j(o, n[u]);
1235
+ if (i[u] == 2)
1236
+ for (let d of f)
1237
+ a.push(d);
1238
+ else
1239
+ a.push(f);
1240
+ }
1241
+ return e.combine(a);
1242
+ }
1243
+ return {
1244
+ create(o) {
1245
+ for (let a of n)
1246
+ $(o, a);
1247
+ return o.values[r] = h(o), 1;
1248
+ },
1249
+ update(o, a) {
1250
+ if (!he(o, s))
1251
+ return 0;
1252
+ let u = h(o);
1253
+ return e.compare(u, o.values[r]) ? 0 : (o.values[r] = u, 1);
1254
+ },
1255
+ reconfigure(o, a) {
1256
+ let u = he(o, n), f = a.config.facets[e.id], d = a.facet(e);
1257
+ if (f && !u && pe(t, f))
1258
+ return o.values[r] = d, 0;
1259
+ let c = h(o);
1260
+ return e.compare(c, d) ? (o.values[r] = d, 0) : (o.values[r] = c, 1);
1261
+ }
1262
+ };
1263
+ }
1264
+ const G = /* @__PURE__ */ A.define({ static: !0 });
1265
+ class L {
1266
+ constructor(e, t, n, i, s) {
1267
+ this.id = e, this.createF = t, this.updateF = n, this.compareF = i, this.spec = s, this.provides = void 0;
1268
+ }
1269
+ /**
1270
+ Define a state field.
1271
+ */
1272
+ static define(e) {
1273
+ let t = new L(ge++, e.create, e.update, e.compare || ((n, i) => n === i), e);
1274
+ return e.provide && (t.provides = e.provide(t)), t;
1275
+ }
1276
+ create(e) {
1277
+ let t = e.facet(G).find((n) => n.field == this);
1278
+ return (t?.create || this.createF)(e);
1279
+ }
1280
+ /**
1281
+ @internal
1282
+ */
1283
+ slot(e) {
1284
+ let t = e[this.id] >> 1;
1285
+ return {
1286
+ create: (n) => (n.values[t] = this.create(n), 1),
1287
+ update: (n, i) => {
1288
+ let s = n.values[t], r = this.updateF(s, i);
1289
+ return this.compareF(s, r) ? 0 : (n.values[t] = r, 1);
1290
+ },
1291
+ reconfigure: (n, i) => {
1292
+ let s = n.facet(G), r = i.facet(G), h;
1293
+ return (h = s.find((o) => o.field == this)) && h != r.find((o) => o.field == this) ? (n.values[t] = h.create(n), 1) : i.config.address[this.id] != null ? (n.values[t] = i.field(this), 0) : (n.values[t] = this.create(n), 1);
1294
+ }
1295
+ };
1296
+ }
1297
+ /**
1298
+ Returns an extension that enables this field and overrides the
1299
+ way it is initialized. Can be useful when you need to provide a
1300
+ non-default starting value for the field.
1301
+ */
1302
+ init(e) {
1303
+ return [this, G.of({ field: this, create: e })];
1304
+ }
1305
+ /**
1306
+ State field instances can be used as
1307
+ [`Extension`](https://codemirror.net/6/docs/ref/#state.Extension) values to enable the field in a
1308
+ given state.
1309
+ */
1310
+ get extension() {
1311
+ return this;
1312
+ }
1313
+ }
1314
+ const T = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 };
1315
+ function V(l) {
1316
+ return (e) => new Oe(e, l);
1317
+ }
1318
+ const st = {
1319
+ /**
1320
+ The highest precedence level, for extensions that should end up
1321
+ near the start of the precedence ordering.
1322
+ */
1323
+ highest: /* @__PURE__ */ V(T.highest),
1324
+ /**
1325
+ A higher-than-default precedence, for extensions that should
1326
+ come before those with default precedence.
1327
+ */
1328
+ high: /* @__PURE__ */ V(T.high),
1329
+ /**
1330
+ The default precedence, which is also used for extensions
1331
+ without an explicit precedence.
1332
+ */
1333
+ default: /* @__PURE__ */ V(T.default),
1334
+ /**
1335
+ A lower-than-default precedence.
1336
+ */
1337
+ low: /* @__PURE__ */ V(T.low),
1338
+ /**
1339
+ The lowest precedence level. Meant for things that should end up
1340
+ near the end of the extension order.
1341
+ */
1342
+ lowest: /* @__PURE__ */ V(T.lowest)
1343
+ };
1344
+ class Oe {
1345
+ constructor(e, t) {
1346
+ this.inner = e, this.prec = t;
1347
+ }
1348
+ }
1349
+ class te {
1350
+ /**
1351
+ Create an instance of this compartment to add to your [state
1352
+ configuration](https://codemirror.net/6/docs/ref/#state.EditorStateConfig.extensions).
1353
+ */
1354
+ of(e) {
1355
+ return new oe(this, e);
1356
+ }
1357
+ /**
1358
+ Create an [effect](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) that
1359
+ reconfigures this compartment.
1360
+ */
1361
+ reconfigure(e) {
1362
+ return te.reconfigure.of({ compartment: this, extension: e });
1363
+ }
1364
+ /**
1365
+ Get the current content of the compartment in the state, or
1366
+ `undefined` if it isn't present.
1367
+ */
1368
+ get(e) {
1369
+ return e.config.compartments.get(this);
1370
+ }
1371
+ }
1372
+ class oe {
1373
+ constructor(e, t) {
1374
+ this.compartment = e, this.inner = t;
1375
+ }
1376
+ }
1377
+ class Z {
1378
+ constructor(e, t, n, i, s, r) {
1379
+ for (this.base = e, this.compartments = t, this.dynamicSlots = n, this.address = i, this.staticValues = s, this.facets = r, this.statusTemplate = []; this.statusTemplate.length < n.length; )
1380
+ this.statusTemplate.push(
1381
+ 0
1382
+ /* SlotStatus.Unresolved */
1383
+ );
1384
+ }
1385
+ staticFacet(e) {
1386
+ let t = this.address[e.id];
1387
+ return t == null ? e.default : this.staticValues[t >> 1];
1388
+ }
1389
+ static resolve(e, t, n) {
1390
+ let i = [], s = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ new Map();
1391
+ for (let d of We(e, t, r))
1392
+ d instanceof L ? i.push(d) : (s[d.facet.id] || (s[d.facet.id] = [])).push(d);
1393
+ let h = /* @__PURE__ */ Object.create(null), o = [], a = [];
1394
+ for (let d of i)
1395
+ h[d.id] = a.length << 1, a.push((c) => d.slot(c));
1396
+ let u = n?.config.facets;
1397
+ for (let d in s) {
1398
+ let c = s[d], g = c[0].facet, E = u && u[d] || [];
1399
+ if (c.every(
1400
+ (v) => v.type == 0
1401
+ /* Provider.Static */
1402
+ ))
1403
+ if (h[g.id] = o.length << 1 | 1, pe(E, c))
1404
+ o.push(n.facet(g));
1405
+ else {
1406
+ let v = g.combine(c.map((ne) => ne.value));
1407
+ o.push(n && g.compare(v, n.facet(g)) ? n.facet(g) : v);
1408
+ }
1409
+ else {
1410
+ for (let v of c)
1411
+ v.type == 0 ? (h[v.id] = o.length << 1 | 1, o.push(v.value)) : (h[v.id] = a.length << 1, a.push((ne) => v.dynamicSlot(ne)));
1412
+ h[g.id] = a.length << 1, a.push((v) => qe(v, g, c));
1413
+ }
1414
+ }
1415
+ let f = a.map((d) => d(h));
1416
+ return new Z(e, r, f, h, o, s);
1417
+ }
1418
+ }
1419
+ function We(l, e, t) {
1420
+ let n = [[], [], [], [], []], i = /* @__PURE__ */ new Map();
1421
+ function s(r, h) {
1422
+ let o = i.get(r);
1423
+ if (o != null) {
1424
+ if (o <= h)
1425
+ return;
1426
+ let a = n[o].indexOf(r);
1427
+ a > -1 && n[o].splice(a, 1), r instanceof oe && t.delete(r.compartment);
1428
+ }
1429
+ if (i.set(r, h), Array.isArray(r))
1430
+ for (let a of r)
1431
+ s(a, h);
1432
+ else if (r instanceof oe) {
1433
+ if (t.has(r.compartment))
1434
+ throw new RangeError("Duplicate use of compartment in extensions");
1435
+ let a = e.get(r.compartment) || r.inner;
1436
+ t.set(r.compartment, a), s(a, h);
1437
+ } else if (r instanceof Oe)
1438
+ s(r.inner, r.prec);
1439
+ else if (r instanceof L)
1440
+ n[h].push(r), r.provides && s(r.provides, h);
1441
+ else if (r instanceof X)
1442
+ n[h].push(r), r.facet.extensions && s(r.facet.extensions, T.default);
1443
+ else {
1444
+ let a = r.extension;
1445
+ if (!a)
1446
+ throw new Error(`Unrecognized extension value in extension set (${r}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);
1447
+ s(a, h);
1448
+ }
1449
+ }
1450
+ return s(l, T.default), n.reduce((r, h) => r.concat(h));
1451
+ }
1452
+ function $(l, e) {
1453
+ if (e & 1)
1454
+ return 2;
1455
+ let t = e >> 1, n = l.status[t];
1456
+ if (n == 4)
1457
+ throw new Error("Cyclic dependency between fields and/or facets");
1458
+ if (n & 2)
1459
+ return n;
1460
+ l.status[t] = 4;
1461
+ let i = l.computeSlot(l, l.config.dynamicSlots[t]);
1462
+ return l.status[t] = 2 | i;
1463
+ }
1464
+ function j(l, e) {
1465
+ return e & 1 ? l.config.staticValues[e >> 1] : l.values[e >> 1];
1466
+ }
1467
+ const Ce = /* @__PURE__ */ A.define(), ae = /* @__PURE__ */ A.define({
1468
+ combine: (l) => l.some((e) => e),
1469
+ static: !0
1470
+ }), Me = /* @__PURE__ */ A.define({
1471
+ combine: (l) => l.length ? l[0] : void 0,
1472
+ static: !0
1473
+ }), be = /* @__PURE__ */ A.define(), Re = /* @__PURE__ */ A.define(), Te = /* @__PURE__ */ A.define(), Be = /* @__PURE__ */ A.define({
1474
+ combine: (l) => l.length ? l[0] : !1
1475
+ });
1476
+ class U {
1477
+ /**
1478
+ @internal
1479
+ */
1480
+ constructor(e, t) {
1481
+ this.type = e, this.value = t;
1482
+ }
1483
+ /**
1484
+ Define a new type of annotation.
1485
+ */
1486
+ static define() {
1487
+ return new Ue();
1488
+ }
1489
+ }
1490
+ class Ue {
1491
+ /**
1492
+ Create an instance of this annotation.
1493
+ */
1494
+ of(e) {
1495
+ return new U(this, e);
1496
+ }
1497
+ }
1498
+ class Ge {
1499
+ /**
1500
+ @internal
1501
+ */
1502
+ constructor(e) {
1503
+ this.map = e;
1504
+ }
1505
+ /**
1506
+ Create a [state effect](https://codemirror.net/6/docs/ref/#state.StateEffect) instance of this
1507
+ type.
1508
+ */
1509
+ of(e) {
1510
+ return new I(this, e);
1511
+ }
1512
+ }
1513
+ class I {
1514
+ /**
1515
+ @internal
1516
+ */
1517
+ constructor(e, t) {
1518
+ this.type = e, this.value = t;
1519
+ }
1520
+ /**
1521
+ Map this effect through a position mapping. Will return
1522
+ `undefined` when that ends up deleting the effect.
1523
+ */
1524
+ map(e) {
1525
+ let t = this.type.map(this.value, e);
1526
+ return t === void 0 ? void 0 : t == this.value ? this : new I(this.type, t);
1527
+ }
1528
+ /**
1529
+ Tells you whether this effect object is of a given
1530
+ [type](https://codemirror.net/6/docs/ref/#state.StateEffectType).
1531
+ */
1532
+ is(e) {
1533
+ return this.type == e;
1534
+ }
1535
+ /**
1536
+ Define a new effect type. The type parameter indicates the type
1537
+ of values that his effect holds. It should be a type that
1538
+ doesn't include `undefined`, since that is used in
1539
+ [mapping](https://codemirror.net/6/docs/ref/#state.StateEffect.map) to indicate that an effect is
1540
+ removed.
1541
+ */
1542
+ static define(e = {}) {
1543
+ return new Ge(e.map || ((t) => t));
1544
+ }
1545
+ /**
1546
+ Map an array of effects through a change set.
1547
+ */
1548
+ static mapEffects(e, t) {
1549
+ if (!e.length)
1550
+ return e;
1551
+ let n = [];
1552
+ for (let i of e) {
1553
+ let s = i.map(t);
1554
+ s && n.push(s);
1555
+ }
1556
+ return n;
1557
+ }
1558
+ }
1559
+ I.reconfigure = /* @__PURE__ */ I.define();
1560
+ I.appendConfig = /* @__PURE__ */ I.define();
1561
+ class P {
1562
+ constructor(e, t, n, i, s, r) {
1563
+ this.startState = e, this.changes = t, this.selection = n, this.effects = i, this.annotations = s, this.scrollIntoView = r, this._doc = null, this._state = null, n && Ee(n, t.newLength), s.some((h) => h.type == P.time) || (this.annotations = s.concat(P.time.of(Date.now())));
1564
+ }
1565
+ /**
1566
+ @internal
1567
+ */
1568
+ static create(e, t, n, i, s, r) {
1569
+ return new P(e, t, n, i, s, r);
1570
+ }
1571
+ /**
1572
+ The new document produced by the transaction. Contrary to
1573
+ [`.state`](https://codemirror.net/6/docs/ref/#state.Transaction.state)`.doc`, accessing this won't
1574
+ force the entire new state to be computed right away, so it is
1575
+ recommended that [transaction
1576
+ filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) use this getter
1577
+ when they need to look at the new document.
1578
+ */
1579
+ get newDoc() {
1580
+ return this._doc || (this._doc = this.changes.apply(this.startState.doc));
1581
+ }
1582
+ /**
1583
+ The new selection produced by the transaction. If
1584
+ [`this.selection`](https://codemirror.net/6/docs/ref/#state.Transaction.selection) is undefined,
1585
+ this will [map](https://codemirror.net/6/docs/ref/#state.EditorSelection.map) the start state's
1586
+ current selection through the changes made by the transaction.
1587
+ */
1588
+ get newSelection() {
1589
+ return this.selection || this.startState.selection.map(this.changes);
1590
+ }
1591
+ /**
1592
+ The new state created by the transaction. Computed on demand
1593
+ (but retained for subsequent access), so it is recommended not to
1594
+ access it in [transaction
1595
+ filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) when possible.
1596
+ */
1597
+ get state() {
1598
+ return this._state || this.startState.applyTransaction(this), this._state;
1599
+ }
1600
+ /**
1601
+ Get the value of the given annotation type, if any.
1602
+ */
1603
+ annotation(e) {
1604
+ for (let t of this.annotations)
1605
+ if (t.type == e)
1606
+ return t.value;
1607
+ }
1608
+ /**
1609
+ Indicates whether the transaction changed the document.
1610
+ */
1611
+ get docChanged() {
1612
+ return !this.changes.empty;
1613
+ }
1614
+ /**
1615
+ Indicates whether this transaction reconfigures the state
1616
+ (through a [configuration compartment](https://codemirror.net/6/docs/ref/#state.Compartment) or
1617
+ with a top-level configuration
1618
+ [effect](https://codemirror.net/6/docs/ref/#state.StateEffect^reconfigure).
1619
+ */
1620
+ get reconfigured() {
1621
+ return this.startState.config != this.state.config;
1622
+ }
1623
+ /**
1624
+ Returns true if the transaction has a [user
1625
+ event](https://codemirror.net/6/docs/ref/#state.Transaction^userEvent) annotation that is equal to
1626
+ or more specific than `event`. For example, if the transaction
1627
+ has `"select.pointer"` as user event, `"select"` and
1628
+ `"select.pointer"` will match it.
1629
+ */
1630
+ isUserEvent(e) {
1631
+ let t = this.annotation(P.userEvent);
1632
+ return !!(t && (t == e || t.length > e.length && t.slice(0, e.length) == e && t[e.length] == "."));
1633
+ }
1634
+ }
1635
+ P.time = /* @__PURE__ */ U.define();
1636
+ P.userEvent = /* @__PURE__ */ U.define();
1637
+ P.addToHistory = /* @__PURE__ */ U.define();
1638
+ P.remote = /* @__PURE__ */ U.define();
1639
+ function He(l, e) {
1640
+ let t = [];
1641
+ for (let n = 0, i = 0; ; ) {
1642
+ let s, r;
1643
+ if (n < l.length && (i == e.length || e[i] >= l[n]))
1644
+ s = l[n++], r = l[n++];
1645
+ else if (i < e.length)
1646
+ s = e[i++], r = e[i++];
1647
+ else
1648
+ return t;
1649
+ !t.length || t[t.length - 1] < s ? t.push(s, r) : t[t.length - 1] < r && (t[t.length - 1] = r);
1650
+ }
1651
+ }
1652
+ function Fe(l, e, t) {
1653
+ var n;
1654
+ let i, s, r;
1655
+ return t ? (i = e.changes, s = y.empty(e.changes.length), r = l.changes.compose(e.changes)) : (i = e.changes.map(l.changes), s = l.changes.mapDesc(e.changes, !0), r = l.changes.compose(i)), {
1656
+ changes: r,
1657
+ selection: e.selection ? e.selection.map(s) : (n = l.selection) === null || n === void 0 ? void 0 : n.map(i),
1658
+ effects: I.mapEffects(l.effects, i).concat(I.mapEffects(e.effects, s)),
1659
+ annotations: l.annotations.length ? l.annotations.concat(e.annotations) : e.annotations,
1660
+ scrollIntoView: l.scrollIntoView || e.scrollIntoView
1661
+ };
1662
+ }
1663
+ function ue(l, e, t) {
1664
+ let n = e.selection, i = F(e.annotations);
1665
+ return e.userEvent && (i = i.concat(P.userEvent.of(e.userEvent))), {
1666
+ changes: e.changes instanceof y ? e.changes : y.of(e.changes || [], t, l.facet(Me)),
1667
+ selection: n && (n instanceof p ? n : p.single(n.anchor, n.head)),
1668
+ effects: F(e.effects),
1669
+ annotations: i,
1670
+ scrollIntoView: !!e.scrollIntoView
1671
+ };
1672
+ }
1673
+ function Je(l, e, t) {
1674
+ let n = ue(l, e.length ? e[0] : {}, l.doc.length);
1675
+ e.length && e[0].filter === !1 && (t = !1);
1676
+ for (let s = 1; s < e.length; s++) {
1677
+ e[s].filter === !1 && (t = !1);
1678
+ let r = !!e[s].sequential;
1679
+ n = Fe(n, ue(l, e[s], r ? n.changes.newLength : l.doc.length), r);
1680
+ }
1681
+ let i = P.create(l, n.changes, n.selection, n.effects, n.annotations, n.scrollIntoView);
1682
+ return Qe(t ? Ke(i) : i);
1683
+ }
1684
+ function Ke(l) {
1685
+ let e = l.startState, t = !0;
1686
+ for (let i of e.facet(be)) {
1687
+ let s = i(l);
1688
+ if (s === !1) {
1689
+ t = !1;
1690
+ break;
1691
+ }
1692
+ Array.isArray(s) && (t = t === !0 ? s : He(t, s));
1693
+ }
1694
+ if (t !== !0) {
1695
+ let i, s;
1696
+ if (t === !1)
1697
+ s = l.changes.invertedDesc, i = y.empty(e.doc.length);
1698
+ else {
1699
+ let r = l.changes.filter(t);
1700
+ i = r.changes, s = r.filtered.mapDesc(r.changes).invertedDesc;
1701
+ }
1702
+ l = P.create(e, i, l.selection && l.selection.map(s), I.mapEffects(l.effects, s), l.annotations, l.scrollIntoView);
1703
+ }
1704
+ let n = e.facet(Re);
1705
+ for (let i = n.length - 1; i >= 0; i--) {
1706
+ let s = n[i](l);
1707
+ s instanceof P ? l = s : Array.isArray(s) && s.length == 1 && s[0] instanceof P ? l = s[0] : l = Je(e, F(s), !1);
1708
+ }
1709
+ return l;
1710
+ }
1711
+ function Qe(l) {
1712
+ let e = l.startState, t = e.facet(Te), n = l;
1713
+ for (let i = t.length - 1; i >= 0; i--) {
1714
+ let s = t[i](l);
1715
+ s && Object.keys(s).length && (n = Fe(n, ue(e, s, l.changes.newLength), !0));
1716
+ }
1717
+ return n == l ? l : P.create(e, l.changes, l.selection, n.effects, n.annotations, n.scrollIntoView);
1718
+ }
1719
+ const Xe = [];
1720
+ function F(l) {
1721
+ return l == null ? Xe : Array.isArray(l) ? l : [l];
1722
+ }
1723
+ var R = /* @__PURE__ */ (function(l) {
1724
+ return l[l.Word = 0] = "Word", l[l.Space = 1] = "Space", l[l.Other = 2] = "Other", l;
1725
+ })(R || (R = {}));
1726
+ const Ye = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
1727
+ let fe;
1728
+ try {
1729
+ fe = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u");
1730
+ } catch {
1731
+ }
1732
+ function Ze(l) {
1733
+ if (fe)
1734
+ return fe.test(l);
1735
+ for (let e = 0; e < l.length; e++) {
1736
+ let t = l[e];
1737
+ if (/\w/.test(t) || t > "€" && (t.toUpperCase() != t.toLowerCase() || Ye.test(t)))
1738
+ return !0;
1739
+ }
1740
+ return !1;
1741
+ }
1742
+ function je(l) {
1743
+ return (e) => {
1744
+ if (!/\S/.test(e))
1745
+ return R.Space;
1746
+ if (Ze(e))
1747
+ return R.Word;
1748
+ for (let t = 0; t < l.length; t++)
1749
+ if (e.indexOf(l[t]) > -1)
1750
+ return R.Word;
1751
+ return R.Other;
1752
+ };
1753
+ }
1754
+ class w {
1755
+ constructor(e, t, n, i, s, r) {
1756
+ this.config = e, this.doc = t, this.selection = n, this.values = i, this.status = e.statusTemplate.slice(), this.computeSlot = s, r && (r._state = this);
1757
+ for (let h = 0; h < this.config.dynamicSlots.length; h++)
1758
+ $(this, h << 1);
1759
+ this.computeSlot = null;
1760
+ }
1761
+ field(e, t = !0) {
1762
+ let n = this.config.address[e.id];
1763
+ if (n == null) {
1764
+ if (t)
1765
+ throw new RangeError("Field is not present in this state");
1766
+ return;
1767
+ }
1768
+ return $(this, n), j(this, n);
1769
+ }
1770
+ /**
1771
+ Create a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction) that updates this
1772
+ state. Any number of [transaction specs](https://codemirror.net/6/docs/ref/#state.TransactionSpec)
1773
+ can be passed. Unless
1774
+ [`sequential`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.sequential) is set, the
1775
+ [changes](https://codemirror.net/6/docs/ref/#state.TransactionSpec.changes) (if any) of each spec
1776
+ are assumed to start in the _current_ document (not the document
1777
+ produced by previous specs), and its
1778
+ [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection) and
1779
+ [effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) are assumed to refer
1780
+ to the document created by its _own_ changes. The resulting
1781
+ transaction contains the combined effect of all the different
1782
+ specs. For [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection), later
1783
+ specs take precedence over earlier ones.
1784
+ */
1785
+ update(...e) {
1786
+ return Je(this, e, !0);
1787
+ }
1788
+ /**
1789
+ @internal
1790
+ */
1791
+ applyTransaction(e) {
1792
+ let t = this.config, { base: n, compartments: i } = t;
1793
+ for (let h of e.effects)
1794
+ h.is(te.reconfigure) ? (t && (i = /* @__PURE__ */ new Map(), t.compartments.forEach((o, a) => i.set(a, o)), t = null), i.set(h.value.compartment, h.value.extension)) : h.is(I.reconfigure) ? (t = null, n = h.value) : h.is(I.appendConfig) && (t = null, n = F(n).concat(h.value));
1795
+ let s;
1796
+ t ? s = e.startState.values.slice() : (t = Z.resolve(n, i, this), s = new w(t, this.doc, this.selection, t.dynamicSlots.map(() => null), (o, a) => a.reconfigure(o, this), null).values);
1797
+ let r = e.startState.facet(ae) ? e.newSelection : e.newSelection.asSingle();
1798
+ new w(t, e.newDoc, r, s, (h, o) => o.update(h, e), e);
1799
+ }
1800
+ /**
1801
+ Create a [transaction spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec) that
1802
+ replaces every selection range with the given content.
1803
+ */
1804
+ replaceSelection(e) {
1805
+ return typeof e == "string" && (e = this.toText(e)), this.changeByRange((t) => ({
1806
+ changes: { from: t.from, to: t.to, insert: e },
1807
+ range: p.cursor(t.from + e.length)
1808
+ }));
1809
+ }
1810
+ /**
1811
+ Create a set of changes and a new selection by running the given
1812
+ function for each range in the active selection. The function
1813
+ can return an optional set of changes (in the coordinate space
1814
+ of the start document), plus an updated range (in the coordinate
1815
+ space of the document produced by the call's own changes). This
1816
+ method will merge all the changes and ranges into a single
1817
+ changeset and selection, and return it as a [transaction
1818
+ spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec), which can be passed to
1819
+ [`update`](https://codemirror.net/6/docs/ref/#state.EditorState.update).
1820
+ */
1821
+ changeByRange(e) {
1822
+ let t = this.selection, n = e(t.ranges[0]), i = this.changes(n.changes), s = [n.range], r = F(n.effects);
1823
+ for (let h = 1; h < t.ranges.length; h++) {
1824
+ let o = e(t.ranges[h]), a = this.changes(o.changes), u = a.map(i);
1825
+ for (let d = 0; d < h; d++)
1826
+ s[d] = s[d].map(u);
1827
+ let f = i.mapDesc(a, !0);
1828
+ s.push(o.range.map(f)), i = i.compose(u), r = I.mapEffects(r, u).concat(I.mapEffects(F(o.effects), f));
1829
+ }
1830
+ return {
1831
+ changes: i,
1832
+ selection: p.create(s, t.mainIndex),
1833
+ effects: r
1834
+ };
1835
+ }
1836
+ /**
1837
+ Create a [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet) from the given change
1838
+ description, taking the state's document length and line
1839
+ separator into account.
1840
+ */
1841
+ changes(e = []) {
1842
+ return e instanceof y ? e : y.of(e, this.doc.length, this.facet(w.lineSeparator));
1843
+ }
1844
+ /**
1845
+ Using the state's [line
1846
+ separator](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator), create a
1847
+ [`Text`](https://codemirror.net/6/docs/ref/#state.Text) instance from the given string.
1848
+ */
1849
+ toText(e) {
1850
+ return x.of(e.split(this.facet(w.lineSeparator) || se));
1851
+ }
1852
+ /**
1853
+ Return the given range of the document as a string.
1854
+ */
1855
+ sliceDoc(e = 0, t = this.doc.length) {
1856
+ return this.doc.sliceString(e, t, this.lineBreak);
1857
+ }
1858
+ /**
1859
+ Get the value of a state [facet](https://codemirror.net/6/docs/ref/#state.Facet).
1860
+ */
1861
+ facet(e) {
1862
+ let t = this.config.address[e.id];
1863
+ return t == null ? e.default : ($(this, t), j(this, t));
1864
+ }
1865
+ /**
1866
+ Convert this state to a JSON-serializable object. When custom
1867
+ fields should be serialized, you can pass them in as an object
1868
+ mapping property names (in the resulting object, which should
1869
+ not use `doc` or `selection`) to fields.
1870
+ */
1871
+ toJSON(e) {
1872
+ let t = {
1873
+ doc: this.sliceDoc(),
1874
+ selection: this.selection.toJSON()
1875
+ };
1876
+ if (e)
1877
+ for (let n in e) {
1878
+ let i = e[n];
1879
+ i instanceof L && this.config.address[i.id] != null && (t[n] = i.spec.toJSON(this.field(e[n]), this));
1880
+ }
1881
+ return t;
1882
+ }
1883
+ /**
1884
+ Deserialize a state from its JSON representation. When custom
1885
+ fields should be deserialized, pass the same object you passed
1886
+ to [`toJSON`](https://codemirror.net/6/docs/ref/#state.EditorState.toJSON) when serializing as
1887
+ third argument.
1888
+ */
1889
+ static fromJSON(e, t = {}, n) {
1890
+ if (!e || typeof e.doc != "string")
1891
+ throw new RangeError("Invalid JSON representation for EditorState");
1892
+ let i = [];
1893
+ if (n) {
1894
+ for (let s in n)
1895
+ if (Object.prototype.hasOwnProperty.call(e, s)) {
1896
+ let r = n[s], h = e[s];
1897
+ i.push(r.init((o) => r.spec.fromJSON(h, o)));
1898
+ }
1899
+ }
1900
+ return w.create({
1901
+ doc: e.doc,
1902
+ selection: p.fromJSON(e.selection),
1903
+ extensions: t.extensions ? i.concat([t.extensions]) : i
1904
+ });
1905
+ }
1906
+ /**
1907
+ Create a new state. You'll usually only need this when
1908
+ initializing an editor—updated states are created by applying
1909
+ transactions.
1910
+ */
1911
+ static create(e = {}) {
1912
+ let t = Z.resolve(e.extensions || [], /* @__PURE__ */ new Map()), n = e.doc instanceof x ? e.doc : x.of((e.doc || "").split(t.staticFacet(w.lineSeparator) || se)), i = e.selection ? e.selection instanceof p ? e.selection : p.single(e.selection.anchor, e.selection.head) : p.single(0);
1913
+ return Ee(i, n.length), t.staticFacet(ae) || (i = i.asSingle()), new w(t, n, i, t.dynamicSlots.map(() => null), (s, r) => r.create(s), null);
1914
+ }
1915
+ /**
1916
+ The size (in columns) of a tab in the document, determined by
1917
+ the [`tabSize`](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize) facet.
1918
+ */
1919
+ get tabSize() {
1920
+ return this.facet(w.tabSize);
1921
+ }
1922
+ /**
1923
+ Get the proper [line-break](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator)
1924
+ string for this state.
1925
+ */
1926
+ get lineBreak() {
1927
+ return this.facet(w.lineSeparator) || `
1928
+ `;
1929
+ }
1930
+ /**
1931
+ Returns true when the editor is
1932
+ [configured](https://codemirror.net/6/docs/ref/#state.EditorState^readOnly) to be read-only.
1933
+ */
1934
+ get readOnly() {
1935
+ return this.facet(Be);
1936
+ }
1937
+ /**
1938
+ Look up a translation for the given phrase (via the
1939
+ [`phrases`](https://codemirror.net/6/docs/ref/#state.EditorState^phrases) facet), or return the
1940
+ original string if no translation is found.
1941
+
1942
+ If additional arguments are passed, they will be inserted in
1943
+ place of markers like `$1` (for the first value) and `$2`, etc.
1944
+ A single `$` is equivalent to `$1`, and `$$` will produce a
1945
+ literal dollar sign.
1946
+ */
1947
+ phrase(e, ...t) {
1948
+ for (let n of this.facet(w.phrases))
1949
+ if (Object.prototype.hasOwnProperty.call(n, e)) {
1950
+ e = n[e];
1951
+ break;
1952
+ }
1953
+ return t.length && (e = e.replace(/\$(\$|\d*)/g, (n, i) => {
1954
+ if (i == "$")
1955
+ return "$";
1956
+ let s = +(i || 1);
1957
+ return !s || s > t.length ? n : t[s - 1];
1958
+ })), e;
1959
+ }
1960
+ /**
1961
+ Find the values for a given language data field, provided by the
1962
+ the [`languageData`](https://codemirror.net/6/docs/ref/#state.EditorState^languageData) facet.
1963
+
1964
+ Examples of language data fields are...
1965
+
1966
+ - [`"commentTokens"`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) for specifying
1967
+ comment syntax.
1968
+ - [`"autocomplete"`](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion^config.override)
1969
+ for providing language-specific completion sources.
1970
+ - [`"wordChars"`](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) for adding
1971
+ characters that should be considered part of words in this
1972
+ language.
1973
+ - [`"closeBrackets"`](https://codemirror.net/6/docs/ref/#autocomplete.CloseBracketConfig) controls
1974
+ bracket closing behavior.
1975
+ */
1976
+ languageDataAt(e, t, n = -1) {
1977
+ let i = [];
1978
+ for (let s of this.facet(Ce))
1979
+ for (let r of s(this, t, n))
1980
+ Object.prototype.hasOwnProperty.call(r, e) && i.push(r[e]);
1981
+ return i;
1982
+ }
1983
+ /**
1984
+ Return a function that can categorize strings (expected to
1985
+ represent a single [grapheme cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak))
1986
+ into one of:
1987
+
1988
+ - Word (contains an alphanumeric character or a character
1989
+ explicitly listed in the local language's `"wordChars"`
1990
+ language data, which should be a string)
1991
+ - Space (contains only whitespace)
1992
+ - Other (anything else)
1993
+ */
1994
+ charCategorizer(e) {
1995
+ let t = this.languageDataAt("wordChars", e);
1996
+ return je(t.length ? t[0] : "");
1997
+ }
1998
+ /**
1999
+ Find the word at the given position, meaning the range
2000
+ containing all [word](https://codemirror.net/6/docs/ref/#state.CharCategory.Word) characters
2001
+ around it. If no word characters are adjacent to the position,
2002
+ this returns null.
2003
+ */
2004
+ wordAt(e) {
2005
+ let { text: t, from: n, length: i } = this.doc.lineAt(e), s = this.charCategorizer(e), r = e - n, h = e - n;
2006
+ for (; r > 0; ) {
2007
+ let o = Y(t, r, !1);
2008
+ if (s(t.slice(o, r)) != R.Word)
2009
+ break;
2010
+ r = o;
2011
+ }
2012
+ for (; h < i; ) {
2013
+ let o = Y(t, h);
2014
+ if (s(t.slice(h, o)) != R.Word)
2015
+ break;
2016
+ h = o;
2017
+ }
2018
+ return r == h ? null : p.range(r + n, h + n);
2019
+ }
2020
+ }
2021
+ w.allowMultipleSelections = ae;
2022
+ w.tabSize = /* @__PURE__ */ A.define({
2023
+ combine: (l) => l.length ? l[0] : 4
2024
+ });
2025
+ w.lineSeparator = Me;
2026
+ w.readOnly = Be;
2027
+ w.phrases = /* @__PURE__ */ A.define({
2028
+ compare(l, e) {
2029
+ let t = Object.keys(l), n = Object.keys(e);
2030
+ return t.length == n.length && t.every((i) => l[i] == e[i]);
2031
+ }
2032
+ });
2033
+ w.languageData = Ce;
2034
+ w.changeFilter = be;
2035
+ w.transactionFilter = Re;
2036
+ w.transactionExtender = Te;
2037
+ te.reconfigure = /* @__PURE__ */ I.define();
2038
+ function rt(l, e, t = {}) {
2039
+ let n = {};
2040
+ for (let i of l)
2041
+ for (let s of Object.keys(i)) {
2042
+ let r = i[s], h = n[s];
2043
+ if (h === void 0)
2044
+ n[s] = r;
2045
+ else if (!(h === r || r === void 0)) if (Object.hasOwnProperty.call(t, s))
2046
+ n[s] = t[s](h, r);
2047
+ else
2048
+ throw new Error("Config merge conflict for field " + s);
2049
+ }
2050
+ for (let i in e)
2051
+ n[i] === void 0 && (n[i] = e[i]);
2052
+ return n;
2053
+ }
2054
+ class _ {
2055
+ /**
2056
+ Compare this value with another value. Used when comparing
2057
+ rangesets. The default implementation compares by identity.
2058
+ Unless you are only creating a fixed number of unique instances
2059
+ of your value type, it is a good idea to implement this
2060
+ properly.
2061
+ */
2062
+ eq(e) {
2063
+ return this == e;
2064
+ }
2065
+ /**
2066
+ Create a [range](https://codemirror.net/6/docs/ref/#state.Range) with this value.
2067
+ */
2068
+ range(e, t = e) {
2069
+ return q.create(e, t, this);
2070
+ }
2071
+ }
2072
+ _.prototype.startSide = _.prototype.endSide = 0;
2073
+ _.prototype.point = !1;
2074
+ _.prototype.mapMode = M.TrackDel;
2075
+ function me(l, e) {
2076
+ return l == e || l.constructor == e.constructor && l.eq(e);
2077
+ }
2078
+ class q {
2079
+ constructor(e, t, n) {
2080
+ this.from = e, this.to = t, this.value = n;
2081
+ }
2082
+ /**
2083
+ @internal
2084
+ */
2085
+ static create(e, t, n) {
2086
+ return new q(e, t, n);
2087
+ }
2088
+ }
2089
+ function ce(l, e) {
2090
+ return l.from - e.from || l.value.startSide - e.value.startSide;
2091
+ }
2092
+ class we {
2093
+ constructor(e, t, n, i) {
2094
+ this.from = e, this.to = t, this.value = n, this.maxPoint = i;
2095
+ }
2096
+ get length() {
2097
+ return this.to[this.to.length - 1];
2098
+ }
2099
+ // Find the index of the given position and side. Use the ranges'
2100
+ // `from` pos when `end == false`, `to` when `end == true`.
2101
+ findIndex(e, t, n, i = 0) {
2102
+ let s = n ? this.to : this.from;
2103
+ for (let r = i, h = s.length; ; ) {
2104
+ if (r == h)
2105
+ return r;
2106
+ let o = r + h >> 1, a = s[o] - e || (n ? this.value[o].endSide : this.value[o].startSide) - t;
2107
+ if (o == r)
2108
+ return a >= 0 ? r : h;
2109
+ a >= 0 ? h = o : r = o + 1;
2110
+ }
2111
+ }
2112
+ between(e, t, n, i) {
2113
+ for (let s = this.findIndex(t, -1e9, !0), r = this.findIndex(n, 1e9, !1, s); s < r; s++)
2114
+ if (i(this.from[s] + e, this.to[s] + e, this.value[s]) === !1)
2115
+ return !1;
2116
+ }
2117
+ map(e, t) {
2118
+ let n = [], i = [], s = [], r = -1, h = -1;
2119
+ for (let o = 0; o < this.value.length; o++) {
2120
+ let a = this.value[o], u = this.from[o] + e, f = this.to[o] + e, d, c;
2121
+ if (u == f) {
2122
+ let g = t.mapPos(u, a.startSide, a.mapMode);
2123
+ if (g == null || (d = c = g, a.startSide != a.endSide && (c = t.mapPos(u, a.endSide), c < d)))
2124
+ continue;
2125
+ } else if (d = t.mapPos(u, a.startSide), c = t.mapPos(f, a.endSide), d > c || d == c && a.startSide > 0 && a.endSide <= 0)
2126
+ continue;
2127
+ (c - d || a.endSide - a.startSide) < 0 || (r < 0 && (r = d), a.point && (h = Math.max(h, c - d)), n.push(a), i.push(d - r), s.push(c - r));
2128
+ }
2129
+ return { mapped: n.length ? new we(i, s, n, h) : null, pos: r };
2130
+ }
2131
+ }
2132
+ class S {
2133
+ constructor(e, t, n, i) {
2134
+ this.chunkPos = e, this.chunk = t, this.nextLayer = n, this.maxPoint = i;
2135
+ }
2136
+ /**
2137
+ @internal
2138
+ */
2139
+ static create(e, t, n, i) {
2140
+ return new S(e, t, n, i);
2141
+ }
2142
+ /**
2143
+ @internal
2144
+ */
2145
+ get length() {
2146
+ let e = this.chunk.length - 1;
2147
+ return e < 0 ? 0 : Math.max(this.chunkEnd(e), this.nextLayer.length);
2148
+ }
2149
+ /**
2150
+ The number of ranges in the set.
2151
+ */
2152
+ get size() {
2153
+ if (this.isEmpty)
2154
+ return 0;
2155
+ let e = this.nextLayer.size;
2156
+ for (let t of this.chunk)
2157
+ e += t.value.length;
2158
+ return e;
2159
+ }
2160
+ /**
2161
+ @internal
2162
+ */
2163
+ chunkEnd(e) {
2164
+ return this.chunkPos[e] + this.chunk[e].length;
2165
+ }
2166
+ /**
2167
+ Update the range set, optionally adding new ranges or filtering
2168
+ out existing ones.
2169
+
2170
+ (Note: The type parameter is just there as a kludge to work
2171
+ around TypeScript variance issues that prevented `RangeSet<X>`
2172
+ from being a subtype of `RangeSet<Y>` when `X` is a subtype of
2173
+ `Y`.)
2174
+ */
2175
+ update(e) {
2176
+ let { add: t = [], sort: n = !1, filterFrom: i = 0, filterTo: s = this.length } = e, r = e.filter;
2177
+ if (t.length == 0 && !r)
2178
+ return this;
2179
+ if (n && (t = t.slice().sort(ce)), this.isEmpty)
2180
+ return t.length ? S.of(t) : this;
2181
+ let h = new Le(this, null, -1).goto(0), o = 0, a = [], u = new ee();
2182
+ for (; h.value || o < t.length; )
2183
+ if (o < t.length && (h.from - t[o].from || h.startSide - t[o].value.startSide) >= 0) {
2184
+ let f = t[o++];
2185
+ u.addInner(f.from, f.to, f.value) || a.push(f);
2186
+ } else h.rangeIndex == 1 && h.chunkIndex < this.chunk.length && (o == t.length || this.chunkEnd(h.chunkIndex) < t[o].from) && (!r || i > this.chunkEnd(h.chunkIndex) || s < this.chunkPos[h.chunkIndex]) && u.addChunk(this.chunkPos[h.chunkIndex], this.chunk[h.chunkIndex]) ? h.nextChunk() : ((!r || i > h.to || s < h.from || r(h.from, h.to, h.value)) && (u.addInner(h.from, h.to, h.value) || a.push(q.create(h.from, h.to, h.value))), h.next());
2187
+ return u.finishInner(this.nextLayer.isEmpty && !a.length ? S.empty : this.nextLayer.update({ add: a, filter: r, filterFrom: i, filterTo: s }));
2188
+ }
2189
+ /**
2190
+ Map this range set through a set of changes, return the new set.
2191
+ */
2192
+ map(e) {
2193
+ if (e.empty || this.isEmpty)
2194
+ return this;
2195
+ let t = [], n = [], i = -1;
2196
+ for (let r = 0; r < this.chunk.length; r++) {
2197
+ let h = this.chunkPos[r], o = this.chunk[r], a = e.touchesRange(h, h + o.length);
2198
+ if (a === !1)
2199
+ i = Math.max(i, o.maxPoint), t.push(o), n.push(e.mapPos(h));
2200
+ else if (a === !0) {
2201
+ let { mapped: u, pos: f } = o.map(h, e);
2202
+ u && (i = Math.max(i, u.maxPoint), t.push(u), n.push(f));
2203
+ }
2204
+ }
2205
+ let s = this.nextLayer.map(e);
2206
+ return t.length == 0 ? s : new S(n, t, s || S.empty, i);
2207
+ }
2208
+ /**
2209
+ Iterate over the ranges that touch the region `from` to `to`,
2210
+ calling `f` for each. There is no guarantee that the ranges will
2211
+ be reported in any specific order. When the callback returns
2212
+ `false`, iteration stops.
2213
+ */
2214
+ between(e, t, n) {
2215
+ if (!this.isEmpty) {
2216
+ for (let i = 0; i < this.chunk.length; i++) {
2217
+ let s = this.chunkPos[i], r = this.chunk[i];
2218
+ if (t >= s && e <= s + r.length && r.between(s, e - s, t - s, n) === !1)
2219
+ return;
2220
+ }
2221
+ this.nextLayer.between(e, t, n);
2222
+ }
2223
+ }
2224
+ /**
2225
+ Iterate over the ranges in this set, in order, including all
2226
+ ranges that end at or after `from`.
2227
+ */
2228
+ iter(e = 0) {
2229
+ return W.from([this]).goto(e);
2230
+ }
2231
+ /**
2232
+ @internal
2233
+ */
2234
+ get isEmpty() {
2235
+ return this.nextLayer == this;
2236
+ }
2237
+ /**
2238
+ Iterate over the ranges in a collection of sets, in order,
2239
+ starting from `from`.
2240
+ */
2241
+ static iter(e, t = 0) {
2242
+ return W.from(e).goto(t);
2243
+ }
2244
+ /**
2245
+ Iterate over two groups of sets, calling methods on `comparator`
2246
+ to notify it of possible differences.
2247
+ */
2248
+ static compare(e, t, n, i, s = -1) {
2249
+ let r = e.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= s), h = t.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= s), o = ye(r, h, n), a = new N(r, o, s), u = new N(h, o, s);
2250
+ n.iterGaps((f, d, c) => ke(a, f, u, d, c, i)), n.empty && n.length == 0 && ke(a, 0, u, 0, 0, i);
2251
+ }
2252
+ /**
2253
+ Compare the contents of two groups of range sets, returning true
2254
+ if they are equivalent in the given range.
2255
+ */
2256
+ static eq(e, t, n = 0, i) {
2257
+ i == null && (i = 999999999);
2258
+ let s = e.filter((u) => !u.isEmpty && t.indexOf(u) < 0), r = t.filter((u) => !u.isEmpty && e.indexOf(u) < 0);
2259
+ if (s.length != r.length)
2260
+ return !1;
2261
+ if (!s.length)
2262
+ return !0;
2263
+ let h = ye(s, r), o = new N(s, h, 0).goto(n), a = new N(r, h, 0).goto(n);
2264
+ for (; ; ) {
2265
+ if (o.to != a.to || !de(o.active, a.active) || o.point && (!a.point || !me(o.point, a.point)))
2266
+ return !1;
2267
+ if (o.to > i)
2268
+ return !0;
2269
+ o.next(), a.next();
2270
+ }
2271
+ }
2272
+ /**
2273
+ Iterate over a group of range sets at the same time, notifying
2274
+ the iterator about the ranges covering every given piece of
2275
+ content. Returns the open count (see
2276
+ [`SpanIterator.span`](https://codemirror.net/6/docs/ref/#state.SpanIterator.span)) at the end
2277
+ of the iteration.
2278
+ */
2279
+ static spans(e, t, n, i, s = -1) {
2280
+ let r = new N(e, null, s).goto(t), h = t, o = r.openStart;
2281
+ for (; ; ) {
2282
+ let a = Math.min(r.to, n);
2283
+ if (r.point) {
2284
+ let u = r.activeForPoint(r.to), f = r.pointFrom < t ? u.length + 1 : r.point.startSide < 0 ? u.length : Math.min(u.length, o);
2285
+ i.point(h, a, r.point, u, f, r.pointRank), o = Math.min(r.openEnd(a), u.length);
2286
+ } else a > h && (i.span(h, a, r.active, o), o = r.openEnd(a));
2287
+ if (r.to > n)
2288
+ return o + (r.point && r.to > n ? 1 : 0);
2289
+ h = r.to, r.next();
2290
+ }
2291
+ }
2292
+ /**
2293
+ Create a range set for the given range or array of ranges. By
2294
+ default, this expects the ranges to be _sorted_ (by start
2295
+ position and, if two start at the same position,
2296
+ `value.startSide`). You can pass `true` as second argument to
2297
+ cause the method to sort them.
2298
+ */
2299
+ static of(e, t = !1) {
2300
+ let n = new ee();
2301
+ for (let i of e instanceof q ? [e] : t ? _e(e) : e)
2302
+ n.add(i.from, i.to, i.value);
2303
+ return n.finish();
2304
+ }
2305
+ /**
2306
+ Join an array of range sets into a single set.
2307
+ */
2308
+ static join(e) {
2309
+ if (!e.length)
2310
+ return S.empty;
2311
+ let t = e[e.length - 1];
2312
+ for (let n = e.length - 2; n >= 0; n--)
2313
+ for (let i = e[n]; i != S.empty; i = i.nextLayer)
2314
+ t = new S(i.chunkPos, i.chunk, t, Math.max(i.maxPoint, t.maxPoint));
2315
+ return t;
2316
+ }
2317
+ }
2318
+ S.empty = /* @__PURE__ */ new S([], [], null, -1);
2319
+ function _e(l) {
2320
+ if (l.length > 1)
2321
+ for (let e = l[0], t = 1; t < l.length; t++) {
2322
+ let n = l[t];
2323
+ if (ce(e, n) > 0)
2324
+ return l.slice().sort(ce);
2325
+ e = n;
2326
+ }
2327
+ return l;
2328
+ }
2329
+ S.empty.nextLayer = S.empty;
2330
+ class ee {
2331
+ finishChunk(e) {
2332
+ this.chunks.push(new we(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), this.chunkStart = -1, this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), this.maxPoint = -1, e && (this.from = [], this.to = [], this.value = []);
2333
+ }
2334
+ /**
2335
+ Create an empty builder.
2336
+ */
2337
+ constructor() {
2338
+ this.chunks = [], this.chunkPos = [], this.chunkStart = -1, this.last = null, this.lastFrom = -1e9, this.lastTo = -1e9, this.from = [], this.to = [], this.value = [], this.maxPoint = -1, this.setMaxPoint = -1, this.nextLayer = null;
2339
+ }
2340
+ /**
2341
+ Add a range. Ranges should be added in sorted (by `from` and
2342
+ `value.startSide`) order.
2343
+ */
2344
+ add(e, t, n) {
2345
+ this.addInner(e, t, n) || (this.nextLayer || (this.nextLayer = new ee())).add(e, t, n);
2346
+ }
2347
+ /**
2348
+ @internal
2349
+ */
2350
+ addInner(e, t, n) {
2351
+ let i = e - this.lastTo || n.startSide - this.last.endSide;
2352
+ if (i <= 0 && (e - this.lastFrom || n.startSide - this.last.startSide) < 0)
2353
+ throw new Error("Ranges must be added sorted by `from` position and `startSide`");
2354
+ return i < 0 ? !1 : (this.from.length == 250 && this.finishChunk(!0), this.chunkStart < 0 && (this.chunkStart = e), this.from.push(e - this.chunkStart), this.to.push(t - this.chunkStart), this.last = n, this.lastFrom = e, this.lastTo = t, this.value.push(n), n.point && (this.maxPoint = Math.max(this.maxPoint, t - e)), !0);
2355
+ }
2356
+ /**
2357
+ @internal
2358
+ */
2359
+ addChunk(e, t) {
2360
+ if ((e - this.lastTo || t.value[0].startSide - this.last.endSide) < 0)
2361
+ return !1;
2362
+ this.from.length && this.finishChunk(!0), this.setMaxPoint = Math.max(this.setMaxPoint, t.maxPoint), this.chunks.push(t), this.chunkPos.push(e);
2363
+ let n = t.value.length - 1;
2364
+ return this.last = t.value[n], this.lastFrom = t.from[n] + e, this.lastTo = t.to[n] + e, !0;
2365
+ }
2366
+ /**
2367
+ Finish the range set. Returns the new set. The builder can't be
2368
+ used anymore after this has been called.
2369
+ */
2370
+ finish() {
2371
+ return this.finishInner(S.empty);
2372
+ }
2373
+ /**
2374
+ @internal
2375
+ */
2376
+ finishInner(e) {
2377
+ if (this.from.length && this.finishChunk(!1), this.chunks.length == 0)
2378
+ return e;
2379
+ let t = S.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e) : e, this.setMaxPoint);
2380
+ return this.from = null, t;
2381
+ }
2382
+ }
2383
+ function ye(l, e, t) {
2384
+ let n = /* @__PURE__ */ new Map();
2385
+ for (let s of l)
2386
+ for (let r = 0; r < s.chunk.length; r++)
2387
+ s.chunk[r].maxPoint <= 0 && n.set(s.chunk[r], s.chunkPos[r]);
2388
+ let i = /* @__PURE__ */ new Set();
2389
+ for (let s of e)
2390
+ for (let r = 0; r < s.chunk.length; r++) {
2391
+ let h = n.get(s.chunk[r]);
2392
+ h != null && (t ? t.mapPos(h) : h) == s.chunkPos[r] && !t?.touchesRange(h, h + s.chunk[r].length) && i.add(s.chunk[r]);
2393
+ }
2394
+ return i;
2395
+ }
2396
+ class Le {
2397
+ constructor(e, t, n, i = 0) {
2398
+ this.layer = e, this.skip = t, this.minPoint = n, this.rank = i;
2399
+ }
2400
+ get startSide() {
2401
+ return this.value ? this.value.startSide : 0;
2402
+ }
2403
+ get endSide() {
2404
+ return this.value ? this.value.endSide : 0;
2405
+ }
2406
+ goto(e, t = -1e9) {
2407
+ return this.chunkIndex = this.rangeIndex = 0, this.gotoInner(e, t, !1), this;
2408
+ }
2409
+ gotoInner(e, t, n) {
2410
+ for (; this.chunkIndex < this.layer.chunk.length; ) {
2411
+ let i = this.layer.chunk[this.chunkIndex];
2412
+ if (!(this.skip && this.skip.has(i) || this.layer.chunkEnd(this.chunkIndex) < e || i.maxPoint < this.minPoint))
2413
+ break;
2414
+ this.chunkIndex++, n = !1;
2415
+ }
2416
+ if (this.chunkIndex < this.layer.chunk.length) {
2417
+ let i = this.layer.chunk[this.chunkIndex].findIndex(e - this.layer.chunkPos[this.chunkIndex], t, !0);
2418
+ (!n || this.rangeIndex < i) && this.setRangeIndex(i);
2419
+ }
2420
+ this.next();
2421
+ }
2422
+ forward(e, t) {
2423
+ (this.to - e || this.endSide - t) < 0 && this.gotoInner(e, t, !0);
2424
+ }
2425
+ next() {
2426
+ for (; ; )
2427
+ if (this.chunkIndex == this.layer.chunk.length) {
2428
+ this.from = this.to = 1e9, this.value = null;
2429
+ break;
2430
+ } else {
2431
+ let e = this.layer.chunkPos[this.chunkIndex], t = this.layer.chunk[this.chunkIndex], n = e + t.from[this.rangeIndex];
2432
+ if (this.from = n, this.to = e + t.to[this.rangeIndex], this.value = t.value[this.rangeIndex], this.setRangeIndex(this.rangeIndex + 1), this.minPoint < 0 || this.value.point && this.to - this.from >= this.minPoint)
2433
+ break;
2434
+ }
2435
+ }
2436
+ setRangeIndex(e) {
2437
+ if (e == this.layer.chunk[this.chunkIndex].value.length) {
2438
+ if (this.chunkIndex++, this.skip)
2439
+ for (; this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]); )
2440
+ this.chunkIndex++;
2441
+ this.rangeIndex = 0;
2442
+ } else
2443
+ this.rangeIndex = e;
2444
+ }
2445
+ nextChunk() {
2446
+ this.chunkIndex++, this.rangeIndex = 0, this.next();
2447
+ }
2448
+ compare(e) {
2449
+ return this.from - e.from || this.startSide - e.startSide || this.rank - e.rank || this.to - e.to || this.endSide - e.endSide;
2450
+ }
2451
+ }
2452
+ class W {
2453
+ constructor(e) {
2454
+ this.heap = e;
2455
+ }
2456
+ static from(e, t = null, n = -1) {
2457
+ let i = [];
2458
+ for (let s = 0; s < e.length; s++)
2459
+ for (let r = e[s]; !r.isEmpty; r = r.nextLayer)
2460
+ r.maxPoint >= n && i.push(new Le(r, t, n, s));
2461
+ return i.length == 1 ? i[0] : new W(i);
2462
+ }
2463
+ get startSide() {
2464
+ return this.value ? this.value.startSide : 0;
2465
+ }
2466
+ goto(e, t = -1e9) {
2467
+ for (let n of this.heap)
2468
+ n.goto(e, t);
2469
+ for (let n = this.heap.length >> 1; n >= 0; n--)
2470
+ ie(this.heap, n);
2471
+ return this.next(), this;
2472
+ }
2473
+ forward(e, t) {
2474
+ for (let n of this.heap)
2475
+ n.forward(e, t);
2476
+ for (let n = this.heap.length >> 1; n >= 0; n--)
2477
+ ie(this.heap, n);
2478
+ (this.to - e || this.value.endSide - t) < 0 && this.next();
2479
+ }
2480
+ next() {
2481
+ if (this.heap.length == 0)
2482
+ this.from = this.to = 1e9, this.value = null, this.rank = -1;
2483
+ else {
2484
+ let e = this.heap[0];
2485
+ this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(), ie(this.heap, 0);
2486
+ }
2487
+ }
2488
+ }
2489
+ function ie(l, e) {
2490
+ for (let t = l[e]; ; ) {
2491
+ let n = (e << 1) + 1;
2492
+ if (n >= l.length)
2493
+ break;
2494
+ let i = l[n];
2495
+ if (n + 1 < l.length && i.compare(l[n + 1]) >= 0 && (i = l[n + 1], n++), t.compare(i) < 0)
2496
+ break;
2497
+ l[n] = t, l[e] = i, e = n;
2498
+ }
2499
+ }
2500
+ class N {
2501
+ constructor(e, t, n) {
2502
+ this.minPoint = n, this.active = [], this.activeTo = [], this.activeRank = [], this.minActive = -1, this.point = null, this.pointFrom = 0, this.pointRank = 0, this.to = -1e9, this.endSide = 0, this.openStart = -1, this.cursor = W.from(e, t, n);
2503
+ }
2504
+ goto(e, t = -1e9) {
2505
+ return this.cursor.goto(e, t), this.active.length = this.activeTo.length = this.activeRank.length = 0, this.minActive = -1, this.to = e, this.endSide = t, this.openStart = -1, this.next(), this;
2506
+ }
2507
+ forward(e, t) {
2508
+ for (; this.minActive > -1 && (this.activeTo[this.minActive] - e || this.active[this.minActive].endSide - t) < 0; )
2509
+ this.removeActive(this.minActive);
2510
+ this.cursor.forward(e, t);
2511
+ }
2512
+ removeActive(e) {
2513
+ H(this.active, e), H(this.activeTo, e), H(this.activeRank, e), this.minActive = Se(this.active, this.activeTo);
2514
+ }
2515
+ addActive(e) {
2516
+ let t = 0, { value: n, to: i, rank: s } = this.cursor;
2517
+ for (; t < this.activeRank.length && (s - this.activeRank[t] || i - this.activeTo[t]) > 0; )
2518
+ t++;
2519
+ K(this.active, t, n), K(this.activeTo, t, i), K(this.activeRank, t, s), e && K(e, t, this.cursor.from), this.minActive = Se(this.active, this.activeTo);
2520
+ }
2521
+ // After calling this, if `this.point` != null, the next range is a
2522
+ // point. Otherwise, it's a regular range, covered by `this.active`.
2523
+ next() {
2524
+ let e = this.to, t = this.point;
2525
+ this.point = null;
2526
+ let n = this.openStart < 0 ? [] : null;
2527
+ for (; ; ) {
2528
+ let i = this.minActive;
2529
+ if (i > -1 && (this.activeTo[i] - this.cursor.from || this.active[i].endSide - this.cursor.startSide) < 0) {
2530
+ if (this.activeTo[i] > e) {
2531
+ this.to = this.activeTo[i], this.endSide = this.active[i].endSide;
2532
+ break;
2533
+ }
2534
+ this.removeActive(i), n && H(n, i);
2535
+ } else if (this.cursor.value)
2536
+ if (this.cursor.from > e) {
2537
+ this.to = this.cursor.from, this.endSide = this.cursor.startSide;
2538
+ break;
2539
+ } else {
2540
+ let s = this.cursor.value;
2541
+ if (!s.point)
2542
+ this.addActive(n), this.cursor.next();
2543
+ else if (t && this.cursor.to == this.to && this.cursor.from < this.cursor.to)
2544
+ this.cursor.next();
2545
+ else {
2546
+ this.point = s, this.pointFrom = this.cursor.from, this.pointRank = this.cursor.rank, this.to = this.cursor.to, this.endSide = s.endSide, this.cursor.next(), this.forward(this.to, this.endSide);
2547
+ break;
2548
+ }
2549
+ }
2550
+ else {
2551
+ this.to = this.endSide = 1e9;
2552
+ break;
2553
+ }
2554
+ }
2555
+ if (n) {
2556
+ this.openStart = 0;
2557
+ for (let i = n.length - 1; i >= 0 && n[i] < e; i--)
2558
+ this.openStart++;
2559
+ }
2560
+ }
2561
+ activeForPoint(e) {
2562
+ if (!this.active.length)
2563
+ return this.active;
2564
+ let t = [];
2565
+ for (let n = this.active.length - 1; n >= 0 && !(this.activeRank[n] < this.pointRank); n--)
2566
+ (this.activeTo[n] > e || this.activeTo[n] == e && this.active[n].endSide >= this.point.endSide) && t.push(this.active[n]);
2567
+ return t.reverse();
2568
+ }
2569
+ openEnd(e) {
2570
+ let t = 0;
2571
+ for (let n = this.activeTo.length - 1; n >= 0 && this.activeTo[n] > e; n--)
2572
+ t++;
2573
+ return t;
2574
+ }
2575
+ }
2576
+ function ke(l, e, t, n, i, s) {
2577
+ l.goto(e), t.goto(n);
2578
+ let r = n + i, h = n, o = n - e, a = !!s.boundChange;
2579
+ for (let u = !1; ; ) {
2580
+ let f = l.to + o - t.to, d = f || l.endSide - t.endSide, c = d < 0 ? l.to + o : t.to, g = Math.min(c, r);
2581
+ if (l.point || t.point ? (l.point && t.point && me(l.point, t.point) && de(l.activeForPoint(l.to), t.activeForPoint(t.to)) || s.comparePoint(h, g, l.point, t.point), u = !1) : (u && s.boundChange(h), g > h && !de(l.active, t.active) && s.compareRange(h, g, l.active, t.active), a && g < r && (f || l.openEnd(c) != t.openEnd(c)) && (u = !0)), c > r)
2582
+ break;
2583
+ h = c, d <= 0 && l.next(), d >= 0 && t.next();
2584
+ }
2585
+ }
2586
+ function de(l, e) {
2587
+ if (l.length != e.length)
2588
+ return !1;
2589
+ for (let t = 0; t < l.length; t++)
2590
+ if (l[t] != e[t] && !me(l[t], e[t]))
2591
+ return !1;
2592
+ return !0;
2593
+ }
2594
+ function H(l, e) {
2595
+ for (let t = e, n = l.length - 1; t < n; t++)
2596
+ l[t] = l[t + 1];
2597
+ l.pop();
2598
+ }
2599
+ function K(l, e, t) {
2600
+ for (let n = l.length - 1; n >= e; n--)
2601
+ l[n + 1] = l[n];
2602
+ l[e] = t;
2603
+ }
2604
+ function Se(l, e) {
2605
+ let t = -1, n = 1e9;
2606
+ for (let i = 0; i < e.length; i++)
2607
+ (e[i] - n || l[i].endSide - l[t].endSide) < 0 && (t = i, n = e[i]);
2608
+ return t;
2609
+ }
2610
+ function lt(l, e, t = l.length) {
2611
+ let n = 0;
2612
+ for (let i = 0; i < t && i < l.length; )
2613
+ l.charCodeAt(i) == 9 ? (n += e - n % e, i++) : (n++, i = Y(l, i));
2614
+ return n;
2615
+ }
2616
+ function ht(l, e, t, n) {
2617
+ for (let i = 0, s = 0; ; ) {
2618
+ if (s >= e)
2619
+ return i;
2620
+ if (i == l.length)
2621
+ break;
2622
+ s += l.charCodeAt(i) == 9 ? t - s % t : 1, i = Y(l, i);
2623
+ }
2624
+ return n === !0 ? -1 : l.length;
2625
+ }
2626
+ export {
2627
+ U as Annotation,
2628
+ Ue as AnnotationType,
2629
+ C as ChangeDesc,
2630
+ y as ChangeSet,
2631
+ R as CharCategory,
2632
+ te as Compartment,
2633
+ p as EditorSelection,
2634
+ w as EditorState,
2635
+ A as Facet,
2636
+ De as Line,
2637
+ M as MapMode,
2638
+ st as Prec,
2639
+ q as Range,
2640
+ S as RangeSet,
2641
+ ee as RangeSetBuilder,
2642
+ _ as RangeValue,
2643
+ B as SelectionRange,
2644
+ I as StateEffect,
2645
+ Ge as StateEffectType,
2646
+ L as StateField,
2647
+ x as Text,
2648
+ P as Transaction,
2649
+ tt as codePointAt,
2650
+ it as codePointSize,
2651
+ rt as combineConfig,
2652
+ lt as countColumn,
2653
+ Y as findClusterBreak,
2654
+ ht as findColumn,
2655
+ nt as fromCodePoint
2656
+ };