@fewangsit/wangsvue-fats 1.0.1-alpha.25 → 1.0.1-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1195) hide show
  1. package/{animation/index.d.ts → components/animation/Animation.vue.d.ts} +1 -1
  2. package/{assetinfo/index.d.ts → components/assetinfo/AssetInfo.vue.d.ts} +5 -2
  3. package/{badgegroup/index.d.ts → components/badgegroup/BadgeGroup.vue.d.ts} +1 -1
  4. package/{treenode/index.d.ts → components/basetree/TreeNode.vue.d.ts} +1 -1
  5. package/{button/index.d.ts → components/button/Button.vue.d.ts} +2 -3
  6. package/{buttonImportExcel/index.d.ts → components/buttonImportExcel/ButtonImportExcel.vue.d.ts} +2 -2
  7. package/{buttonaddbyscan/index.d.ts → components/buttonaddbyscan/ButtonAddByScan.vue.d.ts} +2 -2
  8. package/{buttondownload/index.d.ts → components/buttondownload/ButtonDownload.vue.d.ts} +1 -1
  9. package/{buttonscan/index.d.ts → components/buttonscan/ButtonScan.vue.d.ts} +4 -6
  10. package/{buttonsearchbyscan/index.d.ts → components/buttonsearchbyscan/ButtonSearchByScan.vue.d.ts} +2 -2
  11. package/{buttonselecttree/index.d.ts → components/buttonselecttree/ButtonSelectTree.vue.d.ts} +2 -2
  12. package/{buttonsplit/index.d.ts → components/buttonsplit/ButtonSplit.vue.d.ts} +1 -1
  13. package/{buttontoggle/index.d.ts → components/buttontoggle/ButtonToggle.vue.d.ts} +4 -1
  14. package/{buttonviewlog/index.d.ts → components/buttonviewlog/ButtonViewLog.vue.d.ts} +1 -1
  15. package/{calendar/index.d.ts → components/calendar/Calendar.vue.d.ts} +1 -1
  16. package/{carousel/index.d.ts → components/carousel/Carousel.vue.d.ts} +1 -1
  17. package/{customcolumn/index.d.ts → components/customcolumn/CustomColumn.vue.d.ts} +1 -1
  18. package/{datatable/index.d.ts → components/datatable/DataTable.vue.d.ts} +5 -20
  19. package/components/dialogassetnamedetail/options/columns.d.ts +2 -0
  20. package/components/dialogassetnamedetail/options/filter.d.ts +2 -0
  21. package/{dialogconfirm/index.d.ts → components/dialogconfirm/DialogConfirm.vue.d.ts} +1 -1
  22. package/{dialogform/index.d.ts → components/dialogform/DialogForm.vue.d.ts} +2 -2
  23. package/{dialoglinkedasset/index.d.ts → components/dialoglinkedasset/DialogLinkedAsset.vue.d.ts} +3 -0
  24. package/{dialogprintqr/index.d.ts → components/dialogprintqr/DialogPrintQR.vue.d.ts} +1 -1
  25. package/{dialogreportdamage/index.d.ts → components/dialogreportdamage/DialogReportDamage.vue.d.ts} +1 -1
  26. package/{dialogreportmissing/index.d.ts → components/dialogreportmissing/DialogReportMissing.vue.d.ts} +1 -1
  27. package/{dialogreporttag/index.d.ts → components/dialogreporttag/DialogReportTag.vue.d.ts} +1 -1
  28. package/{dialogselecttree/index.d.ts → components/dialogselecttree/DialogSelectTree.vue.d.ts} +3 -3
  29. package/{dialogselectuser/index.d.ts → components/dialogselectuser/DialogSelectUser.vue.d.ts} +8 -6
  30. package/{dialogselectuser → components/dialogselectuser}/options/columns.d.ts +1 -1
  31. package/{dialogtransferlog/index.d.ts → components/dialogtransferlog/DialogTransferLog.vue.d.ts} +1 -1
  32. package/{dropdown/index.d.ts → components/dropdown/Dropdown.vue.d.ts} +3 -3
  33. package/{fileupload/index.d.ts → components/fileupload/FileUpload.vue.d.ts} +3 -3
  34. package/{filtercontainer/index.d.ts → components/filtercontainer/FilterContainer.vue.d.ts} +10 -7
  35. package/{icon/index.d.ts → components/icon/Icon.vue.d.ts} +0 -1
  36. package/{imagecompressor/index.d.ts → components/imagecompressor/ImageCompressor.vue.d.ts} +1 -1
  37. package/components/index.d.ts +83 -0
  38. package/{inputbadge/index.d.ts → components/inputbadge/InputBadge.vue.d.ts} +1 -1
  39. package/{inputcurrency/index.d.ts → components/inputcurrency/InputCurrency.vue.d.ts} +1 -1
  40. package/{inputcurrency/helpers/index.d.ts → components/inputcurrency/helpers/currency.helper.d.ts} +1 -1
  41. package/{inputemail/index.d.ts → components/inputemail/InputEmail.vue.d.ts} +1 -1
  42. package/{inputnumber/index.d.ts → components/inputnumber/InputNumber.vue.d.ts} +1 -1
  43. package/{inputpassword/index.d.ts → components/inputpassword/InputPassword.vue.d.ts} +1 -1
  44. package/{inputphonenumber/index.d.ts → components/inputphonenumber/InputPhoneNumber.vue.d.ts} +1 -4
  45. package/{inputrangenumber/index.d.ts → components/inputrangenumber/InputRangeNumber.vue.d.ts} +1 -1
  46. package/{inputsearch/index.d.ts → components/inputsearch/InputSearch.vue.d.ts} +4 -1
  47. package/{inputtext/index.d.ts → components/inputtext/InputText.vue.d.ts} +1 -1
  48. package/{inputurl/index.d.ts → components/inputurl/InputURL.vue.d.ts} +4 -1
  49. package/{languagedropdown/index.d.ts → components/languagedropdown/LanguageDropdown.vue.d.ts} +4 -1
  50. package/{litedropdown/index.d.ts → components/litedropdown/LiteDropdown.vue.d.ts} +1 -1
  51. package/components/menuitem/index.d.ts +106 -0
  52. package/{multiselect/index.d.ts → components/multiselect/MultiSelect.vue.d.ts} +6 -2
  53. package/{steps/index.d.ts → components/steps/Steps.vue.d.ts} +1 -1
  54. package/{tabmenu/index.d.ts → components/tabmenu/TabMenu.vue.d.ts} +1 -1
  55. package/{textarea/index.d.ts → components/textarea/Textarea.vue.d.ts} +1 -1
  56. package/{timeline/index.d.ts → components/timeline/Timeline.vue.d.ts} +2 -2
  57. package/{toast/index.d.ts → components/toast/Toast.vue.d.ts} +1 -1
  58. package/{tree/index.d.ts → components/tree/Tree.vue.d.ts} +3 -4
  59. package/{tree → components/tree}/helpers/flattenTreeNodeChildren.helper.d.ts +1 -1
  60. package/{userwithicon/index.d.ts → components/userwithicon/UserWithIcon.vue.d.ts} +1 -1
  61. package/directives/index.d.ts +0 -1
  62. package/event-bus/index.d.ts +2 -2
  63. package/{wangsvue-fats.d.ts → main.d.ts} +6 -4
  64. package/package.json +12 -8
  65. package/plugins/WangsVue.d.ts +46 -31
  66. package/plugins/i18n-extension.d.ts +4 -0
  67. package/plugins/i18n.d.ts +102 -4
  68. package/stats.html +1 -1
  69. package/style.css +2 -2
  70. package/utils/date.util.d.ts +0 -12
  71. package/utils/exportToExcel.util.d.ts +6 -2
  72. package/utils/getStatusSeverity.util.d.ts +1 -1
  73. package/utils/index.d.ts +3 -8
  74. package/utils/listenSidebarChanges.util.d.ts +1 -1
  75. package/utils/role.util.d.ts +1 -1
  76. package/utils/toast.util.d.ts +119 -4
  77. package/utils/xlsx.util.d.ts +1 -6
  78. package/{wangsvue-fats.esm.browser.js → wangsvue-fats.js} +33428 -33491
  79. package/wangsvue-fats.system.js +87 -87
  80. package/animation/index.es.js +0 -52
  81. package/approverinfo/index.es.js +0 -127
  82. package/assetinfo/index.es.js +0 -161
  83. package/assets/lottiejs/loading-page.es.js +0 -15
  84. package/assets/lottiejs/loading-plane.es.js +0 -4
  85. package/assets/lottiejs/loading-table.es.js +0 -15
  86. package/assets/lottiejs/no-data.es.js +0 -15
  87. package/backgroundimagecropper/index.es.js +0 -57
  88. package/badge/index.es.js +0 -99
  89. package/badgegroup/index.es.js +0 -68
  90. package/basecalendar/index.es.js +0 -876
  91. package/basetree/index.es.js +0 -169
  92. package/breadcrumb/index.es.js +0 -46
  93. package/button/index.es.js +0 -120
  94. package/buttonaddbyscan/index.es.js +0 -148
  95. package/buttonbulkaction/index.es.js +0 -186
  96. package/buttoncopy/index.es.js +0 -31
  97. package/buttondownload/index.es.js +0 -113
  98. package/buttonfilter/index.es.js +0 -31
  99. package/buttonradio/index.es.js +0 -93
  100. package/buttonscan/index.es.js +0 -417
  101. package/buttonsearch/index.es.js +0 -70
  102. package/buttonsearchbyscan/index.es.js +0 -90
  103. package/buttonselecttree/index.es.js +0 -220
  104. package/buttonselectuser/index.d.ts +0 -7
  105. package/buttonselectuser/index.es.js +0 -101
  106. package/buttonsync/index.es.js +0 -29
  107. package/buttontoggle/index.es.js +0 -11
  108. package/buttonviewlog/index.es.js +0 -21
  109. package/calendar/index.es.js +0 -117
  110. package/card/index.es.js +0 -47
  111. package/carousel/index.es.js +0 -65
  112. package/checkbox/index.es.js +0 -135
  113. package/codesnippet/index.es.js +0 -118
  114. package/codesnippetadapter/index.es.js +0 -26
  115. package/columnlist/index.es.js +0 -204
  116. package/components.d.ts +0 -84
  117. package/config/defaultProps.es.js +0 -133
  118. package/config/index.es.js +0 -12
  119. package/config/locale.es.js +0 -86
  120. package/customcolumn/index.es.js +0 -138
  121. package/datatable/index.es.js +0 -994
  122. package/datepicker/index.es.js +0 -140
  123. package/daypicker/index.es.js +0 -134
  124. package/dialog/index.es.js +0 -127
  125. package/dialogassetnamedetail/index.es.js +0 -246
  126. package/dialogassetnamedetail/options/columns.d.ts +0 -2
  127. package/dialogassetnamedetail/options/filter.d.ts +0 -2
  128. package/dialogbasictransferlog/index.es.js +0 -225
  129. package/dialogconfirm/index.es.js +0 -140
  130. package/dialogdamagelog/index.d.ts +0 -7
  131. package/dialogdamagelog/index.es.js +0 -245
  132. package/dialogform/index.es.js +0 -223
  133. package/dialogfulltransferlog/index.es.js +0 -237
  134. package/dialoglinkedasset/index.es.js +0 -157
  135. package/dialogprintqr/index.es.js +0 -334
  136. package/dialogreportdamage/index.es.js +0 -242
  137. package/dialogreportmissing/index.es.js +0 -118
  138. package/dialogreporttag/index.es.js +0 -130
  139. package/dialogselecttree/index.es.js +0 -269
  140. package/dialogselectuser/index.es.js +0 -186
  141. package/dialogselectuserfilter/index.es.js +0 -40
  142. package/dialogtransferlog/index.es.js +0 -32
  143. package/directives/focus.es.js +0 -13
  144. package/directives/index.es.js +0 -2
  145. package/directives/tooltip.d.ts +0 -1
  146. package/directives/tooltip.es.js +0 -1
  147. package/disposalreport/index.d.ts +0 -15
  148. package/disposalreport/index.es.js +0 -32
  149. package/disposalreportbulkaction/index.es.js +0 -80
  150. package/disposalreporttable/index.es.js +0 -318
  151. package/disposalreporttablefilter/index.es.js +0 -73
  152. package/dropdown/index.es.js +0 -243
  153. package/editor/index.es.js +0 -964
  154. package/editorbutton/index.es.js +0 -28
  155. package/event-bus/index.es.js +0 -6
  156. package/event-bus/mitt.es.js +0 -53
  157. package/fieldwrapper/index.es.js +0 -40
  158. package/fileupload/index.es.js +0 -176
  159. package/filtercontainer/index.es.js +0 -290
  160. package/form/index.es.js +0 -188
  161. package/hardwaresync/index.es.js +0 -236
  162. package/icon/index.es.js +0 -82
  163. package/image/index.es.js +0 -171
  164. package/imagecompressor/index.es.js +0 -529
  165. package/imageinputinfo/index.es.js +0 -46
  166. package/inlinemessage/index.es.js +0 -94
  167. package/inputbadge/index.es.js +0 -187
  168. package/inputcurrency/index.es.js +0 -149
  169. package/inputemail/index.es.js +0 -49
  170. package/inputgroup/index.es.js +0 -31
  171. package/inputnumber/index.es.js +0 -240
  172. package/inputotp/index.es.js +0 -30
  173. package/inputpassword/index.es.js +0 -121
  174. package/inputphonenumber/index.es.js +0 -603
  175. package/inputrangenumber/index.es.js +0 -134
  176. package/inputsearch/index.es.js +0 -53
  177. package/inputtext/index.es.js +0 -242
  178. package/inputurl/index.es.js +0 -61
  179. package/invisiblefield/index.es.js +0 -27
  180. package/languagedropdownoption/index.es.js +0 -51
  181. package/languageswitcher/index.es.js +0 -89
  182. package/litedropdown/index.es.js +0 -102
  183. package/loading/index.es.js +0 -24
  184. package/mentionlist/index.es.js +0 -58
  185. package/mentionsection/index.es.js +0 -52
  186. package/menu/index.es.js +0 -73
  187. package/menuitem/index.d.ts +0 -34
  188. package/menuitem/index.es.js +0 -65
  189. package/multirow/index.es.js +0 -52
  190. package/multiselect/index.es.js +0 -189
  191. package/overlaypanel/index.es.js +0 -49
  192. package/paginator/index.es.js +0 -50
  193. package/plugins/VueHtmlToPaper.es.js +0 -40
  194. package/plugins/WangsVue.es.js +0 -346
  195. package/plugins/basei18n.d.ts +0 -103
  196. package/plugins/basei18n.es.js +0 -89
  197. package/plugins/formValidation.es.js +0 -15
  198. package/plugins/i18n.es.js +0 -6
  199. package/steps/index.es.js +0 -41
  200. package/tabmenu/index.es.js +0 -29
  201. package/tagtype/index.es.js +0 -53
  202. package/textarea/index.es.js +0 -108
  203. package/timeline/index.es.js +0 -127
  204. package/timelinecontentbytype/index.es.js +0 -111
  205. package/toast/index.es.js +0 -74
  206. package/toast/service/index.d.ts +0 -1
  207. package/toggleswitch/index.es.js +0 -90
  208. package/transactionroles/index.es.js +0 -223
  209. package/tree/index.es.js +0 -274
  210. package/treenode/index.es.js +0 -506
  211. package/treesearchinput/index.es.js +0 -56
  212. package/username/index.es.js +0 -146
  213. package/userwithicon/index.es.js +0 -18
  214. package/utils/addAttachment.util.es.js +0 -10
  215. package/utils/baseToast.util.d.ts +0 -120
  216. package/utils/baseToast.util.es.js +0 -44
  217. package/utils/cookie.util.d.ts +0 -18
  218. package/utils/cookie.util.es.js +0 -19
  219. package/utils/date.util.es.js +0 -212
  220. package/utils/exportToExcel.util.es.js +0 -55
  221. package/utils/filterOptions.util.es.js +0 -4
  222. package/utils/formatTagCode.util.es.js +0 -18
  223. package/utils/genPlaceholder.util.es.js +0 -37
  224. package/utils/getStatusSeverity.util.es.js +0 -37
  225. package/utils/index.es.js +0 -2
  226. package/utils/isBasic.util.es.js +0 -4
  227. package/utils/listenSidebarChanges.util.es.js +0 -15
  228. package/utils/mergePropsWithDefaults.util.es.js +0 -9
  229. package/utils/object.util.es.js +0 -61
  230. package/utils/role.util.es.js +0 -70
  231. package/utils/textFormatter.util.es.js +0 -21
  232. package/utils/toast.util.es.js +0 -15
  233. package/utils/xlsx.util.es.js +0 -9
  234. package/validatormessage/index.es.js +0 -19
  235. package/vendor/@popperjs/core/lib/createPopper.es.js +0 -122
  236. package/vendor/@popperjs/core/lib/dom-utils/contains.es.js +0 -18
  237. package/vendor/@popperjs/core/lib/dom-utils/getBoundingClientRect.es.js +0 -23
  238. package/vendor/@popperjs/core/lib/dom-utils/getClippingRect.es.js +0 -37
  239. package/vendor/@popperjs/core/lib/dom-utils/getCompositeRect.es.js +0 -32
  240. package/vendor/@popperjs/core/lib/dom-utils/getComputedStyle.es.js +0 -7
  241. package/vendor/@popperjs/core/lib/dom-utils/getDocumentElement.es.js +0 -10
  242. package/vendor/@popperjs/core/lib/dom-utils/getDocumentRect.es.js +0 -17
  243. package/vendor/@popperjs/core/lib/dom-utils/getHTMLElementScroll.es.js +0 -9
  244. package/vendor/@popperjs/core/lib/dom-utils/getLayoutRect.es.js +0 -13
  245. package/vendor/@popperjs/core/lib/dom-utils/getNodeName.es.js +0 -6
  246. package/vendor/@popperjs/core/lib/dom-utils/getNodeScroll.es.js +0 -10
  247. package/vendor/@popperjs/core/lib/dom-utils/getOffsetParent.es.js +0 -35
  248. package/vendor/@popperjs/core/lib/dom-utils/getParentNode.es.js +0 -18
  249. package/vendor/@popperjs/core/lib/dom-utils/getScrollParent.es.js +0 -10
  250. package/vendor/@popperjs/core/lib/dom-utils/getViewportRect.es.js +0 -21
  251. package/vendor/@popperjs/core/lib/dom-utils/getWindow.es.js +0 -12
  252. package/vendor/@popperjs/core/lib/dom-utils/getWindowScroll.es.js +0 -11
  253. package/vendor/@popperjs/core/lib/dom-utils/getWindowScrollBarX.es.js +0 -9
  254. package/vendor/@popperjs/core/lib/dom-utils/instanceOf.es.js +0 -20
  255. package/vendor/@popperjs/core/lib/dom-utils/isLayoutViewport.es.js +0 -7
  256. package/vendor/@popperjs/core/lib/dom-utils/isScrollParent.es.js +0 -8
  257. package/vendor/@popperjs/core/lib/dom-utils/isTableElement.es.js +0 -7
  258. package/vendor/@popperjs/core/lib/dom-utils/listScrollParents.es.js +0 -16
  259. package/vendor/@popperjs/core/lib/enums.es.js +0 -22
  260. package/vendor/@popperjs/core/lib/index.es.js +0 -1
  261. package/vendor/@popperjs/core/lib/modifiers/applyStyles.es.js +0 -47
  262. package/vendor/@popperjs/core/lib/modifiers/arrow.es.js +0 -37
  263. package/vendor/@popperjs/core/lib/modifiers/computeStyles.es.js +0 -98
  264. package/vendor/@popperjs/core/lib/modifiers/eventListeners.es.js +0 -26
  265. package/vendor/@popperjs/core/lib/modifiers/flip.es.js +0 -74
  266. package/vendor/@popperjs/core/lib/modifiers/hide.es.js +0 -44
  267. package/vendor/@popperjs/core/lib/modifiers/index.es.js +0 -1
  268. package/vendor/@popperjs/core/lib/modifiers/offset.es.js +0 -30
  269. package/vendor/@popperjs/core/lib/modifiers/popperOffsets.es.js +0 -19
  270. package/vendor/@popperjs/core/lib/modifiers/preventOverflow.es.js +0 -54
  271. package/vendor/@popperjs/core/lib/popper-lite.es.js +0 -1
  272. package/vendor/@popperjs/core/lib/popper.es.js +0 -16
  273. package/vendor/@popperjs/core/lib/utils/computeAutoPlacement.es.js +0 -27
  274. package/vendor/@popperjs/core/lib/utils/computeOffsets.es.js +0 -54
  275. package/vendor/@popperjs/core/lib/utils/debounce.es.js +0 -13
  276. package/vendor/@popperjs/core/lib/utils/detectOverflow.es.js +0 -33
  277. package/vendor/@popperjs/core/lib/utils/expandToHashMap.es.js +0 -8
  278. package/vendor/@popperjs/core/lib/utils/getAltAxis.es.js +0 -6
  279. package/vendor/@popperjs/core/lib/utils/getBasePlacement.es.js +0 -6
  280. package/vendor/@popperjs/core/lib/utils/getFreshSideObject.es.js +0 -11
  281. package/vendor/@popperjs/core/lib/utils/getMainAxisFromPlacement.es.js +0 -6
  282. package/vendor/@popperjs/core/lib/utils/getOppositePlacement.es.js +0 -14
  283. package/vendor/@popperjs/core/lib/utils/getOppositeVariationPlacement.es.js +0 -12
  284. package/vendor/@popperjs/core/lib/utils/getVariation.es.js +0 -6
  285. package/vendor/@popperjs/core/lib/utils/math.es.js +0 -6
  286. package/vendor/@popperjs/core/lib/utils/mergeByName.es.js +0 -15
  287. package/vendor/@popperjs/core/lib/utils/mergePaddingObject.es.js +0 -7
  288. package/vendor/@popperjs/core/lib/utils/orderModifiers.es.js +0 -31
  289. package/vendor/@popperjs/core/lib/utils/rectToClientRect.es.js +0 -11
  290. package/vendor/@popperjs/core/lib/utils/userAgent.es.js +0 -9
  291. package/vendor/@popperjs/core/lib/utils/within.es.js +0 -12
  292. package/vendor/@tiptap/core/dist/index.es.js +0 -2868
  293. package/vendor/@tiptap/extension-bold/dist/index.es.js +0 -71
  294. package/vendor/@tiptap/extension-bubble-menu/dist/index.es.js +0 -128
  295. package/vendor/@tiptap/extension-bullet-list/dist/index.es.js +0 -53
  296. package/vendor/@tiptap/extension-code/dist/index.es.js +0 -51
  297. package/vendor/@tiptap/extension-document/dist/index.es.js +0 -9
  298. package/vendor/@tiptap/extension-floating-menu/dist/index.es.js +0 -99
  299. package/vendor/@tiptap/extension-heading/dist/index.es.js +0 -54
  300. package/vendor/@tiptap/extension-history/dist/index.es.js +0 -35
  301. package/vendor/@tiptap/extension-image/dist/index.es.js +0 -64
  302. package/vendor/@tiptap/extension-italic/dist/index.es.js +0 -70
  303. package/vendor/@tiptap/extension-link/dist/index.es.js +0 -262
  304. package/vendor/@tiptap/extension-list-item/dist/index.es.js +0 -33
  305. package/vendor/@tiptap/extension-mention/dist/index.es.js +0 -130
  306. package/vendor/@tiptap/extension-ordered-list/dist/index.es.js +0 -71
  307. package/vendor/@tiptap/extension-paragraph/dist/index.es.js +0 -33
  308. package/vendor/@tiptap/extension-placeholder/dist/index.es.js +0 -52
  309. package/vendor/@tiptap/extension-text/dist/index.es.js +0 -8
  310. package/vendor/@tiptap/extension-underline/dist/index.es.js +0 -40
  311. package/vendor/@tiptap/pm/commands/dist/index.es.js +0 -1
  312. package/vendor/@tiptap/pm/history/dist/index.es.js +0 -1
  313. package/vendor/@tiptap/pm/keymap/dist/index.es.js +0 -1
  314. package/vendor/@tiptap/pm/model/dist/index.es.js +0 -1
  315. package/vendor/@tiptap/pm/schema-list/dist/index.es.js +0 -1
  316. package/vendor/@tiptap/pm/state/dist/index.es.js +0 -1
  317. package/vendor/@tiptap/pm/transform/dist/index.es.js +0 -1
  318. package/vendor/@tiptap/pm/view/dist/index.es.js +0 -1
  319. package/vendor/@tiptap/suggestion/dist/index.es.js +0 -131
  320. package/vendor/@tiptap/vue-3/dist/index.es.js +0 -436
  321. package/vendor/@wangs-ui/core/components/p-BU8h34na.es.js +0 -19
  322. package/vendor/@wangs-ui/core/components/p-C5lMEBcj.es.js +0 -149
  323. package/vendor/@wangs-ui/core/components/p-CKYwZoTo.es.js +0 -57
  324. package/vendor/@wangs-ui/core/components/p-CsoK-EWG.es.js +0 -158
  325. package/vendor/@wangs-ui/core/components/p-DPHEi31J.es.js +0 -135
  326. package/vendor/@wangs-ui/core/components/p-DTTCzifR.es.js +0 -700
  327. package/vendor/@wangs-ui/core/components/p-Duri5p90.es.js +0 -173
  328. package/vendor/@wangs-ui/core/components/wangs-button.es.js +0 -34
  329. package/vendor/@wangs-ui/core/components/wangs-icon.es.js +0 -5
  330. package/vendor/@wangs-ui/core/components/wangs-input-otp.es.js +0 -5
  331. package/vendor/@wangs-ui/core/components/wangs-tab-menu.es.js +0 -5
  332. package/vendor/@wangs-ui/core/dist/esm/index-DCkh3cGv.es.js +0 -326
  333. package/vendor/@wangs-ui/core/dist/esm/index.es.js +0 -1
  334. package/vendor/@wangs-ui/core/dist/index.es.js +0 -1
  335. package/vendor/@wangs-ui/vue/dist/index.es.js +0 -98
  336. package/vendor/base64toblob/base64toblob.es.js +0 -21
  337. package/vendor/dijkstrajs/dijkstra.es.js +0 -71
  338. package/vendor/highlight.js/es/core.es.js +0 -7
  339. package/vendor/highlight.js/es/languages/javascript.es.js +0 -656
  340. package/vendor/highlight.js/es/languages/json.es.js +0 -38
  341. package/vendor/highlight.js/es/languages/typescript.es.js +0 -743
  342. package/vendor/highlight.js/es/languages/vbscript-html.es.js +0 -16
  343. package/vendor/highlight.js/lib/core.es.js +0 -1063
  344. package/vendor/linkifyjs/dist/linkify.es.es.js +0 -705
  345. package/vendor/lodash/_Symbol.es.js +0 -11
  346. package/vendor/lodash/_baseGetTag.es.js +0 -16
  347. package/vendor/lodash/_baseTrim.es.js +0 -14
  348. package/vendor/lodash/_freeGlobal.es.js +0 -11
  349. package/vendor/lodash/_getRawTag.es.js +0 -21
  350. package/vendor/lodash/_objectToString.es.js +0 -13
  351. package/vendor/lodash/_root.es.js +0 -11
  352. package/vendor/lodash/_trimmedEndIndex.es.js +0 -15
  353. package/vendor/lodash/debounce.es.js +0 -60
  354. package/vendor/lodash/isObject.es.js +0 -13
  355. package/vendor/lodash/isObjectLike.es.js +0 -12
  356. package/vendor/lodash/isSymbol.es.js +0 -15
  357. package/vendor/lodash/now.es.js +0 -13
  358. package/vendor/lodash/throttle.es.js +0 -22
  359. package/vendor/lodash/toNumber.es.js +0 -28
  360. package/vendor/lodash-es/_DataView.es.js +0 -6
  361. package/vendor/lodash-es/_Hash.es.js +0 -20
  362. package/vendor/lodash-es/_LazyWrapper.es.js +0 -1
  363. package/vendor/lodash-es/_ListCache.es.js +0 -20
  364. package/vendor/lodash-es/_LodashWrapper.es.js +0 -1
  365. package/vendor/lodash-es/_Map.es.js +0 -6
  366. package/vendor/lodash-es/_MapCache.es.js +0 -20
  367. package/vendor/lodash-es/_Promise.es.js +0 -6
  368. package/vendor/lodash-es/_Set.es.js +0 -6
  369. package/vendor/lodash-es/_SetCache.es.js +0 -13
  370. package/vendor/lodash-es/_Stack.es.js +0 -18
  371. package/vendor/lodash-es/_Symbol.es.js +0 -5
  372. package/vendor/lodash-es/_Uint8Array.es.js +0 -5
  373. package/vendor/lodash-es/_WeakMap.es.js +0 -6
  374. package/vendor/lodash-es/_apply.es.js +0 -1
  375. package/vendor/lodash-es/_arrayAggregator.es.js +0 -1
  376. package/vendor/lodash-es/_arrayEach.es.js +0 -8
  377. package/vendor/lodash-es/_arrayEachRight.es.js +0 -1
  378. package/vendor/lodash-es/_arrayEvery.es.js +0 -1
  379. package/vendor/lodash-es/_arrayFilter.es.js +0 -10
  380. package/vendor/lodash-es/_arrayIncludes.es.js +0 -1
  381. package/vendor/lodash-es/_arrayIncludesWith.es.js +0 -1
  382. package/vendor/lodash-es/_arrayLikeKeys.es.js +0 -20
  383. package/vendor/lodash-es/_arrayMap.es.js +0 -1
  384. package/vendor/lodash-es/_arrayPush.es.js +0 -8
  385. package/vendor/lodash-es/_arrayReduce.es.js +0 -1
  386. package/vendor/lodash-es/_arrayReduceRight.es.js +0 -1
  387. package/vendor/lodash-es/_arraySample.es.js +0 -1
  388. package/vendor/lodash-es/_arraySampleSize.es.js +0 -1
  389. package/vendor/lodash-es/_arrayShuffle.es.js +0 -1
  390. package/vendor/lodash-es/_arraySome.es.js +0 -9
  391. package/vendor/lodash-es/_asciiSize.es.js +0 -1
  392. package/vendor/lodash-es/_asciiToArray.es.js +0 -1
  393. package/vendor/lodash-es/_asciiWords.es.js +0 -1
  394. package/vendor/lodash-es/_assignMergeValue.es.js +0 -1
  395. package/vendor/lodash-es/_assignValue.es.js +0 -10
  396. package/vendor/lodash-es/_assocIndexOf.es.js +0 -10
  397. package/vendor/lodash-es/_baseAggregator.es.js +0 -1
  398. package/vendor/lodash-es/_baseAssign.es.js +0 -1
  399. package/vendor/lodash-es/_baseAssignIn.es.js +0 -1
  400. package/vendor/lodash-es/_baseAssignValue.es.js +0 -12
  401. package/vendor/lodash-es/_baseAt.es.js +0 -1
  402. package/vendor/lodash-es/_baseClamp.es.js +0 -1
  403. package/vendor/lodash-es/_baseClone.es.js +0 -55
  404. package/vendor/lodash-es/_baseConforms.es.js +0 -1
  405. package/vendor/lodash-es/_baseConformsTo.es.js +0 -1
  406. package/vendor/lodash-es/_baseCreate.es.js +0 -17
  407. package/vendor/lodash-es/_baseDelay.es.js +0 -1
  408. package/vendor/lodash-es/_baseDifference.es.js +0 -1
  409. package/vendor/lodash-es/_baseEach.es.js +0 -1
  410. package/vendor/lodash-es/_baseEachRight.es.js +0 -1
  411. package/vendor/lodash-es/_baseEvery.es.js +0 -1
  412. package/vendor/lodash-es/_baseExtremum.es.js +0 -1
  413. package/vendor/lodash-es/_baseFill.es.js +0 -1
  414. package/vendor/lodash-es/_baseFilter.es.js +0 -1
  415. package/vendor/lodash-es/_baseFindIndex.es.js +0 -1
  416. package/vendor/lodash-es/_baseFindKey.es.js +0 -1
  417. package/vendor/lodash-es/_baseFlatten.es.js +0 -1
  418. package/vendor/lodash-es/_baseFor.es.js +0 -1
  419. package/vendor/lodash-es/_baseForOwn.es.js +0 -1
  420. package/vendor/lodash-es/_baseForOwnRight.es.js +0 -1
  421. package/vendor/lodash-es/_baseForRight.es.js +0 -1
  422. package/vendor/lodash-es/_baseFunctions.es.js +0 -1
  423. package/vendor/lodash-es/_baseGet.es.js +0 -1
  424. package/vendor/lodash-es/_baseGetAllKeys.es.js +0 -9
  425. package/vendor/lodash-es/_baseGetTag.es.js +0 -10
  426. package/vendor/lodash-es/_baseGt.es.js +0 -1
  427. package/vendor/lodash-es/_baseHas.es.js +0 -1
  428. package/vendor/lodash-es/_baseHasIn.es.js +0 -1
  429. package/vendor/lodash-es/_baseInRange.es.js +0 -1
  430. package/vendor/lodash-es/_baseIndexOf.es.js +0 -1
  431. package/vendor/lodash-es/_baseIndexOfWith.es.js +0 -1
  432. package/vendor/lodash-es/_baseIntersection.es.js +0 -1
  433. package/vendor/lodash-es/_baseInverter.es.js +0 -1
  434. package/vendor/lodash-es/_baseInvoke.es.js +0 -1
  435. package/vendor/lodash-es/_baseIsArguments.es.js +0 -9
  436. package/vendor/lodash-es/_baseIsArrayBuffer.es.js +0 -1
  437. package/vendor/lodash-es/_baseIsDate.es.js +0 -1
  438. package/vendor/lodash-es/_baseIsEqual.es.js +0 -8
  439. package/vendor/lodash-es/_baseIsEqualDeep.es.js +0 -32
  440. package/vendor/lodash-es/_baseIsMap.es.js +0 -9
  441. package/vendor/lodash-es/_baseIsMatch.es.js +0 -1
  442. package/vendor/lodash-es/_baseIsNaN.es.js +0 -1
  443. package/vendor/lodash-es/_baseIsNative.es.js +0 -16
  444. package/vendor/lodash-es/_baseIsRegExp.es.js +0 -1
  445. package/vendor/lodash-es/_baseIsSet.es.js +0 -9
  446. package/vendor/lodash-es/_baseIsTypedArray.es.js +0 -12
  447. package/vendor/lodash-es/_baseIteratee.es.js +0 -1
  448. package/vendor/lodash-es/_baseKeys.es.js +0 -14
  449. package/vendor/lodash-es/_baseKeysIn.es.js +0 -1
  450. package/vendor/lodash-es/_baseLodash.es.js +0 -1
  451. package/vendor/lodash-es/_baseLt.es.js +0 -1
  452. package/vendor/lodash-es/_baseMap.es.js +0 -1
  453. package/vendor/lodash-es/_baseMatches.es.js +0 -1
  454. package/vendor/lodash-es/_baseMatchesProperty.es.js +0 -1
  455. package/vendor/lodash-es/_baseMean.es.js +0 -1
  456. package/vendor/lodash-es/_baseMerge.es.js +0 -1
  457. package/vendor/lodash-es/_baseMergeDeep.es.js +0 -1
  458. package/vendor/lodash-es/_baseNth.es.js +0 -1
  459. package/vendor/lodash-es/_baseOrderBy.es.js +0 -1
  460. package/vendor/lodash-es/_basePick.es.js +0 -1
  461. package/vendor/lodash-es/_basePickBy.es.js +0 -1
  462. package/vendor/lodash-es/_baseProperty.es.js +0 -1
  463. package/vendor/lodash-es/_basePropertyDeep.es.js +0 -1
  464. package/vendor/lodash-es/_basePropertyOf.es.js +0 -1
  465. package/vendor/lodash-es/_basePullAll.es.js +0 -1
  466. package/vendor/lodash-es/_basePullAt.es.js +0 -1
  467. package/vendor/lodash-es/_baseRandom.es.js +0 -1
  468. package/vendor/lodash-es/_baseRange.es.js +0 -1
  469. package/vendor/lodash-es/_baseReduce.es.js +0 -1
  470. package/vendor/lodash-es/_baseRepeat.es.js +0 -1
  471. package/vendor/lodash-es/_baseRest.es.js +0 -1
  472. package/vendor/lodash-es/_baseSample.es.js +0 -1
  473. package/vendor/lodash-es/_baseSampleSize.es.js +0 -1
  474. package/vendor/lodash-es/_baseSet.es.js +0 -1
  475. package/vendor/lodash-es/_baseSetData.es.js +0 -1
  476. package/vendor/lodash-es/_baseSetToString.es.js +0 -1
  477. package/vendor/lodash-es/_baseShuffle.es.js +0 -1
  478. package/vendor/lodash-es/_baseSlice.es.js +0 -1
  479. package/vendor/lodash-es/_baseSome.es.js +0 -1
  480. package/vendor/lodash-es/_baseSortBy.es.js +0 -1
  481. package/vendor/lodash-es/_baseSortedIndex.es.js +0 -1
  482. package/vendor/lodash-es/_baseSortedIndexBy.es.js +0 -1
  483. package/vendor/lodash-es/_baseSortedUniq.es.js +0 -1
  484. package/vendor/lodash-es/_baseSum.es.js +0 -1
  485. package/vendor/lodash-es/_baseTimes.es.js +0 -8
  486. package/vendor/lodash-es/_baseToNumber.es.js +0 -1
  487. package/vendor/lodash-es/_baseToPairs.es.js +0 -1
  488. package/vendor/lodash-es/_baseToString.es.js +0 -1
  489. package/vendor/lodash-es/_baseTrim.es.js +0 -8
  490. package/vendor/lodash-es/_baseUnary.es.js +0 -8
  491. package/vendor/lodash-es/_baseUniq.es.js +0 -1
  492. package/vendor/lodash-es/_baseUnset.es.js +0 -1
  493. package/vendor/lodash-es/_baseUpdate.es.js +0 -1
  494. package/vendor/lodash-es/_baseValues.es.js +0 -1
  495. package/vendor/lodash-es/_baseWhile.es.js +0 -1
  496. package/vendor/lodash-es/_baseWrapperValue.es.js +0 -1
  497. package/vendor/lodash-es/_baseXor.es.js +0 -1
  498. package/vendor/lodash-es/_baseZipObject.es.js +0 -1
  499. package/vendor/lodash-es/_cacheHas.es.js +0 -6
  500. package/vendor/lodash-es/_castArrayLikeObject.es.js +0 -1
  501. package/vendor/lodash-es/_castFunction.es.js +0 -1
  502. package/vendor/lodash-es/_castPath.es.js +0 -1
  503. package/vendor/lodash-es/_castRest.es.js +0 -1
  504. package/vendor/lodash-es/_castSlice.es.js +0 -1
  505. package/vendor/lodash-es/_charsEndIndex.es.js +0 -1
  506. package/vendor/lodash-es/_charsStartIndex.es.js +0 -1
  507. package/vendor/lodash-es/_cloneArrayBuffer.es.js +0 -8
  508. package/vendor/lodash-es/_cloneBuffer.es.js +0 -9
  509. package/vendor/lodash-es/_cloneDataView.es.js +0 -8
  510. package/vendor/lodash-es/_cloneRegExp.es.js +0 -8
  511. package/vendor/lodash-es/_cloneSymbol.es.js +0 -8
  512. package/vendor/lodash-es/_cloneTypedArray.es.js +0 -8
  513. package/vendor/lodash-es/_compareAscending.es.js +0 -1
  514. package/vendor/lodash-es/_compareMultiple.es.js +0 -1
  515. package/vendor/lodash-es/_composeArgs.es.js +0 -1
  516. package/vendor/lodash-es/_composeArgsRight.es.js +0 -1
  517. package/vendor/lodash-es/_copyArray.es.js +0 -1
  518. package/vendor/lodash-es/_copyObject.es.js +0 -1
  519. package/vendor/lodash-es/_copySymbols.es.js +0 -1
  520. package/vendor/lodash-es/_copySymbolsIn.es.js +0 -1
  521. package/vendor/lodash-es/_coreJsData.es.js +0 -5
  522. package/vendor/lodash-es/_countHolders.es.js +0 -1
  523. package/vendor/lodash-es/_createAggregator.es.js +0 -1
  524. package/vendor/lodash-es/_createAssigner.es.js +0 -1
  525. package/vendor/lodash-es/_createBaseEach.es.js +0 -1
  526. package/vendor/lodash-es/_createBaseFor.es.js +0 -1
  527. package/vendor/lodash-es/_createBind.es.js +0 -1
  528. package/vendor/lodash-es/_createCaseFirst.es.js +0 -1
  529. package/vendor/lodash-es/_createCompounder.es.js +0 -1
  530. package/vendor/lodash-es/_createCtor.es.js +0 -1
  531. package/vendor/lodash-es/_createCurry.es.js +0 -1
  532. package/vendor/lodash-es/_createFind.es.js +0 -1
  533. package/vendor/lodash-es/_createFlow.es.js +0 -1
  534. package/vendor/lodash-es/_createHybrid.es.js +0 -1
  535. package/vendor/lodash-es/_createInverter.es.js +0 -1
  536. package/vendor/lodash-es/_createMathOperation.es.js +0 -1
  537. package/vendor/lodash-es/_createOver.es.js +0 -1
  538. package/vendor/lodash-es/_createPadding.es.js +0 -1
  539. package/vendor/lodash-es/_createPartial.es.js +0 -1
  540. package/vendor/lodash-es/_createRange.es.js +0 -1
  541. package/vendor/lodash-es/_createRecurry.es.js +0 -1
  542. package/vendor/lodash-es/_createRelationalOperation.es.js +0 -1
  543. package/vendor/lodash-es/_createRound.es.js +0 -1
  544. package/vendor/lodash-es/_createSet.es.js +0 -1
  545. package/vendor/lodash-es/_createToPairs.es.js +0 -1
  546. package/vendor/lodash-es/_createWrap.es.js +0 -1
  547. package/vendor/lodash-es/_customDefaultsAssignIn.es.js +0 -1
  548. package/vendor/lodash-es/_customDefaultsMerge.es.js +0 -1
  549. package/vendor/lodash-es/_customOmitClone.es.js +0 -1
  550. package/vendor/lodash-es/_deburrLetter.es.js +0 -1
  551. package/vendor/lodash-es/_defineProperty.es.js +0 -11
  552. package/vendor/lodash-es/_equalArrays.es.js +0 -40
  553. package/vendor/lodash-es/_equalByTag.es.js +0 -45
  554. package/vendor/lodash-es/_equalObjects.es.js +0 -36
  555. package/vendor/lodash-es/_escapeHtmlChar.es.js +0 -1
  556. package/vendor/lodash-es/_escapeStringChar.es.js +0 -1
  557. package/vendor/lodash-es/_flatRest.es.js +0 -1
  558. package/vendor/lodash-es/_freeGlobal.es.js +0 -4
  559. package/vendor/lodash-es/_getAllKeys.es.js +0 -9
  560. package/vendor/lodash-es/_getAllKeysIn.es.js +0 -1
  561. package/vendor/lodash-es/_getData.es.js +0 -1
  562. package/vendor/lodash-es/_getFuncName.es.js +0 -1
  563. package/vendor/lodash-es/_getHolder.es.js +0 -1
  564. package/vendor/lodash-es/_getMapData.es.js +0 -8
  565. package/vendor/lodash-es/_getMatchData.es.js +0 -1
  566. package/vendor/lodash-es/_getNative.es.js +0 -9
  567. package/vendor/lodash-es/_getPrototype.es.js +0 -5
  568. package/vendor/lodash-es/_getRawTag.es.js +0 -15
  569. package/vendor/lodash-es/_getSymbols.es.js +0 -10
  570. package/vendor/lodash-es/_getSymbolsIn.es.js +0 -1
  571. package/vendor/lodash-es/_getTag.es.js +0 -28
  572. package/vendor/lodash-es/_getValue.es.js +0 -6
  573. package/vendor/lodash-es/_getView.es.js +0 -1
  574. package/vendor/lodash-es/_getWrapDetails.es.js +0 -1
  575. package/vendor/lodash-es/_hasPath.es.js +0 -1
  576. package/vendor/lodash-es/_hasUnicode.es.js +0 -1
  577. package/vendor/lodash-es/_hasUnicodeWord.es.js +0 -1
  578. package/vendor/lodash-es/_hashClear.es.js +0 -7
  579. package/vendor/lodash-es/_hashDelete.es.js +0 -7
  580. package/vendor/lodash-es/_hashGet.es.js +0 -13
  581. package/vendor/lodash-es/_hashHas.es.js +0 -9
  582. package/vendor/lodash-es/_hashSet.es.js +0 -9
  583. package/vendor/lodash-es/_initCloneArray.es.js +0 -8
  584. package/vendor/lodash-es/_initCloneByTag.es.js +0 -42
  585. package/vendor/lodash-es/_initCloneObject.es.js +0 -9
  586. package/vendor/lodash-es/_insertWrapDetails.es.js +0 -1
  587. package/vendor/lodash-es/_isFlattenable.es.js +0 -1
  588. package/vendor/lodash-es/_isIndex.es.js +0 -8
  589. package/vendor/lodash-es/_isIterateeCall.es.js +0 -1
  590. package/vendor/lodash-es/_isKey.es.js +0 -1
  591. package/vendor/lodash-es/_isKeyable.es.js +0 -7
  592. package/vendor/lodash-es/_isLaziable.es.js +0 -1
  593. package/vendor/lodash-es/_isMaskable.es.js +0 -1
  594. package/vendor/lodash-es/_isMasked.es.js +0 -11
  595. package/vendor/lodash-es/_isPrototype.es.js +0 -8
  596. package/vendor/lodash-es/_isStrictComparable.es.js +0 -1
  597. package/vendor/lodash-es/_iteratorToArray.es.js +0 -1
  598. package/vendor/lodash-es/_lazyClone.es.js +0 -1
  599. package/vendor/lodash-es/_lazyReverse.es.js +0 -1
  600. package/vendor/lodash-es/_lazyValue.es.js +0 -1
  601. package/vendor/lodash-es/_listCacheClear.es.js +0 -6
  602. package/vendor/lodash-es/_listCacheDelete.es.js +0 -12
  603. package/vendor/lodash-es/_listCacheGet.es.js +0 -8
  604. package/vendor/lodash-es/_listCacheHas.es.js +0 -7
  605. package/vendor/lodash-es/_listCacheSet.es.js +0 -8
  606. package/vendor/lodash-es/_mapCacheClear.es.js +0 -13
  607. package/vendor/lodash-es/_mapCacheDelete.es.js +0 -8
  608. package/vendor/lodash-es/_mapCacheGet.es.js +0 -7
  609. package/vendor/lodash-es/_mapCacheHas.es.js +0 -7
  610. package/vendor/lodash-es/_mapCacheSet.es.js +0 -8
  611. package/vendor/lodash-es/_mapToArray.es.js +0 -9
  612. package/vendor/lodash-es/_matchesStrictComparable.es.js +0 -1
  613. package/vendor/lodash-es/_memoizeCapped.es.js +0 -1
  614. package/vendor/lodash-es/_mergeData.es.js +0 -1
  615. package/vendor/lodash-es/_metaMap.es.js +0 -1
  616. package/vendor/lodash-es/_nativeCreate.es.js +0 -5
  617. package/vendor/lodash-es/_nativeKeys.es.js +0 -5
  618. package/vendor/lodash-es/_nativeKeysIn.es.js +0 -1
  619. package/vendor/lodash-es/_nodeUtil.es.js +0 -11
  620. package/vendor/lodash-es/_objectToString.es.js +0 -7
  621. package/vendor/lodash-es/_overArg.es.js +0 -8
  622. package/vendor/lodash-es/_overRest.es.js +0 -1
  623. package/vendor/lodash-es/_parent.es.js +0 -1
  624. package/vendor/lodash-es/_reEscape.es.js +0 -1
  625. package/vendor/lodash-es/_reEvaluate.es.js +0 -1
  626. package/vendor/lodash-es/_reInterpolate.es.js +0 -1
  627. package/vendor/lodash-es/_realNames.es.js +0 -1
  628. package/vendor/lodash-es/_reorder.es.js +0 -1
  629. package/vendor/lodash-es/_replaceHolders.es.js +0 -1
  630. package/vendor/lodash-es/_root.es.js +0 -5
  631. package/vendor/lodash-es/_safeGet.es.js +0 -1
  632. package/vendor/lodash-es/_setCacheAdd.es.js +0 -7
  633. package/vendor/lodash-es/_setCacheHas.es.js +0 -6
  634. package/vendor/lodash-es/_setData.es.js +0 -1
  635. package/vendor/lodash-es/_setToArray.es.js +0 -9
  636. package/vendor/lodash-es/_setToPairs.es.js +0 -1
  637. package/vendor/lodash-es/_setToString.es.js +0 -1
  638. package/vendor/lodash-es/_setWrapToString.es.js +0 -1
  639. package/vendor/lodash-es/_shortOut.es.js +0 -1
  640. package/vendor/lodash-es/_shuffleSelf.es.js +0 -1
  641. package/vendor/lodash-es/_stackClear.es.js +0 -7
  642. package/vendor/lodash-es/_stackDelete.es.js +0 -7
  643. package/vendor/lodash-es/_stackGet.es.js +0 -6
  644. package/vendor/lodash-es/_stackHas.es.js +0 -6
  645. package/vendor/lodash-es/_stackSet.es.js +0 -17
  646. package/vendor/lodash-es/_strictIndexOf.es.js +0 -1
  647. package/vendor/lodash-es/_strictLastIndexOf.es.js +0 -1
  648. package/vendor/lodash-es/_stringSize.es.js +0 -1
  649. package/vendor/lodash-es/_stringToArray.es.js +0 -1
  650. package/vendor/lodash-es/_stringToPath.es.js +0 -1
  651. package/vendor/lodash-es/_toKey.es.js +0 -1
  652. package/vendor/lodash-es/_toSource.es.js +0 -17
  653. package/vendor/lodash-es/_trimmedEndIndex.es.js +0 -9
  654. package/vendor/lodash-es/_unescapeHtmlChar.es.js +0 -1
  655. package/vendor/lodash-es/_unicodeSize.es.js +0 -1
  656. package/vendor/lodash-es/_unicodeToArray.es.js +0 -1
  657. package/vendor/lodash-es/_unicodeWords.es.js +0 -1
  658. package/vendor/lodash-es/_updateWrapDetails.es.js +0 -1
  659. package/vendor/lodash-es/_wrapperClone.es.js +0 -1
  660. package/vendor/lodash-es/add.es.js +0 -1
  661. package/vendor/lodash-es/after.es.js +0 -1
  662. package/vendor/lodash-es/array.default.es.js +0 -1
  663. package/vendor/lodash-es/array.es.js +0 -1
  664. package/vendor/lodash-es/ary.es.js +0 -1
  665. package/vendor/lodash-es/assign.es.js +0 -1
  666. package/vendor/lodash-es/assignIn.es.js +0 -1
  667. package/vendor/lodash-es/assignInWith.es.js +0 -1
  668. package/vendor/lodash-es/assignWith.es.js +0 -1
  669. package/vendor/lodash-es/at.es.js +0 -1
  670. package/vendor/lodash-es/attempt.es.js +0 -1
  671. package/vendor/lodash-es/before.es.js +0 -1
  672. package/vendor/lodash-es/bind.es.js +0 -1
  673. package/vendor/lodash-es/bindAll.es.js +0 -1
  674. package/vendor/lodash-es/bindKey.es.js +0 -1
  675. package/vendor/lodash-es/camelCase.es.js +0 -1
  676. package/vendor/lodash-es/capitalize.es.js +0 -1
  677. package/vendor/lodash-es/castArray.es.js +0 -1
  678. package/vendor/lodash-es/ceil.es.js +0 -1
  679. package/vendor/lodash-es/chain.es.js +0 -1
  680. package/vendor/lodash-es/chunk.es.js +0 -1
  681. package/vendor/lodash-es/clamp.es.js +0 -1
  682. package/vendor/lodash-es/clone.es.js +0 -1
  683. package/vendor/lodash-es/cloneDeep.es.js +0 -8
  684. package/vendor/lodash-es/cloneDeepWith.es.js +0 -1
  685. package/vendor/lodash-es/cloneWith.es.js +0 -1
  686. package/vendor/lodash-es/collection.default.es.js +0 -1
  687. package/vendor/lodash-es/collection.es.js +0 -1
  688. package/vendor/lodash-es/commit.es.js +0 -1
  689. package/vendor/lodash-es/compact.es.js +0 -1
  690. package/vendor/lodash-es/concat.es.js +0 -1
  691. package/vendor/lodash-es/cond.es.js +0 -1
  692. package/vendor/lodash-es/conforms.es.js +0 -1
  693. package/vendor/lodash-es/conformsTo.es.js +0 -1
  694. package/vendor/lodash-es/constant.es.js +0 -1
  695. package/vendor/lodash-es/countBy.es.js +0 -1
  696. package/vendor/lodash-es/create.es.js +0 -1
  697. package/vendor/lodash-es/curry.es.js +0 -1
  698. package/vendor/lodash-es/curryRight.es.js +0 -1
  699. package/vendor/lodash-es/date.default.es.js +0 -1
  700. package/vendor/lodash-es/date.es.js +0 -1
  701. package/vendor/lodash-es/debounce.es.js +0 -54
  702. package/vendor/lodash-es/deburr.es.js +0 -1
  703. package/vendor/lodash-es/defaultTo.es.js +0 -1
  704. package/vendor/lodash-es/defaults.es.js +0 -1
  705. package/vendor/lodash-es/defaultsDeep.es.js +0 -1
  706. package/vendor/lodash-es/defer.es.js +0 -1
  707. package/vendor/lodash-es/delay.es.js +0 -1
  708. package/vendor/lodash-es/difference.es.js +0 -1
  709. package/vendor/lodash-es/differenceBy.es.js +0 -1
  710. package/vendor/lodash-es/differenceWith.es.js +0 -1
  711. package/vendor/lodash-es/divide.es.js +0 -1
  712. package/vendor/lodash-es/drop.es.js +0 -1
  713. package/vendor/lodash-es/dropRight.es.js +0 -1
  714. package/vendor/lodash-es/dropRightWhile.es.js +0 -1
  715. package/vendor/lodash-es/dropWhile.es.js +0 -1
  716. package/vendor/lodash-es/each.es.js +0 -1
  717. package/vendor/lodash-es/eachRight.es.js +0 -1
  718. package/vendor/lodash-es/endsWith.es.js +0 -1
  719. package/vendor/lodash-es/entries.es.js +0 -1
  720. package/vendor/lodash-es/entriesIn.es.js +0 -1
  721. package/vendor/lodash-es/eq.es.js +0 -6
  722. package/vendor/lodash-es/escape.es.js +0 -1
  723. package/vendor/lodash-es/escapeRegExp.es.js +0 -1
  724. package/vendor/lodash-es/every.es.js +0 -1
  725. package/vendor/lodash-es/extend.es.js +0 -1
  726. package/vendor/lodash-es/extendWith.es.js +0 -1
  727. package/vendor/lodash-es/fill.es.js +0 -1
  728. package/vendor/lodash-es/filter.es.js +0 -1
  729. package/vendor/lodash-es/find.es.js +0 -1
  730. package/vendor/lodash-es/findIndex.es.js +0 -1
  731. package/vendor/lodash-es/findKey.es.js +0 -1
  732. package/vendor/lodash-es/findLast.es.js +0 -1
  733. package/vendor/lodash-es/findLastIndex.es.js +0 -1
  734. package/vendor/lodash-es/findLastKey.es.js +0 -1
  735. package/vendor/lodash-es/first.es.js +0 -1
  736. package/vendor/lodash-es/flatMap.es.js +0 -1
  737. package/vendor/lodash-es/flatMapDeep.es.js +0 -1
  738. package/vendor/lodash-es/flatMapDepth.es.js +0 -1
  739. package/vendor/lodash-es/flatten.es.js +0 -1
  740. package/vendor/lodash-es/flattenDeep.es.js +0 -1
  741. package/vendor/lodash-es/flattenDepth.es.js +0 -1
  742. package/vendor/lodash-es/flip.es.js +0 -1
  743. package/vendor/lodash-es/floor.es.js +0 -1
  744. package/vendor/lodash-es/flow.es.js +0 -1
  745. package/vendor/lodash-es/flowRight.es.js +0 -1
  746. package/vendor/lodash-es/forEach.es.js +0 -1
  747. package/vendor/lodash-es/forEachRight.es.js +0 -1
  748. package/vendor/lodash-es/forIn.es.js +0 -1
  749. package/vendor/lodash-es/forInRight.es.js +0 -1
  750. package/vendor/lodash-es/forOwn.es.js +0 -1
  751. package/vendor/lodash-es/forOwnRight.es.js +0 -1
  752. package/vendor/lodash-es/fromPairs.es.js +0 -1
  753. package/vendor/lodash-es/function.default.es.js +0 -1
  754. package/vendor/lodash-es/function.es.js +0 -1
  755. package/vendor/lodash-es/functions.es.js +0 -1
  756. package/vendor/lodash-es/functionsIn.es.js +0 -1
  757. package/vendor/lodash-es/get.es.js +0 -1
  758. package/vendor/lodash-es/groupBy.es.js +0 -1
  759. package/vendor/lodash-es/gt.es.js +0 -1
  760. package/vendor/lodash-es/gte.es.js +0 -1
  761. package/vendor/lodash-es/has.es.js +0 -1
  762. package/vendor/lodash-es/hasIn.es.js +0 -1
  763. package/vendor/lodash-es/head.es.js +0 -1
  764. package/vendor/lodash-es/identity.es.js +0 -1
  765. package/vendor/lodash-es/inRange.es.js +0 -1
  766. package/vendor/lodash-es/includes.es.js +0 -1
  767. package/vendor/lodash-es/indexOf.es.js +0 -1
  768. package/vendor/lodash-es/initial.es.js +0 -1
  769. package/vendor/lodash-es/intersection.es.js +0 -1
  770. package/vendor/lodash-es/intersectionBy.es.js +0 -1
  771. package/vendor/lodash-es/intersectionWith.es.js +0 -1
  772. package/vendor/lodash-es/invert.es.js +0 -1
  773. package/vendor/lodash-es/invertBy.es.js +0 -1
  774. package/vendor/lodash-es/invoke.es.js +0 -1
  775. package/vendor/lodash-es/invokeMap.es.js +0 -1
  776. package/vendor/lodash-es/isArguments.es.js +0 -10
  777. package/vendor/lodash-es/isArray.es.js +0 -4
  778. package/vendor/lodash-es/isArrayBuffer.es.js +0 -1
  779. package/vendor/lodash-es/isArrayLike.es.js +0 -8
  780. package/vendor/lodash-es/isArrayLikeObject.es.js +0 -1
  781. package/vendor/lodash-es/isBoolean.es.js +0 -1
  782. package/vendor/lodash-es/isBuffer.es.js +0 -6
  783. package/vendor/lodash-es/isDate.es.js +0 -1
  784. package/vendor/lodash-es/isElement.es.js +0 -1
  785. package/vendor/lodash-es/isEmpty.es.js +0 -1
  786. package/vendor/lodash-es/isEqual.es.js +0 -7
  787. package/vendor/lodash-es/isEqualWith.es.js +0 -1
  788. package/vendor/lodash-es/isError.es.js +0 -1
  789. package/vendor/lodash-es/isFinite.es.js +0 -1
  790. package/vendor/lodash-es/isFunction.es.js +0 -12
  791. package/vendor/lodash-es/isInteger.es.js +0 -1
  792. package/vendor/lodash-es/isLength.es.js +0 -7
  793. package/vendor/lodash-es/isMap.es.js +0 -7
  794. package/vendor/lodash-es/isMatch.es.js +0 -1
  795. package/vendor/lodash-es/isMatchWith.es.js +0 -1
  796. package/vendor/lodash-es/isNaN.es.js +0 -1
  797. package/vendor/lodash-es/isNative.es.js +0 -1
  798. package/vendor/lodash-es/isNil.es.js +0 -1
  799. package/vendor/lodash-es/isNull.es.js +0 -1
  800. package/vendor/lodash-es/isNumber.es.js +0 -1
  801. package/vendor/lodash-es/isObject.es.js +0 -7
  802. package/vendor/lodash-es/isObjectLike.es.js +0 -6
  803. package/vendor/lodash-es/isPlainObject.es.js +0 -1
  804. package/vendor/lodash-es/isRegExp.es.js +0 -1
  805. package/vendor/lodash-es/isSafeInteger.es.js +0 -1
  806. package/vendor/lodash-es/isSet.es.js +0 -7
  807. package/vendor/lodash-es/isString.es.js +0 -1
  808. package/vendor/lodash-es/isSymbol.es.js +0 -9
  809. package/vendor/lodash-es/isTypedArray.es.js +0 -7
  810. package/vendor/lodash-es/isUndefined.es.js +0 -1
  811. package/vendor/lodash-es/isWeakMap.es.js +0 -1
  812. package/vendor/lodash-es/isWeakSet.es.js +0 -1
  813. package/vendor/lodash-es/iteratee.es.js +0 -1
  814. package/vendor/lodash-es/join.es.js +0 -1
  815. package/vendor/lodash-es/kebabCase.es.js +0 -1
  816. package/vendor/lodash-es/keyBy.es.js +0 -1
  817. package/vendor/lodash-es/keys.es.js +0 -9
  818. package/vendor/lodash-es/keysIn.es.js +0 -1
  819. package/vendor/lodash-es/lang.default.es.js +0 -1
  820. package/vendor/lodash-es/lang.es.js +0 -1
  821. package/vendor/lodash-es/last.es.js +0 -1
  822. package/vendor/lodash-es/lastIndexOf.es.js +0 -1
  823. package/vendor/lodash-es/lodash.default.es.js +0 -1
  824. package/vendor/lodash-es/lodash.es.js +0 -1
  825. package/vendor/lodash-es/lowerCase.es.js +0 -1
  826. package/vendor/lodash-es/lowerFirst.es.js +0 -1
  827. package/vendor/lodash-es/lt.es.js +0 -1
  828. package/vendor/lodash-es/lte.es.js +0 -1
  829. package/vendor/lodash-es/map.es.js +0 -1
  830. package/vendor/lodash-es/mapKeys.es.js +0 -1
  831. package/vendor/lodash-es/mapValues.es.js +0 -1
  832. package/vendor/lodash-es/matches.es.js +0 -1
  833. package/vendor/lodash-es/matchesProperty.es.js +0 -1
  834. package/vendor/lodash-es/math.default.es.js +0 -1
  835. package/vendor/lodash-es/math.es.js +0 -1
  836. package/vendor/lodash-es/max.es.js +0 -1
  837. package/vendor/lodash-es/maxBy.es.js +0 -1
  838. package/vendor/lodash-es/mean.es.js +0 -1
  839. package/vendor/lodash-es/meanBy.es.js +0 -1
  840. package/vendor/lodash-es/memoize.es.js +0 -1
  841. package/vendor/lodash-es/merge.es.js +0 -1
  842. package/vendor/lodash-es/mergeWith.es.js +0 -1
  843. package/vendor/lodash-es/method.es.js +0 -1
  844. package/vendor/lodash-es/methodOf.es.js +0 -1
  845. package/vendor/lodash-es/min.es.js +0 -1
  846. package/vendor/lodash-es/minBy.es.js +0 -1
  847. package/vendor/lodash-es/mixin.es.js +0 -1
  848. package/vendor/lodash-es/multiply.es.js +0 -1
  849. package/vendor/lodash-es/negate.es.js +0 -1
  850. package/vendor/lodash-es/next.es.js +0 -1
  851. package/vendor/lodash-es/noop.es.js +0 -1
  852. package/vendor/lodash-es/now.es.js +0 -7
  853. package/vendor/lodash-es/nth.es.js +0 -1
  854. package/vendor/lodash-es/nthArg.es.js +0 -1
  855. package/vendor/lodash-es/number.default.es.js +0 -1
  856. package/vendor/lodash-es/number.es.js +0 -1
  857. package/vendor/lodash-es/object.default.es.js +0 -1
  858. package/vendor/lodash-es/object.es.js +0 -1
  859. package/vendor/lodash-es/omit.es.js +0 -1
  860. package/vendor/lodash-es/omitBy.es.js +0 -1
  861. package/vendor/lodash-es/once.es.js +0 -1
  862. package/vendor/lodash-es/orderBy.es.js +0 -1
  863. package/vendor/lodash-es/over.es.js +0 -1
  864. package/vendor/lodash-es/overArgs.es.js +0 -1
  865. package/vendor/lodash-es/overEvery.es.js +0 -1
  866. package/vendor/lodash-es/overSome.es.js +0 -1
  867. package/vendor/lodash-es/pad.es.js +0 -1
  868. package/vendor/lodash-es/padEnd.es.js +0 -1
  869. package/vendor/lodash-es/padStart.es.js +0 -1
  870. package/vendor/lodash-es/parseInt.es.js +0 -1
  871. package/vendor/lodash-es/partial.es.js +0 -1
  872. package/vendor/lodash-es/partialRight.es.js +0 -1
  873. package/vendor/lodash-es/partition.es.js +0 -1
  874. package/vendor/lodash-es/pick.es.js +0 -1
  875. package/vendor/lodash-es/pickBy.es.js +0 -1
  876. package/vendor/lodash-es/plant.es.js +0 -1
  877. package/vendor/lodash-es/property.es.js +0 -1
  878. package/vendor/lodash-es/propertyOf.es.js +0 -1
  879. package/vendor/lodash-es/pull.es.js +0 -1
  880. package/vendor/lodash-es/pullAll.es.js +0 -1
  881. package/vendor/lodash-es/pullAllBy.es.js +0 -1
  882. package/vendor/lodash-es/pullAllWith.es.js +0 -1
  883. package/vendor/lodash-es/pullAt.es.js +0 -1
  884. package/vendor/lodash-es/random.es.js +0 -1
  885. package/vendor/lodash-es/range.es.js +0 -1
  886. package/vendor/lodash-es/rangeRight.es.js +0 -1
  887. package/vendor/lodash-es/rearg.es.js +0 -1
  888. package/vendor/lodash-es/reduce.es.js +0 -1
  889. package/vendor/lodash-es/reduceRight.es.js +0 -1
  890. package/vendor/lodash-es/reject.es.js +0 -1
  891. package/vendor/lodash-es/remove.es.js +0 -1
  892. package/vendor/lodash-es/repeat.es.js +0 -1
  893. package/vendor/lodash-es/replace.es.js +0 -1
  894. package/vendor/lodash-es/rest.es.js +0 -1
  895. package/vendor/lodash-es/result.es.js +0 -1
  896. package/vendor/lodash-es/reverse.es.js +0 -1
  897. package/vendor/lodash-es/round.es.js +0 -1
  898. package/vendor/lodash-es/sample.es.js +0 -1
  899. package/vendor/lodash-es/sampleSize.es.js +0 -1
  900. package/vendor/lodash-es/seq.default.es.js +0 -1
  901. package/vendor/lodash-es/seq.es.js +0 -1
  902. package/vendor/lodash-es/set.es.js +0 -1
  903. package/vendor/lodash-es/setWith.es.js +0 -1
  904. package/vendor/lodash-es/shuffle.es.js +0 -1
  905. package/vendor/lodash-es/size.es.js +0 -1
  906. package/vendor/lodash-es/slice.es.js +0 -1
  907. package/vendor/lodash-es/snakeCase.es.js +0 -1
  908. package/vendor/lodash-es/some.es.js +0 -1
  909. package/vendor/lodash-es/sortBy.es.js +0 -1
  910. package/vendor/lodash-es/sortedIndex.es.js +0 -1
  911. package/vendor/lodash-es/sortedIndexBy.es.js +0 -1
  912. package/vendor/lodash-es/sortedIndexOf.es.js +0 -1
  913. package/vendor/lodash-es/sortedLastIndex.es.js +0 -1
  914. package/vendor/lodash-es/sortedLastIndexBy.es.js +0 -1
  915. package/vendor/lodash-es/sortedLastIndexOf.es.js +0 -1
  916. package/vendor/lodash-es/sortedUniq.es.js +0 -1
  917. package/vendor/lodash-es/sortedUniqBy.es.js +0 -1
  918. package/vendor/lodash-es/split.es.js +0 -1
  919. package/vendor/lodash-es/spread.es.js +0 -1
  920. package/vendor/lodash-es/startCase.es.js +0 -1
  921. package/vendor/lodash-es/startsWith.es.js +0 -1
  922. package/vendor/lodash-es/string.default.es.js +0 -1
  923. package/vendor/lodash-es/string.es.js +0 -1
  924. package/vendor/lodash-es/stubArray.es.js +0 -6
  925. package/vendor/lodash-es/stubFalse.es.js +0 -6
  926. package/vendor/lodash-es/stubObject.es.js +0 -1
  927. package/vendor/lodash-es/stubString.es.js +0 -1
  928. package/vendor/lodash-es/stubTrue.es.js +0 -1
  929. package/vendor/lodash-es/subtract.es.js +0 -1
  930. package/vendor/lodash-es/sum.es.js +0 -1
  931. package/vendor/lodash-es/sumBy.es.js +0 -1
  932. package/vendor/lodash-es/tail.es.js +0 -1
  933. package/vendor/lodash-es/take.es.js +0 -1
  934. package/vendor/lodash-es/takeRight.es.js +0 -1
  935. package/vendor/lodash-es/takeRightWhile.es.js +0 -1
  936. package/vendor/lodash-es/takeWhile.es.js +0 -1
  937. package/vendor/lodash-es/tap.es.js +0 -1
  938. package/vendor/lodash-es/template.es.js +0 -1
  939. package/vendor/lodash-es/templateSettings.es.js +0 -1
  940. package/vendor/lodash-es/throttle.es.js +0 -1
  941. package/vendor/lodash-es/thru.es.js +0 -1
  942. package/vendor/lodash-es/times.es.js +0 -1
  943. package/vendor/lodash-es/toArray.es.js +0 -1
  944. package/vendor/lodash-es/toFinite.es.js +0 -1
  945. package/vendor/lodash-es/toInteger.es.js +0 -1
  946. package/vendor/lodash-es/toIterator.es.js +0 -1
  947. package/vendor/lodash-es/toJSON.es.js +0 -1
  948. package/vendor/lodash-es/toLength.es.js +0 -1
  949. package/vendor/lodash-es/toLower.es.js +0 -1
  950. package/vendor/lodash-es/toNumber.es.js +0 -22
  951. package/vendor/lodash-es/toPairs.es.js +0 -1
  952. package/vendor/lodash-es/toPairsIn.es.js +0 -1
  953. package/vendor/lodash-es/toPath.es.js +0 -1
  954. package/vendor/lodash-es/toPlainObject.es.js +0 -1
  955. package/vendor/lodash-es/toSafeInteger.es.js +0 -1
  956. package/vendor/lodash-es/toString.es.js +0 -6
  957. package/vendor/lodash-es/toUpper.es.js +0 -1
  958. package/vendor/lodash-es/transform.es.js +0 -1
  959. package/vendor/lodash-es/trim.es.js +0 -1
  960. package/vendor/lodash-es/trimEnd.es.js +0 -1
  961. package/vendor/lodash-es/trimStart.es.js +0 -1
  962. package/vendor/lodash-es/truncate.es.js +0 -1
  963. package/vendor/lodash-es/unary.es.js +0 -1
  964. package/vendor/lodash-es/unescape.es.js +0 -1
  965. package/vendor/lodash-es/union.es.js +0 -1
  966. package/vendor/lodash-es/unionBy.es.js +0 -1
  967. package/vendor/lodash-es/unionWith.es.js +0 -1
  968. package/vendor/lodash-es/uniq.es.js +0 -1
  969. package/vendor/lodash-es/uniqBy.es.js +0 -1
  970. package/vendor/lodash-es/uniqWith.es.js +0 -1
  971. package/vendor/lodash-es/uniqueId.es.js +0 -9
  972. package/vendor/lodash-es/unset.es.js +0 -1
  973. package/vendor/lodash-es/unzip.es.js +0 -1
  974. package/vendor/lodash-es/unzipWith.es.js +0 -1
  975. package/vendor/lodash-es/update.es.js +0 -1
  976. package/vendor/lodash-es/updateWith.es.js +0 -1
  977. package/vendor/lodash-es/upperCase.es.js +0 -1
  978. package/vendor/lodash-es/upperFirst.es.js +0 -1
  979. package/vendor/lodash-es/util.default.es.js +0 -1
  980. package/vendor/lodash-es/util.es.js +0 -1
  981. package/vendor/lodash-es/value.es.js +0 -1
  982. package/vendor/lodash-es/valueOf.es.js +0 -1
  983. package/vendor/lodash-es/values.es.js +0 -1
  984. package/vendor/lodash-es/valuesIn.es.js +0 -1
  985. package/vendor/lodash-es/without.es.js +0 -1
  986. package/vendor/lodash-es/words.es.js +0 -1
  987. package/vendor/lodash-es/wrap.es.js +0 -1
  988. package/vendor/lodash-es/wrapperAt.es.js +0 -1
  989. package/vendor/lodash-es/wrapperChain.es.js +0 -1
  990. package/vendor/lodash-es/wrapperLodash.es.js +0 -1
  991. package/vendor/lodash-es/wrapperReverse.es.js +0 -1
  992. package/vendor/lodash-es/wrapperValue.es.js +0 -1
  993. package/vendor/lodash-es/xor.es.js +0 -1
  994. package/vendor/lodash-es/xorBy.es.js +0 -1
  995. package/vendor/lodash-es/xorWith.es.js +0 -1
  996. package/vendor/lodash-es/zip.es.js +0 -1
  997. package/vendor/lodash-es/zipObject.es.js +0 -1
  998. package/vendor/lodash-es/zipObjectDeep.es.js +0 -1
  999. package/vendor/lodash-es/zipWith.es.js +0 -1
  1000. package/vendor/orderedmap/dist/index.es.js +0 -103
  1001. package/vendor/primevue/api/api.esm.es.js +0 -183
  1002. package/vendor/primevue/badge/badge.esm.es.js +0 -42
  1003. package/vendor/primevue/badge/style/badgestyle.esm.es.js +0 -25
  1004. package/vendor/primevue/base/style/basestyle.esm.es.js +0 -140
  1005. package/vendor/primevue/basecomponent/basecomponent.esm.es.js +0 -409
  1006. package/vendor/primevue/basedirective/basedirective.esm.es.js +0 -255
  1007. package/vendor/primevue/baseicon/baseicon.esm.es.js +0 -81
  1008. package/vendor/primevue/baseicon/style/baseiconstyle.esm.es.js +0 -39
  1009. package/vendor/primevue/button/button.esm.es.js +0 -163
  1010. package/vendor/primevue/button/style/buttonstyle.esm.es.js +0 -56
  1011. package/vendor/primevue/card/card.esm.es.js +0 -40
  1012. package/vendor/primevue/card/style/cardstyle.esm.es.js +0 -17
  1013. package/vendor/primevue/checkbox/checkbox.esm.es.js +0 -189
  1014. package/vendor/primevue/checkbox/style/checkboxstyle.esm.es.js +0 -21
  1015. package/vendor/primevue/config/config.esm.es.js +0 -212
  1016. package/vendor/primevue/dialog/dialog.esm.es.js +0 -501
  1017. package/vendor/primevue/dialog/style/dialogstyle.esm.es.js +0 -55
  1018. package/vendor/primevue/dropdown/dropdown.esm.es.js +0 -1229
  1019. package/vendor/primevue/dropdown/style/dropdownstyle.esm.es.js +0 -65
  1020. package/vendor/primevue/fileupload/fileupload.esm.es.js +0 -761
  1021. package/vendor/primevue/fileupload/style/fileuploadstyle.esm.es.js +0 -36
  1022. package/vendor/primevue/focustrap/focustrap.esm.es.js +0 -129
  1023. package/vendor/primevue/focustrap/style/focustrapstyle.esm.es.js +0 -4
  1024. package/vendor/primevue/icons/angledoubleleft/index.esm.es.js +0 -24
  1025. package/vendor/primevue/icons/angledoubleright/index.esm.es.js +0 -24
  1026. package/vendor/primevue/icons/angledown/index.esm.es.js +0 -22
  1027. package/vendor/primevue/icons/angleleft/index.esm.es.js +0 -22
  1028. package/vendor/primevue/icons/angleright/index.esm.es.js +0 -22
  1029. package/vendor/primevue/icons/angleup/index.esm.es.js +0 -22
  1030. package/vendor/primevue/icons/blank/index.esm.es.js +0 -24
  1031. package/vendor/primevue/icons/check/index.esm.es.js +0 -22
  1032. package/vendor/primevue/icons/chevrondown/index.esm.es.js +0 -22
  1033. package/vendor/primevue/icons/exclamationtriangle/index.esm.es.js +0 -28
  1034. package/vendor/primevue/icons/eye/index.esm.es.js +0 -24
  1035. package/vendor/primevue/icons/eyeslash/index.esm.es.js +0 -24
  1036. package/vendor/primevue/icons/infocircle/index.esm.es.js +0 -24
  1037. package/vendor/primevue/icons/plus/index.esm.es.js +0 -22
  1038. package/vendor/primevue/icons/refresh/index.esm.es.js +0 -24
  1039. package/vendor/primevue/icons/search/index.esm.es.js +0 -24
  1040. package/vendor/primevue/icons/searchminus/index.esm.es.js +0 -24
  1041. package/vendor/primevue/icons/searchplus/index.esm.es.js +0 -24
  1042. package/vendor/primevue/icons/spinner/index.esm.es.js +0 -22
  1043. package/vendor/primevue/icons/times/index.esm.es.js +0 -22
  1044. package/vendor/primevue/icons/timescircle/index.esm.es.js +0 -24
  1045. package/vendor/primevue/icons/undo/index.esm.es.js +0 -24
  1046. package/vendor/primevue/icons/upload/index.esm.es.js +0 -24
  1047. package/vendor/primevue/icons/windowmaximize/index.esm.es.js +0 -24
  1048. package/vendor/primevue/icons/windowminimize/index.esm.es.js +0 -24
  1049. package/vendor/primevue/image/image.esm.es.js +0 -381
  1050. package/vendor/primevue/image/style/imagestyle.esm.es.js +0 -39
  1051. package/vendor/primevue/inputgroup/inputgroup.esm.es.js +0 -26
  1052. package/vendor/primevue/inputgroup/style/inputgroupstyle.esm.es.js +0 -10
  1053. package/vendor/primevue/inputgroupaddon/inputgroupaddon.esm.es.js +0 -26
  1054. package/vendor/primevue/inputgroupaddon/style/inputgroupaddonstyle.esm.es.js +0 -10
  1055. package/vendor/primevue/inputnumber/inputnumber.esm.es.js +0 -937
  1056. package/vendor/primevue/inputnumber/style/inputnumberstyle.esm.es.js +0 -39
  1057. package/vendor/primevue/inputtext/inputtext.esm.es.js +0 -66
  1058. package/vendor/primevue/inputtext/style/inputtextstyle.esm.es.js +0 -19
  1059. package/vendor/primevue/menu/menu.esm.es.js +0 -508
  1060. package/vendor/primevue/menu/style/menustyle.esm.es.js +0 -32
  1061. package/vendor/primevue/message/message.esm.es.js +0 -201
  1062. package/vendor/primevue/message/style/messagestyle.esm.es.js +0 -18
  1063. package/vendor/primevue/multiselect/multiselect.esm.es.js +0 -1383
  1064. package/vendor/primevue/multiselect/style/multiselectstyle.esm.es.js +0 -74
  1065. package/vendor/primevue/overlayeventbus/overlayeventbus.esm.es.js +0 -5
  1066. package/vendor/primevue/overlaypanel/overlaypanel.esm.es.js +0 -294
  1067. package/vendor/primevue/overlaypanel/style/overlaypanelstyle.esm.es.js +0 -18
  1068. package/vendor/primevue/paginator/paginator.esm.es.js +0 -838
  1069. package/vendor/primevue/paginator/style/paginatorstyle.esm.es.js +0 -81
  1070. package/vendor/primevue/password/password.esm.es.js +0 -443
  1071. package/vendor/primevue/password/style/passwordstyle.esm.es.js +0 -45
  1072. package/vendor/primevue/portal/portal.esm.es.js +0 -40
  1073. package/vendor/primevue/progressbar/progressbar.esm.es.js +0 -72
  1074. package/vendor/primevue/progressbar/style/progressbarstyle.esm.es.js +0 -19
  1075. package/vendor/primevue/ripple/ripple.esm.es.js +0 -90
  1076. package/vendor/primevue/ripple/style/ripplestyle.esm.es.js +0 -10
  1077. package/vendor/primevue/selectbutton/selectbutton.esm.es.js +0 -278
  1078. package/vendor/primevue/selectbutton/style/selectbuttonstyle.esm.es.js +0 -24
  1079. package/vendor/primevue/skeleton/skeleton.esm.es.js +0 -67
  1080. package/vendor/primevue/skeleton/style/skeletonstyle.esm.es.js +0 -21
  1081. package/vendor/primevue/textarea/style/textareastyle.esm.es.js +0 -18
  1082. package/vendor/primevue/textarea/textarea.esm.es.js +0 -70
  1083. package/vendor/primevue/timeline/style/timelinestyle.esm.es.js +0 -19
  1084. package/vendor/primevue/timeline/timeline.esm.es.js +0 -86
  1085. package/vendor/primevue/toast/style/toaststyle.esm.es.js +0 -73
  1086. package/vendor/primevue/toast/toast.esm.es.js +0 -451
  1087. package/vendor/primevue/toasteventbus/toasteventbus.esm.es.js +0 -5
  1088. package/vendor/primevue/toastservice/toastservice.esm.es.js +0 -24
  1089. package/vendor/primevue/tooltip/style/tooltipstyle.esm.es.js +0 -12
  1090. package/vendor/primevue/tooltip/tooltip.esm.es.js +0 -256
  1091. package/vendor/primevue/usestyle/usestyle.esm.es.js +0 -85
  1092. package/vendor/primevue/usetoast/usetoast.esm.es.js +0 -12
  1093. package/vendor/primevue/utils/utils.esm.es.js +0 -1080
  1094. package/vendor/primevue/virtualscroller/style/virtualscrollerstyle.esm.es.js +0 -71
  1095. package/vendor/primevue/virtualscroller/virtualscroller.esm.es.js +0 -704
  1096. package/vendor/prosemirror-commands/dist/index.es.js +0 -383
  1097. package/vendor/prosemirror-history/dist/index.es.js +0 -248
  1098. package/vendor/prosemirror-keymap/dist/index.es.js +0 -60
  1099. package/vendor/prosemirror-model/dist/index.es.js +0 -2736
  1100. package/vendor/prosemirror-schema-list/dist/index.es.js +0 -87
  1101. package/vendor/prosemirror-state/dist/index.es.js +0 -820
  1102. package/vendor/prosemirror-transform/dist/index.es.js +0 -1507
  1103. package/vendor/prosemirror-view/dist/index.es.js +0 -3742
  1104. package/vendor/qrcode/lib/browser.es.js +0 -43
  1105. package/vendor/qrcode/lib/can-promise.es.js +0 -9
  1106. package/vendor/qrcode/lib/core/alignment-pattern.es.js +0 -25
  1107. package/vendor/qrcode/lib/core/alphanumeric-data.es.js +0 -73
  1108. package/vendor/qrcode/lib/core/bit-buffer.es.js +0 -28
  1109. package/vendor/qrcode/lib/core/bit-matrix.es.js +0 -23
  1110. package/vendor/qrcode/lib/core/byte-data.es.js +0 -23
  1111. package/vendor/qrcode/lib/core/error-correction-code.es.js +0 -361
  1112. package/vendor/qrcode/lib/core/error-correction-level.es.js +0 -40
  1113. package/vendor/qrcode/lib/core/finder-pattern.es.js +0 -21
  1114. package/vendor/qrcode/lib/core/format-info.es.js +0 -17
  1115. package/vendor/qrcode/lib/core/galois-field.es.js +0 -23
  1116. package/vendor/qrcode/lib/core/kanji-data.es.js +0 -36
  1117. package/vendor/qrcode/lib/core/mask-pattern.es.js +0 -101
  1118. package/vendor/qrcode/lib/core/mode.es.js +0 -67
  1119. package/vendor/qrcode/lib/core/numeric-data.es.js +0 -26
  1120. package/vendor/qrcode/lib/core/polynomial.es.js +0 -33
  1121. package/vendor/qrcode/lib/core/qrcode.es.js +0 -153
  1122. package/vendor/qrcode/lib/core/reed-solomon-encoder.es.js +0 -27
  1123. package/vendor/qrcode/lib/core/regex.es.js +0 -22
  1124. package/vendor/qrcode/lib/core/segments.es.js +0 -145
  1125. package/vendor/qrcode/lib/core/utils.es.js +0 -73
  1126. package/vendor/qrcode/lib/core/version-check.es.js +0 -9
  1127. package/vendor/qrcode/lib/core/version.es.js +0 -74
  1128. package/vendor/qrcode/lib/renderer/canvas.es.js +0 -31
  1129. package/vendor/qrcode/lib/renderer/svg-tag.es.js +0 -31
  1130. package/vendor/qrcode/lib/renderer/utils.es.js +0 -57
  1131. package/vendor/rope-sequence/dist/index.es.js +0 -100
  1132. package/vendor/simplebar-core/dist/index.es.js +0 -339
  1133. package/vendor/simplebar-vue/dist/simplebar-vue.esm.es.js +0 -176
  1134. package/vendor/single-spa/lib/es2015/esm/single-spa.min.es.js +0 -668
  1135. package/vendor/tippy.js/dist/tippy.esm.es.js +0 -722
  1136. package/vendor/uuid/dist/esm-browser/index.es.js +0 -1
  1137. package/vendor/uuid/dist/esm-browser/md5.es.js +0 -1
  1138. package/vendor/uuid/dist/esm-browser/native.es.js +0 -6
  1139. package/vendor/uuid/dist/esm-browser/nil.es.js +0 -1
  1140. package/vendor/uuid/dist/esm-browser/parse.es.js +0 -1
  1141. package/vendor/uuid/dist/esm-browser/regex.es.js +0 -1
  1142. package/vendor/uuid/dist/esm-browser/rng.es.js +0 -10
  1143. package/vendor/uuid/dist/esm-browser/sha1.es.js +0 -1
  1144. package/vendor/uuid/dist/esm-browser/stringify.es.js +0 -9
  1145. package/vendor/uuid/dist/esm-browser/v1.es.js +0 -1
  1146. package/vendor/uuid/dist/esm-browser/v3.es.js +0 -1
  1147. package/vendor/uuid/dist/esm-browser/v35.es.js +0 -1
  1148. package/vendor/uuid/dist/esm-browser/v4.es.js +0 -13
  1149. package/vendor/uuid/dist/esm-browser/v5.es.js +0 -1
  1150. package/vendor/uuid/dist/esm-browser/validate.es.js +0 -1
  1151. package/vendor/uuid/dist/esm-browser/version.es.js +0 -1
  1152. package/vendor/vee-validate/dist/vee-validate.esm.es.js +0 -1309
  1153. package/vendor/vue-advanced-cropper/dist/index.esm-bundler.es.js +0 -1380
  1154. package/vendor/vue-demi/lib/index.es.js +0 -1
  1155. package/vendor/w3c-keyname/index.es.js +0 -92
  1156. package/wangsvue-fats.es.js +0 -228
  1157. /package/{approverinfo/index.d.ts → components/approverinfo/ApproverInfo.vue.d.ts} +0 -0
  1158. /package/{badge/index.d.ts → components/badge/Badge.vue.d.ts} +0 -0
  1159. /package/{basecomponent → components/basecomponent}/index.d.ts +0 -0
  1160. /package/{basetree/index.d.ts → components/basetree/BaseTree.vue.d.ts} +0 -0
  1161. /package/{breadcrumb/index.d.ts → components/breadcrumb/Breadcrumb.vue.d.ts} +0 -0
  1162. /package/{buttonbulkaction/index.d.ts → components/buttonbulkaction/ButtonBulkAction.vue.d.ts} +0 -0
  1163. /package/{buttoncopy/index.d.ts → components/buttoncopy/ButtonCopy.vue.d.ts} +0 -0
  1164. /package/{buttonfilter/index.d.ts → components/buttonfilter/ButtonFilter.vue.d.ts} +0 -0
  1165. /package/{buttonradio/index.d.ts → components/buttonradio/ButtonRadio.vue.d.ts} +0 -0
  1166. /package/{buttonsearch/index.d.ts → components/buttonsearch/ButtonSearch.vue.d.ts} +0 -0
  1167. /package/{buttonsync/index.d.ts → components/buttonsync/ButtonSync.vue.d.ts} +0 -0
  1168. /package/{card/index.d.ts → components/card/Card.vue.d.ts} +0 -0
  1169. /package/{checkbox/index.d.ts → components/checkbox/Checkbox.vue.d.ts} +0 -0
  1170. /package/{datepicker/index.d.ts → components/datepicker/DatePicker.vue.d.ts} +0 -0
  1171. /package/{daypicker/index.d.ts → components/daypicker/DayPicker.vue.d.ts} +0 -0
  1172. /package/{dialog/index.d.ts → components/dialog/Dialog.vue.d.ts} +0 -0
  1173. /package/{dialogassetnamedetail/index.d.ts → components/dialogassetnamedetail/DialogAssetNameDetail.vue.d.ts} +0 -0
  1174. /package/{editor/index.d.ts → components/editor/Editor.vue.d.ts} +0 -0
  1175. /package/{fieldwrapper/index.d.ts → components/fieldwrapper/FieldWrapper.vue.d.ts} +0 -0
  1176. /package/{form/index.d.ts → components/form/Form.vue.d.ts} +0 -0
  1177. /package/{image/index.d.ts → components/image/Image.vue.d.ts} +0 -0
  1178. /package/{inlinemessage/index.d.ts → components/inlinemessage/InlineMessage.vue.d.ts} +0 -0
  1179. /package/{inputotp/index.d.ts → components/inputotp/InputOtp.vue.d.ts} +0 -0
  1180. /package/{invisiblefield/index.d.ts → components/invisiblefield/InvisibleField.vue.d.ts} +0 -0
  1181. /package/{languageswitcher/index.d.ts → components/languageswitcher/LanguageSwitcher.vue.d.ts} +0 -0
  1182. /package/{loading/index.d.ts → components/loading/Loading.vue.d.ts} +0 -0
  1183. /package/{loading/store/index.d.ts → components/loading/store/loading.store.d.ts} +0 -0
  1184. /package/{menu/index.d.ts → components/menu/Menu.vue.d.ts} +0 -0
  1185. /package/{overlaypanel/index.d.ts → components/overlaypanel/OverlayPanel.vue.d.ts} +0 -0
  1186. /package/{paginator/index.d.ts → components/paginator/Paginator.vue.d.ts} +0 -0
  1187. /package/{passthrough → components/passthrough}/index.d.ts +0 -0
  1188. /package/{tagtype/index.d.ts → components/tagtype/TagType.vue.d.ts} +0 -0
  1189. /package/{toggleswitch/index.d.ts → components/toggleswitch/ToggleSwitch.vue.d.ts} +0 -0
  1190. /package/{transactionroles/index.d.ts → components/transactionroles/TransactionRoles.vue.d.ts} +0 -0
  1191. /package/{tree → components/tree}/helpers/filterNodeKeys.helper.d.ts +0 -0
  1192. /package/{treesearchinput/index.d.ts → components/treesearchinput/TreeSearchInput.vue.d.ts} +0 -0
  1193. /package/{ts-helpers.d.ts → components/ts-helpers.d.ts} +0 -0
  1194. /package/{username/index.d.ts → components/username/UserName.vue.d.ts} +0 -0
  1195. /package/{validatormessage/index.d.ts → components/validatormessage/ValidatorMessage.vue.d.ts} +0 -0
