@vkzstudio/muza-ui 1.0.47 → 1.1.0

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 (778) hide show
  1. package/README.md +173 -171
  2. package/dist/Muza_BP_logo.svg +26 -26
  3. package/dist/components/Accordion/Accordion.d.ts +112 -18
  4. package/dist/components/Accordion/Accordion.d.ts.map +1 -1
  5. package/dist/components/Accordion/Accordion.js +208 -110
  6. package/dist/components/Accordion/Accordion.stories.d.ts +3 -0
  7. package/dist/components/Accordion/Accordion.stories.d.ts.map +1 -1
  8. package/dist/components/Alert/Alert.d.ts +3 -1
  9. package/dist/components/Alert/Alert.d.ts.map +1 -1
  10. package/dist/components/Alert/Alert.js +28 -24
  11. package/dist/components/Button/Button.stories.d.ts.map +1 -1
  12. package/dist/components/ButtonArrow/ButtonArrow.stories.d.ts.map +1 -1
  13. package/dist/components/Calendar/Calendar.js +10 -11
  14. package/dist/components/Card/Card.stories.d.ts.map +1 -1
  15. package/dist/components/CardCheckboxAmount/CardCheckboxAmount.d.ts +111 -0
  16. package/dist/components/CardCheckboxAmount/CardCheckboxAmount.d.ts.map +1 -0
  17. package/dist/components/CardCheckboxAmount/CardCheckboxAmount.js +115 -0
  18. package/dist/components/CardCheckboxAmount/CardCheckboxAmount.stories.d.ts +13 -0
  19. package/dist/components/CardCheckboxAmount/CardCheckboxAmount.stories.d.ts.map +1 -0
  20. package/dist/components/CardCheckboxAmount/index.d.ts +2 -0
  21. package/dist/components/CardCheckboxAmount/index.d.ts.map +1 -0
  22. package/dist/components/Carousel/Carousel.d.ts +30 -3
  23. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  24. package/dist/components/Carousel/Carousel.js +112 -92
  25. package/dist/components/Carousel/Carousel.stories.d.ts.map +1 -1
  26. package/dist/components/Chip/Chip.d.ts.map +1 -1
  27. package/dist/components/Chip/Chip.js +6 -2
  28. package/dist/components/Chip/Chip.stories.d.ts.map +1 -1
  29. package/dist/components/DataTable/DataTable.stories.d.ts.map +1 -1
  30. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  31. package/dist/components/DatePicker/DatePicker.js +10 -2
  32. package/dist/components/DatePicker/DatePicker.stories.d.ts +1 -0
  33. package/dist/components/DatePicker/DatePicker.stories.d.ts.map +1 -1
  34. package/dist/components/DatePickerButton/DatePickerButton.d.ts +97 -0
  35. package/dist/components/DatePickerButton/DatePickerButton.d.ts.map +1 -0
  36. package/dist/components/DatePickerButton/DatePickerButton.js +329 -0
  37. package/dist/components/DatePickerButton/DatePickerButton.stories.d.ts +15 -0
  38. package/dist/components/DatePickerButton/DatePickerButton.stories.d.ts.map +1 -0
  39. package/dist/components/DatePickerButton/index.d.ts +2 -0
  40. package/dist/components/DatePickerButton/index.d.ts.map +1 -0
  41. package/dist/components/Dialog/Dialog.js +1 -1
  42. package/dist/components/Dialog/Dialog.stories.d.ts +1 -0
  43. package/dist/components/Dialog/Dialog.stories.d.ts.map +1 -1
  44. package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +1 -0
  45. package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
  46. package/dist/components/Icons/CustomBadges.d.ts +5 -0
  47. package/dist/components/Icons/CustomBadges.d.ts.map +1 -1
  48. package/dist/components/Icons/CustomBadges.js +216 -13
  49. package/dist/components/Icons/CustomLogos.d.ts +18 -2
  50. package/dist/components/Icons/CustomLogos.d.ts.map +1 -1
  51. package/dist/components/Icons/CustomLogos.js +103 -97
  52. package/dist/components/Icons/LogosAndBadges.stories.d.ts +1 -0
  53. package/dist/components/Icons/LogosAndBadges.stories.d.ts.map +1 -1
  54. package/dist/components/Input/Input.js +22 -32
  55. package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts +26 -1
  56. package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts.map +1 -1
  57. package/dist/components/LanguageSwitcher/LanguageSwitcher.js +86 -44
  58. package/dist/components/LanguageSwitcher/LanguageSwitcher.stories.d.ts +2 -0
  59. package/dist/components/LanguageSwitcher/LanguageSwitcher.stories.d.ts.map +1 -1
  60. package/dist/components/Lightbox/Lightbox.d.ts.map +1 -1
  61. package/dist/components/Lightbox/Lightbox.js +70 -54
  62. package/dist/components/Lightbox/Lightbox.stories.d.ts +1 -0
  63. package/dist/components/Lightbox/Lightbox.stories.d.ts.map +1 -1
  64. package/dist/components/Lightbox/LightboxOverrides.css +5 -5
  65. package/dist/components/LoginScreen/LoginScreen.js +8 -8
  66. package/dist/components/LoginScreen/LoginScreen.stories.d.ts.map +1 -1
  67. package/dist/components/LoginScreen/LoginScreen3D/LoginScreen3DModel.js +10 -9
  68. package/dist/components/LoginScreen/LoginScreen3D/LoginScreen3DScene.js +21 -22
  69. package/dist/components/LoginScreen/LoginScreenItem.js +1 -1
  70. package/dist/components/MultiSelect/MultiSelect.stories.d.ts +1 -0
  71. package/dist/components/MultiSelect/MultiSelect.stories.d.ts.map +1 -1
  72. package/dist/components/Pagination/Pagination.stories.d.ts.map +1 -1
  73. package/dist/components/Popover/Popover.d.ts +8 -1
  74. package/dist/components/Popover/Popover.d.ts.map +1 -1
  75. package/dist/components/Popover/Popover.js +7 -6
  76. package/dist/components/Popover/Popover.stories.d.ts +1 -0
  77. package/dist/components/Popover/Popover.stories.d.ts.map +1 -1
  78. package/dist/components/Reorderable/Reorderable.js +74 -78
  79. package/dist/components/Reorderable/Reorderable.stories.d.ts.map +1 -1
  80. package/dist/components/ReorderableTable/ReorderableTable.js +1 -1
  81. package/dist/components/SegmentedControl/SegmentedControl.stories.d.ts.map +1 -1
  82. package/dist/components/SegmentedIconControl/SegmentedIconControl.stories.d.ts.map +1 -1
  83. package/dist/components/Select/Select.stories.d.ts +1 -0
  84. package/dist/components/Select/Select.stories.d.ts.map +1 -1
  85. package/dist/components/Sheet/Sheet.stories.d.ts +1 -0
  86. package/dist/components/Sheet/Sheet.stories.d.ts.map +1 -1
  87. package/dist/components/SwipeButton/SwipeButton.js +37 -42
  88. package/dist/components/Tag/Tag.js +1 -1
  89. package/dist/components/TextEditor/LinkBubbleMenu.js +2 -2
  90. package/dist/components/TextEditor/TextEditor.d.ts.map +1 -1
  91. package/dist/components/TextEditor/TextEditor.js +17 -14
  92. package/dist/components/TextEditor/TextEditor.stories.d.ts.map +1 -1
  93. package/dist/components/Toast/Toast.stories.d.ts +1 -0
  94. package/dist/components/Toast/Toast.stories.d.ts.map +1 -1
  95. package/dist/components/Toggle/Toggle.stories.d.ts.map +1 -1
  96. package/dist/components/ToggleCheckButton/ToggleCheckButton.stories.d.ts.map +1 -1
  97. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts.map +1 -1
  98. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -0
  99. package/dist/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
  100. package/dist/components/Typography/Typography.d.ts +10 -1
  101. package/dist/components/Typography/Typography.d.ts.map +1 -1
  102. package/dist/components/Typography/Typography.js +82 -67
  103. package/dist/components/Typography/Typography.stories.d.ts +1 -0
  104. package/dist/components/Typography/Typography.stories.d.ts.map +1 -1
  105. package/dist/components/TypographyLink/TypographyLink.d.ts +72 -0
  106. package/dist/components/TypographyLink/TypographyLink.d.ts.map +1 -0
  107. package/dist/components/TypographyLink/TypographyLink.js +103 -0
  108. package/dist/components/TypographyLink/TypographyLink.stories.d.ts +12 -0
  109. package/dist/components/TypographyLink/TypographyLink.stories.d.ts.map +1 -0
  110. package/dist/components/TypographyLink/index.d.ts +2 -0
  111. package/dist/components/TypographyLink/index.d.ts.map +1 -0
  112. package/dist/components/UniversalFooter/UniversalFooter.d.ts +198 -0
  113. package/dist/components/UniversalFooter/UniversalFooter.d.ts.map +1 -0
  114. package/dist/components/UniversalFooter/UniversalFooter.js +401 -0
  115. package/dist/components/UniversalFooter/UniversalFooter.stories.d.ts +19 -0
  116. package/dist/components/UniversalFooter/UniversalFooter.stories.d.ts.map +1 -0
  117. package/dist/components/UniversalFooter/index.d.ts +2 -0
  118. package/dist/components/UniversalFooter/index.d.ts.map +1 -0
  119. package/dist/components/index.d.ts +4 -0
  120. package/dist/components/index.d.ts.map +1 -1
  121. package/dist/fonts/Objectivity/OFL.txt +92 -92
  122. package/dist/globals.css +12 -12
  123. package/dist/index.js +354 -322
  124. package/dist/muza-ui.css +1 -1
  125. package/dist/styles/3rd-parties.css +5 -5
  126. package/dist/styles/animations.css +21 -21
  127. package/dist/styles/breakpoints.css +4 -4
  128. package/dist/styles/primitives.css +163 -161
  129. package/dist/styles/token-colors.css +1445 -1437
  130. package/dist/styles/token-sizes.css +1553 -1513
  131. package/dist/styles/typography.css +113 -113
  132. package/dist/styles/utilities.css +66 -66
  133. package/dist/styles/white-label.css +26 -26
  134. package/dist/translations/TranslationContext.js +22 -24
  135. package/dist/translations/index.d.ts +1 -1
  136. package/dist/translations/index.d.ts.map +1 -1
  137. package/dist/translations/locales/cs.d.ts.map +1 -1
  138. package/dist/translations/locales/cs.js +9 -1
  139. package/dist/translations/locales/en.d.ts.map +1 -1
  140. package/dist/translations/locales/en.js +9 -1
  141. package/dist/translations/locales/sk.d.ts.map +1 -1
  142. package/dist/translations/locales/sk.js +9 -1
  143. package/dist/translations/types.d.ts +20 -0
  144. package/dist/translations/types.d.ts.map +1 -1
  145. package/llms-full.md +584 -584
  146. package/llms.txt +37 -37
  147. package/package.json +20 -24
  148. package/dist/_virtual/_commonjsHelpers.js +0 -6
  149. package/dist/_virtual/constants.js +0 -5
  150. package/dist/_virtual/constants2.js +0 -4
  151. package/dist/_virtual/index.js +0 -7
  152. package/dist/_virtual/index2.js +0 -4
  153. package/dist/_virtual/index3.js +0 -4
  154. package/dist/_virtual/index4.js +0 -7
  155. package/dist/_virtual/index5.js +0 -5
  156. package/dist/_virtual/index6.js +0 -4
  157. package/dist/_virtual/index7.js +0 -4
  158. package/dist/_virtual/react-dom-server-legacy.browser.development.js +0 -4
  159. package/dist/_virtual/react-dom-server-legacy.browser.production.min.js +0 -4
  160. package/dist/_virtual/react-dom-server.browser.development.js +0 -4
  161. package/dist/_virtual/react-dom-server.browser.production.min.js +0 -4
  162. package/dist/_virtual/react-is.development.js +0 -4
  163. package/dist/_virtual/react-is.production.min.js +0 -4
  164. package/dist/_virtual/react-reconciler-constants.development.js +0 -4
  165. package/dist/_virtual/react-reconciler-constants.production.min.js +0 -4
  166. package/dist/_virtual/react-reconciler.development.js +0 -4
  167. package/dist/_virtual/scheduler.development.js +0 -4
  168. package/dist/_virtual/scheduler.production.min.js +0 -4
  169. package/dist/_virtual/server.browser.js +0 -5
  170. package/dist/_virtual/server.browser2.js +0 -4
  171. package/dist/node_modules/@date-fns/tz/date/index.js +0 -61
  172. package/dist/node_modules/@date-fns/tz/date/mini.js +0 -69
  173. package/dist/node_modules/@date-fns/tz/tzName/index.js +0 -11
  174. package/dist/node_modules/@date-fns/tz/tzOffset/index.js +0 -22
  175. package/dist/node_modules/@popperjs/core/lib/createPopper.js +0 -122
  176. package/dist/node_modules/@popperjs/core/lib/dom-utils/contains.js +0 -18
  177. package/dist/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js +0 -23
  178. package/dist/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js +0 -37
  179. package/dist/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js +0 -32
  180. package/dist/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js +0 -7
  181. package/dist/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js +0 -10
  182. package/dist/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js +0 -17
  183. package/dist/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js +0 -9
  184. package/dist/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js +0 -13
  185. package/dist/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js +0 -6
  186. package/dist/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js +0 -10
  187. package/dist/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js +0 -35
  188. package/dist/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js +0 -18
  189. package/dist/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js +0 -10
  190. package/dist/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js +0 -21
  191. package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindow.js +0 -12
  192. package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js +0 -11
  193. package/dist/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js +0 -9
  194. package/dist/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js +0 -20
  195. package/dist/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js +0 -7
  196. package/dist/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js +0 -8
  197. package/dist/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js +0 -7
  198. package/dist/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js +0 -16
  199. package/dist/node_modules/@popperjs/core/lib/enums.js +0 -31
  200. package/dist/node_modules/@popperjs/core/lib/modifiers/applyStyles.js +0 -47
  201. package/dist/node_modules/@popperjs/core/lib/modifiers/arrow.js +0 -37
  202. package/dist/node_modules/@popperjs/core/lib/modifiers/computeStyles.js +0 -99
  203. package/dist/node_modules/@popperjs/core/lib/modifiers/eventListeners.js +0 -26
  204. package/dist/node_modules/@popperjs/core/lib/modifiers/flip.js +0 -74
  205. package/dist/node_modules/@popperjs/core/lib/modifiers/hide.js +0 -44
  206. package/dist/node_modules/@popperjs/core/lib/modifiers/offset.js +0 -31
  207. package/dist/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js +0 -19
  208. package/dist/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js +0 -54
  209. package/dist/node_modules/@popperjs/core/lib/popper.js +0 -27
  210. package/dist/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js +0 -27
  211. package/dist/node_modules/@popperjs/core/lib/utils/computeOffsets.js +0 -54
  212. package/dist/node_modules/@popperjs/core/lib/utils/debounce.js +0 -13
  213. package/dist/node_modules/@popperjs/core/lib/utils/detectOverflow.js +0 -33
  214. package/dist/node_modules/@popperjs/core/lib/utils/expandToHashMap.js +0 -8
  215. package/dist/node_modules/@popperjs/core/lib/utils/getAltAxis.js +0 -6
  216. package/dist/node_modules/@popperjs/core/lib/utils/getBasePlacement.js +0 -6
  217. package/dist/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js +0 -11
  218. package/dist/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js +0 -6
  219. package/dist/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js +0 -14
  220. package/dist/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js +0 -12
  221. package/dist/node_modules/@popperjs/core/lib/utils/getVariation.js +0 -6
  222. package/dist/node_modules/@popperjs/core/lib/utils/math.js +0 -6
  223. package/dist/node_modules/@popperjs/core/lib/utils/mergeByName.js +0 -15
  224. package/dist/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js +0 -7
  225. package/dist/node_modules/@popperjs/core/lib/utils/orderModifiers.js +0 -31
  226. package/dist/node_modules/@popperjs/core/lib/utils/rectToClientRect.js +0 -11
  227. package/dist/node_modules/@popperjs/core/lib/utils/userAgent.js +0 -9
  228. package/dist/node_modules/@popperjs/core/lib/utils/within.js +0 -12
  229. package/dist/node_modules/@react-three/drei/core/useAnimations.js +0 -34
  230. package/dist/node_modules/@react-three/drei/core/useGLTF.js +0 -18
  231. package/dist/node_modules/@react-three/fiber/dist/events-776716bd.esm.js +0 -1311
  232. package/dist/node_modules/@react-three/fiber/dist/react-three-fiber.esm.js +0 -145
  233. package/dist/node_modules/@react-three/fiber/node_modules/suspend-react/index.js +0 -47
  234. package/dist/node_modules/@tiptap/core/dist/index.js +0 -2857
  235. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +0 -45
  236. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +0 -76
  237. package/dist/node_modules/@tiptap/extension-bubble-menu/dist/index.js +0 -129
  238. package/dist/node_modules/@tiptap/extension-bullet-list/dist/index.js +0 -55
  239. package/dist/node_modules/@tiptap/extension-character-count/dist/index.js +0 -73
  240. package/dist/node_modules/@tiptap/extension-code/dist/index.js +0 -54
  241. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +0 -136
  242. package/dist/node_modules/@tiptap/extension-document/dist/index.js +0 -10
  243. package/dist/node_modules/@tiptap/extension-dropcursor/dist/index.js +0 -21
  244. package/dist/node_modules/@tiptap/extension-gapcursor/dist/index.js +0 -25
  245. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +0 -56
  246. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +0 -55
  247. package/dist/node_modules/@tiptap/extension-history/dist/index.js +0 -36
  248. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -59
  249. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +0 -75
  250. package/dist/node_modules/@tiptap/extension-link/dist/index.js +0 -272
  251. package/dist/node_modules/@tiptap/extension-list-item/dist/index.js +0 -34
  252. package/dist/node_modules/@tiptap/extension-ordered-list/dist/index.js +0 -73
  253. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +0 -34
  254. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +0 -53
  255. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +0 -64
  256. package/dist/node_modules/@tiptap/extension-text/dist/index.js +0 -9
  257. package/dist/node_modules/@tiptap/react/dist/index.js +0 -709
  258. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +0 -30
  259. package/dist/node_modules/color/index.js +0 -262
  260. package/dist/node_modules/color/node_modules/color-convert/conversions.js +0 -421
  261. package/dist/node_modules/color/node_modules/color-convert/index.js +0 -35
  262. package/dist/node_modules/color/node_modules/color-convert/route.js +0 -46
  263. package/dist/node_modules/color/node_modules/color-name/index.js +0 -153
  264. package/dist/node_modules/color-string/index.js +0 -105
  265. package/dist/node_modules/color-string/node_modules/color-name/index.js +0 -153
  266. package/dist/node_modules/date-fns/_lib/defaultOptions.js +0 -7
  267. package/dist/node_modules/date-fns/_lib/normalizeDates.js +0 -11
  268. package/dist/node_modules/date-fns/constants.js +0 -4
  269. package/dist/node_modules/date-fns/constructFrom.js +0 -8
  270. package/dist/node_modules/date-fns/isSameWeek.js +0 -14
  271. package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -9
  272. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -18
  273. package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -31
  274. package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -15
  275. package/dist/node_modules/date-fns/locale/cs/_lib/formatDistance.js +0 -275
  276. package/dist/node_modules/date-fns/locale/cs/_lib/formatLong.js +0 -33
  277. package/dist/node_modules/date-fns/locale/cs/_lib/formatRelative.js +0 -25
  278. package/dist/node_modules/date-fns/locale/cs/_lib/localize.js +0 -167
  279. package/dist/node_modules/date-fns/locale/cs/_lib/match.js +0 -109
  280. package/dist/node_modules/date-fns/locale/cs.js +0 -21
  281. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -70
  282. package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -33
  283. package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -11
  284. package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -155
  285. package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +0 -110
  286. package/dist/node_modules/date-fns/locale/en-US.js +0 -21
  287. package/dist/node_modules/date-fns/locale/sk/_lib/formatDistance.js +0 -158
  288. package/dist/node_modules/date-fns/locale/sk/_lib/formatLong.js +0 -33
  289. package/dist/node_modules/date-fns/locale/sk/_lib/formatRelative.js +0 -60
  290. package/dist/node_modules/date-fns/locale/sk/_lib/localize.js +0 -175
  291. package/dist/node_modules/date-fns/locale/sk/_lib/match.js +0 -111
  292. package/dist/node_modules/date-fns/locale/sk.js +0 -21
  293. package/dist/node_modules/date-fns/startOfWeek.js +0 -11
  294. package/dist/node_modules/date-fns/toDate.js +0 -8
  295. package/dist/node_modules/framer-motion/dist/es/animation/animate/index.js +0 -25
  296. package/dist/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.js +0 -8
  297. package/dist/node_modules/framer-motion/dist/es/animation/animate/sequence.js +0 -12
  298. package/dist/node_modules/framer-motion/dist/es/animation/animate/subject.js +0 -32
  299. package/dist/node_modules/framer-motion/dist/es/animation/sequence/create.js +0 -128
  300. package/dist/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.js +0 -6
  301. package/dist/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.js +0 -6
  302. package/dist/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.js +0 -22
  303. package/dist/node_modules/framer-motion/dist/es/animation/sequence/utils/normalize-times.js +0 -7
  304. package/dist/node_modules/framer-motion/dist/es/animation/sequence/utils/sort.js +0 -6
  305. package/dist/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.js +0 -40
  306. package/dist/node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.js +0 -6
  307. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +0 -59
  308. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +0 -34
  309. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -47
  310. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -17
  311. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +0 -12
  312. package/dist/node_modules/framer-motion/dist/es/components/Reorder/Group.js +0 -46
  313. package/dist/node_modules/framer-motion/dist/es/components/Reorder/Item.js +0 -34
  314. package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.js +0 -64
  315. package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.js +0 -17
  316. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -5
  317. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -5
  318. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -9
  319. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -13
  320. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -5
  321. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -15
  322. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -5
  323. package/dist/node_modules/framer-motion/dist/es/context/ReorderContext.js +0 -5
  324. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -5
  325. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -8
  326. package/dist/node_modules/framer-motion/dist/es/events/event-info.js +0 -14
  327. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -277
  328. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -22
  329. package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.js +0 -70
  330. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -67
  331. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +0 -28
  332. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +0 -21
  333. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -131
  334. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -43
  335. package/dist/node_modules/framer-motion/dist/es/gestures/press.js +0 -23
  336. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -27
  337. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -34
  338. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -13
  339. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -39
  340. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -17
  341. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -21
  342. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -60
  343. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -11
  344. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -14
  345. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -44
  346. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -21
  347. package/dist/node_modules/framer-motion/dist/es/motion/index.js +0 -63
  348. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -4
  349. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -22
  350. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -65
  351. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -52
  352. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -38
  353. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +0 -18
  354. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +0 -13
  355. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +0 -7
  356. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -10
  357. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -16
  358. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -20
  359. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -24
  360. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +0 -10
  361. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -27
  362. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -9
  363. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -30
  364. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -22
  365. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +0 -10
  366. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -8
  367. package/dist/node_modules/framer-motion/dist/es/utils/distance.js +0 -9
  368. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +0 -4
  369. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -4
  370. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -6
  371. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +0 -28
  372. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -8
  373. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -6
  374. package/dist/node_modules/framer-motion/dist/es/utils/use-motion-value-event.js +0 -7
  375. package/dist/node_modules/framer-motion/dist/es/value/use-combine-values.js +0 -15
  376. package/dist/node_modules/framer-motion/dist/es/value/use-computed.js +0 -10
  377. package/dist/node_modules/framer-motion/dist/es/value/use-motion-value.js +0 -15
  378. package/dist/node_modules/framer-motion/dist/es/value/use-transform.js +0 -31
  379. package/dist/node_modules/imask/esm/controls/html-contenteditable-mask-element.js +0 -34
  380. package/dist/node_modules/imask/esm/controls/html-input-mask-element.js +0 -31
  381. package/dist/node_modules/imask/esm/controls/html-mask-element.js +0 -48
  382. package/dist/node_modules/imask/esm/controls/input-history.js +0 -30
  383. package/dist/node_modules/imask/esm/controls/input.js +0 -222
  384. package/dist/node_modules/imask/esm/controls/mask-element.js +0 -43
  385. package/dist/node_modules/imask/esm/core/action-details.js +0 -51
  386. package/dist/node_modules/imask/esm/core/change-details.js +0 -36
  387. package/dist/node_modules/imask/esm/core/continuous-tail-details.js +0 -42
  388. package/dist/node_modules/imask/esm/core/holder.js +0 -6
  389. package/dist/node_modules/imask/esm/core/utils.js +0 -67
  390. package/dist/node_modules/imask/esm/index.js +0 -50
  391. package/dist/node_modules/imask/esm/masked/base.js +0 -252
  392. package/dist/node_modules/imask/esm/masked/date.js +0 -117
  393. package/dist/node_modules/imask/esm/masked/dynamic.js +0 -222
  394. package/dist/node_modules/imask/esm/masked/enum.js +0 -69
  395. package/dist/node_modules/imask/esm/masked/factory.js +0 -46
  396. package/dist/node_modules/imask/esm/masked/function.js +0 -23
  397. package/dist/node_modules/imask/esm/masked/number.js +0 -212
  398. package/dist/node_modules/imask/esm/masked/pattern/chunk-tail-details.js +0 -103
  399. package/dist/node_modules/imask/esm/masked/pattern/cursor.js +0 -100
  400. package/dist/node_modules/imask/esm/masked/pattern/fixed-definition.js +0 -102
  401. package/dist/node_modules/imask/esm/masked/pattern/input-definition.js +0 -133
  402. package/dist/node_modules/imask/esm/masked/pattern.js +0 -322
  403. package/dist/node_modules/imask/esm/masked/pipe.js +0 -23
  404. package/dist/node_modules/imask/esm/masked/range.js +0 -78
  405. package/dist/node_modules/imask/esm/masked/regexp.js +0 -21
  406. package/dist/node_modules/imask/esm/masked/repeat.js +0 -104
  407. package/dist/node_modules/its-fine/dist/index.js +0 -116
  408. package/dist/node_modules/linkifyjs/dist/linkify.js +0 -707
  409. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +0 -106
  410. package/dist/node_modules/motion-dom/dist/es/animation/GroupAnimation.js +0 -76
  411. package/dist/node_modules/motion-dom/dist/es/animation/GroupAnimationWithThen.js +0 -10
  412. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +0 -133
  413. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +0 -108
  414. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +0 -37
  415. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +0 -10
  416. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +0 -17
  417. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +0 -37
  418. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +0 -30
  419. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/defaults.js +0 -32
  420. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/find.js +0 -52
  421. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/index.js +0 -98
  422. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +0 -13
  423. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +0 -13
  424. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +0 -6
  425. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +0 -9
  426. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +0 -46
  427. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +0 -46
  428. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +0 -30
  429. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +0 -22
  430. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +0 -69
  431. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +0 -75
  432. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +0 -8
  433. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +0 -8
  434. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +0 -12
  435. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +0 -6
  436. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +0 -7
  437. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +0 -7
  438. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +0 -16
  439. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +0 -31
  440. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +0 -6
  441. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +0 -7
  442. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +0 -27
  443. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +0 -7
  444. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +0 -23
  445. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +0 -31
  446. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +0 -22
  447. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-final-keyframe.js +0 -8
  448. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +0 -6
  449. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +0 -7
  450. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +0 -9
  451. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +0 -6
  452. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +0 -6
  453. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +0 -16
  454. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +0 -4
  455. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +0 -12
  456. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +0 -15
  457. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +0 -21
  458. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +0 -24
  459. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +0 -8
  460. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +0 -10
  461. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +0 -17
  462. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +0 -6
  463. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +0 -27
  464. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +0 -9
  465. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +0 -5
  466. package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +0 -21
  467. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +0 -41
  468. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +0 -15
  469. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +0 -11
  470. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +0 -11
  471. package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +0 -24
  472. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +0 -33
  473. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +0 -13
  474. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +0 -27
  475. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +0 -4
  476. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +0 -4
  477. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +0 -4
  478. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +0 -12
  479. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +0 -27
  480. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +0 -25
  481. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +0 -14
  482. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +0 -52
  483. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +0 -36
  484. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +0 -25
  485. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +0 -18
  486. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +0 -34
  487. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +0 -16
  488. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +0 -25
  489. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +0 -623
  490. package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +0 -15
  491. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +0 -60
  492. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +0 -21
  493. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +0 -16
  494. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +0 -21
  495. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +0 -13
  496. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +0 -4
  497. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +0 -6
  498. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +0 -19
  499. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +0 -20
  500. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +0 -13
  501. package/dist/node_modules/motion-dom/dist/es/render/Feature.js +0 -10
  502. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +0 -247
  503. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +0 -28
  504. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +0 -4
  505. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +0 -65
  506. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +0 -7
  507. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +0 -6
  508. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +0 -38
  509. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +0 -29
  510. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +0 -37
  511. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +0 -12
  512. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +0 -14
  513. package/dist/node_modules/motion-dom/dist/es/render/object/ObjectVisualElement.js +0 -37
  514. package/dist/node_modules/motion-dom/dist/es/render/store.js +0 -4
  515. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +0 -40
  516. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +0 -32
  517. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +0 -28
  518. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +0 -4
  519. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +0 -15
  520. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +0 -11
  521. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
  522. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +0 -141
  523. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +0 -20
  524. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +0 -6
  525. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +0 -13
  526. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +0 -9
  527. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +0 -4
  528. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +0 -6
  529. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +0 -13
  530. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +0 -23
  531. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +0 -25
  532. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +0 -15
  533. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +0 -5
  534. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +0 -8
  535. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +0 -20
  536. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +0 -21
  537. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +0 -14
  538. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +0 -13
  539. package/dist/node_modules/motion-dom/dist/es/utils/delay.js +0 -12
  540. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +0 -42
  541. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +0 -7
  542. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +0 -7
  543. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +0 -7
  544. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +0 -29
  545. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +0 -51
  546. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +0 -6
  547. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +0 -8
  548. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +0 -4
  549. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +0 -8
  550. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +0 -15
  551. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +0 -4
  552. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +0 -12
  553. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +0 -9
  554. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +0 -5
  555. package/dist/node_modules/motion-dom/dist/es/utils/transform.js +0 -8
  556. package/dist/node_modules/motion-dom/dist/es/value/index.js +0 -218
  557. package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +0 -7
  558. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +0 -19
  559. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +0 -22
  560. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +0 -12
  561. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +0 -15
  562. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +0 -16
  563. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +0 -18
  564. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +0 -24
  565. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +0 -49
  566. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +0 -9
  567. package/dist/node_modules/motion-dom/dist/es/value/types/int.js +0 -8
  568. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +0 -24
  569. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +0 -70
  570. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +0 -31
  571. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +0 -17
  572. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +0 -17
  573. package/dist/node_modules/motion-dom/dist/es/value/types/test.js +0 -4
  574. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +0 -10
  575. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +0 -4
  576. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +0 -8
  577. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +0 -4
  578. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +0 -4
  579. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +0 -6
  580. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +0 -4
  581. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +0 -4
  582. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +0 -4
  583. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +0 -7
  584. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +0 -14
  585. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +0 -7
  586. package/dist/node_modules/motion-utils/dist/es/array.js +0 -20
  587. package/dist/node_modules/motion-utils/dist/es/clamp.js +0 -4
  588. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +0 -5
  589. package/dist/node_modules/motion-utils/dist/es/easing/back.js +0 -9
  590. package/dist/node_modules/motion-utils/dist/es/easing/circ.js +0 -8
  591. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +0 -18
  592. package/dist/node_modules/motion-utils/dist/es/easing/ease.js +0 -7
  593. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +0 -4
  594. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +0 -4
  595. package/dist/node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.js +0 -8
  596. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +0 -4
  597. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +0 -4
  598. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +0 -32
  599. package/dist/node_modules/motion-utils/dist/es/errors.js +0 -15
  600. package/dist/node_modules/motion-utils/dist/es/format-error-message.js +0 -6
  601. package/dist/node_modules/motion-utils/dist/es/global-config.js +0 -4
  602. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +0 -4
  603. package/dist/node_modules/motion-utils/dist/es/is-object.js +0 -6
  604. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +0 -4
  605. package/dist/node_modules/motion-utils/dist/es/memo.js +0 -8
  606. package/dist/node_modules/motion-utils/dist/es/noop.js +0 -4
  607. package/dist/node_modules/motion-utils/dist/es/pipe.js +0 -4
  608. package/dist/node_modules/motion-utils/dist/es/progress.js +0 -7
  609. package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +0 -29
  610. package/dist/node_modules/motion-utils/dist/es/time-conversion.js +0 -5
  611. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +0 -6
  612. package/dist/node_modules/motion-utils/dist/es/warn-once.js +0 -8
  613. package/dist/node_modules/motion-utils/dist/es/wrap.js +0 -7
  614. package/dist/node_modules/object-assign/index.js +0 -54
  615. package/dist/node_modules/orderedmap/dist/index.js +0 -103
  616. package/dist/node_modules/photoswipe/dist/photoswipe.esm.js +0 -2956
  617. package/dist/node_modules/prop-types/checkPropTypes.js +0 -54
  618. package/dist/node_modules/prop-types/factoryWithThrowingShims.js +0 -52
  619. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +0 -329
  620. package/dist/node_modules/prop-types/index.js +0 -17
  621. package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -10
  622. package/dist/node_modules/prop-types/lib/has.js +0 -7
  623. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +0 -95
  624. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +0 -78
  625. package/dist/node_modules/prop-types/node_modules/react-is/index.js +0 -10
  626. package/dist/node_modules/prosemirror-commands/dist/index.js +0 -388
  627. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +0 -86
  628. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +0 -204
  629. package/dist/node_modules/prosemirror-history/dist/index.js +0 -248
  630. package/dist/node_modules/prosemirror-keymap/dist/index.js +0 -62
  631. package/dist/node_modules/prosemirror-model/dist/index.js +0 -2733
  632. package/dist/node_modules/prosemirror-schema-list/dist/index.js +0 -88
  633. package/dist/node_modules/prosemirror-state/dist/index.js +0 -822
  634. package/dist/node_modules/prosemirror-transform/dist/index.js +0 -1520
  635. package/dist/node_modules/prosemirror-view/dist/index.js +0 -3794
  636. package/dist/node_modules/react-day-picker/dist/esm/DayPicker.js +0 -229
  637. package/dist/node_modules/react-day-picker/dist/esm/UI.js +0 -22
  638. package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js +0 -19
  639. package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js +0 -8
  640. package/dist/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js +0 -8
  641. package/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js +0 -222
  642. package/dist/node_modules/react-day-picker/dist/esm/components/Button.js +0 -7
  643. package/dist/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js +0 -7
  644. package/dist/node_modules/react-day-picker/dist/esm/components/Chevron.js +0 -18
  645. package/dist/node_modules/react-day-picker/dist/esm/components/Day.js +0 -8
  646. package/dist/node_modules/react-day-picker/dist/esm/components/DayButton.js +0 -11
  647. package/dist/node_modules/react-day-picker/dist/esm/components/Dropdown.js +0 -19
  648. package/dist/node_modules/react-day-picker/dist/esm/components/DropdownNav.js +0 -7
  649. package/dist/node_modules/react-day-picker/dist/esm/components/Footer.js +0 -7
  650. package/dist/node_modules/react-day-picker/dist/esm/components/Month.js +0 -8
  651. package/dist/node_modules/react-day-picker/dist/esm/components/MonthCaption.js +0 -8
  652. package/dist/node_modules/react-day-picker/dist/esm/components/MonthGrid.js +0 -7
  653. package/dist/node_modules/react-day-picker/dist/esm/components/Months.js +0 -7
  654. package/dist/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js +0 -9
  655. package/dist/node_modules/react-day-picker/dist/esm/components/Nav.js +0 -27
  656. package/dist/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js +0 -9
  657. package/dist/node_modules/react-day-picker/dist/esm/components/Option.js +0 -7
  658. package/dist/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js +0 -9
  659. package/dist/node_modules/react-day-picker/dist/esm/components/Root.js +0 -8
  660. package/dist/node_modules/react-day-picker/dist/esm/components/Select.js +0 -7
  661. package/dist/node_modules/react-day-picker/dist/esm/components/Week.js +0 -8
  662. package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumber.js +0 -8
  663. package/dist/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js +0 -7
  664. package/dist/node_modules/react-day-picker/dist/esm/components/Weekday.js +0 -7
  665. package/dist/node_modules/react-day-picker/dist/esm/components/Weekdays.js +0 -11
  666. package/dist/node_modules/react-day-picker/dist/esm/components/Weeks.js +0 -7
  667. package/dist/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js +0 -9
  668. package/dist/node_modules/react-day-picker/dist/esm/components/custom-components.js +0 -54
  669. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +0 -9
  670. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatDay.js +0 -7
  671. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js +0 -7
  672. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js +0 -7
  673. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js +0 -6
  674. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js +0 -7
  675. package/dist/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js +0 -9
  676. package/dist/node_modules/react-day-picker/dist/esm/formatters/index.js +0 -18
  677. package/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js +0 -19
  678. package/dist/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js +0 -42
  679. package/dist/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js +0 -9
  680. package/dist/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js +0 -7
  681. package/dist/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js +0 -7
  682. package/dist/node_modules/react-day-picker/dist/esm/helpers/getComponents.js +0 -10
  683. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js +0 -16
  684. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDates.js +0 -21
  685. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDays.js +0 -10
  686. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js +0 -16
  687. package/dist/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js +0 -13
  688. package/dist/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js +0 -15
  689. package/dist/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js +0 -10
  690. package/dist/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js +0 -13
  691. package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js +0 -13
  692. package/dist/node_modules/react-day-picker/dist/esm/helpers/getMonths.js +0 -24
  693. package/dist/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js +0 -13
  694. package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js +0 -12
  695. package/dist/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js +0 -12
  696. package/dist/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js +0 -12
  697. package/dist/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js +0 -13
  698. package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js +0 -11
  699. package/dist/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +0 -7
  700. package/dist/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +0 -16
  701. package/dist/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js +0 -7
  702. package/dist/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js +0 -8
  703. package/dist/node_modules/react-day-picker/dist/esm/labels/index.js +0 -26
  704. package/dist/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js +0 -10
  705. package/dist/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +0 -9
  706. package/dist/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js +0 -8
  707. package/dist/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +0 -6
  708. package/dist/node_modules/react-day-picker/dist/esm/labels/labelNav.js +0 -6
  709. package/dist/node_modules/react-day-picker/dist/esm/labels/labelNext.js +0 -6
  710. package/dist/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +0 -6
  711. package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +0 -6
  712. package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +0 -6
  713. package/dist/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js +0 -7
  714. package/dist/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +0 -6
  715. package/dist/node_modules/react-day-picker/dist/esm/selection/useMulti.js +0 -21
  716. package/dist/node_modules/react-day-picker/dist/esm/selection/useRange.js +0 -18
  717. package/dist/node_modules/react-day-picker/dist/esm/selection/useSingle.js +0 -15
  718. package/dist/node_modules/react-day-picker/dist/esm/useAnimation.js +0 -56
  719. package/dist/node_modules/react-day-picker/dist/esm/useCalendar.js +0 -44
  720. package/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js +0 -12
  721. package/dist/node_modules/react-day-picker/dist/esm/useFocus.js +0 -23
  722. package/dist/node_modules/react-day-picker/dist/esm/useSelection.js +0 -19
  723. package/dist/node_modules/react-day-picker/dist/esm/utils/addToRange.js +0 -32
  724. package/dist/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js +0 -26
  725. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js +0 -15
  726. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js +0 -28
  727. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js +0 -9
  728. package/dist/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js +0 -8
  729. package/dist/node_modules/react-day-picker/dist/esm/utils/typeguards.js +0 -26
  730. package/dist/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +0 -3621
  731. package/dist/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.min.js +0 -1234
  732. package/dist/node_modules/react-dom/cjs/react-dom-server.browser.development.js +0 -3600
  733. package/dist/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js +0 -1255
  734. package/dist/node_modules/react-dom/server.browser.js +0 -15
  735. package/dist/node_modules/react-imask/esm/hook.js +0 -75
  736. package/dist/node_modules/react-imask/esm/input.js +0 -23
  737. package/dist/node_modules/react-imask/esm/mixin.js +0 -131
  738. package/dist/node_modules/react-photoswipe-gallery/dist/context.js +0 -17
  739. package/dist/node_modules/react-photoswipe-gallery/dist/gallery.js +0 -216
  740. package/dist/node_modules/react-photoswipe-gallery/dist/helpers/ensure-ref-passed.js +0 -10
  741. package/dist/node_modules/react-photoswipe-gallery/dist/helpers/entry-item-ref-is-element.js +0 -4
  742. package/dist/node_modules/react-photoswipe-gallery/dist/helpers/get-base-url.js +0 -6
  743. package/dist/node_modules/react-photoswipe-gallery/dist/helpers/get-hash-value.js +0 -6
  744. package/dist/node_modules/react-photoswipe-gallery/dist/helpers/get-hash-without-gid-and-pid.js +0 -9
  745. package/dist/node_modules/react-photoswipe-gallery/dist/helpers/get-initial-active-slide-index.js +0 -6
  746. package/dist/node_modules/react-photoswipe-gallery/dist/helpers/get-slides-and-index-from-data-source.js +0 -39
  747. package/dist/node_modules/react-photoswipe-gallery/dist/helpers/get-slides-and-index-from-items-refs.js +0 -31
  748. package/dist/node_modules/react-photoswipe-gallery/dist/helpers/hash-includes-navigation-query-params.js +0 -8
  749. package/dist/node_modules/react-photoswipe-gallery/dist/helpers/hash-to-object.js +0 -9
  750. package/dist/node_modules/react-photoswipe-gallery/dist/helpers/item-to-slide.js +0 -37
  751. package/dist/node_modules/react-photoswipe-gallery/dist/helpers/object-to-hash.js +0 -6
  752. package/dist/node_modules/react-photoswipe-gallery/dist/helpers/sort-nodes.js +0 -6
  753. package/dist/node_modules/react-photoswipe-gallery/dist/hooks.js +0 -22
  754. package/dist/node_modules/react-photoswipe-gallery/dist/item.js +0 -54
  755. package/dist/node_modules/react-photoswipe-gallery/dist/lightbox-stub.js +0 -8
  756. package/dist/node_modules/react-photoswipe-gallery/dist/no-ref-error.js +0 -14
  757. package/dist/node_modules/react-photoswipe-gallery/dist/no-source-id-error.js +0 -18
  758. package/dist/node_modules/react-reconciler/cjs/react-reconciler-constants.development.js +0 -32
  759. package/dist/node_modules/react-reconciler/cjs/react-reconciler-constants.production.min.js +0 -17
  760. package/dist/node_modules/react-reconciler/cjs/react-reconciler.development.js +0 -9139
  761. package/dist/node_modules/react-reconciler/cjs/react-reconciler.production.min.js +0 -3778
  762. package/dist/node_modules/react-reconciler/constants.js +0 -10
  763. package/dist/node_modules/react-reconciler/index.js +0 -10
  764. package/dist/node_modules/react-use-measure/dist/index.js +0 -60
  765. package/dist/node_modules/rope-sequence/dist/index.js +0 -100
  766. package/dist/node_modules/scheduler/cjs/scheduler.development.js +0 -277
  767. package/dist/node_modules/scheduler/cjs/scheduler.production.min.js +0 -213
  768. package/dist/node_modules/scheduler/index.js +0 -10
  769. package/dist/node_modules/three/build/three.module.js +0 -20599
  770. package/dist/node_modules/three-stdlib/_polyfill/LoaderUtils.js +0 -15
  771. package/dist/node_modules/three-stdlib/_polyfill/constants.js +0 -5
  772. package/dist/node_modules/three-stdlib/libs/MeshoptDecoder.js +0 -201
  773. package/dist/node_modules/three-stdlib/loaders/DRACOLoader.js +0 -246
  774. package/dist/node_modules/three-stdlib/loaders/GLTFLoader.js +0 -1670
  775. package/dist/node_modules/three-stdlib/utils/BufferGeometryUtils.js +0 -34
  776. package/dist/node_modules/tippy.js/dist/tippy.esm.js +0 -813
  777. package/dist/node_modules/w3c-keyname/index.js +0 -93
  778. package/dist/node_modules/zustand/esm/index.js +0 -61
