@lotte-innovate/ui-component-test 0.1.76 → 0.1.78

Sign up to get free protection for your applications and to get access to all the features.
Files changed (574) hide show
  1. package/README.md +9 -11
  2. package/dist/globals.css +2 -2
  3. package/dist/lib/_virtual/index.mjs +1 -1
  4. package/dist/lib/_virtual/index2.mjs +1 -1
  5. package/dist/lib/_virtual/index3.mjs +1 -1
  6. package/dist/lib/_virtual/react-is.development.mjs +2 -0
  7. package/dist/lib/_virtual/react-is.development.mjs.map +1 -0
  8. package/dist/lib/_virtual/react-is.production.min.mjs +2 -0
  9. package/dist/lib/_virtual/react-is.production.min.mjs.map +1 -0
  10. package/dist/lib/components/Editor/index.d.ts +10 -5
  11. package/dist/lib/components/Editor/index.js +50 -6
  12. package/dist/lib/components/Footer/index.js +8 -1
  13. package/dist/lib/components/Gnb/GnbInfo.js +1 -0
  14. package/dist/lib/components/Gnb/GnbLogo.js +3 -4
  15. package/dist/lib/components/Gnb/GnbMenu.js +1 -0
  16. package/dist/lib/components/Gnb/GnbRoot.js +4 -2
  17. package/dist/lib/components/Grid/Pagination.d.ts +2 -0
  18. package/dist/lib/components/Grid/Pagination.js +17 -0
  19. package/dist/lib/components/Grid/index.d.ts +1 -2
  20. package/dist/lib/components/Grid/index.js +40 -47
  21. package/dist/lib/components/Grid/useGrid.d.ts +1 -1
  22. package/dist/lib/components/Grid/useGrid.js +19 -11
  23. package/dist/lib/components/Slider/index.d.ts +2 -1
  24. package/dist/lib/components/index.d.ts +2 -1
  25. package/dist/lib/components/index.js +3 -1
  26. package/dist/lib/dist/lib/components/BarChart/index.mjs.map +1 -1
  27. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbEllipsis.mjs.map +1 -1
  28. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbItem.mjs.map +1 -1
  29. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs.map +1 -1
  30. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbList.mjs.map +1 -1
  31. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs.map +1 -1
  32. package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbSeparator.mjs.map +1 -1
  33. package/dist/lib/dist/lib/components/BubbleChart/index.mjs.map +1 -1
  34. package/dist/lib/dist/lib/components/ContextMenu/ContextMenuGroup.mjs.map +1 -1
  35. package/dist/lib/dist/lib/components/ContextMenu/ContextMenuSeparator.mjs.map +1 -1
  36. package/dist/lib/dist/lib/components/ContextMenu/ContextMenuTrigger.mjs.map +1 -1
  37. package/dist/lib/dist/lib/components/Dialog/DialogTrigger.mjs.map +1 -1
  38. package/dist/lib/dist/lib/components/DoughnutChart/index.mjs.map +1 -1
  39. package/dist/lib/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.mjs.map +1 -1
  40. package/dist/lib/dist/lib/components/DropdownMenu/DropdownMenuSeparator.mjs.map +1 -1
  41. package/dist/lib/dist/lib/components/DropdownMenu/DropdownMenuSub.mjs.map +1 -1
  42. package/dist/lib/dist/lib/components/Editor/index.mjs +1 -1
  43. package/dist/lib/dist/lib/components/Footer/index.mjs +1 -1
  44. package/dist/lib/dist/lib/components/Gnb/GnbInfo.mjs +1 -0
  45. package/dist/lib/dist/lib/components/Gnb/GnbInfo.mjs.map +1 -1
  46. package/dist/lib/dist/lib/components/Gnb/GnbLogo.mjs +1 -1
  47. package/dist/lib/dist/lib/components/Gnb/GnbLogo.mjs.map +1 -1
  48. package/dist/lib/dist/lib/components/Gnb/GnbMenu.mjs +2 -1
  49. package/dist/lib/dist/lib/components/Gnb/GnbMenu.mjs.map +1 -1
  50. package/dist/lib/dist/lib/components/Gnb/GnbRoot.mjs +1 -1
  51. package/dist/lib/dist/lib/components/Grid/Pagination.mjs +2 -0
  52. package/dist/lib/dist/lib/components/Grid/Pagination.mjs.map +1 -0
  53. package/dist/lib/dist/lib/components/Grid/index.mjs +3 -0
  54. package/dist/lib/dist/lib/components/Grid/index.mjs.map +1 -0
  55. package/dist/lib/dist/lib/components/Grid/useGrid.mjs +3 -0
  56. package/dist/lib/dist/lib/components/Grid/useGrid.mjs.map +1 -0
  57. package/dist/lib/dist/lib/components/HoverCard/HoverCardTrigger.mjs.map +1 -1
  58. package/dist/lib/dist/lib/components/LineChart/index.mjs.map +1 -1
  59. package/dist/lib/dist/lib/components/Menubar/MenubarMenu.mjs.map +1 -1
  60. package/dist/lib/dist/lib/components/Menubar/MenubarSeparator.mjs.map +1 -1
  61. package/dist/lib/dist/lib/components/Menubar/MenubarSub.mjs.map +1 -1
  62. package/dist/lib/dist/lib/components/NavigationMenu/NavigationMenuIndicator.mjs.map +1 -1
  63. package/dist/lib/dist/lib/components/NavigationMenu/NavigationMenuItem.mjs.map +1 -1
  64. package/dist/lib/dist/lib/components/PieChart/index.mjs.map +1 -1
  65. package/dist/lib/dist/lib/components/Popover/PopoverTrigger.mjs.map +1 -1
  66. package/dist/lib/dist/lib/components/RadarChart/index.mjs.map +1 -1
  67. package/dist/lib/dist/lib/components/SegmentedControl/SegmentedControlItem.mjs.map +1 -1
  68. package/dist/lib/dist/lib/constants.mjs +1 -1
  69. package/dist/lib/dist/lib/constants.mjs.map +1 -1
  70. package/dist/lib/dist/lib/index.mjs +1 -1
  71. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/ScriptLoader2.mjs +2 -0
  72. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/ScriptLoader2.mjs.map +1 -0
  73. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/TinyMCE.mjs +2 -0
  74. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/TinyMCE.mjs.map +1 -0
  75. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/Utils.mjs +2 -0
  76. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/Utils.mjs.map +1 -0
  77. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.mjs +2 -0
  78. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.mjs.map +1 -0
  79. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/EditorPropTypes.mjs +2 -0
  80. package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/EditorPropTypes.mjs.map +1 -0
  81. package/dist/lib/node_modules/marked/lib/marked.esm.mjs +2 -0
  82. package/dist/lib/node_modules/marked/lib/marked.esm.mjs.map +1 -0
  83. package/dist/lib/node_modules/object-assign/index.mjs +7 -0
  84. package/dist/lib/node_modules/object-assign/index.mjs.map +1 -0
  85. package/dist/lib/node_modules/prop-types/checkPropTypes.mjs +2 -0
  86. package/dist/lib/node_modules/prop-types/checkPropTypes.mjs.map +1 -0
  87. package/dist/lib/node_modules/prop-types/factoryWithThrowingShims.mjs +2 -0
  88. package/dist/lib/node_modules/prop-types/factoryWithThrowingShims.mjs.map +1 -0
  89. package/dist/lib/node_modules/prop-types/factoryWithTypeCheckers.mjs +2 -0
  90. package/dist/lib/node_modules/prop-types/factoryWithTypeCheckers.mjs.map +1 -0
  91. package/dist/lib/node_modules/prop-types/index.mjs +2 -0
  92. package/dist/lib/node_modules/prop-types/index.mjs.map +1 -0
  93. package/dist/lib/node_modules/prop-types/lib/ReactPropTypesSecret.mjs +2 -0
  94. package/dist/lib/node_modules/prop-types/lib/ReactPropTypesSecret.mjs.map +1 -0
  95. package/dist/lib/node_modules/prop-types/lib/has.mjs +2 -0
  96. package/dist/lib/node_modules/prop-types/lib/has.mjs.map +1 -0
  97. package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.mjs +10 -0
  98. package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.mjs.map +1 -0
  99. package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.mjs +10 -0
  100. package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.mjs.map +1 -0
  101. package/dist/lib/node_modules/prop-types/node_modules/react-is/index.mjs +2 -0
  102. package/dist/lib/node_modules/prop-types/node_modules/react-is/index.mjs.map +1 -0
  103. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  104. package/dist/lib/types.d.ts +2 -1
  105. package/dist/tsconfig.tsbuildinfo +1 -1
  106. package/package.json +7 -6
  107. package/public/tinymce/CHANGELOG.md +3453 -0
  108. package/public/tinymce/README.md +73 -0
  109. package/public/tinymce/bower.json +27 -0
  110. package/public/tinymce/composer.json +52 -0
  111. package/public/tinymce/icons/default/icons.js +194 -0
  112. package/public/tinymce/icons/default/icons.min.js +1 -0
  113. package/public/tinymce/icons/default/index.js +7 -0
  114. package/public/tinymce/license.txt +21 -0
  115. package/public/tinymce/models/dom/index.js +7 -0
  116. package/public/tinymce/models/dom/model.js +8040 -0
  117. package/public/tinymce/models/dom/model.min.js +4 -0
  118. package/public/tinymce/package.json +32 -0
  119. package/public/tinymce/plugins/advlist/index.js +7 -0
  120. package/public/tinymce/plugins/advlist/plugin.js +259 -0
  121. package/public/tinymce/plugins/advlist/plugin.min.js +4 -0
  122. package/public/tinymce/plugins/autolink/index.js +7 -0
  123. package/public/tinymce/plugins/autolink/plugin.js +228 -0
  124. package/public/tinymce/plugins/autolink/plugin.min.js +4 -0
  125. package/public/tinymce/plugins/code/index.js +7 -0
  126. package/public/tinymce/plugins/code/plugin.js +85 -0
  127. package/public/tinymce/plugins/code/plugin.min.js +4 -0
  128. package/public/tinymce/plugins/codesample/index.js +7 -0
  129. package/public/tinymce/plugins/codesample/plugin.js +2463 -0
  130. package/public/tinymce/plugins/codesample/plugin.min.js +4 -0
  131. package/public/tinymce/plugins/image/index.js +7 -0
  132. package/public/tinymce/plugins/image/plugin.js +1505 -0
  133. package/public/tinymce/plugins/image/plugin.min.js +4 -0
  134. package/public/tinymce/plugins/link/index.js +7 -0
  135. package/public/tinymce/plugins/link/plugin.js +1242 -0
  136. package/public/tinymce/plugins/link/plugin.min.js +4 -0
  137. package/public/tinymce/plugins/lists/index.js +7 -0
  138. package/public/tinymce/plugins/lists/plugin.js +2172 -0
  139. package/public/tinymce/plugins/lists/plugin.min.js +4 -0
  140. package/public/tinymce/plugins/table/index.js +7 -0
  141. package/public/tinymce/plugins/table/plugin.js +3462 -0
  142. package/public/tinymce/plugins/table/plugin.min.js +4 -0
  143. package/public/tinymce/skins/content/dark/content.css +66 -0
  144. package/public/tinymce/skins/content/dark/content.js +2 -0
  145. package/public/tinymce/skins/content/dark/content.min.css +1 -0
  146. package/public/tinymce/skins/content/default/content.css +61 -0
  147. package/public/tinymce/skins/content/default/content.js +2 -0
  148. package/public/tinymce/skins/content/default/content.min.css +1 -0
  149. package/public/tinymce/skins/content/document/content.js +2 -0
  150. package/public/tinymce/skins/content/document/content.min.css +1 -0
  151. package/public/tinymce/skins/content/tinymce-5/content.js +2 -0
  152. package/public/tinymce/skins/content/tinymce-5/content.min.css +1 -0
  153. package/public/tinymce/skins/content/tinymce-5-dark/content.js +2 -0
  154. package/public/tinymce/skins/content/tinymce-5-dark/content.min.css +1 -0
  155. package/public/tinymce/skins/content/writer/content.js +2 -0
  156. package/public/tinymce/skins/content/writer/content.min.css +1 -0
  157. package/public/tinymce/skins/ui/oxide/content.css +785 -0
  158. package/public/tinymce/skins/ui/oxide/content.inline.css +779 -0
  159. package/public/tinymce/skins/ui/oxide/content.inline.js +2 -0
  160. package/public/tinymce/skins/ui/oxide/content.inline.min.css +1 -0
  161. package/public/tinymce/skins/ui/oxide/content.js +2 -0
  162. package/public/tinymce/skins/ui/oxide/content.min.css +1 -0
  163. package/public/tinymce/skins/ui/oxide/skin.css +3763 -0
  164. package/public/tinymce/skins/ui/oxide/skin.js +2 -0
  165. package/public/tinymce/skins/ui/oxide/skin.min.css +1 -0
  166. package/public/tinymce/skins/ui/oxide/skin.shadowdom.css +30 -0
  167. package/public/tinymce/skins/ui/oxide/skin.shadowdom.js +2 -0
  168. package/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
  169. package/public/tinymce/skins/ui/oxide-dark/content.css +766 -0
  170. package/public/tinymce/skins/ui/oxide-dark/content.inline.css +779 -0
  171. package/public/tinymce/skins/ui/oxide-dark/content.inline.js +2 -0
  172. package/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -0
  173. package/public/tinymce/skins/ui/oxide-dark/content.js +2 -0
  174. package/public/tinymce/skins/ui/oxide-dark/content.min.css +1 -0
  175. package/public/tinymce/skins/ui/oxide-dark/skin.css +3766 -0
  176. package/public/tinymce/skins/ui/oxide-dark/skin.js +2 -0
  177. package/public/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
  178. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +30 -0
  179. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
  180. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
  181. package/public/tinymce/skins/ui/tinymce-5/content.inline.js +2 -0
  182. package/public/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -0
  183. package/public/tinymce/skins/ui/tinymce-5/content.js +2 -0
  184. package/public/tinymce/skins/ui/tinymce-5/content.min.css +1 -0
  185. package/public/tinymce/skins/ui/tinymce-5/skin.js +2 -0
  186. package/public/tinymce/skins/ui/tinymce-5/skin.min.css +1 -0
  187. package/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
  188. package/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
  189. package/public/tinymce/skins/ui/tinymce-5-dark/content.inline.js +2 -0
  190. package/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -0
  191. package/public/tinymce/skins/ui/tinymce-5-dark/content.js +2 -0
  192. package/public/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -0
  193. package/public/tinymce/skins/ui/tinymce-5-dark/skin.js +2 -0
  194. package/public/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -0
  195. package/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
  196. package/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
  197. package/public/tinymce/themes/silver/index.js +7 -0
  198. package/public/tinymce/themes/silver/theme.js +30775 -0
  199. package/public/tinymce/themes/silver/theme.min.js +384 -0
  200. package/public/tinymce/tinymce.d.ts +3238 -0
  201. package/public/tinymce/tinymce.js +31779 -0
  202. package/public/tinymce/tinymce.min.js +384 -0
  203. package/dist/lib/_virtual/_commonjsHelpers.mjs +0 -2
  204. package/dist/lib/_virtual/_commonjsHelpers.mjs.map +0 -1
  205. package/dist/lib/_virtual/_interop_require_default.mjs +0 -2
  206. package/dist/lib/_virtual/_interop_require_default.mjs.map +0 -1
  207. package/dist/lib/_virtual/_interop_require_wildcard.mjs +0 -2
  208. package/dist/lib/_virtual/_interop_require_wildcard.mjs.map +0 -1
  209. package/dist/lib/_virtual/action-async-storage.external.mjs +0 -2
  210. package/dist/lib/_virtual/action-async-storage.external.mjs.map +0 -1
  211. package/dist/lib/_virtual/add-base-path.mjs +0 -2
  212. package/dist/lib/_virtual/add-base-path.mjs.map +0 -1
  213. package/dist/lib/_virtual/add-locale.mjs +0 -2
  214. package/dist/lib/_virtual/add-locale.mjs.map +0 -1
  215. package/dist/lib/_virtual/add-locale2.mjs +0 -2
  216. package/dist/lib/_virtual/add-locale2.mjs.map +0 -1
  217. package/dist/lib/_virtual/add-path-prefix.mjs +0 -2
  218. package/dist/lib/_virtual/add-path-prefix.mjs.map +0 -1
  219. package/dist/lib/_virtual/amp-context.shared-runtime.mjs +0 -2
  220. package/dist/lib/_virtual/amp-context.shared-runtime.mjs.map +0 -1
  221. package/dist/lib/_virtual/amp-mode.mjs +0 -2
  222. package/dist/lib/_virtual/amp-mode.mjs.map +0 -1
  223. package/dist/lib/_virtual/app-paths.mjs +0 -2
  224. package/dist/lib/_virtual/app-paths.mjs.map +0 -1
  225. package/dist/lib/_virtual/app-router-context.shared-runtime.mjs +0 -2
  226. package/dist/lib/_virtual/app-router-context.shared-runtime.mjs.map +0 -1
  227. package/dist/lib/_virtual/async-local-storage.mjs +0 -2
  228. package/dist/lib/_virtual/async-local-storage.mjs.map +0 -1
  229. package/dist/lib/_virtual/bailout-to-client-rendering.mjs +0 -2
  230. package/dist/lib/_virtual/bailout-to-client-rendering.mjs.map +0 -1
  231. package/dist/lib/_virtual/bailout-to-csr.mjs +0 -2
  232. package/dist/lib/_virtual/bailout-to-csr.mjs.map +0 -1
  233. package/dist/lib/_virtual/client-hook-in-server-component-error.mjs +0 -2
  234. package/dist/lib/_virtual/client-hook-in-server-component-error.mjs.map +0 -1
  235. package/dist/lib/_virtual/detect-domain-locale.mjs +0 -2
  236. package/dist/lib/_virtual/detect-domain-locale.mjs.map +0 -1
  237. package/dist/lib/_virtual/detect-domain-locale2.mjs +0 -2
  238. package/dist/lib/_virtual/detect-domain-locale2.mjs.map +0 -1
  239. package/dist/lib/_virtual/ensure-leading-slash.mjs +0 -2
  240. package/dist/lib/_virtual/ensure-leading-slash.mjs.map +0 -1
  241. package/dist/lib/_virtual/escape-regexp.mjs +0 -2
  242. package/dist/lib/_virtual/escape-regexp.mjs.map +0 -1
  243. package/dist/lib/_virtual/format-url.mjs +0 -2
  244. package/dist/lib/_virtual/format-url.mjs.map +0 -1
  245. package/dist/lib/_virtual/get-domain-locale.mjs +0 -2
  246. package/dist/lib/_virtual/get-domain-locale.mjs.map +0 -1
  247. package/dist/lib/_virtual/get-img-props.mjs +0 -2
  248. package/dist/lib/_virtual/get-img-props.mjs.map +0 -1
  249. package/dist/lib/_virtual/get-segment-value.mjs +0 -2
  250. package/dist/lib/_virtual/get-segment-value.mjs.map +0 -1
  251. package/dist/lib/_virtual/has-base-path.mjs +0 -2
  252. package/dist/lib/_virtual/has-base-path.mjs.map +0 -1
  253. package/dist/lib/_virtual/head-manager-context.shared-runtime.mjs +0 -2
  254. package/dist/lib/_virtual/head-manager-context.shared-runtime.mjs.map +0 -1
  255. package/dist/lib/_virtual/head.mjs +0 -2
  256. package/dist/lib/_virtual/head.mjs.map +0 -1
  257. package/dist/lib/_virtual/hooks-client-context.shared-runtime.mjs +0 -2
  258. package/dist/lib/_virtual/hooks-client-context.shared-runtime.mjs.map +0 -1
  259. package/dist/lib/_virtual/image-blur-svg.mjs +0 -2
  260. package/dist/lib/_virtual/image-blur-svg.mjs.map +0 -1
  261. package/dist/lib/_virtual/image-component.mjs +0 -2
  262. package/dist/lib/_virtual/image-component.mjs.map +0 -1
  263. package/dist/lib/_virtual/image-config-context.shared-runtime.mjs +0 -2
  264. package/dist/lib/_virtual/image-config-context.shared-runtime.mjs.map +0 -1
  265. package/dist/lib/_virtual/image-config.mjs +0 -2
  266. package/dist/lib/_virtual/image-config.mjs.map +0 -1
  267. package/dist/lib/_virtual/image-external.mjs +0 -2
  268. package/dist/lib/_virtual/image-external.mjs.map +0 -1
  269. package/dist/lib/_virtual/image-loader.mjs +0 -2
  270. package/dist/lib/_virtual/image-loader.mjs.map +0 -1
  271. package/dist/lib/_virtual/image.mjs +0 -2
  272. package/dist/lib/_virtual/image.mjs.map +0 -1
  273. package/dist/lib/_virtual/index4.mjs +0 -2
  274. package/dist/lib/_virtual/index4.mjs.map +0 -1
  275. package/dist/lib/_virtual/index5.mjs +0 -2
  276. package/dist/lib/_virtual/index5.mjs.map +0 -1
  277. package/dist/lib/_virtual/index6.mjs +0 -2
  278. package/dist/lib/_virtual/index6.mjs.map +0 -1
  279. package/dist/lib/_virtual/index7.mjs +0 -2
  280. package/dist/lib/_virtual/index7.mjs.map +0 -1
  281. package/dist/lib/_virtual/index8.mjs +0 -2
  282. package/dist/lib/_virtual/index8.mjs.map +0 -1
  283. package/dist/lib/_virtual/index9.mjs +0 -2
  284. package/dist/lib/_virtual/index9.mjs.map +0 -1
  285. package/dist/lib/_virtual/interception-routes.mjs +0 -2
  286. package/dist/lib/_virtual/interception-routes.mjs.map +0 -1
  287. package/dist/lib/_virtual/interpolate-as.mjs +0 -2
  288. package/dist/lib/_virtual/interpolate-as.mjs.map +0 -1
  289. package/dist/lib/_virtual/is-dynamic.mjs +0 -2
  290. package/dist/lib/_virtual/is-dynamic.mjs.map +0 -1
  291. package/dist/lib/_virtual/is-local-url.mjs +0 -2
  292. package/dist/lib/_virtual/is-local-url.mjs.map +0 -1
  293. package/dist/lib/_virtual/link.mjs +0 -2
  294. package/dist/lib/_virtual/link.mjs.map +0 -1
  295. package/dist/lib/_virtual/link2.mjs +0 -2
  296. package/dist/lib/_virtual/link2.mjs.map +0 -1
  297. package/dist/lib/_virtual/match-remote-pattern.mjs +0 -2
  298. package/dist/lib/_virtual/match-remote-pattern.mjs.map +0 -1
  299. package/dist/lib/_virtual/navigation.mjs +0 -2
  300. package/dist/lib/_virtual/navigation.mjs.map +0 -1
  301. package/dist/lib/_virtual/navigation2.mjs +0 -2
  302. package/dist/lib/_virtual/navigation2.mjs.map +0 -1
  303. package/dist/lib/_virtual/normalize-locale-path.mjs +0 -2
  304. package/dist/lib/_virtual/normalize-locale-path.mjs.map +0 -1
  305. package/dist/lib/_virtual/normalize-locale-path2.mjs +0 -2
  306. package/dist/lib/_virtual/normalize-locale-path2.mjs.map +0 -1
  307. package/dist/lib/_virtual/normalize-trailing-slash.mjs +0 -2
  308. package/dist/lib/_virtual/normalize-trailing-slash.mjs.map +0 -1
  309. package/dist/lib/_virtual/not-found.mjs +0 -2
  310. package/dist/lib/_virtual/not-found.mjs.map +0 -1
  311. package/dist/lib/_virtual/omit.mjs +0 -2
  312. package/dist/lib/_virtual/omit.mjs.map +0 -1
  313. package/dist/lib/_virtual/parse-path.mjs +0 -2
  314. package/dist/lib/_virtual/parse-path.mjs.map +0 -1
  315. package/dist/lib/_virtual/path-has-prefix.mjs +0 -2
  316. package/dist/lib/_virtual/path-has-prefix.mjs.map +0 -1
  317. package/dist/lib/_virtual/querystring.mjs +0 -2
  318. package/dist/lib/_virtual/querystring.mjs.map +0 -1
  319. package/dist/lib/_virtual/redirect-status-code.mjs +0 -2
  320. package/dist/lib/_virtual/redirect-status-code.mjs.map +0 -1
  321. package/dist/lib/_virtual/redirect.mjs +0 -2
  322. package/dist/lib/_virtual/redirect.mjs.map +0 -1
  323. package/dist/lib/_virtual/remove-trailing-slash.mjs +0 -2
  324. package/dist/lib/_virtual/remove-trailing-slash.mjs.map +0 -1
  325. package/dist/lib/_virtual/request-async-storage.external.mjs +0 -2
  326. package/dist/lib/_virtual/request-async-storage.external.mjs.map +0 -1
  327. package/dist/lib/_virtual/request-idle-callback.mjs +0 -2
  328. package/dist/lib/_virtual/request-idle-callback.mjs.map +0 -1
  329. package/dist/lib/_virtual/resolve-href.mjs +0 -2
  330. package/dist/lib/_virtual/resolve-href.mjs.map +0 -1
  331. package/dist/lib/_virtual/route-matcher.mjs +0 -2
  332. package/dist/lib/_virtual/route-matcher.mjs.map +0 -1
  333. package/dist/lib/_virtual/route-regex.mjs +0 -2
  334. package/dist/lib/_virtual/route-regex.mjs.map +0 -1
  335. package/dist/lib/_virtual/router-context.shared-runtime.mjs +0 -2
  336. package/dist/lib/_virtual/router-context.shared-runtime.mjs.map +0 -1
  337. package/dist/lib/_virtual/router-reducer-types.mjs +0 -2
  338. package/dist/lib/_virtual/router-reducer-types.mjs.map +0 -1
  339. package/dist/lib/_virtual/segment.mjs +0 -2
  340. package/dist/lib/_virtual/segment.mjs.map +0 -1
  341. package/dist/lib/_virtual/server-inserted-html.shared-runtime.mjs +0 -2
  342. package/dist/lib/_virtual/server-inserted-html.shared-runtime.mjs.map +0 -1
  343. package/dist/lib/_virtual/side-effect.mjs +0 -2
  344. package/dist/lib/_virtual/side-effect.mjs.map +0 -1
  345. package/dist/lib/_virtual/sorted-routes.mjs +0 -2
  346. package/dist/lib/_virtual/sorted-routes.mjs.map +0 -1
  347. package/dist/lib/_virtual/static-generation-async-storage.external.mjs +0 -2
  348. package/dist/lib/_virtual/static-generation-async-storage.external.mjs.map +0 -1
  349. package/dist/lib/_virtual/toastui-editor-plugin-color-syntax.mjs +0 -2
  350. package/dist/lib/_virtual/toastui-editor-plugin-color-syntax.mjs.map +0 -1
  351. package/dist/lib/_virtual/toastui-editor-plugin-color-syntax2.mjs +0 -2
  352. package/dist/lib/_virtual/toastui-editor-plugin-color-syntax2.mjs.map +0 -1
  353. package/dist/lib/_virtual/toastui-editor-viewer.mjs +0 -2
  354. package/dist/lib/_virtual/toastui-editor-viewer.mjs.map +0 -1
  355. package/dist/lib/_virtual/toastui-editor-viewer2.mjs +0 -2
  356. package/dist/lib/_virtual/toastui-editor-viewer2.mjs.map +0 -1
  357. package/dist/lib/_virtual/tui-color-picker.mjs +0 -2
  358. package/dist/lib/_virtual/tui-color-picker.mjs.map +0 -1
  359. package/dist/lib/_virtual/use-intersection.mjs +0 -2
  360. package/dist/lib/_virtual/use-intersection.mjs.map +0 -1
  361. package/dist/lib/_virtual/utils.mjs +0 -2
  362. package/dist/lib/_virtual/utils.mjs.map +0 -1
  363. package/dist/lib/_virtual/warn-once.mjs +0 -2
  364. package/dist/lib/_virtual/warn-once.mjs.map +0 -1
  365. package/dist/lib/dist/lib/components/Timeline/TimelineConnector.mjs +0 -2
  366. package/dist/lib/dist/lib/components/Timeline/TimelineConnector.mjs.map +0 -1
  367. package/dist/lib/dist/lib/components/Timeline/TimelineContent.mjs +0 -2
  368. package/dist/lib/dist/lib/components/Timeline/TimelineContent.mjs.map +0 -1
  369. package/dist/lib/dist/lib/components/Timeline/TimelineDescription.mjs +0 -2
  370. package/dist/lib/dist/lib/components/Timeline/TimelineDescription.mjs.map +0 -1
  371. package/dist/lib/dist/lib/components/Timeline/TimelineHeader.mjs +0 -2
  372. package/dist/lib/dist/lib/components/Timeline/TimelineHeader.mjs.map +0 -1
  373. package/dist/lib/dist/lib/components/Timeline/TimelineIcon.mjs +0 -2
  374. package/dist/lib/dist/lib/components/Timeline/TimelineIcon.mjs.map +0 -1
  375. package/dist/lib/dist/lib/components/Timeline/TimelineItem.mjs +0 -2
  376. package/dist/lib/dist/lib/components/Timeline/TimelineItem.mjs.map +0 -1
  377. package/dist/lib/dist/lib/components/Timeline/TimelineRoot.mjs +0 -3
  378. package/dist/lib/dist/lib/components/Timeline/TimelineRoot.mjs.map +0 -1
  379. package/dist/lib/dist/lib/components/Timeline/TimelineTime.mjs +0 -2
  380. package/dist/lib/dist/lib/components/Timeline/TimelineTime.mjs.map +0 -1
  381. package/dist/lib/dist/lib/components/Timeline/TimelineTitle.mjs +0 -2
  382. package/dist/lib/dist/lib/components/Timeline/TimelineTitle.mjs.map +0 -1
  383. package/dist/lib/dist/lib/components/Timeline/index.mjs +0 -2
  384. package/dist/lib/dist/lib/components/Timeline/index.mjs.map +0 -1
  385. package/dist/lib/node_modules/@swc/helpers/cjs/_interop_require_default.mjs +0 -2
  386. package/dist/lib/node_modules/@swc/helpers/cjs/_interop_require_default.mjs.map +0 -1
  387. package/dist/lib/node_modules/@swc/helpers/cjs/_interop_require_wildcard.mjs +0 -2
  388. package/dist/lib/node_modules/@swc/helpers/cjs/_interop_require_wildcard.mjs.map +0 -1
  389. package/dist/lib/node_modules/@toast-ui/editor/dist/esm/index.mjs +0 -37
  390. package/dist/lib/node_modules/@toast-ui/editor/dist/esm/index.mjs.map +0 -1
  391. package/dist/lib/node_modules/@toast-ui/editor/dist/toastui-editor-viewer.mjs +0 -24
  392. package/dist/lib/node_modules/@toast-ui/editor/dist/toastui-editor-viewer.mjs.map +0 -1
  393. package/dist/lib/node_modules/@toast-ui/editor-plugin-color-syntax/dist/toastui-editor-plugin-color-syntax.mjs +0 -8
  394. package/dist/lib/node_modules/@toast-ui/editor-plugin-color-syntax/dist/toastui-editor-plugin-color-syntax.mjs.map +0 -1
  395. package/dist/lib/node_modules/@toast-ui/react-editor/dist/esm/index.mjs +0 -22
  396. package/dist/lib/node_modules/@toast-ui/react-editor/dist/esm/index.mjs.map +0 -1
  397. package/dist/lib/node_modules/next/dist/client/add-base-path.mjs +0 -2
  398. package/dist/lib/node_modules/next/dist/client/add-base-path.mjs.map +0 -1
  399. package/dist/lib/node_modules/next/dist/client/add-locale.mjs +0 -2
  400. package/dist/lib/node_modules/next/dist/client/add-locale.mjs.map +0 -1
  401. package/dist/lib/node_modules/next/dist/client/components/action-async-storage.external.mjs +0 -2
  402. package/dist/lib/node_modules/next/dist/client/components/action-async-storage.external.mjs.map +0 -1
  403. package/dist/lib/node_modules/next/dist/client/components/async-local-storage.mjs +0 -2
  404. package/dist/lib/node_modules/next/dist/client/components/async-local-storage.mjs.map +0 -1
  405. package/dist/lib/node_modules/next/dist/client/components/bailout-to-client-rendering.mjs +0 -2
  406. package/dist/lib/node_modules/next/dist/client/components/bailout-to-client-rendering.mjs.map +0 -1
  407. package/dist/lib/node_modules/next/dist/client/components/client-hook-in-server-component-error.mjs +0 -2
  408. package/dist/lib/node_modules/next/dist/client/components/client-hook-in-server-component-error.mjs.map +0 -1
  409. package/dist/lib/node_modules/next/dist/client/components/navigation.mjs +0 -2
  410. package/dist/lib/node_modules/next/dist/client/components/navigation.mjs.map +0 -1
  411. package/dist/lib/node_modules/next/dist/client/components/not-found.mjs +0 -2
  412. package/dist/lib/node_modules/next/dist/client/components/not-found.mjs.map +0 -1
  413. package/dist/lib/node_modules/next/dist/client/components/redirect-status-code.mjs +0 -2
  414. package/dist/lib/node_modules/next/dist/client/components/redirect-status-code.mjs.map +0 -1
  415. package/dist/lib/node_modules/next/dist/client/components/redirect.mjs +0 -2
  416. package/dist/lib/node_modules/next/dist/client/components/redirect.mjs.map +0 -1
  417. package/dist/lib/node_modules/next/dist/client/components/request-async-storage.external.mjs +0 -2
  418. package/dist/lib/node_modules/next/dist/client/components/request-async-storage.external.mjs.map +0 -1
  419. package/dist/lib/node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.mjs +0 -2
  420. package/dist/lib/node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.mjs.map +0 -1
  421. package/dist/lib/node_modules/next/dist/client/components/router-reducer/router-reducer-types.mjs +0 -2
  422. package/dist/lib/node_modules/next/dist/client/components/router-reducer/router-reducer-types.mjs.map +0 -1
  423. package/dist/lib/node_modules/next/dist/client/components/static-generation-async-storage.external.mjs +0 -2
  424. package/dist/lib/node_modules/next/dist/client/components/static-generation-async-storage.external.mjs.map +0 -1
  425. package/dist/lib/node_modules/next/dist/client/detect-domain-locale.mjs +0 -2
  426. package/dist/lib/node_modules/next/dist/client/detect-domain-locale.mjs.map +0 -1
  427. package/dist/lib/node_modules/next/dist/client/get-domain-locale.mjs +0 -2
  428. package/dist/lib/node_modules/next/dist/client/get-domain-locale.mjs.map +0 -1
  429. package/dist/lib/node_modules/next/dist/client/has-base-path.mjs +0 -2
  430. package/dist/lib/node_modules/next/dist/client/has-base-path.mjs.map +0 -1
  431. package/dist/lib/node_modules/next/dist/client/image-component.mjs +0 -2
  432. package/dist/lib/node_modules/next/dist/client/image-component.mjs.map +0 -1
  433. package/dist/lib/node_modules/next/dist/client/link.mjs +0 -2
  434. package/dist/lib/node_modules/next/dist/client/link.mjs.map +0 -1
  435. package/dist/lib/node_modules/next/dist/client/normalize-locale-path.mjs +0 -2
  436. package/dist/lib/node_modules/next/dist/client/normalize-locale-path.mjs.map +0 -1
  437. package/dist/lib/node_modules/next/dist/client/normalize-trailing-slash.mjs +0 -2
  438. package/dist/lib/node_modules/next/dist/client/normalize-trailing-slash.mjs.map +0 -1
  439. package/dist/lib/node_modules/next/dist/client/request-idle-callback.mjs +0 -2
  440. package/dist/lib/node_modules/next/dist/client/request-idle-callback.mjs.map +0 -1
  441. package/dist/lib/node_modules/next/dist/client/resolve-href.mjs +0 -2
  442. package/dist/lib/node_modules/next/dist/client/resolve-href.mjs.map +0 -1
  443. package/dist/lib/node_modules/next/dist/client/use-intersection.mjs +0 -2
  444. package/dist/lib/node_modules/next/dist/client/use-intersection.mjs.map +0 -1
  445. package/dist/lib/node_modules/next/dist/compiled/micromatch/index.mjs +0 -23
  446. package/dist/lib/node_modules/next/dist/compiled/micromatch/index.mjs.map +0 -1
  447. package/dist/lib/node_modules/next/dist/server/future/helpers/interception-routes.mjs +0 -2
  448. package/dist/lib/node_modules/next/dist/server/future/helpers/interception-routes.mjs.map +0 -1
  449. package/dist/lib/node_modules/next/dist/shared/lib/amp-context.shared-runtime.mjs +0 -2
  450. package/dist/lib/node_modules/next/dist/shared/lib/amp-context.shared-runtime.mjs.map +0 -1
  451. package/dist/lib/node_modules/next/dist/shared/lib/amp-mode.mjs +0 -2
  452. package/dist/lib/node_modules/next/dist/shared/lib/amp-mode.mjs.map +0 -1
  453. package/dist/lib/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.mjs +0 -2
  454. package/dist/lib/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.mjs.map +0 -1
  455. package/dist/lib/node_modules/next/dist/shared/lib/escape-regexp.mjs +0 -2
  456. package/dist/lib/node_modules/next/dist/shared/lib/escape-regexp.mjs.map +0 -1
  457. package/dist/lib/node_modules/next/dist/shared/lib/get-img-props.mjs +0 -2
  458. package/dist/lib/node_modules/next/dist/shared/lib/get-img-props.mjs.map +0 -1
  459. package/dist/lib/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.mjs +0 -2
  460. package/dist/lib/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.mjs.map +0 -1
  461. package/dist/lib/node_modules/next/dist/shared/lib/head.mjs +0 -2
  462. package/dist/lib/node_modules/next/dist/shared/lib/head.mjs.map +0 -1
  463. package/dist/lib/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.mjs +0 -2
  464. package/dist/lib/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.mjs.map +0 -1
  465. package/dist/lib/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.mjs +0 -2
  466. package/dist/lib/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.mjs.map +0 -1
  467. package/dist/lib/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.mjs +0 -2
  468. package/dist/lib/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.mjs.map +0 -1
  469. package/dist/lib/node_modules/next/dist/shared/lib/image-blur-svg.mjs +0 -2
  470. package/dist/lib/node_modules/next/dist/shared/lib/image-blur-svg.mjs.map +0 -1
  471. package/dist/lib/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.mjs +0 -2
  472. package/dist/lib/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.mjs.map +0 -1
  473. package/dist/lib/node_modules/next/dist/shared/lib/image-config.mjs +0 -2
  474. package/dist/lib/node_modules/next/dist/shared/lib/image-config.mjs.map +0 -1
  475. package/dist/lib/node_modules/next/dist/shared/lib/image-external.mjs +0 -2
  476. package/dist/lib/node_modules/next/dist/shared/lib/image-external.mjs.map +0 -1
  477. package/dist/lib/node_modules/next/dist/shared/lib/image-loader.mjs +0 -2
  478. package/dist/lib/node_modules/next/dist/shared/lib/image-loader.mjs.map +0 -1
  479. package/dist/lib/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.mjs +0 -2
  480. package/dist/lib/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.mjs.map +0 -1
  481. package/dist/lib/node_modules/next/dist/shared/lib/match-remote-pattern.mjs +0 -2
  482. package/dist/lib/node_modules/next/dist/shared/lib/match-remote-pattern.mjs.map +0 -1
  483. package/dist/lib/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.mjs +0 -2
  484. package/dist/lib/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.mjs.map +0 -1
  485. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/add-locale.mjs +0 -2
  486. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/add-locale.mjs.map +0 -1
  487. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.mjs +0 -2
  488. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.mjs.map +0 -1
  489. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/app-paths.mjs +0 -2
  490. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/app-paths.mjs.map +0 -1
  491. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/format-url.mjs +0 -2
  492. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/format-url.mjs.map +0 -1
  493. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/index.mjs +0 -2
  494. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/index.mjs.map +0 -1
  495. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/interpolate-as.mjs +0 -2
  496. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/interpolate-as.mjs.map +0 -1
  497. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/is-dynamic.mjs +0 -2
  498. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/is-dynamic.mjs.map +0 -1
  499. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/is-local-url.mjs +0 -2
  500. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/is-local-url.mjs.map +0 -1
  501. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/omit.mjs +0 -2
  502. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/omit.mjs.map +0 -1
  503. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/parse-path.mjs +0 -2
  504. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/parse-path.mjs.map +0 -1
  505. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.mjs +0 -2
  506. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.mjs.map +0 -1
  507. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/querystring.mjs +0 -2
  508. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/querystring.mjs.map +0 -1
  509. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.mjs +0 -2
  510. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.mjs.map +0 -1
  511. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/route-matcher.mjs +0 -2
  512. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/route-matcher.mjs.map +0 -1
  513. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/route-regex.mjs +0 -2
  514. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/route-regex.mjs.map +0 -1
  515. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/sorted-routes.mjs +0 -2
  516. package/dist/lib/node_modules/next/dist/shared/lib/router/utils/sorted-routes.mjs.map +0 -1
  517. package/dist/lib/node_modules/next/dist/shared/lib/router-context.shared-runtime.mjs +0 -2
  518. package/dist/lib/node_modules/next/dist/shared/lib/router-context.shared-runtime.mjs.map +0 -1
  519. package/dist/lib/node_modules/next/dist/shared/lib/segment.mjs +0 -2
  520. package/dist/lib/node_modules/next/dist/shared/lib/segment.mjs.map +0 -1
  521. package/dist/lib/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.mjs +0 -2
  522. package/dist/lib/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.mjs.map +0 -1
  523. package/dist/lib/node_modules/next/dist/shared/lib/side-effect.mjs +0 -2
  524. package/dist/lib/node_modules/next/dist/shared/lib/side-effect.mjs.map +0 -1
  525. package/dist/lib/node_modules/next/dist/shared/lib/utils/warn-once.mjs +0 -2
  526. package/dist/lib/node_modules/next/dist/shared/lib/utils/warn-once.mjs.map +0 -1
  527. package/dist/lib/node_modules/next/dist/shared/lib/utils.mjs +0 -2
  528. package/dist/lib/node_modules/next/dist/shared/lib/utils.mjs.map +0 -1
  529. package/dist/lib/node_modules/next/image.mjs +0 -2
  530. package/dist/lib/node_modules/next/image.mjs.map +0 -1
  531. package/dist/lib/node_modules/next/link.mjs +0 -2
  532. package/dist/lib/node_modules/next/link.mjs.map +0 -1
  533. package/dist/lib/node_modules/next/navigation.mjs +0 -2
  534. package/dist/lib/node_modules/next/navigation.mjs.map +0 -1
  535. package/dist/lib/node_modules/orderedmap/dist/index.mjs +0 -2
  536. package/dist/lib/node_modules/orderedmap/dist/index.mjs.map +0 -1
  537. package/dist/lib/node_modules/orderedmap/dist/index2.mjs +0 -2
  538. package/dist/lib/node_modules/orderedmap/dist/index2.mjs.map +0 -1
  539. package/dist/lib/node_modules/prosemirror-commands/dist/index.mjs +0 -2
  540. package/dist/lib/node_modules/prosemirror-commands/dist/index.mjs.map +0 -1
  541. package/dist/lib/node_modules/prosemirror-history/dist/index.mjs +0 -2
  542. package/dist/lib/node_modules/prosemirror-history/dist/index.mjs.map +0 -1
  543. package/dist/lib/node_modules/prosemirror-inputrules/dist/index.mjs +0 -2
  544. package/dist/lib/node_modules/prosemirror-inputrules/dist/index.mjs.map +0 -1
  545. package/dist/lib/node_modules/prosemirror-inputrules/dist/index2.mjs +0 -2
  546. package/dist/lib/node_modules/prosemirror-inputrules/dist/index2.mjs.map +0 -1
  547. package/dist/lib/node_modules/prosemirror-keymap/dist/index.mjs +0 -2
  548. package/dist/lib/node_modules/prosemirror-keymap/dist/index.mjs.map +0 -1
  549. package/dist/lib/node_modules/prosemirror-keymap/dist/index2.mjs +0 -2
  550. package/dist/lib/node_modules/prosemirror-keymap/dist/index2.mjs.map +0 -1
  551. package/dist/lib/node_modules/prosemirror-model/dist/index.mjs +0 -2
  552. package/dist/lib/node_modules/prosemirror-model/dist/index.mjs.map +0 -1
  553. package/dist/lib/node_modules/prosemirror-model/dist/index2.mjs +0 -2
  554. package/dist/lib/node_modules/prosemirror-model/dist/index2.mjs.map +0 -1
  555. package/dist/lib/node_modules/prosemirror-state/dist/index.mjs +0 -2
  556. package/dist/lib/node_modules/prosemirror-state/dist/index.mjs.map +0 -1
  557. package/dist/lib/node_modules/prosemirror-state/dist/index2.mjs +0 -2
  558. package/dist/lib/node_modules/prosemirror-state/dist/index2.mjs.map +0 -1
  559. package/dist/lib/node_modules/prosemirror-transform/dist/index.mjs +0 -2
  560. package/dist/lib/node_modules/prosemirror-transform/dist/index.mjs.map +0 -1
  561. package/dist/lib/node_modules/prosemirror-transform/dist/index2.mjs +0 -2
  562. package/dist/lib/node_modules/prosemirror-transform/dist/index2.mjs.map +0 -1
  563. package/dist/lib/node_modules/prosemirror-view/dist/index.mjs +0 -2
  564. package/dist/lib/node_modules/prosemirror-view/dist/index.mjs.map +0 -1
  565. package/dist/lib/node_modules/prosemirror-view/dist/index2.mjs +0 -2
  566. package/dist/lib/node_modules/prosemirror-view/dist/index2.mjs.map +0 -1
  567. package/dist/lib/node_modules/rope-sequence/dist/index.mjs +0 -2
  568. package/dist/lib/node_modules/rope-sequence/dist/index.mjs.map +0 -1
  569. package/dist/lib/node_modules/tui-color-picker/dist/tui-color-picker.mjs +0 -10
  570. package/dist/lib/node_modules/tui-color-picker/dist/tui-color-picker.mjs.map +0 -1
  571. package/dist/lib/node_modules/w3c-keyname/index.mjs +0 -2
  572. package/dist/lib/node_modules/w3c-keyname/index.mjs.map +0 -1
  573. package/dist/lib/node_modules/w3c-keyname/index2.mjs +0 -2
  574. package/dist/lib/node_modules/w3c-keyname/index2.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../node_modules/prosemirror-model/dist/index.cjs"],"sourcesContent":["'use strict';\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _isNativeFunction(fn) { try { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; } catch (e) { return typeof fn === \"function\"; } }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar OrderedMap = require('orderedmap');\nfunction _findDiffStart(a, b, pos) {\n for (var i = 0;; i++) {\n if (i == a.childCount || i == b.childCount) return a.childCount == b.childCount ? null : pos;\n var childA = a.child(i),\n childB = b.child(i);\n if (childA == childB) {\n pos += childA.nodeSize;\n continue;\n }\n if (!childA.sameMarkup(childB)) return pos;\n if (childA.isText && childA.text != childB.text) {\n for (var j = 0; childA.text[j] == childB.text[j]; j++) pos++;\n return pos;\n }\n if (childA.content.size || childB.content.size) {\n var inner = _findDiffStart(childA.content, childB.content, pos + 1);\n if (inner != null) return inner;\n }\n pos += childA.nodeSize;\n }\n}\nfunction _findDiffEnd(a, b, posA, posB) {\n for (var iA = a.childCount, iB = b.childCount;;) {\n if (iA == 0 || iB == 0) return iA == iB ? null : {\n a: posA,\n b: posB\n };\n var childA = a.child(--iA),\n childB = b.child(--iB),\n size = childA.nodeSize;\n if (childA == childB) {\n posA -= size;\n posB -= size;\n continue;\n }\n if (!childA.sameMarkup(childB)) return {\n a: posA,\n b: posB\n };\n if (childA.isText && childA.text != childB.text) {\n var same = 0,\n minSize = Math.min(childA.text.length, childB.text.length);\n while (same < minSize && childA.text[childA.text.length - same - 1] == childB.text[childB.text.length - same - 1]) {\n same++;\n posA--;\n posB--;\n }\n return {\n a: posA,\n b: posB\n };\n }\n if (childA.content.size || childB.content.size) {\n var inner = _findDiffEnd(childA.content, childB.content, posA - 1, posB - 1);\n if (inner) return inner;\n }\n posA -= size;\n posB -= size;\n }\n}\nvar Fragment = function () {\n function Fragment(content, size) {\n _classCallCheck(this, Fragment);\n this.content = content;\n this.size = size || 0;\n if (size == null) for (var i = 0; i < content.length; i++) this.size += content[i].nodeSize;\n }\n _createClass(Fragment, [{\n key: \"nodesBetween\",\n value: function nodesBetween(from, to, f) {\n var nodeStart = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var parent = arguments.length > 4 ? arguments[4] : undefined;\n for (var i = 0, pos = 0; pos < to; i++) {\n var child = this.content[i],\n end = pos + child.nodeSize;\n if (end > from && f(child, nodeStart + pos, parent || null, i) !== false && child.content.size) {\n var start = pos + 1;\n child.nodesBetween(Math.max(0, from - start), Math.min(child.content.size, to - start), f, nodeStart + start);\n }\n pos = end;\n }\n }\n }, {\n key: \"descendants\",\n value: function descendants(f) {\n this.nodesBetween(0, this.size, f);\n }\n }, {\n key: \"textBetween\",\n value: function textBetween(from, to, blockSeparator, leafText) {\n var text = \"\",\n first = true;\n this.nodesBetween(from, to, function (node, pos) {\n var nodeText = node.isText ? node.text.slice(Math.max(from, pos) - pos, to - pos) : !node.isLeaf ? \"\" : leafText ? typeof leafText === \"function\" ? leafText(node) : leafText : node.type.spec.leafText ? node.type.spec.leafText(node) : \"\";\n if (node.isBlock && (node.isLeaf && nodeText || node.isTextblock) && blockSeparator) {\n if (first) first = false;else text += blockSeparator;\n }\n text += nodeText;\n }, 0);\n return text;\n }\n }, {\n key: \"append\",\n value: function append(other) {\n if (!other.size) return this;\n if (!this.size) return other;\n var last = this.lastChild,\n first = other.firstChild,\n content = this.content.slice(),\n i = 0;\n if (last.isText && last.sameMarkup(first)) {\n content[content.length - 1] = last.withText(last.text + first.text);\n i = 1;\n }\n for (; i < other.content.length; i++) content.push(other.content[i]);\n return new Fragment(content, this.size + other.size);\n }\n }, {\n key: \"cut\",\n value: function cut(from) {\n var to = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.size;\n if (from == 0 && to == this.size) return this;\n var result = [],\n size = 0;\n if (to > from) for (var i = 0, pos = 0; pos < to; i++) {\n var child = this.content[i],\n end = pos + child.nodeSize;\n if (end > from) {\n if (pos < from || end > to) {\n if (child.isText) child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos));else child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1));\n }\n result.push(child);\n size += child.nodeSize;\n }\n pos = end;\n }\n return new Fragment(result, size);\n }\n }, {\n key: \"cutByIndex\",\n value: function cutByIndex(from, to) {\n if (from == to) return Fragment.empty;\n if (from == 0 && to == this.content.length) return this;\n return new Fragment(this.content.slice(from, to));\n }\n }, {\n key: \"replaceChild\",\n value: function replaceChild(index, node) {\n var current = this.content[index];\n if (current == node) return this;\n var copy = this.content.slice();\n var size = this.size + node.nodeSize - current.nodeSize;\n copy[index] = node;\n return new Fragment(copy, size);\n }\n }, {\n key: \"addToStart\",\n value: function addToStart(node) {\n return new Fragment([node].concat(this.content), this.size + node.nodeSize);\n }\n }, {\n key: \"addToEnd\",\n value: function addToEnd(node) {\n return new Fragment(this.content.concat(node), this.size + node.nodeSize);\n }\n }, {\n key: \"eq\",\n value: function eq(other) {\n if (this.content.length != other.content.length) return false;\n for (var i = 0; i < this.content.length; i++) if (!this.content[i].eq(other.content[i])) return false;\n return true;\n }\n }, {\n key: \"firstChild\",\n get: function get() {\n return this.content.length ? this.content[0] : null;\n }\n }, {\n key: \"lastChild\",\n get: function get() {\n return this.content.length ? this.content[this.content.length - 1] : null;\n }\n }, {\n key: \"childCount\",\n get: function get() {\n return this.content.length;\n }\n }, {\n key: \"child\",\n value: function child(index) {\n var found = this.content[index];\n if (!found) throw new RangeError(\"Index \" + index + \" out of range for \" + this);\n return found;\n }\n }, {\n key: \"maybeChild\",\n value: function maybeChild(index) {\n return this.content[index] || null;\n }\n }, {\n key: \"forEach\",\n value: function forEach(f) {\n for (var i = 0, p = 0; i < this.content.length; i++) {\n var child = this.content[i];\n f(child, p, i);\n p += child.nodeSize;\n }\n }\n }, {\n key: \"findDiffStart\",\n value: function findDiffStart(other) {\n var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return _findDiffStart(this, other, pos);\n }\n }, {\n key: \"findDiffEnd\",\n value: function findDiffEnd(other) {\n var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.size;\n var otherPos = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : other.size;\n return _findDiffEnd(this, other, pos, otherPos);\n }\n }, {\n key: \"findIndex\",\n value: function findIndex(pos) {\n var round = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;\n if (pos == 0) return retIndex(0, pos);\n if (pos == this.size) return retIndex(this.content.length, pos);\n if (pos > this.size || pos < 0) throw new RangeError(\"Position \".concat(pos, \" outside of fragment (\").concat(this, \")\"));\n for (var i = 0, curPos = 0;; i++) {\n var cur = this.child(i),\n end = curPos + cur.nodeSize;\n if (end >= pos) {\n if (end == pos || round > 0) return retIndex(i + 1, end);\n return retIndex(i, curPos);\n }\n curPos = end;\n }\n }\n }, {\n key: \"toString\",\n value: function toString() {\n return \"<\" + this.toStringInner() + \">\";\n }\n }, {\n key: \"toStringInner\",\n value: function toStringInner() {\n return this.content.join(\", \");\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n return this.content.length ? this.content.map(function (n) {\n return n.toJSON();\n }) : null;\n }\n }], [{\n key: \"fromJSON\",\n value: function fromJSON(schema, value) {\n if (!value) return Fragment.empty;\n if (!Array.isArray(value)) throw new RangeError(\"Invalid input for Fragment.fromJSON\");\n return new Fragment(value.map(schema.nodeFromJSON));\n }\n }, {\n key: \"fromArray\",\n value: function fromArray(array) {\n if (!array.length) return Fragment.empty;\n var joined,\n size = 0;\n for (var i = 0; i < array.length; i++) {\n var node = array[i];\n size += node.nodeSize;\n if (i && node.isText && array[i - 1].sameMarkup(node)) {\n if (!joined) joined = array.slice(0, i);\n joined[joined.length - 1] = node.withText(joined[joined.length - 1].text + node.text);\n } else if (joined) {\n joined.push(node);\n }\n }\n return new Fragment(joined || array, size);\n }\n }, {\n key: \"from\",\n value: function from(nodes) {\n if (!nodes) return Fragment.empty;\n if (nodes instanceof Fragment) return nodes;\n if (Array.isArray(nodes)) return this.fromArray(nodes);\n if (nodes.attrs) return new Fragment([nodes], nodes.nodeSize);\n throw new RangeError(\"Can not convert \" + nodes + \" to a Fragment\" + (nodes.nodesBetween ? \" (looks like multiple versions of prosemirror-model were loaded)\" : \"\"));\n }\n }]);\n return Fragment;\n}();\nFragment.empty = new Fragment([], 0);\nvar found = {\n index: 0,\n offset: 0\n};\nfunction retIndex(index, offset) {\n found.index = index;\n found.offset = offset;\n return found;\n}\nfunction compareDeep(a, b) {\n if (a === b) return true;\n if (!(a && _typeof(a) == \"object\") || !(b && _typeof(b) == \"object\")) return false;\n var array = Array.isArray(a);\n if (Array.isArray(b) != array) return false;\n if (array) {\n if (a.length != b.length) return false;\n for (var i = 0; i < a.length; i++) if (!compareDeep(a[i], b[i])) return false;\n } else {\n for (var p in a) if (!(p in b) || !compareDeep(a[p], b[p])) return false;\n for (var _p in b) if (!(_p in a)) return false;\n }\n return true;\n}\nvar Mark = function () {\n function Mark(type, attrs) {\n _classCallCheck(this, Mark);\n this.type = type;\n this.attrs = attrs;\n }\n _createClass(Mark, [{\n key: \"addToSet\",\n value: function addToSet(set) {\n var copy,\n placed = false;\n for (var i = 0; i < set.length; i++) {\n var other = set[i];\n if (this.eq(other)) return set;\n if (this.type.excludes(other.type)) {\n if (!copy) copy = set.slice(0, i);\n } else if (other.type.excludes(this.type)) {\n return set;\n } else {\n if (!placed && other.type.rank > this.type.rank) {\n if (!copy) copy = set.slice(0, i);\n copy.push(this);\n placed = true;\n }\n if (copy) copy.push(other);\n }\n }\n if (!copy) copy = set.slice();\n if (!placed) copy.push(this);\n return copy;\n }\n }, {\n key: \"removeFromSet\",\n value: function removeFromSet(set) {\n for (var i = 0; i < set.length; i++) if (this.eq(set[i])) return set.slice(0, i).concat(set.slice(i + 1));\n return set;\n }\n }, {\n key: \"isInSet\",\n value: function isInSet(set) {\n for (var i = 0; i < set.length; i++) if (this.eq(set[i])) return true;\n return false;\n }\n }, {\n key: \"eq\",\n value: function eq(other) {\n return this == other || this.type == other.type && compareDeep(this.attrs, other.attrs);\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n var obj = {\n type: this.type.name\n };\n for (var _ in this.attrs) {\n obj.attrs = this.attrs;\n break;\n }\n return obj;\n }\n }], [{\n key: \"fromJSON\",\n value: function fromJSON(schema, json) {\n if (!json) throw new RangeError(\"Invalid input for Mark.fromJSON\");\n var type = schema.marks[json.type];\n if (!type) throw new RangeError(\"There is no mark type \".concat(json.type, \" in this schema\"));\n var mark = type.create(json.attrs);\n type.checkAttrs(mark.attrs);\n return mark;\n }\n }, {\n key: \"sameSet\",\n value: function sameSet(a, b) {\n if (a == b) return true;\n if (a.length != b.length) return false;\n for (var i = 0; i < a.length; i++) if (!a[i].eq(b[i])) return false;\n return true;\n }\n }, {\n key: \"setFrom\",\n value: function setFrom(marks) {\n if (!marks || Array.isArray(marks) && marks.length == 0) return Mark.none;\n if (marks instanceof Mark) return [marks];\n var copy = marks.slice();\n copy.sort(function (a, b) {\n return a.type.rank - b.type.rank;\n });\n return copy;\n }\n }]);\n return Mark;\n}();\nMark.none = [];\nvar ReplaceError = function (_Error) {\n _inherits(ReplaceError, _Error);\n var _super = _createSuper(ReplaceError);\n function ReplaceError() {\n _classCallCheck(this, ReplaceError);\n return _super.apply(this, arguments);\n }\n return _createClass(ReplaceError);\n}(_wrapNativeSuper(Error));\nvar Slice = function () {\n function Slice(content, openStart, openEnd) {\n _classCallCheck(this, Slice);\n this.content = content;\n this.openStart = openStart;\n this.openEnd = openEnd;\n }\n _createClass(Slice, [{\n key: \"size\",\n get: function get() {\n return this.content.size - this.openStart - this.openEnd;\n }\n }, {\n key: \"insertAt\",\n value: function insertAt(pos, fragment) {\n var content = insertInto(this.content, pos + this.openStart, fragment);\n return content && new Slice(content, this.openStart, this.openEnd);\n }\n }, {\n key: \"removeBetween\",\n value: function removeBetween(from, to) {\n return new Slice(removeRange(this.content, from + this.openStart, to + this.openStart), this.openStart, this.openEnd);\n }\n }, {\n key: \"eq\",\n value: function eq(other) {\n return this.content.eq(other.content) && this.openStart == other.openStart && this.openEnd == other.openEnd;\n }\n }, {\n key: \"toString\",\n value: function toString() {\n return this.content + \"(\" + this.openStart + \",\" + this.openEnd + \")\";\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n if (!this.content.size) return null;\n var json = {\n content: this.content.toJSON()\n };\n if (this.openStart > 0) json.openStart = this.openStart;\n if (this.openEnd > 0) json.openEnd = this.openEnd;\n return json;\n }\n }], [{\n key: \"fromJSON\",\n value: function fromJSON(schema, json) {\n if (!json) return Slice.empty;\n var openStart = json.openStart || 0,\n openEnd = json.openEnd || 0;\n if (typeof openStart != \"number\" || typeof openEnd != \"number\") throw new RangeError(\"Invalid input for Slice.fromJSON\");\n return new Slice(Fragment.fromJSON(schema, json.content), openStart, openEnd);\n }\n }, {\n key: \"maxOpen\",\n value: function maxOpen(fragment) {\n var openIsolating = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var openStart = 0,\n openEnd = 0;\n for (var n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild) openStart++;\n for (var _n = fragment.lastChild; _n && !_n.isLeaf && (openIsolating || !_n.type.spec.isolating); _n = _n.lastChild) openEnd++;\n return new Slice(fragment, openStart, openEnd);\n }\n }]);\n return Slice;\n}();\nSlice.empty = new Slice(Fragment.empty, 0, 0);\nfunction removeRange(content, from, to) {\n var _content$findIndex = content.findIndex(from),\n index = _content$findIndex.index,\n offset = _content$findIndex.offset,\n child = content.maybeChild(index);\n var _content$findIndex2 = content.findIndex(to),\n indexTo = _content$findIndex2.index,\n offsetTo = _content$findIndex2.offset;\n if (offset == from || child.isText) {\n if (offsetTo != to && !content.child(indexTo).isText) throw new RangeError(\"Removing non-flat range\");\n return content.cut(0, from).append(content.cut(to));\n }\n if (index != indexTo) throw new RangeError(\"Removing non-flat range\");\n return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1)));\n}\nfunction insertInto(content, dist, insert, parent) {\n var _content$findIndex3 = content.findIndex(dist),\n index = _content$findIndex3.index,\n offset = _content$findIndex3.offset,\n child = content.maybeChild(index);\n if (offset == dist || child.isText) {\n if (parent && !parent.canReplace(index, index, insert)) return null;\n return content.cut(0, dist).append(insert).append(content.cut(dist));\n }\n var inner = insertInto(child.content, dist - offset - 1, insert);\n return inner && content.replaceChild(index, child.copy(inner));\n}\nfunction _replace($from, $to, slice) {\n if (slice.openStart > $from.depth) throw new ReplaceError(\"Inserted content deeper than insertion position\");\n if ($from.depth - slice.openStart != $to.depth - slice.openEnd) throw new ReplaceError(\"Inconsistent open depths\");\n return replaceOuter($from, $to, slice, 0);\n}\nfunction replaceOuter($from, $to, slice, depth) {\n var index = $from.index(depth),\n node = $from.node(depth);\n if (index == $to.index(depth) && depth < $from.depth - slice.openStart) {\n var inner = replaceOuter($from, $to, slice, depth + 1);\n return node.copy(node.content.replaceChild(index, inner));\n } else if (!slice.content.size) {\n return close(node, replaceTwoWay($from, $to, depth));\n } else if (!slice.openStart && !slice.openEnd && $from.depth == depth && $to.depth == depth) {\n var parent = $from.parent,\n content = parent.content;\n return close(parent, content.cut(0, $from.parentOffset).append(slice.content).append(content.cut($to.parentOffset)));\n } else {\n var _prepareSliceForRepla = prepareSliceForReplace(slice, $from),\n start = _prepareSliceForRepla.start,\n end = _prepareSliceForRepla.end;\n return close(node, replaceThreeWay($from, start, end, $to, depth));\n }\n}\nfunction checkJoin(main, sub) {\n if (!sub.type.compatibleContent(main.type)) throw new ReplaceError(\"Cannot join \" + sub.type.name + \" onto \" + main.type.name);\n}\nfunction joinable($before, $after, depth) {\n var node = $before.node(depth);\n checkJoin(node, $after.node(depth));\n return node;\n}\nfunction addNode(child, target) {\n var last = target.length - 1;\n if (last >= 0 && child.isText && child.sameMarkup(target[last])) target[last] = child.withText(target[last].text + child.text);else target.push(child);\n}\nfunction addRange($start, $end, depth, target) {\n var node = ($end || $start).node(depth);\n var startIndex = 0,\n endIndex = $end ? $end.index(depth) : node.childCount;\n if ($start) {\n startIndex = $start.index(depth);\n if ($start.depth > depth) {\n startIndex++;\n } else if ($start.textOffset) {\n addNode($start.nodeAfter, target);\n startIndex++;\n }\n }\n for (var i = startIndex; i < endIndex; i++) addNode(node.child(i), target);\n if ($end && $end.depth == depth && $end.textOffset) addNode($end.nodeBefore, target);\n}\nfunction close(node, content) {\n node.type.checkContent(content);\n return node.copy(content);\n}\nfunction replaceThreeWay($from, $start, $end, $to, depth) {\n var openStart = $from.depth > depth && joinable($from, $start, depth + 1);\n var openEnd = $to.depth > depth && joinable($end, $to, depth + 1);\n var content = [];\n addRange(null, $from, depth, content);\n if (openStart && openEnd && $start.index(depth) == $end.index(depth)) {\n checkJoin(openStart, openEnd);\n addNode(close(openStart, replaceThreeWay($from, $start, $end, $to, depth + 1)), content);\n } else {\n if (openStart) addNode(close(openStart, replaceTwoWay($from, $start, depth + 1)), content);\n addRange($start, $end, depth, content);\n if (openEnd) addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);\n }\n addRange($to, null, depth, content);\n return new Fragment(content);\n}\nfunction replaceTwoWay($from, $to, depth) {\n var content = [];\n addRange(null, $from, depth, content);\n if ($from.depth > depth) {\n var type = joinable($from, $to, depth + 1);\n addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);\n }\n addRange($to, null, depth, content);\n return new Fragment(content);\n}\nfunction prepareSliceForReplace(slice, $along) {\n var extra = $along.depth - slice.openStart,\n parent = $along.node(extra);\n var node = parent.copy(slice.content);\n for (var i = extra - 1; i >= 0; i--) node = $along.node(i).copy(Fragment.from(node));\n return {\n start: node.resolveNoCache(slice.openStart + extra),\n end: node.resolveNoCache(node.content.size - slice.openEnd - extra)\n };\n}\nvar ResolvedPos = function () {\n function ResolvedPos(pos, path, parentOffset) {\n _classCallCheck(this, ResolvedPos);\n this.pos = pos;\n this.path = path;\n this.parentOffset = parentOffset;\n this.depth = path.length / 3 - 1;\n }\n _createClass(ResolvedPos, [{\n key: \"resolveDepth\",\n value: function resolveDepth(val) {\n if (val == null) return this.depth;\n if (val < 0) return this.depth + val;\n return val;\n }\n }, {\n key: \"parent\",\n get: function get() {\n return this.node(this.depth);\n }\n }, {\n key: \"doc\",\n get: function get() {\n return this.node(0);\n }\n }, {\n key: \"node\",\n value: function node(depth) {\n return this.path[this.resolveDepth(depth) * 3];\n }\n }, {\n key: \"index\",\n value: function index(depth) {\n return this.path[this.resolveDepth(depth) * 3 + 1];\n }\n }, {\n key: \"indexAfter\",\n value: function indexAfter(depth) {\n depth = this.resolveDepth(depth);\n return this.index(depth) + (depth == this.depth && !this.textOffset ? 0 : 1);\n }\n }, {\n key: \"start\",\n value: function start(depth) {\n depth = this.resolveDepth(depth);\n return depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n }\n }, {\n key: \"end\",\n value: function end(depth) {\n depth = this.resolveDepth(depth);\n return this.start(depth) + this.node(depth).content.size;\n }\n }, {\n key: \"before\",\n value: function before(depth) {\n depth = this.resolveDepth(depth);\n if (!depth) throw new RangeError(\"There is no position before the top-level node\");\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1];\n }\n }, {\n key: \"after\",\n value: function after(depth) {\n depth = this.resolveDepth(depth);\n if (!depth) throw new RangeError(\"There is no position after the top-level node\");\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1] + this.path[depth * 3].nodeSize;\n }\n }, {\n key: \"textOffset\",\n get: function get() {\n return this.pos - this.path[this.path.length - 1];\n }\n }, {\n key: \"nodeAfter\",\n get: function get() {\n var parent = this.parent,\n index = this.index(this.depth);\n if (index == parent.childCount) return null;\n var dOff = this.pos - this.path[this.path.length - 1],\n child = parent.child(index);\n return dOff ? parent.child(index).cut(dOff) : child;\n }\n }, {\n key: \"nodeBefore\",\n get: function get() {\n var index = this.index(this.depth);\n var dOff = this.pos - this.path[this.path.length - 1];\n if (dOff) return this.parent.child(index).cut(0, dOff);\n return index == 0 ? null : this.parent.child(index - 1);\n }\n }, {\n key: \"posAtIndex\",\n value: function posAtIndex(index, depth) {\n depth = this.resolveDepth(depth);\n var node = this.path[depth * 3],\n pos = depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n for (var i = 0; i < index; i++) pos += node.child(i).nodeSize;\n return pos;\n }\n }, {\n key: \"marks\",\n value: function marks() {\n var parent = this.parent,\n index = this.index();\n if (parent.content.size == 0) return Mark.none;\n if (this.textOffset) return parent.child(index).marks;\n var main = parent.maybeChild(index - 1),\n other = parent.maybeChild(index);\n if (!main) {\n var tmp = main;\n main = other;\n other = tmp;\n }\n var marks = main.marks;\n for (var i = 0; i < marks.length; i++) if (marks[i].type.spec.inclusive === false && (!other || !marks[i].isInSet(other.marks))) marks = marks[i--].removeFromSet(marks);\n return marks;\n }\n }, {\n key: \"marksAcross\",\n value: function marksAcross($end) {\n var after = this.parent.maybeChild(this.index());\n if (!after || !after.isInline) return null;\n var marks = after.marks,\n next = $end.parent.maybeChild($end.index());\n for (var i = 0; i < marks.length; i++) if (marks[i].type.spec.inclusive === false && (!next || !marks[i].isInSet(next.marks))) marks = marks[i--].removeFromSet(marks);\n return marks;\n }\n }, {\n key: \"sharedDepth\",\n value: function sharedDepth(pos) {\n for (var depth = this.depth; depth > 0; depth--) if (this.start(depth) <= pos && this.end(depth) >= pos) return depth;\n return 0;\n }\n }, {\n key: \"blockRange\",\n value: function blockRange() {\n var other = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this;\n var pred = arguments.length > 1 ? arguments[1] : undefined;\n if (other.pos < this.pos) return other.blockRange(this);\n for (var d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--) if (other.pos <= this.end(d) && (!pred || pred(this.node(d)))) return new NodeRange(this, other, d);\n return null;\n }\n }, {\n key: \"sameParent\",\n value: function sameParent(other) {\n return this.pos - this.parentOffset == other.pos - other.parentOffset;\n }\n }, {\n key: \"max\",\n value: function max(other) {\n return other.pos > this.pos ? other : this;\n }\n }, {\n key: \"min\",\n value: function min(other) {\n return other.pos < this.pos ? other : this;\n }\n }, {\n key: \"toString\",\n value: function toString() {\n var str = \"\";\n for (var i = 1; i <= this.depth; i++) str += (str ? \"/\" : \"\") + this.node(i).type.name + \"_\" + this.index(i - 1);\n return str + \":\" + this.parentOffset;\n }\n }], [{\n key: \"resolve\",\n value: function resolve(doc, pos) {\n if (!(pos >= 0 && pos <= doc.content.size)) throw new RangeError(\"Position \" + pos + \" out of range\");\n var path = [];\n var start = 0,\n parentOffset = pos;\n for (var node = doc;;) {\n var _node$content$findInd = node.content.findIndex(parentOffset),\n index = _node$content$findInd.index,\n offset = _node$content$findInd.offset;\n var rem = parentOffset - offset;\n path.push(node, index, start + offset);\n if (!rem) break;\n node = node.child(index);\n if (node.isText) break;\n parentOffset = rem - 1;\n start += offset + 1;\n }\n return new ResolvedPos(pos, path, parentOffset);\n }\n }, {\n key: \"resolveCached\",\n value: function resolveCached(doc, pos) {\n var cache = resolveCache.get(doc);\n if (cache) {\n for (var i = 0; i < cache.elts.length; i++) {\n var elt = cache.elts[i];\n if (elt.pos == pos) return elt;\n }\n } else {\n resolveCache.set(doc, cache = new ResolveCache());\n }\n var result = cache.elts[cache.i] = ResolvedPos.resolve(doc, pos);\n cache.i = (cache.i + 1) % resolveCacheSize;\n return result;\n }\n }]);\n return ResolvedPos;\n}();\nvar ResolveCache = _createClass(function ResolveCache() {\n _classCallCheck(this, ResolveCache);\n this.elts = [];\n this.i = 0;\n});\nvar resolveCacheSize = 12,\n resolveCache = new WeakMap();\nvar NodeRange = function () {\n function NodeRange($from, $to, depth) {\n _classCallCheck(this, NodeRange);\n this.$from = $from;\n this.$to = $to;\n this.depth = depth;\n }\n _createClass(NodeRange, [{\n key: \"start\",\n get: function get() {\n return this.$from.before(this.depth + 1);\n }\n }, {\n key: \"end\",\n get: function get() {\n return this.$to.after(this.depth + 1);\n }\n }, {\n key: \"parent\",\n get: function get() {\n return this.$from.node(this.depth);\n }\n }, {\n key: \"startIndex\",\n get: function get() {\n return this.$from.index(this.depth);\n }\n }, {\n key: \"endIndex\",\n get: function get() {\n return this.$to.indexAfter(this.depth);\n }\n }]);\n return NodeRange;\n}();\nvar emptyAttrs = Object.create(null);\nvar Node = function () {\n function Node(type, attrs, content) {\n var marks = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Mark.none;\n _classCallCheck(this, Node);\n this.type = type;\n this.attrs = attrs;\n this.marks = marks;\n this.content = content || Fragment.empty;\n }\n _createClass(Node, [{\n key: \"nodeSize\",\n get: function get() {\n return this.isLeaf ? 1 : 2 + this.content.size;\n }\n }, {\n key: \"childCount\",\n get: function get() {\n return this.content.childCount;\n }\n }, {\n key: \"child\",\n value: function child(index) {\n return this.content.child(index);\n }\n }, {\n key: \"maybeChild\",\n value: function maybeChild(index) {\n return this.content.maybeChild(index);\n }\n }, {\n key: \"forEach\",\n value: function forEach(f) {\n this.content.forEach(f);\n }\n }, {\n key: \"nodesBetween\",\n value: function nodesBetween(from, to, f) {\n var startPos = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n this.content.nodesBetween(from, to, f, startPos, this);\n }\n }, {\n key: \"descendants\",\n value: function descendants(f) {\n this.nodesBetween(0, this.content.size, f);\n }\n }, {\n key: \"textContent\",\n get: function get() {\n return this.isLeaf && this.type.spec.leafText ? this.type.spec.leafText(this) : this.textBetween(0, this.content.size, \"\");\n }\n }, {\n key: \"textBetween\",\n value: function textBetween(from, to, blockSeparator, leafText) {\n return this.content.textBetween(from, to, blockSeparator, leafText);\n }\n }, {\n key: \"firstChild\",\n get: function get() {\n return this.content.firstChild;\n }\n }, {\n key: \"lastChild\",\n get: function get() {\n return this.content.lastChild;\n }\n }, {\n key: \"eq\",\n value: function eq(other) {\n return this == other || this.sameMarkup(other) && this.content.eq(other.content);\n }\n }, {\n key: \"sameMarkup\",\n value: function sameMarkup(other) {\n return this.hasMarkup(other.type, other.attrs, other.marks);\n }\n }, {\n key: \"hasMarkup\",\n value: function hasMarkup(type, attrs, marks) {\n return this.type == type && compareDeep(this.attrs, attrs || type.defaultAttrs || emptyAttrs) && Mark.sameSet(this.marks, marks || Mark.none);\n }\n }, {\n key: \"copy\",\n value: function copy() {\n var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n if (content == this.content) return this;\n return new Node(this.type, this.attrs, content, this.marks);\n }\n }, {\n key: \"mark\",\n value: function mark(marks) {\n return marks == this.marks ? this : new Node(this.type, this.attrs, this.content, marks);\n }\n }, {\n key: \"cut\",\n value: function cut(from) {\n var to = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.content.size;\n if (from == 0 && to == this.content.size) return this;\n return this.copy(this.content.cut(from, to));\n }\n }, {\n key: \"slice\",\n value: function slice(from) {\n var to = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.content.size;\n var includeParents = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n if (from == to) return Slice.empty;\n var $from = this.resolve(from),\n $to = this.resolve(to);\n var depth = includeParents ? 0 : $from.sharedDepth(to);\n var start = $from.start(depth),\n node = $from.node(depth);\n var content = node.content.cut($from.pos - start, $to.pos - start);\n return new Slice(content, $from.depth - depth, $to.depth - depth);\n }\n }, {\n key: \"replace\",\n value: function replace(from, to, slice) {\n return _replace(this.resolve(from), this.resolve(to), slice);\n }\n }, {\n key: \"nodeAt\",\n value: function nodeAt(pos) {\n for (var node = this;;) {\n var _node$content$findInd2 = node.content.findIndex(pos),\n index = _node$content$findInd2.index,\n offset = _node$content$findInd2.offset;\n node = node.maybeChild(index);\n if (!node) return null;\n if (offset == pos || node.isText) return node;\n pos -= offset + 1;\n }\n }\n }, {\n key: \"childAfter\",\n value: function childAfter(pos) {\n var _this$content$findInd = this.content.findIndex(pos),\n index = _this$content$findInd.index,\n offset = _this$content$findInd.offset;\n return {\n node: this.content.maybeChild(index),\n index: index,\n offset: offset\n };\n }\n }, {\n key: \"childBefore\",\n value: function childBefore(pos) {\n if (pos == 0) return {\n node: null,\n index: 0,\n offset: 0\n };\n var _this$content$findInd2 = this.content.findIndex(pos),\n index = _this$content$findInd2.index,\n offset = _this$content$findInd2.offset;\n if (offset < pos) return {\n node: this.content.child(index),\n index: index,\n offset: offset\n };\n var node = this.content.child(index - 1);\n return {\n node: node,\n index: index - 1,\n offset: offset - node.nodeSize\n };\n }\n }, {\n key: \"resolve\",\n value: function resolve(pos) {\n return ResolvedPos.resolveCached(this, pos);\n }\n }, {\n key: \"resolveNoCache\",\n value: function resolveNoCache(pos) {\n return ResolvedPos.resolve(this, pos);\n }\n }, {\n key: \"rangeHasMark\",\n value: function rangeHasMark(from, to, type) {\n var found = false;\n if (to > from) this.nodesBetween(from, to, function (node) {\n if (type.isInSet(node.marks)) found = true;\n return !found;\n });\n return found;\n }\n }, {\n key: \"isBlock\",\n get: function get() {\n return this.type.isBlock;\n }\n }, {\n key: \"isTextblock\",\n get: function get() {\n return this.type.isTextblock;\n }\n }, {\n key: \"inlineContent\",\n get: function get() {\n return this.type.inlineContent;\n }\n }, {\n key: \"isInline\",\n get: function get() {\n return this.type.isInline;\n }\n }, {\n key: \"isText\",\n get: function get() {\n return this.type.isText;\n }\n }, {\n key: \"isLeaf\",\n get: function get() {\n return this.type.isLeaf;\n }\n }, {\n key: \"isAtom\",\n get: function get() {\n return this.type.isAtom;\n }\n }, {\n key: \"toString\",\n value: function toString() {\n if (this.type.spec.toDebugString) return this.type.spec.toDebugString(this);\n var name = this.type.name;\n if (this.content.size) name += \"(\" + this.content.toStringInner() + \")\";\n return wrapMarks(this.marks, name);\n }\n }, {\n key: \"contentMatchAt\",\n value: function contentMatchAt(index) {\n var match = this.type.contentMatch.matchFragment(this.content, 0, index);\n if (!match) throw new Error(\"Called contentMatchAt on a node with invalid content\");\n return match;\n }\n }, {\n key: \"canReplace\",\n value: function canReplace(from, to) {\n var replacement = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Fragment.empty;\n var start = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var end = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : replacement.childCount;\n var one = this.contentMatchAt(from).matchFragment(replacement, start, end);\n var two = one && one.matchFragment(this.content, to);\n if (!two || !two.validEnd) return false;\n for (var i = start; i < end; i++) if (!this.type.allowsMarks(replacement.child(i).marks)) return false;\n return true;\n }\n }, {\n key: \"canReplaceWith\",\n value: function canReplaceWith(from, to, type, marks) {\n if (marks && !this.type.allowsMarks(marks)) return false;\n var start = this.contentMatchAt(from).matchType(type);\n var end = start && start.matchFragment(this.content, to);\n return end ? end.validEnd : false;\n }\n }, {\n key: \"canAppend\",\n value: function canAppend(other) {\n if (other.content.size) return this.canReplace(this.childCount, this.childCount, other.content);else return this.type.compatibleContent(other.type);\n }\n }, {\n key: \"check\",\n value: function check() {\n this.type.checkContent(this.content);\n this.type.checkAttrs(this.attrs);\n var copy = Mark.none;\n for (var i = 0; i < this.marks.length; i++) {\n var mark = this.marks[i];\n mark.type.checkAttrs(mark.attrs);\n copy = mark.addToSet(copy);\n }\n if (!Mark.sameSet(copy, this.marks)) throw new RangeError(\"Invalid collection of marks for node \".concat(this.type.name, \": \").concat(this.marks.map(function (m) {\n return m.type.name;\n })));\n this.content.forEach(function (node) {\n return node.check();\n });\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n var obj = {\n type: this.type.name\n };\n for (var _ in this.attrs) {\n obj.attrs = this.attrs;\n break;\n }\n if (this.content.size) obj.content = this.content.toJSON();\n if (this.marks.length) obj.marks = this.marks.map(function (n) {\n return n.toJSON();\n });\n return obj;\n }\n }], [{\n key: \"fromJSON\",\n value: function fromJSON(schema, json) {\n if (!json) throw new RangeError(\"Invalid input for Node.fromJSON\");\n var marks = undefined;\n if (json.marks) {\n if (!Array.isArray(json.marks)) throw new RangeError(\"Invalid mark data for Node.fromJSON\");\n marks = json.marks.map(schema.markFromJSON);\n }\n if (json.type == \"text\") {\n if (typeof json.text != \"string\") throw new RangeError(\"Invalid text node in JSON\");\n return schema.text(json.text, marks);\n }\n var content = Fragment.fromJSON(schema, json.content);\n var node = schema.nodeType(json.type).create(json.attrs, content, marks);\n node.type.checkAttrs(node.attrs);\n return node;\n }\n }]);\n return Node;\n}();\nNode.prototype.text = undefined;\nvar TextNode = function (_Node) {\n _inherits(TextNode, _Node);\n var _super2 = _createSuper(TextNode);\n function TextNode(type, attrs, content, marks) {\n var _this;\n _classCallCheck(this, TextNode);\n _this = _super2.call(this, type, attrs, null, marks);\n if (!content) throw new RangeError(\"Empty text nodes are not allowed\");\n _this.text = content;\n return _this;\n }\n _createClass(TextNode, [{\n key: \"toString\",\n value: function toString() {\n if (this.type.spec.toDebugString) return this.type.spec.toDebugString(this);\n return wrapMarks(this.marks, JSON.stringify(this.text));\n }\n }, {\n key: \"textContent\",\n get: function get() {\n return this.text;\n }\n }, {\n key: \"textBetween\",\n value: function textBetween(from, to) {\n return this.text.slice(from, to);\n }\n }, {\n key: \"nodeSize\",\n get: function get() {\n return this.text.length;\n }\n }, {\n key: \"mark\",\n value: function mark(marks) {\n return marks == this.marks ? this : new TextNode(this.type, this.attrs, this.text, marks);\n }\n }, {\n key: \"withText\",\n value: function withText(text) {\n if (text == this.text) return this;\n return new TextNode(this.type, this.attrs, text, this.marks);\n }\n }, {\n key: \"cut\",\n value: function cut() {\n var from = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var to = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.text.length;\n if (from == 0 && to == this.text.length) return this;\n return this.withText(this.text.slice(from, to));\n }\n }, {\n key: \"eq\",\n value: function eq(other) {\n return this.sameMarkup(other) && this.text == other.text;\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n var base = _get(_getPrototypeOf(TextNode.prototype), \"toJSON\", this).call(this);\n base.text = this.text;\n return base;\n }\n }]);\n return TextNode;\n}(Node);\nfunction wrapMarks(marks, str) {\n for (var i = marks.length - 1; i >= 0; i--) str = marks[i].type.name + \"(\" + str + \")\";\n return str;\n}\nvar ContentMatch = function () {\n function ContentMatch(validEnd) {\n _classCallCheck(this, ContentMatch);\n this.validEnd = validEnd;\n this.next = [];\n this.wrapCache = [];\n }\n _createClass(ContentMatch, [{\n key: \"matchType\",\n value: function matchType(type) {\n for (var i = 0; i < this.next.length; i++) if (this.next[i].type == type) return this.next[i].next;\n return null;\n }\n }, {\n key: \"matchFragment\",\n value: function matchFragment(frag) {\n var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : frag.childCount;\n var cur = this;\n for (var i = start; cur && i < end; i++) cur = cur.matchType(frag.child(i).type);\n return cur;\n }\n }, {\n key: \"inlineContent\",\n get: function get() {\n return this.next.length != 0 && this.next[0].type.isInline;\n }\n }, {\n key: \"defaultType\",\n get: function get() {\n for (var i = 0; i < this.next.length; i++) {\n var type = this.next[i].type;\n if (!(type.isText || type.hasRequiredAttrs())) return type;\n }\n return null;\n }\n }, {\n key: \"compatible\",\n value: function compatible(other) {\n for (var i = 0; i < this.next.length; i++) for (var j = 0; j < other.next.length; j++) if (this.next[i].type == other.next[j].type) return true;\n return false;\n }\n }, {\n key: \"fillBefore\",\n value: function fillBefore(after) {\n var toEnd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var startIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var seen = [this];\n function search(match, types) {\n var finished = match.matchFragment(after, startIndex);\n if (finished && (!toEnd || finished.validEnd)) return Fragment.from(types.map(function (tp) {\n return tp.createAndFill();\n }));\n for (var i = 0; i < match.next.length; i++) {\n var _match$next$i = match.next[i],\n type = _match$next$i.type,\n next = _match$next$i.next;\n if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {\n seen.push(next);\n var _found = search(next, types.concat(type));\n if (_found) return _found;\n }\n }\n return null;\n }\n return search(this, []);\n }\n }, {\n key: \"findWrapping\",\n value: function findWrapping(target) {\n for (var i = 0; i < this.wrapCache.length; i += 2) if (this.wrapCache[i] == target) return this.wrapCache[i + 1];\n var computed = this.computeWrapping(target);\n this.wrapCache.push(target, computed);\n return computed;\n }\n }, {\n key: \"computeWrapping\",\n value: function computeWrapping(target) {\n var seen = Object.create(null),\n active = [{\n match: this,\n type: null,\n via: null\n }];\n while (active.length) {\n var current = active.shift(),\n match = current.match;\n if (match.matchType(target)) {\n var result = [];\n for (var obj = current; obj.type; obj = obj.via) result.push(obj.type);\n return result.reverse();\n }\n for (var i = 0; i < match.next.length; i++) {\n var _match$next$i2 = match.next[i],\n type = _match$next$i2.type,\n next = _match$next$i2.next;\n if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || next.validEnd)) {\n active.push({\n match: type.contentMatch,\n type: type,\n via: current\n });\n seen[type.name] = true;\n }\n }\n }\n return null;\n }\n }, {\n key: \"edgeCount\",\n get: function get() {\n return this.next.length;\n }\n }, {\n key: \"edge\",\n value: function edge(n) {\n if (n >= this.next.length) throw new RangeError(\"There's no \".concat(n, \"th edge in this content match\"));\n return this.next[n];\n }\n }, {\n key: \"toString\",\n value: function toString() {\n var seen = [];\n function scan(m) {\n seen.push(m);\n for (var i = 0; i < m.next.length; i++) if (seen.indexOf(m.next[i].next) == -1) scan(m.next[i].next);\n }\n scan(this);\n return seen.map(function (m, i) {\n var out = i + (m.validEnd ? \"*\" : \" \") + \" \";\n for (var _i = 0; _i < m.next.length; _i++) out += (_i ? \", \" : \"\") + m.next[_i].type.name + \"->\" + seen.indexOf(m.next[_i].next);\n return out;\n }).join(\"\\n\");\n }\n }], [{\n key: \"parse\",\n value: function parse(string, nodeTypes) {\n var stream = new TokenStream(string, nodeTypes);\n if (stream.next == null) return ContentMatch.empty;\n var expr = parseExpr(stream);\n if (stream.next) stream.err(\"Unexpected trailing text\");\n var match = dfa(nfa(expr));\n checkForDeadEnds(match, stream);\n return match;\n }\n }]);\n return ContentMatch;\n}();\nContentMatch.empty = new ContentMatch(true);\nvar TokenStream = function () {\n function TokenStream(string, nodeTypes) {\n _classCallCheck(this, TokenStream);\n this.string = string;\n this.nodeTypes = nodeTypes;\n this.inline = null;\n this.pos = 0;\n this.tokens = string.split(/\\s*(?=\\b|\\W|$)/);\n if (this.tokens[this.tokens.length - 1] == \"\") this.tokens.pop();\n if (this.tokens[0] == \"\") this.tokens.shift();\n }\n _createClass(TokenStream, [{\n key: \"next\",\n get: function get() {\n return this.tokens[this.pos];\n }\n }, {\n key: \"eat\",\n value: function eat(tok) {\n return this.next == tok && (this.pos++ || true);\n }\n }, {\n key: \"err\",\n value: function err(str) {\n throw new SyntaxError(str + \" (in content expression '\" + this.string + \"')\");\n }\n }]);\n return TokenStream;\n}();\nfunction parseExpr(stream) {\n var exprs = [];\n do {\n exprs.push(parseExprSeq(stream));\n } while (stream.eat(\"|\"));\n return exprs.length == 1 ? exprs[0] : {\n type: \"choice\",\n exprs: exprs\n };\n}\nfunction parseExprSeq(stream) {\n var exprs = [];\n do {\n exprs.push(parseExprSubscript(stream));\n } while (stream.next && stream.next != \")\" && stream.next != \"|\");\n return exprs.length == 1 ? exprs[0] : {\n type: \"seq\",\n exprs: exprs\n };\n}\nfunction parseExprSubscript(stream) {\n var expr = parseExprAtom(stream);\n for (;;) {\n if (stream.eat(\"+\")) expr = {\n type: \"plus\",\n expr: expr\n };else if (stream.eat(\"*\")) expr = {\n type: \"star\",\n expr: expr\n };else if (stream.eat(\"?\")) expr = {\n type: \"opt\",\n expr: expr\n };else if (stream.eat(\"{\")) expr = parseExprRange(stream, expr);else break;\n }\n return expr;\n}\nfunction parseNum(stream) {\n if (/\\D/.test(stream.next)) stream.err(\"Expected number, got '\" + stream.next + \"'\");\n var result = Number(stream.next);\n stream.pos++;\n return result;\n}\nfunction parseExprRange(stream, expr) {\n var min = parseNum(stream),\n max = min;\n if (stream.eat(\",\")) {\n if (stream.next != \"}\") max = parseNum(stream);else max = -1;\n }\n if (!stream.eat(\"}\")) stream.err(\"Unclosed braced range\");\n return {\n type: \"range\",\n min: min,\n max: max,\n expr: expr\n };\n}\nfunction resolveName(stream, name) {\n var types = stream.nodeTypes,\n type = types[name];\n if (type) return [type];\n var result = [];\n for (var typeName in types) {\n var _type = types[typeName];\n if (_type.isInGroup(name)) result.push(_type);\n }\n if (result.length == 0) stream.err(\"No node type or group '\" + name + \"' found\");\n return result;\n}\nfunction parseExprAtom(stream) {\n if (stream.eat(\"(\")) {\n var expr = parseExpr(stream);\n if (!stream.eat(\")\")) stream.err(\"Missing closing paren\");\n return expr;\n } else if (!/\\W/.test(stream.next)) {\n var exprs = resolveName(stream, stream.next).map(function (type) {\n if (stream.inline == null) stream.inline = type.isInline;else if (stream.inline != type.isInline) stream.err(\"Mixing inline and block content\");\n return {\n type: \"name\",\n value: type\n };\n });\n stream.pos++;\n return exprs.length == 1 ? exprs[0] : {\n type: \"choice\",\n exprs: exprs\n };\n } else {\n stream.err(\"Unexpected token '\" + stream.next + \"'\");\n }\n}\nfunction nfa(expr) {\n var nfa = [[]];\n connect(compile(expr, 0), node());\n return nfa;\n function node() {\n return nfa.push([]) - 1;\n }\n function edge(from, to, term) {\n var edge = {\n term: term,\n to: to\n };\n nfa[from].push(edge);\n return edge;\n }\n function connect(edges, to) {\n edges.forEach(function (edge) {\n return edge.to = to;\n });\n }\n function compile(expr, from) {\n if (expr.type == \"choice\") {\n return expr.exprs.reduce(function (out, expr) {\n return out.concat(compile(expr, from));\n }, []);\n } else if (expr.type == \"seq\") {\n for (var i = 0;; i++) {\n var next = compile(expr.exprs[i], from);\n if (i == expr.exprs.length - 1) return next;\n connect(next, from = node());\n }\n } else if (expr.type == \"star\") {\n var loop = node();\n edge(from, loop);\n connect(compile(expr.expr, loop), loop);\n return [edge(loop)];\n } else if (expr.type == \"plus\") {\n var _loop = node();\n connect(compile(expr.expr, from), _loop);\n connect(compile(expr.expr, _loop), _loop);\n return [edge(_loop)];\n } else if (expr.type == \"opt\") {\n return [edge(from)].concat(compile(expr.expr, from));\n } else if (expr.type == \"range\") {\n var cur = from;\n for (var _i2 = 0; _i2 < expr.min; _i2++) {\n var _next = node();\n connect(compile(expr.expr, cur), _next);\n cur = _next;\n }\n if (expr.max == -1) {\n connect(compile(expr.expr, cur), cur);\n } else {\n for (var _i3 = expr.min; _i3 < expr.max; _i3++) {\n var _next2 = node();\n edge(cur, _next2);\n connect(compile(expr.expr, cur), _next2);\n cur = _next2;\n }\n }\n return [edge(cur)];\n } else if (expr.type == \"name\") {\n return [edge(from, undefined, expr.value)];\n } else {\n throw new Error(\"Unknown expr type\");\n }\n }\n}\nfunction cmp(a, b) {\n return b - a;\n}\nfunction nullFrom(nfa, node) {\n var result = [];\n scan(node);\n return result.sort(cmp);\n function scan(node) {\n var edges = nfa[node];\n if (edges.length == 1 && !edges[0].term) return scan(edges[0].to);\n result.push(node);\n for (var i = 0; i < edges.length; i++) {\n var _edges$i = edges[i],\n term = _edges$i.term,\n to = _edges$i.to;\n if (!term && result.indexOf(to) == -1) scan(to);\n }\n }\n}\nfunction dfa(nfa) {\n var labeled = Object.create(null);\n return explore(nullFrom(nfa, 0));\n function explore(states) {\n var out = [];\n states.forEach(function (node) {\n nfa[node].forEach(function (_ref) {\n var term = _ref.term,\n to = _ref.to;\n if (!term) return;\n var set;\n for (var i = 0; i < out.length; i++) if (out[i][0] == term) set = out[i][1];\n nullFrom(nfa, to).forEach(function (node) {\n if (!set) out.push([term, set = []]);\n if (set.indexOf(node) == -1) set.push(node);\n });\n });\n });\n var state = labeled[states.join(\",\")] = new ContentMatch(states.indexOf(nfa.length - 1) > -1);\n for (var i = 0; i < out.length; i++) {\n var _states = out[i][1].sort(cmp);\n state.next.push({\n type: out[i][0],\n next: labeled[_states.join(\",\")] || explore(_states)\n });\n }\n return state;\n }\n}\nfunction checkForDeadEnds(match, stream) {\n for (var i = 0, work = [match]; i < work.length; i++) {\n var state = work[i],\n dead = !state.validEnd,\n nodes = [];\n for (var j = 0; j < state.next.length; j++) {\n var _state$next$j = state.next[j],\n type = _state$next$j.type,\n next = _state$next$j.next;\n nodes.push(type.name);\n if (dead && !(type.isText || type.hasRequiredAttrs())) dead = false;\n if (work.indexOf(next) == -1) work.push(next);\n }\n if (dead) stream.err(\"Only non-generatable nodes (\" + nodes.join(\", \") + \") in a required position (see https://prosemirror.net/docs/guide/#generatable)\");\n }\n}\nfunction defaultAttrs(attrs) {\n var defaults = Object.create(null);\n for (var attrName in attrs) {\n var attr = attrs[attrName];\n if (!attr.hasDefault) return null;\n defaults[attrName] = attr[\"default\"];\n }\n return defaults;\n}\nfunction _computeAttrs(attrs, value) {\n var built = Object.create(null);\n for (var name in attrs) {\n var given = value && value[name];\n if (given === undefined) {\n var attr = attrs[name];\n if (attr.hasDefault) given = attr[\"default\"];else throw new RangeError(\"No value supplied for attribute \" + name);\n }\n built[name] = given;\n }\n return built;\n}\nfunction _checkAttrs(attrs, values, type, name) {\n for (var _name in values) if (!(_name in attrs)) throw new RangeError(\"Unsupported attribute \".concat(_name, \" for \").concat(type, \" of type \").concat(_name));\n for (var _name2 in attrs) {\n var attr = attrs[_name2];\n if (attr.validate) attr.validate(values[_name2]);\n }\n}\nfunction initAttrs(typeName, attrs) {\n var result = Object.create(null);\n if (attrs) for (var name in attrs) result[name] = new Attribute(typeName, name, attrs[name]);\n return result;\n}\nvar NodeType = function () {\n function NodeType(name, schema, spec) {\n _classCallCheck(this, NodeType);\n this.name = name;\n this.schema = schema;\n this.spec = spec;\n this.markSet = null;\n this.groups = spec.group ? spec.group.split(\" \") : [];\n this.attrs = initAttrs(name, spec.attrs);\n this.defaultAttrs = defaultAttrs(this.attrs);\n this.contentMatch = null;\n this.inlineContent = null;\n this.isBlock = !(spec.inline || name == \"text\");\n this.isText = name == \"text\";\n }\n _createClass(NodeType, [{\n key: \"isInline\",\n get: function get() {\n return !this.isBlock;\n }\n }, {\n key: \"isTextblock\",\n get: function get() {\n return this.isBlock && this.inlineContent;\n }\n }, {\n key: \"isLeaf\",\n get: function get() {\n return this.contentMatch == ContentMatch.empty;\n }\n }, {\n key: \"isAtom\",\n get: function get() {\n return this.isLeaf || !!this.spec.atom;\n }\n }, {\n key: \"isInGroup\",\n value: function isInGroup(group) {\n return this.groups.indexOf(group) > -1;\n }\n }, {\n key: \"whitespace\",\n get: function get() {\n return this.spec.whitespace || (this.spec.code ? \"pre\" : \"normal\");\n }\n }, {\n key: \"hasRequiredAttrs\",\n value: function hasRequiredAttrs() {\n for (var n in this.attrs) if (this.attrs[n].isRequired) return true;\n return false;\n }\n }, {\n key: \"compatibleContent\",\n value: function compatibleContent(other) {\n return this == other || this.contentMatch.compatible(other.contentMatch);\n }\n }, {\n key: \"computeAttrs\",\n value: function computeAttrs(attrs) {\n if (!attrs && this.defaultAttrs) return this.defaultAttrs;else return _computeAttrs(this.attrs, attrs);\n }\n }, {\n key: \"create\",\n value: function create() {\n var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var content = arguments.length > 1 ? arguments[1] : undefined;\n var marks = arguments.length > 2 ? arguments[2] : undefined;\n if (this.isText) throw new Error(\"NodeType.create can't construct text nodes\");\n return new Node(this, this.computeAttrs(attrs), Fragment.from(content), Mark.setFrom(marks));\n }\n }, {\n key: \"createChecked\",\n value: function createChecked() {\n var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var content = arguments.length > 1 ? arguments[1] : undefined;\n var marks = arguments.length > 2 ? arguments[2] : undefined;\n content = Fragment.from(content);\n this.checkContent(content);\n return new Node(this, this.computeAttrs(attrs), content, Mark.setFrom(marks));\n }\n }, {\n key: \"createAndFill\",\n value: function createAndFill() {\n var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var content = arguments.length > 1 ? arguments[1] : undefined;\n var marks = arguments.length > 2 ? arguments[2] : undefined;\n attrs = this.computeAttrs(attrs);\n content = Fragment.from(content);\n if (content.size) {\n var before = this.contentMatch.fillBefore(content);\n if (!before) return null;\n content = before.append(content);\n }\n var matched = this.contentMatch.matchFragment(content);\n var after = matched && matched.fillBefore(Fragment.empty, true);\n if (!after) return null;\n return new Node(this, attrs, content.append(after), Mark.setFrom(marks));\n }\n }, {\n key: \"validContent\",\n value: function validContent(content) {\n var result = this.contentMatch.matchFragment(content);\n if (!result || !result.validEnd) return false;\n for (var i = 0; i < content.childCount; i++) if (!this.allowsMarks(content.child(i).marks)) return false;\n return true;\n }\n }, {\n key: \"checkContent\",\n value: function checkContent(content) {\n if (!this.validContent(content)) throw new RangeError(\"Invalid content for node \".concat(this.name, \": \").concat(content.toString().slice(0, 50)));\n }\n }, {\n key: \"checkAttrs\",\n value: function checkAttrs(attrs) {\n _checkAttrs(this.attrs, attrs, \"node\", this.name);\n }\n }, {\n key: \"allowsMarkType\",\n value: function allowsMarkType(markType) {\n return this.markSet == null || this.markSet.indexOf(markType) > -1;\n }\n }, {\n key: \"allowsMarks\",\n value: function allowsMarks(marks) {\n if (this.markSet == null) return true;\n for (var i = 0; i < marks.length; i++) if (!this.allowsMarkType(marks[i].type)) return false;\n return true;\n }\n }, {\n key: \"allowedMarks\",\n value: function allowedMarks(marks) {\n if (this.markSet == null) return marks;\n var copy;\n for (var i = 0; i < marks.length; i++) {\n if (!this.allowsMarkType(marks[i].type)) {\n if (!copy) copy = marks.slice(0, i);\n } else if (copy) {\n copy.push(marks[i]);\n }\n }\n return !copy ? marks : copy.length ? copy : Mark.none;\n }\n }], [{\n key: \"compile\",\n value: function compile(nodes, schema) {\n var result = Object.create(null);\n nodes.forEach(function (name, spec) {\n return result[name] = new NodeType(name, schema, spec);\n });\n var topType = schema.spec.topNode || \"doc\";\n if (!result[topType]) throw new RangeError(\"Schema is missing its top node type ('\" + topType + \"')\");\n if (!result.text) throw new RangeError(\"Every schema needs a 'text' type\");\n for (var _ in result.text.attrs) throw new RangeError(\"The text node type should not have attributes\");\n return result;\n }\n }]);\n return NodeType;\n}();\nfunction validateType(typeName, attrName, type) {\n var types = type.split(\"|\");\n return function (value) {\n var name = value === null ? \"null\" : _typeof(value);\n if (types.indexOf(name) < 0) throw new RangeError(\"Expected value of type \".concat(types, \" for attribute \").concat(attrName, \" on type \").concat(typeName, \", got \").concat(name));\n };\n}\nvar Attribute = function () {\n function Attribute(typeName, attrName, options) {\n _classCallCheck(this, Attribute);\n this.hasDefault = Object.prototype.hasOwnProperty.call(options, \"default\");\n this[\"default\"] = options[\"default\"];\n this.validate = typeof options.validate == \"string\" ? validateType(typeName, attrName, options.validate) : options.validate;\n }\n _createClass(Attribute, [{\n key: \"isRequired\",\n get: function get() {\n return !this.hasDefault;\n }\n }]);\n return Attribute;\n}();\nvar MarkType = function () {\n function MarkType(name, rank, schema, spec) {\n _classCallCheck(this, MarkType);\n this.name = name;\n this.rank = rank;\n this.schema = schema;\n this.spec = spec;\n this.attrs = initAttrs(name, spec.attrs);\n this.excluded = null;\n var defaults = defaultAttrs(this.attrs);\n this.instance = defaults ? new Mark(this, defaults) : null;\n }\n _createClass(MarkType, [{\n key: \"create\",\n value: function create() {\n var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n if (!attrs && this.instance) return this.instance;\n return new Mark(this, _computeAttrs(this.attrs, attrs));\n }\n }, {\n key: \"removeFromSet\",\n value: function removeFromSet(set) {\n for (var i = 0; i < set.length; i++) if (set[i].type == this) {\n set = set.slice(0, i).concat(set.slice(i + 1));\n i--;\n }\n return set;\n }\n }, {\n key: \"isInSet\",\n value: function isInSet(set) {\n for (var i = 0; i < set.length; i++) if (set[i].type == this) return set[i];\n }\n }, {\n key: \"checkAttrs\",\n value: function checkAttrs(attrs) {\n _checkAttrs(this.attrs, attrs, \"mark\", this.name);\n }\n }, {\n key: \"excludes\",\n value: function excludes(other) {\n return this.excluded.indexOf(other) > -1;\n }\n }], [{\n key: \"compile\",\n value: function compile(marks, schema) {\n var result = Object.create(null),\n rank = 0;\n marks.forEach(function (name, spec) {\n return result[name] = new MarkType(name, rank++, schema, spec);\n });\n return result;\n }\n }]);\n return MarkType;\n}();\nvar Schema = function () {\n function Schema(spec) {\n _classCallCheck(this, Schema);\n this.linebreakReplacement = null;\n this.cached = Object.create(null);\n var instanceSpec = this.spec = {};\n for (var prop in spec) instanceSpec[prop] = spec[prop];\n instanceSpec.nodes = OrderedMap.from(spec.nodes), instanceSpec.marks = OrderedMap.from(spec.marks || {}), this.nodes = NodeType.compile(this.spec.nodes, this);\n this.marks = MarkType.compile(this.spec.marks, this);\n var contentExprCache = Object.create(null);\n for (var _prop in this.nodes) {\n if (_prop in this.marks) throw new RangeError(_prop + \" can not be both a node and a mark\");\n var type = this.nodes[_prop],\n contentExpr = type.spec.content || \"\",\n markExpr = type.spec.marks;\n type.contentMatch = contentExprCache[contentExpr] || (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));\n type.inlineContent = type.contentMatch.inlineContent;\n if (type.spec.linebreakReplacement) {\n if (this.linebreakReplacement) throw new RangeError(\"Multiple linebreak nodes defined\");\n if (!type.isInline || !type.isLeaf) throw new RangeError(\"Linebreak replacement nodes must be inline leaf nodes\");\n this.linebreakReplacement = type;\n }\n type.markSet = markExpr == \"_\" ? null : markExpr ? gatherMarks(this, markExpr.split(\" \")) : markExpr == \"\" || !type.inlineContent ? [] : null;\n }\n for (var _prop2 in this.marks) {\n var _type2 = this.marks[_prop2],\n excl = _type2.spec.excludes;\n _type2.excluded = excl == null ? [_type2] : excl == \"\" ? [] : gatherMarks(this, excl.split(\" \"));\n }\n this.nodeFromJSON = this.nodeFromJSON.bind(this);\n this.markFromJSON = this.markFromJSON.bind(this);\n this.topNodeType = this.nodes[this.spec.topNode || \"doc\"];\n this.cached.wrappings = Object.create(null);\n }\n _createClass(Schema, [{\n key: \"node\",\n value: function node(type) {\n var attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var content = arguments.length > 2 ? arguments[2] : undefined;\n var marks = arguments.length > 3 ? arguments[3] : undefined;\n if (typeof type == \"string\") type = this.nodeType(type);else if (!(type instanceof NodeType)) throw new RangeError(\"Invalid node type: \" + type);else if (type.schema != this) throw new RangeError(\"Node type from different schema used (\" + type.name + \")\");\n return type.createChecked(attrs, content, marks);\n }\n }, {\n key: \"text\",\n value: function text(_text, marks) {\n var type = this.nodes.text;\n return new TextNode(type, type.defaultAttrs, _text, Mark.setFrom(marks));\n }\n }, {\n key: \"mark\",\n value: function mark(type, attrs) {\n if (typeof type == \"string\") type = this.marks[type];\n return type.create(attrs);\n }\n }, {\n key: \"nodeFromJSON\",\n value: function nodeFromJSON(json) {\n return Node.fromJSON(this, json);\n }\n }, {\n key: \"markFromJSON\",\n value: function markFromJSON(json) {\n return Mark.fromJSON(this, json);\n }\n }, {\n key: \"nodeType\",\n value: function nodeType(name) {\n var found = this.nodes[name];\n if (!found) throw new RangeError(\"Unknown node type: \" + name);\n return found;\n }\n }]);\n return Schema;\n}();\nfunction gatherMarks(schema, marks) {\n var found = [];\n for (var i = 0; i < marks.length; i++) {\n var name = marks[i],\n mark = schema.marks[name],\n ok = mark;\n if (mark) {\n found.push(mark);\n } else {\n for (var prop in schema.marks) {\n var _mark = schema.marks[prop];\n if (name == \"_\" || _mark.spec.group && _mark.spec.group.split(\" \").indexOf(name) > -1) found.push(ok = _mark);\n }\n }\n if (!ok) throw new SyntaxError(\"Unknown mark type: '\" + marks[i] + \"'\");\n }\n return found;\n}\nfunction isTagRule(rule) {\n return rule.tag != null;\n}\nfunction isStyleRule(rule) {\n return rule.style != null;\n}\nvar DOMParser = function () {\n function DOMParser(schema, rules) {\n var _this2 = this;\n _classCallCheck(this, DOMParser);\n this.schema = schema;\n this.rules = rules;\n this.tags = [];\n this.styles = [];\n var matchedStyles = this.matchedStyles = [];\n rules.forEach(function (rule) {\n if (isTagRule(rule)) {\n _this2.tags.push(rule);\n } else if (isStyleRule(rule)) {\n var prop = /[^=]*/.exec(rule.style)[0];\n if (matchedStyles.indexOf(prop) < 0) matchedStyles.push(prop);\n _this2.styles.push(rule);\n }\n });\n this.normalizeLists = !this.tags.some(function (r) {\n if (!/^(ul|ol)\\b/.test(r.tag) || !r.node) return false;\n var node = schema.nodes[r.node];\n return node.contentMatch.matchType(node);\n });\n }\n _createClass(DOMParser, [{\n key: \"parse\",\n value: function parse(dom) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var context = new ParseContext(this, options, false);\n context.addAll(dom, Mark.none, options.from, options.to);\n return context.finish();\n }\n }, {\n key: \"parseSlice\",\n value: function parseSlice(dom) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var context = new ParseContext(this, options, true);\n context.addAll(dom, Mark.none, options.from, options.to);\n return Slice.maxOpen(context.finish());\n }\n }, {\n key: \"matchTag\",\n value: function matchTag(dom, context, after) {\n for (var i = after ? this.tags.indexOf(after) + 1 : 0; i < this.tags.length; i++) {\n var rule = this.tags[i];\n if (matches(dom, rule.tag) && (rule.namespace === undefined || dom.namespaceURI == rule.namespace) && (!rule.context || context.matchesContext(rule.context))) {\n if (rule.getAttrs) {\n var result = rule.getAttrs(dom);\n if (result === false) continue;\n rule.attrs = result || undefined;\n }\n return rule;\n }\n }\n }\n }, {\n key: \"matchStyle\",\n value: function matchStyle(prop, value, context, after) {\n for (var i = after ? this.styles.indexOf(after) + 1 : 0; i < this.styles.length; i++) {\n var rule = this.styles[i],\n style = rule.style;\n if (style.indexOf(prop) != 0 || rule.context && !context.matchesContext(rule.context) || style.length > prop.length && (style.charCodeAt(prop.length) != 61 || style.slice(prop.length + 1) != value)) continue;\n if (rule.getAttrs) {\n var result = rule.getAttrs(value);\n if (result === false) continue;\n rule.attrs = result || undefined;\n }\n return rule;\n }\n }\n }], [{\n key: \"schemaRules\",\n value: function schemaRules(schema) {\n var result = [];\n function insert(rule) {\n var priority = rule.priority == null ? 50 : rule.priority,\n i = 0;\n for (; i < result.length; i++) {\n var next = result[i],\n nextPriority = next.priority == null ? 50 : next.priority;\n if (nextPriority < priority) break;\n }\n result.splice(i, 0, rule);\n }\n var _loop2 = function _loop2(name) {\n var rules = schema.marks[name].spec.parseDOM;\n if (rules) rules.forEach(function (rule) {\n insert(rule = copy(rule));\n if (!(rule.mark || rule.ignore || rule.clearMark)) rule.mark = name;\n });\n };\n for (var name in schema.marks) {\n _loop2(name);\n }\n var _loop3 = function _loop3(_name3) {\n var rules = schema.nodes[_name3].spec.parseDOM;\n if (rules) rules.forEach(function (rule) {\n insert(rule = copy(rule));\n if (!(rule.node || rule.ignore || rule.mark)) rule.node = _name3;\n });\n };\n for (var _name3 in schema.nodes) {\n _loop3(_name3);\n }\n return result;\n }\n }, {\n key: \"fromSchema\",\n value: function fromSchema(schema) {\n return schema.cached.domParser || (schema.cached.domParser = new DOMParser(schema, DOMParser.schemaRules(schema)));\n }\n }]);\n return DOMParser;\n}();\nvar blockTags = {\n address: true,\n article: true,\n aside: true,\n blockquote: true,\n canvas: true,\n dd: true,\n div: true,\n dl: true,\n fieldset: true,\n figcaption: true,\n figure: true,\n footer: true,\n form: true,\n h1: true,\n h2: true,\n h3: true,\n h4: true,\n h5: true,\n h6: true,\n header: true,\n hgroup: true,\n hr: true,\n li: true,\n noscript: true,\n ol: true,\n output: true,\n p: true,\n pre: true,\n section: true,\n table: true,\n tfoot: true,\n ul: true\n};\nvar ignoreTags = {\n head: true,\n noscript: true,\n object: true,\n script: true,\n style: true,\n title: true\n};\nvar listTags = {\n ol: true,\n ul: true\n};\nvar OPT_PRESERVE_WS = 1,\n OPT_PRESERVE_WS_FULL = 2,\n OPT_OPEN_LEFT = 4;\nfunction wsOptionsFor(type, preserveWhitespace, base) {\n if (preserveWhitespace != null) return (preserveWhitespace ? OPT_PRESERVE_WS : 0) | (preserveWhitespace === \"full\" ? OPT_PRESERVE_WS_FULL : 0);\n return type && type.whitespace == \"pre\" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base & ~OPT_OPEN_LEFT;\n}\nvar NodeContext = function () {\n function NodeContext(type, attrs, marks, solid, match, options) {\n _classCallCheck(this, NodeContext);\n this.type = type;\n this.attrs = attrs;\n this.marks = marks;\n this.solid = solid;\n this.options = options;\n this.content = [];\n this.activeMarks = Mark.none;\n this.match = match || (options & OPT_OPEN_LEFT ? null : type.contentMatch);\n }\n _createClass(NodeContext, [{\n key: \"findWrapping\",\n value: function findWrapping(node) {\n if (!this.match) {\n if (!this.type) return [];\n var fill = this.type.contentMatch.fillBefore(Fragment.from(node));\n if (fill) {\n this.match = this.type.contentMatch.matchFragment(fill);\n } else {\n var start = this.type.contentMatch,\n wrap;\n if (wrap = start.findWrapping(node.type)) {\n this.match = start;\n return wrap;\n } else {\n return null;\n }\n }\n }\n return this.match.findWrapping(node.type);\n }\n }, {\n key: \"finish\",\n value: function finish(openEnd) {\n if (!(this.options & OPT_PRESERVE_WS)) {\n var last = this.content[this.content.length - 1],\n m;\n if (last && last.isText && (m = /[ \\t\\r\\n\\u000c]+$/.exec(last.text))) {\n var text = last;\n if (last.text.length == m[0].length) this.content.pop();else this.content[this.content.length - 1] = text.withText(text.text.slice(0, text.text.length - m[0].length));\n }\n }\n var content = Fragment.from(this.content);\n if (!openEnd && this.match) content = content.append(this.match.fillBefore(Fragment.empty, true));\n return this.type ? this.type.create(this.attrs, content, this.marks) : content;\n }\n }, {\n key: \"inlineContext\",\n value: function inlineContext(node) {\n if (this.type) return this.type.inlineContent;\n if (this.content.length) return this.content[0].isInline;\n return node.parentNode && !blockTags.hasOwnProperty(node.parentNode.nodeName.toLowerCase());\n }\n }]);\n return NodeContext;\n}();\nvar ParseContext = function () {\n function ParseContext(parser, options, isOpen) {\n _classCallCheck(this, ParseContext);\n this.parser = parser;\n this.options = options;\n this.isOpen = isOpen;\n this.open = 0;\n var topNode = options.topNode,\n topContext;\n var topOptions = wsOptionsFor(null, options.preserveWhitespace, 0) | (isOpen ? OPT_OPEN_LEFT : 0);\n if (topNode) topContext = new NodeContext(topNode.type, topNode.attrs, Mark.none, true, options.topMatch || topNode.type.contentMatch, topOptions);else if (isOpen) topContext = new NodeContext(null, null, Mark.none, true, null, topOptions);else topContext = new NodeContext(parser.schema.topNodeType, null, Mark.none, true, null, topOptions);\n this.nodes = [topContext];\n this.find = options.findPositions;\n this.needsBlock = false;\n }\n _createClass(ParseContext, [{\n key: \"top\",\n get: function get() {\n return this.nodes[this.open];\n }\n }, {\n key: \"addDOM\",\n value: function addDOM(dom, marks) {\n if (dom.nodeType == 3) this.addTextNode(dom, marks);else if (dom.nodeType == 1) this.addElement(dom, marks);\n }\n }, {\n key: \"addTextNode\",\n value: function addTextNode(dom, marks) {\n var value = dom.nodeValue;\n var top = this.top;\n if (top.options & OPT_PRESERVE_WS_FULL || top.inlineContext(dom) || /[^ \\t\\r\\n\\u000c]/.test(value)) {\n if (!(top.options & OPT_PRESERVE_WS)) {\n value = value.replace(/[ \\t\\r\\n\\u000c]+/g, \" \");\n if (/^[ \\t\\r\\n\\u000c]/.test(value) && this.open == this.nodes.length - 1) {\n var nodeBefore = top.content[top.content.length - 1];\n var domNodeBefore = dom.previousSibling;\n if (!nodeBefore || domNodeBefore && domNodeBefore.nodeName == 'BR' || nodeBefore.isText && /[ \\t\\r\\n\\u000c]$/.test(nodeBefore.text)) value = value.slice(1);\n }\n } else if (!(top.options & OPT_PRESERVE_WS_FULL)) {\n value = value.replace(/\\r?\\n|\\r/g, \" \");\n } else {\n value = value.replace(/\\r\\n?/g, \"\\n\");\n }\n if (value) this.insertNode(this.parser.schema.text(value), marks);\n this.findInText(dom);\n } else {\n this.findInside(dom);\n }\n }\n }, {\n key: \"addElement\",\n value: function addElement(dom, marks, matchAfter) {\n var name = dom.nodeName.toLowerCase(),\n ruleID;\n if (listTags.hasOwnProperty(name) && this.parser.normalizeLists) normalizeList(dom);\n var rule = this.options.ruleFromNode && this.options.ruleFromNode(dom) || (ruleID = this.parser.matchTag(dom, this, matchAfter));\n if (rule ? rule.ignore : ignoreTags.hasOwnProperty(name)) {\n this.findInside(dom);\n this.ignoreFallback(dom, marks);\n } else if (!rule || rule.skip || rule.closeParent) {\n if (rule && rule.closeParent) this.open = Math.max(0, this.open - 1);else if (rule && rule.skip.nodeType) dom = rule.skip;\n var sync,\n top = this.top,\n oldNeedsBlock = this.needsBlock;\n if (blockTags.hasOwnProperty(name)) {\n if (top.content.length && top.content[0].isInline && this.open) {\n this.open--;\n top = this.top;\n }\n sync = true;\n if (!top.type) this.needsBlock = true;\n } else if (!dom.firstChild) {\n this.leafFallback(dom, marks);\n return;\n }\n var innerMarks = rule && rule.skip ? marks : this.readStyles(dom, marks);\n if (innerMarks) this.addAll(dom, innerMarks);\n if (sync) this.sync(top);\n this.needsBlock = oldNeedsBlock;\n } else {\n var _innerMarks = this.readStyles(dom, marks);\n if (_innerMarks) this.addElementByRule(dom, rule, _innerMarks, rule.consuming === false ? ruleID : undefined);\n }\n }\n }, {\n key: \"leafFallback\",\n value: function leafFallback(dom, marks) {\n if (dom.nodeName == \"BR\" && this.top.type && this.top.type.inlineContent) this.addTextNode(dom.ownerDocument.createTextNode(\"\\n\"), marks);\n }\n }, {\n key: \"ignoreFallback\",\n value: function ignoreFallback(dom, marks) {\n if (dom.nodeName == \"BR\" && (!this.top.type || !this.top.type.inlineContent)) this.findPlace(this.parser.schema.text(\"-\"), marks);\n }\n }, {\n key: \"readStyles\",\n value: function readStyles(dom, marks) {\n var _this3 = this;\n var styles = dom.style;\n if (styles && styles.length) for (var i = 0; i < this.parser.matchedStyles.length; i++) {\n var name = this.parser.matchedStyles[i],\n value = styles.getPropertyValue(name);\n if (value) {\n var _loop4 = function _loop4(_after) {\n var rule = _this3.parser.matchStyle(name, value, _this3, _after);\n if (!rule) {\n after = _after;\n return 0;\n }\n if (rule.ignore) return {\n v: null\n };\n if (rule.clearMark) marks = marks.filter(function (m) {\n return !rule.clearMark(m);\n });else marks = marks.concat(_this3.parser.schema.marks[rule.mark].create(rule.attrs));\n if (rule.consuming === false) _after = rule;else {\n after = _after;\n return 0;\n }\n after = _after;\n },\n _ret;\n for (var after = undefined;;) {\n _ret = _loop4(after);\n if (_ret === 0) break;\n if (_ret) return _ret.v;\n }\n }\n }\n return marks;\n }\n }, {\n key: \"addElementByRule\",\n value: function addElementByRule(dom, rule, marks, continueAfter) {\n var _this4 = this;\n var sync, nodeType;\n if (rule.node) {\n nodeType = this.parser.schema.nodes[rule.node];\n if (!nodeType.isLeaf) {\n var inner = this.enter(nodeType, rule.attrs || null, marks, rule.preserveWhitespace);\n if (inner) {\n sync = true;\n marks = inner;\n }\n } else if (!this.insertNode(nodeType.create(rule.attrs), marks)) {\n this.leafFallback(dom, marks);\n }\n } else {\n var markType = this.parser.schema.marks[rule.mark];\n marks = marks.concat(markType.create(rule.attrs));\n }\n var startIn = this.top;\n if (nodeType && nodeType.isLeaf) {\n this.findInside(dom);\n } else if (continueAfter) {\n this.addElement(dom, marks, continueAfter);\n } else if (rule.getContent) {\n this.findInside(dom);\n rule.getContent(dom, this.parser.schema).forEach(function (node) {\n return _this4.insertNode(node, marks);\n });\n } else {\n var contentDOM = dom;\n if (typeof rule.contentElement == \"string\") contentDOM = dom.querySelector(rule.contentElement);else if (typeof rule.contentElement == \"function\") contentDOM = rule.contentElement(dom);else if (rule.contentElement) contentDOM = rule.contentElement;\n this.findAround(dom, contentDOM, true);\n this.addAll(contentDOM, marks);\n this.findAround(dom, contentDOM, false);\n }\n if (sync && this.sync(startIn)) this.open--;\n }\n }, {\n key: \"addAll\",\n value: function addAll(parent, marks, startIndex, endIndex) {\n var index = startIndex || 0;\n for (var dom = startIndex ? parent.childNodes[startIndex] : parent.firstChild, end = endIndex == null ? null : parent.childNodes[endIndex]; dom != end; dom = dom.nextSibling, ++index) {\n this.findAtPoint(parent, index);\n this.addDOM(dom, marks);\n }\n this.findAtPoint(parent, index);\n }\n }, {\n key: \"findPlace\",\n value: function findPlace(node, marks) {\n var route, sync;\n for (var depth = this.open; depth >= 0; depth--) {\n var cx = this.nodes[depth];\n var _found2 = cx.findWrapping(node);\n if (_found2 && (!route || route.length > _found2.length)) {\n route = _found2;\n sync = cx;\n if (!_found2.length) break;\n }\n if (cx.solid) break;\n }\n if (!route) return null;\n this.sync(sync);\n for (var i = 0; i < route.length; i++) marks = this.enterInner(route[i], null, marks, false);\n return marks;\n }\n }, {\n key: \"insertNode\",\n value: function insertNode(node, marks) {\n if (node.isInline && this.needsBlock && !this.top.type) {\n var block = this.textblockFromContext();\n if (block) marks = this.enterInner(block, null, marks);\n }\n var innerMarks = this.findPlace(node, marks);\n if (innerMarks) {\n this.closeExtra();\n var top = this.top;\n if (top.match) top.match = top.match.matchType(node.type);\n var nodeMarks = Mark.none;\n var _iterator = _createForOfIteratorHelper(innerMarks.concat(node.marks)),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var m = _step.value;\n if (top.type ? top.type.allowsMarkType(m.type) : markMayApply(m.type, node.type)) nodeMarks = m.addToSet(nodeMarks);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n top.content.push(node.mark(nodeMarks));\n return true;\n }\n return false;\n }\n }, {\n key: \"enter\",\n value: function enter(type, attrs, marks, preserveWS) {\n var innerMarks = this.findPlace(type.create(attrs), marks);\n if (innerMarks) innerMarks = this.enterInner(type, attrs, marks, true, preserveWS);\n return innerMarks;\n }\n }, {\n key: \"enterInner\",\n value: function enterInner(type, attrs, marks) {\n var solid = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var preserveWS = arguments.length > 4 ? arguments[4] : undefined;\n this.closeExtra();\n var top = this.top;\n top.match = top.match && top.match.matchType(type);\n var options = wsOptionsFor(type, preserveWS, top.options);\n if (top.options & OPT_OPEN_LEFT && top.content.length == 0) options |= OPT_OPEN_LEFT;\n var applyMarks = Mark.none;\n marks = marks.filter(function (m) {\n if (top.type ? top.type.allowsMarkType(m.type) : markMayApply(m.type, type)) {\n applyMarks = m.addToSet(applyMarks);\n return false;\n }\n return true;\n });\n this.nodes.push(new NodeContext(type, attrs, applyMarks, solid, null, options));\n this.open++;\n return marks;\n }\n }, {\n key: \"closeExtra\",\n value: function closeExtra() {\n var openEnd = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var i = this.nodes.length - 1;\n if (i > this.open) {\n for (; i > this.open; i--) this.nodes[i - 1].content.push(this.nodes[i].finish(openEnd));\n this.nodes.length = this.open + 1;\n }\n }\n }, {\n key: \"finish\",\n value: function finish() {\n this.open = 0;\n this.closeExtra(this.isOpen);\n return this.nodes[0].finish(this.isOpen || this.options.topOpen);\n }\n }, {\n key: \"sync\",\n value: function sync(to) {\n for (var i = this.open; i >= 0; i--) if (this.nodes[i] == to) {\n this.open = i;\n return true;\n }\n return false;\n }\n }, {\n key: \"currentPos\",\n get: function get() {\n this.closeExtra();\n var pos = 0;\n for (var i = this.open; i >= 0; i--) {\n var content = this.nodes[i].content;\n for (var j = content.length - 1; j >= 0; j--) pos += content[j].nodeSize;\n if (i) pos++;\n }\n return pos;\n }\n }, {\n key: \"findAtPoint\",\n value: function findAtPoint(parent, offset) {\n if (this.find) for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].node == parent && this.find[i].offset == offset) this.find[i].pos = this.currentPos;\n }\n }\n }, {\n key: \"findInside\",\n value: function findInside(parent) {\n if (this.find) for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) this.find[i].pos = this.currentPos;\n }\n }\n }, {\n key: \"findAround\",\n value: function findAround(parent, content, before) {\n if (parent != content && this.find) for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) {\n var pos = content.compareDocumentPosition(this.find[i].node);\n if (pos & (before ? 2 : 4)) this.find[i].pos = this.currentPos;\n }\n }\n }\n }, {\n key: \"findInText\",\n value: function findInText(textNode) {\n if (this.find) for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].node == textNode) this.find[i].pos = this.currentPos - (textNode.nodeValue.length - this.find[i].offset);\n }\n }\n }, {\n key: \"matchesContext\",\n value: function matchesContext(context) {\n var _this5 = this;\n if (context.indexOf(\"|\") > -1) return context.split(/\\s*\\|\\s*/).some(this.matchesContext, this);\n var parts = context.split(\"/\");\n var option = this.options.context;\n var useRoot = !this.isOpen && (!option || option.parent.type == this.nodes[0].type);\n var minDepth = -(option ? option.depth + 1 : 0) + (useRoot ? 0 : 1);\n var match = function match(i, depth) {\n for (; i >= 0; i--) {\n var part = parts[i];\n if (part == \"\") {\n if (i == parts.length - 1 || i == 0) continue;\n for (; depth >= minDepth; depth--) if (match(i - 1, depth)) return true;\n return false;\n } else {\n var next = depth > 0 || depth == 0 && useRoot ? _this5.nodes[depth].type : option && depth >= minDepth ? option.node(depth - minDepth).type : null;\n if (!next || next.name != part && !next.isInGroup(part)) return false;\n depth--;\n }\n }\n return true;\n };\n return match(parts.length - 1, this.open);\n }\n }, {\n key: \"textblockFromContext\",\n value: function textblockFromContext() {\n var $context = this.options.context;\n if ($context) for (var d = $context.depth; d >= 0; d--) {\n var deflt = $context.node(d).contentMatchAt($context.indexAfter(d)).defaultType;\n if (deflt && deflt.isTextblock && deflt.defaultAttrs) return deflt;\n }\n for (var name in this.parser.schema.nodes) {\n var type = this.parser.schema.nodes[name];\n if (type.isTextblock && type.defaultAttrs) return type;\n }\n }\n }]);\n return ParseContext;\n}();\nfunction normalizeList(dom) {\n for (var child = dom.firstChild, prevItem = null; child; child = child.nextSibling) {\n var name = child.nodeType == 1 ? child.nodeName.toLowerCase() : null;\n if (name && listTags.hasOwnProperty(name) && prevItem) {\n prevItem.appendChild(child);\n child = prevItem;\n } else if (name == \"li\") {\n prevItem = child;\n } else if (name) {\n prevItem = null;\n }\n }\n}\nfunction matches(dom, selector) {\n return (dom.matches || dom.msMatchesSelector || dom.webkitMatchesSelector || dom.mozMatchesSelector).call(dom, selector);\n}\nfunction copy(obj) {\n var copy = {};\n for (var prop in obj) copy[prop] = obj[prop];\n return copy;\n}\nfunction markMayApply(markType, nodeType) {\n var nodes = nodeType.schema.nodes;\n var _loop5 = function _loop5() {\n var parent = nodes[name];\n if (!parent.allowsMarkType(markType)) return 0;\n var seen = [],\n scan = function scan(match) {\n seen.push(match);\n for (var i = 0; i < match.edgeCount; i++) {\n var _match$edge = match.edge(i),\n type = _match$edge.type,\n next = _match$edge.next;\n if (type == nodeType) return true;\n if (seen.indexOf(next) < 0 && scan(next)) return true;\n }\n };\n if (scan(parent.contentMatch)) return {\n v: true\n };\n },\n _ret2;\n for (var name in nodes) {\n _ret2 = _loop5();\n if (_ret2 === 0) continue;\n if (_ret2) return _ret2.v;\n }\n}\nvar DOMSerializer = function () {\n function DOMSerializer(nodes, marks) {\n _classCallCheck(this, DOMSerializer);\n this.nodes = nodes;\n this.marks = marks;\n }\n _createClass(DOMSerializer, [{\n key: \"serializeFragment\",\n value: function serializeFragment(fragment) {\n var _this6 = this;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var target = arguments.length > 2 ? arguments[2] : undefined;\n if (!target) target = doc(options).createDocumentFragment();\n var top = target,\n active = [];\n fragment.forEach(function (node) {\n if (active.length || node.marks.length) {\n var keep = 0,\n rendered = 0;\n while (keep < active.length && rendered < node.marks.length) {\n var next = node.marks[rendered];\n if (!_this6.marks[next.type.name]) {\n rendered++;\n continue;\n }\n if (!next.eq(active[keep][0]) || next.type.spec.spanning === false) break;\n keep++;\n rendered++;\n }\n while (keep < active.length) top = active.pop()[1];\n while (rendered < node.marks.length) {\n var add = node.marks[rendered++];\n var markDOM = _this6.serializeMark(add, node.isInline, options);\n if (markDOM) {\n active.push([add, top]);\n top.appendChild(markDOM.dom);\n top = markDOM.contentDOM || markDOM.dom;\n }\n }\n }\n top.appendChild(_this6.serializeNodeInner(node, options));\n });\n return target;\n }\n }, {\n key: \"serializeNodeInner\",\n value: function serializeNodeInner(node, options) {\n var _renderSpec2 = _renderSpec(doc(options), this.nodes[node.type.name](node), null, node.attrs),\n dom = _renderSpec2.dom,\n contentDOM = _renderSpec2.contentDOM;\n if (contentDOM) {\n if (node.isLeaf) throw new RangeError(\"Content hole not allowed in a leaf node spec\");\n this.serializeFragment(node.content, options, contentDOM);\n }\n return dom;\n }\n }, {\n key: \"serializeNode\",\n value: function serializeNode(node) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var dom = this.serializeNodeInner(node, options);\n for (var i = node.marks.length - 1; i >= 0; i--) {\n var wrap = this.serializeMark(node.marks[i], node.isInline, options);\n if (wrap) {\n (wrap.contentDOM || wrap.dom).appendChild(dom);\n dom = wrap.dom;\n }\n }\n return dom;\n }\n }, {\n key: \"serializeMark\",\n value: function serializeMark(mark, inline) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var toDOM = this.marks[mark.type.name];\n return toDOM && _renderSpec(doc(options), toDOM(mark, inline), null, mark.attrs);\n }\n }], [{\n key: \"renderSpec\",\n value: function renderSpec(doc, structure) {\n var xmlNS = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var blockArraysIn = arguments.length > 3 ? arguments[3] : undefined;\n return _renderSpec(doc, structure, xmlNS, blockArraysIn);\n }\n }, {\n key: \"fromSchema\",\n value: function fromSchema(schema) {\n return schema.cached.domSerializer || (schema.cached.domSerializer = new DOMSerializer(this.nodesFromSchema(schema), this.marksFromSchema(schema)));\n }\n }, {\n key: \"nodesFromSchema\",\n value: function nodesFromSchema(schema) {\n var result = gatherToDOM(schema.nodes);\n if (!result.text) result.text = function (node) {\n return node.text;\n };\n return result;\n }\n }, {\n key: \"marksFromSchema\",\n value: function marksFromSchema(schema) {\n return gatherToDOM(schema.marks);\n }\n }]);\n return DOMSerializer;\n}();\nfunction gatherToDOM(obj) {\n var result = {};\n for (var name in obj) {\n var toDOM = obj[name].spec.toDOM;\n if (toDOM) result[name] = toDOM;\n }\n return result;\n}\nfunction doc(options) {\n return options.document || window.document;\n}\nvar suspiciousAttributeCache = new WeakMap();\nfunction suspiciousAttributes(attrs) {\n var value = suspiciousAttributeCache.get(attrs);\n if (value === undefined) suspiciousAttributeCache.set(attrs, value = suspiciousAttributesInner(attrs));\n return value;\n}\nfunction suspiciousAttributesInner(attrs) {\n var result = null;\n function scan(value) {\n if (value && _typeof(value) == \"object\") {\n if (Array.isArray(value)) {\n if (typeof value[0] == \"string\") {\n if (!result) result = [];\n result.push(value);\n } else {\n for (var i = 0; i < value.length; i++) scan(value[i]);\n }\n } else {\n for (var prop in value) scan(value[prop]);\n }\n }\n }\n scan(attrs);\n return result;\n}\nfunction _renderSpec(doc, structure, xmlNS, blockArraysIn) {\n if (typeof structure == \"string\") return {\n dom: doc.createTextNode(structure)\n };\n if (structure.nodeType != null) return {\n dom: structure\n };\n if (structure.dom && structure.dom.nodeType != null) return structure;\n var tagName = structure[0],\n suspicious;\n if (typeof tagName != \"string\") throw new RangeError(\"Invalid array passed to renderSpec\");\n if (blockArraysIn && (suspicious = suspiciousAttributes(blockArraysIn)) && suspicious.indexOf(structure) > -1) throw new RangeError(\"Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.\");\n var space = tagName.indexOf(\" \");\n if (space > 0) {\n xmlNS = tagName.slice(0, space);\n tagName = tagName.slice(space + 1);\n }\n var contentDOM;\n var dom = xmlNS ? doc.createElementNS(xmlNS, tagName) : doc.createElement(tagName);\n var attrs = structure[1],\n start = 1;\n if (attrs && _typeof(attrs) == \"object\" && attrs.nodeType == null && !Array.isArray(attrs)) {\n start = 2;\n for (var name in attrs) if (attrs[name] != null) {\n var _space = name.indexOf(\" \");\n if (_space > 0) dom.setAttributeNS(name.slice(0, _space), name.slice(_space + 1), attrs[name]);else dom.setAttribute(name, attrs[name]);\n }\n }\n for (var i = start; i < structure.length; i++) {\n var child = structure[i];\n if (child === 0) {\n if (i < structure.length - 1 || i > start) throw new RangeError(\"Content hole must be the only child of its parent node\");\n return {\n dom: dom,\n contentDOM: dom\n };\n } else {\n var _renderSpec3 = _renderSpec(doc, child, xmlNS, blockArraysIn),\n inner = _renderSpec3.dom,\n innerContent = _renderSpec3.contentDOM;\n dom.appendChild(inner);\n if (innerContent) {\n if (contentDOM) throw new RangeError(\"Multiple content holes\");\n contentDOM = innerContent;\n }\n }\n }\n return {\n dom: dom,\n contentDOM: contentDOM\n };\n}\nexports.ContentMatch = ContentMatch;\nexports.DOMParser = DOMParser;\nexports.DOMSerializer = DOMSerializer;\nexports.Fragment = Fragment;\nexports.Mark = Mark;\nexports.MarkType = MarkType;\nexports.Node = Node;\nexports.NodeRange = NodeRange;\nexports.NodeType = NodeType;\nexports.ReplaceError = ReplaceError;\nexports.ResolvedPos = ResolvedPos;\nexports.Schema = Schema;\nexports.Slice = Slice;\n"],"names":["_createForOfIteratorHelper","o","allowArrayLike","it","Symbol","iterator","Array","isArray","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","from","test","_unsupportedIterableToArray","i","F","s","length","done","value","e","_e","f","TypeError","err","normalCompletion","didErr","step","next","_e2","arr","len","arr2","_get","Reflect","get","bind","target","property","receiver","base","object","hasOwnProperty","_getPrototypeOf","_superPropBase","desc","getOwnPropertyDescriptor","arguments","apply","this","_inherits","subClass","superClass","create","writable","configurable","defineProperty","_setPrototypeOf","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","result","Super","NewTarget","construct","self","_typeof","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","_wrapNativeSuper","Class","_cache","Map","undefined","fn","Function","indexOf","_isNativeFunction","has","set","Wrapper","_construct","enumerable","Parent","args","a","push","instance","sham","Proxy","Boolean","valueOf","p","setPrototypeOf","__proto__","getPrototypeOf","_classCallCheck","Constructor","_defineProperties","props","descriptor","arg","key","input","hint","prim","toPrimitive","res","_toPrimitive","String","_createClass","protoProps","staticProps","OrderedMap","require$$0","_findDiffStart","b","pos","childCount","childA","child","childB","sameMarkup","isText","text","j","content","size","inner","nodeSize","_findDiffEnd","posA","posB","iA","iB","same","minSize","Math","min","Fragment","to","nodeStart","parent","end","start","nodesBetween","max","blockSeparator","leafText","first","node","nodeText","isLeaf","type","spec","isBlock","isTextblock","other","last","lastChild","firstChild","withText","cut","empty","index","current","copy","concat","eq","found","RangeError","round","retIndex","curPos","toStringInner","join","map","toJSON","schema","nodeFromJSON","array","joined","nodes","fromArray","attrs","offset","compareDeep","_p","Mark","placed","excludes","rank","obj","_","json","marks","mark","checkAttrs","none","sort","ReplaceError","_Error","_super","Error","Slice","openStart","openEnd","fragment","insertInto","removeRange","fromJSON","openIsolating","isolating","_n","_content$findIndex","findIndex","maybeChild","_content$findIndex2","indexTo","offsetTo","append","replaceChild","dist","insert","_content$findIndex3","_replace","$from","$to","depth","replaceOuter","_prepareSliceForRepla","$along","extra","resolveNoCache","prepareSliceForReplace","close","replaceThreeWay","parentOffset","replaceTwoWay","checkJoin","main","sub","compatibleContent","joinable","$before","$after","addNode","addRange","$start","$end","startIndex","endIndex","textOffset","nodeAfter","nodeBefore","checkContent","ResolvedPos","path","val","resolveDepth","dOff","tmp","inclusive","isInSet","removeFromSet","after","isInline","pred","blockRange","d","inlineContent","NodeRange","str","doc","_node$content$findInd","rem","cache","resolveCache","elts","elt","ResolveCache","resolve","resolveCacheSize","WeakMap","before","indexAfter","emptyAttrs","Node","forEach","startPos","textBetween","hasMarkup","defaultAttrs","sameSet","includeParents","sharedDepth","_node$content$findInd2","_this$content$findInd","_this$content$findInd2","resolveCached","isAtom","toDebugString","wrapMarks","match","contentMatch","matchFragment","replacement","one","contentMatchAt","two","validEnd","allowsMarks","matchType","canReplace","addToSet","m","check","markFromJSON","nodeType","TextNode","_Node","_super2","_this","JSON","stringify","ContentMatch","wrapCache","frag","cur","hasRequiredAttrs","toEnd","seen","search","types","finished","tp","createAndFill","_match$next$i","_found","computed","computeWrapping","active","via","shift","reverse","_match$next$i2","scan","out","_i","string","nodeTypes","stream","TokenStream","expr","parseExpr","dfa","nfa","connect","compile","edge","term","edges","exprs","reduce","loop","_loop","_i2","_next","_i3","_next2","work","state","dead","_state$next$j","checkForDeadEnds","inline","tokens","split","pop","tok","SyntaxError","parseExprSeq","eat","parseExprSubscript","typeName","_type","isInGroup","resolveName","parseExprAtom","parseExprRange","parseNum","Number","cmp","nullFrom","_edges$i","labeled","explore","states","_ref","_states","defaults","attrName","attr","hasDefault","_computeAttrs","built","given","_checkAttrs","values","_name","_name2","validate","initAttrs","Attribute","NodeType","markSet","groups","group","atom","whitespace","code","isRequired","compatible","computeAttrs","setFrom","fillBefore","matched","validContent","markType","allowsMarkType","topType","topNode","options","validateType","MarkType","excluded","Schema","linebreakReplacement","cached","instanceSpec","prop","contentExprCache","_prop","contentExpr","markExpr","parse","gatherMarks","_prop2","_type2","excl","topNodeType","wrappings","createChecked","_text","ok","_mark","DOMParser","rules","_this2","tags","styles","matchedStyles","rule","tag","isTagRule","style","isStyleRule","exec","normalizeLists","some","r","dom","context","ParseContext","addAll","finish","maxOpen","matches","namespace","namespaceURI","matchesContext","getAttrs","charCodeAt","priority","splice","_loop2","parseDOM","ignore","clearMark","_loop3","_name3","domParser","schemaRules","blockTags","address","article","aside","blockquote","canvas","dd","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","noscript","ol","output","pre","section","table","tfoot","ul","ignoreTags","head","script","title","listTags","wsOptionsFor","preserveWhitespace","OPT_PRESERVE_WS","NodeContext","solid","activeMarks","fill","wrap","findWrapping","parentNode","nodeName","toLowerCase","parser","isOpen","open","topContext","topOptions","topMatch","find","findPositions","needsBlock","addTextNode","addElement","nodeValue","top","inlineContext","replace","domNodeBefore","previousSibling","insertNode","findInText","findInside","matchAfter","ruleID","prevItem","nextSibling","appendChild","normalizeList","ruleFromNode","matchTag","ignoreFallback","skip","closeParent","sync","oldNeedsBlock","leafFallback","innerMarks","readStyles","_innerMarks","addElementByRule","consuming","ownerDocument","createTextNode","findPlace","_this3","getPropertyValue","_ret","_loop4","_after","matchStyle","v","filter","continueAfter","_this4","enter","startIn","getContent","contentDOM","contentElement","querySelector","findAround","childNodes","findAtPoint","addDOM","route","cx","_found2","enterInner","block","textblockFromContext","closeExtra","_step","nodeMarks","_iterator","markMayApply","preserveWS","applyMarks","topOpen","currentPos","contains","compareDocumentPosition","textNode","_this5","parts","option","useRoot","minDepth","part","$context","deflt","defaultType","selector","msMatchesSelector","webkitMatchesSelector","mozMatchesSelector","_ret2","_loop5","edgeCount","_match$edge","DOMSerializer","_this6","createDocumentFragment","keep","rendered","spanning","add","markDOM","serializeMark","serializeNodeInner","_renderSpec2","_renderSpec","serializeFragment","toDOM","structure","domSerializer","nodesFromSchema","marksFromSchema","gatherToDOM","document","window","suspiciousAttributeCache","suspiciousAttributes","suspiciousAttributesInner","xmlNS","blockArraysIn","suspicious","tagName","space","createElementNS","createElement","_space","setAttributeNS","setAttribute","_renderSpec3","innerContent"],"mappings":"sJAEA,SAASA,EAA2BC,EAAGC,GAAkB,IAAIC,EAAuB,oBAAXC,QAA0BH,EAAEG,OAAOC,WAAaJ,EAAE,cAAe,IAAKE,EAAI,CAAE,GAAIG,MAAMC,QAAQN,KAAOE,EAC9K,SAAqCF,EAAGO,GAAU,IAAKP,EAAG,OAAQ,GAAiB,iBAANA,EAAgB,OAAOQ,EAAkBR,EAAGO,GAAS,IAAIE,EAAIC,OAAOC,UAAUC,SAASC,KAAKb,GAAGc,MAAM,GAAI,GAAc,WAANL,GAAkBT,EAAEe,cAAaN,EAAIT,EAAEe,YAAYC,MAAM,GAAU,QAANP,GAAqB,QAANA,EAAa,OAAOJ,MAAMY,KAAKjB,GAAI,GAAU,cAANS,GAAqB,2CAA2CS,KAAKT,GAAI,OAAOD,EAAkBR,EAAGO,EAAQ,CAD3OY,CAA4BnB,KAAOC,EAAqD,CAAMC,IAAIF,EAA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0O,UAAoBA,GACpB1O,EAAAia,cAAwBA,GACxBja,EAAAnF,SAAmBA,EACnBmF,EAAAlC,KAAeA,EACfkC,EAAAoN,SAAmBA,GACnBpN,EAAAiE,KAAeA,EACfjE,EAAAiD,UAAoBA,EACpBjD,EAAAgM,SAAmBA,GACnBhM,EAAAtB,aAAuBA,EACvBsB,EAAAkC,YAAsBA,EACtBlC,EAAAsN,OAAiBA,GACjBtN,EAAAlB,MAAgBA","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- import t from"../../orderedmap/dist/index2.mjs";function e(t,n,r){for(let i=0;;i++){if(i==t.childCount||i==n.childCount)return t.childCount==n.childCount?null:r;let s=t.child(i),o=n.child(i);if(s!=o){if(!s.sameMarkup(o))return r;if(s.isText&&s.text!=o.text){for(let t=0;s.text[t]==o.text[t];t++)r++;return r}if(s.content.size||o.content.size){let t=e(s.content,o.content,r+1);if(null!=t)return t}r+=s.nodeSize}else r+=s.nodeSize}}function n(t,e,r,i){for(let s=t.childCount,o=e.childCount;;){if(0==s||0==o)return s==o?null:{a:r,b:i};let h=t.child(--s),l=e.child(--o),a=h.nodeSize;if(h!=l){if(!h.sameMarkup(l))return{a:r,b:i};if(h.isText&&h.text!=l.text){let t=0,e=Math.min(h.text.length,l.text.length);for(;t<e&&h.text[h.text.length-t-1]==l.text[l.text.length-t-1];)t++,r--,i--;return{a:r,b:i}}if(h.content.size||l.content.size){let t=n(h.content,l.content,r-1,i-1);if(t)return t}r-=a,i-=a}else r-=a,i-=a}}class r{constructor(t,e){if(this.content=t,this.size=e||0,null==e)for(let e=0;e<t.length;e++)this.size+=t[e].nodeSize}nodesBetween(t,e,n,r=0,i){for(let s=0,o=0;o<e;s++){let h=this.content[s],l=o+h.nodeSize;if(l>t&&!1!==n(h,r+o,i||null,s)&&h.content.size){let i=o+1;h.nodesBetween(Math.max(0,t-i),Math.min(h.content.size,e-i),n,r+i)}o=l}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let i="",s=!0;return this.nodesBetween(t,e,((o,h)=>{let l=o.isText?o.text.slice(Math.max(t,h)-h,e-h):o.isLeaf?r?"function"==typeof r?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&l||o.isTextblock)&&n&&(s?s=!1:i+=n),i+=l}),0),i}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,i=this.content.slice(),s=0;for(e.isText&&e.sameMarkup(n)&&(i[i.length-1]=e.withText(e.text+n.text),s=1);s<t.content.length;s++)i.push(t.content[s]);return new r(i,this.size+t.size)}cut(t,e=this.size){if(0==t&&e==this.size)return this;let n=[],i=0;if(e>t)for(let r=0,s=0;s<e;r++){let o=this.content[r],h=s+o.nodeSize;h>t&&((s<t||h>e)&&(o=o.isText?o.cut(Math.max(0,t-s),Math.min(o.text.length,e-s)):o.cut(Math.max(0,t-s-1),Math.min(o.content.size,e-s-1))),n.push(o),i+=o.nodeSize),s=h}return new r(n,i)}cutByIndex(t,e){return t==e?r.empty:0==t&&e==this.content.length?this:new r(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let i=this.content.slice(),s=this.size+e.nodeSize-n.nodeSize;return i[t]=e,new r(i,s)}addToStart(t){return new r([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new r(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e}maybeChild(t){return this.content[t]||null}forEach(t){for(let e=0,n=0;e<this.content.length;e++){let r=this.content[e];t(r,n,e),n+=r.nodeSize}}findDiffStart(t,n=0){return e(this,t,n)}findDiffEnd(t,e=this.size,r=t.size){return n(this,t,e,r)}findIndex(t,e=-1){if(0==t)return s(0,t);if(t==this.size)return s(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=t)return i==t||e>0?s(n+1,i):s(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((t=>t.toJSON())):null}static fromJSON(t,e){if(!e)return r.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new r(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return r.empty;let e,n=0;for(let r=0;r<t.length;r++){let i=t[r];n+=i.nodeSize,r&&i.isText&&t[r-1].sameMarkup(i)?(e||(e=t.slice(0,r)),e[e.length-1]=i.withText(e[e.length-1].text+i.text)):e&&e.push(i)}return new r(e||t,n)}static from(t){if(!t)return r.empty;if(t instanceof r)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new r([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}r.empty=new r([],0);const i={index:0,offset:0};function s(t,e){return i.index=t,i.offset=e,i}function o(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!o(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!o(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}class h{constructor(t,e){this.type=t,this.attrs=e}addToSet(t){let e,n=!1;for(let r=0;r<t.length;r++){let i=t[r];if(this.eq(i))return t;if(this.type.excludes(i.type))e||(e=t.slice(0,r));else{if(i.type.excludes(this.type))return t;!n&&i.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(i)}}return e||(e=t.slice()),n||e.push(this),e}removeFromSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t}isInSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1}eq(t){return this==t||this.type==t.type&&o(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");let n=t.marks[e.type];if(!n)throw new RangeError(`There is no mark type ${e.type} in this schema`);let r=n.create(e.attrs);return n.checkAttrs(r.attrs),r}static sameSet(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return h.none;if(t instanceof h)return[t];let e=t.slice();return e.sort(((t,e)=>t.type.rank-e.type.rank)),e}}h.none=[];class l extends Error{}class a{constructor(t,e,n){this.content=t,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let n=p(this.content,t+this.openStart,e);return n&&new a(n,this.openStart,this.openEnd)}removeBetween(t,e){return new a(c(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return a.empty;let n=e.openStart||0,i=e.openEnd||0;if("number"!=typeof n||"number"!=typeof i)throw new RangeError("Invalid input for Slice.fromJSON");return new a(r.fromJSON(t,e.content),n,i)}static maxOpen(t,e=!0){let n=0,r=0;for(let r=t.firstChild;r&&!r.isLeaf&&(e||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=t.lastChild;n&&!n.isLeaf&&(e||!n.type.spec.isolating);n=n.lastChild)r++;return new a(t,n,r)}}function c(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:o,offset:h}=t.findIndex(n);if(i==e||s.isText){if(h!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(c(s.content,e-i-1,n-i-1)))}function p(t,e,n,r){let{index:i,offset:s}=t.findIndex(e),o=t.maybeChild(i);if(s==e||o.isText)return t.cut(0,e).append(n).append(t.cut(e));let h=p(o.content,e-s-1,n);return h&&t.replaceChild(i,o.copy(h))}function u(t,e,n){if(n.openStart>t.depth)throw new l("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new l("Inconsistent open depths");return f(t,e,n,0)}function f(t,e,n,i){let s=t.index(i),o=t.node(i);if(s==e.index(i)&&i<t.depth-n.openStart){let r=f(t,e,n,i+1);return o.copy(o.content.replaceChild(s,r))}if(n.content.size){if(n.openStart||n.openEnd||t.depth!=i||e.depth!=i){let{start:s,end:h}=function(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let t=n-1;t>=0;t--)i=e.node(t).copy(r.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}(n,t);return y(o,k(t,s,h,e,i))}{let r=t.parent,i=r.content;return y(r,i.cut(0,t.parentOffset).append(n.content).append(i.cut(e.parentOffset)))}}return y(o,w(t,e,i))}function d(t,e){if(!e.type.compatibleContent(t.type))throw new l("Cannot join "+e.type.name+" onto "+t.type.name)}function m(t,e,n){let r=t.node(n);return d(r,e.node(n)),r}function g(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function x(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&(g(t.nodeAfter,r),s++));for(let t=s;t<o;t++)g(i.child(t),r);e&&e.depth==n&&e.textOffset&&g(e.nodeBefore,r)}function y(t,e){return t.type.checkContent(e),t.copy(e)}function k(t,e,n,i,s){let o=t.depth>s&&m(t,e,s+1),h=i.depth>s&&m(n,i,s+1),l=[];return x(null,t,s,l),o&&h&&e.index(s)==n.index(s)?(d(o,h),g(y(o,k(t,e,n,i,s+1)),l)):(o&&g(y(o,w(t,e,s+1)),l),x(e,n,s,l),h&&g(y(h,w(n,i,s+1)),l)),x(i,null,s,l),new r(l)}function w(t,e,n){let i=[];if(x(null,t,n,i),t.depth>n){g(y(m(t,e,n+1),w(t,e,n+1)),i)}return x(e,null,n,i),new r(i)}a.empty=new a(r.empty,0,0);class S{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let e=0;e<t;e++)r+=n.child(e).nodeSize;return r}marks(){let t=this.parent,e=this.index();if(0==t.content.size)return h.none;if(this.textOffset)return t.child(e).marks;let n=t.maybeChild(e-1),r=t.maybeChild(e);if(!n){let t=n;n=r,r=t}let i=n.marks;for(var s=0;s<i.length;s++)!1!==i[s].type.spec.inclusive||r&&i[s].isInSet(r.marks)||(i=i[s--].removeFromSet(i));return i}marksAcross(t){let e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;let n=e.marks,r=t.parent.maybeChild(t.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(t){for(let e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos<this.pos)return t.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new O(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset}static resolve(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let n=[],r=0,i=e;for(let e=t;;){let{index:t,offset:s}=e.content.findIndex(i),o=i-s;if(n.push(e,t,r+s),!o)break;if(e=e.child(t),e.isText)break;i=o-1,r+=s+1}return new S(e,n,i)}static resolveCached(t,e){let n=E.get(t);if(n)for(let t=0;t<n.elts.length;t++){let r=n.elts[t];if(r.pos==e)return r}else E.set(t,n=new C);let r=n.elts[n.i]=S.resolve(t,e);return n.i=(n.i+1)%b,r}}class C{constructor(){this.elts=[],this.i=0}}const b=12,E=new WeakMap;class O{constructor(t,e,n){this.$from=t,this.$to=e,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const v=Object.create(null);class T{constructor(t,e,n,i=h.none){this.type=t,this.attrs=e,this.marks=i,this.content=n||r.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,e,n,r=0){this.content.nodesBetween(t,e,n,r,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,e,n,r){return this.content.textBetween(t,e,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,e,n){return this.type==t&&o(this.attrs,e||t.defaultAttrs||v)&&h.sameSet(this.marks,n||h.none)}copy(t=null){return t==this.content?this:new T(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new T(this.type,this.attrs,this.content,t)}cut(t,e=this.content.size){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))}slice(t,e=this.content.size,n=!1){if(t==e)return a.empty;let r=this.resolve(t),i=this.resolve(e),s=n?0:r.sharedDepth(e),o=r.start(s),h=r.node(s).content.cut(r.pos-o,i.pos-o);return new a(h,r.depth-s,i.depth-s)}replace(t,e,n){return u(this.resolve(t),this.resolve(e),n)}nodeAt(t){for(let e=this;;){let{index:n,offset:r}=e.content.findIndex(t);if(e=e.maybeChild(n),!e)return null;if(r==t||e.isText)return e;t-=r+1}}childAfter(t){let{index:e,offset:n}=this.content.findIndex(t);return{node:this.content.maybeChild(e),index:e,offset:n}}childBefore(t){if(0==t)return{node:null,index:0,offset:0};let{index:e,offset:n}=this.content.findIndex(t);if(n<t)return{node:this.content.child(e),index:e,offset:n};let r=this.content.child(e-1);return{node:r,index:e-1,offset:n-r.nodeSize}}resolve(t){return S.resolveCached(this,t)}resolveNoCache(t){return S.resolve(this,t)}rangeHasMark(t,e,n){let r=!1;return e>t&&this.nodesBetween(t,e,(t=>(n.isInSet(t.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),A(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,n=r.empty,i=0,s=n.childCount){let o=this.contentMatchAt(t).matchFragment(n,i,s),h=o&&o.matchFragment(this.content,e);if(!h||!h.validEnd)return!1;for(let t=i;t<s;t++)if(!this.type.allowsMarks(n.child(t).marks))return!1;return!0}canReplaceWith(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(t).matchType(n),s=i&&i.matchFragment(this.content,e);return!!s&&s.validEnd}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=h.none;for(let e=0;e<this.marks.length;e++){let n=this.marks[e];n.type.checkAttrs(n.attrs),t=n.addToSet(t)}if(!h.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((t=>t.type.name))}`);this.content.forEach((t=>t.check()))}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map((t=>t.toJSON()))),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let n;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}let i=r.fromJSON(t,e.content),s=t.nodeType(e.type).create(e.attrs,i,n);return s.type.checkAttrs(s.attrs),s}}T.prototype.text=void 0;class M extends T{constructor(t,e,n,r){if(super(t,e,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):A(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new M(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new M(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function A(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class z{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let n=new N(t,e);if(null==n.next)return z.empty;let r=I(n);n.next&&n.err("Unexpected trailing text");let i=function(t){let e=Object.create(null);return n(P(t,0));function n(r){let i=[];r.forEach((e=>{t[e].forEach((({term:e,to:n})=>{if(!e)return;let r;for(let t=0;t<i.length;t++)i[t][0]==e&&(r=i[t][1]);P(t,n).forEach((t=>{r||i.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)}))}))}));let s=e[r.join(",")]=new z(r.indexOf(t.length-1)>-1);for(let t=0;t<i.length;t++){let r=i[t][1].sort(J);s.next.push({type:i[t][0],next:e[r.join(",")]||n(r)})}return s}}(function(t){let e=[[]];return i(s(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){let i={term:r,to:n};return e[t].push(i),i}function i(t,e){t.forEach((t=>t.to=e))}function s(t,e){if("choice"==t.type)return t.exprs.reduce(((t,n)=>t.concat(s(n,e))),[]);if("seq"!=t.type){if("star"==t.type){let o=n();return r(e,o),i(s(t.expr,o),o),[r(o)]}if("plus"==t.type){let o=n();return i(s(t.expr,e),o),i(s(t.expr,o),o),[r(o)]}if("opt"==t.type)return[r(e)].concat(s(t.expr,e));if("range"==t.type){let o=e;for(let e=0;e<t.min;e++){let e=n();i(s(t.expr,o),e),o=e}if(-1==t.max)i(s(t.expr,o),o);else for(let e=t.min;e<t.max;e++){let e=n();r(o,e),i(s(t.expr,o),e),o=e}return[r(o)]}if("name"==t.type)return[r(e,void 0,t.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let o=s(t.exprs[r],e);if(r==t.exprs.length-1)return o;i(o,e=n())}}}(r));return function(t,e){for(let n=0,r=[t];n<r.length;n++){let t=r[n],i=!t.validEnd,s=[];for(let e=0;e<t.next.length;e++){let{type:n,next:o}=t.next[e];s.push(n.name),!i||n.isText||n.hasRequiredAttrs()||(i=!1),-1==r.indexOf(o)&&r.push(o)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(i,n),i}matchType(t){for(let e=0;e<this.next.length;e++)if(this.next[e].type==t)return this.next[e].next;return null}matchFragment(t,e=0,n=t.childCount){let r=this;for(let i=e;r&&i<n;i++)r=r.matchType(t.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:e}=this.next[t];if(!e.isText&&!e.hasRequiredAttrs())return e}return null}compatible(t){for(let e=0;e<this.next.length;e++)for(let n=0;n<t.next.length;n++)if(this.next[e].type==t.next[n].type)return!0;return!1}fillBefore(t,e=!1,n=0){let i=[this];return function s(o,h){let l=o.matchFragment(t,n);if(l&&(!e||l.validEnd))return r.from(h.map((t=>t.createAndFill())));for(let t=0;t<o.next.length;t++){let{type:e,next:n}=o.next[t];if(!e.isText&&!e.hasRequiredAttrs()&&-1==i.indexOf(n)){i.push(n);let t=s(n,h.concat(e));if(t)return t}}return null}(this,[])}findWrapping(t){for(let e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==t)return this.wrapCache[e+1];let e=this.computeWrapping(t);return this.wrapCache.push(t,e),e}computeWrapping(t){let e=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(t)){let t=[];for(let e=r;e.type;e=e.via)t.push(e.type);return t.reverse()}for(let t=0;t<i.next.length;t++){let{type:s,next:o}=i.next[t];s.isLeaf||s.hasRequiredAttrs()||s.name in e||r.type&&!o.validEnd||(n.push({match:s.contentMatch,type:s,via:r}),e[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(n){t.push(n);for(let r=0;r<n.next.length;r++)-1==t.indexOf(n.next[r].next)&&e(n.next[r].next)}(this),t.map(((e,n)=>{let r=n+(e.validEnd?"*":" ")+" ";for(let n=0;n<e.next.length;n++)r+=(n?", ":"")+e.next[n].type.name+"->"+t.indexOf(e.next[n].next);return r})).join("\n")}}z.empty=new z(!0);class N{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function I(t){let e=[];do{e.push(R(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function R(t){let e=[];do{e.push(F(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function F(t){let e=function(t){if(t.eat("(")){let e=I(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){let e=function(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let t in n){let r=n[t];r.isInGroup(e)&&i.push(r)}0==i.length&&t.err("No node type or group '"+e+"' found");return i}(t,t.next).map((e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e})));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}t.err("Unexpected token '"+t.next+"'")}(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=D(t,e)}return e}function B(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function D(t,e){let n=B(t),r=n;return t.eat(",")&&(r="}"!=t.next?B(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function J(t,e){return e-t}function P(t,e){let n=[];return function e(r){let i=t[r];if(1==i.length&&!i[0].term)return e(i[0].to);n.push(r);for(let t=0;t<i.length;t++){let{term:r,to:s}=i[t];r||-1!=n.indexOf(s)||e(s)}}(e),n.sort(J)}function j(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function q(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(void 0===i){let e=t[r];if(!e.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=e.default}n[r]=i}return n}function $(t,e,n,r){for(let r in e)if(!(r in t))throw new RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in t){let r=t[n];r.validate&&r.validate(e[n])}}function L(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new U(t,r,e[r]);return n}class W{constructor(t,e,n){this.name=t,this.schema=e,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=L(t,n.attrs),this.defaultAttrs=j(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==t),this.isText="text"==t}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==z.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:q(this.attrs,t)}create(t=null,e,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new T(this,this.computeAttrs(t),r.from(e),h.setFrom(n))}createChecked(t=null,e,n){return e=r.from(e),this.checkContent(e),new T(this,this.computeAttrs(t),e,h.setFrom(n))}createAndFill(t=null,e,n){if(t=this.computeAttrs(t),(e=r.from(e)).size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let i=this.contentMatch.matchFragment(e),s=i&&i.fillBefore(r.empty,!0);return s?new T(this,t,e.append(s),h.setFrom(n)):null}validContent(t){let e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(let e=0;e<t.childCount;e++)if(!this.allowsMarks(t.child(e).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){$(this.attrs,t,"node",this.name)}allowsMarkType(t){return null==this.markSet||this.markSet.indexOf(t)>-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0}allowedMarks(t){if(null==this.markSet)return t;let e;for(let n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n));return e?e.length?e:h.none:t}static compile(t,e){let n=Object.create(null);t.forEach(((t,r)=>n[t]=new W(t,e,r)));let r=e.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let t in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class U{constructor(t,e,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(t,e,n){let r=n.split("|");return n=>{let i=null===n?"null":typeof n;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}(t,e,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class G{constructor(t,e,n,r){this.name=t,this.rank=e,this.schema=n,this.spec=r,this.attrs=L(t,r.attrs),this.excluded=null;let i=j(this.attrs);this.instance=i?new h(this,i):null}create(t=null){return!t&&this.instance?this.instance:new h(this,q(this.attrs,t))}static compile(t,e){let n=Object.create(null),r=0;return t.forEach(((t,i)=>n[t]=new G(t,r++,e,i))),n}removeFromSet(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t}isInSet(t){for(let e=0;e<t.length;e++)if(t[e].type==this)return t[e]}checkAttrs(t){$(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class V{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let t in e)n[t]=e[t];n.nodes=t.from(e.nodes),n.marks=t.from(e.marks||{}),this.nodes=W.compile(this.spec.nodes,this),this.marks=G.compile(this.spec.marks,this);let r=Object.create(null);for(let t in this.nodes){if(t in this.marks)throw new RangeError(t+" can not be both a node and a mark");let e=this.nodes[t],n=e.spec.content||"",i=e.spec.marks;if(e.contentMatch=r[n]||(r[n]=z.parse(n,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!e.isInline||!e.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=e}e.markSet="_"==i?null:i?_(this,i.split(" ")):""!=i&&e.inlineContent?null:[]}for(let t in this.marks){let e=this.marks[t],n=e.spec.excludes;e.excluded=null==n?[e]:""==n?[]:_(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof W))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new M(n,n.defaultAttrs,t,h.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeFromJSON(t){return T.fromJSON(this,t)}markFromJSON(t){return h.fromJSON(this,t)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function _(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],s=t.marks[i],o=s;if(s)n.push(s);else for(let e in t.marks){let r=t.marks[e];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=r)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class H{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[];let n=this.matchedStyles=[];e.forEach((t=>{if(function(t){return null!=t.tag}(t))this.tags.push(t);else if(function(t){return null!=t.style}(t)){let e=/[^=]*/.exec(t.style)[0];n.indexOf(e)<0&&n.push(e),this.styles.push(t)}})),this.normalizeLists=!this.tags.some((e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let n=t.nodes[e.node];return n.contentMatch.matchType(n)}))}parse(t,e={}){let n=new tt(this,e,!1);return n.addAll(t,h.none,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new tt(this,e,!0);return n.addAll(t,h.none,e.from,e.to),a.maxOpen(n.finish())}matchTag(t,e,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(et(t,n.tag)&&(void 0===n.namespace||t.namespaceURI==n.namespace)&&(!n.context||e.matchesContext(n.context))){if(n.getAttrs){let e=n.getAttrs(t);if(!1===e)continue;n.attrs=e||void 0}return n}}}matchStyle(t,e,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],s=r.style;if(!(0!=s.indexOf(t)||r.context&&!n.matchesContext(r.context)||s.length>t.length&&(61!=s.charCodeAt(t.length)||s.slice(t.length+1)!=e))){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,r=0;for(;r<e.length;r++){let t=e[r];if((null==t.priority?50:t.priority)<n)break}e.splice(r,0,t)}for(let e in t.marks){let r=t.marks[e].spec.parseDOM;r&&r.forEach((t=>{n(t=nt(t)),t.mark||t.ignore||t.clearMark||(t.mark=e)}))}for(let e in t.nodes){let r=t.nodes[e].spec.parseDOM;r&&r.forEach((t=>{n(t=nt(t)),t.node||t.ignore||t.mark||(t.node=e)}))}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new H(t,H.schemaRules(t)))}}const K={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Q={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},X={ol:!0,ul:!0};function Y(t,e,n){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&n}class Z{constructor(t,e,n,r,i,s){this.type=t,this.attrs=e,this.marks=n,this.solid=r,this.options=s,this.content=[],this.activeMarks=h.none,this.match=i||(4&s?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(r.from(t));if(!e){let e,n=this.type.contentMatch;return(e=n.findWrapping(t.type))?(this.match=n,e):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let t,e=this.content[this.content.length-1];if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let e=r.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(r.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!K.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class tt{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0;let r,i=e.topNode,s=Y(null,e.preserveWhitespace,0)|(n?4:0);r=i?new Z(i.type,i.attrs,h.none,!0,e.topMatch||i.type.contentMatch,s):new Z(n?null:t.schema.topNodeType,null,h.none,!0,null,s),this.nodes=[r],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,e){3==t.nodeType?this.addTextNode(t,e):1==t.nodeType&&this.addElement(t,e)}addTextNode(t,e){let n=t.nodeValue,r=this.top;if(2&r.options||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(1&r.options)n=2&r.options?n.replace(/\r\n?/g,"\n"):n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let e=r.content[r.content.length-1],i=t.previousSibling;(!e||i&&"BR"==i.nodeName||e.isText&&/[ \t\r\n\u000c]$/.test(e.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),e),this.findInText(t)}else this.findInside(t)}addElement(t,e,n){let r,i=t.nodeName.toLowerCase();X.hasOwnProperty(i)&&this.parser.normalizeLists&&function(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let t=1==e.nodeType?e.nodeName.toLowerCase():null;t&&X.hasOwnProperty(t)&&n?(n.appendChild(e),e=n):"li"==t?n=e:t&&(n=null)}}(t);let s=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(r=this.parser.matchTag(t,this,n));if(s?s.ignore:Q.hasOwnProperty(i))this.findInside(t),this.ignoreFallback(t,e);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(t=s.skip);let n,r=this.top,o=this.needsBlock;if(K.hasOwnProperty(i))r.content.length&&r.content[0].isInline&&this.open&&(this.open--,r=this.top),n=!0,r.type||(this.needsBlock=!0);else if(!t.firstChild)return void this.leafFallback(t,e);let h=s&&s.skip?e:this.readStyles(t,e);h&&this.addAll(t,h),n&&this.sync(r),this.needsBlock=o}else{let n=this.readStyles(t,e);n&&this.addElementByRule(t,s,n,!1===s.consuming?r:void 0)}}leafFallback(t,e){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"),e)}ignoreFallback(t,e){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),e)}readStyles(t,e){let n=t.style;if(n&&n.length)for(let t=0;t<this.parser.matchedStyles.length;t++){let r=this.parser.matchedStyles[t],i=n.getPropertyValue(r);if(i)for(let t;;){let n=this.parser.matchStyle(r,i,this,t);if(!n)break;if(n.ignore)return null;if(e=n.clearMark?e.filter((t=>!n.clearMark(t))):e.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1!==n.consuming)break;t=n}}return e}addElementByRule(t,e,n,r){let i,s;if(e.node)if(s=this.parser.schema.nodes[e.node],s.isLeaf)this.insertNode(s.create(e.attrs),n)||this.leafFallback(t,n);else{let t=this.enter(s,e.attrs||null,n,e.preserveWhitespace);t&&(i=!0,n=t)}else{let t=this.parser.schema.marks[e.mark];n=n.concat(t.create(e.attrs))}let o=this.top;if(s&&s.isLeaf)this.findInside(t);else if(r)this.addElement(t,n,r);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach((t=>this.insertNode(t,n)));else{let r=t;"string"==typeof e.contentElement?r=t.querySelector(e.contentElement):"function"==typeof e.contentElement?r=e.contentElement(t):e.contentElement&&(r=e.contentElement),this.findAround(t,r,!0),this.addAll(r,n),this.findAround(t,r,!1)}i&&this.sync(o)&&this.open--}addAll(t,e,n,r){let i=n||0;for(let s=n?t.childNodes[n]:t.firstChild,o=null==r?null:t.childNodes[r];s!=o;s=s.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(s,e);this.findAtPoint(t,i)}findPlace(t,e){let n,r;for(let e=this.open;e>=0;e--){let i=this.nodes[e],s=i.findWrapping(t);if(s&&(!n||n.length>s.length)&&(n=s,r=i,!s.length))break;if(i.solid)break}if(!n)return null;this.sync(r);for(let t=0;t<n.length;t++)e=this.enterInner(n[t],null,e,!1);return e}insertNode(t,e){if(t.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&(e=this.enterInner(t,null,e))}let n=this.findPlace(t,e);if(n){this.closeExtra();let e=this.top;e.match&&(e.match=e.match.matchType(t.type));let r=h.none;for(let i of n.concat(t.marks))(e.type?e.type.allowsMarkType(i.type):rt(i.type,t.type))&&(r=i.addToSet(r));return e.content.push(t.mark(r)),!0}return!1}enter(t,e,n,r){let i=this.findPlace(t.create(e),n);return i&&(i=this.enterInner(t,e,n,!0,r)),i}enterInner(t,e,n,r=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let o=Y(t,i,s.options);4&s.options&&0==s.content.length&&(o|=4);let l=h.none;return n=n.filter((e=>!(s.type?s.type.allowsMarkType(e.type):rt(e.type,t))||(l=e.addToSet(l),!1))),this.nodes.push(new Z(t,e,l,r,null,o)),this.open++,n}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let e=n.length-1;e>=0;e--)t+=n[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)}findInside(t){if(this.find)for(let e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)}findAround(t,e,n){if(t!=e&&this.find)for(let r=0;r<this.find.length;r++)if(null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node)){e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}findInText(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),s=(t,o)=>{for(;t>=0;t--){let h=e[t];if(""==h){if(t==e.length-1||0==t)continue;for(;o>=i;o--)if(s(t-1,o))return!0;return!1}{let t=o>0||0==o&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!t||t.name!=h&&!t.isInGroup(h))return!1;o--}}return!0};return s(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}}function et(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function nt(t){let e={};for(let n in t)e[n]=t[n];return e}function rt(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let s=[],o=t=>{s.push(t);for(let n=0;n<t.edgeCount;n++){let{type:r,next:i}=t.edge(n);if(r==e)return!0;if(s.indexOf(i)<0&&o(i))return!0}};if(o(i.contentMatch))return!0}}class it{constructor(t,e){this.nodes=t,this.marks=e}serializeFragment(t,e={},n){n||(n=ot(e).createDocumentFragment());let r=n,i=[];return t.forEach((t=>{if(i.length||t.marks.length){let n=0,s=0;for(;n<i.length&&s<t.marks.length;){let e=t.marks[s];if(this.marks[e.type.name]){if(!e.eq(i[n][0])||!1===e.type.spec.spanning)break;n++,s++}else s++}for(;n<i.length;)r=i.pop()[1];for(;s<t.marks.length;){let n=t.marks[s++],o=this.serializeMark(n,t.isInline,e);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(t,e))})),n}serializeNodeInner(t,e){let{dom:n,contentDOM:r}=at(ot(e),this.nodes[t.type.name](t),null,t.attrs);if(r){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,e,r)}return n}serializeNode(t,e={}){let n=this.serializeNodeInner(t,e);for(let r=t.marks.length-1;r>=0;r--){let i=this.serializeMark(t.marks[r],t.isInline,e);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(t,e,n={}){let r=this.marks[t.type.name];return r&&at(ot(n),r(t,e),null,t.attrs)}static renderSpec(t,e,n=null,r){return at(t,e,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new it(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=st(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return st(t.marks)}}function st(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function ot(t){return t.document||window.document}const ht=new WeakMap;function lt(t){let e=ht.get(t);return void 0===e&&ht.set(t,e=function(t){let e=null;function n(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])e||(e=[]),e.push(t);else for(let e=0;e<t.length;e++)n(t[e]);else for(let e in t)n(t[e])}return n(t),e}(t)),e}function at(t,e,n,r){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let i,s=e[0];if("string"!=typeof s)throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=lt(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o,h=s.indexOf(" ");h>0&&(n=s.slice(0,h),s=s.slice(h+1));let l=n?t.createElementNS(n,s):t.createElement(s),a=e[1],c=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){c=2;for(let t in a)if(null!=a[t]){let e=t.indexOf(" ");e>0?l.setAttributeNS(t.slice(0,e),t.slice(e+1),a[t]):l.setAttribute(t,a[t])}}for(let i=c;i<e.length;i++){let s=e[i];if(0===s){if(i<e.length-1||i>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}{let{dom:e,contentDOM:i}=at(t,s,n,r);if(l.appendChild(e),i){if(o)throw new RangeError("Multiple content holes");o=i}}}return{dom:l,contentDOM:o}}export{z as ContentMatch,H as DOMParser,it as DOMSerializer,r as Fragment,h as Mark,G as MarkType,T as Node,O as NodeRange,W as NodeType,l as ReplaceError,S as ResolvedPos,V as Schema,a as Slice};
2
- //# sourceMappingURL=index2.mjs.map