@@ -1,3742 +0,0 @@
1
- import { N as D, S as he, T as M, A as Cn } from "../../prosemirror-state/dist/index.es.js";
2
- import { b as J, D as Re, F as W, a as Kt, M as On } from "../../prosemirror-model/dist/index.es.js";
3
- import { d as Mn } from "../../prosemirror-transform/dist/index.es.js";
4
- const S = function(t) {
5
- for (var e = 0; ; e++)
6
- if (t = t.previousSibling, !t)
7
- return e;
8
- }, ue = function(t) {
9
- let e = t.assignedSlot || t.parentNode;
10
- return e && e.nodeType == 11 ? e.host : e;
11
- };
12
- let We = null;
13
- const q = function(t, e, n) {
14
- let o = We || (We = document.createRange());
15
- return o.setEnd(t, n ?? t.nodeValue.length), o.setStart(t, e || 0), o;
16
- }, xn = function() {
17
- We = null;
18
- }, re = function(t, e, n, o) {
19
- return n && (lt(t, e, n, o, -1) || lt(t, e, n, o, 1));
20
- }, kn = /^(img|br|input|textarea|hr)$/i;
21
- function lt(t, e, n, o, i) {
22
- for (; ; ) {
23
- if (t == n && e == o)
24
- return !0;
25
- if (e == (i < 0 ? 0 : R(t))) {
26
- let s = t.parentNode;
27
- if (!s || s.nodeType != 1 || Ce(t) || kn.test(t.nodeName) || t.contentEditable == "false")
28
- return !1;
29
- e = S(t) + (i < 0 ? 0 : 1), t = s;
30
- } else if (t.nodeType == 1) {
31
- if (t = t.childNodes[e + (i < 0 ? -1 : 0)], t.contentEditable == "false")
32
- return !1;
33
- e = i < 0 ? R(t) : 0;
34
- } else
35
- return !1;
36
- }
37
- }
38
- function R(t) {
39
- return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
40
- }
41
- function Tn(t, e) {
42
- for (; ; ) {
43
- if (t.nodeType == 3 && e)
44
- return t;
45
- if (t.nodeType == 1 && e > 0) {
46
- if (t.contentEditable == "false")
47
- return null;
48
- t = t.childNodes[e - 1], e = R(t);
49
- } else if (t.parentNode && !Ce(t))
50
- e = S(t), t = t.parentNode;
51
- else
52
- return null;
53
- }
54
- }
55
- function An(t, e) {
56
- for (; ; ) {
57
- if (t.nodeType == 3 && e < t.nodeValue.length)
58
- return t;
59
- if (t.nodeType == 1 && e < t.childNodes.length) {
60
- if (t.contentEditable == "false")
61
- return null;
62
- t = t.childNodes[e], e = 0;
63
- } else if (t.parentNode && !Ce(t))
64
- e = S(t) + 1, t = t.parentNode;
65
- else
66
- return null;
67
- }
68
- }
69
- function En(t, e, n) {
70
- for (let o = e == 0, i = e == R(t); o || i; ) {
71
- if (t == n)
72
- return !0;
73
- let s = S(t);
74
- if (t = t.parentNode, !t)
75
- return !1;
76
- o = o && s == 0, i = i && s == R(t);
77
- }
78
- }
79
- function Ce(t) {
80
- let e;
81
- for (let n = t; n && !(e = n.pmViewDesc); n = n.parentNode)
82
- ;
83
- return e && e.node && e.node.isBlock && (e.dom == t || e.contentDOM == t);
84
- }
85
- const Be = function(t) {
86
- return t.focusNode && re(t.focusNode, t.focusOffset, t.anchorNode, t.anchorOffset);
87
- };
88
- function te(t, e) {
89
- let n = document.createEvent("Event");
90
- return n.initEvent("keydown", !0, !0), n.keyCode = t, n.key = n.code = e, n;
91
- }
92
- function Pn(t) {
93
- let e = t.activeElement;
94
- for (; e && e.shadowRoot; )
95
- e = e.shadowRoot.activeElement;
96
- return e;
97
- }
98
- function Vn(t, e, n) {
99
- if (t.caretPositionFromPoint)
100
- try {
101
- let o = t.caretPositionFromPoint(e, n);
102
- if (o)
103
- return { node: o.offsetNode, offset: Math.min(R(o.offsetNode), o.offset) };
104
- } catch {
105
- }
106
- if (t.caretRangeFromPoint) {
107
- let o = t.caretRangeFromPoint(e, n);
108
- if (o)
109
- return { node: o.startContainer, offset: Math.min(R(o.startContainer), o.startOffset) };
110
- }
111
- }
112
- const z = typeof navigator < "u" ? navigator : null, at = typeof document < "u" ? document : null, v = z && z.userAgent || "", _e = /Edge\/(\d+)/.exec(v), Ht = /MSIE \d/.exec(v), je = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(v), A = !!(Ht || je || _e), Z = Ht ? document.documentMode : je ? +je[1] : _e ? +_e[1] : 0, F = !A && /gecko\/(\d+)/i.test(v);
113
- F && +(/Firefox\/(\d+)/.exec(v) || [0, 0])[1];
114
- const Ue = !A && /Chrome\/(\d+)/.exec(v), O = !!Ue, Wt = Ue ? +Ue[1] : 0, x = !A && !!z && /Apple Computer/.test(z.vendor), pe = x && (/Mobile\/\w+/.test(v) || !!z && z.maxTouchPoints > 2), V = pe || (z ? /Mac/.test(z.platform) : !1), Rn = z ? /Win/.test(z.platform) : !1, K = /Android \d/.test(v), Oe = !!at && "webkitFontSmoothing" in at.documentElement.style, Bn = Oe ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
115
- function In(t) {
116
- let e = t.defaultView && t.defaultView.visualViewport;
117
- return e ? {
118
- left: 0,
119
- right: e.width,
120
- top: 0,
121
- bottom: e.height
122
- } : {
123
- left: 0,
124
- right: t.documentElement.clientWidth,
125
- top: 0,
126
- bottom: t.documentElement.clientHeight
127
- };
128
- }
129
- function $(t, e) {
130
- return typeof t == "number" ? t : t[e];
131
- }
132
- function Fn(t) {
133
- let e = t.getBoundingClientRect(), n = e.width / t.offsetWidth || 1, o = e.height / t.offsetHeight || 1;
134
- return {
135
- left: e.left,
136
- right: e.left + t.clientWidth * n,
137
- top: e.top,
138
- bottom: e.top + t.clientHeight * o
139
- };
140
- }
141
- function ct(t, e, n) {
142
- let o = t.someProp("scrollThreshold") || 0, i = t.someProp("scrollMargin") || 5, s = t.dom.ownerDocument;
143
- for (let r = n || t.dom; r; ) {
144
- if (r.nodeType != 1) {
145
- r = ue(r);
146
- continue;
147
- }
148
- let l = r, a = l == s.body, c = a ? In(s) : Fn(l), d = 0, f = 0;
149
- if (e.top < c.top + $(o, "top") ? f = -(c.top - e.top + $(i, "top")) : e.bottom > c.bottom - $(o, "bottom") && (f = e.bottom - e.top > c.bottom - c.top ? e.top + $(i, "top") - c.top : e.bottom - c.bottom + $(i, "bottom")), e.left < c.left + $(o, "left") ? d = -(c.left - e.left + $(i, "left")) : e.right > c.right - $(o, "right") && (d = e.right - c.right + $(i, "right")), d || f)
150
- if (a)
151
- s.defaultView.scrollBy(d, f);
152
- else {
153
- let p = l.scrollLeft, h = l.scrollTop;
154
- f && (l.scrollTop += f), d && (l.scrollLeft += d);
155
- let g = l.scrollLeft - p, m = l.scrollTop - h;
156
- e = { left: e.left - g, top: e.top - m, right: e.right - g, bottom: e.bottom - m };
157
- }
158
- let u = a ? "fixed" : getComputedStyle(r).position;
159
- if (/^(fixed|sticky)$/.test(u))
160
- break;
161
- r = u == "absolute" ? r.offsetParent : ue(r);
162
- }
163
- }
164
- function zn(t) {
165
- let e = t.dom.getBoundingClientRect(), n = Math.max(0, e.top), o, i;
166
- for (let s = (e.left + e.right) / 2, r = n + 1; r < Math.min(innerHeight, e.bottom); r += 5) {
167
- let l = t.root.elementFromPoint(s, r);
168
- if (!l || l == t.dom || !t.dom.contains(l))
169
- continue;
170
- let a = l.getBoundingClientRect();
171
- if (a.top >= n - 20) {
172
- o = l, i = a.top;
173
- break;
174
- }
175
- }
176
- return { refDOM: o, refTop: i, stack: _t(t.dom) };
177
- }
178
- function _t(t) {
179
- let e = [], n = t.ownerDocument;
180
- for (let o = t; o && (e.push({ dom: o, top: o.scrollTop, left: o.scrollLeft }), t != n); o = ue(o))
181
- ;
182
- return e;
183
- }
184
- function Ln({ refDOM: t, refTop: e, stack: n }) {
185
- let o = t ? t.getBoundingClientRect().top : 0;
186
- jt(n, o == 0 ? 0 : o - e);
187
- }
188
- function jt(t, e) {
189
- for (let n = 0; n < t.length; n++) {
190
- let { dom: o, top: i, left: s } = t[n];
191
- o.scrollTop != i + e && (o.scrollTop = i + e), o.scrollLeft != s && (o.scrollLeft = s);
192
- }
193
- }
194
- let ae = null;
195
- function $n(t) {
196
- if (t.setActive)
197
- return t.setActive();
198
- if (ae)
199
- return t.focus(ae);
200
- let e = _t(t);
201
- t.focus(ae == null ? {
202
- get preventScroll() {
203
- return ae = { preventScroll: !0 }, !0;
204
- }
205
- } : void 0), ae || (ae = !1, jt(e, 0));
206
- }
207
- function Ut(t, e) {
208
- let n, o = 2e8, i, s = 0, r = e.top, l = e.top, a, c;
209
- for (let d = t.firstChild, f = 0; d; d = d.nextSibling, f++) {
210
- let u;
211
- if (d.nodeType == 1)
212
- u = d.getClientRects();
213
- else if (d.nodeType == 3)
214
- u = q(d).getClientRects();
215
- else
216
- continue;
217
- for (let p = 0; p < u.length; p++) {
218
- let h = u[p];
219
- if (h.top <= r && h.bottom >= l) {
220
- r = Math.max(h.bottom, r), l = Math.min(h.top, l);
221
- let g = h.left > e.left ? h.left - e.left : h.right < e.left ? e.left - h.right : 0;
222
- if (g < o) {
223
- n = d, o = g, i = g && n.nodeType == 3 ? {
224
- left: h.right < e.left ? h.right : h.left,
225
- top: e.top
226
- } : e, d.nodeType == 1 && g && (s = f + (e.left >= (h.left + h.right) / 2 ? 1 : 0));
227
- continue;
228
- }
229
- } else h.top > e.top && !a && h.left <= e.left && h.right >= e.left && (a = d, c = { left: Math.max(h.left, Math.min(h.right, e.left)), top: h.top });
230
- !n && (e.left >= h.right && e.top >= h.top || e.left >= h.left && e.top >= h.bottom) && (s = f + 1);
231
- }
232
- }
233
- return !n && a && (n = a, i = c, o = 0), n && n.nodeType == 3 ? qn(n, i) : !n || o && n.nodeType == 1 ? { node: t, offset: s } : Ut(n, i);
234
- }
235
- function qn(t, e) {
236
- let n = t.nodeValue.length, o = document.createRange();
237
- for (let i = 0; i < n; i++) {
238
- o.setEnd(t, i + 1), o.setStart(t, i);
239
- let s = U(o, 1);
240
- if (s.top != s.bottom && we(e, s))
241
- return { node: t, offset: i + (e.left >= (s.left + s.right) / 2 ? 1 : 0) };
242
- }
243
- return { node: t, offset: 0 };
244
- }
245
- function we(t, e) {
246
- return t.left >= e.left - 1 && t.left <= e.right + 1 && t.top >= e.top - 1 && t.top <= e.bottom + 1;
247
- }
248
- function Kn(t, e) {
249
- let n = t.parentNode;
250
- return n && /^li$/i.test(n.nodeName) && e.left < t.getBoundingClientRect().left ? n : t;
251
- }
252
- function Hn(t, e, n) {
253
- let { node: o, offset: i } = Ut(e, n), s = -1;
254
- if (o.nodeType == 1 && !o.firstChild) {
255
- let r = o.getBoundingClientRect();
256
- s = r.left != r.right && n.left > (r.left + r.right) / 2 ? 1 : -1;
257
- }
258
- return t.docView.posFromDOM(o, i, s);
259
- }
260
- function Wn(t, e, n, o) {
261
- let i = -1;
262
- for (let s = e, r = !1; s != t.dom; ) {
263
- let l = t.docView.nearestDesc(s, !0), a;
264
- if (!l)
265
- return null;
266
- if (l.dom.nodeType == 1 && (l.node.isBlock && l.parent || !l.contentDOM) && // Ignore elements with zero-size bounding rectangles
267
- ((a = l.dom.getBoundingClientRect()).width || a.height) && (l.node.isBlock && l.parent && (!r && a.left > o.left || a.top > o.top ? i = l.posBefore : (!r && a.right < o.left || a.bottom < o.top) && (i = l.posAfter), r = !0), !l.contentDOM && i < 0 && !l.node.isText))
268
- return (l.node.isBlock ? o.top < (a.top + a.bottom) / 2 : o.left < (a.left + a.right) / 2) ? l.posBefore : l.posAfter;
269
- s = l.dom.parentNode;
270
- }
271
- return i > -1 ? i : t.docView.posFromDOM(e, n, -1);
272
- }
273
- function Yt(t, e, n) {
274
- let o = t.childNodes.length;
275
- if (o && n.top < n.bottom)
276
- for (let i = Math.max(0, Math.min(o - 1, Math.floor(o * (e.top - n.top) / (n.bottom - n.top)) - 2)), s = i; ; ) {
277
- let r = t.childNodes[s];
278
- if (r.nodeType == 1) {
279
- let l = r.getClientRects();
280
- for (let a = 0; a < l.length; a++) {
281
- let c = l[a];
282
- if (we(e, c))
283
- return Yt(r, e, c);
284
- }
285
- }
286
- if ((s = (s + 1) % o) == i)
287
- break;
288
- }
289
- return t;
290
- }
291
- function _n(t, e) {
292
- let n = t.dom.ownerDocument, o, i = 0, s = Vn(n, e.left, e.top);
293
- s && ({ node: o, offset: i } = s);
294
- let r = (t.root.elementFromPoint ? t.root : n).elementFromPoint(e.left, e.top), l;
295
- if (!r || !t.dom.contains(r.nodeType != 1 ? r.parentNode : r)) {
296
- let c = t.dom.getBoundingClientRect();
297
- if (!we(e, c) || (r = Yt(t.dom, e, c), !r))
298
- return null;
299
- }
300
- if (x)
301
- for (let c = r; o && c; c = ue(c))
302
- c.draggable && (o = void 0);
303
- if (r = Kn(r, e), o) {
304
- if (F && o.nodeType == 1 && (i = Math.min(i, o.childNodes.length), i < o.childNodes.length)) {
305
- let d = o.childNodes[i], f;
306
- d.nodeName == "IMG" && (f = d.getBoundingClientRect()).right <= e.left && f.bottom > e.top && i++;
307
- }
308
- let c;
309
- Oe && i && o.nodeType == 1 && (c = o.childNodes[i - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && i--, o == t.dom && i == o.childNodes.length - 1 && o.lastChild.nodeType == 1 && e.top > o.lastChild.getBoundingClientRect().bottom ? l = t.state.doc.content.size : (i == 0 || o.nodeType != 1 || o.childNodes[i - 1].nodeName != "BR") && (l = Wn(t, o, i, e));
310
- }
311
- l == null && (l = Hn(t, r, e));
312
- let a = t.docView.nearestDesc(r, !0);
313
- return { pos: l, inside: a ? a.posAtStart - a.border : -1 };
314
- }
315
- function dt(t) {
316
- return t.top < t.bottom || t.left < t.right;
317
- }
318
- function U(t, e) {
319
- let n = t.getClientRects();
320
- if (n.length) {
321
- let o = n[e < 0 ? 0 : n.length - 1];
322
- if (dt(o))
323
- return o;
324
- }
325
- return Array.prototype.find.call(n, dt) || t.getBoundingClientRect();
326
- }
327
- const jn = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
328
- function Gt(t, e, n) {
329
- let { node: o, offset: i, atom: s } = t.docView.domFromPos(e, n < 0 ? -1 : 1), r = Oe || F;
330
- if (o.nodeType == 3)
331
- if (r && (jn.test(o.nodeValue) || (n < 0 ? !i : i == o.nodeValue.length))) {
332
- let a = U(q(o, i, i), n);
333
- if (F && i && /\s/.test(o.nodeValue[i - 1]) && i < o.nodeValue.length) {
334
- let c = U(q(o, i - 1, i - 1), -1);
335
- if (c.top == a.top) {
336
- let d = U(q(o, i, i + 1), -1);
337
- if (d.top != a.top)
338
- return ge(d, d.left < c.left);
339
- }
340
- }
341
- return a;
342
- } else {
343
- let a = i, c = i, d = n < 0 ? 1 : -1;
344
- return n < 0 && !i ? (c++, d = -1) : n >= 0 && i == o.nodeValue.length ? (a--, d = 1) : n < 0 ? a-- : c++, ge(U(q(o, a, c), d), d < 0);
345
- }
346
- if (!t.state.doc.resolve(e - (s || 0)).parent.inlineContent) {
347
- if (s == null && i && (n < 0 || i == R(o))) {
348
- let a = o.childNodes[i - 1];
349
- if (a.nodeType == 1)
350
- return Le(a.getBoundingClientRect(), !1);
351
- }
352
- if (s == null && i < R(o)) {
353
- let a = o.childNodes[i];
354
- if (a.nodeType == 1)
355
- return Le(a.getBoundingClientRect(), !0);
356
- }
357
- return Le(o.getBoundingClientRect(), n >= 0);
358
- }
359
- if (s == null && i && (n < 0 || i == R(o))) {
360
- let a = o.childNodes[i - 1], c = a.nodeType == 3 ? q(a, R(a) - (r ? 0 : 1)) : a.nodeType == 1 && (a.nodeName != "BR" || !a.nextSibling) ? a : null;
361
- if (c)
362
- return ge(U(c, 1), !1);
363
- }
364
- if (s == null && i < R(o)) {
365
- let a = o.childNodes[i];
366
- for (; a.pmViewDesc && a.pmViewDesc.ignoreForCoords; )
367
- a = a.nextSibling;
368
- let c = a ? a.nodeType == 3 ? q(a, 0, r ? 0 : 1) : a.nodeType == 1 ? a : null : null;
369
- if (c)
370
- return ge(U(c, -1), !0);
371
- }
372
- return ge(U(o.nodeType == 3 ? q(o) : o, -n), n >= 0);
373
- }
374
- function ge(t, e) {
375
- if (t.width == 0)
376
- return t;
377
- let n = e ? t.left : t.right;
378
- return { top: t.top, bottom: t.bottom, left: n, right: n };
379
- }
380
- function Le(t, e) {
381
- if (t.height == 0)
382
- return t;
383
- let n = e ? t.top : t.bottom;
384
- return { top: n, bottom: n, left: t.left, right: t.right };
385
- }
386
- function Xt(t, e, n) {
387
- let o = t.state, i = t.root.activeElement;
388
- o != e && t.updateState(e), i != t.dom && t.focus();
389
- try {
390
- return n();
391
- } finally {
392
- o != e && t.updateState(o), i != t.dom && i && i.focus();
393
- }
394
- }
395
- function Un(t, e, n) {
396
- let o = e.selection, i = n == "up" ? o.$from : o.$to;
397
- return Xt(t, e, () => {
398
- let { node: s } = t.docView.domFromPos(i.pos, n == "up" ? -1 : 1);
399
- for (; ; ) {
400
- let l = t.docView.nearestDesc(s, !0);
401
- if (!l)
402
- break;
403
- if (l.node.isBlock) {
404
- s = l.contentDOM || l.dom;
405
- break;
406
- }
407
- s = l.dom.parentNode;
408
- }
409
- let r = Gt(t, i.pos, 1);
410
- for (let l = s.firstChild; l; l = l.nextSibling) {
411
- let a;
412
- if (l.nodeType == 1)
413
- a = l.getClientRects();
414
- else if (l.nodeType == 3)
415
- a = q(l, 0, l.nodeValue.length).getClientRects();
416
- else
417
- continue;
418
- for (let c = 0; c < a.length; c++) {
419
- let d = a[c];
420
- if (d.bottom > d.top + 1 && (n == "up" ? r.top - d.top > (d.bottom - r.top) * 2 : d.bottom - r.bottom > (r.bottom - d.top) * 2))
421
- return !1;
422
- }
423
- }
424
- return !0;
425
- });
426
- }
427
- const Yn = /[\u0590-\u08ac]/;
428
- function Gn(t, e, n) {
429
- let { $head: o } = e.selection;
430
- if (!o.parent.isTextblock)
431
- return !1;
432
- let i = o.parentOffset, s = !i, r = i == o.parent.content.size, l = t.domSelection();
433
- return l ? !Yn.test(o.parent.textContent) || !l.modify ? n == "left" || n == "backward" ? s : r : Xt(t, e, () => {
434
- let { focusNode: a, focusOffset: c, anchorNode: d, anchorOffset: f } = t.domSelectionRange(), u = l.caretBidiLevel;
435
- l.modify("move", n, "character");
436
- let p = o.depth ? t.docView.domAfterPos(o.before()) : t.dom, { focusNode: h, focusOffset: g } = t.domSelectionRange(), m = h && !p.contains(h.nodeType == 1 ? h : h.parentNode) || a == h && c == g;
437
- try {
438
- l.collapse(d, f), a && (a != d || c != f) && l.extend && l.extend(a, c);
439
- } catch {
440
- }
441
- return u != null && (l.caretBidiLevel = u), m;
442
- }) : o.pos == o.start() || o.pos == o.end();
443
- }
444
- let ft = null, ht = null, ut = !1;
445
- function Xn(t, e, n) {
446
- return ft == e && ht == n ? ut : (ft = e, ht = n, ut = n == "up" || n == "down" ? Un(t, e, n) : Gn(t, e, n));
447
- }
448
- const B = 0, pt = 1, ne = 2, L = 3;
449
- class Me {
450
- constructor(e, n, o, i) {
451
- this.parent = e, this.children = n, this.dom = o, this.contentDOM = i, this.dirty = B, o.pmViewDesc = this;
452
- }
453
- // Used to check whether a given description corresponds to a
454
- // widget/mark/node.
455
- matchesWidget(e) {
456
- return !1;
457
- }
458
- matchesMark(e) {
459
- return !1;
460
- }
461
- matchesNode(e, n, o) {
462
- return !1;
463
- }
464
- matchesHack(e) {
465
- return !1;
466
- }
467
- // When parsing in-editor content (in domchange.js), we allow
468
- // descriptions to determine the parse rules that should be used to
469
- // parse them.
470
- parseRule() {
471
- return null;
472
- }
473
- // Used by the editor's event handler to ignore events that come
474
- // from certain descs.
475
- stopEvent(e) {
476
- return !1;
477
- }
478
- // The size of the content represented by this desc.
479
- get size() {
480
- let e = 0;
481
- for (let n = 0; n < this.children.length; n++)
482
- e += this.children[n].size;
483
- return e;
484
- }
485
- // For block nodes, this represents the space taken up by their
486
- // start/end tokens.
487
- get border() {
488
- return 0;
489
- }
490
- destroy() {
491
- this.parent = void 0, this.dom.pmViewDesc == this && (this.dom.pmViewDesc = void 0);
492
- for (let e = 0; e < this.children.length; e++)
493
- this.children[e].destroy();
494
- }
495
- posBeforeChild(e) {
496
- for (let n = 0, o = this.posAtStart; ; n++) {
497
- let i = this.children[n];
498
- if (i == e)
499
- return o;
500
- o += i.size;
501
- }
502
- }
503
- get posBefore() {
504
- return this.parent.posBeforeChild(this);
505
- }
506
- get posAtStart() {
507
- return this.parent ? this.parent.posBeforeChild(this) + this.border : 0;
508
- }
509
- get posAfter() {
510
- return this.posBefore + this.size;
511
- }
512
- get posAtEnd() {
513
- return this.posAtStart + this.size - 2 * this.border;
514
- }
515
- localPosFromDOM(e, n, o) {
516
- if (this.contentDOM && this.contentDOM.contains(e.nodeType == 1 ? e : e.parentNode))
517
- if (o < 0) {
518
- let s, r;
519
- if (e == this.contentDOM)
520
- s = e.childNodes[n - 1];
521
- else {
522
- for (; e.parentNode != this.contentDOM; )
523
- e = e.parentNode;
524
- s = e.previousSibling;
525
- }
526
- for (; s && !((r = s.pmViewDesc) && r.parent == this); )
527
- s = s.previousSibling;
528
- return s ? this.posBeforeChild(r) + r.size : this.posAtStart;
529
- } else {
530
- let s, r;
531
- if (e == this.contentDOM)
532
- s = e.childNodes[n];
533
- else {
534
- for (; e.parentNode != this.contentDOM; )
535
- e = e.parentNode;
536
- s = e.nextSibling;
537
- }
538
- for (; s && !((r = s.pmViewDesc) && r.parent == this); )
539
- s = s.nextSibling;
540
- return s ? this.posBeforeChild(r) : this.posAtEnd;
541
- }
542
- let i;
543
- if (e == this.dom && this.contentDOM)
544
- i = n > S(this.contentDOM);
545
- else if (this.contentDOM && this.contentDOM != this.dom && this.dom.contains(this.contentDOM))
546
- i = e.compareDocumentPosition(this.contentDOM) & 2;
547
- else if (this.dom.firstChild) {
548
- if (n == 0)
549
- for (let s = e; ; s = s.parentNode) {
550
- if (s == this.dom) {
551
- i = !1;
552
- break;
553
- }
554
- if (s.previousSibling)
555
- break;
556
- }
557
- if (i == null && n == e.childNodes.length)
558
- for (let s = e; ; s = s.parentNode) {
559
- if (s == this.dom) {
560
- i = !0;
561
- break;
562
- }
563
- if (s.nextSibling)
564
- break;
565
- }
566
- }
567
- return i ?? o > 0 ? this.posAtEnd : this.posAtStart;
568
- }
569
- nearestDesc(e, n = !1) {
570
- for (let o = !0, i = e; i; i = i.parentNode) {
571
- let s = this.getDesc(i), r;
572
- if (s && (!n || s.node))
573
- if (o && (r = s.nodeDOM) && !(r.nodeType == 1 ? r.contains(e.nodeType == 1 ? e : e.parentNode) : r == e))
574
- o = !1;
575
- else
576
- return s;
577
- }
578
- }
579
- getDesc(e) {
580
- let n = e.pmViewDesc;
581
- for (let o = n; o; o = o.parent)
582
- if (o == this)
583
- return n;
584
- }
585
- posFromDOM(e, n, o) {
586
- for (let i = e; i; i = i.parentNode) {
587
- let s = this.getDesc(i);
588
- if (s)
589
- return s.localPosFromDOM(e, n, o);
590
- }
591
- return -1;
592
- }
593
- // Find the desc for the node after the given pos, if any. (When a
594
- // parent node overrode rendering, there might not be one.)
595
- descAt(e) {
596
- for (let n = 0, o = 0; n < this.children.length; n++) {
597
- let i = this.children[n], s = o + i.size;
598
- if (o == e && s != o) {
599
- for (; !i.border && i.children.length; )
600
- for (let r = 0; r < i.children.length; r++) {
601
- let l = i.children[r];
602
- if (l.size) {
603
- i = l;
604
- break;
605
- }
606
- }
607
- return i;
608
- }
609
- if (e < s)
610
- return i.descAt(e - o - i.border);
611
- o = s;
612
- }
613
- }
614
- domFromPos(e, n) {
615
- if (!this.contentDOM)
616
- return { node: this.dom, offset: 0, atom: e + 1 };
617
- let o = 0, i = 0;
618
- for (let s = 0; o < this.children.length; o++) {
619
- let r = this.children[o], l = s + r.size;
620
- if (l > e || r instanceof Zt) {
621
- i = e - s;
622
- break;
623
- }
624
- s = l;
625
- }
626
- if (i)
627
- return this.children[o].domFromPos(i - this.children[o].border, n);
628
- for (let s; o && !(s = this.children[o - 1]).size && s instanceof Jt && s.side >= 0; o--)
629
- ;
630
- if (n <= 0) {
631
- let s, r = !0;
632
- for (; s = o ? this.children[o - 1] : null, !(!s || s.dom.parentNode == this.contentDOM); o--, r = !1)
633
- ;
634
- return s && n && r && !s.border && !s.domAtom ? s.domFromPos(s.size, n) : { node: this.contentDOM, offset: s ? S(s.dom) + 1 : 0 };
635
- } else {
636
- let s, r = !0;
637
- for (; s = o < this.children.length ? this.children[o] : null, !(!s || s.dom.parentNode == this.contentDOM); o++, r = !1)
638
- ;
639
- return s && r && !s.border && !s.domAtom ? s.domFromPos(0, n) : { node: this.contentDOM, offset: s ? S(s.dom) : this.contentDOM.childNodes.length };
640
- }
641
- }
642
- // Used to find a DOM range in a single parent for a given changed
643
- // range.
644
- parseRange(e, n, o = 0) {
645
- if (this.children.length == 0)
646
- return { node: this.contentDOM, from: e, to: n, fromOffset: 0, toOffset: this.contentDOM.childNodes.length };
647
- let i = -1, s = -1;
648
- for (let r = o, l = 0; ; l++) {
649
- let a = this.children[l], c = r + a.size;
650
- if (i == -1 && e <= c) {
651
- let d = r + a.border;
652
- if (e >= d && n <= c - a.border && a.node && a.contentDOM && this.contentDOM.contains(a.contentDOM))
653
- return a.parseRange(e, n, d);
654
- e = r;
655
- for (let f = l; f > 0; f--) {
656
- let u = this.children[f - 1];
657
- if (u.size && u.dom.parentNode == this.contentDOM && !u.emptyChildAt(1)) {
658
- i = S(u.dom) + 1;
659
- break;
660
- }
661
- e -= u.size;
662
- }
663
- i == -1 && (i = 0);
664
- }
665
- if (i > -1 && (c > n || l == this.children.length - 1)) {
666
- n = c;
667
- for (let d = l + 1; d < this.children.length; d++) {
668
- let f = this.children[d];
669
- if (f.size && f.dom.parentNode == this.contentDOM && !f.emptyChildAt(-1)) {
670
- s = S(f.dom);
671
- break;
672
- }
673
- n += f.size;
674
- }
675
- s == -1 && (s = this.contentDOM.childNodes.length);
676
- break;
677
- }
678
- r = c;
679
- }
680
- return { node: this.contentDOM, from: e, to: n, fromOffset: i, toOffset: s };
681
- }
682
- emptyChildAt(e) {
683
- if (this.border || !this.contentDOM || !this.children.length)
684
- return !1;
685
- let n = this.children[e < 0 ? 0 : this.children.length - 1];
686
- return n.size == 0 || n.emptyChildAt(e);
687
- }
688
- domAfterPos(e) {
689
- let { node: n, offset: o } = this.domFromPos(e, 0);
690
- if (n.nodeType != 1 || o == n.childNodes.length)
691
- throw new RangeError("No node after pos " + e);
692
- return n.childNodes[o];
693
- }
694
- // View descs are responsible for setting any selection that falls
695
- // entirely inside of them, so that custom implementations can do
696
- // custom things with the selection. Note that this falls apart when
697
- // a selection starts in such a node and ends in another, in which
698
- // case we just use whatever domFromPos produces as a best effort.
699
- setSelection(e, n, o, i = !1) {
700
- let s = Math.min(e, n), r = Math.max(e, n);
701
- for (let p = 0, h = 0; p < this.children.length; p++) {
702
- let g = this.children[p], m = h + g.size;
703
- if (s > h && r < m)
704
- return g.setSelection(e - h - g.border, n - h - g.border, o, i);
705
- h = m;
706
- }
707
- let l = this.domFromPos(e, e ? -1 : 1), a = n == e ? l : this.domFromPos(n, n ? -1 : 1), c = o.root.getSelection(), d = o.domSelectionRange(), f = !1;
708
- if ((F || x) && e == n) {
709
- let { node: p, offset: h } = l;
710
- if (p.nodeType == 3) {
711
- if (f = !!(h && p.nodeValue[h - 1] == `
712
- `), f && h == p.nodeValue.length)
713
- for (let g = p, m; g; g = g.parentNode) {
714
- if (m = g.nextSibling) {
715
- m.nodeName == "BR" && (l = a = { node: m.parentNode, offset: S(m) + 1 });
716
- break;
717
- }
718
- let y = g.pmViewDesc;
719
- if (y && y.node && y.node.isBlock)
720
- break;
721
- }
722
- } else {
723
- let g = p.childNodes[h - 1];
724
- f = g && (g.nodeName == "BR" || g.contentEditable == "false");
725
- }
726
- }
727
- if (F && d.focusNode && d.focusNode != a.node && d.focusNode.nodeType == 1) {
728
- let p = d.focusNode.childNodes[d.focusOffset];
729
- p && p.contentEditable == "false" && (i = !0);
730
- }
731
- if (!(i || f && x) && re(l.node, l.offset, d.anchorNode, d.anchorOffset) && re(a.node, a.offset, d.focusNode, d.focusOffset))
732
- return;
733
- let u = !1;
734
- if ((c.extend || e == n) && !f) {
735
- c.collapse(l.node, l.offset);
736
- try {
737
- e != n && c.extend(a.node, a.offset), u = !0;
738
- } catch {
739
- }
740
- }
741
- if (!u) {
742
- if (e > n) {
743
- let h = l;
744
- l = a, a = h;
745
- }
746
- let p = document.createRange();
747
- p.setEnd(a.node, a.offset), p.setStart(l.node, l.offset), c.removeAllRanges(), c.addRange(p);
748
- }
749
- }
750
- ignoreMutation(e) {
751
- return !this.contentDOM && e.type != "selection";
752
- }
753
- get contentLost() {
754
- return this.contentDOM && this.contentDOM != this.dom && !this.dom.contains(this.contentDOM);
755
- }
756
- // Remove a subtree of the element tree that has been touched
757
- // by a DOM change, so that the next update will redraw it.
758
- markDirty(e, n) {
759
- for (let o = 0, i = 0; i < this.children.length; i++) {
760
- let s = this.children[i], r = o + s.size;
761
- if (o == r ? e <= r && n >= o : e < r && n > o) {
762
- let l = o + s.border, a = r - s.border;
763
- if (e >= l && n <= a) {
764
- this.dirty = e == o || n == r ? ne : pt, e == l && n == a && (s.contentLost || s.dom.parentNode != this.contentDOM) ? s.dirty = L : s.markDirty(e - l, n - l);
765
- return;
766
- } else
767
- s.dirty = s.dom == s.contentDOM && s.dom.parentNode == this.contentDOM && !s.children.length ? ne : L;
768
- }
769
- o = r;
770
- }
771
- this.dirty = ne;
772
- }
773
- markParentsDirty() {
774
- let e = 1;
775
- for (let n = this.parent; n; n = n.parent, e++) {
776
- let o = e == 1 ? ne : pt;
777
- n.dirty < o && (n.dirty = o);
778
- }
779
- }
780
- get domAtom() {
781
- return !1;
782
- }
783
- get ignoreForCoords() {
784
- return !1;
785
- }
786
- isText(e) {
787
- return !1;
788
- }
789
- }
790
- class Jt extends Me {
791
- constructor(e, n, o, i) {
792
- let s, r = n.type.toDOM;
793
- if (typeof r == "function" && (r = r(o, () => {
794
- if (!s)
795
- return i;
796
- if (s.parent)
797
- return s.parent.posBeforeChild(s);
798
- })), !n.type.spec.raw) {
799
- if (r.nodeType != 1) {
800
- let l = document.createElement("span");
801
- l.appendChild(r), r = l;
802
- }
803
- r.contentEditable = "false", r.classList.add("ProseMirror-widget");
804
- }
805
- super(e, [], r, null), this.widget = n, this.widget = n, s = this;
806
- }
807
- matchesWidget(e) {
808
- return this.dirty == B && e.type.eq(this.widget.type);
809
- }
810
- parseRule() {
811
- return { ignore: !0 };
812
- }
813
- stopEvent(e) {
814
- let n = this.widget.spec.stopEvent;
815
- return n ? n(e) : !1;
816
- }
817
- ignoreMutation(e) {
818
- return e.type != "selection" || this.widget.spec.ignoreSelection;
819
- }
820
- destroy() {
821
- this.widget.type.destroy(this.dom), super.destroy();
822
- }
823
- get domAtom() {
824
- return !0;
825
- }
826
- get side() {
827
- return this.widget.type.side;
828
- }
829
- }
830
- class Jn extends Me {
831
- constructor(e, n, o, i) {
832
- super(e, [], n, null), this.textDOM = o, this.text = i;
833
- }
834
- get size() {
835
- return this.text.length;
836
- }
837
- localPosFromDOM(e, n) {
838
- return e != this.textDOM ? this.posAtStart + (n ? this.size : 0) : this.posAtStart + n;
839
- }
840
- domFromPos(e) {
841
- return { node: this.textDOM, offset: e };
842
- }
843
- ignoreMutation(e) {
844
- return e.type === "characterData" && e.target.nodeValue == e.oldValue;
845
- }
846
- }
847
- class le extends Me {
848
- constructor(e, n, o, i, s) {
849
- super(e, [], o, i), this.mark = n, this.spec = s;
850
- }
851
- static create(e, n, o, i) {
852
- let s = i.nodeViews[n.type.name], r = s && s(n, i, o);
853
- return (!r || !r.dom) && (r = Re.renderSpec(document, n.type.spec.toDOM(n, o), null, n.attrs)), new le(e, n, r.dom, r.contentDOM || r.dom, r);
854
- }
855
- parseRule() {
856
- return this.dirty & L || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
857
- }
858
- matchesMark(e) {
859
- return this.dirty != L && this.mark.eq(e);
860
- }
861
- markDirty(e, n) {
862
- if (super.markDirty(e, n), this.dirty != B) {
863
- let o = this.parent;
864
- for (; !o.node; )
865
- o = o.parent;
866
- o.dirty < this.dirty && (o.dirty = this.dirty), this.dirty = B;
867
- }
868
- }
869
- slice(e, n, o) {
870
- let i = le.create(this.parent, this.mark, !0, o), s = this.children, r = this.size;
871
- n < r && (s = Ge(s, n, r, o)), e > 0 && (s = Ge(s, 0, e, o));
872
- for (let l = 0; l < s.length; l++)
873
- s[l].parent = i;
874
- return i.children = s, i;
875
- }
876
- ignoreMutation(e) {
877
- return this.spec.ignoreMutation ? this.spec.ignoreMutation(e) : super.ignoreMutation(e);
878
- }
879
- destroy() {
880
- this.spec.destroy && this.spec.destroy(), super.destroy();
881
- }
882
- }
883
- class Q extends Me {
884
- constructor(e, n, o, i, s, r, l, a, c) {
885
- super(e, [], s, r), this.node = n, this.outerDeco = o, this.innerDeco = i, this.nodeDOM = l;
886
- }
887
- // By default, a node is rendered using the `toDOM` method from the
888
- // node type spec. But client code can use the `nodeViews` spec to
889
- // supply a custom node view, which can influence various aspects of
890
- // the way the node works.
891
- //
892
- // (Using subclassing for this was intentionally decided against,
893
- // since it'd require exposing a whole slew of finicky
894
- // implementation details to the user code that they probably will
895
- // never need.)
896
- static create(e, n, o, i, s, r) {
897
- let l = s.nodeViews[n.type.name], a, c = l && l(n, s, () => {
898
- if (!a)
899
- return r;
900
- if (a.parent)
901
- return a.parent.posBeforeChild(a);
902
- }, o, i), d = c && c.dom, f = c && c.contentDOM;
903
- if (n.isText) {
904
- if (!d)
905
- d = document.createTextNode(n.text);
906
- else if (d.nodeType != 3)
907
- throw new RangeError("Text must be rendered as a DOM text node");
908
- } else d || ({ dom: d, contentDOM: f } = Re.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
909
- !f && !n.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), n.type.spec.draggable && (d.draggable = !0));
910
- let u = d;
911
- return d = vt(d, o, n), c ? a = new Zn(e, n, o, i, d, f || null, u, c, s, r + 1) : n.isText ? new Ie(e, n, o, i, d, u, s) : new Q(e, n, o, i, d, f || null, u, s, r + 1);
912
- }
913
- parseRule() {
914
- if (this.node.type.spec.reparseInView)
915
- return null;
916
- let e = { node: this.node.type.name, attrs: this.node.attrs };
917
- if (this.node.type.whitespace == "pre" && (e.preserveWhitespace = "full"), !this.contentDOM)
918
- e.getContent = () => this.node.content;
919
- else if (!this.contentLost)
920
- e.contentElement = this.contentDOM;
921
- else {
922
- for (let n = this.children.length - 1; n >= 0; n--) {
923
- let o = this.children[n];
924
- if (this.dom.contains(o.dom.parentNode)) {
925
- e.contentElement = o.dom.parentNode;
926
- break;
927
- }
928
- }
929
- e.contentElement || (e.getContent = () => W.empty);
930
- }
931
- return e;
932
- }
933
- matchesNode(e, n, o) {
934
- return this.dirty == B && e.eq(this.node) && Te(n, this.outerDeco) && o.eq(this.innerDeco);
935
- }
936
- get size() {
937
- return this.node.nodeSize;
938
- }
939
- get border() {
940
- return this.node.isLeaf ? 0 : 1;
941
- }
942
- // Syncs `this.children` to match `this.node.content` and the local
943
- // decorations, possibly introducing nesting for marks. Then, in a
944
- // separate step, syncs the DOM inside `this.contentDOM` to
945
- // `this.children`.
946
- updateChildren(e, n) {
947
- let o = this.node.inlineContent, i = n, s = e.composing ? this.localCompositionInfo(e, n) : null, r = s && s.pos > -1 ? s : null, l = s && s.pos < 0, a = new wn(this, r && r.node, e);
948
- to(this.node, this.innerDeco, (c, d, f) => {
949
- c.spec.marks ? a.syncToMarks(c.spec.marks, o, e) : c.type.side >= 0 && !f && a.syncToMarks(d == this.node.childCount ? On.none : this.node.child(d).marks, o, e), a.placeWidget(c, e, i);
950
- }, (c, d, f, u) => {
951
- a.syncToMarks(c.marks, o, e);
952
- let p;
953
- a.findNodeMatch(c, d, f, u) || l && e.state.selection.from > i && e.state.selection.to < i + c.nodeSize && (p = a.findIndexWithChild(s.node)) > -1 && a.updateNodeAt(c, d, f, p, e) || a.updateNextNode(c, d, f, e, u, i) || a.addNode(c, d, f, e, i), i += c.nodeSize;
954
- }), a.syncToMarks([], o, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == ne) && (r && this.protectLocalComposition(e, r), Qt(this.contentDOM, this.children, e), pe && no(this.dom));
955
- }
956
- localCompositionInfo(e, n) {
957
- let { from: o, to: i } = e.state.selection;
958
- if (!(e.state.selection instanceof M) || o < n || i > n + this.node.content.size)
959
- return null;
960
- let s = e.input.compositionNode;
961
- if (!s || !this.dom.contains(s.parentNode))
962
- return null;
963
- if (this.node.inlineContent) {
964
- let r = s.nodeValue, l = oo(this.node.content, r, o - n, i - n);
965
- return l < 0 ? null : { node: s, pos: l, text: r };
966
- } else
967
- return { node: s, pos: -1, text: "" };
968
- }
969
- protectLocalComposition(e, { node: n, pos: o, text: i }) {
970
- if (this.getDesc(n))
971
- return;
972
- let s = n;
973
- for (; s.parentNode != this.contentDOM; s = s.parentNode) {
974
- for (; s.previousSibling; )
975
- s.parentNode.removeChild(s.previousSibling);
976
- for (; s.nextSibling; )
977
- s.parentNode.removeChild(s.nextSibling);
978
- s.pmViewDesc && (s.pmViewDesc = void 0);
979
- }
980
- let r = new Jn(this, s, n, i);
981
- e.input.compositionNodes.push(r), this.children = Ge(this.children, o, o + i.length, e, r);
982
- }
983
- // If this desc must be updated to match the given node decoration,
984
- // do so and return true.
985
- update(e, n, o, i) {
986
- return this.dirty == L || !e.sameMarkup(this.node) ? !1 : (this.updateInner(e, n, o, i), !0);
987
- }
988
- updateInner(e, n, o, i) {
989
- this.updateOuterDeco(n), this.node = e, this.innerDeco = o, this.contentDOM && this.updateChildren(i, this.posAtStart), this.dirty = B;
990
- }
991
- updateOuterDeco(e) {
992
- if (Te(e, this.outerDeco))
993
- return;
994
- let n = this.nodeDOM.nodeType != 1, o = this.dom;
995
- this.dom = wt(this.dom, this.nodeDOM, Ye(this.outerDeco, this.node, n), Ye(e, this.node, n)), this.dom != o && (o.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
996
- }
997
- // Mark this node as being the selected node.
998
- selectNode() {
999
- this.nodeDOM.nodeType == 1 && this.nodeDOM.classList.add("ProseMirror-selectednode"), (this.contentDOM || !this.node.type.spec.draggable) && (this.dom.draggable = !0);
1000
- }
1001
- // Remove selected node marking from this node.
1002
- deselectNode() {
1003
- this.nodeDOM.nodeType == 1 && (this.nodeDOM.classList.remove("ProseMirror-selectednode"), (this.contentDOM || !this.node.type.spec.draggable) && this.dom.removeAttribute("draggable"));
1004
- }
1005
- get domAtom() {
1006
- return this.node.isAtom;
1007
- }
1008
- }
1009
- function mt(t, e, n, o, i) {
1010
- vt(o, e, t);
1011
- let s = new Q(void 0, t, e, n, o, o, o, i, 0);
1012
- return s.contentDOM && s.updateChildren(i, 0), s;
1013
- }
1014
- class Ie extends Q {
1015
- constructor(e, n, o, i, s, r, l) {
1016
- super(e, n, o, i, s, null, r, l, 0);
1017
- }
1018
- parseRule() {
1019
- let e = this.nodeDOM.parentNode;
1020
- for (; e && e != this.dom && !e.pmIsDeco; )
1021
- e = e.parentNode;
1022
- return { skip: e || !0 };
1023
- }
1024
- update(e, n, o, i) {
1025
- return this.dirty == L || this.dirty != B && !this.inParent() || !e.sameMarkup(this.node) ? !1 : (this.updateOuterDeco(n), (this.dirty != B || e.text != this.node.text) && e.text != this.nodeDOM.nodeValue && (this.nodeDOM.nodeValue = e.text, i.trackWrites == this.nodeDOM && (i.trackWrites = null)), this.node = e, this.dirty = B, !0);
1026
- }
1027
- inParent() {
1028
- let e = this.parent.contentDOM;
1029
- for (let n = this.nodeDOM; n; n = n.parentNode)
1030
- if (n == e)
1031
- return !0;
1032
- return !1;
1033
- }
1034
- domFromPos(e) {
1035
- return { node: this.nodeDOM, offset: e };
1036
- }
1037
- localPosFromDOM(e, n, o) {
1038
- return e == this.nodeDOM ? this.posAtStart + Math.min(n, this.node.text.length) : super.localPosFromDOM(e, n, o);
1039
- }
1040
- ignoreMutation(e) {
1041
- return e.type != "characterData" && e.type != "selection";
1042
- }
1043
- slice(e, n, o) {
1044
- let i = this.node.cut(e, n), s = document.createTextNode(i.text);
1045
- return new Ie(this.parent, i, this.outerDeco, this.innerDeco, s, s, o);
1046
- }
1047
- markDirty(e, n) {
1048
- super.markDirty(e, n), this.dom != this.nodeDOM && (e == 0 || n == this.nodeDOM.nodeValue.length) && (this.dirty = L);
1049
- }
1050
- get domAtom() {
1051
- return !1;
1052
- }
1053
- isText(e) {
1054
- return this.node.text == e;
1055
- }
1056
- }
1057
- class Zt extends Me {
1058
- parseRule() {
1059
- return { ignore: !0 };
1060
- }
1061
- matchesHack(e) {
1062
- return this.dirty == B && this.dom.nodeName == e;
1063
- }
1064
- get domAtom() {
1065
- return !0;
1066
- }
1067
- get ignoreForCoords() {
1068
- return this.dom.nodeName == "IMG";
1069
- }
1070
- }
1071
- class Zn extends Q {
1072
- constructor(e, n, o, i, s, r, l, a, c, d) {
1073
- super(e, n, o, i, s, r, l, c, d), this.spec = a;
1074
- }
1075
- // A custom `update` method gets to decide whether the update goes
1076
- // through. If it does, and there's a `contentDOM` node, our logic
1077
- // updates the children.
1078
- update(e, n, o, i) {
1079
- if (this.dirty == L)
1080
- return !1;
1081
- if (this.spec.update && (this.node.type == e.type || this.spec.multiType)) {
1082
- let s = this.spec.update(e, n, o);
1083
- return s && this.updateInner(e, n, o, i), s;
1084
- } else return !this.contentDOM && !e.isLeaf ? !1 : super.update(e, n, o, i);
1085
- }
1086
- selectNode() {
1087
- this.spec.selectNode ? this.spec.selectNode() : super.selectNode();
1088
- }
1089
- deselectNode() {
1090
- this.spec.deselectNode ? this.spec.deselectNode() : super.deselectNode();
1091
- }
1092
- setSelection(e, n, o, i) {
1093
- this.spec.setSelection ? this.spec.setSelection(e, n, o.root) : super.setSelection(e, n, o, i);
1094
- }
1095
- destroy() {
1096
- this.spec.destroy && this.spec.destroy(), super.destroy();
1097
- }
1098
- stopEvent(e) {
1099
- return this.spec.stopEvent ? this.spec.stopEvent(e) : !1;
1100
- }
1101
- ignoreMutation(e) {
1102
- return this.spec.ignoreMutation ? this.spec.ignoreMutation(e) : super.ignoreMutation(e);
1103
- }
1104
- }
1105
- function Qt(t, e, n) {
1106
- let o = t.firstChild, i = !1;
1107
- for (let s = 0; s < e.length; s++) {
1108
- let r = e[s], l = r.dom;
1109
- if (l.parentNode == t) {
1110
- for (; l != o; )
1111
- o = gt(o), i = !0;
1112
- o = o.nextSibling;
1113
- } else
1114
- i = !0, t.insertBefore(l, o);
1115
- if (r instanceof le) {
1116
- let a = o ? o.previousSibling : t.lastChild;
1117
- Qt(r.contentDOM, r.children, n), o = a ? a.nextSibling : t.firstChild;
1118
- }
1119
- }
1120
- for (; o; )
1121
- o = gt(o), i = !0;
1122
- i && n.trackWrites == t && (n.trackWrites = null);
1123
- }
1124
- const ye = function(t) {
1125
- t && (this.nodeName = t);
1126
- };
1127
- ye.prototype = /* @__PURE__ */ Object.create(null);
1128
- const oe = [new ye()];
1129
- function Ye(t, e, n) {
1130
- if (t.length == 0)
1131
- return oe;
1132
- let o = n ? oe[0] : new ye(), i = [o];
1133
- for (let s = 0; s < t.length; s++) {
1134
- let r = t[s].type.attrs;
1135
- if (r) {
1136
- r.nodeName && i.push(o = new ye(r.nodeName));
1137
- for (let l in r) {
1138
- let a = r[l];
1139
- a != null && (n && i.length == 1 && i.push(o = new ye(e.isInline ? "span" : "div")), l == "class" ? o.class = (o.class ? o.class + " " : "") + a : l == "style" ? o.style = (o.style ? o.style + ";" : "") + a : l != "nodeName" && (o[l] = a));
1140
- }
1141
- }
1142
- }
1143
- return i;
1144
- }
1145
- function wt(t, e, n, o) {
1146
- if (n == oe && o == oe)
1147
- return e;
1148
- let i = e;
1149
- for (let s = 0; s < o.length; s++) {
1150
- let r = o[s], l = n[s];
1151
- if (s) {
1152
- let a;
1153
- l && l.nodeName == r.nodeName && i != t && (a = i.parentNode) && a.nodeName.toLowerCase() == r.nodeName || (a = document.createElement(r.nodeName), a.pmIsDeco = !0, a.appendChild(i), l = oe[0]), i = a;
1154
- }
1155
- Qn(i, l || oe[0], r);
1156
- }
1157
- return i;
1158
- }
1159
- function Qn(t, e, n) {
1160
- for (let o in e)
1161
- o != "class" && o != "style" && o != "nodeName" && !(o in n) && t.removeAttribute(o);
1162
- for (let o in n)
1163
- o != "class" && o != "style" && o != "nodeName" && n[o] != e[o] && t.setAttribute(o, n[o]);
1164
- if (e.class != n.class) {
1165
- let o = e.class ? e.class.split(" ").filter(Boolean) : [], i = n.class ? n.class.split(" ").filter(Boolean) : [];
1166
- for (let s = 0; s < o.length; s++)
1167
- i.indexOf(o[s]) == -1 && t.classList.remove(o[s]);
1168
- for (let s = 0; s < i.length; s++)
1169
- o.indexOf(i[s]) == -1 && t.classList.add(i[s]);
1170
- t.classList.length == 0 && t.removeAttribute("class");
1171
- }
1172
- if (e.style != n.style) {
1173
- if (e.style) {
1174
- let o = /\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g, i;
1175
- for (; i = o.exec(e.style); )
1176
- t.style.removeProperty(i[1]);
1177
- }
1178
- n.style && (t.style.cssText += n.style);
1179
- }
1180
- }
1181
- function vt(t, e, n) {
1182
- return wt(t, t, oe, Ye(e, n, t.nodeType != 1));
1183
- }
1184
- function Te(t, e) {
1185
- if (t.length != e.length)
1186
- return !1;
1187
- for (let n = 0; n < t.length; n++)
1188
- if (!t[n].type.eq(e[n].type))
1189
- return !1;
1190
- return !0;
1191
- }
1192
- function gt(t) {
1193
- let e = t.nextSibling;
1194
- return t.parentNode.removeChild(t), e;
1195
- }
1196
- class wn {
1197
- constructor(e, n, o) {
1198
- this.lock = n, this.view = o, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = vn(e.node.content, e);
1199
- }
1200
- // Destroy and remove the children between the given indices in
1201
- // `this.top`.
1202
- destroyBetween(e, n) {
1203
- if (e != n) {
1204
- for (let o = e; o < n; o++)
1205
- this.top.children[o].destroy();
1206
- this.top.children.splice(e, n - e), this.changed = !0;
1207
- }
1208
- }
1209
- // Destroy all remaining children in `this.top`.
1210
- destroyRest() {
1211
- this.destroyBetween(this.index, this.top.children.length);
1212
- }
1213
- // Sync the current stack of mark descs with the given array of
1214
- // marks, reusing existing mark descs when possible.
1215
- syncToMarks(e, n, o) {
1216
- let i = 0, s = this.stack.length >> 1, r = Math.min(s, e.length);
1217
- for (; i < r && (i == s - 1 ? this.top : this.stack[i + 1 << 1]).matchesMark(e[i]) && e[i].type.spec.spanning !== !1; )
1218
- i++;
1219
- for (; i < s; )
1220
- this.destroyRest(), this.top.dirty = B, this.index = this.stack.pop(), this.top = this.stack.pop(), s--;
1221
- for (; s < e.length; ) {
1222
- this.stack.push(this.top, this.index + 1);
1223
- let l = -1;
1224
- for (let a = this.index; a < Math.min(this.index + 3, this.top.children.length); a++) {
1225
- let c = this.top.children[a];
1226
- if (c.matchesMark(e[s]) && !this.isLocked(c.dom)) {
1227
- l = a;
1228
- break;
1229
- }
1230
- }
1231
- if (l > -1)
1232
- l > this.index && (this.changed = !0, this.destroyBetween(this.index, l)), this.top = this.top.children[this.index];
1233
- else {
1234
- let a = le.create(this.top, e[s], n, o);
1235
- this.top.children.splice(this.index, 0, a), this.top = a, this.changed = !0;
1236
- }
1237
- this.index = 0, s++;
1238
- }
1239
- }
1240
- // Try to find a node desc matching the given data. Skip over it and
1241
- // return true when successful.
1242
- findNodeMatch(e, n, o, i) {
1243
- let s = -1, r;
1244
- if (i >= this.preMatch.index && (r = this.preMatch.matches[i - this.preMatch.index]).parent == this.top && r.matchesNode(e, n, o))
1245
- s = this.top.children.indexOf(r, this.index);
1246
- else
1247
- for (let l = this.index, a = Math.min(this.top.children.length, l + 5); l < a; l++) {
1248
- let c = this.top.children[l];
1249
- if (c.matchesNode(e, n, o) && !this.preMatch.matched.has(c)) {
1250
- s = l;
1251
- break;
1252
- }
1253
- }
1254
- return s < 0 ? !1 : (this.destroyBetween(this.index, s), this.index++, !0);
1255
- }
1256
- updateNodeAt(e, n, o, i, s) {
1257
- let r = this.top.children[i];
1258
- return r.dirty == L && r.dom == r.contentDOM && (r.dirty = ne), r.update(e, n, o, s) ? (this.destroyBetween(this.index, i), this.index++, !0) : !1;
1259
- }
1260
- findIndexWithChild(e) {
1261
- for (; ; ) {
1262
- let n = e.parentNode;
1263
- if (!n)
1264
- return -1;
1265
- if (n == this.top.contentDOM) {
1266
- let o = e.pmViewDesc;
1267
- if (o) {
1268
- for (let i = this.index; i < this.top.children.length; i++)
1269
- if (this.top.children[i] == o)
1270
- return i;
1271
- }
1272
- return -1;
1273
- }
1274
- e = n;
1275
- }
1276
- }
1277
- // Try to update the next node, if any, to the given data. Checks
1278
- // pre-matches to avoid overwriting nodes that could still be used.
1279
- updateNextNode(e, n, o, i, s, r) {
1280
- for (let l = this.index; l < this.top.children.length; l++) {
1281
- let a = this.top.children[l];
1282
- if (a instanceof Q) {
1283
- let c = this.preMatch.matched.get(a);
1284
- if (c != null && c != s)
1285
- return !1;
1286
- let d = a.dom, f, u = this.isLocked(d) && !(e.isText && a.node && a.node.isText && a.nodeDOM.nodeValue == e.text && a.dirty != L && Te(n, a.outerDeco));
1287
- if (!u && a.update(e, n, o, i))
1288
- return this.destroyBetween(this.index, l), a.dom != d && (this.changed = !0), this.index++, !0;
1289
- if (!u && (f = this.recreateWrapper(a, e, n, o, i, r)))
1290
- return this.destroyBetween(this.index, l), this.top.children[this.index] = f, f.contentDOM && (f.dirty = ne, f.updateChildren(i, r + 1), f.dirty = B), this.changed = !0, this.index++, !0;
1291
- break;
1292
- }
1293
- }
1294
- return !1;
1295
- }
1296
- // When a node with content is replaced by a different node with
1297
- // identical content, move over its children.
1298
- recreateWrapper(e, n, o, i, s, r) {
1299
- if (e.dirty || n.isAtom || !e.children.length || !e.node.content.eq(n.content) || !Te(o, e.outerDeco) || !i.eq(e.innerDeco))
1300
- return null;
1301
- let l = Q.create(this.top, n, o, i, s, r);
1302
- if (l.contentDOM) {
1303
- l.children = e.children, e.children = [];
1304
- for (let a of l.children)
1305
- a.parent = l;
1306
- }
1307
- return e.destroy(), l;
1308
- }
1309
- // Insert the node as a newly created node desc.
1310
- addNode(e, n, o, i, s) {
1311
- let r = Q.create(this.top, e, n, o, i, s);
1312
- r.contentDOM && r.updateChildren(i, s + 1), this.top.children.splice(this.index++, 0, r), this.changed = !0;
1313
- }
1314
- placeWidget(e, n, o) {
1315
- let i = this.index < this.top.children.length ? this.top.children[this.index] : null;
1316
- if (i && i.matchesWidget(e) && (e == i.widget || !i.widget.type.toDOM.parentNode))
1317
- this.index++;
1318
- else {
1319
- let s = new Jt(this.top, e, n, o);
1320
- this.top.children.splice(this.index++, 0, s), this.changed = !0;
1321
- }
1322
- }
1323
- // Make sure a textblock looks and behaves correctly in
1324
- // contentEditable.
1325
- addTextblockHacks() {
1326
- let e = this.top.children[this.index - 1], n = this.top;
1327
- for (; e instanceof le; )
1328
- n = e, e = n.children[n.children.length - 1];
1329
- (!e || // Empty textblock
1330
- !(e instanceof Ie) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((x || O) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", n), this.addHackNode("BR", this.top));
1331
- }
1332
- addHackNode(e, n) {
1333
- if (n == this.top && this.index < n.children.length && n.children[this.index].matchesHack(e))
1334
- this.index++;
1335
- else {
1336
- let o = document.createElement(e);
1337
- e == "IMG" && (o.className = "ProseMirror-separator", o.alt = ""), e == "BR" && (o.className = "ProseMirror-trailingBreak");
1338
- let i = new Zt(this.top, [], o, null);
1339
- n != this.top ? n.children.push(i) : n.children.splice(this.index++, 0, i), this.changed = !0;
1340
- }
1341
- }
1342
- isLocked(e) {
1343
- return this.lock && (e == this.lock || e.nodeType == 1 && e.contains(this.lock.parentNode));
1344
- }
1345
- }
1346
- function vn(t, e) {
1347
- let n = e, o = n.children.length, i = t.childCount, s = /* @__PURE__ */ new Map(), r = [];
1348
- e: for (; i > 0; ) {
1349
- let l;
1350
- for (; ; )
1351
- if (o) {
1352
- let c = n.children[o - 1];
1353
- if (c instanceof le)
1354
- n = c, o = c.children.length;
1355
- else {
1356
- l = c, o--;
1357
- break;
1358
- }
1359
- } else {
1360
- if (n == e)
1361
- break e;
1362
- o = n.parent.children.indexOf(n), n = n.parent;
1363
- }
1364
- let a = l.node;
1365
- if (a) {
1366
- if (a != t.child(i - 1))
1367
- break;
1368
- --i, s.set(l, i), r.push(l);
1369
- }
1370
- }
1371
- return { index: i, matched: s, matches: r.reverse() };
1372
- }
1373
- function eo(t, e) {
1374
- return t.type.side - e.type.side;
1375
- }
1376
- function to(t, e, n, o) {
1377
- let i = e.locals(t), s = 0;
1378
- if (i.length == 0) {
1379
- for (let c = 0; c < t.childCount; c++) {
1380
- let d = t.child(c);
1381
- o(d, i, e.forChild(s, d), c), s += d.nodeSize;
1382
- }
1383
- return;
1384
- }
1385
- let r = 0, l = [], a = null;
1386
- for (let c = 0; ; ) {
1387
- let d, f;
1388
- for (; r < i.length && i[r].to == s; ) {
1389
- let m = i[r++];
1390
- m.widget && (d ? (f || (f = [d])).push(m) : d = m);
1391
- }
1392
- if (d)
1393
- if (f) {
1394
- f.sort(eo);
1395
- for (let m = 0; m < f.length; m++)
1396
- n(f[m], c, !!a);
1397
- } else
1398
- n(d, c, !!a);
1399
- let u, p;
1400
- if (a)
1401
- p = -1, u = a, a = null;
1402
- else if (c < t.childCount)
1403
- p = c, u = t.child(c++);
1404
- else
1405
- break;
1406
- for (let m = 0; m < l.length; m++)
1407
- l[m].to <= s && l.splice(m--, 1);
1408
- for (; r < i.length && i[r].from <= s && i[r].to > s; )
1409
- l.push(i[r++]);
1410
- let h = s + u.nodeSize;
1411
- if (u.isText) {
1412
- let m = h;
1413
- r < i.length && i[r].from < m && (m = i[r].from);
1414
- for (let y = 0; y < l.length; y++)
1415
- l[y].to < m && (m = l[y].to);
1416
- m < h && (a = u.cut(m - s), u = u.cut(0, m - s), h = m, p = -1);
1417
- } else
1418
- for (; r < i.length && i[r].to < h; )
1419
- r++;
1420
- let g = u.isInline && !u.isLeaf ? l.filter((m) => !m.inline) : l.slice();
1421
- o(u, g, e.forChild(s, u), p), s = h;
1422
- }
1423
- }
1424
- function no(t) {
1425
- if (t.nodeName == "UL" || t.nodeName == "OL") {
1426
- let e = t.style.cssText;
1427
- t.style.cssText = e + "; list-style: square !important", window.getComputedStyle(t).listStyle, t.style.cssText = e;
1428
- }
1429
- }
1430
- function oo(t, e, n, o) {
1431
- for (let i = 0, s = 0; i < t.childCount && s <= o; ) {
1432
- let r = t.child(i++), l = s;
1433
- if (s += r.nodeSize, !r.isText)
1434
- continue;
1435
- let a = r.text;
1436
- for (; i < t.childCount; ) {
1437
- let c = t.child(i++);
1438
- if (s += c.nodeSize, !c.isText)
1439
- break;
1440
- a += c.text;
1441
- }
1442
- if (s >= n) {
1443
- if (s >= o && a.slice(o - e.length - l, o - l) == e)
1444
- return o - e.length;
1445
- let c = l < o ? a.lastIndexOf(e, o - l - 1) : -1;
1446
- if (c >= 0 && c + e.length + l >= n)
1447
- return l + c;
1448
- if (n == o && a.length >= o + e.length - l && a.slice(o - l, o - l + e.length) == e)
1449
- return o;
1450
- }
1451
- }
1452
- return -1;
1453
- }
1454
- function Ge(t, e, n, o, i) {
1455
- let s = [];
1456
- for (let r = 0, l = 0; r < t.length; r++) {
1457
- let a = t[r], c = l, d = l += a.size;
1458
- c >= n || d <= e ? s.push(a) : (c < e && s.push(a.slice(0, e - c, o)), i && (s.push(i), i = void 0), d > n && s.push(a.slice(n - c, a.size, o)));
1459
- }
1460
- return s;
1461
- }
1462
- function ve(t, e = null) {
1463
- let n = t.domSelectionRange(), o = t.state.doc;
1464
- if (!n.focusNode)
1465
- return null;
1466
- let i = t.docView.nearestDesc(n.focusNode), s = i && i.size == 0, r = t.docView.posFromDOM(n.focusNode, n.focusOffset, 1);
1467
- if (r < 0)
1468
- return null;
1469
- let l = o.resolve(r), a, c;
1470
- if (Be(n)) {
1471
- for (a = r; i && !i.node; )
1472
- i = i.parent;
1473
- let f = i.node;
1474
- if (i && f.isAtom && D.isSelectable(f) && i.parent && !(f.isInline && En(n.focusNode, n.focusOffset, i.dom))) {
1475
- let u = i.posBefore;
1476
- c = new D(r == u ? l : o.resolve(u));
1477
- }
1478
- } else {
1479
- if (n instanceof t.dom.ownerDocument.defaultView.Selection && n.rangeCount > 1) {
1480
- let f = r, u = r;
1481
- for (let p = 0; p < n.rangeCount; p++) {
1482
- let h = n.getRangeAt(p);
1483
- f = Math.min(f, t.docView.posFromDOM(h.startContainer, h.startOffset, 1)), u = Math.max(u, t.docView.posFromDOM(h.endContainer, h.endOffset, -1));
1484
- }
1485
- if (f < 0)
1486
- return null;
1487
- [a, r] = u == t.state.selection.anchor ? [u, f] : [f, u], l = o.resolve(r);
1488
- } else
1489
- a = t.docView.posFromDOM(n.anchorNode, n.anchorOffset, 1);
1490
- if (a < 0)
1491
- return null;
1492
- }
1493
- let d = o.resolve(a);
1494
- if (!c) {
1495
- let f = e == "pointer" || t.state.selection.head < l.pos && !s ? 1 : -1;
1496
- c = et(t, d, l, f);
1497
- }
1498
- return c;
1499
- }
1500
- function en(t) {
1501
- return t.editable ? t.hasFocus() : nn(t) && document.activeElement && document.activeElement.contains(t.dom);
1502
- }
1503
- function H(t, e = !1) {
1504
- let n = t.state.selection;
1505
- if (tn(t, n), !!en(t)) {
1506
- if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault && O) {
1507
- let o = t.domSelectionRange(), i = t.domObserver.currentSelection;
1508
- if (o.anchorNode && i.anchorNode && re(o.anchorNode, o.anchorOffset, i.anchorNode, i.anchorOffset)) {
1509
- t.input.mouseDown.delayedSelectionSync = !0, t.domObserver.setCurSelection();
1510
- return;
1511
- }
1512
- }
1513
- if (t.domObserver.disconnectSelection(), t.cursorWrapper)
1514
- so(t);
1515
- else {
1516
- let { anchor: o, head: i } = n, s, r;
1517
- yt && !(n instanceof M) && (n.$from.parent.inlineContent || (s = bt(t, n.from)), !n.empty && !n.$from.parent.inlineContent && (r = bt(t, n.to))), t.docView.setSelection(o, i, t, e), yt && (s && Dt(s), r && Dt(r)), n.visible ? t.dom.classList.remove("ProseMirror-hideselection") : (t.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && io(t));
1518
- }
1519
- t.domObserver.setCurSelection(), t.domObserver.connectSelection();
1520
- }
1521
- }
1522
- const yt = x || O && Wt < 63;
1523
- function bt(t, e) {
1524
- let { node: n, offset: o } = t.docView.domFromPos(e, 0), i = o < n.childNodes.length ? n.childNodes[o] : null, s = o ? n.childNodes[o - 1] : null;
1525
- if (x && i && i.contentEditable == "false")
1526
- return $e(i);
1527
- if ((!i || i.contentEditable == "false") && (!s || s.contentEditable == "false")) {
1528
- if (i)
1529
- return $e(i);
1530
- if (s)
1531
- return $e(s);
1532
- }
1533
- }
1534
- function $e(t) {
1535
- return t.contentEditable = "true", x && t.draggable && (t.draggable = !1, t.wasDraggable = !0), t;
1536
- }
1537
- function Dt(t) {
1538
- t.contentEditable = "false", t.wasDraggable && (t.draggable = !0, t.wasDraggable = null);
1539
- }
1540
- function io(t) {
1541
- let e = t.dom.ownerDocument;
1542
- e.removeEventListener("selectionchange", t.input.hideSelectionGuard);
1543
- let n = t.domSelectionRange(), o = n.anchorNode, i = n.anchorOffset;
1544
- e.addEventListener("selectionchange", t.input.hideSelectionGuard = () => {
1545
- (n.anchorNode != o || n.anchorOffset != i) && (e.removeEventListener("selectionchange", t.input.hideSelectionGuard), setTimeout(() => {
1546
- (!en(t) || t.state.selection.visible) && t.dom.classList.remove("ProseMirror-hideselection");
1547
- }, 20));
1548
- });
1549
- }
1550
- function so(t) {
1551
- let e = t.domSelection(), n = document.createRange();
1552
- if (!e)
1553
- return;
1554
- let o = t.cursorWrapper.dom, i = o.nodeName == "IMG";
1555
- i ? n.setStart(o.parentNode, S(o) + 1) : n.setStart(o, 0), n.collapse(!0), e.removeAllRanges(), e.addRange(n), !i && !t.state.selection.visible && A && Z <= 11 && (o.disabled = !0, o.disabled = !1);
1556
- }
1557
- function tn(t, e) {
1558
- if (e instanceof D) {
1559
- let n = t.docView.descAt(e.from);
1560
- n != t.lastSelectedViewDesc && (Nt(t), n && n.selectNode(), t.lastSelectedViewDesc = n);
1561
- } else
1562
- Nt(t);
1563
- }
1564
- function Nt(t) {
1565
- t.lastSelectedViewDesc && (t.lastSelectedViewDesc.parent && t.lastSelectedViewDesc.deselectNode(), t.lastSelectedViewDesc = void 0);
1566
- }
1567
- function et(t, e, n, o) {
1568
- return t.someProp("createSelectionBetween", (i) => i(t, e, n)) || M.between(e, n, o);
1569
- }
1570
- function St(t) {
1571
- return t.editable && !t.hasFocus() ? !1 : nn(t);
1572
- }
1573
- function nn(t) {
1574
- let e = t.domSelectionRange();
1575
- if (!e.anchorNode)
1576
- return !1;
1577
- try {
1578
- return t.dom.contains(e.anchorNode.nodeType == 3 ? e.anchorNode.parentNode : e.anchorNode) && (t.editable || t.dom.contains(e.focusNode.nodeType == 3 ? e.focusNode.parentNode : e.focusNode));
1579
- } catch {
1580
- return !1;
1581
- }
1582
- }
1583
- function ro(t) {
1584
- let e = t.docView.domFromPos(t.state.selection.anchor, 0), n = t.domSelectionRange();
1585
- return re(e.node, e.offset, n.anchorNode, n.anchorOffset);
1586
- }
1587
- function Xe(t, e) {
1588
- let { $anchor: n, $head: o } = t.selection, i = e > 0 ? n.max(o) : n.min(o), s = i.parent.inlineContent ? i.depth ? t.doc.resolve(e > 0 ? i.after() : i.before()) : null : i;
1589
- return s && he.findFrom(s, e);
1590
- }
1591
- function Y(t, e) {
1592
- return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()), !0;
1593
- }
1594
- function Ct(t, e, n) {
1595
- let o = t.state.selection;
1596
- if (o instanceof M)
1597
- if (n.indexOf("s") > -1) {
1598
- let { $head: i } = o, s = i.textOffset ? null : e < 0 ? i.nodeBefore : i.nodeAfter;
1599
- if (!s || s.isText || !s.isLeaf)
1600
- return !1;
1601
- let r = t.state.doc.resolve(i.pos + s.nodeSize * (e < 0 ? -1 : 1));
1602
- return Y(t, new M(o.$anchor, r));
1603
- } else if (o.empty) {
1604
- if (t.endOfTextblock(e > 0 ? "forward" : "backward")) {
1605
- let i = Xe(t.state, e);
1606
- return i && i instanceof D ? Y(t, i) : !1;
1607
- } else if (!(V && n.indexOf("m") > -1)) {
1608
- let i = o.$head, s = i.textOffset ? null : e < 0 ? i.nodeBefore : i.nodeAfter, r;
1609
- if (!s || s.isText)
1610
- return !1;
1611
- let l = e < 0 ? i.pos - s.nodeSize : i.pos;
1612
- return s.isAtom || (r = t.docView.descAt(l)) && !r.contentDOM ? D.isSelectable(s) ? Y(t, new D(e < 0 ? t.state.doc.resolve(i.pos - s.nodeSize) : i)) : Oe ? Y(t, new M(t.state.doc.resolve(e < 0 ? l : l + s.nodeSize))) : !1 : !1;
1613
- }
1614
- } else return !1;
1615
- else {
1616
- if (o instanceof D && o.node.isInline)
1617
- return Y(t, new M(e > 0 ? o.$to : o.$from));
1618
- {
1619
- let i = Xe(t.state, e);
1620
- return i ? Y(t, i) : !1;
1621
- }
1622
- }
1623
- }
1624
- function Ae(t) {
1625
- return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
1626
- }
1627
- function be(t, e) {
1628
- let n = t.pmViewDesc;
1629
- return n && n.size == 0 && (e < 0 || t.nextSibling || t.nodeName != "BR");
1630
- }
1631
- function ce(t, e) {
1632
- return e < 0 ? lo(t) : ao(t);
1633
- }
1634
- function lo(t) {
1635
- let e = t.domSelectionRange(), n = e.focusNode, o = e.focusOffset;
1636
- if (!n)
1637
- return;
1638
- let i, s, r = !1;
1639
- for (F && n.nodeType == 1 && o < Ae(n) && be(n.childNodes[o], -1) && (r = !0); ; )
1640
- if (o > 0) {
1641
- if (n.nodeType != 1)
1642
- break;
1643
- {
1644
- let l = n.childNodes[o - 1];
1645
- if (be(l, -1))
1646
- i = n, s = --o;
1647
- else if (l.nodeType == 3)
1648
- n = l, o = n.nodeValue.length;
1649
- else
1650
- break;
1651
- }
1652
- } else {
1653
- if (on(n))
1654
- break;
1655
- {
1656
- let l = n.previousSibling;
1657
- for (; l && be(l, -1); )
1658
- i = n.parentNode, s = S(l), l = l.previousSibling;
1659
- if (l)
1660
- n = l, o = Ae(n);
1661
- else {
1662
- if (n = n.parentNode, n == t.dom)
1663
- break;
1664
- o = 0;
1665
- }
1666
- }
1667
- }
1668
- r ? Je(t, n, o) : i && Je(t, i, s);
1669
- }
1670
- function ao(t) {
1671
- let e = t.domSelectionRange(), n = e.focusNode, o = e.focusOffset;
1672
- if (!n)
1673
- return;
1674
- let i = Ae(n), s, r;
1675
- for (; ; )
1676
- if (o < i) {
1677
- if (n.nodeType != 1)
1678
- break;
1679
- let l = n.childNodes[o];
1680
- if (be(l, 1))
1681
- s = n, r = ++o;
1682
- else
1683
- break;
1684
- } else {
1685
- if (on(n))
1686
- break;
1687
- {
1688
- let l = n.nextSibling;
1689
- for (; l && be(l, 1); )
1690
- s = l.parentNode, r = S(l) + 1, l = l.nextSibling;
1691
- if (l)
1692
- n = l, o = 0, i = Ae(n);
1693
- else {
1694
- if (n = n.parentNode, n == t.dom)
1695
- break;
1696
- o = i = 0;
1697
- }
1698
- }
1699
- }
1700
- s && Je(t, s, r);
1701
- }
1702
- function on(t) {
1703
- let e = t.pmViewDesc;
1704
- return e && e.node && e.node.isBlock;
1705
- }
1706
- function co(t, e) {
1707
- for (; t && e == t.childNodes.length && !Ce(t); )
1708
- e = S(t) + 1, t = t.parentNode;
1709
- for (; t && e < t.childNodes.length; ) {
1710
- let n = t.childNodes[e];
1711
- if (n.nodeType == 3)
1712
- return n;
1713
- if (n.nodeType == 1 && n.contentEditable == "false")
1714
- break;
1715
- t = n, e = 0;
1716
- }
1717
- }
1718
- function fo(t, e) {
1719
- for (; t && !e && !Ce(t); )
1720
- e = S(t), t = t.parentNode;
1721
- for (; t && e; ) {
1722
- let n = t.childNodes[e - 1];
1723
- if (n.nodeType == 3)
1724
- return n;
1725
- if (n.nodeType == 1 && n.contentEditable == "false")
1726
- break;
1727
- t = n, e = t.childNodes.length;
1728
- }
1729
- }
1730
- function Je(t, e, n) {
1731
- if (e.nodeType != 3) {
1732
- let s, r;
1733
- (r = co(e, n)) ? (e = r, n = 0) : (s = fo(e, n)) && (e = s, n = s.nodeValue.length);
1734
- }
1735
- let o = t.domSelection();
1736
- if (!o)
1737
- return;
1738
- if (Be(o)) {
1739
- let s = document.createRange();
1740
- s.setEnd(e, n), s.setStart(e, n), o.removeAllRanges(), o.addRange(s);
1741
- } else o.extend && o.extend(e, n);
1742
- t.domObserver.setCurSelection();
1743
- let { state: i } = t;
1744
- setTimeout(() => {
1745
- t.state == i && H(t);
1746
- }, 50);
1747
- }
1748
- function Ot(t, e) {
1749
- let n = t.state.doc.resolve(e);
1750
- if (!(O || Rn) && n.parent.inlineContent) {
1751
- let i = t.coordsAtPos(e);
1752
- if (e > n.start()) {
1753
- let s = t.coordsAtPos(e - 1), r = (s.top + s.bottom) / 2;
1754
- if (r > i.top && r < i.bottom && Math.abs(s.left - i.left) > 1)
1755
- return s.left < i.left ? "ltr" : "rtl";
1756
- }
1757
- if (e < n.end()) {
1758
- let s = t.coordsAtPos(e + 1), r = (s.top + s.bottom) / 2;
1759
- if (r > i.top && r < i.bottom && Math.abs(s.left - i.left) > 1)
1760
- return s.left > i.left ? "ltr" : "rtl";
1761
- }
1762
- }
1763
- return getComputedStyle(t.dom).direction == "rtl" ? "rtl" : "ltr";
1764
- }
1765
- function Mt(t, e, n) {
1766
- let o = t.state.selection;
1767
- if (o instanceof M && !o.empty || n.indexOf("s") > -1 || V && n.indexOf("m") > -1)
1768
- return !1;
1769
- let { $from: i, $to: s } = o;
1770
- if (!i.parent.inlineContent || t.endOfTextblock(e < 0 ? "up" : "down")) {
1771
- let r = Xe(t.state, e);
1772
- if (r && r instanceof D)
1773
- return Y(t, r);
1774
- }
1775
- if (!i.parent.inlineContent) {
1776
- let r = e < 0 ? i : s, l = o instanceof Cn ? he.near(r, e) : he.findFrom(r, e);
1777
- return l ? Y(t, l) : !1;
1778
- }
1779
- return !1;
1780
- }
1781
- function xt(t, e) {
1782
- if (!(t.state.selection instanceof M))
1783
- return !0;
1784
- let { $head: n, $anchor: o, empty: i } = t.state.selection;
1785
- if (!n.sameParent(o))
1786
- return !0;
1787
- if (!i)
1788
- return !1;
1789
- if (t.endOfTextblock(e > 0 ? "forward" : "backward"))
1790
- return !0;
1791
- let s = !n.textOffset && (e < 0 ? n.nodeBefore : n.nodeAfter);
1792
- if (s && !s.isText) {
1793
- let r = t.state.tr;
1794
- return e < 0 ? r.delete(n.pos - s.nodeSize, n.pos) : r.delete(n.pos, n.pos + s.nodeSize), t.dispatch(r), !0;
1795
- }
1796
- return !1;
1797
- }
1798
- function kt(t, e, n) {
1799
- t.domObserver.stop(), e.contentEditable = n, t.domObserver.start();
1800
- }
1801
- function ho(t) {
1802
- if (!x || t.state.selection.$head.parentOffset > 0)
1803
- return !1;
1804
- let { focusNode: e, focusOffset: n } = t.domSelectionRange();
1805
- if (e && e.nodeType == 1 && n == 0 && e.firstChild && e.firstChild.contentEditable == "false") {
1806
- let o = e.firstChild;
1807
- kt(t, o, "true"), setTimeout(() => kt(t, o, "false"), 20);
1808
- }
1809
- return !1;
1810
- }
1811
- function uo(t) {
1812
- let e = "";
1813
- return t.ctrlKey && (e += "c"), t.metaKey && (e += "m"), t.altKey && (e += "a"), t.shiftKey && (e += "s"), e;
1814
- }
1815
- function po(t, e) {
1816
- let n = e.keyCode, o = uo(e);
1817
- if (n == 8 || V && n == 72 && o == "c")
1818
- return xt(t, -1) || ce(t, -1);
1819
- if (n == 46 && !e.shiftKey || V && n == 68 && o == "c")
1820
- return xt(t, 1) || ce(t, 1);
1821
- if (n == 13 || n == 27)
1822
- return !0;
1823
- if (n == 37 || V && n == 66 && o == "c") {
1824
- let i = n == 37 ? Ot(t, t.state.selection.from) == "ltr" ? -1 : 1 : -1;
1825
- return Ct(t, i, o) || ce(t, i);
1826
- } else if (n == 39 || V && n == 70 && o == "c") {
1827
- let i = n == 39 ? Ot(t, t.state.selection.from) == "ltr" ? 1 : -1 : 1;
1828
- return Ct(t, i, o) || ce(t, i);
1829
- } else {
1830
- if (n == 38 || V && n == 80 && o == "c")
1831
- return Mt(t, -1, o) || ce(t, -1);
1832
- if (n == 40 || V && n == 78 && o == "c")
1833
- return ho(t) || Mt(t, 1, o) || ce(t, 1);
1834
- if (o == (V ? "m" : "c") && (n == 66 || n == 73 || n == 89 || n == 90))
1835
- return !0;
1836
- }
1837
- return !1;
1838
- }
1839
- function tt(t, e) {
1840
- t.someProp("transformCopied", (p) => {
1841
- e = p(e, t);
1842
- });
1843
- let n = [], { content: o, openStart: i, openEnd: s } = e;
1844
- for (; i > 1 && s > 1 && o.childCount == 1 && o.firstChild.childCount == 1; ) {
1845
- i--, s--;
1846
- let p = o.firstChild;
1847
- n.push(p.type.name, p.attrs != p.type.defaultAttrs ? p.attrs : null), o = p.content;
1848
- }
1849
- let r = t.someProp("clipboardSerializer") || Re.fromSchema(t.state.schema), l = dn(), a = l.createElement("div");
1850
- a.appendChild(r.serializeFragment(o, { document: l }));
1851
- let c = a.firstChild, d, f = 0;
1852
- for (; c && c.nodeType == 1 && (d = cn[c.nodeName.toLowerCase()]); ) {
1853
- for (let p = d.length - 1; p >= 0; p--) {
1854
- let h = l.createElement(d[p]);
1855
- for (; a.firstChild; )
1856
- h.appendChild(a.firstChild);
1857
- a.appendChild(h), f++;
1858
- }
1859
- c = a.firstChild;
1860
- }
1861
- c && c.nodeType == 1 && c.setAttribute("data-pm-slice", `${i} ${s}${f ? ` -${f}` : ""} ${JSON.stringify(n)}`);
1862
- let u = t.someProp("clipboardTextSerializer", (p) => p(e, t)) || e.content.textBetween(0, e.content.size, `
1863
-
1864
- `);
1865
- return { dom: a, text: u, slice: e };
1866
- }
1867
- function sn(t, e, n, o, i) {
1868
- let s = i.parent.type.spec.code, r, l;
1869
- if (!n && !e)
1870
- return null;
1871
- let a = e && (o || s || !n);
1872
- if (a) {
1873
- if (t.someProp("transformPastedText", (u) => {
1874
- e = u(e, s || o, t);
1875
- }), s)
1876
- return e ? new J(W.from(t.state.schema.text(e.replace(/\r\n?/g, `
1877
- `))), 0, 0) : J.empty;
1878
- let f = t.someProp("clipboardTextParser", (u) => u(e, i, o, t));
1879
- if (f)
1880
- l = f;
1881
- else {
1882
- let u = i.marks(), { schema: p } = t.state, h = Re.fromSchema(p);
1883
- r = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((g) => {
1884
- let m = r.appendChild(document.createElement("p"));
1885
- g && m.appendChild(h.serializeNode(p.text(g, u)));
1886
- });
1887
- }
1888
- } else
1889
- t.someProp("transformPastedHTML", (f) => {
1890
- n = f(n, t);
1891
- }), r = bo(n), Oe && Do(r);
1892
- let c = r && r.querySelector("[data-pm-slice]"), d = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
1893
- if (d && d[3])
1894
- for (let f = +d[3]; f > 0; f--) {
1895
- let u = r.firstChild;
1896
- for (; u && u.nodeType != 1; )
1897
- u = u.nextSibling;
1898
- if (!u)
1899
- break;
1900
- r = u;
1901
- }
1902
- if (l || (l = (t.someProp("clipboardParser") || t.someProp("domParser") || Kt.fromSchema(t.state.schema)).parseSlice(r, {
1903
- preserveWhitespace: !!(a || d),
1904
- context: i,
1905
- ruleFromNode(u) {
1906
- return u.nodeName == "BR" && !u.nextSibling && u.parentNode && !mo.test(u.parentNode.nodeName) ? { ignore: !0 } : null;
1907
- }
1908
- })), d)
1909
- l = No(Tt(l, +d[1], +d[2]), d[4]);
1910
- else if (l = J.maxOpen(go(l.content, i), !0), l.openStart || l.openEnd) {
1911
- let f = 0, u = 0;
1912
- for (let p = l.content.firstChild; f < l.openStart && !p.type.spec.isolating; f++, p = p.firstChild)
1913
- ;
1914
- for (let p = l.content.lastChild; u < l.openEnd && !p.type.spec.isolating; u++, p = p.lastChild)
1915
- ;
1916
- l = Tt(l, f, u);
1917
- }
1918
- return t.someProp("transformPasted", (f) => {
1919
- l = f(l, t);
1920
- }), l;
1921
- }
1922
- const mo = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
1923
- function go(t, e) {
1924
- if (t.childCount < 2)
1925
- return t;
1926
- for (let n = e.depth; n >= 0; n--) {
1927
- let i = e.node(n).contentMatchAt(e.index(n)), s, r = [];
1928
- if (t.forEach((l) => {
1929
- if (!r)
1930
- return;
1931
- let a = i.findWrapping(l.type), c;
1932
- if (!a)
1933
- return r = null;
1934
- if (c = r.length && s.length && ln(a, s, l, r[r.length - 1], 0))
1935
- r[r.length - 1] = c;
1936
- else {
1937
- r.length && (r[r.length - 1] = an(r[r.length - 1], s.length));
1938
- let d = rn(l, a);
1939
- r.push(d), i = i.matchType(d.type), s = a;
1940
- }
1941
- }), r)
1942
- return W.from(r);
1943
- }
1944
- return t;
1945
- }
1946
- function rn(t, e, n = 0) {
1947
- for (let o = e.length - 1; o >= n; o--)
1948
- t = e[o].create(null, W.from(t));
1949
- return t;
1950
- }
1951
- function ln(t, e, n, o, i) {
1952
- if (i < t.length && i < e.length && t[i] == e[i]) {
1953
- let s = ln(t, e, n, o.lastChild, i + 1);
1954
- if (s)
1955
- return o.copy(o.content.replaceChild(o.childCount - 1, s));
1956
- if (o.contentMatchAt(o.childCount).matchType(i == t.length - 1 ? n.type : t[i + 1]))
1957
- return o.copy(o.content.append(W.from(rn(n, t, i + 1))));
1958
- }
1959
- }
1960
- function an(t, e) {
1961
- if (e == 0)
1962
- return t;
1963
- let n = t.content.replaceChild(t.childCount - 1, an(t.lastChild, e - 1)), o = t.contentMatchAt(t.childCount).fillBefore(W.empty, !0);
1964
- return t.copy(n.append(o));
1965
- }
1966
- function Ze(t, e, n, o, i, s) {
1967
- let r = e < 0 ? t.firstChild : t.lastChild, l = r.content;
1968
- return t.childCount > 1 && (s = 0), i < o - 1 && (l = Ze(l, e, n, o, i + 1, s)), i >= n && (l = e < 0 ? r.contentMatchAt(0).fillBefore(l, s <= i).append(l) : l.append(r.contentMatchAt(r.childCount).fillBefore(W.empty, !0))), t.replaceChild(e < 0 ? 0 : t.childCount - 1, r.copy(l));
1969
- }
1970
- function Tt(t, e, n) {
1971
- return e < t.openStart && (t = new J(Ze(t.content, -1, e, t.openStart, 0, t.openEnd), e, t.openEnd)), n < t.openEnd && (t = new J(Ze(t.content, 1, n, t.openEnd, 0, 0), t.openStart, n)), t;
1972
- }
1973
- const cn = {
1974
- thead: ["table"],
1975
- tbody: ["table"],
1976
- tfoot: ["table"],
1977
- caption: ["table"],
1978
- colgroup: ["table"],
1979
- col: ["table", "colgroup"],
1980
- tr: ["table", "tbody"],
1981
- td: ["table", "tbody", "tr"],
1982
- th: ["table", "tbody", "tr"]
1983
- };
1984
- let At = null;
1985
- function dn() {
1986
- return At || (At = document.implementation.createHTMLDocument("title"));
1987
- }
1988
- let qe = null;
1989
- function yo(t) {
1990
- let e = window.trustedTypes;
1991
- return e ? (qe || (qe = e.defaultPolicy || e.createPolicy("ProseMirrorClipboard", { createHTML: (n) => n })), qe.createHTML(t)) : t;
1992
- }
1993
- function bo(t) {
1994
- let e = /^(\s*<meta [^>]*>)*/.exec(t);
1995
- e && (t = t.slice(e[0].length));
1996
- let n = dn().createElement("div"), o = /<([a-z][^>\s]+)/i.exec(t), i;
1997
- if ((i = o && cn[o[1].toLowerCase()]) && (t = i.map((s) => "<" + s + ">").join("") + t + i.map((s) => "</" + s + ">").reverse().join("")), n.innerHTML = yo(t), i)
1998
- for (let s = 0; s < i.length; s++)
1999
- n = n.querySelector(i[s]) || n;
2000
- return n;
2001
- }
2002
- function Do(t) {
2003
- let e = t.querySelectorAll(O ? "span:not([class]):not([style])" : "span.Apple-converted-space");
2004
- for (let n = 0; n < e.length; n++) {
2005
- let o = e[n];
2006
- o.childNodes.length == 1 && o.textContent == " " && o.parentNode && o.parentNode.replaceChild(t.ownerDocument.createTextNode(" "), o);
2007
- }
2008
- }
2009
- function No(t, e) {
2010
- if (!t.size)
2011
- return t;
2012
- let n = t.content.firstChild.type.schema, o;
2013
- try {
2014
- o = JSON.parse(e);
2015
- } catch {
2016
- return t;
2017
- }
2018
- let { content: i, openStart: s, openEnd: r } = t;
2019
- for (let l = o.length - 2; l >= 0; l -= 2) {
2020
- let a = n.nodes[o[l]];
2021
- if (!a || a.hasRequiredAttrs())
2022
- break;
2023
- i = W.from(a.create(o[l + 1], i)), s++, r++;
2024
- }
2025
- return new J(i, s, r);
2026
- }
2027
- const k = {}, T = {}, So = { touchstart: !0, touchmove: !0 };
2028
- class Co {
2029
- constructor() {
2030
- this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "" }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastChromeDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
2031
- }
2032
- }
2033
- function Oo(t) {
2034
- for (let e in k) {
2035
- let n = k[e];
2036
- t.dom.addEventListener(e, t.input.eventHandlers[e] = (o) => {
2037
- xo(t, o) && !nt(t, o) && (t.editable || !(o.type in T)) && n(t, o);
2038
- }, So[e] ? { passive: !0 } : void 0);
2039
- }
2040
- x && t.dom.addEventListener("input", () => null), Qe(t);
2041
- }
2042
- function X(t, e) {
2043
- t.input.lastSelectionOrigin = e, t.input.lastSelectionTime = Date.now();
2044
- }
2045
- function Mo(t) {
2046
- t.domObserver.stop();
2047
- for (let e in t.input.eventHandlers)
2048
- t.dom.removeEventListener(e, t.input.eventHandlers[e]);
2049
- clearTimeout(t.input.composingTimeout), clearTimeout(t.input.lastIOSEnterFallbackTimeout);
2050
- }
2051
- function Qe(t) {
2052
- t.someProp("handleDOMEvents", (e) => {
2053
- for (let n in e)
2054
- t.input.eventHandlers[n] || t.dom.addEventListener(n, t.input.eventHandlers[n] = (o) => nt(t, o));
2055
- });
2056
- }
2057
- function nt(t, e) {
2058
- return t.someProp("handleDOMEvents", (n) => {
2059
- let o = n[e.type];
2060
- return o ? o(t, e) || e.defaultPrevented : !1;
2061
- });
2062
- }
2063
- function xo(t, e) {
2064
- if (!e.bubbles)
2065
- return !0;
2066
- if (e.defaultPrevented)
2067
- return !1;
2068
- for (let n = e.target; n != t.dom; n = n.parentNode)
2069
- if (!n || n.nodeType == 11 || n.pmViewDesc && n.pmViewDesc.stopEvent(e))
2070
- return !1;
2071
- return !0;
2072
- }
2073
- function ko(t, e) {
2074
- !nt(t, e) && k[e.type] && (t.editable || !(e.type in T)) && k[e.type](t, e);
2075
- }
2076
- T.keydown = (t, e) => {
2077
- let n = e;
2078
- if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !hn(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(K && O && n.keyCode == 13)))
2079
- if (n.keyCode != 229 && t.domObserver.forceFlush(), pe && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
2080
- let o = Date.now();
2081
- t.input.lastIOSEnter = o, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
2082
- t.input.lastIOSEnter == o && (t.someProp("handleKeyDown", (i) => i(t, te(13, "Enter"))), t.input.lastIOSEnter = 0);
2083
- }, 200);
2084
- } else t.someProp("handleKeyDown", (o) => o(t, n)) || po(t, n) ? n.preventDefault() : X(t, "key");
2085
- };
2086
- T.keyup = (t, e) => {
2087
- e.keyCode == 16 && (t.input.shiftKey = !1);
2088
- };
2089
- T.keypress = (t, e) => {
2090
- let n = e;
2091
- if (hn(t, n) || !n.charCode || n.ctrlKey && !n.altKey || V && n.metaKey)
2092
- return;
2093
- if (t.someProp("handleKeyPress", (i) => i(t, n))) {
2094
- n.preventDefault();
2095
- return;
2096
- }
2097
- let o = t.state.selection;
2098
- if (!(o instanceof M) || !o.$from.sameParent(o.$to)) {
2099
- let i = String.fromCharCode(n.charCode);
2100
- !/[\r\n]/.test(i) && !t.someProp("handleTextInput", (s) => s(t, o.$from.pos, o.$to.pos, i)) && t.dispatch(t.state.tr.insertText(i).scrollIntoView()), n.preventDefault();
2101
- }
2102
- };
2103
- function Fe(t) {
2104
- return { left: t.clientX, top: t.clientY };
2105
- }
2106
- function To(t, e) {
2107
- let n = e.x - t.clientX, o = e.y - t.clientY;
2108
- return n * n + o * o < 100;
2109
- }
2110
- function ot(t, e, n, o, i) {
2111
- if (o == -1)
2112
- return !1;
2113
- let s = t.state.doc.resolve(o);
2114
- for (let r = s.depth + 1; r > 0; r--)
2115
- if (t.someProp(e, (l) => r > s.depth ? l(t, n, s.nodeAfter, s.before(r), i, !0) : l(t, n, s.node(r), s.before(r), i, !1)))
2116
- return !0;
2117
- return !1;
2118
- }
2119
- function fe(t, e, n) {
2120
- if (t.focused || t.focus(), t.state.selection.eq(e))
2121
- return;
2122
- let o = t.state.tr.setSelection(e);
2123
- o.setMeta("pointer", !0), t.dispatch(o);
2124
- }
2125
- function Ao(t, e) {
2126
- if (e == -1)
2127
- return !1;
2128
- let n = t.state.doc.resolve(e), o = n.nodeAfter;
2129
- return o && o.isAtom && D.isSelectable(o) ? (fe(t, new D(n)), !0) : !1;
2130
- }
2131
- function Eo(t, e) {
2132
- if (e == -1)
2133
- return !1;
2134
- let n = t.state.selection, o, i;
2135
- n instanceof D && (o = n.node);
2136
- let s = t.state.doc.resolve(e);
2137
- for (let r = s.depth + 1; r > 0; r--) {
2138
- let l = r > s.depth ? s.nodeAfter : s.node(r);
2139
- if (D.isSelectable(l)) {
2140
- o && n.$from.depth > 0 && r >= n.$from.depth && s.before(n.$from.depth + 1) == n.$from.pos ? i = s.before(n.$from.depth) : i = s.before(r);
2141
- break;
2142
- }
2143
- }
2144
- return i != null ? (fe(t, D.create(t.state.doc, i)), !0) : !1;
2145
- }
2146
- function Po(t, e, n, o, i) {
2147
- return ot(t, "handleClickOn", e, n, o) || t.someProp("handleClick", (s) => s(t, e, o)) || (i ? Eo(t, n) : Ao(t, n));
2148
- }
2149
- function Vo(t, e, n, o) {
2150
- return ot(t, "handleDoubleClickOn", e, n, o) || t.someProp("handleDoubleClick", (i) => i(t, e, o));
2151
- }
2152
- function Ro(t, e, n, o) {
2153
- return ot(t, "handleTripleClickOn", e, n, o) || t.someProp("handleTripleClick", (i) => i(t, e, o)) || Bo(t, n, o);
2154
- }
2155
- function Bo(t, e, n) {
2156
- if (n.button != 0)
2157
- return !1;
2158
- let o = t.state.doc;
2159
- if (e == -1)
2160
- return o.inlineContent ? (fe(t, M.create(o, 0, o.content.size)), !0) : !1;
2161
- let i = o.resolve(e);
2162
- for (let s = i.depth + 1; s > 0; s--) {
2163
- let r = s > i.depth ? i.nodeAfter : i.node(s), l = i.before(s);
2164
- if (r.inlineContent)
2165
- fe(t, M.create(o, l + 1, l + 1 + r.content.size));
2166
- else if (D.isSelectable(r))
2167
- fe(t, D.create(o, l));
2168
- else
2169
- continue;
2170
- return !0;
2171
- }
2172
- }
2173
- function it(t) {
2174
- return Ee(t);
2175
- }
2176
- const fn = V ? "metaKey" : "ctrlKey";
2177
- k.mousedown = (t, e) => {
2178
- let n = e;
2179
- t.input.shiftKey = n.shiftKey;
2180
- let o = it(t), i = Date.now(), s = "singleClick";
2181
- i - t.input.lastClick.time < 500 && To(n, t.input.lastClick) && !n[fn] && (t.input.lastClick.type == "singleClick" ? s = "doubleClick" : t.input.lastClick.type == "doubleClick" && (s = "tripleClick")), t.input.lastClick = { time: i, x: n.clientX, y: n.clientY, type: s };
2182
- let r = t.posAtCoords(Fe(n));
2183
- r && (s == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new Io(t, r, n, !!o)) : (s == "doubleClick" ? Vo : Ro)(t, r.pos, r.inside, n) ? n.preventDefault() : X(t, "pointer"));
2184
- };
2185
- class Io {
2186
- constructor(e, n, o, i) {
2187
- this.view = e, this.pos = n, this.event = o, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!o[fn], this.allowDefault = o.shiftKey;
2188
- let s, r;
2189
- if (n.inside > -1)
2190
- s = e.state.doc.nodeAt(n.inside), r = n.inside;
2191
- else {
2192
- let d = e.state.doc.resolve(n.pos);
2193
- s = d.parent, r = d.depth ? d.before() : 0;
2194
- }
2195
- const l = i ? null : o.target, a = l ? e.docView.nearestDesc(l, !0) : null;
2196
- this.target = a && a.dom.nodeType == 1 ? a.dom : null;
2197
- let { selection: c } = e.state;
2198
- (o.button == 0 && s.type.spec.draggable && s.type.spec.selectable !== !1 || c instanceof D && c.from <= r && c.to > r) && (this.mightDrag = {
2199
- node: s,
2200
- pos: r,
2201
- addAttr: !!(this.target && !this.target.draggable),
2202
- setUneditable: !!(this.target && F && !this.target.hasAttribute("contentEditable"))
2203
- }), this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable) && (this.view.domObserver.stop(), this.mightDrag.addAttr && (this.target.draggable = !0), this.mightDrag.setUneditable && setTimeout(() => {
2204
- this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
2205
- }, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), X(e, "pointer");
2206
- }
2207
- done() {
2208
- this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() => H(this.view)), this.view.input.mouseDown = null;
2209
- }
2210
- up(e) {
2211
- if (this.done(), !this.view.dom.contains(e.target))
2212
- return;
2213
- let n = this.pos;
2214
- this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Fe(e))), this.updateAllowDefault(e), this.allowDefault || !n ? X(this.view, "pointer") : Po(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
2215
- x && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
2216
- // cursor, but still report that the node is selected
2217
- // when asked through getSelection. You'll then get a
2218
- // situation where clicking at the point where that
2219
- // (hidden) cursor is doesn't change the selection, and
2220
- // thus doesn't get a reaction from ProseMirror. This
2221
- // works around that.
2222
- O && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (fe(this.view, he.near(this.view.state.doc.resolve(n.pos))), e.preventDefault()) : X(this.view, "pointer");
2223
- }
2224
- move(e) {
2225
- this.updateAllowDefault(e), X(this.view, "pointer"), e.buttons == 0 && this.done();
2226
- }
2227
- updateAllowDefault(e) {
2228
- !this.allowDefault && (Math.abs(this.event.x - e.clientX) > 4 || Math.abs(this.event.y - e.clientY) > 4) && (this.allowDefault = !0);
2229
- }
2230
- }
2231
- k.touchstart = (t) => {
2232
- t.input.lastTouch = Date.now(), it(t), X(t, "pointer");
2233
- };
2234
- k.touchmove = (t) => {
2235
- t.input.lastTouch = Date.now(), X(t, "pointer");
2236
- };
2237
- k.contextmenu = (t) => it(t);
2238
- function hn(t, e) {
2239
- return t.composing ? !0 : x && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
2240
- }
2241
- const Fo = K ? 5e3 : -1;
2242
- T.compositionstart = T.compositionupdate = (t) => {
2243
- if (!t.composing) {
2244
- t.domObserver.flush();
2245
- let { state: e } = t, n = e.selection.$to;
2246
- if (e.selection instanceof M && (e.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((o) => o.type.spec.inclusive === !1)))
2247
- t.markCursor = t.state.storedMarks || n.marks(), Ee(t, !0), t.markCursor = null;
2248
- else if (Ee(t, !e.selection.empty), F && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
2249
- let o = t.domSelectionRange();
2250
- for (let i = o.focusNode, s = o.focusOffset; i && i.nodeType == 1 && s != 0; ) {
2251
- let r = s < 0 ? i.lastChild : i.childNodes[s - 1];
2252
- if (!r)
2253
- break;
2254
- if (r.nodeType == 3) {
2255
- let l = t.domSelection();
2256
- l && l.collapse(r, r.nodeValue.length);
2257
- break;
2258
- } else
2259
- i = r, s = -1;
2260
- }
2261
- }
2262
- t.input.composing = !0;
2263
- }
2264
- un(t, Fo);
2265
- };
2266
- T.compositionend = (t, e) => {
2267
- t.composing && (t.input.composing = !1, t.input.compositionEndedAt = e.timeStamp, t.input.compositionPendingChanges = t.domObserver.pendingRecords().length ? t.input.compositionID : 0, t.input.compositionNode = null, t.input.compositionPendingChanges && Promise.resolve().then(() => t.domObserver.flush()), t.input.compositionID++, un(t, 20));
2268
- };
2269
- function un(t, e) {
2270
- clearTimeout(t.input.composingTimeout), e > -1 && (t.input.composingTimeout = setTimeout(() => Ee(t), e));
2271
- }
2272
- function pn(t) {
2273
- for (t.composing && (t.input.composing = !1, t.input.compositionEndedAt = Lo()); t.input.compositionNodes.length > 0; )
2274
- t.input.compositionNodes.pop().markParentsDirty();
2275
- }
2276
- function zo(t) {
2277
- let e = t.domSelectionRange();
2278
- if (!e.focusNode)
2279
- return null;
2280
- let n = Tn(e.focusNode, e.focusOffset), o = An(e.focusNode, e.focusOffset);
2281
- if (n && o && n != o) {
2282
- let i = o.pmViewDesc, s = t.domObserver.lastChangedTextNode;
2283
- if (n == s || o == s)
2284
- return s;
2285
- if (!i || !i.isText(o.nodeValue))
2286
- return o;
2287
- if (t.input.compositionNode == o) {
2288
- let r = n.pmViewDesc;
2289
- if (!(!r || !r.isText(n.nodeValue)))
2290
- return o;
2291
- }
2292
- }
2293
- return n || o;
2294
- }
2295
- function Lo() {
2296
- let t = document.createEvent("Event");
2297
- return t.initEvent("event", !0, !0), t.timeStamp;
2298
- }
2299
- function Ee(t, e = !1) {
2300
- if (!(K && t.domObserver.flushingSoon >= 0)) {
2301
- if (t.domObserver.forceFlush(), pn(t), e || t.docView && t.docView.dirty) {
2302
- let n = ve(t);
2303
- return n && !n.eq(t.state.selection) ? t.dispatch(t.state.tr.setSelection(n)) : (t.markCursor || e) && !t.state.selection.empty ? t.dispatch(t.state.tr.deleteSelection()) : t.updateState(t.state), !0;
2304
- }
2305
- return !1;
2306
- }
2307
- }
2308
- function $o(t, e) {
2309
- if (!t.dom.parentNode)
2310
- return;
2311
- let n = t.dom.parentNode.appendChild(document.createElement("div"));
2312
- n.appendChild(e), n.style.cssText = "position: fixed; left: -10000px; top: 10px";
2313
- let o = getSelection(), i = document.createRange();
2314
- i.selectNodeContents(e), t.dom.blur(), o.removeAllRanges(), o.addRange(i), setTimeout(() => {
2315
- n.parentNode && n.parentNode.removeChild(n), t.focus();
2316
- }, 50);
2317
- }
2318
- const De = A && Z < 15 || pe && Bn < 604;
2319
- k.copy = T.cut = (t, e) => {
2320
- let n = e, o = t.state.selection, i = n.type == "cut";
2321
- if (o.empty)
2322
- return;
2323
- let s = De ? null : n.clipboardData, r = o.content(), { dom: l, text: a } = tt(t, r);
2324
- s ? (n.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) : $o(t, l), i && t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
2325
- };
2326
- function qo(t) {
2327
- return t.openStart == 0 && t.openEnd == 0 && t.content.childCount == 1 ? t.content.firstChild : null;
2328
- }
2329
- function Ko(t, e) {
2330
- if (!t.dom.parentNode)
2331
- return;
2332
- let n = t.input.shiftKey || t.state.selection.$from.parent.type.spec.code, o = t.dom.parentNode.appendChild(document.createElement(n ? "textarea" : "div"));
2333
- n || (o.contentEditable = "true"), o.style.cssText = "position: fixed; left: -10000px; top: 10px", o.focus();
2334
- let i = t.input.shiftKey && t.input.lastKeyCode != 45;
2335
- setTimeout(() => {
2336
- t.focus(), o.parentNode && o.parentNode.removeChild(o), n ? Ne(t, o.value, null, i, e) : Ne(t, o.textContent, o.innerHTML, i, e);
2337
- }, 50);
2338
- }
2339
- function Ne(t, e, n, o, i) {
2340
- let s = sn(t, e, n, o, t.state.selection.$from);
2341
- if (t.someProp("handlePaste", (a) => a(t, i, s || J.empty)))
2342
- return !0;
2343
- if (!s)
2344
- return !1;
2345
- let r = qo(s), l = r ? t.state.tr.replaceSelectionWith(r, o) : t.state.tr.replaceSelection(s);
2346
- return t.dispatch(l.scrollIntoView().setMeta("paste", !0).setMeta("uiEvent", "paste")), !0;
2347
- }
2348
- function mn(t) {
2349
- let e = t.getData("text/plain") || t.getData("Text");
2350
- if (e)
2351
- return e;
2352
- let n = t.getData("text/uri-list");
2353
- return n ? n.replace(/\r?\n/g, " ") : "";
2354
- }
2355
- T.paste = (t, e) => {
2356
- let n = e;
2357
- if (t.composing && !K)
2358
- return;
2359
- let o = De ? null : n.clipboardData, i = t.input.shiftKey && t.input.lastKeyCode != 45;
2360
- o && Ne(t, mn(o), o.getData("text/html"), i, n) ? n.preventDefault() : Ko(t, n);
2361
- };
2362
- class gn {
2363
- constructor(e, n, o) {
2364
- this.slice = e, this.move = n, this.node = o;
2365
- }
2366
- }
2367
- const Ho = V ? "altKey" : "ctrlKey";
2368
- function yn(t, e) {
2369
- let n = t.someProp("dragCopies", (o) => !o(e));
2370
- return n ?? !e[Ho];
2371
- }
2372
- k.dragstart = (t, e) => {
2373
- let n = e, o = t.input.mouseDown;
2374
- if (o && o.done(), !n.dataTransfer)
2375
- return;
2376
- let i = t.state.selection, s = i.empty ? null : t.posAtCoords(Fe(n)), r;
2377
- if (!(s && s.pos >= i.from && s.pos <= (i instanceof D ? i.to - 1 : i.to))) {
2378
- if (o && o.mightDrag)
2379
- r = D.create(t.state.doc, o.mightDrag.pos);
2380
- else if (n.target && n.target.nodeType == 1) {
2381
- let f = t.docView.nearestDesc(n.target, !0);
2382
- f && f.node.type.spec.draggable && f != t.docView && (r = D.create(t.state.doc, f.posBefore));
2383
- }
2384
- }
2385
- let l = (r || t.state.selection).content(), { dom: a, text: c, slice: d } = tt(t, l);
2386
- (!n.dataTransfer.files.length || !O || Wt > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(De ? "Text" : "text/html", a.innerHTML), n.dataTransfer.effectAllowed = "copyMove", De || n.dataTransfer.setData("text/plain", c), t.dragging = new gn(d, yn(t, n), r);
2387
- };
2388
- k.dragend = (t) => {
2389
- let e = t.dragging;
2390
- window.setTimeout(() => {
2391
- t.dragging == e && (t.dragging = null);
2392
- }, 50);
2393
- };
2394
- T.dragover = T.dragenter = (t, e) => e.preventDefault();
2395
- T.drop = (t, e) => {
2396
- let n = e, o = t.dragging;
2397
- if (t.dragging = null, !n.dataTransfer)
2398
- return;
2399
- let i = t.posAtCoords(Fe(n));
2400
- if (!i)
2401
- return;
2402
- let s = t.state.doc.resolve(i.pos), r = o && o.slice;
2403
- r ? t.someProp("transformPasted", (h) => {
2404
- r = h(r, t);
2405
- }) : r = sn(t, mn(n.dataTransfer), De ? null : n.dataTransfer.getData("text/html"), !1, s);
2406
- let l = !!(o && yn(t, n));
2407
- if (t.someProp("handleDrop", (h) => h(t, n, r || J.empty, l))) {
2408
- n.preventDefault();
2409
- return;
2410
- }
2411
- if (!r)
2412
- return;
2413
- n.preventDefault();
2414
- let a = r ? Mn(t.state.doc, s.pos, r) : s.pos;
2415
- a == null && (a = s.pos);
2416
- let c = t.state.tr;
2417
- if (l) {
2418
- let { node: h } = o;
2419
- h ? h.replace(c) : c.deleteSelection();
2420
- }
2421
- let d = c.mapping.map(a), f = r.openStart == 0 && r.openEnd == 0 && r.content.childCount == 1, u = c.doc;
2422
- if (f ? c.replaceRangeWith(d, d, r.content.firstChild) : c.replaceRange(d, d, r), c.doc.eq(u))
2423
- return;
2424
- let p = c.doc.resolve(d);
2425
- if (f && D.isSelectable(r.content.firstChild) && p.nodeAfter && p.nodeAfter.sameMarkup(r.content.firstChild))
2426
- c.setSelection(new D(p));
2427
- else {
2428
- let h = c.mapping.map(a);
2429
- c.mapping.maps[c.mapping.maps.length - 1].forEach((g, m, y, E) => h = E), c.setSelection(et(t, p, c.doc.resolve(h)));
2430
- }
2431
- t.focus(), t.dispatch(c.setMeta("uiEvent", "drop"));
2432
- };
2433
- k.focus = (t) => {
2434
- t.input.lastFocus = Date.now(), t.focused || (t.domObserver.stop(), t.dom.classList.add("ProseMirror-focused"), t.domObserver.start(), t.focused = !0, setTimeout(() => {
2435
- t.docView && t.hasFocus() && !t.domObserver.currentSelection.eq(t.domSelectionRange()) && H(t);
2436
- }, 20));
2437
- };
2438
- k.blur = (t, e) => {
2439
- let n = e;
2440
- t.focused && (t.domObserver.stop(), t.dom.classList.remove("ProseMirror-focused"), t.domObserver.start(), n.relatedTarget && t.dom.contains(n.relatedTarget) && t.domObserver.currentSelection.clear(), t.focused = !1);
2441
- };
2442
- k.beforeinput = (t, e) => {
2443
- if (O && K && e.inputType == "deleteContentBackward") {
2444
- t.domObserver.flushSoon();
2445
- let { domChangeCount: o } = t.input;
2446
- setTimeout(() => {
2447
- if (t.input.domChangeCount != o || (t.dom.blur(), t.focus(), t.someProp("handleKeyDown", (s) => s(t, te(8, "Backspace")))))
2448
- return;
2449
- let { $cursor: i } = t.state.selection;
2450
- i && i.pos > 0 && t.dispatch(t.state.tr.delete(i.pos - 1, i.pos).scrollIntoView());
2451
- }, 50);
2452
- }
2453
- };
2454
- for (let t in T)
2455
- k[t] = T[t];
2456
- function Se(t, e) {
2457
- if (t == e)
2458
- return !0;
2459
- for (let n in t)
2460
- if (t[n] !== e[n])
2461
- return !1;
2462
- for (let n in e)
2463
- if (!(n in t))
2464
- return !1;
2465
- return !0;
2466
- }
2467
- class Pe {
2468
- constructor(e, n) {
2469
- this.toDOM = e, this.spec = n || ie, this.side = this.spec.side || 0;
2470
- }
2471
- map(e, n, o, i) {
2472
- let { pos: s, deleted: r } = e.mapResult(n.from + i, this.side < 0 ? -1 : 1);
2473
- return r ? null : new I(s - o, s - o, this);
2474
- }
2475
- valid() {
2476
- return !0;
2477
- }
2478
- eq(e) {
2479
- return this == e || e instanceof Pe && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && Se(this.spec, e.spec));
2480
- }
2481
- destroy(e) {
2482
- this.spec.destroy && this.spec.destroy(e);
2483
- }
2484
- }
2485
- class w {
2486
- constructor(e, n) {
2487
- this.attrs = e, this.spec = n || ie;
2488
- }
2489
- map(e, n, o, i) {
2490
- let s = e.map(n.from + i, this.spec.inclusiveStart ? -1 : 1) - o, r = e.map(n.to + i, this.spec.inclusiveEnd ? 1 : -1) - o;
2491
- return s >= r ? null : new I(s, r, this);
2492
- }
2493
- valid(e, n) {
2494
- return n.from < n.to;
2495
- }
2496
- eq(e) {
2497
- return this == e || e instanceof w && Se(this.attrs, e.attrs) && Se(this.spec, e.spec);
2498
- }
2499
- static is(e) {
2500
- return e.type instanceof w;
2501
- }
2502
- destroy() {
2503
- }
2504
- }
2505
- class st {
2506
- constructor(e, n) {
2507
- this.attrs = e, this.spec = n || ie;
2508
- }
2509
- map(e, n, o, i) {
2510
- let s = e.mapResult(n.from + i, 1);
2511
- if (s.deleted)
2512
- return null;
2513
- let r = e.mapResult(n.to + i, -1);
2514
- return r.deleted || r.pos <= s.pos ? null : new I(s.pos - o, r.pos - o, this);
2515
- }
2516
- valid(e, n) {
2517
- let { index: o, offset: i } = e.content.findIndex(n.from), s;
2518
- return i == n.from && !(s = e.child(o)).isText && i + s.nodeSize == n.to;
2519
- }
2520
- eq(e) {
2521
- return this == e || e instanceof st && Se(this.attrs, e.attrs) && Se(this.spec, e.spec);
2522
- }
2523
- destroy() {
2524
- }
2525
- }
2526
- class I {
2527
- /**
2528
- @internal
2529
- */
2530
- constructor(e, n, o) {
2531
- this.from = e, this.to = n, this.type = o;
2532
- }
2533
- /**
2534
- @internal
2535
- */
2536
- copy(e, n) {
2537
- return new I(e, n, this.type);
2538
- }
2539
- /**
2540
- @internal
2541
- */
2542
- eq(e, n = 0) {
2543
- return this.type.eq(e.type) && this.from + n == e.from && this.to + n == e.to;
2544
- }
2545
- /**
2546
- @internal
2547
- */
2548
- map(e, n, o) {
2549
- return this.type.map(e, this, n, o);
2550
- }
2551
- /**
2552
- Creates a widget decoration, which is a DOM node that's shown in
2553
- the document at the given position. It is recommended that you
2554
- delay rendering the widget by passing a function that will be
2555
- called when the widget is actually drawn in a view, but you can
2556
- also directly pass a DOM node. `getPos` can be used to find the
2557
- widget's current document position.
2558
- */
2559
- static widget(e, n, o) {
2560
- return new I(e, e, new Pe(n, o));
2561
- }
2562
- /**
2563
- Creates an inline decoration, which adds the given attributes to
2564
- each inline node between `from` and `to`.
2565
- */
2566
- static inline(e, n, o, i) {
2567
- return new I(e, n, new w(o, i));
2568
- }
2569
- /**
2570
- Creates a node decoration. `from` and `to` should point precisely
2571
- before and after a node in the document. That node, and only that
2572
- node, will receive the given attributes.
2573
- */
2574
- static node(e, n, o, i) {
2575
- return new I(e, n, new st(o, i));
2576
- }
2577
- /**
2578
- The spec provided when creating this decoration. Can be useful
2579
- if you've stored extra information in that object.
2580
- */
2581
- get spec() {
2582
- return this.type.spec;
2583
- }
2584
- /**
2585
- @internal
2586
- */
2587
- get inline() {
2588
- return this.type instanceof w;
2589
- }
2590
- /**
2591
- @internal
2592
- */
2593
- get widget() {
2594
- return this.type instanceof Pe;
2595
- }
2596
- }
2597
- const de = [], ie = {};
2598
- class N {
2599
- /**
2600
- @internal
2601
- */
2602
- constructor(e, n) {
2603
- this.local = e.length ? e : de, this.children = n.length ? n : de;
2604
- }
2605
- /**
2606
- Create a set of decorations, using the structure of the given
2607
- document. This will consume (modify) the `decorations` array, so
2608
- you must make a copy if you want need to preserve that.
2609
- */
2610
- static create(e, n) {
2611
- return n.length ? Ve(n, e, 0, ie) : C;
2612
- }
2613
- /**
2614
- Find all decorations in this set which touch the given range
2615
- (including decorations that start or end directly at the
2616
- boundaries) and match the given predicate on their spec. When
2617
- `start` and `end` are omitted, all decorations in the set are
2618
- considered. When `predicate` isn't given, all decorations are
2619
- assumed to match.
2620
- */
2621
- find(e, n, o) {
2622
- let i = [];
2623
- return this.findInner(e ?? 0, n ?? 1e9, i, 0, o), i;
2624
- }
2625
- findInner(e, n, o, i, s) {
2626
- for (let r = 0; r < this.local.length; r++) {
2627
- let l = this.local[r];
2628
- l.from <= n && l.to >= e && (!s || s(l.spec)) && o.push(l.copy(l.from + i, l.to + i));
2629
- }
2630
- for (let r = 0; r < this.children.length; r += 3)
2631
- if (this.children[r] < n && this.children[r + 1] > e) {
2632
- let l = this.children[r] + 1;
2633
- this.children[r + 2].findInner(e - l, n - l, o, i + l, s);
2634
- }
2635
- }
2636
- /**
2637
- Map the set of decorations in response to a change in the
2638
- document.
2639
- */
2640
- map(e, n, o) {
2641
- return this == C || e.maps.length == 0 ? this : this.mapInner(e, n, 0, 0, o || ie);
2642
- }
2643
- /**
2644
- @internal
2645
- */
2646
- mapInner(e, n, o, i, s) {
2647
- let r;
2648
- for (let l = 0; l < this.local.length; l++) {
2649
- let a = this.local[l].map(e, o, i);
2650
- a && a.type.valid(n, a) ? (r || (r = [])).push(a) : s.onRemove && s.onRemove(this.local[l].spec);
2651
- }
2652
- return this.children.length ? Wo(this.children, r || [], e, n, o, i, s) : r ? new N(r.sort(se), de) : C;
2653
- }
2654
- /**
2655
- Add the given array of decorations to the ones in the set,
2656
- producing a new set. Consumes the `decorations` array. Needs
2657
- access to the current document to create the appropriate tree
2658
- structure.
2659
- */
2660
- add(e, n) {
2661
- return n.length ? this == C ? N.create(e, n) : this.addInner(e, n, 0) : this;
2662
- }
2663
- addInner(e, n, o) {
2664
- let i, s = 0;
2665
- e.forEach((l, a) => {
2666
- let c = a + o, d;
2667
- if (d = Dn(n, l, c)) {
2668
- for (i || (i = this.children.slice()); s < i.length && i[s] < a; )
2669
- s += 3;
2670
- i[s] == a ? i[s + 2] = i[s + 2].addInner(l, d, c + 1) : i.splice(s, 0, a, a + l.nodeSize, Ve(d, l, c + 1, ie)), s += 3;
2671
- }
2672
- });
2673
- let r = bn(s ? Nn(n) : n, -o);
2674
- for (let l = 0; l < r.length; l++)
2675
- r[l].type.valid(e, r[l]) || r.splice(l--, 1);
2676
- return new N(r.length ? this.local.concat(r).sort(se) : this.local, i || this.children);
2677
- }
2678
- /**
2679
- Create a new set that contains the decorations in this set, minus
2680
- the ones in the given array.
2681
- */
2682
- remove(e) {
2683
- return e.length == 0 || this == C ? this : this.removeInner(e, 0);
2684
- }
2685
- removeInner(e, n) {
2686
- let o = this.children, i = this.local;
2687
- for (let s = 0; s < o.length; s += 3) {
2688
- let r, l = o[s] + n, a = o[s + 1] + n;
2689
- for (let d = 0, f; d < e.length; d++)
2690
- (f = e[d]) && f.from > l && f.to < a && (e[d] = null, (r || (r = [])).push(f));
2691
- if (!r)
2692
- continue;
2693
- o == this.children && (o = this.children.slice());
2694
- let c = o[s + 2].removeInner(r, l + 1);
2695
- c != C ? o[s + 2] = c : (o.splice(s, 3), s -= 3);
2696
- }
2697
- if (i.length) {
2698
- for (let s = 0, r; s < e.length; s++)
2699
- if (r = e[s])
2700
- for (let l = 0; l < i.length; l++)
2701
- i[l].eq(r, n) && (i == this.local && (i = this.local.slice()), i.splice(l--, 1));
2702
- }
2703
- return o == this.children && i == this.local ? this : i.length || o.length ? new N(i, o) : C;
2704
- }
2705
- forChild(e, n) {
2706
- if (this == C)
2707
- return this;
2708
- if (n.isLeaf)
2709
- return N.empty;
2710
- let o, i;
2711
- for (let l = 0; l < this.children.length; l += 3)
2712
- if (this.children[l] >= e) {
2713
- this.children[l] == e && (o = this.children[l + 2]);
2714
- break;
2715
- }
2716
- let s = e + 1, r = s + n.content.size;
2717
- for (let l = 0; l < this.local.length; l++) {
2718
- let a = this.local[l];
2719
- if (a.from < r && a.to > s && a.type instanceof w) {
2720
- let c = Math.max(s, a.from) - s, d = Math.min(r, a.to) - s;
2721
- c < d && (i || (i = [])).push(a.copy(c, d));
2722
- }
2723
- }
2724
- if (i) {
2725
- let l = new N(i.sort(se), de);
2726
- return o ? new G([l, o]) : l;
2727
- }
2728
- return o || C;
2729
- }
2730
- /**
2731
- @internal
2732
- */
2733
- eq(e) {
2734
- if (this == e)
2735
- return !0;
2736
- if (!(e instanceof N) || this.local.length != e.local.length || this.children.length != e.children.length)
2737
- return !1;
2738
- for (let n = 0; n < this.local.length; n++)
2739
- if (!this.local[n].eq(e.local[n]))
2740
- return !1;
2741
- for (let n = 0; n < this.children.length; n += 3)
2742
- if (this.children[n] != e.children[n] || this.children[n + 1] != e.children[n + 1] || !this.children[n + 2].eq(e.children[n + 2]))
2743
- return !1;
2744
- return !0;
2745
- }
2746
- /**
2747
- @internal
2748
- */
2749
- locals(e) {
2750
- return rt(this.localsInner(e));
2751
- }
2752
- /**
2753
- @internal
2754
- */
2755
- localsInner(e) {
2756
- if (this == C)
2757
- return de;
2758
- if (e.inlineContent || !this.local.some(w.is))
2759
- return this.local;
2760
- let n = [];
2761
- for (let o = 0; o < this.local.length; o++)
2762
- this.local[o].type instanceof w || n.push(this.local[o]);
2763
- return n;
2764
- }
2765
- forEachSet(e) {
2766
- e(this);
2767
- }
2768
- }
2769
- N.empty = new N([], []);
2770
- N.removeOverlap = rt;
2771
- const C = N.empty;
2772
- class G {
2773
- constructor(e) {
2774
- this.members = e;
2775
- }
2776
- map(e, n) {
2777
- const o = this.members.map((i) => i.map(e, n, ie));
2778
- return G.from(o);
2779
- }
2780
- forChild(e, n) {
2781
- if (n.isLeaf)
2782
- return N.empty;
2783
- let o = [];
2784
- for (let i = 0; i < this.members.length; i++) {
2785
- let s = this.members[i].forChild(e, n);
2786
- s != C && (s instanceof G ? o = o.concat(s.members) : o.push(s));
2787
- }
2788
- return G.from(o);
2789
- }
2790
- eq(e) {
2791
- if (!(e instanceof G) || e.members.length != this.members.length)
2792
- return !1;
2793
- for (let n = 0; n < this.members.length; n++)
2794
- if (!this.members[n].eq(e.members[n]))
2795
- return !1;
2796
- return !0;
2797
- }
2798
- locals(e) {
2799
- let n, o = !0;
2800
- for (let i = 0; i < this.members.length; i++) {
2801
- let s = this.members[i].localsInner(e);
2802
- if (s.length)
2803
- if (!n)
2804
- n = s;
2805
- else {
2806
- o && (n = n.slice(), o = !1);
2807
- for (let r = 0; r < s.length; r++)
2808
- n.push(s[r]);
2809
- }
2810
- }
2811
- return n ? rt(o ? n : n.sort(se)) : de;
2812
- }
2813
- // Create a group for the given array of decoration sets, or return
2814
- // a single set when possible.
2815
- static from(e) {
2816
- switch (e.length) {
2817
- case 0:
2818
- return C;
2819
- case 1:
2820
- return e[0];
2821
- default:
2822
- return new G(e.every((n) => n instanceof N) ? e : e.reduce((n, o) => n.concat(o instanceof N ? o : o.members), []));
2823
- }
2824
- }
2825
- forEachSet(e) {
2826
- for (let n = 0; n < this.members.length; n++)
2827
- this.members[n].forEachSet(e);
2828
- }
2829
- }
2830
- function Wo(t, e, n, o, i, s, r) {
2831
- let l = t.slice();
2832
- for (let c = 0, d = s; c < n.maps.length; c++) {
2833
- let f = 0;
2834
- n.maps[c].forEach((u, p, h, g) => {
2835
- let m = g - h - (p - u);
2836
- for (let y = 0; y < l.length; y += 3) {
2837
- let E = l[y + 1];
2838
- if (E < 0 || u > E + d - f)
2839
- continue;
2840
- let me = l[y] + d - f;
2841
- p >= me ? l[y + 1] = u <= me ? -2 : -1 : u >= d && m && (l[y] += m, l[y + 1] += m);
2842
- }
2843
- f += m;
2844
- }), d = n.maps[c].map(d, -1);
2845
- }
2846
- let a = !1;
2847
- for (let c = 0; c < l.length; c += 3)
2848
- if (l[c + 1] < 0) {
2849
- if (l[c + 1] == -2) {
2850
- a = !0, l[c + 1] = -1;
2851
- continue;
2852
- }
2853
- let d = n.map(t[c] + s), f = d - i;
2854
- if (f < 0 || f >= o.content.size) {
2855
- a = !0;
2856
- continue;
2857
- }
2858
- let u = n.map(t[c + 1] + s, -1), p = u - i, { index: h, offset: g } = o.content.findIndex(f), m = o.maybeChild(h);
2859
- if (m && g == f && g + m.nodeSize == p) {
2860
- let y = l[c + 2].mapInner(n, m, d + 1, t[c] + s + 1, r);
2861
- y != C ? (l[c] = f, l[c + 1] = p, l[c + 2] = y) : (l[c + 1] = -2, a = !0);
2862
- } else
2863
- a = !0;
2864
- }
2865
- if (a) {
2866
- let c = _o(l, t, e, n, i, s, r), d = Ve(c, o, 0, r);
2867
- e = d.local;
2868
- for (let f = 0; f < l.length; f += 3)
2869
- l[f + 1] < 0 && (l.splice(f, 3), f -= 3);
2870
- for (let f = 0, u = 0; f < d.children.length; f += 3) {
2871
- let p = d.children[f];
2872
- for (; u < l.length && l[u] < p; )
2873
- u += 3;
2874
- l.splice(u, 0, d.children[f], d.children[f + 1], d.children[f + 2]);
2875
- }
2876
- }
2877
- return new N(e.sort(se), l);
2878
- }
2879
- function bn(t, e) {
2880
- if (!e || !t.length)
2881
- return t;
2882
- let n = [];
2883
- for (let o = 0; o < t.length; o++) {
2884
- let i = t[o];
2885
- n.push(new I(i.from + e, i.to + e, i.type));
2886
- }
2887
- return n;
2888
- }
2889
- function _o(t, e, n, o, i, s, r) {
2890
- function l(a, c) {
2891
- for (let d = 0; d < a.local.length; d++) {
2892
- let f = a.local[d].map(o, i, c);
2893
- f ? n.push(f) : r.onRemove && r.onRemove(a.local[d].spec);
2894
- }
2895
- for (let d = 0; d < a.children.length; d += 3)
2896
- l(a.children[d + 2], a.children[d] + c + 1);
2897
- }
2898
- for (let a = 0; a < t.length; a += 3)
2899
- t[a + 1] == -1 && l(t[a + 2], e[a] + s + 1);
2900
- return n;
2901
- }
2902
- function Dn(t, e, n) {
2903
- if (e.isLeaf)
2904
- return null;
2905
- let o = n + e.nodeSize, i = null;
2906
- for (let s = 0, r; s < t.length; s++)
2907
- (r = t[s]) && r.from > n && r.to < o && ((i || (i = [])).push(r), t[s] = null);
2908
- return i;
2909
- }
2910
- function Nn(t) {
2911
- let e = [];
2912
- for (let n = 0; n < t.length; n++)
2913
- t[n] != null && e.push(t[n]);
2914
- return e;
2915
- }
2916
- function Ve(t, e, n, o) {
2917
- let i = [], s = !1;
2918
- e.forEach((l, a) => {
2919
- let c = Dn(t, l, a + n);
2920
- if (c) {
2921
- s = !0;
2922
- let d = Ve(c, l, n + a + 1, o);
2923
- d != C && i.push(a, a + l.nodeSize, d);
2924
- }
2925
- });
2926
- let r = bn(s ? Nn(t) : t, -n).sort(se);
2927
- for (let l = 0; l < r.length; l++)
2928
- r[l].type.valid(e, r[l]) || (o.onRemove && o.onRemove(r[l].spec), r.splice(l--, 1));
2929
- return r.length || i.length ? new N(r, i) : C;
2930
- }
2931
- function se(t, e) {
2932
- return t.from - e.from || t.to - e.to;
2933
- }
2934
- function rt(t) {
2935
- let e = t;
2936
- for (let n = 0; n < e.length - 1; n++) {
2937
- let o = e[n];
2938
- if (o.from != o.to)
2939
- for (let i = n + 1; i < e.length; i++) {
2940
- let s = e[i];
2941
- if (s.from == o.from) {
2942
- s.to != o.to && (e == t && (e = t.slice()), e[i] = s.copy(s.from, o.to), Et(e, i + 1, s.copy(o.to, s.to)));
2943
- continue;
2944
- } else {
2945
- s.from < o.to && (e == t && (e = t.slice()), e[n] = o.copy(o.from, s.from), Et(e, i, o.copy(s.from, o.to)));
2946
- break;
2947
- }
2948
- }
2949
- }
2950
- return e;
2951
- }
2952
- function Et(t, e, n) {
2953
- for (; e < t.length && se(n, t[e]) > 0; )
2954
- e++;
2955
- t.splice(e, 0, n);
2956
- }
2957
- function Ke(t) {
2958
- let e = [];
2959
- return t.someProp("decorations", (n) => {
2960
- let o = n(t.state);
2961
- o && o != C && e.push(o);
2962
- }), t.cursorWrapper && e.push(N.create(t.state.doc, [t.cursorWrapper.deco])), G.from(e);
2963
- }
2964
- const jo = {
2965
- childList: !0,
2966
- characterData: !0,
2967
- characterDataOldValue: !0,
2968
- attributes: !0,
2969
- attributeOldValue: !0,
2970
- subtree: !0
2971
- }, Uo = A && Z <= 11;
2972
- class Yo {
2973
- constructor() {
2974
- this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
2975
- }
2976
- set(e) {
2977
- this.anchorNode = e.anchorNode, this.anchorOffset = e.anchorOffset, this.focusNode = e.focusNode, this.focusOffset = e.focusOffset;
2978
- }
2979
- clear() {
2980
- this.anchorNode = this.focusNode = null;
2981
- }
2982
- eq(e) {
2983
- return e.anchorNode == this.anchorNode && e.anchorOffset == this.anchorOffset && e.focusNode == this.focusNode && e.focusOffset == this.focusOffset;
2984
- }
2985
- }
2986
- class Go {
2987
- constructor(e, n) {
2988
- this.view = e, this.handleDOMChange = n, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new Yo(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((o) => {
2989
- for (let i = 0; i < o.length; i++)
2990
- this.queue.push(o[i]);
2991
- A && Z <= 11 && o.some((i) => i.type == "childList" && i.removedNodes.length || i.type == "characterData" && i.oldValue.length > i.target.nodeValue.length) ? this.flushSoon() : this.flush();
2992
- }), Uo && (this.onCharData = (o) => {
2993
- this.queue.push({ target: o.target, type: "characterData", oldValue: o.prevValue }), this.flushSoon();
2994
- }), this.onSelectionChange = this.onSelectionChange.bind(this);
2995
- }
2996
- flushSoon() {
2997
- this.flushingSoon < 0 && (this.flushingSoon = window.setTimeout(() => {
2998
- this.flushingSoon = -1, this.flush();
2999
- }, 20));
3000
- }
3001
- forceFlush() {
3002
- this.flushingSoon > -1 && (window.clearTimeout(this.flushingSoon), this.flushingSoon = -1, this.flush());
3003
- }
3004
- start() {
3005
- this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom, jo)), this.onCharData && this.view.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.connectSelection();
3006
- }
3007
- stop() {
3008
- if (this.observer) {
3009
- let e = this.observer.takeRecords();
3010
- if (e.length) {
3011
- for (let n = 0; n < e.length; n++)
3012
- this.queue.push(e[n]);
3013
- window.setTimeout(() => this.flush(), 20);
3014
- }
3015
- this.observer.disconnect();
3016
- }
3017
- this.onCharData && this.view.dom.removeEventListener("DOMCharacterDataModified", this.onCharData), this.disconnectSelection();
3018
- }
3019
- connectSelection() {
3020
- this.view.dom.ownerDocument.addEventListener("selectionchange", this.onSelectionChange);
3021
- }
3022
- disconnectSelection() {
3023
- this.view.dom.ownerDocument.removeEventListener("selectionchange", this.onSelectionChange);
3024
- }
3025
- suppressSelectionUpdates() {
3026
- this.suppressingSelectionUpdates = !0, setTimeout(() => this.suppressingSelectionUpdates = !1, 50);
3027
- }
3028
- onSelectionChange() {
3029
- if (St(this.view)) {
3030
- if (this.suppressingSelectionUpdates)
3031
- return H(this.view);
3032
- if (A && Z <= 11 && !this.view.state.selection.empty) {
3033
- let e = this.view.domSelectionRange();
3034
- if (e.focusNode && re(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
3035
- return this.flushSoon();
3036
- }
3037
- this.flush();
3038
- }
3039
- }
3040
- setCurSelection() {
3041
- this.currentSelection.set(this.view.domSelectionRange());
3042
- }
3043
- ignoreSelectionChange(e) {
3044
- if (!e.focusNode)
3045
- return !0;
3046
- let n = /* @__PURE__ */ new Set(), o;
3047
- for (let s = e.focusNode; s; s = ue(s))
3048
- n.add(s);
3049
- for (let s = e.anchorNode; s; s = ue(s))
3050
- if (n.has(s)) {
3051
- o = s;
3052
- break;
3053
- }
3054
- let i = o && this.view.docView.nearestDesc(o);
3055
- if (i && i.ignoreMutation({
3056
- type: "selection",
3057
- target: o.nodeType == 3 ? o.parentNode : o
3058
- }))
3059
- return this.setCurSelection(), !0;
3060
- }
3061
- pendingRecords() {
3062
- if (this.observer)
3063
- for (let e of this.observer.takeRecords())
3064
- this.queue.push(e);
3065
- return this.queue;
3066
- }
3067
- flush() {
3068
- let { view: e } = this;
3069
- if (!e.docView || this.flushingSoon > -1)
3070
- return;
3071
- let n = this.pendingRecords();
3072
- n.length && (this.queue = []);
3073
- let o = e.domSelectionRange(), i = !this.suppressingSelectionUpdates && !this.currentSelection.eq(o) && St(e) && !this.ignoreSelectionChange(o), s = -1, r = -1, l = !1, a = [];
3074
- if (e.editable)
3075
- for (let d = 0; d < n.length; d++) {
3076
- let f = this.registerMutation(n[d], a);
3077
- f && (s = s < 0 ? f.from : Math.min(f.from, s), r = r < 0 ? f.to : Math.max(f.to, r), f.typeOver && (l = !0));
3078
- }
3079
- if (F && a.length) {
3080
- let d = a.filter((f) => f.nodeName == "BR");
3081
- if (d.length == 2) {
3082
- let [f, u] = d;
3083
- f.parentNode && f.parentNode.parentNode == u.parentNode ? u.remove() : f.remove();
3084
- } else {
3085
- let { focusNode: f } = this.currentSelection;
3086
- for (let u of d) {
3087
- let p = u.parentNode;
3088
- p && p.nodeName == "LI" && (!f || Zo(e, f) != p) && u.remove();
3089
- }
3090
- }
3091
- }
3092
- let c = null;
3093
- s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Be(o) && (c = ve(e)) && c.eq(he.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, H(e), this.currentSelection.set(o), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, r), Xo(e)), this.handleDOMChange(s, r, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(o) || H(e), this.currentSelection.set(o));
3094
- }
3095
- registerMutation(e, n) {
3096
- if (n.indexOf(e.target) > -1)
3097
- return null;
3098
- let o = this.view.docView.nearestDesc(e.target);
3099
- if (e.type == "attributes" && (o == this.view.docView || e.attributeName == "contenteditable" || // Firefox sometimes fires spurious events for null/empty styles
3100
- e.attributeName == "style" && !e.oldValue && !e.target.getAttribute("style")) || !o || o.ignoreMutation(e))
3101
- return null;
3102
- if (e.type == "childList") {
3103
- for (let d = 0; d < e.addedNodes.length; d++) {
3104
- let f = e.addedNodes[d];
3105
- n.push(f), f.nodeType == 3 && (this.lastChangedTextNode = f);
3106
- }
3107
- if (o.contentDOM && o.contentDOM != o.dom && !o.contentDOM.contains(e.target))
3108
- return { from: o.posBefore, to: o.posAfter };
3109
- let i = e.previousSibling, s = e.nextSibling;
3110
- if (A && Z <= 11 && e.addedNodes.length)
3111
- for (let d = 0; d < e.addedNodes.length; d++) {
3112
- let { previousSibling: f, nextSibling: u } = e.addedNodes[d];
3113
- (!f || Array.prototype.indexOf.call(e.addedNodes, f) < 0) && (i = f), (!u || Array.prototype.indexOf.call(e.addedNodes, u) < 0) && (s = u);
3114
- }
3115
- let r = i && i.parentNode == e.target ? S(i) + 1 : 0, l = o.localPosFromDOM(e.target, r, -1), a = s && s.parentNode == e.target ? S(s) : e.target.childNodes.length, c = o.localPosFromDOM(e.target, a, 1);
3116
- return { from: l, to: c };
3117
- } else return e.type == "attributes" ? { from: o.posAtStart - o.border, to: o.posAtEnd + o.border } : (this.lastChangedTextNode = e.target, {
3118
- from: o.posAtStart,
3119
- to: o.posAtEnd,
3120
- // An event was generated for a text change that didn't change
3121
- // any text. Mark the dom change to fall back to assuming the
3122
- // selection was typed over with an identical value if it can't
3123
- // find another change.
3124
- typeOver: e.target.nodeValue == e.oldValue
3125
- });
3126
- }
3127
- }
3128
- let Pt = /* @__PURE__ */ new WeakMap(), Vt = !1;
3129
- function Xo(t) {
3130
- if (!Pt.has(t) && (Pt.set(t, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace) !== -1)) {
3131
- if (t.requiresGeckoHackNode = F, Vt)
3132
- return;
3133
- console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), Vt = !0;
3134
- }
3135
- }
3136
- function Rt(t, e) {
3137
- let n = e.startContainer, o = e.startOffset, i = e.endContainer, s = e.endOffset, r = t.domAtPos(t.state.selection.anchor);
3138
- return re(r.node, r.offset, i, s) && ([n, o, i, s] = [i, s, n, o]), { anchorNode: n, anchorOffset: o, focusNode: i, focusOffset: s };
3139
- }
3140
- function Jo(t, e) {
3141
- if (e.getComposedRanges) {
3142
- let i = e.getComposedRanges(t.root)[0];
3143
- if (i)
3144
- return Rt(t, i);
3145
- }
3146
- let n;
3147
- function o(i) {
3148
- i.preventDefault(), i.stopImmediatePropagation(), n = i.getTargetRanges()[0];
3149
- }
3150
- return t.dom.addEventListener("beforeinput", o, !0), document.execCommand("indent"), t.dom.removeEventListener("beforeinput", o, !0), n ? Rt(t, n) : null;
3151
- }
3152
- function Zo(t, e) {
3153
- for (let n = e.parentNode; n && n != t.dom; n = n.parentNode) {
3154
- let o = t.docView.nearestDesc(n, !0);
3155
- if (o && o.node.isBlock)
3156
- return n;
3157
- }
3158
- return null;
3159
- }
3160
- function Qo(t, e, n) {
3161
- let { node: o, fromOffset: i, toOffset: s, from: r, to: l } = t.docView.parseRange(e, n), a = t.domSelectionRange(), c, d = a.anchorNode;
3162
- if (d && t.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], Be(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), O && t.input.lastKeyCode === 8)
3163
- for (let m = s; m > i; m--) {
3164
- let y = o.childNodes[m - 1], E = y.pmViewDesc;
3165
- if (y.nodeName == "BR" && !E) {
3166
- s = m;
3167
- break;
3168
- }
3169
- if (!E || E.size)
3170
- break;
3171
- }
3172
- let f = t.state.doc, u = t.someProp("domParser") || Kt.fromSchema(t.state.schema), p = f.resolve(r), h = null, g = u.parse(o, {
3173
- topNode: p.parent,
3174
- topMatch: p.parent.contentMatchAt(p.index()),
3175
- topOpen: !0,
3176
- from: i,
3177
- to: s,
3178
- preserveWhitespace: p.parent.type.whitespace == "pre" ? "full" : !0,
3179
- findPositions: c,
3180
- ruleFromNode: wo,
3181
- context: p
3182
- });
3183
- if (c && c[0].pos != null) {
3184
- let m = c[0].pos, y = c[1] && c[1].pos;
3185
- y == null && (y = m), h = { anchor: m + r, head: y + r };
3186
- }
3187
- return { doc: g, sel: h, from: r, to: l };
3188
- }
3189
- function wo(t) {
3190
- let e = t.pmViewDesc;
3191
- if (e)
3192
- return e.parseRule();
3193
- if (t.nodeName == "BR" && t.parentNode) {
3194
- if (x && /^(ul|ol)$/i.test(t.parentNode.nodeName)) {
3195
- let n = document.createElement("div");
3196
- return n.appendChild(document.createElement("li")), { skip: n };
3197
- } else if (t.parentNode.lastChild == t || x && /^(tr|table)$/i.test(t.parentNode.nodeName))
3198
- return { ignore: !0 };
3199
- } else if (t.nodeName == "IMG" && t.getAttribute("mark-placeholder"))
3200
- return { ignore: !0 };
3201
- return null;
3202
- }
3203
- const vo = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
3204
- function ei(t, e, n, o, i) {
3205
- let s = t.input.compositionPendingChanges || (t.composing ? t.input.compositionID : 0);
3206
- if (t.input.compositionPendingChanges = 0, e < 0) {
3207
- let b = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, j = ve(t, b);
3208
- if (j && !t.state.selection.eq(j)) {
3209
- if (O && K && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (Sn) => Sn(t, te(13, "Enter"))))
3210
- return;
3211
- let ke = t.state.tr.setSelection(j);
3212
- b == "pointer" ? ke.setMeta("pointer", !0) : b == "key" && ke.scrollIntoView(), s && ke.setMeta("composition", s), t.dispatch(ke);
3213
- }
3214
- return;
3215
- }
3216
- let r = t.state.doc.resolve(e), l = r.sharedDepth(n);
3217
- e = r.before(l + 1), n = t.state.doc.resolve(n).after(l + 1);
3218
- let a = t.state.selection, c = Qo(t, e, n), d = t.state.doc, f = d.slice(c.from, c.to), u, p;
3219
- t.input.lastKeyCode === 8 && Date.now() - 100 < t.input.lastKeyCodeTime ? (u = t.state.selection.to, p = "end") : (u = t.state.selection.from, p = "start"), t.input.lastKeyCode = null;
3220
- let h = oi(f.content, c.doc.content, c.from, u, p);
3221
- if (h && t.input.domChangeCount++, (pe && t.input.lastIOSEnter > Date.now() - 225 || K) && i.some((b) => b.nodeType == 1 && !vo.test(b.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (b) => b(t, te(13, "Enter")))) {
3222
- t.input.lastIOSEnter = 0;
3223
- return;
3224
- }
3225
- if (!h)
3226
- if (o && a instanceof M && !a.empty && a.$head.sameParent(a.$anchor) && !t.composing && !(c.sel && c.sel.anchor != c.sel.head))
3227
- h = { start: a.from, endA: a.to, endB: a.to };
3228
- else {
3229
- if (c.sel) {
3230
- let b = Bt(t, t.state.doc, c.sel);
3231
- if (b && !b.eq(t.state.selection)) {
3232
- let j = t.state.tr.setSelection(b);
3233
- s && j.setMeta("composition", s), t.dispatch(j);
3234
- }
3235
- }
3236
- return;
3237
- }
3238
- t.state.selection.from < t.state.selection.to && h.start == h.endB && t.state.selection instanceof M && (h.start > t.state.selection.from && h.start <= t.state.selection.from + 2 && t.state.selection.from >= c.from ? h.start = t.state.selection.from : h.endA < t.state.selection.to && h.endA >= t.state.selection.to - 2 && t.state.selection.to <= c.to && (h.endB += t.state.selection.to - h.endA, h.endA = t.state.selection.to)), A && Z <= 11 && h.endB == h.start + 1 && h.endA == h.start && h.start > c.from && c.doc.textBetween(h.start - c.from - 1, h.start - c.from + 1) == "  " && (h.start--, h.endA--, h.endB--);
3239
- let g = c.doc.resolveNoCache(h.start - c.from), m = c.doc.resolveNoCache(h.endB - c.from), y = d.resolve(h.start), E = g.sameParent(m) && g.parent.inlineContent && y.end() >= h.endA, me;
3240
- if ((pe && t.input.lastIOSEnter > Date.now() - 225 && (!E || i.some((b) => b.nodeName == "DIV" || b.nodeName == "P")) || !E && g.pos < c.doc.content.size && (!g.sameParent(m) || !g.parent.inlineContent) && !/\S/.test(c.doc.textBetween(g.pos, m.pos, "", "")) && (me = he.findFrom(c.doc.resolve(g.pos + 1), 1, !0)) && me.head > g.pos) && t.someProp("handleKeyDown", (b) => b(t, te(13, "Enter")))) {
3241
- t.input.lastIOSEnter = 0;
3242
- return;
3243
- }
3244
- if (t.state.selection.anchor > h.start && ni(d, h.start, h.endA, g, m) && t.someProp("handleKeyDown", (b) => b(t, te(8, "Backspace")))) {
3245
- K && O && t.domObserver.suppressSelectionUpdates();
3246
- return;
3247
- }
3248
- O && h.endB == h.start && (t.input.lastChromeDelete = Date.now()), K && !E && g.start() != m.start() && m.parentOffset == 0 && g.depth == m.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == h.endA && (h.endB -= 2, m = c.doc.resolveNoCache(h.endB - c.from), setTimeout(() => {
3249
- t.someProp("handleKeyDown", function(b) {
3250
- return b(t, te(13, "Enter"));
3251
- });
3252
- }, 20));
3253
- let _ = h.start, ee = h.endA, P, ze, xe;
3254
- if (E) {
3255
- if (g.pos == m.pos)
3256
- A && Z <= 11 && g.parentOffset == 0 && (t.domObserver.suppressSelectionUpdates(), setTimeout(() => H(t), 20)), P = t.state.tr.delete(_, ee), ze = d.resolve(h.start).marksAcross(d.resolve(h.endA));
3257
- else if (
3258
- // Adding or removing a mark
3259
- h.endA == h.endB && (xe = ti(g.parent.content.cut(g.parentOffset, m.parentOffset), y.parent.content.cut(y.parentOffset, h.endA - y.start())))
3260
- )
3261
- P = t.state.tr, xe.type == "add" ? P.addMark(_, ee, xe.mark) : P.removeMark(_, ee, xe.mark);
3262
- else if (g.parent.child(g.index()).isText && g.index() == m.index() - (m.textOffset ? 0 : 1)) {
3263
- let b = g.parent.textBetween(g.parentOffset, m.parentOffset);
3264
- if (t.someProp("handleTextInput", (j) => j(t, _, ee, b)))
3265
- return;
3266
- P = t.state.tr.insertText(b, _, ee);
3267
- }
3268
- }
3269
- if (P || (P = t.state.tr.replace(_, ee, c.doc.slice(h.start - c.from, h.endB - c.from))), c.sel) {
3270
- let b = Bt(t, P.doc, c.sel);
3271
- b && !(O && t.composing && b.empty && (h.start != h.endB || t.input.lastChromeDelete < Date.now() - 100) && (b.head == _ || b.head == P.mapping.map(ee) - 1) || A && b.empty && b.head == _) && P.setSelection(b);
3272
- }
3273
- ze && P.ensureMarks(ze), s && P.setMeta("composition", s), t.dispatch(P.scrollIntoView());
3274
- }
3275
- function Bt(t, e, n) {
3276
- return Math.max(n.anchor, n.head) > e.content.size ? null : et(t, e.resolve(n.anchor), e.resolve(n.head));
3277
- }
3278
- function ti(t, e) {
3279
- let n = t.firstChild.marks, o = e.firstChild.marks, i = n, s = o, r, l, a;
3280
- for (let d = 0; d < o.length; d++)
3281
- i = o[d].removeFromSet(i);
3282
- for (let d = 0; d < n.length; d++)
3283
- s = n[d].removeFromSet(s);
3284
- if (i.length == 1 && s.length == 0)
3285
- l = i[0], r = "add", a = (d) => d.mark(l.addToSet(d.marks));
3286
- else if (i.length == 0 && s.length == 1)
3287
- l = s[0], r = "remove", a = (d) => d.mark(l.removeFromSet(d.marks));
3288
- else
3289
- return null;
3290
- let c = [];
3291
- for (let d = 0; d < e.childCount; d++)
3292
- c.push(a(e.child(d)));
3293
- if (W.from(c).eq(t))
3294
- return { mark: l, type: r };
3295
- }
3296
- function ni(t, e, n, o, i) {
3297
- if (
3298
- // The content must have shrunk
3299
- n - e <= i.pos - o.pos || // newEnd must point directly at or after the end of the block that newStart points into
3300
- He(o, !0, !1) < i.pos
3301
- )
3302
- return !1;
3303
- let s = t.resolve(e);
3304
- if (!o.parent.isTextblock) {
3305
- let l = s.nodeAfter;
3306
- return l != null && n == e + l.nodeSize;
3307
- }
3308
- if (s.parentOffset < s.parent.content.size || !s.parent.isTextblock)
3309
- return !1;
3310
- let r = t.resolve(He(s, !0, !0));
3311
- return !r.parent.isTextblock || r.pos > n || He(r, !0, !1) < n ? !1 : o.parent.content.cut(o.parentOffset).eq(r.parent.content);
3312
- }
3313
- function He(t, e, n) {
3314
- let o = t.depth, i = e ? t.end() : t.pos;
3315
- for (; o > 0 && (e || t.indexAfter(o) == t.node(o).childCount); )
3316
- o--, i++, e = !1;
3317
- if (n) {
3318
- let s = t.node(o).maybeChild(t.indexAfter(o));
3319
- for (; s && !s.isLeaf; )
3320
- s = s.firstChild, i++;
3321
- }
3322
- return i;
3323
- }
3324
- function oi(t, e, n, o, i) {
3325
- let s = t.findDiffStart(e, n);
3326
- if (s == null)
3327
- return null;
3328
- let { a: r, b: l } = t.findDiffEnd(e, n + t.size, n + e.size);
3329
- if (i == "end") {
3330
- let a = Math.max(0, s - Math.min(r, l));
3331
- o -= r + a - s;
3332
- }
3333
- if (r < s && t.size < e.size) {
3334
- let a = o <= s && o >= r ? s - o : 0;
3335
- s -= a, s && s < e.size && It(e.textBetween(s - 1, s + 1)) && (s += a ? 1 : -1), l = s + (l - r), r = s;
3336
- } else if (l < s) {
3337
- let a = o <= s && o >= l ? s - o : 0;
3338
- s -= a, s && s < t.size && It(t.textBetween(s - 1, s + 1)) && (s += a ? 1 : -1), r = s + (r - l), l = s;
3339
- }
3340
- return { start: s, endA: r, endB: l };
3341
- }
3342
- function It(t) {
3343
- if (t.length != 2)
3344
- return !1;
3345
- let e = t.charCodeAt(0), n = t.charCodeAt(1);
3346
- return e >= 56320 && e <= 57343 && n >= 55296 && n <= 56319;
3347
- }
3348
- class ci {
3349
- /**
3350
- Create a view. `place` may be a DOM node that the editor should
3351
- be appended to, a function that will place it into the document,
3352
- or an object whose `mount` property holds the node to use as the
3353
- document container. If it is `null`, the editor will not be
3354
- added to the document.
3355
- */
3356
- constructor(e, n) {
3357
- this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new Co(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = n, this.state = n.state, this.directPlugins = n.plugins || [], this.directPlugins.forEach(qt), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = Lt(this), zt(this), this.nodeViews = $t(this), this.docView = mt(this.state.doc, Ft(this), Ke(this), this.dom, this), this.domObserver = new Go(this, (o, i, s, r) => ei(this, o, i, s, r)), this.domObserver.start(), Oo(this), this.updatePluginViews();
3358
- }
3359
- /**
3360
- Holds `true` when a
3361
- [composition](https://w3c.github.io/uievents/#events-compositionevents)
3362
- is active.
3363
- */
3364
- get composing() {
3365
- return this.input.composing;
3366
- }
3367
- /**
3368
- The view's current [props](https://prosemirror.net/docs/ref/#view.EditorProps).
3369
- */
3370
- get props() {
3371
- if (this._props.state != this.state) {
3372
- let e = this._props;
3373
- this._props = {};
3374
- for (let n in e)
3375
- this._props[n] = e[n];
3376
- this._props.state = this.state;
3377
- }
3378
- return this._props;
3379
- }
3380
- /**
3381
- Update the view's props. Will immediately cause an update to
3382
- the DOM.
3383
- */
3384
- update(e) {
3385
- e.handleDOMEvents != this._props.handleDOMEvents && Qe(this);
3386
- let n = this._props;
3387
- this._props = e, e.plugins && (e.plugins.forEach(qt), this.directPlugins = e.plugins), this.updateStateInner(e.state, n);
3388
- }
3389
- /**
3390
- Update the view by updating existing props object with the object
3391
- given as argument. Equivalent to `view.update(Object.assign({},
3392
- view.props, props))`.
3393
- */
3394
- setProps(e) {
3395
- let n = {};
3396
- for (let o in this._props)
3397
- n[o] = this._props[o];
3398
- n.state = this.state;
3399
- for (let o in e)
3400
- n[o] = e[o];
3401
- this.update(n);
3402
- }
3403
- /**
3404
- Update the editor's `state` prop, without touching any of the
3405
- other props.
3406
- */
3407
- updateState(e) {
3408
- this.updateStateInner(e, this._props);
3409
- }
3410
- updateStateInner(e, n) {
3411
- var o;
3412
- let i = this.state, s = !1, r = !1;
3413
- e.storedMarks && this.composing && (pn(this), r = !0), this.state = e;
3414
- let l = i.plugins != e.plugins || this._props.plugins != n.plugins;
3415
- if (l || this._props.plugins != n.plugins || this._props.nodeViews != n.nodeViews) {
3416
- let p = $t(this);
3417
- si(p, this.nodeViews) && (this.nodeViews = p, s = !0);
3418
- }
3419
- (l || n.handleDOMEvents != this._props.handleDOMEvents) && Qe(this), this.editable = Lt(this), zt(this);
3420
- let a = Ke(this), c = Ft(this), d = i.plugins != e.plugins && !i.doc.eq(e.doc) ? "reset" : e.scrollToSelection > i.scrollToSelection ? "to selection" : "preserve", f = s || !this.docView.matchesNode(e.doc, c, a);
3421
- (f || !e.selection.eq(i.selection)) && (r = !0);
3422
- let u = d == "preserve" && r && this.dom.style.overflowAnchor == null && zn(this);
3423
- if (r) {
3424
- this.domObserver.stop();
3425
- let p = f && (A || O) && !this.composing && !i.selection.empty && !e.selection.empty && ii(i.selection, e.selection);
3426
- if (f) {
3427
- let h = O ? this.trackWrites = this.domSelectionRange().focusNode : null;
3428
- this.composing && (this.input.compositionNode = zo(this)), (s || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = mt(e.doc, c, a, this.dom, this)), h && !this.trackWrites && (p = !0);
3429
- }
3430
- p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && ro(this)) ? H(this, p) : (tn(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
3431
- }
3432
- this.updatePluginViews(i), !((o = this.dragging) === null || o === void 0) && o.node && !i.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, i), d == "reset" ? this.dom.scrollTop = 0 : d == "to selection" ? this.scrollToSelection() : u && Ln(u);
3433
- }
3434
- /**
3435
- @internal
3436
- */
3437
- scrollToSelection() {
3438
- let e = this.domSelectionRange().focusNode;
3439
- if (!(!e || !this.dom.contains(e.nodeType == 1 ? e : e.parentNode))) {
3440
- if (!this.someProp("handleScrollToSelection", (n) => n(this))) if (this.state.selection instanceof D) {
3441
- let n = this.docView.domAfterPos(this.state.selection.from);
3442
- n.nodeType == 1 && ct(this, n.getBoundingClientRect(), e);
3443
- } else
3444
- ct(this, this.coordsAtPos(this.state.selection.head, 1), e);
3445
- }
3446
- }
3447
- destroyPluginViews() {
3448
- let e;
3449
- for (; e = this.pluginViews.pop(); )
3450
- e.destroy && e.destroy();
3451
- }
3452
- updatePluginViews(e) {
3453
- if (!e || e.plugins != this.state.plugins || this.directPlugins != this.prevDirectPlugins) {
3454
- this.prevDirectPlugins = this.directPlugins, this.destroyPluginViews();
3455
- for (let n = 0; n < this.directPlugins.length; n++) {
3456
- let o = this.directPlugins[n];
3457
- o.spec.view && this.pluginViews.push(o.spec.view(this));
3458
- }
3459
- for (let n = 0; n < this.state.plugins.length; n++) {
3460
- let o = this.state.plugins[n];
3461
- o.spec.view && this.pluginViews.push(o.spec.view(this));
3462
- }
3463
- } else
3464
- for (let n = 0; n < this.pluginViews.length; n++) {
3465
- let o = this.pluginViews[n];
3466
- o.update && o.update(this, e);
3467
- }
3468
- }
3469
- updateDraggedNode(e, n) {
3470
- let o = e.node, i = -1;
3471
- if (this.state.doc.nodeAt(o.from) == o.node)
3472
- i = o.from;
3473
- else {
3474
- let s = o.from + (this.state.doc.content.size - n.doc.content.size);
3475
- (s > 0 && this.state.doc.nodeAt(s)) == o.node && (i = s);
3476
- }
3477
- this.dragging = new gn(e.slice, e.move, i < 0 ? void 0 : D.create(this.state.doc, i));
3478
- }
3479
- someProp(e, n) {
3480
- let o = this._props && this._props[e], i;
3481
- if (o != null && (i = n ? n(o) : o))
3482
- return i;
3483
- for (let r = 0; r < this.directPlugins.length; r++) {
3484
- let l = this.directPlugins[r].props[e];
3485
- if (l != null && (i = n ? n(l) : l))
3486
- return i;
3487
- }
3488
- let s = this.state.plugins;
3489
- if (s)
3490
- for (let r = 0; r < s.length; r++) {
3491
- let l = s[r].props[e];
3492
- if (l != null && (i = n ? n(l) : l))
3493
- return i;
3494
- }
3495
- }
3496
- /**
3497
- Query whether the view has focus.
3498
- */
3499
- hasFocus() {
3500
- if (A) {
3501
- let e = this.root.activeElement;
3502
- if (e == this.dom)
3503
- return !0;
3504
- if (!e || !this.dom.contains(e))
3505
- return !1;
3506
- for (; e && this.dom != e && this.dom.contains(e); ) {
3507
- if (e.contentEditable == "false")
3508
- return !1;
3509
- e = e.parentElement;
3510
- }
3511
- return !0;
3512
- }
3513
- return this.root.activeElement == this.dom;
3514
- }
3515
- /**
3516
- Focus the editor.
3517
- */
3518
- focus() {
3519
- this.domObserver.stop(), this.editable && $n(this.dom), H(this), this.domObserver.start();
3520
- }
3521
- /**
3522
- Get the document root in which the editor exists. This will
3523
- usually be the top-level `document`, but might be a [shadow
3524
- DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Shadow_DOM)
3525
- root if the editor is inside one.
3526
- */
3527
- get root() {
3528
- let e = this._root;
3529
- if (e == null) {
3530
- for (let n = this.dom.parentNode; n; n = n.parentNode)
3531
- if (n.nodeType == 9 || n.nodeType == 11 && n.host)
3532
- return n.getSelection || (Object.getPrototypeOf(n).getSelection = () => n.ownerDocument.getSelection()), this._root = n;
3533
- }
3534
- return e || document;
3535
- }
3536
- /**
3537
- When an existing editor view is moved to a new document or
3538
- shadow tree, call this to make it recompute its root.
3539
- */
3540
- updateRoot() {
3541
- this._root = null;
3542
- }
3543
- /**
3544
- Given a pair of viewport coordinates, return the document
3545
- position that corresponds to them. May return null if the given
3546
- coordinates aren't inside of the editor. When an object is
3547
- returned, its `pos` property is the position nearest to the
3548
- coordinates, and its `inside` property holds the position of the
3549
- inner node that the position falls inside of, or -1 if it is at
3550
- the top level, not in any node.
3551
- */
3552
- posAtCoords(e) {
3553
- return _n(this, e);
3554
- }
3555
- /**
3556
- Returns the viewport rectangle at a given document position.
3557
- `left` and `right` will be the same number, as this returns a
3558
- flat cursor-ish rectangle. If the position is between two things
3559
- that aren't directly adjacent, `side` determines which element
3560
- is used. When < 0, the element before the position is used,
3561
- otherwise the element after.
3562
- */
3563
- coordsAtPos(e, n = 1) {
3564
- return Gt(this, e, n);
3565
- }
3566
- /**
3567
- Find the DOM position that corresponds to the given document
3568
- position. When `side` is negative, find the position as close as
3569
- possible to the content before the position. When positive,
3570
- prefer positions close to the content after the position. When
3571
- zero, prefer as shallow a position as possible.
3572
-
3573
- Note that you should **not** mutate the editor's internal DOM,
3574
- only inspect it (and even that is usually not necessary).
3575
- */
3576
- domAtPos(e, n = 0) {
3577
- return this.docView.domFromPos(e, n);
3578
- }
3579
- /**
3580
- Find the DOM node that represents the document node after the
3581
- given position. May return `null` when the position doesn't point
3582
- in front of a node or if the node is inside an opaque node view.
3583
-
3584
- This is intended to be able to call things like
3585
- `getBoundingClientRect` on that DOM node. Do **not** mutate the
3586
- editor DOM directly, or add styling this way, since that will be
3587
- immediately overriden by the editor as it redraws the node.
3588
- */
3589
- nodeDOM(e) {
3590
- let n = this.docView.descAt(e);
3591
- return n ? n.nodeDOM : null;
3592
- }
3593
- /**
3594
- Find the document position that corresponds to a given DOM
3595
- position. (Whenever possible, it is preferable to inspect the
3596
- document structure directly, rather than poking around in the
3597
- DOM, but sometimes—for example when interpreting an event
3598
- target—you don't have a choice.)
3599
-
3600
- The `bias` parameter can be used to influence which side of a DOM
3601
- node to use when the position is inside a leaf node.
3602
- */
3603
- posAtDOM(e, n, o = -1) {
3604
- let i = this.docView.posFromDOM(e, n, o);
3605
- if (i == null)
3606
- throw new RangeError("DOM position not inside the editor");
3607
- return i;
3608
- }
3609
- /**
3610
- Find out whether the selection is at the end of a textblock when
3611
- moving in a given direction. When, for example, given `"left"`,
3612
- it will return true if moving left from the current cursor
3613
- position would leave that position's parent textblock. Will apply
3614
- to the view's current state by default, but it is possible to
3615
- pass a different state.
3616
- */
3617
- endOfTextblock(e, n) {
3618
- return Xn(this, n || this.state, e);
3619
- }
3620
- /**
3621
- Run the editor's paste logic with the given HTML string. The
3622
- `event`, if given, will be passed to the
3623
- [`handlePaste`](https://prosemirror.net/docs/ref/#view.EditorProps.handlePaste) hook.
3624
- */
3625
- pasteHTML(e, n) {
3626
- return Ne(this, "", e, !1, n || new ClipboardEvent("paste"));
3627
- }
3628
- /**
3629
- Run the editor's paste logic with the given plain-text input.
3630
- */
3631
- pasteText(e, n) {
3632
- return Ne(this, e, null, !0, n || new ClipboardEvent("paste"));
3633
- }
3634
- /**
3635
- Serialize the given slice as it would be if it was copied from
3636
- this editor. Returns a DOM element that contains a
3637
- representation of the slice as its children, a textual
3638
- representation, and the transformed slice (which can be
3639
- different from the given input due to hooks like
3640
- [`transformCopied`](https://prosemirror.net/docs/ref/#view.EditorProps.transformCopied)).
3641
- */
3642
- serializeForClipboard(e) {
3643
- return tt(this, e);
3644
- }
3645
- /**
3646
- Removes the editor from the DOM and destroys all [node
3647
- views](https://prosemirror.net/docs/ref/#view.NodeView).
3648
- */
3649
- destroy() {
3650
- this.docView && (Mo(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], Ke(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, xn());
3651
- }
3652
- /**
3653
- This is true when the view has been
3654
- [destroyed](https://prosemirror.net/docs/ref/#view.EditorView.destroy) (and thus should not be
3655
- used anymore).
3656
- */
3657
- get isDestroyed() {
3658
- return this.docView == null;
3659
- }
3660
- /**
3661
- Used for testing.
3662
- */
3663
- dispatchEvent(e) {
3664
- return ko(this, e);
3665
- }
3666
- /**
3667
- Dispatch a transaction. Will call
3668
- [`dispatchTransaction`](https://prosemirror.net/docs/ref/#view.DirectEditorProps.dispatchTransaction)
3669
- when given, and otherwise defaults to applying the transaction to
3670
- the current state and calling
3671
- [`updateState`](https://prosemirror.net/docs/ref/#view.EditorView.updateState) with the result.
3672
- This method is bound to the view instance, so that it can be
3673
- easily passed around.
3674
- */
3675
- dispatch(e) {
3676
- let n = this._props.dispatchTransaction;
3677
- n ? n.call(this, e) : this.updateState(this.state.apply(e));
3678
- }
3679
- /**
3680
- @internal
3681
- */
3682
- domSelectionRange() {
3683
- let e = this.domSelection();
3684
- return e ? x && this.root.nodeType === 11 && Pn(this.dom.ownerDocument) == this.dom && Jo(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
3685
- }
3686
- /**
3687
- @internal
3688
- */
3689
- domSelection() {
3690
- return this.root.getSelection();
3691
- }
3692
- }
3693
- function Ft(t) {
3694
- let e = /* @__PURE__ */ Object.create(null);
3695
- return e.class = "ProseMirror", e.contenteditable = String(t.editable), t.someProp("attributes", (n) => {
3696
- if (typeof n == "function" && (n = n(t.state)), n)
3697
- for (let o in n)
3698
- o == "class" ? e.class += " " + n[o] : o == "style" ? e.style = (e.style ? e.style + ";" : "") + n[o] : !e[o] && o != "contenteditable" && o != "nodeName" && (e[o] = String(n[o]));
3699
- }), e.translate || (e.translate = "no"), [I.node(0, t.state.doc.content.size, e)];
3700
- }
3701
- function zt(t) {
3702
- if (t.markCursor) {
3703
- let e = document.createElement("img");
3704
- e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), t.cursorWrapper = { dom: e, deco: I.widget(t.state.selection.from, e, { raw: !0, marks: t.markCursor }) };
3705
- } else
3706
- t.cursorWrapper = null;
3707
- }
3708
- function Lt(t) {
3709
- return !t.someProp("editable", (e) => e(t.state) === !1);
3710
- }
3711
- function ii(t, e) {
3712
- let n = Math.min(t.$anchor.sharedDepth(t.head), e.$anchor.sharedDepth(e.head));
3713
- return t.$anchor.start(n) != e.$anchor.start(n);
3714
- }
3715
- function $t(t) {
3716
- let e = /* @__PURE__ */ Object.create(null);
3717
- function n(o) {
3718
- for (let i in o)
3719
- Object.prototype.hasOwnProperty.call(e, i) || (e[i] = o[i]);
3720
- }
3721
- return t.someProp("nodeViews", n), t.someProp("markViews", n), e;
3722
- }
3723
- function si(t, e) {
3724
- let n = 0, o = 0;
3725
- for (let i in t) {
3726
- if (t[i] != e[i])
3727
- return !0;
3728
- n++;
3729
- }
3730
- for (let i in e)
3731
- o++;
3732
- return n != o;
3733
- }
3734
- function qt(t) {
3735
- if (t.spec.state || t.spec.filterTransaction || t.spec.appendTransaction)
3736
- throw new RangeError("Plugins passed directly to the view must not have a state component");
3737
- }
3738
- export {
3739
- I as D,
3740
- ci as E,
3741
- N as a
3742
- };