@@ -1,1520 +0,0 @@
1
- import { Slice as w, Fragment as g, Mark as se, MarkType as oe, ReplaceError as le } from "../../prosemirror-model/dist/index.js";
2
- const Q = 65535, U = Math.pow(2, 16);
3
- function ae(s, e) {
4
- return s + e * U;
5
- }
6
- function H(s) {
7
- return s & Q;
8
- }
9
- function he(s) {
10
- return (s - (s & Q)) / U;
11
- }
12
- const V = 1, X = 2, J = 4, Y = 8;
13
- class L {
14
- /**
15
- @internal
16
- */
17
- constructor(e, t, r) {
18
- this.pos = e, this.delInfo = t, this.recover = r;
19
- }
20
- /**
21
- Tells you whether the position was deleted, that is, whether the
22
- step removed the token on the side queried (via the `assoc`)
23
- argument from the document.
24
- */
25
- get deleted() {
26
- return (this.delInfo & Y) > 0;
27
- }
28
- /**
29
- Tells you whether the token before the mapped position was deleted.
30
- */
31
- get deletedBefore() {
32
- return (this.delInfo & (V | J)) > 0;
33
- }
34
- /**
35
- True when the token after the mapped position was deleted.
36
- */
37
- get deletedAfter() {
38
- return (this.delInfo & (X | J)) > 0;
39
- }
40
- /**
41
- Tells whether any of the steps mapped through deletes across the
42
- position (including both the token before and after the
43
- position).
44
- */
45
- get deletedAcross() {
46
- return (this.delInfo & J) > 0;
47
- }
48
- }
49
- class S {
50
- /**
51
- Create a position map. The modifications to the document are
52
- represented as an array of numbers, in which each group of three
53
- represents a modified chunk as `[start, oldSize, newSize]`.
54
- */
55
- constructor(e, t = !1) {
56
- if (this.ranges = e, this.inverted = t, !e.length && S.empty)
57
- return S.empty;
58
- }
59
- /**
60
- @internal
61
- */
62
- recover(e) {
63
- let t = 0, r = H(e);
64
- if (!this.inverted)
65
- for (let n = 0; n < r; n++)
66
- t += this.ranges[n * 3 + 2] - this.ranges[n * 3 + 1];
67
- return this.ranges[r * 3] + t + he(e);
68
- }
69
- mapResult(e, t = 1) {
70
- return this._map(e, t, !1);
71
- }
72
- map(e, t = 1) {
73
- return this._map(e, t, !0);
74
- }
75
- /**
76
- @internal
77
- */
78
- _map(e, t, r) {
79
- let n = 0, i = this.inverted ? 2 : 1, o = this.inverted ? 1 : 2;
80
- for (let l = 0; l < this.ranges.length; l += 3) {
81
- let a = this.ranges[l] - (this.inverted ? n : 0);
82
- if (a > e)
83
- break;
84
- let h = this.ranges[l + i], p = this.ranges[l + o], c = a + h;
85
- if (e <= c) {
86
- let f = h ? e == a ? -1 : e == c ? 1 : t : t, d = a + n + (f < 0 ? 0 : p);
87
- if (r)
88
- return d;
89
- let u = e == (t < 0 ? a : c) ? null : ae(l / 3, e - a), m = e == a ? X : e == c ? V : J;
90
- return (t < 0 ? e != a : e != c) && (m |= Y), new L(d, m, u);
91
- }
92
- n += p - h;
93
- }
94
- return r ? e + n : new L(e + n, 0, null);
95
- }
96
- /**
97
- @internal
98
- */
99
- touches(e, t) {
100
- let r = 0, n = H(t), i = this.inverted ? 2 : 1, o = this.inverted ? 1 : 2;
101
- for (let l = 0; l < this.ranges.length; l += 3) {
102
- let a = this.ranges[l] - (this.inverted ? r : 0);
103
- if (a > e)
104
- break;
105
- let h = this.ranges[l + i], p = a + h;
106
- if (e <= p && l == n * 3)
107
- return !0;
108
- r += this.ranges[l + o] - h;
109
- }
110
- return !1;
111
- }
112
- /**
113
- Calls the given function on each of the changed ranges included in
114
- this map.
115
- */
116
- forEach(e) {
117
- let t = this.inverted ? 2 : 1, r = this.inverted ? 1 : 2;
118
- for (let n = 0, i = 0; n < this.ranges.length; n += 3) {
119
- let o = this.ranges[n], l = o - (this.inverted ? i : 0), a = o + (this.inverted ? 0 : i), h = this.ranges[n + t], p = this.ranges[n + r];
120
- e(l, l + h, a, a + p), i += p - h;
121
- }
122
- }
123
- /**
124
- Create an inverted version of this map. The result can be used to
125
- map positions in the post-step document to the pre-step document.
126
- */
127
- invert() {
128
- return new S(this.ranges, !this.inverted);
129
- }
130
- /**
131
- @internal
132
- */
133
- toString() {
134
- return (this.inverted ? "-" : "") + JSON.stringify(this.ranges);
135
- }
136
- /**
137
- Create a map that moves all positions by offset `n` (which may be
138
- negative). This can be useful when applying steps meant for a
139
- sub-document to a larger document, or vice-versa.
140
- */
141
- static offset(e) {
142
- return e == 0 ? S.empty : new S(e < 0 ? [0, -e, 0] : [0, 0, e]);
143
- }
144
- }
145
- S.empty = new S([]);
146
- class A {
147
- /**
148
- Create a new mapping with the given position maps.
149
- */
150
- constructor(e, t, r = 0, n = e ? e.length : 0) {
151
- this.mirror = t, this.from = r, this.to = n, this._maps = e || [], this.ownData = !(e || t);
152
- }
153
- /**
154
- The step maps in this mapping.
155
- */
156
- get maps() {
157
- return this._maps;
158
- }
159
- /**
160
- Create a mapping that maps only through a part of this one.
161
- */
162
- slice(e = 0, t = this.maps.length) {
163
- return new A(this._maps, this.mirror, e, t);
164
- }
165
- /**
166
- Add a step map to the end of this mapping. If `mirrors` is
167
- given, it should be the index of the step map that is the mirror
168
- image of this one.
169
- */
170
- appendMap(e, t) {
171
- this.ownData || (this._maps = this._maps.slice(), this.mirror = this.mirror && this.mirror.slice(), this.ownData = !0), this.to = this._maps.push(e), t != null && this.setMirror(this._maps.length - 1, t);
172
- }
173
- /**
174
- Add all the step maps in a given mapping to this one (preserving
175
- mirroring information).
176
- */
177
- appendMapping(e) {
178
- for (let t = 0, r = this._maps.length; t < e._maps.length; t++) {
179
- let n = e.getMirror(t);
180
- this.appendMap(e._maps[t], n != null && n < t ? r + n : void 0);
181
- }
182
- }
183
- /**
184
- Finds the offset of the step map that mirrors the map at the
185
- given offset, in this mapping (as per the second argument to
186
- `appendMap`).
187
- */
188
- getMirror(e) {
189
- if (this.mirror) {
190
- for (let t = 0; t < this.mirror.length; t++)
191
- if (this.mirror[t] == e)
192
- return this.mirror[t + (t % 2 ? -1 : 1)];
193
- }
194
- }
195
- /**
196
- @internal
197
- */
198
- setMirror(e, t) {
199
- this.mirror || (this.mirror = []), this.mirror.push(e, t);
200
- }
201
- /**
202
- Append the inverse of the given mapping to this one.
203
- */
204
- appendMappingInverted(e) {
205
- for (let t = e.maps.length - 1, r = this._maps.length + e._maps.length; t >= 0; t--) {
206
- let n = e.getMirror(t);
207
- this.appendMap(e._maps[t].invert(), n != null && n > t ? r - n - 1 : void 0);
208
- }
209
- }
210
- /**
211
- Create an inverted version of this mapping.
212
- */
213
- invert() {
214
- let e = new A();
215
- return e.appendMappingInverted(this), e;
216
- }
217
- /**
218
- Map a position through this mapping.
219
- */
220
- map(e, t = 1) {
221
- if (this.mirror)
222
- return this._map(e, t, !0);
223
- for (let r = this.from; r < this.to; r++)
224
- e = this._maps[r].map(e, t);
225
- return e;
226
- }
227
- /**
228
- Map a position through this mapping, returning a mapping
229
- result.
230
- */
231
- mapResult(e, t = 1) {
232
- return this._map(e, t, !1);
233
- }
234
- /**
235
- @internal
236
- */
237
- _map(e, t, r) {
238
- let n = 0;
239
- for (let i = this.from; i < this.to; i++) {
240
- let o = this._maps[i], l = o.mapResult(e, t);
241
- if (l.recover != null) {
242
- let a = this.getMirror(i);
243
- if (a != null && a > i && a < this.to) {
244
- i = a, e = this._maps[a].recover(l.recover);
245
- continue;
246
- }
247
- }
248
- n |= l.delInfo, e = l.pos;
249
- }
250
- return r ? e : new L(e, n, null);
251
- }
252
- }
253
- const B = /* @__PURE__ */ Object.create(null);
254
- class k {
255
- /**
256
- Get the step map that represents the changes made by this step,
257
- and which can be used to transform between positions in the old
258
- and the new document.
259
- */
260
- getMap() {
261
- return S.empty;
262
- }
263
- /**
264
- Try to merge this step with another one, to be applied directly
265
- after it. Returns the merged step when possible, null if the
266
- steps can't be merged.
267
- */
268
- merge(e) {
269
- return null;
270
- }
271
- /**
272
- Deserialize a step from its JSON representation. Will call
273
- through to the step class' own implementation of this method.
274
- */
275
- static fromJSON(e, t) {
276
- if (!t || !t.stepType)
277
- throw new RangeError("Invalid input for Step.fromJSON");
278
- let r = B[t.stepType];
279
- if (!r)
280
- throw new RangeError(`No step type ${t.stepType} defined`);
281
- return r.fromJSON(e, t);
282
- }
283
- /**
284
- To be able to serialize steps to JSON, each step needs a string
285
- ID to attach to its JSON representation. Use this method to
286
- register an ID for your step classes. Try to pick something
287
- that's unlikely to clash with steps from other modules.
288
- */
289
- static jsonID(e, t) {
290
- if (e in B)
291
- throw new RangeError("Duplicate use of step JSON ID " + e);
292
- return B[e] = t, t.prototype.jsonID = e, t;
293
- }
294
- }
295
- class y {
296
- /**
297
- @internal
298
- */
299
- constructor(e, t) {
300
- this.doc = e, this.failed = t;
301
- }
302
- /**
303
- Create a successful step result.
304
- */
305
- static ok(e) {
306
- return new y(e, null);
307
- }
308
- /**
309
- Create a failed step result.
310
- */
311
- static fail(e) {
312
- return new y(null, e);
313
- }
314
- /**
315
- Call [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) with the given
316
- arguments. Create a successful result if it succeeds, and a
317
- failed one if it throws a `ReplaceError`.
318
- */
319
- static fromReplace(e, t, r, n) {
320
- try {
321
- return y.ok(e.replace(t, r, n));
322
- } catch (i) {
323
- if (i instanceof le)
324
- return y.fail(i.message);
325
- throw i;
326
- }
327
- }
328
- }
329
- function P(s, e, t) {
330
- let r = [];
331
- for (let n = 0; n < s.childCount; n++) {
332
- let i = s.child(n);
333
- i.content.size && (i = i.copy(P(i.content, e, i))), i.isInline && (i = e(i, t, n)), r.push(i);
334
- }
335
- return g.fromArray(r);
336
- }
337
- class M extends k {
338
- /**
339
- Create a mark step.
340
- */
341
- constructor(e, t, r) {
342
- super(), this.from = e, this.to = t, this.mark = r;
343
- }
344
- apply(e) {
345
- let t = e.slice(this.from, this.to), r = e.resolve(this.from), n = r.node(r.sharedDepth(this.to)), i = new w(P(t.content, (o, l) => !o.isAtom || !l.type.allowsMarkType(this.mark.type) ? o : o.mark(this.mark.addToSet(o.marks)), n), t.openStart, t.openEnd);
346
- return y.fromReplace(e, this.from, this.to, i);
347
- }
348
- invert() {
349
- return new b(this.from, this.to, this.mark);
350
- }
351
- map(e) {
352
- let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
353
- return t.deleted && r.deleted || t.pos >= r.pos ? null : new M(t.pos, r.pos, this.mark);
354
- }
355
- merge(e) {
356
- return e instanceof M && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new M(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
357
- }
358
- toJSON() {
359
- return {
360
- stepType: "addMark",
361
- mark: this.mark.toJSON(),
362
- from: this.from,
363
- to: this.to
364
- };
365
- }
366
- /**
367
- @internal
368
- */
369
- static fromJSON(e, t) {
370
- if (typeof t.from != "number" || typeof t.to != "number")
371
- throw new RangeError("Invalid input for AddMarkStep.fromJSON");
372
- return new M(t.from, t.to, e.markFromJSON(t.mark));
373
- }
374
- }
375
- k.jsonID("addMark", M);
376
- class b extends k {
377
- /**
378
- Create a mark-removing step.
379
- */
380
- constructor(e, t, r) {
381
- super(), this.from = e, this.to = t, this.mark = r;
382
- }
383
- apply(e) {
384
- let t = e.slice(this.from, this.to), r = new w(P(t.content, (n) => n.mark(this.mark.removeFromSet(n.marks)), e), t.openStart, t.openEnd);
385
- return y.fromReplace(e, this.from, this.to, r);
386
- }
387
- invert() {
388
- return new M(this.from, this.to, this.mark);
389
- }
390
- map(e) {
391
- let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
392
- return t.deleted && r.deleted || t.pos >= r.pos ? null : new b(t.pos, r.pos, this.mark);
393
- }
394
- merge(e) {
395
- return e instanceof b && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new b(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
396
- }
397
- toJSON() {
398
- return {
399
- stepType: "removeMark",
400
- mark: this.mark.toJSON(),
401
- from: this.from,
402
- to: this.to
403
- };
404
- }
405
- /**
406
- @internal
407
- */
408
- static fromJSON(e, t) {
409
- if (typeof t.from != "number" || typeof t.to != "number")
410
- throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
411
- return new b(t.from, t.to, e.markFromJSON(t.mark));
412
- }
413
- }
414
- k.jsonID("removeMark", b);
415
- class N extends k {
416
- /**
417
- Create a node mark step.
418
- */
419
- constructor(e, t) {
420
- super(), this.pos = e, this.mark = t;
421
- }
422
- apply(e) {
423
- let t = e.nodeAt(this.pos);
424
- if (!t)
425
- return y.fail("No node at mark step's position");
426
- let r = t.type.create(t.attrs, null, this.mark.addToSet(t.marks));
427
- return y.fromReplace(e, this.pos, this.pos + 1, new w(g.from(r), 0, t.isLeaf ? 0 : 1));
428
- }
429
- invert(e) {
430
- let t = e.nodeAt(this.pos);
431
- if (t) {
432
- let r = this.mark.addToSet(t.marks);
433
- if (r.length == t.marks.length) {
434
- for (let n = 0; n < t.marks.length; n++)
435
- if (!t.marks[n].isInSet(r))
436
- return new N(this.pos, t.marks[n]);
437
- return new N(this.pos, this.mark);
438
- }
439
- }
440
- return new R(this.pos, this.mark);
441
- }
442
- map(e) {
443
- let t = e.mapResult(this.pos, 1);
444
- return t.deletedAfter ? null : new N(t.pos, this.mark);
445
- }
446
- toJSON() {
447
- return { stepType: "addNodeMark", pos: this.pos, mark: this.mark.toJSON() };
448
- }
449
- /**
450
- @internal
451
- */
452
- static fromJSON(e, t) {
453
- if (typeof t.pos != "number")
454
- throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");
455
- return new N(t.pos, e.markFromJSON(t.mark));
456
- }
457
- }
458
- k.jsonID("addNodeMark", N);
459
- class R extends k {
460
- /**
461
- Create a mark-removing step.
462
- */
463
- constructor(e, t) {
464
- super(), this.pos = e, this.mark = t;
465
- }
466
- apply(e) {
467
- let t = e.nodeAt(this.pos);
468
- if (!t)
469
- return y.fail("No node at mark step's position");
470
- let r = t.type.create(t.attrs, null, this.mark.removeFromSet(t.marks));
471
- return y.fromReplace(e, this.pos, this.pos + 1, new w(g.from(r), 0, t.isLeaf ? 0 : 1));
472
- }
473
- invert(e) {
474
- let t = e.nodeAt(this.pos);
475
- return !t || !this.mark.isInSet(t.marks) ? this : new N(this.pos, this.mark);
476
- }
477
- map(e) {
478
- let t = e.mapResult(this.pos, 1);
479
- return t.deletedAfter ? null : new R(t.pos, this.mark);
480
- }
481
- toJSON() {
482
- return { stepType: "removeNodeMark", pos: this.pos, mark: this.mark.toJSON() };
483
- }
484
- /**
485
- @internal
486
- */
487
- static fromJSON(e, t) {
488
- if (typeof t.pos != "number")
489
- throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");
490
- return new R(t.pos, e.markFromJSON(t.mark));
491
- }
492
- }
493
- k.jsonID("removeNodeMark", R);
494
- class v extends k {
495
- /**
496
- The given `slice` should fit the 'gap' between `from` and
497
- `to`—the depths must line up, and the surrounding nodes must be
498
- able to be joined with the open sides of the slice. When
499
- `structure` is true, the step will fail if the content between
500
- from and to is not just a sequence of closing and then opening
501
- tokens (this is to guard against rebased replace steps
502
- overwriting something they weren't supposed to).
503
- */
504
- constructor(e, t, r, n = !1) {
505
- super(), this.from = e, this.to = t, this.slice = r, this.structure = n;
506
- }
507
- apply(e) {
508
- return this.structure && q(e, this.from, this.to) ? y.fail("Structure replace would overwrite content") : y.fromReplace(e, this.from, this.to, this.slice);
509
- }
510
- getMap() {
511
- return new S([this.from, this.to - this.from, this.slice.size]);
512
- }
513
- invert(e) {
514
- return new v(this.from, this.from + this.slice.size, e.slice(this.from, this.to));
515
- }
516
- map(e) {
517
- let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
518
- return t.deletedAcross && r.deletedAcross ? null : new v(t.pos, Math.max(t.pos, r.pos), this.slice, this.structure);
519
- }
520
- merge(e) {
521
- if (!(e instanceof v) || e.structure || this.structure)
522
- return null;
523
- if (this.from + this.slice.size == e.from && !this.slice.openEnd && !e.slice.openStart) {
524
- let t = this.slice.size + e.slice.size == 0 ? w.empty : new w(this.slice.content.append(e.slice.content), this.slice.openStart, e.slice.openEnd);
525
- return new v(this.from, this.to + (e.to - e.from), t, this.structure);
526
- } else if (e.to == this.from && !this.slice.openStart && !e.slice.openEnd) {
527
- let t = this.slice.size + e.slice.size == 0 ? w.empty : new w(e.slice.content.append(this.slice.content), e.slice.openStart, this.slice.openEnd);
528
- return new v(e.from, this.to, t, this.structure);
529
- } else
530
- return null;
531
- }
532
- toJSON() {
533
- let e = { stepType: "replace", from: this.from, to: this.to };
534
- return this.slice.size && (e.slice = this.slice.toJSON()), this.structure && (e.structure = !0), e;
535
- }
536
- /**
537
- @internal
538
- */
539
- static fromJSON(e, t) {
540
- if (typeof t.from != "number" || typeof t.to != "number")
541
- throw new RangeError("Invalid input for ReplaceStep.fromJSON");
542
- return new v(t.from, t.to, w.fromJSON(e, t.slice), !!t.structure);
543
- }
544
- }
545
- k.jsonID("replace", v);
546
- class C extends k {
547
- /**
548
- Create a replace-around step with the given range and gap.
549
- `insert` should be the point in the slice into which the content
550
- of the gap should be moved. `structure` has the same meaning as
551
- it has in the [`ReplaceStep`](https://prosemirror.net/docs/ref/#transform.ReplaceStep) class.
552
- */
553
- constructor(e, t, r, n, i, o, l = !1) {
554
- super(), this.from = e, this.to = t, this.gapFrom = r, this.gapTo = n, this.slice = i, this.insert = o, this.structure = l;
555
- }
556
- apply(e) {
557
- if (this.structure && (q(e, this.from, this.gapFrom) || q(e, this.gapTo, this.to)))
558
- return y.fail("Structure gap-replace would overwrite content");
559
- let t = e.slice(this.gapFrom, this.gapTo);
560
- if (t.openStart || t.openEnd)
561
- return y.fail("Gap is not a flat range");
562
- let r = this.slice.insertAt(this.insert, t.content);
563
- return r ? y.fromReplace(e, this.from, this.to, r) : y.fail("Content does not fit in gap");
564
- }
565
- getMap() {
566
- return new S([
567
- this.from,
568
- this.gapFrom - this.from,
569
- this.insert,
570
- this.gapTo,
571
- this.to - this.gapTo,
572
- this.slice.size - this.insert
573
- ]);
574
- }
575
- invert(e) {
576
- let t = this.gapTo - this.gapFrom;
577
- return new C(this.from, this.from + this.slice.size + t, this.from + this.insert, this.from + this.insert + t, e.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);
578
- }
579
- map(e) {
580
- let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1), n = this.from == this.gapFrom ? t.pos : e.map(this.gapFrom, -1), i = this.to == this.gapTo ? r.pos : e.map(this.gapTo, 1);
581
- return t.deletedAcross && r.deletedAcross || n < t.pos || i > r.pos ? null : new C(t.pos, r.pos, n, i, this.slice, this.insert, this.structure);
582
- }
583
- toJSON() {
584
- let e = {
585
- stepType: "replaceAround",
586
- from: this.from,
587
- to: this.to,
588
- gapFrom: this.gapFrom,
589
- gapTo: this.gapTo,
590
- insert: this.insert
591
- };
592
- return this.slice.size && (e.slice = this.slice.toJSON()), this.structure && (e.structure = !0), e;
593
- }
594
- /**
595
- @internal
596
- */
597
- static fromJSON(e, t) {
598
- if (typeof t.from != "number" || typeof t.to != "number" || typeof t.gapFrom != "number" || typeof t.gapTo != "number" || typeof t.insert != "number")
599
- throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");
600
- return new C(t.from, t.to, t.gapFrom, t.gapTo, w.fromJSON(e, t.slice), t.insert, !!t.structure);
601
- }
602
- }
603
- k.jsonID("replaceAround", C);
604
- function q(s, e, t) {
605
- let r = s.resolve(e), n = t - e, i = r.depth;
606
- for (; n > 0 && i > 0 && r.indexAfter(i) == r.node(i).childCount; )
607
- i--, n--;
608
- if (n > 0) {
609
- let o = r.node(i).maybeChild(r.indexAfter(i));
610
- for (; n > 0; ) {
611
- if (!o || o.isLeaf)
612
- return !0;
613
- o = o.firstChild, n--;
614
- }
615
- }
616
- return !1;
617
- }
618
- function pe(s, e, t, r) {
619
- let n = [], i = [], o, l;
620
- s.doc.nodesBetween(e, t, (a, h, p) => {
621
- if (!a.isInline)
622
- return;
623
- let c = a.marks;
624
- if (!r.isInSet(c) && p.type.allowsMarkType(r.type)) {
625
- let f = Math.max(h, e), d = Math.min(h + a.nodeSize, t), u = r.addToSet(c);
626
- for (let m = 0; m < c.length; m++)
627
- c[m].isInSet(u) || (o && o.to == f && o.mark.eq(c[m]) ? o.to = d : n.push(o = new b(f, d, c[m])));
628
- l && l.to == f ? l.to = d : i.push(l = new M(f, d, r));
629
- }
630
- }), n.forEach((a) => s.step(a)), i.forEach((a) => s.step(a));
631
- }
632
- function fe(s, e, t, r) {
633
- let n = [], i = 0;
634
- s.doc.nodesBetween(e, t, (o, l) => {
635
- if (!o.isInline)
636
- return;
637
- i++;
638
- let a = null;
639
- if (r instanceof oe) {
640
- let h = o.marks, p;
641
- for (; p = r.isInSet(h); )
642
- (a || (a = [])).push(p), h = p.removeFromSet(h);
643
- } else r ? r.isInSet(o.marks) && (a = [r]) : a = o.marks;
644
- if (a && a.length) {
645
- let h = Math.min(l + o.nodeSize, t);
646
- for (let p = 0; p < a.length; p++) {
647
- let c = a[p], f;
648
- for (let d = 0; d < n.length; d++) {
649
- let u = n[d];
650
- u.step == i - 1 && c.eq(n[d].style) && (f = u);
651
- }
652
- f ? (f.to = h, f.step = i) : n.push({ style: c, from: Math.max(l, e), to: h, step: i });
653
- }
654
- }
655
- }), n.forEach((o) => s.step(new b(o.from, o.to, o.style)));
656
- }
657
- function $(s, e, t, r = t.contentMatch, n = !0) {
658
- let i = s.doc.nodeAt(e), o = [], l = e + 1;
659
- for (let a = 0; a < i.childCount; a++) {
660
- let h = i.child(a), p = l + h.nodeSize, c = r.matchType(h.type);
661
- if (!c)
662
- o.push(new v(l, p, w.empty));
663
- else {
664
- r = c;
665
- for (let f = 0; f < h.marks.length; f++)
666
- t.allowsMarkType(h.marks[f].type) || s.step(new b(l, p, h.marks[f]));
667
- if (n && h.isText && t.whitespace != "pre") {
668
- let f, d = /\r?\n|\r/g, u;
669
- for (; f = d.exec(h.text); )
670
- u || (u = new w(g.from(t.schema.text(" ", t.allowedMarks(h.marks))), 0, 0)), o.push(new v(l + f.index, l + f.index + f[0].length, u));
671
- }
672
- }
673
- l = p;
674
- }
675
- if (!r.validEnd) {
676
- let a = r.fillBefore(g.empty, !0);
677
- s.replace(l, l, new w(a, 0, 0));
678
- }
679
- for (let a = o.length - 1; a >= 0; a--)
680
- s.step(o[a]);
681
- }
682
- function ce(s, e, t) {
683
- return (e == 0 || s.canReplace(e, s.childCount)) && (t == s.childCount || s.canReplace(0, t));
684
- }
685
- function Fe(s) {
686
- let t = s.parent.content.cutByIndex(s.startIndex, s.endIndex);
687
- for (let r = s.depth, n = 0, i = 0; ; --r) {
688
- let o = s.$from.node(r), l = s.$from.index(r) + n, a = s.$to.indexAfter(r) - i;
689
- if (r < s.depth && o.canReplace(l, a, t))
690
- return r;
691
- if (r == 0 || o.type.spec.isolating || !ce(o, l, a))
692
- break;
693
- l && (n = 1), a < o.childCount && (i = 1);
694
- }
695
- return null;
696
- }
697
- function de(s, e, t) {
698
- let { $from: r, $to: n, depth: i } = e, o = r.before(i + 1), l = n.after(i + 1), a = o, h = l, p = g.empty, c = 0;
699
- for (let u = i, m = !1; u > t; u--)
700
- m || r.index(u) > 0 ? (m = !0, p = g.from(r.node(u).copy(p)), c++) : a--;
701
- let f = g.empty, d = 0;
702
- for (let u = i, m = !1; u > t; u--)
703
- m || n.after(u + 1) < n.end(u) ? (m = !0, f = g.from(n.node(u).copy(f)), d++) : h++;
704
- s.step(new C(a, h, o, l, new w(p.append(f), c, d), p.size - c, !0));
705
- }
706
- function ze(s, e, t = null, r = s) {
707
- let n = ue(s, e), i = n && me(r, e);
708
- return i ? n.map(K).concat({ type: e, attrs: t }).concat(i.map(K)) : null;
709
- }
710
- function K(s) {
711
- return { type: s, attrs: null };
712
- }
713
- function ue(s, e) {
714
- let { parent: t, startIndex: r, endIndex: n } = s, i = t.contentMatchAt(r).findWrapping(e);
715
- if (!i)
716
- return null;
717
- let o = i.length ? i[0] : e;
718
- return t.canReplaceWith(r, n, o) ? i : null;
719
- }
720
- function me(s, e) {
721
- let { parent: t, startIndex: r, endIndex: n } = s, i = t.child(r), o = e.contentMatch.findWrapping(i.type);
722
- if (!o)
723
- return null;
724
- let a = (o.length ? o[o.length - 1] : e).contentMatch;
725
- for (let h = r; a && h < n; h++)
726
- a = a.matchType(t.child(h).type);
727
- return !a || !a.validEnd ? null : o;
728
- }
729
- function we(s, e, t) {
730
- let r = g.empty;
731
- for (let o = t.length - 1; o >= 0; o--) {
732
- if (r.size) {
733
- let l = t[o].type.contentMatch.matchFragment(r);
734
- if (!l || !l.validEnd)
735
- throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper");
736
- }
737
- r = g.from(t[o].type.create(t[o].attrs, r));
738
- }
739
- let n = e.start, i = e.end;
740
- s.step(new C(n, i, n, i, new w(r, 0, 0), t.length, !0));
741
- }
742
- function ge(s, e, t, r, n) {
743
- if (!r.isTextblock)
744
- throw new RangeError("Type given to setBlockType should be a textblock");
745
- let i = s.steps.length;
746
- s.doc.nodesBetween(e, t, (o, l) => {
747
- let a = typeof n == "function" ? n(o) : n;
748
- if (o.isTextblock && !o.hasMarkup(r, a) && ye(s.doc, s.mapping.slice(i).map(l), r)) {
749
- let h = null;
750
- if (r.schema.linebreakReplacement) {
751
- let d = r.whitespace == "pre", u = !!r.contentMatch.matchType(r.schema.linebreakReplacement);
752
- d && !u ? h = !1 : !d && u && (h = !0);
753
- }
754
- h === !1 && _(s, o, l, i), $(s, s.mapping.slice(i).map(l, 1), r, void 0, h === null);
755
- let p = s.mapping.slice(i), c = p.map(l, 1), f = p.map(l + o.nodeSize, 1);
756
- return s.step(new C(c, f, c + 1, f - 1, new w(g.from(r.create(a, null, o.marks)), 0, 0), 1, !0)), h === !0 && Z(s, o, l, i), !1;
757
- }
758
- });
759
- }
760
- function Z(s, e, t, r) {
761
- e.forEach((n, i) => {
762
- if (n.isText) {
763
- let o, l = /\r?\n|\r/g;
764
- for (; o = l.exec(n.text); ) {
765
- let a = s.mapping.slice(r).map(t + 1 + i + o.index);
766
- s.replaceWith(a, a + 1, e.type.schema.linebreakReplacement.create());
767
- }
768
- }
769
- });
770
- }
771
- function _(s, e, t, r) {
772
- e.forEach((n, i) => {
773
- if (n.type == n.type.schema.linebreakReplacement) {
774
- let o = s.mapping.slice(r).map(t + 1 + i);
775
- s.replaceWith(o, o + 1, e.type.schema.text(`
776
- `));
777
- }
778
- });
779
- }
780
- function ye(s, e, t) {
781
- let r = s.resolve(e), n = r.index();
782
- return r.parent.canReplaceWith(n, n + 1, t);
783
- }
784
- function ke(s, e, t, r, n) {
785
- let i = s.doc.nodeAt(e);
786
- if (!i)
787
- throw new RangeError("No node at given position");
788
- t || (t = i.type);
789
- let o = t.create(r, null, n || i.marks);
790
- if (i.isLeaf)
791
- return s.replaceWith(e, e + i.nodeSize, o);
792
- if (!t.validContent(i.content))
793
- throw new RangeError("Invalid content for node type " + t.name);
794
- s.step(new C(e, e + i.nodeSize, e + 1, e + i.nodeSize - 1, new w(g.from(o), 0, 0), 1, !0));
795
- }
796
- function Je(s, e, t = 1, r) {
797
- let n = s.resolve(e), i = n.depth - t, o = r && r[r.length - 1] || n.parent;
798
- if (i < 0 || n.parent.type.spec.isolating || !n.parent.canReplace(n.index(), n.parent.childCount) || !o.type.validContent(n.parent.content.cutByIndex(n.index(), n.parent.childCount)))
799
- return !1;
800
- for (let h = n.depth - 1, p = t - 2; h > i; h--, p--) {
801
- let c = n.node(h), f = n.index(h);
802
- if (c.type.spec.isolating)
803
- return !1;
804
- let d = c.content.cutByIndex(f, c.childCount), u = r && r[p + 1];
805
- u && (d = d.replaceChild(0, u.type.create(u.attrs)));
806
- let m = r && r[p] || c;
807
- if (!c.canReplace(f + 1, c.childCount) || !m.type.validContent(d))
808
- return !1;
809
- }
810
- let l = n.indexAfter(i), a = r && r[0];
811
- return n.node(i).canReplaceWith(l, l, a ? a.type : n.node(i + 1).type);
812
- }
813
- function ve(s, e, t = 1, r) {
814
- let n = s.doc.resolve(e), i = g.empty, o = g.empty;
815
- for (let l = n.depth, a = n.depth - t, h = t - 1; l > a; l--, h--) {
816
- i = g.from(n.node(l).copy(i));
817
- let p = r && r[h];
818
- o = g.from(p ? p.type.create(p.attrs, o) : n.node(l).copy(o));
819
- }
820
- s.step(new v(e, e, new w(i.append(o), t, t), !0));
821
- }
822
- function Ae(s, e) {
823
- let t = s.resolve(e), r = t.index();
824
- return j(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(r, r + 1);
825
- }
826
- function xe(s, e) {
827
- e.content.size || s.type.compatibleContent(e.type);
828
- let t = s.contentMatchAt(s.childCount), { linebreakReplacement: r } = s.type.schema;
829
- for (let n = 0; n < e.childCount; n++) {
830
- let i = e.child(n), o = i.type == r ? s.type.schema.nodes.text : i.type;
831
- if (t = t.matchType(o), !t || !s.type.allowsMarks(i.marks))
832
- return !1;
833
- }
834
- return t.validEnd;
835
- }
836
- function j(s, e) {
837
- return !!(s && e && !s.isLeaf && xe(s, e));
838
- }
839
- function Be(s, e, t = -1) {
840
- let r = s.resolve(e);
841
- for (let n = r.depth; ; n--) {
842
- let i, o, l = r.index(n);
843
- if (n == r.depth ? (i = r.nodeBefore, o = r.nodeAfter) : t > 0 ? (i = r.node(n + 1), l++, o = r.node(n).maybeChild(l)) : (i = r.node(n).maybeChild(l - 1), o = r.node(n + 1)), i && !i.isTextblock && j(i, o) && r.node(n).canReplace(l, l + 1))
844
- return e;
845
- if (n == 0)
846
- break;
847
- e = t < 0 ? r.before(n) : r.after(n);
848
- }
849
- }
850
- function Se(s, e, t) {
851
- let r = null, { linebreakReplacement: n } = s.doc.type.schema, i = s.doc.resolve(e - t), o = i.node().type;
852
- if (n && o.inlineContent) {
853
- let p = o.whitespace == "pre", c = !!o.contentMatch.matchType(n);
854
- p && !c ? r = !1 : !p && c && (r = !0);
855
- }
856
- let l = s.steps.length;
857
- if (r === !1) {
858
- let p = s.doc.resolve(e + t);
859
- _(s, p.node(), p.before(), l);
860
- }
861
- o.inlineContent && $(s, e + t - 1, o, i.node().contentMatchAt(i.index()), r == null);
862
- let a = s.mapping.slice(l), h = a.map(e - t);
863
- if (s.step(new v(h, a.map(e + t, -1), w.empty, !0)), r === !0) {
864
- let p = s.doc.resolve(h);
865
- Z(s, p.node(), p.before(), s.steps.length);
866
- }
867
- return s;
868
- }
869
- function be(s, e, t) {
870
- let r = s.resolve(e);
871
- if (r.parent.canReplaceWith(r.index(), r.index(), t))
872
- return e;
873
- if (r.parentOffset == 0)
874
- for (let n = r.depth - 1; n >= 0; n--) {
875
- let i = r.index(n);
876
- if (r.node(n).canReplaceWith(i, i, t))
877
- return r.before(n + 1);
878
- if (i > 0)
879
- return null;
880
- }
881
- if (r.parentOffset == r.parent.content.size)
882
- for (let n = r.depth - 1; n >= 0; n--) {
883
- let i = r.indexAfter(n);
884
- if (r.node(n).canReplaceWith(i, i, t))
885
- return r.after(n + 1);
886
- if (i < r.node(n).childCount)
887
- return null;
888
- }
889
- return null;
890
- }
891
- function We(s, e, t) {
892
- let r = s.resolve(e);
893
- if (!t.content.size)
894
- return e;
895
- let n = t.content;
896
- for (let i = 0; i < t.openStart; i++)
897
- n = n.firstChild.content;
898
- for (let i = 1; i <= (t.openStart == 0 && t.size ? 2 : 1); i++)
899
- for (let o = r.depth; o >= 0; o--) {
900
- let l = o == r.depth ? 0 : r.pos <= (r.start(o + 1) + r.end(o + 1)) / 2 ? -1 : 1, a = r.index(o) + (l > 0 ? 1 : 0), h = r.node(o), p = !1;
901
- if (i == 1)
902
- p = h.canReplace(a, a, n);
903
- else {
904
- let c = h.contentMatchAt(a).findWrapping(n.firstChild.type);
905
- p = c && h.canReplaceWith(a, a, c[0]);
906
- }
907
- if (p)
908
- return l == 0 ? r.pos : l < 0 ? r.before(o + 1) : r.after(o + 1);
909
- }
910
- return null;
911
- }
912
- function Ce(s, e, t = e, r = w.empty) {
913
- if (e == t && !r.size)
914
- return null;
915
- let n = s.resolve(e), i = s.resolve(t);
916
- return ee(n, i, r) ? new v(e, t, r) : new Me(n, i, r).fit();
917
- }
918
- function ee(s, e, t) {
919
- return !t.openStart && !t.openEnd && s.start() == e.start() && s.parent.canReplace(s.index(), e.index(), t.content);
920
- }
921
- class Me {
922
- constructor(e, t, r) {
923
- this.$from = e, this.$to = t, this.unplaced = r, this.frontier = [], this.placed = g.empty;
924
- for (let n = 0; n <= e.depth; n++) {
925
- let i = e.node(n);
926
- this.frontier.push({
927
- type: i.type,
928
- match: i.contentMatchAt(e.indexAfter(n))
929
- });
930
- }
931
- for (let n = e.depth; n > 0; n--)
932
- this.placed = g.from(e.node(n).copy(this.placed));
933
- }
934
- get depth() {
935
- return this.frontier.length - 1;
936
- }
937
- fit() {
938
- for (; this.unplaced.size; ) {
939
- let h = this.findFittable();
940
- h ? this.placeNodes(h) : this.openMore() || this.dropNode();
941
- }
942
- let e = this.mustMoveInline(), t = this.placed.size - this.depth - this.$from.depth, r = this.$from, n = this.close(e < 0 ? this.$to : r.doc.resolve(e));
943
- if (!n)
944
- return null;
945
- let i = this.placed, o = r.depth, l = n.depth;
946
- for (; o && l && i.childCount == 1; )
947
- i = i.firstChild.content, o--, l--;
948
- let a = new w(i, o, l);
949
- return e > -1 ? new C(r.pos, e, this.$to.pos, this.$to.end(), a, t) : a.size || r.pos != this.$to.pos ? new v(r.pos, n.pos, a) : null;
950
- }
951
- // Find a position on the start spine of `this.unplaced` that has
952
- // content that can be moved somewhere on the frontier. Returns two
953
- // depths, one for the slice and one for the frontier.
954
- findFittable() {
955
- let e = this.unplaced.openStart;
956
- for (let t = this.unplaced.content, r = 0, n = this.unplaced.openEnd; r < e; r++) {
957
- let i = t.firstChild;
958
- if (t.childCount > 1 && (n = 0), i.type.spec.isolating && n <= r) {
959
- e = r;
960
- break;
961
- }
962
- t = i.content;
963
- }
964
- for (let t = 1; t <= 2; t++)
965
- for (let r = t == 1 ? e : this.unplaced.openStart; r >= 0; r--) {
966
- let n, i = null;
967
- r ? (i = W(this.unplaced.content, r - 1).firstChild, n = i.content) : n = this.unplaced.content;
968
- let o = n.firstChild;
969
- for (let l = this.depth; l >= 0; l--) {
970
- let { type: a, match: h } = this.frontier[l], p, c = null;
971
- if (t == 1 && (o ? h.matchType(o.type) || (c = h.fillBefore(g.from(o), !1)) : i && a.compatibleContent(i.type)))
972
- return { sliceDepth: r, frontierDepth: l, parent: i, inject: c };
973
- if (t == 2 && o && (p = h.findWrapping(o.type)))
974
- return { sliceDepth: r, frontierDepth: l, parent: i, wrap: p };
975
- if (i && h.matchType(i.type))
976
- break;
977
- }
978
- }
979
- }
980
- openMore() {
981
- let { content: e, openStart: t, openEnd: r } = this.unplaced, n = W(e, t);
982
- return !n.childCount || n.firstChild.isLeaf ? !1 : (this.unplaced = new w(e, t + 1, Math.max(r, n.size + t >= e.size - r ? t + 1 : 0)), !0);
983
- }
984
- dropNode() {
985
- let { content: e, openStart: t, openEnd: r } = this.unplaced, n = W(e, t);
986
- if (n.childCount <= 1 && t > 0) {
987
- let i = e.size - t <= t + n.size;
988
- this.unplaced = new w(O(e, t - 1, 1), t - 1, i ? t - 1 : r);
989
- } else
990
- this.unplaced = new w(O(e, t, 1), t, r);
991
- }
992
- // Move content from the unplaced slice at `sliceDepth` to the
993
- // frontier node at `frontierDepth`. Close that frontier node when
994
- // applicable.
995
- placeNodes({ sliceDepth: e, frontierDepth: t, parent: r, inject: n, wrap: i }) {
996
- for (; this.depth > t; )
997
- this.closeFrontierNode();
998
- if (i)
999
- for (let m = 0; m < i.length; m++)
1000
- this.openFrontierNode(i[m]);
1001
- let o = this.unplaced, l = r ? r.content : o.content, a = o.openStart - e, h = 0, p = [], { match: c, type: f } = this.frontier[t];
1002
- if (n) {
1003
- for (let m = 0; m < n.childCount; m++)
1004
- p.push(n.child(m));
1005
- c = c.matchFragment(n);
1006
- }
1007
- let d = l.size + e - (o.content.size - o.openEnd);
1008
- for (; h < l.childCount; ) {
1009
- let m = l.child(h), x = c.matchType(m.type);
1010
- if (!x)
1011
- break;
1012
- h++, (h > 1 || a == 0 || m.content.size) && (c = x, p.push(te(m.mark(f.allowedMarks(m.marks)), h == 1 ? a : 0, h == l.childCount ? d : -1)));
1013
- }
1014
- let u = h == l.childCount;
1015
- u || (d = -1), this.placed = F(this.placed, t, g.from(p)), this.frontier[t].match = c, u && d < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
1016
- for (let m = 0, x = l; m < d; m++) {
1017
- let I = x.lastChild;
1018
- this.frontier.push({ type: I.type, match: I.contentMatchAt(I.childCount) }), x = I.content;
1019
- }
1020
- this.unplaced = u ? e == 0 ? w.empty : new w(O(o.content, e - 1, 1), e - 1, d < 0 ? o.openEnd : e - 1) : new w(O(o.content, e, h), o.openStart, o.openEnd);
1021
- }
1022
- mustMoveInline() {
1023
- if (!this.$to.parent.isTextblock)
1024
- return -1;
1025
- let e = this.frontier[this.depth], t;
1026
- if (!e.type.isTextblock || !D(this.$to, this.$to.depth, e.type, e.match, !1) || this.$to.depth == this.depth && (t = this.findCloseLevel(this.$to)) && t.depth == this.depth)
1027
- return -1;
1028
- let { depth: r } = this.$to, n = this.$to.after(r);
1029
- for (; r > 1 && n == this.$to.end(--r); )
1030
- ++n;
1031
- return n;
1032
- }
1033
- findCloseLevel(e) {
1034
- e: for (let t = Math.min(this.depth, e.depth); t >= 0; t--) {
1035
- let { match: r, type: n } = this.frontier[t], i = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o = D(e, t, n, r, i);
1036
- if (o) {
1037
- for (let l = t - 1; l >= 0; l--) {
1038
- let { match: a, type: h } = this.frontier[l], p = D(e, l, h, a, !0);
1039
- if (!p || p.childCount)
1040
- continue e;
1041
- }
1042
- return { depth: t, fit: o, move: i ? e.doc.resolve(e.after(t + 1)) : e };
1043
- }
1044
- }
1045
- }
1046
- close(e) {
1047
- let t = this.findCloseLevel(e);
1048
- if (!t)
1049
- return null;
1050
- for (; this.depth > t.depth; )
1051
- this.closeFrontierNode();
1052
- t.fit.childCount && (this.placed = F(this.placed, t.depth, t.fit)), e = t.move;
1053
- for (let r = t.depth + 1; r <= e.depth; r++) {
1054
- let n = e.node(r), i = n.type.contentMatch.fillBefore(n.content, !0, e.index(r));
1055
- this.openFrontierNode(n.type, n.attrs, i);
1056
- }
1057
- return e;
1058
- }
1059
- openFrontierNode(e, t = null, r) {
1060
- let n = this.frontier[this.depth];
1061
- n.match = n.match.matchType(e), this.placed = F(this.placed, this.depth, g.from(e.create(t, r))), this.frontier.push({ type: e, match: e.contentMatch });
1062
- }
1063
- closeFrontierNode() {
1064
- let t = this.frontier.pop().match.fillBefore(g.empty, !0);
1065
- t.childCount && (this.placed = F(this.placed, this.frontier.length, t));
1066
- }
1067
- }
1068
- function O(s, e, t) {
1069
- return e == 0 ? s.cutByIndex(t, s.childCount) : s.replaceChild(0, s.firstChild.copy(O(s.firstChild.content, e - 1, t)));
1070
- }
1071
- function F(s, e, t) {
1072
- return e == 0 ? s.append(t) : s.replaceChild(s.childCount - 1, s.lastChild.copy(F(s.lastChild.content, e - 1, t)));
1073
- }
1074
- function W(s, e) {
1075
- for (let t = 0; t < e; t++)
1076
- s = s.firstChild.content;
1077
- return s;
1078
- }
1079
- function te(s, e, t) {
1080
- if (e <= 0)
1081
- return s;
1082
- let r = s.content;
1083
- return e > 1 && (r = r.replaceChild(0, te(r.firstChild, e - 1, r.childCount == 1 ? t - 1 : 0))), e > 0 && (r = s.type.contentMatch.fillBefore(r).append(r), t <= 0 && (r = r.append(s.type.contentMatch.matchFragment(r).fillBefore(g.empty, !0)))), s.copy(r);
1084
- }
1085
- function D(s, e, t, r, n) {
1086
- let i = s.node(e), o = n ? s.indexAfter(e) : s.index(e);
1087
- if (o == i.childCount && !t.compatibleContent(i.type))
1088
- return null;
1089
- let l = r.fillBefore(i.content, !0, o);
1090
- return l && !Ne(t, i.content, o) ? l : null;
1091
- }
1092
- function Ne(s, e, t) {
1093
- for (let r = t; r < e.childCount; r++)
1094
- if (!s.allowsMarks(e.child(r).marks))
1095
- return !0;
1096
- return !1;
1097
- }
1098
- function Ie(s) {
1099
- return s.spec.defining || s.spec.definingForContent;
1100
- }
1101
- function Re(s, e, t, r) {
1102
- if (!r.size)
1103
- return s.deleteRange(e, t);
1104
- let n = s.doc.resolve(e), i = s.doc.resolve(t);
1105
- if (ee(n, i, r))
1106
- return s.step(new v(e, t, r));
1107
- let o = ne(n, i);
1108
- o[o.length - 1] == 0 && o.pop();
1109
- let l = -(n.depth + 1);
1110
- o.unshift(l);
1111
- for (let f = n.depth, d = n.pos - 1; f > 0; f--, d--) {
1112
- let u = n.node(f).type.spec;
1113
- if (u.defining || u.definingAsContext || u.isolating)
1114
- break;
1115
- o.indexOf(f) > -1 ? l = f : n.before(f) == d && o.splice(1, 0, -f);
1116
- }
1117
- let a = o.indexOf(l), h = [], p = r.openStart;
1118
- for (let f = r.content, d = 0; ; d++) {
1119
- let u = f.firstChild;
1120
- if (h.push(u), d == r.openStart)
1121
- break;
1122
- f = u.content;
1123
- }
1124
- for (let f = p - 1; f >= 0; f--) {
1125
- let d = h[f], u = Ie(d.type);
1126
- if (u && !d.sameMarkup(n.node(Math.abs(l) - 1)))
1127
- p = f;
1128
- else if (u || !d.type.isTextblock)
1129
- break;
1130
- }
1131
- for (let f = r.openStart; f >= 0; f--) {
1132
- let d = (f + p + 1) % (r.openStart + 1), u = h[d];
1133
- if (u)
1134
- for (let m = 0; m < o.length; m++) {
1135
- let x = o[(m + a) % o.length], I = !0;
1136
- x < 0 && (I = !1, x = -x);
1137
- let ie = n.node(x - 1), G = n.index(x - 1);
1138
- if (ie.canReplaceWith(G, G, u.type, u.marks))
1139
- return s.replace(n.before(x), I ? i.after(x) : t, new w(re(r.content, 0, r.openStart, d), d, r.openEnd));
1140
- }
1141
- }
1142
- let c = s.steps.length;
1143
- for (let f = o.length - 1; f >= 0 && (s.replace(e, t, r), !(s.steps.length > c)); f--) {
1144
- let d = o[f];
1145
- d < 0 || (e = n.before(d), t = i.after(d));
1146
- }
1147
- }
1148
- function re(s, e, t, r, n) {
1149
- if (e < t) {
1150
- let i = s.firstChild;
1151
- s = s.replaceChild(0, i.copy(re(i.content, e + 1, t, r, i)));
1152
- }
1153
- if (e > r) {
1154
- let i = n.contentMatchAt(0), o = i.fillBefore(s).append(s);
1155
- s = o.append(i.matchFragment(o).fillBefore(g.empty, !0));
1156
- }
1157
- return s;
1158
- }
1159
- function Ee(s, e, t, r) {
1160
- if (!r.isInline && e == t && s.doc.resolve(e).parent.content.size) {
1161
- let n = be(s.doc, e, r.type);
1162
- n != null && (e = t = n);
1163
- }
1164
- s.replaceRange(e, t, new w(g.from(r), 0, 0));
1165
- }
1166
- function Te(s, e, t) {
1167
- let r = s.doc.resolve(e), n = s.doc.resolve(t), i = ne(r, n);
1168
- for (let o = 0; o < i.length; o++) {
1169
- let l = i[o], a = o == i.length - 1;
1170
- if (a && l == 0 || r.node(l).type.contentMatch.validEnd)
1171
- return s.delete(r.start(l), n.end(l));
1172
- if (l > 0 && (a || r.node(l - 1).canReplace(r.index(l - 1), n.indexAfter(l - 1))))
1173
- return s.delete(r.before(l), n.after(l));
1174
- }
1175
- for (let o = 1; o <= r.depth && o <= n.depth; o++)
1176
- if (e - r.start(o) == r.depth - o && t > r.end(o) && n.end(o) - t != n.depth - o && r.start(o - 1) == n.start(o - 1) && r.node(o - 1).canReplace(r.index(o - 1), n.index(o - 1)))
1177
- return s.delete(r.before(o), t);
1178
- s.delete(e, t);
1179
- }
1180
- function ne(s, e) {
1181
- let t = [], r = Math.min(s.depth, e.depth);
1182
- for (let n = r; n >= 0; n--) {
1183
- let i = s.start(n);
1184
- if (i < s.pos - (s.depth - n) || e.end(n) > e.pos + (e.depth - n) || s.node(n).type.spec.isolating || e.node(n).type.spec.isolating)
1185
- break;
1186
- (i == e.start(n) || n == s.depth && n == e.depth && s.parent.inlineContent && e.parent.inlineContent && n && e.start(n - 1) == i - 1) && t.push(n);
1187
- }
1188
- return t;
1189
- }
1190
- class E extends k {
1191
- /**
1192
- Construct an attribute step.
1193
- */
1194
- constructor(e, t, r) {
1195
- super(), this.pos = e, this.attr = t, this.value = r;
1196
- }
1197
- apply(e) {
1198
- let t = e.nodeAt(this.pos);
1199
- if (!t)
1200
- return y.fail("No node at attribute step's position");
1201
- let r = /* @__PURE__ */ Object.create(null);
1202
- for (let i in t.attrs)
1203
- r[i] = t.attrs[i];
1204
- r[this.attr] = this.value;
1205
- let n = t.type.create(r, null, t.marks);
1206
- return y.fromReplace(e, this.pos, this.pos + 1, new w(g.from(n), 0, t.isLeaf ? 0 : 1));
1207
- }
1208
- getMap() {
1209
- return S.empty;
1210
- }
1211
- invert(e) {
1212
- return new E(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
1213
- }
1214
- map(e) {
1215
- let t = e.mapResult(this.pos, 1);
1216
- return t.deletedAfter ? null : new E(t.pos, this.attr, this.value);
1217
- }
1218
- toJSON() {
1219
- return { stepType: "attr", pos: this.pos, attr: this.attr, value: this.value };
1220
- }
1221
- static fromJSON(e, t) {
1222
- if (typeof t.pos != "number" || typeof t.attr != "string")
1223
- throw new RangeError("Invalid input for AttrStep.fromJSON");
1224
- return new E(t.pos, t.attr, t.value);
1225
- }
1226
- }
1227
- k.jsonID("attr", E);
1228
- class z extends k {
1229
- /**
1230
- Construct an attribute step.
1231
- */
1232
- constructor(e, t) {
1233
- super(), this.attr = e, this.value = t;
1234
- }
1235
- apply(e) {
1236
- let t = /* @__PURE__ */ Object.create(null);
1237
- for (let n in e.attrs)
1238
- t[n] = e.attrs[n];
1239
- t[this.attr] = this.value;
1240
- let r = e.type.create(t, e.content, e.marks);
1241
- return y.ok(r);
1242
- }
1243
- getMap() {
1244
- return S.empty;
1245
- }
1246
- invert(e) {
1247
- return new z(this.attr, e.attrs[this.attr]);
1248
- }
1249
- map(e) {
1250
- return this;
1251
- }
1252
- toJSON() {
1253
- return { stepType: "docAttr", attr: this.attr, value: this.value };
1254
- }
1255
- static fromJSON(e, t) {
1256
- if (typeof t.attr != "string")
1257
- throw new RangeError("Invalid input for DocAttrStep.fromJSON");
1258
- return new z(t.attr, t.value);
1259
- }
1260
- }
1261
- k.jsonID("docAttr", z);
1262
- let T = class extends Error {
1263
- };
1264
- T = function s(e) {
1265
- let t = Error.call(this, e);
1266
- return t.__proto__ = s.prototype, t;
1267
- };
1268
- T.prototype = Object.create(Error.prototype);
1269
- T.prototype.constructor = T;
1270
- T.prototype.name = "TransformError";
1271
- class De {
1272
- /**
1273
- Create a transform that starts with the given document.
1274
- */
1275
- constructor(e) {
1276
- this.doc = e, this.steps = [], this.docs = [], this.mapping = new A();
1277
- }
1278
- /**
1279
- The starting document.
1280
- */
1281
- get before() {
1282
- return this.docs.length ? this.docs[0] : this.doc;
1283
- }
1284
- /**
1285
- Apply a new step in this transform, saving the result. Throws an
1286
- error when the step fails.
1287
- */
1288
- step(e) {
1289
- let t = this.maybeStep(e);
1290
- if (t.failed)
1291
- throw new T(t.failed);
1292
- return this;
1293
- }
1294
- /**
1295
- Try to apply a step in this transformation, ignoring it if it
1296
- fails. Returns the step result.
1297
- */
1298
- maybeStep(e) {
1299
- let t = e.apply(this.doc);
1300
- return t.failed || this.addStep(e, t.doc), t;
1301
- }
1302
- /**
1303
- True when the document has been changed (when there are any
1304
- steps).
1305
- */
1306
- get docChanged() {
1307
- return this.steps.length > 0;
1308
- }
1309
- /**
1310
- @internal
1311
- */
1312
- addStep(e, t) {
1313
- this.docs.push(this.doc), this.steps.push(e), this.mapping.appendMap(e.getMap()), this.doc = t;
1314
- }
1315
- /**
1316
- Replace the part of the document between `from` and `to` with the
1317
- given `slice`.
1318
- */
1319
- replace(e, t = e, r = w.empty) {
1320
- let n = Ce(this.doc, e, t, r);
1321
- return n && this.step(n), this;
1322
- }
1323
- /**
1324
- Replace the given range with the given content, which may be a
1325
- fragment, node, or array of nodes.
1326
- */
1327
- replaceWith(e, t, r) {
1328
- return this.replace(e, t, new w(g.from(r), 0, 0));
1329
- }
1330
- /**
1331
- Delete the content between the given positions.
1332
- */
1333
- delete(e, t) {
1334
- return this.replace(e, t, w.empty);
1335
- }
1336
- /**
1337
- Insert the given content at the given position.
1338
- */
1339
- insert(e, t) {
1340
- return this.replaceWith(e, e, t);
1341
- }
1342
- /**
1343
- Replace a range of the document with a given slice, using
1344
- `from`, `to`, and the slice's
1345
- [`openStart`](https://prosemirror.net/docs/ref/#model.Slice.openStart) property as hints, rather
1346
- than fixed start and end points. This method may grow the
1347
- replaced area or close open nodes in the slice in order to get a
1348
- fit that is more in line with WYSIWYG expectations, by dropping
1349
- fully covered parent nodes of the replaced region when they are
1350
- marked [non-defining as
1351
- context](https://prosemirror.net/docs/ref/#model.NodeSpec.definingAsContext), or including an
1352
- open parent node from the slice that _is_ marked as [defining
1353
- its content](https://prosemirror.net/docs/ref/#model.NodeSpec.definingForContent).
1354
-
1355
- This is the method, for example, to handle paste. The similar
1356
- [`replace`](https://prosemirror.net/docs/ref/#transform.Transform.replace) method is a more
1357
- primitive tool which will _not_ move the start and end of its given
1358
- range, and is useful in situations where you need more precise
1359
- control over what happens.
1360
- */
1361
- replaceRange(e, t, r) {
1362
- return Re(this, e, t, r), this;
1363
- }
1364
- /**
1365
- Replace the given range with a node, but use `from` and `to` as
1366
- hints, rather than precise positions. When from and to are the same
1367
- and are at the start or end of a parent node in which the given
1368
- node doesn't fit, this method may _move_ them out towards a parent
1369
- that does allow the given node to be placed. When the given range
1370
- completely covers a parent node, this method may completely replace
1371
- that parent node.
1372
- */
1373
- replaceRangeWith(e, t, r) {
1374
- return Ee(this, e, t, r), this;
1375
- }
1376
- /**
1377
- Delete the given range, expanding it to cover fully covered
1378
- parent nodes until a valid replace is found.
1379
- */
1380
- deleteRange(e, t) {
1381
- return Te(this, e, t), this;
1382
- }
1383
- /**
1384
- Split the content in the given range off from its parent, if there
1385
- is sibling content before or after it, and move it up the tree to
1386
- the depth specified by `target`. You'll probably want to use
1387
- [`liftTarget`](https://prosemirror.net/docs/ref/#transform.liftTarget) to compute `target`, to make
1388
- sure the lift is valid.
1389
- */
1390
- lift(e, t) {
1391
- return de(this, e, t), this;
1392
- }
1393
- /**
1394
- Join the blocks around the given position. If depth is 2, their
1395
- last and first siblings are also joined, and so on.
1396
- */
1397
- join(e, t = 1) {
1398
- return Se(this, e, t), this;
1399
- }
1400
- /**
1401
- Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.
1402
- The wrappers are assumed to be valid in this position, and should
1403
- probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).
1404
- */
1405
- wrap(e, t) {
1406
- return we(this, e, t), this;
1407
- }
1408
- /**
1409
- Set the type of all textblocks (partly) between `from` and `to` to
1410
- the given node type with the given attributes.
1411
- */
1412
- setBlockType(e, t = e, r, n = null) {
1413
- return ge(this, e, t, r, n), this;
1414
- }
1415
- /**
1416
- Change the type, attributes, and/or marks of the node at `pos`.
1417
- When `type` isn't given, the existing node type is preserved,
1418
- */
1419
- setNodeMarkup(e, t, r = null, n) {
1420
- return ke(this, e, t, r, n), this;
1421
- }
1422
- /**
1423
- Set a single attribute on a given node to a new value.
1424
- The `pos` addresses the document content. Use `setDocAttribute`
1425
- to set attributes on the document itself.
1426
- */
1427
- setNodeAttribute(e, t, r) {
1428
- return this.step(new E(e, t, r)), this;
1429
- }
1430
- /**
1431
- Set a single attribute on the document to a new value.
1432
- */
1433
- setDocAttribute(e, t) {
1434
- return this.step(new z(e, t)), this;
1435
- }
1436
- /**
1437
- Add a mark to the node at position `pos`.
1438
- */
1439
- addNodeMark(e, t) {
1440
- return this.step(new N(e, t)), this;
1441
- }
1442
- /**
1443
- Remove a mark (or all marks of the given type) from the node at
1444
- position `pos`.
1445
- */
1446
- removeNodeMark(e, t) {
1447
- let r = this.doc.nodeAt(e);
1448
- if (!r)
1449
- throw new RangeError("No node at position " + e);
1450
- if (t instanceof se)
1451
- t.isInSet(r.marks) && this.step(new R(e, t));
1452
- else {
1453
- let n = r.marks, i, o = [];
1454
- for (; i = t.isInSet(n); )
1455
- o.push(new R(e, i)), n = i.removeFromSet(n);
1456
- for (let l = o.length - 1; l >= 0; l--)
1457
- this.step(o[l]);
1458
- }
1459
- return this;
1460
- }
1461
- /**
1462
- Split the node at the given position, and optionally, if `depth` is
1463
- greater than one, any number of nodes above that. By default, the
1464
- parts split off will inherit the node type of the original node.
1465
- This can be changed by passing an array of types and attributes to
1466
- use after the split (with the outermost nodes coming first).
1467
- */
1468
- split(e, t = 1, r) {
1469
- return ve(this, e, t, r), this;
1470
- }
1471
- /**
1472
- Add the given mark to the inline content between `from` and `to`.
1473
- */
1474
- addMark(e, t, r) {
1475
- return pe(this, e, t, r), this;
1476
- }
1477
- /**
1478
- Remove marks from inline nodes between `from` and `to`. When
1479
- `mark` is a single mark, remove precisely that mark. When it is
1480
- a mark type, remove all marks of that type. When it is null,
1481
- remove all marks of any type.
1482
- */
1483
- removeMark(e, t, r) {
1484
- return fe(this, e, t, r), this;
1485
- }
1486
- /**
1487
- Removes all marks and nodes from the content of the node at
1488
- `pos` that don't match the given new parent node type. Accepts
1489
- an optional starting [content match](https://prosemirror.net/docs/ref/#model.ContentMatch) as
1490
- third argument.
1491
- */
1492
- clearIncompatible(e, t, r) {
1493
- return $(this, e, t, r), this;
1494
- }
1495
- }
1496
- export {
1497
- M as AddMarkStep,
1498
- N as AddNodeMarkStep,
1499
- E as AttrStep,
1500
- z as DocAttrStep,
1501
- L as MapResult,
1502
- A as Mapping,
1503
- b as RemoveMarkStep,
1504
- R as RemoveNodeMarkStep,
1505
- C as ReplaceAroundStep,
1506
- v as ReplaceStep,
1507
- k as Step,
1508
- S as StepMap,
1509
- y as StepResult,
1510
- De as Transform,
1511
- T as TransformError,
1512
- Ae as canJoin,
1513
- Je as canSplit,
1514
- We as dropPoint,
1515
- ze as findWrapping,
1516
- be as insertPoint,
1517
- Be as joinPoint,
1518
- Fe as liftTarget,
1519
- Ce as replaceStep
1520
- };