@fewangsit/wangsvue-fats 1.0.0-alpha.42 → 1.0.0-alpha.44

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 (284) hide show
  1. package/components/buttonsearchbyscan/ButtonSearchByScan.vue.d.ts +44 -0
  2. package/components/index.d.ts +1 -0
  3. package/components/inlinemessage/InlineMessage.vue.d.ts +167 -0
  4. package/event-bus/index.d.ts +3 -0
  5. package/loading-page-BrQattYE.js +1 -0
  6. package/loading-page-CoC9UhfC.js +4 -0
  7. package/loading-page-DbLuqCHa.js +1 -0
  8. package/loading-page-f8D03l3G.js +4 -0
  9. package/loading-plane-CgfbWppy.js +1 -0
  10. package/loading-plane-CoXtqoc9.js +4 -0
  11. package/loading-table-Bdr9ZhtP.js +1 -0
  12. package/loading-table-ByUoWqUo.js +4 -0
  13. package/loading-table-BygEMzFM.js +4 -0
  14. package/loading-table-BzrSQlA0.js +1 -0
  15. package/loading-table-D9bw9OcI.js +4 -0
  16. package/loading-table-chOgXi94.js +1 -0
  17. package/no-data-CTKux8RI.js +4 -0
  18. package/no-data-Cgze_Rvp.js +1 -0
  19. package/{assets/lottiejs/no-data-DOy8kIGF.es.js → no-data-DLHO1L_u.js} +2 -13
  20. package/no-data-Dep79CBh.js +1 -0
  21. package/no-data-g0dJCy2p.js +4 -0
  22. package/no-data-y1X5WtcQ.js +1 -0
  23. package/package.json +3 -3
  24. package/stats.html +1 -1
  25. package/style.css +1 -1
  26. package/wangsvue-fats.js +51885 -346
  27. package/wangsvue-fats.system.js +312 -1
  28. package/assets/lottiejs/loading-page-B9ooQcfF.system.js +0 -1
  29. package/assets/lottiejs/loading-page-CQ0mKER2.es.js +0 -15
  30. package/assets/lottiejs/loading-table-B4T3FYiI.system.js +0 -1
  31. package/assets/lottiejs/loading-table-BnpbX8Ew.es.js +0 -15
  32. package/assets/lottiejs/no-data-CMWnya_k.system.js +0 -1
  33. package/components/animation/Animation-6756VN9N.system.js +0 -1
  34. package/components/animation/Animation-COWVilAA.es.js +0 -428
  35. package/components/approverinfo/ApproverInfo-BdqBpNjY.system.js +0 -1
  36. package/components/approverinfo/ApproverInfo-C3_ibV8c.es.js +0 -321
  37. package/components/assetinfo/AssetInfo-BBgKToRP.system.js +0 -1
  38. package/components/assetinfo/AssetInfo-CmwgOU74.es.js +0 -298
  39. package/components/backgroundimagecropper/BackgroundImageCropper-DFHtaSyE.system.js +0 -1
  40. package/components/backgroundimagecropper/BackgroundImageCropper-HKzUEXq-.es.js +0 -57
  41. package/components/badge/Badge-CndPv5v9.system.js +0 -1
  42. package/components/badge/Badge-DA-XiE1C.es.js +0 -115
  43. package/components/badgegroup/BadgeGroup-Bj0EjoML.es.js +0 -68
  44. package/components/badgegroup/BadgeGroup-Y-HhiHk8.system.js +0 -1
  45. package/components/basecalendar/BaseCalendar-47ahYXrt.es.js +0 -867
  46. package/components/basecalendar/BaseCalendar-Ce46jOkg.system.js +0 -1
  47. package/components/basetree/BaseTree-DDu1qI7t.system.js +0 -1
  48. package/components/basetree/BaseTree-DLSA5FMh.es.js +0 -167
  49. package/components/breadcrumb/Breadcrumb-B5bAijry.system.js +0 -1
  50. package/components/breadcrumb/Breadcrumb-BWSmLPqn.es.js +0 -46
  51. package/components/button/Button-D-MSv_AS.es.js +0 -120
  52. package/components/button/Button-Okx1_kOu.system.js +0 -1
  53. package/components/buttonbulkaction/ButtonBulkAction-B4RcdWmb.es.js +0 -185
  54. package/components/buttonbulkaction/ButtonBulkAction-DLmvicRL.system.js +0 -1
  55. package/components/buttoncopy/ButtonCopy-BZgQAFOM.es.js +0 -31
  56. package/components/buttoncopy/ButtonCopy-CKi1bBpz.system.js +0 -1
  57. package/components/buttondownload/ButtonDownload-Bw9T3mbW.es.js +0 -92
  58. package/components/buttondownload/ButtonDownload-CpA0ryUT.system.js +0 -1
  59. package/components/buttonfilter/ButtonFilter-BIE-jM2i.es.js +0 -28
  60. package/components/buttonfilter/ButtonFilter-C4WRvUrj.system.js +0 -1
  61. package/components/buttonradio/ButtonRadio-5VUY8o5h.es.js +0 -83
  62. package/components/buttonradio/ButtonRadio-B2wWrgB5.system.js +0 -1
  63. package/components/buttonscan/ButtonScan-BCScT2cx.es.js +0 -421
  64. package/components/buttonscan/ButtonScan-TbyhlW5M.system.js +0 -1
  65. package/components/buttonsearch/ButtonSearch-Clbafqts.es.js +0 -70
  66. package/components/buttonsearch/ButtonSearch-e57pD5r3.system.js +0 -1
  67. package/components/buttonselecttree/ButtonSelectTree-B-_Iw5sB.es.js +0 -218
  68. package/components/buttonselecttree/ButtonSelectTree-Cbq1oeVK.system.js +0 -1
  69. package/components/buttonselectuser/ButtonSelectUser-Ar7Y8tVR.es.js +0 -101
  70. package/components/buttonselectuser/ButtonSelectUser-Cfe6m75Z.system.js +0 -1
  71. package/components/buttonsync/ButtonSync-Bc1GZXT6.es.js +0 -29
  72. package/components/buttonsync/ButtonSync-ClllEdAy.system.js +0 -1
  73. package/components/buttontoggle/ButtonToggle-DIy3M8Pz.es.js +0 -11
  74. package/components/buttontoggle/ButtonToggle-VNp0lbcW.system.js +0 -1
  75. package/components/buttonviewlog/ButtonViewLog-Ct8QwEey.system.js +0 -1
  76. package/components/buttonviewlog/ButtonViewLog-h9uVv5A5.es.js +0 -21
  77. package/components/calendar/Calendar-7yBKZsvj.system.js +0 -1
  78. package/components/calendar/Calendar-Df6CnW-l.es.js +0 -112
  79. package/components/card/Card-BUKU2FcT.system.js +0 -1
  80. package/components/card/Card-CwnxKNdM.es.js +0 -47
  81. package/components/checkbox/Checkbox-CCtItmVW.system.js +0 -1
  82. package/components/checkbox/Checkbox-DdsR222S.es.js +0 -135
  83. package/components/codesnippet/CodeSnippet-Bpps-Iyc.es.js +0 -127
  84. package/components/codesnippet/CodeSnippet-DvTtZ28b.system.js +0 -2
  85. package/components/codesnippetadapter/CodeSnippetAdapter-BtSqWBl1.system.js +0 -1
  86. package/components/codesnippetadapter/CodeSnippetAdapter-jgXoPKzr.es.js +0 -26
  87. package/components/columnlist/ColumnList-Bh3LZlOa.system.js +0 -1
  88. package/components/columnlist/ColumnList-Bp7soiys.es.js +0 -204
  89. package/components/customcolumn/CustomColumn-CVhAbTGn.system.js +0 -1
  90. package/components/customcolumn/CustomColumn-Dblxjw_0.es.js +0 -138
  91. package/components/datatable/DataTable--mHUKNUr.system.js +0 -1
  92. package/components/datatable/DataTable-J1j-OKsW.es.js +0 -983
  93. package/components/dialog/Dialog-Dy93f91f.es.js +0 -121
  94. package/components/dialog/Dialog-WEl66uTI.system.js +0 -1
  95. package/components/dialogconfirm/DialogConfirm-BOFb7rJD.es.js +0 -139
  96. package/components/dialogconfirm/DialogConfirm-o7_v7F31.system.js +0 -1
  97. package/components/dialogform/DialogForm-C15nC1wH.es.js +0 -223
  98. package/components/dialogform/DialogForm-CdpY1_-F.system.js +0 -1
  99. package/components/dialogselecttree/DialogSelectTree-BA8xEqco.es.js +0 -268
  100. package/components/dialogselecttree/DialogSelectTree-DKxWI9Re.system.js +0 -1
  101. package/components/dialogselectuser/DialogSelectUser-BZTSktHZ.system.js +0 -1
  102. package/components/dialogselectuser/DialogSelectUser-Bu5TDAPt.es.js +0 -186
  103. package/components/dialogselectuserfilter/DialogSelectUserFilter-DEl4zFaX.system.js +0 -1
  104. package/components/dialogselectuserfilter/DialogSelectUserFilter-Dz5OxAU-.es.js +0 -40
  105. package/components/dropdown/Dropdown-D4S52rW5.es.js +0 -252
  106. package/components/dropdown/Dropdown-DuvNYyq0.system.js +0 -1
  107. package/components/editor/Editor-DQ7Xdy30.es.js +0 -1036
  108. package/components/editor/Editor-IfYw2Tps.system.js +0 -1
  109. package/components/editorbutton/EditorButton-DDgS2vga.es.js +0 -28
  110. package/components/editorbutton/EditorButton-DmVrr4Bk.system.js +0 -1
  111. package/components/fieldwrapper/FieldWrapper-C6HJ2HnC.es.js +0 -34
  112. package/components/fieldwrapper/FieldWrapper-DFjw9hA8.system.js +0 -1
  113. package/components/fileupload/FileUpload-B6PAucnD.es.js +0 -175
  114. package/components/fileupload/FileUpload-iVAJXujV.system.js +0 -1
  115. package/components/filtercontainer/FilterContainer-CuMaq5Sv.es.js +0 -284
  116. package/components/filtercontainer/FilterContainer-DUeVLHgZ.system.js +0 -1
  117. package/components/form/Form-D-e0VI8V.system.js +0 -1
  118. package/components/form/Form-eSj-nb1y.es.js +0 -181
  119. package/components/hardwaresync/HardwareSync--HomfQuH.system.js +0 -1
  120. package/components/hardwaresync/HardwareSync-DUsVwHx1.es.js +0 -236
  121. package/components/icon/Icon-DUylRmY4.system.js +0 -1
  122. package/components/icon/Icon-mDqG7urn.es.js +0 -82
  123. package/components/image/Image-BZ31CL-y.es.js +0 -169
  124. package/components/image/Image-DX6uB7Ns.system.js +0 -1
  125. package/components/imagecompressor/ImageCompressor-BLeJDvN3.system.js +0 -1
  126. package/components/imagecompressor/ImageCompressor-DaW0ak9c.es.js +0 -501
  127. package/components/imageinputinfo/ImageInputInfo-C5F14hbF.system.js +0 -1
  128. package/components/imageinputinfo/ImageInputInfo-oTtVBxzO.es.js +0 -46
  129. package/components/inlinemessage/InlineMessage-19w6FOcP.system.js +0 -1
  130. package/components/inlinemessage/InlineMessage-CBZT3jWS.es.js +0 -94
  131. package/components/inputbadge/InputBadge-CsdT7M7-.es.js +0 -186
  132. package/components/inputbadge/InputBadge-dgANMV70.system.js +0 -1
  133. package/components/inputcurrency/InputCurrency-B96npK8W.es.js +0 -1208
  134. package/components/inputcurrency/InputCurrency-ChqGX5L8.system.js +0 -1
  135. package/components/inputemail/InputEmail-BMzumenA.es.js +0 -49
  136. package/components/inputemail/InputEmail-CYILS9bp.system.js +0 -1
  137. package/components/inputgroup/InputGroup-G9TEI4vX.system.js +0 -1
  138. package/components/inputgroup/InputGroup-eNDRlJ5R.es.js +0 -56
  139. package/components/inputnumber/InputNumber-Bzk_YzWM.es.js +0 -232
  140. package/components/inputnumber/InputNumber-CRyg8Xw_.system.js +0 -1
  141. package/components/inputpassword/InputPassword-BMHMWLgU.es.js +0 -121
  142. package/components/inputpassword/InputPassword-BjB6FsoL.system.js +0 -1
  143. package/components/inputphonenumber/InputPhoneNumber-CVM2oK5q.es.js +0 -591
  144. package/components/inputphonenumber/InputPhoneNumber-DIbd3upL.system.js +0 -1
  145. package/components/inputrangenumber/InputRangeNumber-B1aAoKVj.es.js +0 -134
  146. package/components/inputrangenumber/InputRangeNumber-C28xgFBY.system.js +0 -1
  147. package/components/inputsearch/InputSearch--KHwTBTm.system.js +0 -1
  148. package/components/inputsearch/InputSearch-cPq3vqhy.es.js +0 -53
  149. package/components/inputtext/InputText-93zDNfC3.system.js +0 -1
  150. package/components/inputtext/InputText-_xEnXysf.es.js +0 -241
  151. package/components/inputurl/InputURL-aqx1PVKL.es.js +0 -61
  152. package/components/inputurl/InputURL-kWIiKGEG.system.js +0 -1
  153. package/components/invisiblefield/InvisibleField-4XbiOrqw.es.js +0 -27
  154. package/components/invisiblefield/InvisibleField-BHudtX2g.system.js +0 -1
  155. package/components/litedropdown/LiteDropdown-3KsCx4wX.system.js +0 -1
  156. package/components/litedropdown/LiteDropdown-DcSzP11l.es.js +0 -102
  157. package/components/loading/Loading-D8M801C9.es.js +0 -24
  158. package/components/loading/Loading-Diwog8dc.system.js +0 -1
  159. package/components/mentionlist/MentionList--7AymnhE.es.js +0 -58
  160. package/components/mentionlist/MentionList-600dsWhX.system.js +0 -1
  161. package/components/mentionsection/MentionSection-C1gWOzH2.system.js +0 -3
  162. package/components/mentionsection/MentionSection-C_c4qbpq.es.js +0 -52
  163. package/components/menu/Menu-BmTMFwBD.es.js +0 -73
  164. package/components/menu/Menu-OR25pAK3.system.js +0 -1
  165. package/components/menuitem/MenuItem-LoZMc0T9.es.js +0 -65
  166. package/components/menuitem/MenuItem-imQ-hYTP.system.js +0 -1
  167. package/components/multirow/MultiRow-ClSMxrEx.es.js +0 -52
  168. package/components/multirow/MultiRow-DKu6uIsI.system.js +0 -1
  169. package/components/multiselect/MultiSelect-DGhS1EyX.es.js +0 -189
  170. package/components/multiselect/MultiSelect-DKFYq47E.system.js +0 -1
  171. package/components/overlaypanel/OverlayPanel-C_WCcNPw.system.js +0 -1
  172. package/components/overlaypanel/OverlayPanel-DXNek7Yb.es.js +0 -49
  173. package/components/tabmenu/TabMenu-CAQqu-ff.system.js +0 -1
  174. package/components/tabmenu/TabMenu-iMeZa8gy.es.js +0 -108
  175. package/components/tagtype/TagType-CX7BVRrE.es.js +0 -49
  176. package/components/tagtype/TagType-IMYg8AJf.system.js +0 -1
  177. package/components/textarea/Textarea-ClnQ2qmf.es.js +0 -108
  178. package/components/textarea/Textarea-DlkzVURV.system.js +0 -1
  179. package/components/timeline/Timeline-BMRdV_mH.es.js +0 -120
  180. package/components/timeline/Timeline-D7SYc3QX.system.js +0 -1
  181. package/components/timelinecontentbytype/TimelineContentByType-BmWsZID0.system.js +0 -1
  182. package/components/timelinecontentbytype/TimelineContentByType-ehFLzTA1.es.js +0 -111
  183. package/components/toast/Toast-DnALWJkx.es.js +0 -74
  184. package/components/toast/Toast-Pc_DOZ5-.system.js +0 -1
  185. package/components/toggleswitch/ToggleSwitch-WHdD3oYL.system.js +0 -1
  186. package/components/toggleswitch/ToggleSwitch-wRjnHRIw.es.js +0 -90
  187. package/components/transactionroles/TransactionRoles-B_67h5wb.es.js +0 -223
  188. package/components/transactionroles/TransactionRoles-DSXBVwPM.system.js +0 -1
  189. package/components/tree/Tree-BoVGYw5N.system.js +0 -1
  190. package/components/tree/Tree-DnaIZZ8S.es.js +0 -268
  191. package/components/treenode/TreeNode-D5aepDIU.system.js +0 -1
  192. package/components/treenode/TreeNode-KJOUvlTH.es.js +0 -499
  193. package/components/treesearchinput/TreeSearchInput-B1PmhE7k.es.js +0 -56
  194. package/components/treesearchinput/TreeSearchInput-C-hXPV61.system.js +0 -1
  195. package/components/username/UserName-CCyPAYG6.system.js +0 -1
  196. package/components/username/UserName-CWs83BX6.es.js +0 -130
  197. package/components/userwithicon/UserWithIcon-CFjQcbAS.system.js +0 -1
  198. package/components/userwithicon/UserWithIcon-Dn3aNKdq.es.js +0 -18
  199. package/components/validatormessage/ValidatorMessage-BtKfBXzO.es.js +0 -19
  200. package/components/validatormessage/ValidatorMessage-VVfyqlRF.system.js +0 -1
  201. package/vendor/@popperjs/core-BDAJHTVh.es.js +0 -905
  202. package/vendor/@popperjs/core-DpNOCyB0.system.js +0 -1
  203. package/vendor/@tiptap/core-BLz8iRA3.es.js +0 -2868
  204. package/vendor/@tiptap/core-bnIgGWIt.system.js +0 -80
  205. package/vendor/@tiptap/extension-bold-BnsTNqIJ.es.js +0 -71
  206. package/vendor/@tiptap/extension-bold-C_KVm_D0.system.js +0 -1
  207. package/vendor/@tiptap/extension-bubble-menu-D421L1EU.system.js +0 -1
  208. package/vendor/@tiptap/extension-bubble-menu-D9Vgq7yO.es.js +0 -128
  209. package/vendor/@tiptap/extension-bullet-list-GNj3sKw9.es.js +0 -53
  210. package/vendor/@tiptap/extension-bullet-list-kXXFF-_p.system.js +0 -1
  211. package/vendor/@tiptap/extension-code-CfQ7g1i2.es.js +0 -51
  212. package/vendor/@tiptap/extension-code-Q8P1EHjz.system.js +0 -1
  213. package/vendor/@tiptap/extension-floating-menu-8rFSweor.system.js +0 -1
  214. package/vendor/@tiptap/extension-floating-menu-CSQuJzDM.es.js +0 -99
  215. package/vendor/@tiptap/extension-heading-BE64-Rg_.system.js +0 -1
  216. package/vendor/@tiptap/extension-heading-ZTlCgdtc.es.js +0 -54
  217. package/vendor/@tiptap/extension-history-GLkLmX-Y.system.js +0 -1
  218. package/vendor/@tiptap/extension-history-eJIThEn-.es.js +0 -35
  219. package/vendor/@tiptap/extension-image-B8NPUVFM.es.js +0 -64
  220. package/vendor/@tiptap/extension-image-rKrdkZpJ.system.js +0 -1
  221. package/vendor/@tiptap/extension-italic-C_CyJubw.es.js +0 -70
  222. package/vendor/@tiptap/extension-italic-Dg0Nosoc.system.js +0 -1
  223. package/vendor/@tiptap/extension-link-Cd8bTMBz.system.js +0 -1
  224. package/vendor/@tiptap/extension-link-D4PFdLvA.es.js +0 -262
  225. package/vendor/@tiptap/extension-list-item-7pIJ7t09.es.js +0 -33
  226. package/vendor/@tiptap/extension-list-item-Mnhfw2gP.system.js +0 -1
  227. package/vendor/@tiptap/extension-mention-DVF3rX_z.system.js +0 -1
  228. package/vendor/@tiptap/extension-mention-Dkg-tbrz.es.js +0 -130
  229. package/vendor/@tiptap/extension-ordered-list-DLI4xDN8.es.js +0 -71
  230. package/vendor/@tiptap/extension-ordered-list-Hl0QU8Zt.system.js +0 -1
  231. package/vendor/@tiptap/extension-placeholder-BeLl2T-f.system.js +0 -1
  232. package/vendor/@tiptap/extension-placeholder-V0iTxU19.es.js +0 -52
  233. package/vendor/@tiptap/extension-underline-BdcAQ4JH.system.js +0 -1
  234. package/vendor/@tiptap/extension-underline-DsGbvz80.es.js +0 -40
  235. package/vendor/@tiptap/suggestion-BpZSO8Lm.system.js +0 -1
  236. package/vendor/@tiptap/suggestion-C4sBhJAD.es.js +0 -131
  237. package/vendor/@tiptap/vue-3-BH1pZykd.system.js +0 -1
  238. package/vendor/@tiptap/vue-3-DceiR7pK.es.js +0 -436
  239. package/vendor/highlight.js-BAruEf1H.system.js +0 -2
  240. package/vendor/highlight.js-DHowhWoU.es.js +0 -2493
  241. package/vendor/linkifyjs-BxsOjwQz.es.js +0 -705
  242. package/vendor/linkifyjs-CMLfIa6I.system.js +0 -5
  243. package/vendor/lodash-DbIT-6qv.es.js +0 -127
  244. package/vendor/lodash-DbvKLWSv.system.js +0 -1
  245. package/vendor/lodash-es-C3G1Cc1m.system.js +0 -1
  246. package/vendor/lodash-es-CJerBxJQ.es.js +0 -766
  247. package/vendor/orderedmap-B3SOk52B.es.js +0 -103
  248. package/vendor/orderedmap-Dwr31MF0.system.js +0 -1
  249. package/vendor/primevue-CadmDhWp.es.js +0 -13928
  250. package/vendor/primevue-u6FsQONA.system.js +0 -193
  251. package/vendor/prosemirror-commands-DLmzIpoS.es.js +0 -383
  252. package/vendor/prosemirror-commands-DgY3QRzI.system.js +0 -2
  253. package/vendor/prosemirror-history-BMpJFORS.es.js +0 -248
  254. package/vendor/prosemirror-history-BrK-FTBv.system.js +0 -1
  255. package/vendor/prosemirror-keymap-COb3Dq2o.system.js +0 -1
  256. package/vendor/prosemirror-keymap-DF8LLxca.es.js +0 -60
  257. package/vendor/prosemirror-model-D2n-Dx_L.es.js +0 -2736
  258. package/vendor/prosemirror-model-DTWK5xnv.system.js +0 -4
  259. package/vendor/prosemirror-schema-list-BPpAP8wR.system.js +0 -1
  260. package/vendor/prosemirror-schema-list-BvrICwYb.es.js +0 -87
  261. package/vendor/prosemirror-state-CwkYUmNs.es.js +0 -820
  262. package/vendor/prosemirror-state-DzPLD-6l.system.js +0 -1
  263. package/vendor/prosemirror-transform-DvAmofec.es.js +0 -1507
  264. package/vendor/prosemirror-transform-VaXuT0NM.system.js +0 -2
  265. package/vendor/prosemirror-view-JTdpiWMD.system.js +0 -5
  266. package/vendor/prosemirror-view-ta7l3rKk.es.js +0 -3742
  267. package/vendor/rope-sequence-4t46C6az.system.js +0 -1
  268. package/vendor/rope-sequence-sEGCUMi8.es.js +0 -100
  269. package/vendor/simplebar-core-71xT5g0m.system.js +0 -1
  270. package/vendor/simplebar-core-Db65-Ath.es.js +0 -333
  271. package/vendor/simplebar-vue-BFEeFUIv.system.js +0 -1
  272. package/vendor/simplebar-vue-DAxqu0eM.es.js +0 -176
  273. package/vendor/tippy.js-CuKTz0UR.system.js +0 -1
  274. package/vendor/tippy.js-DNnwm2RY.es.js +0 -721
  275. package/vendor/uuid-93tp0umt.es.js +0 -9
  276. package/vendor/uuid-Cymn6orr.system.js +0 -1
  277. package/vendor/vee-validate-Cc_B-qII.system.js +0 -5
  278. package/vendor/vee-validate-RE5RuswC.es.js +0 -1309
  279. package/vendor/vue-advanced-cropper-CshlvNaD.es.js +0 -1380
  280. package/vendor/vue-advanced-cropper-NG93jHnU.system.js +0 -20
  281. package/vendor/w3c-keyname-BSD-PgAi.system.js +0 -1
  282. package/vendor/w3c-keyname-CLxH8j-f.es.js +0 -92
  283. /package/{assets/lottiejs/loading-plane-CgfbWppy.system.js → loading-page-CgfbWppy.js} +0 -0
  284. /package/{assets/lottiejs/loading-plane-CoXtqoc9.es.js → loading-page-CoXtqoc9.js} +0 -0
@@ -1,2 +0,0 @@
1
- System.register(["./prosemirror-model-DTWK5xnv.system.js"],function(F,Le){"use strict";var w,g,K,Q,U;return{setters:[C=>{w=C.b,g=C.F,K=C.M,Q=C.d,U=C.R}],execute:function(){F({a:be,c:Ce,d:Ee,f:we,j:Re,l:ue,r:ne});const C=65535,V=Math.pow(2,16);function he(s,e){return s+e*V}function X(s){return s&C}function pe(s){return(s-(s&C))/V}const Y=1,Z=2,W=4,_=8;class D{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&_)>0}get deletedBefore(){return(this.delInfo&(Y|W))>0}get deletedAfter(){return(this.delInfo&(Z|W))>0}get deletedAcross(){return(this.delInfo&W)>0}}class S{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&S.empty)return S.empty}recover(e){let t=0,r=X(e);if(!this.inverted)for(let n=0;n<r;n++)t+=this.ranges[n*3+2]-this.ranges[n*3+1];return this.ranges[r*3]+t+pe(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let n=0,i=this.inverted?2:1,l=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let a=this.ranges[o]-(this.inverted?n:0);if(a>e)break;let h=this.ranges[o+i],p=this.ranges[o+l],c=a+h;if(e<=c){let f=h?e==a?-1:e==c?1:t:t,d=a+n+(f<0?0:p);if(r)return d;let u=e==(t<0?a:c)?null:he(o/3,e-a),m=e==a?Z:e==c?Y:W;return(t<0?e!=a:e!=c)&&(m|=_),new D(d,m,u)}n+=p-h}return r?e+n:new D(e+n,0,null)}touches(e,t){let r=0,n=X(t),i=this.inverted?2:1,l=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let a=this.ranges[o]-(this.inverted?r:0);if(a>e)break;let h=this.ranges[o+i],p=a+h;if(e<=p&&o==n*3)return!0;r+=this.ranges[o+l]-h}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let n=0,i=0;n<this.ranges.length;n+=3){let l=this.ranges[n],o=l-(this.inverted?i:0),a=l+(this.inverted?0:i),h=this.ranges[n+t],p=this.ranges[n+r];e(o,o+h,a,a+p),i+=p-h}}invert(){return new S(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?S.empty:new S(e<0?[0,-e,0]:[0,0,e])}}S.empty=new S([]);class z{constructor(e,t,r=0,n=e?e.length:0){this.mirror=t,this.from=r,this.to=n,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new z(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let n=e.getMirror(t);this.appendMap(e._maps[t],n!=null&&n<t?r+n:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let n=e.getMirror(t);this.appendMap(e._maps[t].invert(),n!=null&&n>t?r-n-1:void 0)}}invert(){let e=new z;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let n=0;for(let i=this.from;i<this.to;i++){let l=this._maps[i],o=l.mapResult(e,t);if(o.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this._maps[a].recover(o.recover);continue}}n|=o.delInfo,e=o.pos}return r?e:new D(e,n,null)}}F("M",z);const L=Object.create(null);class k{getMap(){return S.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=L[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in L)throw new RangeError("Duplicate use of step JSON ID "+e);return L[e]=t,t.prototype.jsonID=e,t}}class y{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new y(e,null)}static fail(e){return new y(null,e)}static fromReplace(e,t,r,n){try{return y.ok(e.replace(t,r,n))}catch(i){if(i instanceof U)return y.fail(i.message);throw i}}}function q(s,e,t){let r=[];for(let n=0;n<s.childCount;n++){let i=s.child(n);i.content.size&&(i=i.copy(q(i.content,e,i))),i.isInline&&(i=e(i,t,n)),r.push(i)}return g.fromArray(r)}class N extends k{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),n=r.node(r.sharedDepth(this.to)),i=new w(q(t.content,(l,o)=>!l.isAtom||!o.type.allowsMarkType(this.mark.type)?l:l.mark(this.mark.addToSet(l.marks)),n),t.openStart,t.openEnd);return y.fromReplace(e,this.from,this.to,i)}invert(){return new M(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new N(t.pos,r.pos,this.mark)}merge(e){return e instanceof N&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new N(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new N(t.from,t.to,e.markFromJSON(t.mark))}}k.jsonID("addMark",N);class M extends k{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new w(q(t.content,n=>n.mark(this.mark.removeFromSet(n.marks)),e),t.openStart,t.openEnd);return y.fromReplace(e,this.from,this.to,r)}invert(){return new N(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new M(t.pos,r.pos,this.mark)}merge(e){return e instanceof M&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new M(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new M(t.from,t.to,e.markFromJSON(t.mark))}}k.jsonID("removeMark",M);class R extends k{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return y.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return y.fromReplace(e,this.pos,this.pos+1,new w(g.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(r))return new R(this.pos,t.marks[n]);return new R(this.pos,this.mark)}}return new I(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new R(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new R(t.pos,e.markFromJSON(t.mark))}}k.jsonID("addNodeMark",R);class I extends k{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return y.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return y.fromReplace(e,this.pos,this.pos+1,new w(g.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new R(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new I(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new I(t.pos,e.markFromJSON(t.mark))}}k.jsonID("removeNodeMark",I);class v extends k{constructor(e,t,r,n=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=n}apply(e){return this.structure&&P(e,this.from,this.to)?y.fail("Structure replace would overwrite content"):y.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new S([this.from,this.to-this.from,this.slice.size])}invert(e){return new v(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new v(t.pos,Math.max(t.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof v)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?w.empty:new w(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new v(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?w.empty:new w(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new v(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new v(t.from,t.to,w.fromJSON(e,t.slice),!!t.structure)}}F("R",v),k.jsonID("replace",v);class b extends k{constructor(e,t,r,n,i,l,o=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=n,this.slice=i,this.insert=l,this.structure=o}apply(e){if(this.structure&&(P(e,this.from,this.gapFrom)||P(e,this.gapTo,this.to)))return y.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return y.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?y.fromReplace(e,this.from,this.to,r):y.fail("Content does not fit in gap")}getMap(){return new S([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new b(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),n=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||n<t.pos||i>r.pos?null:new b(t.pos,r.pos,n,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new b(t.from,t.to,t.gapFrom,t.gapTo,w.fromJSON(e,t.slice),t.insert,!!t.structure)}}F("b",b),k.jsonID("replaceAround",b);function P(s,e,t){let r=s.resolve(e),n=t-e,i=r.depth;for(;n>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,n--;if(n>0){let l=r.node(i).maybeChild(r.indexAfter(i));for(;n>0;){if(!l||l.isLeaf)return!0;l=l.firstChild,n--}}return!1}function fe(s,e,t,r){let n=[],i=[],l,o;s.doc.nodesBetween(e,t,(a,h,p)=>{if(!a.isInline)return;let c=a.marks;if(!r.isInSet(c)&&p.type.allowsMarkType(r.type)){let f=Math.max(h,e),d=Math.min(h+a.nodeSize,t),u=r.addToSet(c);for(let m=0;m<c.length;m++)c[m].isInSet(u)||(l&&l.to==f&&l.mark.eq(c[m])?l.to=d:n.push(l=new M(f,d,c[m])));o&&o.to==f?o.to=d:i.push(o=new N(f,d,r))}}),n.forEach(a=>s.step(a)),i.forEach(a=>s.step(a))}function ce(s,e,t,r){let n=[],i=0;s.doc.nodesBetween(e,t,(l,o)=>{if(!l.isInline)return;i++;let a=null;if(r instanceof Q){let h=l.marks,p;for(;p=r.isInSet(h);)(a||(a=[])).push(p),h=p.removeFromSet(h)}else r?r.isInSet(l.marks)&&(a=[r]):a=l.marks;if(a&&a.length){let h=Math.min(o+l.nodeSize,t);for(let p=0;p<a.length;p++){let c=a[p],f;for(let d=0;d<n.length;d++){let u=n[d];u.step==i-1&&c.eq(n[d].style)&&(f=u)}f?(f.to=h,f.step=i):n.push({style:c,from:Math.max(o,e),to:h,step:i})}}}),n.forEach(l=>s.step(new M(l.from,l.to,l.style)))}function $(s,e,t,r=t.contentMatch,n=!0){let i=s.doc.nodeAt(e),l=[],o=e+1;for(let a=0;a<i.childCount;a++){let h=i.child(a),p=o+h.nodeSize,c=r.matchType(h.type);if(!c)l.push(new v(o,p,w.empty));else{r=c;for(let f=0;f<h.marks.length;f++)t.allowsMarkType(h.marks[f].type)||s.step(new M(o,p,h.marks[f]));if(n&&h.isText&&t.whitespace!="pre"){let f,d=/\r?\n|\r/g,u;for(;f=d.exec(h.text);)u||(u=new w(g.from(t.schema.text(" ",t.allowedMarks(h.marks))),0,0)),l.push(new v(o+f.index,o+f.index+f[0].length,u))}}o=p}if(!r.validEnd){let a=r.fillBefore(g.empty,!0);s.replace(o,o,new w(a,0,0))}for(let a=l.length-1;a>=0;a--)s.step(l[a])}function de(s,e,t){return(e==0||s.canReplace(e,s.childCount))&&(t==s.childCount||s.canReplace(0,t))}function ue(s){let t=s.parent.content.cutByIndex(s.startIndex,s.endIndex);for(let r=s.depth;;--r){let n=s.$from.node(r),i=s.$from.index(r),l=s.$to.indexAfter(r);if(r<s.depth&&n.canReplace(i,l,t))return r;if(r==0||n.type.spec.isolating||!de(n,i,l))break}return null}function me(s,e,t){let{$from:r,$to:n,depth:i}=e,l=r.before(i+1),o=n.after(i+1),a=l,h=o,p=g.empty,c=0;for(let u=i,m=!1;u>t;u--)m||r.index(u)>0?(m=!0,p=g.from(r.node(u).copy(p)),c++):a--;let f=g.empty,d=0;for(let u=i,m=!1;u>t;u--)m||n.after(u+1)<n.end(u)?(m=!0,f=g.from(n.node(u).copy(f)),d++):h++;s.step(new b(a,h,l,o,new w(p.append(f),c,d),p.size-c,!0))}function we(s,e,t=null,r=s){let n=ge(s,e),i=n&&ye(r,e);return i?n.map(j).concat({type:e,attrs:t}).concat(i.map(j)):null}function j(s){return{type:s,attrs:null}}function ge(s,e){let{parent:t,startIndex:r,endIndex:n}=s,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let l=i.length?i[0]:e;return t.canReplaceWith(r,n,l)?i:null}function ye(s,e){let{parent:t,startIndex:r,endIndex:n}=s,i=t.child(r),l=e.contentMatch.findWrapping(i.type);if(!l)return null;let a=(l.length?l[l.length-1]:e).contentMatch;for(let h=r;a&&h<n;h++)a=a.matchType(t.child(h).type);return!a||!a.validEnd?null:l}function ke(s,e,t){let r=g.empty;for(let l=t.length-1;l>=0;l--){if(r.size){let o=t[l].type.contentMatch.matchFragment(r);if(!o||!o.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=g.from(t[l].type.create(t[l].attrs,r))}let n=e.start,i=e.end;s.step(new b(n,i,n,i,new w(r,0,0),t.length,!0))}function ve(s,e,t,r,n){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=s.steps.length;s.doc.nodesBetween(e,t,(l,o)=>{let a=typeof n=="function"?n(l):n;if(l.isTextblock&&!l.hasMarkup(r,a)&&Se(s.doc,s.mapping.slice(i).map(o),r)){let h=null;if(r.schema.linebreakReplacement){let d=r.whitespace=="pre",u=!!r.contentMatch.matchType(r.schema.linebreakReplacement);d&&!u?h=!1:!d&&u&&(h=!0)}h===!1&&te(s,l,o,i),$(s,s.mapping.slice(i).map(o,1),r,void 0,h===null);let p=s.mapping.slice(i),c=p.map(o,1),f=p.map(o+l.nodeSize,1);return s.step(new b(c,f,c+1,f-1,new w(g.from(r.create(a,null,l.marks)),0,0),1,!0)),h===!0&&ee(s,l,o,i),!1}})}function ee(s,e,t,r){e.forEach((n,i)=>{if(n.isText){let l,o=/\r?\n|\r/g;for(;l=o.exec(n.text);){let a=s.mapping.slice(r).map(t+1+i+l.index);s.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function te(s,e,t,r){e.forEach((n,i)=>{if(n.type==n.type.schema.linebreakReplacement){let l=s.mapping.slice(r).map(t+1+i);s.replaceWith(l,l+1,e.type.schema.text(`
2
- `))}})}function Se(s,e,t){let r=s.resolve(e),n=r.index();return r.parent.canReplaceWith(n,n+1,t)}function xe(s,e,t,r,n){let i=s.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);let l=t.create(r,null,n||i.marks);if(i.isLeaf)return s.replaceWith(e,e+i.nodeSize,l);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);s.step(new b(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new w(g.from(l),0,0),1,!0))}function be(s,e,t=1,r){let n=s.resolve(e),i=n.depth-t,l=r&&r[r.length-1]||n.parent;if(i<0||n.parent.type.spec.isolating||!n.parent.canReplace(n.index(),n.parent.childCount)||!l.type.validContent(n.parent.content.cutByIndex(n.index(),n.parent.childCount)))return!1;for(let h=n.depth-1,p=t-2;h>i;h--,p--){let c=n.node(h),f=n.index(h);if(c.type.spec.isolating)return!1;let d=c.content.cutByIndex(f,c.childCount),u=r&&r[p+1];u&&(d=d.replaceChild(0,u.type.create(u.attrs)));let m=r&&r[p]||c;if(!c.canReplace(f+1,c.childCount)||!m.type.validContent(d))return!1}let o=n.indexAfter(i),a=r&&r[0];return n.node(i).canReplaceWith(o,o,a?a.type:n.node(i+1).type)}function Me(s,e,t=1,r){let n=s.doc.resolve(e),i=g.empty,l=g.empty;for(let o=n.depth,a=n.depth-t,h=t-1;o>a;o--,h--){i=g.from(n.node(o).copy(i));let p=r&&r[h];l=g.from(p?p.type.create(p.attrs,l):n.node(o).copy(l))}s.step(new v(e,e,new w(i.append(l),t,t),!0))}function Ce(s,e){let t=s.resolve(e),r=t.index();return re(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function Ne(s,e){e.content.size||s.type.compatibleContent(e.type);let t=s.contentMatchAt(s.childCount),{linebreakReplacement:r}=s.type.schema;for(let n=0;n<e.childCount;n++){let i=e.child(n),l=i.type==r?s.type.schema.nodes.text:i.type;if(t=t.matchType(l),!t||!s.type.allowsMarks(i.marks))return!1}return t.validEnd}function re(s,e){return!!(s&&e&&!s.isLeaf&&Ne(s,e))}function Re(s,e,t=-1){let r=s.resolve(e);for(let n=r.depth;;n--){let i,l,o=r.index(n);if(n==r.depth?(i=r.nodeBefore,l=r.nodeAfter):t>0?(i=r.node(n+1),o++,l=r.node(n).maybeChild(o)):(i=r.node(n).maybeChild(o-1),l=r.node(n+1)),i&&!i.isTextblock&&re(i,l)&&r.node(n).canReplace(o,o+1))return e;if(n==0)break;e=t<0?r.before(n):r.after(n)}}function Ie(s,e,t){let r=null,{linebreakReplacement:n}=s.doc.type.schema,i=s.doc.resolve(e-t),l=i.node().type;if(n&&l.inlineContent){let p=l.whitespace=="pre",c=!!l.contentMatch.matchType(n);p&&!c?r=!1:!p&&c&&(r=!0)}let o=s.steps.length;if(r===!1){let p=s.doc.resolve(e+t);te(s,p.node(),p.before(),o)}l.inlineContent&&$(s,e+t-1,l,i.node().contentMatchAt(i.index()),r==null);let a=s.mapping.slice(o),h=a.map(e-t);if(s.step(new v(h,a.map(e+t,-1),w.empty,!0)),r===!0){let p=s.doc.resolve(h);ee(s,p.node(),p.before(),s.steps.length)}return s}function Te(s,e,t){let r=s.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let n=r.depth-1;n>=0;n--){let i=r.index(n);if(r.node(n).canReplaceWith(i,i,t))return r.before(n+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let n=r.depth-1;n>=0;n--){let i=r.indexAfter(n);if(r.node(n).canReplaceWith(i,i,t))return r.after(n+1);if(i<r.node(n).childCount)return null}return null}function Ee(s,e,t){let r=s.resolve(e);if(!t.content.size)return e;let n=t.content;for(let i=0;i<t.openStart;i++)n=n.firstChild.content;for(let i=1;i<=(t.openStart==0&&t.size?2:1);i++)for(let l=r.depth;l>=0;l--){let o=l==r.depth?0:r.pos<=(r.start(l+1)+r.end(l+1))/2?-1:1,a=r.index(l)+(o>0?1:0),h=r.node(l),p=!1;if(i==1)p=h.canReplace(a,a,n);else{let c=h.contentMatchAt(a).findWrapping(n.firstChild.type);p=c&&h.canReplaceWith(a,a,c[0])}if(p)return o==0?r.pos:o<0?r.before(l+1):r.after(l+1)}return null}function ne(s,e,t=e,r=w.empty){if(e==t&&!r.size)return null;let n=s.resolve(e),i=s.resolve(t);return ie(n,i,r)?new v(e,t,r):new Oe(n,i,r).fit()}function ie(s,e,t){return!t.openStart&&!t.openEnd&&s.start()==e.start()&&s.parent.canReplace(s.index(),e.index(),t.content)}class Oe{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=g.empty;for(let n=0;n<=e.depth;n++){let i=e.node(n);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(n))})}for(let n=e.depth;n>0;n--)this.placed=g.from(e.node(n).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let h=this.findFittable();h?this.placeNodes(h):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,n=this.close(e<0?this.$to:r.doc.resolve(e));if(!n)return null;let i=this.placed,l=r.depth,o=n.depth;for(;l&&o&&i.childCount==1;)i=i.firstChild.content,l--,o--;let a=new w(i,l,o);return e>-1?new b(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new v(r.pos,n.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,n=this.unplaced.openEnd;r<e;r++){let i=t.firstChild;if(t.childCount>1&&(n=0),i.type.spec.isolating&&n<=r){e=r;break}t=i.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let n,i=null;r?(i=G(this.unplaced.content,r-1).firstChild,n=i.content):n=this.unplaced.content;let l=n.firstChild;for(let o=this.depth;o>=0;o--){let{type:a,match:h}=this.frontier[o],p,c=null;if(t==1&&(l?h.matchType(l.type)||(c=h.fillBefore(g.from(l),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:o,parent:i,inject:c};if(t==2&&l&&(p=h.findWrapping(l.type)))return{sliceDepth:r,frontierDepth:o,parent:i,wrap:p};if(i&&h.matchType(i.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,n=G(e,t);return!n.childCount||n.firstChild.isLeaf?!1:(this.unplaced=new w(e,t+1,Math.max(r,n.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,n=G(e,t);if(n.childCount<=1&&t>0){let i=e.size-t<=t+n.size;this.unplaced=new w(J(e,t-1,1),t-1,i?t-1:r)}else this.unplaced=new w(J(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:n,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let m=0;m<i.length;m++)this.openFrontierNode(i[m]);let l=this.unplaced,o=r?r.content:l.content,a=l.openStart-e,h=0,p=[],{match:c,type:f}=this.frontier[t];if(n){for(let m=0;m<n.childCount;m++)p.push(n.child(m));c=c.matchFragment(n)}let d=o.size+e-(l.content.size-l.openEnd);for(;h<o.childCount;){let m=o.child(h),x=c.matchType(m.type);if(!x)break;h++,(h>1||a==0||m.content.size)&&(c=x,p.push(se(m.mark(f.allowedMarks(m.marks)),h==1?a:0,h==o.childCount?d:-1)))}let u=h==o.childCount;u||(d=-1),this.placed=A(this.placed,t,g.from(p)),this.frontier[t].match=c,u&&d<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,x=o;m<d;m++){let T=x.lastChild;this.frontier.push({type:T.type,match:T.contentMatchAt(T.childCount)}),x=T.content}this.unplaced=u?e==0?w.empty:new w(J(l.content,e-1,1),e-1,d<0?l.openEnd:e-1):new w(J(l.content,e,h),l.openStart,l.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!H(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,n=this.$to.after(r);for(;r>1&&n==this.$to.end(--r);)++n;return n}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:n}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),l=H(e,t,n,r,i);if(l){for(let o=t-1;o>=0;o--){let{match:a,type:h}=this.frontier[o],p=H(e,o,h,a,!0);if(!p||p.childCount)continue e}return{depth:t,fit:l,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=A(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let n=e.node(r),i=n.type.contentMatch.fillBefore(n.content,!0,e.index(r));this.openFrontierNode(n.type,n.attrs,i)}return e}openFrontierNode(e,t=null,r){let n=this.frontier[this.depth];n.match=n.match.matchType(e),this.placed=A(this.placed,this.depth,g.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(g.empty,!0);t.childCount&&(this.placed=A(this.placed,this.frontier.length,t))}}function J(s,e,t){return e==0?s.cutByIndex(t,s.childCount):s.replaceChild(0,s.firstChild.copy(J(s.firstChild.content,e-1,t)))}function A(s,e,t){return e==0?s.append(t):s.replaceChild(s.childCount-1,s.lastChild.copy(A(s.lastChild.content,e-1,t)))}function G(s,e){for(let t=0;t<e;t++)s=s.firstChild.content;return s}function se(s,e,t){if(e<=0)return s;let r=s.content;return e>1&&(r=r.replaceChild(0,se(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=s.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(s.type.contentMatch.matchFragment(r).fillBefore(g.empty,!0)))),s.copy(r)}function H(s,e,t,r,n){let i=s.node(e),l=n?s.indexAfter(e):s.index(e);if(l==i.childCount&&!t.compatibleContent(i.type))return null;let o=r.fillBefore(i.content,!0,l);return o&&!Fe(t,i.content,l)?o:null}function Fe(s,e,t){for(let r=t;r<e.childCount;r++)if(!s.allowsMarks(e.child(r).marks))return!0;return!1}function ze(s){return s.spec.defining||s.spec.definingForContent}function Je(s,e,t,r){if(!r.size)return s.deleteRange(e,t);let n=s.doc.resolve(e),i=s.doc.resolve(t);if(ie(n,i,r))return s.step(new v(e,t,r));let l=oe(n,s.doc.resolve(t));l[l.length-1]==0&&l.pop();let o=-(n.depth+1);l.unshift(o);for(let f=n.depth,d=n.pos-1;f>0;f--,d--){let u=n.node(f).type.spec;if(u.defining||u.definingAsContext||u.isolating)break;l.indexOf(f)>-1?o=f:n.before(f)==d&&l.splice(1,0,-f)}let a=l.indexOf(o),h=[],p=r.openStart;for(let f=r.content,d=0;;d++){let u=f.firstChild;if(h.push(u),d==r.openStart)break;f=u.content}for(let f=p-1;f>=0;f--){let d=h[f],u=ze(d.type);if(u&&!d.sameMarkup(n.node(Math.abs(o)-1)))p=f;else if(u||!d.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let d=(f+p+1)%(r.openStart+1),u=h[d];if(u)for(let m=0;m<l.length;m++){let x=l[(m+a)%l.length],T=!0;x<0&&(T=!1,x=-x);let De=n.node(x-1),ae=n.index(x-1);if(De.canReplaceWith(ae,ae,u.type,u.marks))return s.replace(n.before(x),T?i.after(x):t,new w(le(r.content,0,r.openStart,d),d,r.openEnd))}}let c=s.steps.length;for(let f=l.length-1;f>=0&&(s.replace(e,t,r),!(s.steps.length>c));f--){let d=l[f];d<0||(e=n.before(d),t=i.after(d))}}function le(s,e,t,r,n){if(e<t){let i=s.firstChild;s=s.replaceChild(0,i.copy(le(i.content,e+1,t,r,i)))}if(e>r){let i=n.contentMatchAt(0),l=i.fillBefore(s).append(s);s=l.append(i.matchFragment(l).fillBefore(g.empty,!0))}return s}function Ae(s,e,t,r){if(!r.isInline&&e==t&&s.doc.resolve(e).parent.content.size){let n=Te(s.doc,e,r.type);n!=null&&(e=t=n)}s.replaceRange(e,t,new w(g.from(r),0,0))}function Be(s,e,t){let r=s.doc.resolve(e),n=s.doc.resolve(t),i=oe(r,n);for(let l=0;l<i.length;l++){let o=i[l],a=l==i.length-1;if(a&&o==0||r.node(o).type.contentMatch.validEnd)return s.delete(r.start(o),n.end(o));if(o>0&&(a||r.node(o-1).canReplace(r.index(o-1),n.indexAfter(o-1))))return s.delete(r.before(o),n.after(o))}for(let l=1;l<=r.depth&&l<=n.depth;l++)if(e-r.start(l)==r.depth-l&&t>r.end(l)&&n.end(l)-t!=n.depth-l&&r.start(l-1)==n.start(l-1)&&r.node(l-1).canReplace(r.index(l-1),n.index(l-1)))return s.delete(r.before(l),t);s.delete(e,t)}function oe(s,e){let t=[],r=Math.min(s.depth,e.depth);for(let n=r;n>=0;n--){let i=s.start(n);if(i<s.pos-(s.depth-n)||e.end(n)>e.pos+(e.depth-n)||s.node(n).type.spec.isolating||e.node(n).type.spec.isolating)break;(i==e.start(n)||n==s.depth&&n==e.depth&&s.parent.inlineContent&&e.parent.inlineContent&&n&&e.start(n-1)==i-1)&&t.push(n)}return t}class E extends k{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return y.fail("No node at attribute step's position");let r=Object.create(null);for(let i in t.attrs)r[i]=t.attrs[i];r[this.attr]=this.value;let n=t.type.create(r,null,t.marks);return y.fromReplace(e,this.pos,this.pos+1,new w(g.from(n),0,t.isLeaf?0:1))}getMap(){return S.empty}invert(e){return new E(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new E(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new E(t.pos,t.attr,t.value)}}k.jsonID("attr",E);class B extends k{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return y.ok(r)}getMap(){return S.empty}invert(e){return new B(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new B(t.attr,t.value)}}k.jsonID("docAttr",B);let O=class extends Error{};O=function s(e){let t=Error.call(this,e);return t.__proto__=s.prototype,t},O.prototype=Object.create(Error.prototype),O.prototype.constructor=O,O.prototype.name="TransformError";class We{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new z}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new O(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=w.empty){let n=ne(this.doc,e,t,r);return n&&this.step(n),this}replaceWith(e,t,r){return this.replace(e,t,new w(g.from(r),0,0))}delete(e,t){return this.replace(e,t,w.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return Je(this,e,t,r),this}replaceRangeWith(e,t,r){return Ae(this,e,t,r),this}deleteRange(e,t){return Be(this,e,t),this}lift(e,t){return me(this,e,t),this}join(e,t=1){return Ie(this,e,t),this}wrap(e,t){return ke(this,e,t),this}setBlockType(e,t=e,r,n=null){return ve(this,e,t,r,n),this}setNodeMarkup(e,t,r=null,n){return xe(this,e,t,r,n),this}setNodeAttribute(e,t,r){return this.step(new E(e,t,r)),this}setDocAttribute(e,t){return this.step(new B(e,t)),this}addNodeMark(e,t){return this.step(new R(e,t)),this}removeNodeMark(e,t){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t instanceof K)t.isInSet(r.marks)&&this.step(new I(e,t));else{let n=r.marks,i,l=[];for(;i=t.isInSet(n);)l.push(new I(e,i)),n=i.removeFromSet(n);for(let o=l.length-1;o>=0;o--)this.step(l[o])}return this}split(e,t=1,r){return Me(this,e,t,r),this}addMark(e,t,r){return fe(this,e,t,r),this}removeMark(e,t,r){return ce(this,e,t,r),this}clearIncompatible(e,t,r){return $(this,e,t,r),this}}F("T",We)}}});
@@ -1,5 +0,0 @@
1
- System.register(["./prosemirror-state-DzPLD-6l.system.js","./prosemirror-model-DTWK5xnv.system.js","./prosemirror-transform-VaXuT0NM.system.js"],function(ze,ai){"use strict";var N,ee,C,ct,q,me,z,Le,dt,ft;return{setters:[D=>{N=D.N,ee=D.S,C=D.T,ct=D.A},D=>{q=D.b,me=D.D,z=D.F,Le=D.a,dt=D.M},D=>{ft=D.d}],execute:function(){const D=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},ce=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let $e=null;const K=function(t,e,n){let o=$e||($e=document.createRange());return o.setEnd(t,n??t.nodeValue.length),o.setStart(t,e||0),o},xn=function(){$e=null},te=function(t,e,n,o){return n&&(ht(t,e,n,o,-1)||ht(t,e,n,o,1))},kn=/^(img|br|input|textarea|hr)$/i;function ht(t,e,n,o,i){for(;;){if(t==n&&e==o)return!0;if(e==(i<0?0:V(t))){let s=t.parentNode;if(!s||s.nodeType!=1||ge(t)||kn.test(t.nodeName)||t.contentEditable=="false")return!1;e=D(t)+(i<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.contentEditable=="false")return!1;e=i<0?V(t):0}else return!1}}function V(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Tn(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=V(t)}else if(t.parentNode&&!ge(t))e=D(t),t=t.parentNode;else return null}}function An(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!ge(t))e=D(t)+1,t=t.parentNode;else return null}}function En(t,e,n){for(let o=e==0,i=e==V(t);o||i;){if(t==n)return!0;let s=D(t);if(t=t.parentNode,!t)return!1;o=o&&s==0,i=i&&s==V(t)}}function ge(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const ke=function(t){return t.focusNode&&te(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function ne(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function Pn(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Vn(t,e,n){if(t.caretPositionFromPoint)try{let o=t.caretPositionFromPoint(e,n);if(o)return{node:o.offsetNode,offset:Math.min(V(o.offsetNode),o.offset)}}catch{}if(t.caretRangeFromPoint){let o=t.caretRangeFromPoint(e,n);if(o)return{node:o.startContainer,offset:Math.min(V(o.startContainer),o.startOffset)}}}const L=typeof navigator<"u"?navigator:null,ut=typeof document<"u"?document:null,j=L&&L.userAgent||"",qe=/Edge\/(\d+)/.exec(j),pt=/MSIE \d/.exec(j),Ke=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(j),A=!!(pt||Ke||qe),U=pt?document.documentMode:Ke?+Ke[1]:qe?+qe[1]:0,F=!A&&/gecko\/(\d+)/i.test(j);F&&+(/Firefox\/(\d+)/.exec(j)||[0,0])[1];const He=!A&&/Chrome\/(\d+)/.exec(j),O=!!He,mt=He?+He[1]:0,x=!A&&!!L&&/Apple Computer/.test(L.vendor),de=x&&(/Mobile\/\w+/.test(j)||!!L&&L.maxTouchPoints>2),R=de||(L?/Mac/.test(L.platform):!1),Rn=L?/Win/.test(L.platform):!1,H=/Android \d/.test(j),ye=!!ut&&"webkitFontSmoothing"in ut.documentElement.style,Bn=ye?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function In(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function W(t,e){return typeof t=="number"?t:t[e]}function Fn(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,o=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*o}}function gt(t,e,n){let o=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,s=t.dom.ownerDocument;for(let r=n||t.dom;r;){if(r.nodeType!=1){r=ce(r);continue}let l=r,a=l==s.body,c=a?In(s):Fn(l),d=0,f=0;if(e.top<c.top+W(o,"top")?f=-(c.top-e.top+W(i,"top")):e.bottom>c.bottom-W(o,"bottom")&&(f=e.bottom-e.top>c.bottom-c.top?e.top+W(i,"top")-c.top:e.bottom-c.bottom+W(i,"bottom")),e.left<c.left+W(o,"left")?d=-(c.left-e.left+W(i,"left")):e.right>c.right-W(o,"right")&&(d=e.right-c.right+W(i,"right")),d||f)if(a)s.defaultView.scrollBy(d,f);else{let p=l.scrollLeft,h=l.scrollTop;f&&(l.scrollTop+=f),d&&(l.scrollLeft+=d);let g=l.scrollLeft-p,m=l.scrollTop-h;e={left:e.left-g,top:e.top-m,right:e.right-g,bottom:e.bottom-m}}let u=a?"fixed":getComputedStyle(r).position;if(/^(fixed|sticky)$/.test(u))break;r=u=="absolute"?r.offsetParent:ce(r)}}function zn(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),o,i;for(let s=(e.left+e.right)/2,r=n+1;r<Math.min(innerHeight,e.bottom);r+=5){let l=t.root.elementFromPoint(s,r);if(!l||l==t.dom||!t.dom.contains(l))continue;let a=l.getBoundingClientRect();if(a.top>=n-20){o=l,i=a.top;break}}return{refDOM:o,refTop:i,stack:yt(t.dom)}}function yt(t){let e=[],n=t.ownerDocument;for(let o=t;o&&(e.push({dom:o,top:o.scrollTop,left:o.scrollLeft}),t!=n);o=ce(o));return e}function Ln({refDOM:t,refTop:e,stack:n}){let o=t?t.getBoundingClientRect().top:0;bt(n,o==0?0:o-e)}function bt(t,e){for(let n=0;n<t.length;n++){let{dom:o,top:i,left:s}=t[n];o.scrollTop!=i+e&&(o.scrollTop=i+e),o.scrollLeft!=s&&(o.scrollLeft=s)}}let fe=null;function $n(t){if(t.setActive)return t.setActive();if(fe)return t.focus(fe);let e=yt(t);t.focus(fe==null?{get preventScroll(){return fe={preventScroll:!0},!0}}:void 0),fe||(fe=!1,bt(e,0))}function Dt(t,e){let n,o=2e8,i,s=0,r=e.top,l=e.top,a,c;for(let d=t.firstChild,f=0;d;d=d.nextSibling,f++){let u;if(d.nodeType==1)u=d.getClientRects();else if(d.nodeType==3)u=K(d).getClientRects();else continue;for(let p=0;p<u.length;p++){let h=u[p];if(h.top<=r&&h.bottom>=l){r=Math.max(h.bottom,r),l=Math.min(h.top,l);let g=h.left>e.left?h.left-e.left:h.right<e.left?e.left-h.right:0;if(g<o){n=d,o=g,i=g&&n.nodeType==3?{left:h.right<e.left?h.right:h.left,top:e.top}:e,d.nodeType==1&&g&&(s=f+(e.left>=(h.left+h.right)/2?1:0));continue}}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});!n&&(e.left>=h.right&&e.top>=h.top||e.left>=h.left&&e.top>=h.bottom)&&(s=f+1)}}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}:Dt(n,i)}function qn(t,e){let n=t.nodeValue.length,o=document.createRange();for(let i=0;i<n;i++){o.setEnd(t,i+1),o.setStart(t,i);let s=Y(o,1);if(s.top!=s.bottom&&We(e,s))return{node:t,offset:i+(e.left>=(s.left+s.right)/2?1:0)}}return{node:t,offset:0}}function We(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Kn(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function Hn(t,e,n){let{node:o,offset:i}=Dt(e,n),s=-1;if(o.nodeType==1&&!o.firstChild){let r=o.getBoundingClientRect();s=r.left!=r.right&&n.left>(r.left+r.right)/2?1:-1}return t.docView.posFromDOM(o,i,s)}function Wn(t,e,n,o){let i=-1;for(let s=e,r=!1;s!=t.dom;){let l=t.docView.nearestDesc(s,!0),a;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((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))return(l.node.isBlock?o.top<(a.top+a.bottom)/2:o.left<(a.left+a.right)/2)?l.posBefore:l.posAfter;s=l.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,-1)}function Nt(t,e,n){let o=t.childNodes.length;if(o&&n.top<n.bottom)for(let i=Math.max(0,Math.min(o-1,Math.floor(o*(e.top-n.top)/(n.bottom-n.top))-2)),s=i;;){let r=t.childNodes[s];if(r.nodeType==1){let l=r.getClientRects();for(let a=0;a<l.length;a++){let c=l[a];if(We(e,c))return Nt(r,e,c)}}if((s=(s+1)%o)==i)break}return t}function _n(t,e){let n=t.dom.ownerDocument,o,i=0,s=Vn(n,e.left,e.top);s&&({node:o,offset:i}=s);let r=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),l;if(!r||!t.dom.contains(r.nodeType!=1?r.parentNode:r)){let c=t.dom.getBoundingClientRect();if(!We(e,c)||(r=Nt(t.dom,e,c),!r))return null}if(x)for(let c=r;o&&c;c=ce(c))c.draggable&&(o=void 0);if(r=Kn(r,e),o){if(F&&o.nodeType==1&&(i=Math.min(i,o.childNodes.length),i<o.childNodes.length)){let d=o.childNodes[i],f;d.nodeName=="IMG"&&(f=d.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&i++}let c;ye&&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))}l==null&&(l=Hn(t,r,e));let a=t.docView.nearestDesc(r,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function St(t){return t.top<t.bottom||t.left<t.right}function Y(t,e){let n=t.getClientRects();if(n.length){let o=n[e<0?0:n.length-1];if(St(o))return o}return Array.prototype.find.call(n,St)||t.getBoundingClientRect()}const jn=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Ct(t,e,n){let{node:o,offset:i,atom:s}=t.docView.domFromPos(e,n<0?-1:1),r=ye||F;if(o.nodeType==3)if(r&&(jn.test(o.nodeValue)||(n<0?!i:i==o.nodeValue.length))){let a=Y(K(o,i,i),n);if(F&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){let c=Y(K(o,i-1,i-1),-1);if(c.top==a.top){let d=Y(K(o,i,i+1),-1);if(d.top!=a.top)return be(d,d.left<c.left)}}return a}else{let a=i,c=i,d=n<0?1:-1;return n<0&&!i?(c++,d=-1):n>=0&&i==o.nodeValue.length?(a--,d=1):n<0?a--:c++,be(Y(K(o,a,c),d),d<0)}if(!t.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&i&&(n<0||i==V(o))){let a=o.childNodes[i-1];if(a.nodeType==1)return _e(a.getBoundingClientRect(),!1)}if(s==null&&i<V(o)){let a=o.childNodes[i];if(a.nodeType==1)return _e(a.getBoundingClientRect(),!0)}return _e(o.getBoundingClientRect(),n>=0)}if(s==null&&i&&(n<0||i==V(o))){let a=o.childNodes[i-1],c=a.nodeType==3?K(a,V(a)-(r?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return be(Y(c,1),!1)}if(s==null&&i<V(o)){let a=o.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let c=a?a.nodeType==3?K(a,0,r?0:1):a.nodeType==1?a:null:null;if(c)return be(Y(c,-1),!0)}return be(Y(o.nodeType==3?K(o):o,-n),n>=0)}function be(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function _e(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Ot(t,e,n){let o=t.state,i=t.root.activeElement;o!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{o!=e&&t.updateState(o),i!=t.dom&&i&&i.focus()}}function Un(t,e,n){let o=e.selection,i=n=="up"?o.$from:o.$to;return Ot(t,e,()=>{let{node:s}=t.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let l=t.docView.nearestDesc(s,!0);if(!l)break;if(l.node.isBlock){s=l.contentDOM||l.dom;break}s=l.dom.parentNode}let r=Ct(t,i.pos,1);for(let l=s.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=K(l,0,l.nodeValue.length).getClientRects();else continue;for(let c=0;c<a.length;c++){let d=a[c];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))return!1}}return!0})}const Yn=/[\u0590-\u08ac]/;function Gn(t,e,n){let{$head:o}=e.selection;if(!o.parent.isTextblock)return!1;let i=o.parentOffset,s=!i,r=i==o.parent.content.size,l=t.domSelection();return l?!Yn.test(o.parent.textContent)||!l.modify?n=="left"||n=="backward"?s:r:Ot(t,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:d,anchorOffset:f}=t.domSelectionRange(),u=l.caretBidiLevel;l.modify("move",n,"character");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;try{l.collapse(d,f),a&&(a!=d||c!=f)&&l.extend&&l.extend(a,c)}catch{}return u!=null&&(l.caretBidiLevel=u),m}):o.pos==o.start()||o.pos==o.end()}let Mt=null,xt=null,kt=!1;function Xn(t,e,n){return Mt==e&&xt==n?kt:(Mt=e,xt=n,kt=n=="up"||n=="down"?Un(t,e,n):Gn(t,e,n))}const B=0,Tt=1,oe=2,$=3;class De{constructor(e,n,o,i){this.parent=e,this.children=n,this.dom=o,this.contentDOM=i,this.dirty=B,o.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,o){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,o=this.posAtStart;;n++){let i=this.children[n];if(i==e)return o;o+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,o){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(o<0){let s,r;if(e==this.contentDOM)s=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.previousSibling}for(;s&&!((r=s.pmViewDesc)&&r.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(r)+r.size:this.posAtStart}else{let s,r;if(e==this.contentDOM)s=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.nextSibling}for(;s&&!((r=s.pmViewDesc)&&r.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(r):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=n>D(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??o>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let o=!0,i=e;i;i=i.parentNode){let s=this.getDesc(i),r;if(s&&(!n||s.node))if(o&&(r=s.nodeDOM)&&!(r.nodeType==1?r.contains(e.nodeType==1?e:e.parentNode):r==e))o=!1;else return s}}getDesc(e){let n=e.pmViewDesc;for(let o=n;o;o=o.parent)if(o==this)return n}posFromDOM(e,n,o){for(let i=e;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(e,n,o)}return-1}descAt(e){for(let n=0,o=0;n<this.children.length;n++){let i=this.children[n],s=o+i.size;if(o==e&&s!=o){for(;!i.border&&i.children.length;)for(let r=0;r<i.children.length;r++){let l=i.children[r];if(l.size){i=l;break}}return i}if(e<s)return i.descAt(e-o-i.border);o=s}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let o=0,i=0;for(let s=0;o<this.children.length;o++){let r=this.children[o],l=s+r.size;if(l>e||r instanceof Pt){i=e-s;break}s=l}if(i)return this.children[o].domFromPos(i-this.children[o].border,n);for(let s;o&&!(s=this.children[o-1]).size&&s instanceof At&&s.side>=0;o--);if(n<=0){let s,r=!0;for(;s=o?this.children[o-1]:null,!(!s||s.dom.parentNode==this.contentDOM);o--,r=!1);return s&&n&&r&&!s.border&&!s.domAtom?s.domFromPos(s.size,n):{node:this.contentDOM,offset:s?D(s.dom)+1:0}}else{let s,r=!0;for(;s=o<this.children.length?this.children[o]:null,!(!s||s.dom.parentNode==this.contentDOM);o++,r=!1);return s&&r&&!s.border&&!s.domAtom?s.domFromPos(0,n):{node:this.contentDOM,offset:s?D(s.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,o=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,s=-1;for(let r=o,l=0;;l++){let a=this.children[l],c=r+a.size;if(i==-1&&e<=c){let d=r+a.border;if(e>=d&&n<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,n,d);e=r;for(let f=l;f>0;f--){let u=this.children[f-1];if(u.size&&u.dom.parentNode==this.contentDOM&&!u.emptyChildAt(1)){i=D(u.dom)+1;break}e-=u.size}i==-1&&(i=0)}if(i>-1&&(c>n||l==this.children.length-1)){n=c;for(let d=l+1;d<this.children.length;d++){let f=this.children[d];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){s=D(f.dom);break}n+=f.size}s==-1&&(s=this.contentDOM.childNodes.length);break}r=c}return{node:this.contentDOM,from:e,to:n,fromOffset:i,toOffset:s}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:o}=this.domFromPos(e,0);if(n.nodeType!=1||o==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[o]}setSelection(e,n,o,i=!1){let s=Math.min(e,n),r=Math.max(e,n);for(let p=0,h=0;p<this.children.length;p++){let g=this.children[p],m=h+g.size;if(s>h&&r<m)return g.setSelection(e-h-g.border,n-h-g.border,o,i);h=m}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;if((F||x)&&e==n){let{node:p,offset:h}=l;if(p.nodeType==3){if(f=!!(h&&p.nodeValue[h-1]==`
2
- `),f&&h==p.nodeValue.length)for(let g=p,m;g;g=g.parentNode){if(m=g.nextSibling){m.nodeName=="BR"&&(l=a={node:m.parentNode,offset:D(m)+1});break}let y=g.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let g=p.childNodes[h-1];f=g&&(g.nodeName=="BR"||g.contentEditable=="false")}}if(F&&d.focusNode&&d.focusNode!=a.node&&d.focusNode.nodeType==1){let p=d.focusNode.childNodes[d.focusOffset];p&&p.contentEditable=="false"&&(i=!0)}if(!(i||f&&x)&&te(l.node,l.offset,d.anchorNode,d.anchorOffset)&&te(a.node,a.offset,d.focusNode,d.focusOffset))return;let u=!1;if((c.extend||e==n)&&!f){c.collapse(l.node,l.offset);try{e!=n&&c.extend(a.node,a.offset),u=!0}catch{}}if(!u){if(e>n){let h=l;l=a,a=h}let p=document.createRange();p.setEnd(a.node,a.offset),p.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let o=0,i=0;i<this.children.length;i++){let s=this.children[i],r=o+s.size;if(o==r?e<=r&&n>=o:e<r&&n>o){let l=o+s.border,a=r-s.border;if(e>=l&&n<=a){this.dirty=e==o||n==r?oe:Tt,e==l&&n==a&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=$:s.markDirty(e-l,n-l);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?oe:$}o=r}this.dirty=oe}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let o=e==1?oe:Tt;n.dirty<o&&(n.dirty=o)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class At extends De{constructor(e,n,o,i){let s,r=n.type.toDOM;if(typeof r=="function"&&(r=r(o,()=>{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!n.type.spec.raw){if(r.nodeType!=1){let l=document.createElement("span");l.appendChild(r),r=l}r.contentEditable="false",r.classList.add("ProseMirror-widget")}super(e,[],r,null),this.widget=n,this.widget=n,s=this}matchesWidget(e){return this.dirty==B&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class Jn extends De{constructor(e,n,o,i){super(e,[],n,null),this.textDOM=o,this.text=i}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class ie extends De{constructor(e,n,o,i,s){super(e,[],o,i),this.mark=n,this.spec=s}static create(e,n,o,i){let s=i.nodeViews[n.type.name],r=s&&s(n,i,o);return(!r||!r.dom)&&(r=me.renderSpec(document,n.type.spec.toDOM(n,o),null,n.attrs)),new ie(e,n,r.dom,r.contentDOM||r.dom,r)}parseRule(){return this.dirty&$||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=$&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=B){let o=this.parent;for(;!o.node;)o=o.parent;o.dirty<this.dirty&&(o.dirty=this.dirty),this.dirty=B}}slice(e,n,o){let i=ie.create(this.parent,this.mark,!0,o),s=this.children,r=this.size;n<r&&(s=Ue(s,n,r,o)),e>0&&(s=Ue(s,0,e,o));for(let l=0;l<s.length;l++)s[l].parent=i;return i.children=s,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class G extends De{constructor(e,n,o,i,s,r,l,a,c){super(e,[],s,r),this.node=n,this.outerDeco=o,this.innerDeco=i,this.nodeDOM=l}static create(e,n,o,i,s,r){let l=s.nodeViews[n.type.name],a,c=l&&l(n,s,()=>{if(!a)return r;if(a.parent)return a.parent.posBeforeChild(a)},o,i),d=c&&c.dom,f=c&&c.contentDOM;if(n.isText){if(!d)d=document.createTextNode(n.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:f}=me.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!f&&!n.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),n.type.spec.draggable&&(d.draggable=!0));let u=d;return d=Bt(d,o,n),c?a=new Zn(e,n,o,i,d,f||null,u,c,s,r+1):n.isText?new Te(e,n,o,i,d,u,s):new G(e,n,o,i,d,f||null,u,s,r+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let o=this.children[n];if(this.dom.contains(o.dom.parentNode)){e.contentElement=o.dom.parentNode;break}}e.contentElement||(e.getContent=()=>z.empty)}return e}matchesNode(e,n,o){return this.dirty==B&&e.eq(this.node)&&Ae(n,this.outerDeco)&&o.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){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);to(this.node,this.innerDeco,(c,d,f)=>{c.spec.marks?a.syncToMarks(c.spec.marks,o,e):c.type.side>=0&&!f&&a.syncToMarks(d==this.node.childCount?dt.none:this.node.child(d).marks,o,e),a.placeWidget(c,e,i)},(c,d,f,u)=>{a.syncToMarks(c.marks,o,e);let p;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}),a.syncToMarks([],o,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==oe)&&(r&&this.protectLocalComposition(e,r),Vt(this.contentDOM,this.children,e),de&&no(this.dom))}localCompositionInfo(e,n){let{from:o,to:i}=e.state.selection;if(!(e.state.selection instanceof C)||o<n||i>n+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let r=s.nodeValue,l=oo(this.node.content,r,o-n,i-n);return l<0?null:{node:s,pos:l,text:r}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:o,text:i}){if(this.getDesc(n))return;let s=n;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let r=new Jn(this,s,n,i);e.input.compositionNodes.push(r),this.children=Ue(this.children,o,o+i.length,e,r)}update(e,n,o,i){return this.dirty==$||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,o,i),!0)}updateInner(e,n,o,i){this.updateOuterDeco(n),this.node=e,this.innerDeco=o,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=B}updateOuterDeco(e){if(Ae(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,o=this.dom;this.dom=Rt(this.dom,this.nodeDOM,je(this.outerDeco,this.node,n),je(e,this.node,n)),this.dom!=o&&(o.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Et(t,e,n,o,i){Bt(o,e,t);let s=new G(void 0,t,e,n,o,o,o,i,0);return s.contentDOM&&s.updateChildren(i,0),s}class Te extends G{constructor(e,n,o,i,s,r,l){super(e,n,o,i,s,null,r,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,o,i){return this.dirty==$||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)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,o){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,o)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,o){let i=this.node.cut(e,n),s=document.createTextNode(i.text);return new Te(this.parent,i,this.outerDeco,this.innerDeco,s,s,o)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=$)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Pt extends De{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==B&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Zn extends G{constructor(e,n,o,i,s,r,l,a,c,d){super(e,n,o,i,s,r,l,c,d),this.spec=a}update(e,n,o,i){if(this.dirty==$)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,n,o);return s&&this.updateInner(e,n,o,i),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,o,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,o,i){this.spec.setSelection?this.spec.setSelection(e,n,o.root):super.setSelection(e,n,o,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Vt(t,e,n){let o=t.firstChild,i=!1;for(let s=0;s<e.length;s++){let r=e[s],l=r.dom;if(l.parentNode==t){for(;l!=o;)o=It(o),i=!0;o=o.nextSibling}else i=!0,t.insertBefore(l,o);if(r instanceof ie){let a=o?o.previousSibling:t.lastChild;Vt(r.contentDOM,r.children,n),o=a?a.nextSibling:t.firstChild}}for(;o;)o=It(o),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const Ne=function(t){t&&(this.nodeName=t)};Ne.prototype=Object.create(null);const se=[new Ne];function je(t,e,n){if(t.length==0)return se;let o=n?se[0]:new Ne,i=[o];for(let s=0;s<t.length;s++){let r=t[s].type.attrs;if(r){r.nodeName&&i.push(o=new Ne(r.nodeName));for(let l in r){let a=r[l];a!=null&&(n&&i.length==1&&i.push(o=new Ne(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))}}}return i}function Rt(t,e,n,o){if(n==se&&o==se)return e;let i=e;for(let s=0;s<o.length;s++){let r=o[s],l=n[s];if(s){let a;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=se[0]),i=a}Qn(i,l||se[0],r)}return i}function Qn(t,e,n){for(let o in e)o!="class"&&o!="style"&&o!="nodeName"&&!(o in n)&&t.removeAttribute(o);for(let o in n)o!="class"&&o!="style"&&o!="nodeName"&&n[o]!=e[o]&&t.setAttribute(o,n[o]);if(e.class!=n.class){let o=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let s=0;s<o.length;s++)i.indexOf(o[s])==-1&&t.classList.remove(o[s]);for(let s=0;s<i.length;s++)o.indexOf(i[s])==-1&&t.classList.add(i[s]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let o=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=o.exec(e.style);)t.style.removeProperty(i[1])}n.style&&(t.style.cssText+=n.style)}}function Bt(t,e,n){return Rt(t,t,se,je(e,n,t.nodeType!=1))}function Ae(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function It(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class wn{constructor(e,n,o){this.lock=n,this.view=o,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=vn(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let o=e;o<n;o++)this.top.children[o].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,o){let i=0,s=this.stack.length>>1,r=Math.min(s,e.length);for(;i<r&&(i==s-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<s;)this.destroyRest(),this.top.dirty=B,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let a=this.index;a<Math.min(this.index+3,this.top.children.length);a++){let c=this.top.children[a];if(c.matchesMark(e[s])&&!this.isLocked(c.dom)){l=a;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=ie.create(this.top,e[s],n,o);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,s++}}findNodeMatch(e,n,o,i){let s=-1,r;if(i>=this.preMatch.index&&(r=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&r.matchesNode(e,n,o))s=this.top.children.indexOf(r,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l<a;l++){let c=this.top.children[l];if(c.matchesNode(e,n,o)&&!this.preMatch.matched.has(c)){s=l;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,n,o,i,s){let r=this.top.children[i];return r.dirty==$&&r.dom==r.contentDOM&&(r.dirty=oe),r.update(e,n,o,s)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let o=e.pmViewDesc;if(o){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==o)return i}return-1}e=n}}updateNextNode(e,n,o,i,s,r){for(let l=this.index;l<this.top.children.length;l++){let a=this.top.children[l];if(a instanceof G){let c=this.preMatch.matched.get(a);if(c!=null&&c!=s)return!1;let d=a.dom,f,u=this.isLocked(d)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&a.dirty!=$&&Ae(n,a.outerDeco));if(!u&&a.update(e,n,o,i))return this.destroyBetween(this.index,l),a.dom!=d&&(this.changed=!0),this.index++,!0;if(!u&&(f=this.recreateWrapper(a,e,n,o,i,r)))return this.destroyBetween(this.index,l),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=oe,f.updateChildren(i,r+1),f.dirty=B),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,o,i,s,r){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!Ae(o,e.outerDeco)||!i.eq(e.innerDeco))return null;let l=G.create(this.top,n,o,i,s,r);if(l.contentDOM){l.children=e.children,e.children=[];for(let a of l.children)a.parent=l}return e.destroy(),l}addNode(e,n,o,i,s){let r=G.create(this.top,e,n,o,i,s);r.contentDOM&&r.updateChildren(i,s+1),this.top.children.splice(this.index++,0,r),this.changed=!0}placeWidget(e,n,o){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let s=new At(this.top,e,n,o);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof ie;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Te)||/\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))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let o=document.createElement(e);e=="IMG"&&(o.className="ProseMirror-separator",o.alt=""),e=="BR"&&(o.className="ProseMirror-trailingBreak");let i=new Pt(this.top,[],o,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function vn(t,e){let n=e,o=n.children.length,i=t.childCount,s=new Map,r=[];e:for(;i>0;){let l;for(;;)if(o){let c=n.children[o-1];if(c instanceof ie)n=c,o=c.children.length;else{l=c,o--;break}}else{if(n==e)break e;o=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=t.child(i-1))break;--i,s.set(l,i),r.push(l)}}return{index:i,matched:s,matches:r.reverse()}}function eo(t,e){return t.type.side-e.type.side}function to(t,e,n,o){let i=e.locals(t),s=0;if(i.length==0){for(let c=0;c<t.childCount;c++){let d=t.child(c);o(d,i,e.forChild(s,d),c),s+=d.nodeSize}return}let r=0,l=[],a=null;for(let c=0;;){let d,f;for(;r<i.length&&i[r].to==s;){let m=i[r++];m.widget&&(d?(f||(f=[d])).push(m):d=m)}if(d)if(f){f.sort(eo);for(let m=0;m<f.length;m++)n(f[m],c,!!a)}else n(d,c,!!a);let u,p;if(a)p=-1,u=a,a=null;else if(c<t.childCount)p=c,u=t.child(c++);else break;for(let m=0;m<l.length;m++)l[m].to<=s&&l.splice(m--,1);for(;r<i.length&&i[r].from<=s&&i[r].to>s;)l.push(i[r++]);let h=s+u.nodeSize;if(u.isText){let m=h;r<i.length&&i[r].from<m&&(m=i[r].from);for(let y=0;y<l.length;y++)l[y].to<m&&(m=l[y].to);m<h&&(a=u.cut(m-s),u=u.cut(0,m-s),h=m,p=-1)}else for(;r<i.length&&i[r].to<h;)r++;let g=u.isInline&&!u.isLeaf?l.filter(m=>!m.inline):l.slice();o(u,g,e.forChild(s,u),p),s=h}}function no(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function oo(t,e,n,o){for(let i=0,s=0;i<t.childCount&&s<=o;){let r=t.child(i++),l=s;if(s+=r.nodeSize,!r.isText)continue;let a=r.text;for(;i<t.childCount;){let c=t.child(i++);if(s+=c.nodeSize,!c.isText)break;a+=c.text}if(s>=n){if(s>=o&&a.slice(o-e.length-l,o-l)==e)return o-e.length;let c=l<o?a.lastIndexOf(e,o-l-1):-1;if(c>=0&&c+e.length+l>=n)return l+c;if(n==o&&a.length>=o+e.length-l&&a.slice(o-l,o-l+e.length)==e)return o}}return-1}function Ue(t,e,n,o,i){let s=[];for(let r=0,l=0;r<t.length;r++){let a=t[r],c=l,d=l+=a.size;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)))}return s}function Ye(t,e=null){let n=t.domSelectionRange(),o=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),s=i&&i.size==0,r=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(r<0)return null;let l=o.resolve(r),a,c;if(ke(n)){for(a=r;i&&!i.node;)i=i.parent;let f=i.node;if(i&&f.isAtom&&N.isSelectable(f)&&i.parent&&!(f.isInline&&En(n.focusNode,n.focusOffset,i.dom))){let u=i.posBefore;c=new N(r==u?l:o.resolve(u))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let f=r,u=r;for(let p=0;p<n.rangeCount;p++){let h=n.getRangeAt(p);f=Math.min(f,t.docView.posFromDOM(h.startContainer,h.startOffset,1)),u=Math.max(u,t.docView.posFromDOM(h.endContainer,h.endOffset,-1))}if(f<0)return null;[a,r]=u==t.state.selection.anchor?[u,f]:[f,u],l=o.resolve(r)}else a=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(a<0)return null}let d=o.resolve(a);if(!c){let f=e=="pointer"||t.state.selection.head<l.pos&&!s?1:-1;c=Xe(t,d,l,f)}return c}function Ft(t){return t.editable?t.hasFocus():Wt(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function _(t,e=!1){let n=t.state.selection;if(qt(t,n),!!Ft(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&O){let o=t.domSelectionRange(),i=t.domObserver.currentSelection;if(o.anchorNode&&i.anchorNode&&te(o.anchorNode,o.anchorOffset,i.anchorNode,i.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)so(t);else{let{anchor:o,head:i}=n,s,r;zt&&!(n instanceof C)&&(n.$from.parent.inlineContent||(s=Lt(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(r=Lt(t,n.to))),t.docView.setSelection(o,i,t,e),zt&&(s&&$t(s),r&&$t(r)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&io(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const zt=x||O&&mt<63;function Lt(t,e){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;if(x&&i&&i.contentEditable=="false")return Ge(i);if((!i||i.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(i)return Ge(i);if(s)return Ge(s)}}function Ge(t){return t.contentEditable="true",x&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function $t(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function io(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),o=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=o||n.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!Ft(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function so(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let o=t.cursorWrapper.dom,i=o.nodeName=="IMG";i?n.setStart(o.parentNode,D(o)+1):n.setStart(o,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!i&&!t.state.selection.visible&&A&&U<=11&&(o.disabled=!0,o.disabled=!1)}function qt(t,e){if(e instanceof N){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Kt(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Kt(t)}function Kt(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Xe(t,e,n,o){return t.someProp("createSelectionBetween",i=>i(t,e,n))||C.between(e,n,o)}function Ht(t){return t.editable&&!t.hasFocus()?!1:Wt(t)}function Wt(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{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))}catch{return!1}}function ro(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return te(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Je(t,e){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;return s&&ee.findFrom(s,e)}function X(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function _t(t,e,n){let o=t.state.selection;if(o instanceof C)if(n.indexOf("s")>-1){let{$head:i}=o,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let r=t.state.doc.resolve(i.pos+s.nodeSize*(e<0?-1:1));return X(t,new C(o.$anchor,r))}else if(o.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=Je(t.state,e);return i&&i instanceof N?X(t,i):!1}else if(!(R&&n.indexOf("m")>-1)){let i=o.$head,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,r;if(!s||s.isText)return!1;let l=e<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(r=t.docView.descAt(l))&&!r.contentDOM?N.isSelectable(s)?X(t,new N(e<0?t.state.doc.resolve(i.pos-s.nodeSize):i)):ye?X(t,new C(t.state.doc.resolve(e<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(o instanceof N&&o.node.isInline)return X(t,new C(e>0?o.$to:o.$from));{let i=Je(t.state,e);return i?X(t,i):!1}}}function Ee(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Se(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function he(t,e){return e<0?lo(t):ao(t)}function lo(t){let e=t.domSelectionRange(),n=e.focusNode,o=e.focusOffset;if(!n)return;let i,s,r=!1;for(F&&n.nodeType==1&&o<Ee(n)&&Se(n.childNodes[o],-1)&&(r=!0);;)if(o>0){if(n.nodeType!=1)break;{let l=n.childNodes[o-1];if(Se(l,-1))i=n,s=--o;else if(l.nodeType==3)n=l,o=n.nodeValue.length;else break}}else{if(jt(n))break;{let l=n.previousSibling;for(;l&&Se(l,-1);)i=n.parentNode,s=D(l),l=l.previousSibling;if(l)n=l,o=Ee(n);else{if(n=n.parentNode,n==t.dom)break;o=0}}}r?Ze(t,n,o):i&&Ze(t,i,s)}function ao(t){let e=t.domSelectionRange(),n=e.focusNode,o=e.focusOffset;if(!n)return;let i=Ee(n),s,r;for(;;)if(o<i){if(n.nodeType!=1)break;let l=n.childNodes[o];if(Se(l,1))s=n,r=++o;else break}else{if(jt(n))break;{let l=n.nextSibling;for(;l&&Se(l,1);)s=l.parentNode,r=D(l)+1,l=l.nextSibling;if(l)n=l,o=0,i=Ee(n);else{if(n=n.parentNode,n==t.dom)break;o=i=0}}}s&&Ze(t,s,r)}function jt(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function co(t,e){for(;t&&e==t.childNodes.length&&!ge(t);)e=D(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function fo(t,e){for(;t&&!e&&!ge(t);)e=D(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function Ze(t,e,n){if(e.nodeType!=3){let s,r;(r=co(e,n))?(e=r,n=0):(s=fo(e,n))&&(e=s,n=s.nodeValue.length)}let o=t.domSelection();if(!o)return;if(ke(o)){let s=document.createRange();s.setEnd(e,n),s.setStart(e,n),o.removeAllRanges(),o.addRange(s)}else o.extend&&o.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&_(t)},50)}function Ut(t,e){let n=t.state.doc.resolve(e);if(!(O||Rn)&&n.parent.inlineContent){let i=t.coordsAtPos(e);if(e>n.start()){let s=t.coordsAtPos(e-1),r=(s.top+s.bottom)/2;if(r>i.top&&r<i.bottom&&Math.abs(s.left-i.left)>1)return s.left<i.left?"ltr":"rtl"}if(e<n.end()){let s=t.coordsAtPos(e+1),r=(s.top+s.bottom)/2;if(r>i.top&&r<i.bottom&&Math.abs(s.left-i.left)>1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Yt(t,e,n){let o=t.state.selection;if(o instanceof C&&!o.empty||n.indexOf("s")>-1||R&&n.indexOf("m")>-1)return!1;let{$from:i,$to:s}=o;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let r=Je(t.state,e);if(r&&r instanceof N)return X(t,r)}if(!i.parent.inlineContent){let r=e<0?i:s,l=o instanceof ct?ee.near(r,e):ee.findFrom(r,e);return l?X(t,l):!1}return!1}function Gt(t,e){if(!(t.state.selection instanceof C))return!0;let{$head:n,$anchor:o,empty:i}=t.state.selection;if(!n.sameParent(o))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let r=t.state.tr;return e<0?r.delete(n.pos-s.nodeSize,n.pos):r.delete(n.pos,n.pos+s.nodeSize),t.dispatch(r),!0}return!1}function Xt(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function ho(t){if(!x||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let o=e.firstChild;Xt(t,o,"true"),setTimeout(()=>Xt(t,o,"false"),20)}return!1}function uo(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function po(t,e){let n=e.keyCode,o=uo(e);if(n==8||R&&n==72&&o=="c")return Gt(t,-1)||he(t,-1);if(n==46&&!e.shiftKey||R&&n==68&&o=="c")return Gt(t,1)||he(t,1);if(n==13||n==27)return!0;if(n==37||R&&n==66&&o=="c"){let i=n==37?Ut(t,t.state.selection.from)=="ltr"?-1:1:-1;return _t(t,i,o)||he(t,i)}else if(n==39||R&&n==70&&o=="c"){let i=n==39?Ut(t,t.state.selection.from)=="ltr"?1:-1:1;return _t(t,i,o)||he(t,i)}else{if(n==38||R&&n==80&&o=="c")return Yt(t,-1,o)||he(t,-1);if(n==40||R&&n==78&&o=="c")return ho(t)||Yt(t,1,o)||he(t,1);if(o==(R?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Qe(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:o,openStart:i,openEnd:s}=e;for(;i>1&&s>1&&o.childCount==1&&o.firstChild.childCount==1;){i--,s--;let p=o.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),o=p.content}let r=t.someProp("clipboardSerializer")||me.fromSchema(t.state.schema),l=nn(),a=l.createElement("div");a.appendChild(r.serializeFragment(o,{document:l}));let c=a.firstChild,d,f=0;for(;c&&c.nodeType==1&&(d=en[c.nodeName.toLowerCase()]);){for(let p=d.length-1;p>=0;p--){let h=l.createElement(d[p]);for(;a.firstChild;)h.appendChild(a.firstChild);a.appendChild(h),f++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${s}${f?` -${f}`:""} ${JSON.stringify(n)}`);let u=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,`
3
-
4
- `);return{dom:a,text:u,slice:e}}function Jt(t,e,n,o,i){let s=i.parent.type.spec.code,r,l;if(!n&&!e)return null;let a=e&&(o||s||!n);if(a){if(t.someProp("transformPastedText",u=>{e=u(e,s||o,t)}),s)return e?new q(z.from(t.state.schema.text(e.replace(/\r\n?/g,`
5
- `))),0,0):q.empty;let f=t.someProp("clipboardTextParser",u=>u(e,i,o,t));if(f)l=f;else{let u=i.marks(),{schema:p}=t.state,h=me.fromSchema(p);r=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let m=r.appendChild(document.createElement("p"));g&&m.appendChild(h.serializeNode(p.text(g,u)))})}}else t.someProp("transformPastedHTML",f=>{n=f(n,t)}),r=bo(n),ye&&Do(r);let c=r&&r.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let f=+d[3];f>0;f--){let u=r.firstChild;for(;u&&u.nodeType!=1;)u=u.nextSibling;if(!u)break;r=u}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||Le.fromSchema(t.state.schema)).parseSlice(r,{preserveWhitespace:!!(a||d),context:i,ruleFromNode(u){return u.nodeName=="BR"&&!u.nextSibling&&u.parentNode&&!mo.test(u.parentNode.nodeName)?{ignore:!0}:null}})),d)l=No(vt(l,+d[1],+d[2]),d[4]);else if(l=q.maxOpen(go(l.content,i),!0),l.openStart||l.openEnd){let f=0,u=0;for(let p=l.content.firstChild;f<l.openStart&&!p.type.spec.isolating;f++,p=p.firstChild);for(let p=l.content.lastChild;u<l.openEnd&&!p.type.spec.isolating;u++,p=p.lastChild);l=vt(l,f,u)}return t.someProp("transformPasted",f=>{l=f(l,t)}),l}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;function go(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let i=e.node(n).contentMatchAt(e.index(n)),s,r=[];if(t.forEach(l=>{if(!r)return;let a=i.findWrapping(l.type),c;if(!a)return r=null;if(c=r.length&&s.length&&Qt(a,s,l,r[r.length-1],0))r[r.length-1]=c;else{r.length&&(r[r.length-1]=wt(r[r.length-1],s.length));let d=Zt(l,a);r.push(d),i=i.matchType(d.type),s=a}}),r)return z.from(r)}return t}function Zt(t,e,n=0){for(let o=e.length-1;o>=n;o--)t=e[o].create(null,z.from(t));return t}function Qt(t,e,n,o,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let s=Qt(t,e,n,o.lastChild,i+1);if(s)return o.copy(o.content.replaceChild(o.childCount-1,s));if(o.contentMatchAt(o.childCount).matchType(i==t.length-1?n.type:t[i+1]))return o.copy(o.content.append(z.from(Zt(n,t,i+1))))}}function wt(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,wt(t.lastChild,e-1)),o=t.contentMatchAt(t.childCount).fillBefore(z.empty,!0);return t.copy(n.append(o))}function we(t,e,n,o,i,s){let r=e<0?t.firstChild:t.lastChild,l=r.content;return t.childCount>1&&(s=0),i<o-1&&(l=we(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(z.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,r.copy(l))}function vt(t,e,n){return e<t.openStart&&(t=new q(we(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new q(we(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const en={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let tn=null;function nn(){return tn||(tn=document.implementation.createHTMLDocument("title"))}let ve=null;function yo(t){let e=window.trustedTypes;return e?(ve||(ve=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),ve.createHTML(t)):t}function bo(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=nn().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(t),i;if((i=o&&en[o[1].toLowerCase()])&&(t=i.map(s=>"<"+s+">").join("")+t+i.map(s=>"</"+s+">").reverse().join("")),n.innerHTML=yo(t),i)for(let s=0;s<i.length;s++)n=n.querySelector(i[s])||n;return n}function Do(t){let e=t.querySelectorAll(O?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let o=e[n];o.childNodes.length==1&&o.textContent==" "&&o.parentNode&&o.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),o)}}function No(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,o;try{o=JSON.parse(e)}catch{return t}let{content:i,openStart:s,openEnd:r}=t;for(let l=o.length-2;l>=0;l-=2){let a=n.nodes[o[l]];if(!a||a.hasRequiredAttrs())break;i=z.from(a.create(o[l+1],i)),s++,r++}return new q(i,s,r)}const k={},T={},So={touchstart:!0,touchmove:!0};class Co{constructor(){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=Object.create(null),this.hideSelectionGuard=null}}function Oo(t){for(let e in k){let n=k[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=o=>{xo(t,o)&&!tt(t,o)&&(t.editable||!(o.type in T))&&n(t,o)},So[e]?{passive:!0}:void 0)}x&&t.dom.addEventListener("input",()=>null),et(t)}function J(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function Mo(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function et(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=o=>tt(t,o))})}function tt(t,e){return t.someProp("handleDOMEvents",n=>{let o=n[e.type];return o?o(t,e)||e.defaultPrevented:!1})}function xo(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function ko(t,e){!tt(t,e)&&k[e.type]&&(t.editable||!(e.type in T))&&k[e.type](t,e)}T.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!sn(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(H&&O&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),de&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let o=Date.now();t.input.lastIOSEnter=o,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==o&&(t.someProp("handleKeyDown",i=>i(t,ne(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",o=>o(t,n))||po(t,n)?n.preventDefault():J(t,"key")},T.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},T.keypress=(t,e)=>{let n=e;if(sn(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||R&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n))){n.preventDefault();return}let o=t.state.selection;if(!(o instanceof C)||!o.$from.sameParent(o.$to)){let i=String.fromCharCode(n.charCode);!/[\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()}};function Pe(t){return{left:t.clientX,top:t.clientY}}function To(t,e){let n=e.x-t.clientX,o=e.y-t.clientY;return n*n+o*o<100}function nt(t,e,n,o,i){if(o==-1)return!1;let s=t.state.doc.resolve(o);for(let r=s.depth+1;r>0;r--)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)))return!0;return!1}function ue(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let o=t.state.tr.setSelection(e);o.setMeta("pointer",!0),t.dispatch(o)}function Ao(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),o=n.nodeAfter;return o&&o.isAtom&&N.isSelectable(o)?(ue(t,new N(n)),!0):!1}function Eo(t,e){if(e==-1)return!1;let n=t.state.selection,o,i;n instanceof N&&(o=n.node);let s=t.state.doc.resolve(e);for(let r=s.depth+1;r>0;r--){let l=r>s.depth?s.nodeAfter:s.node(r);if(N.isSelectable(l)){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);break}}return i!=null?(ue(t,N.create(t.state.doc,i)),!0):!1}function Po(t,e,n,o,i){return nt(t,"handleClickOn",e,n,o)||t.someProp("handleClick",s=>s(t,e,o))||(i?Eo(t,n):Ao(t,n))}function Vo(t,e,n,o){return nt(t,"handleDoubleClickOn",e,n,o)||t.someProp("handleDoubleClick",i=>i(t,e,o))}function Ro(t,e,n,o){return nt(t,"handleTripleClickOn",e,n,o)||t.someProp("handleTripleClick",i=>i(t,e,o))||Bo(t,n,o)}function Bo(t,e,n){if(n.button!=0)return!1;let o=t.state.doc;if(e==-1)return o.inlineContent?(ue(t,C.create(o,0,o.content.size)),!0):!1;let i=o.resolve(e);for(let s=i.depth+1;s>0;s--){let r=s>i.depth?i.nodeAfter:i.node(s),l=i.before(s);if(r.inlineContent)ue(t,C.create(o,l+1,l+1+r.content.size));else if(N.isSelectable(r))ue(t,N.create(o,l));else continue;return!0}}function ot(t){return Ve(t)}const on=R?"metaKey":"ctrlKey";k.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let o=ot(t),i=Date.now(),s="singleClick";i-t.input.lastClick.time<500&&To(n,t.input.lastClick)&&!n[on]&&(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};let r=t.posAtCoords(Pe(n));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():J(t,"pointer"))};class Io{constructor(e,n,o,i){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[on],this.allowDefault=o.shiftKey;let s,r;if(n.inside>-1)s=e.state.doc.nodeAt(n.inside),r=n.inside;else{let d=e.state.doc.resolve(n.pos);s=d.parent,r=d.depth?d.before():0}const l=i?null:o.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a&&a.dom.nodeType==1?a.dom:null;let{selection:c}=e.state;(o.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof N&&c.from<=r&&c.to>r)&&(this.mightDrag={node:s,pos:r,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&F&&!this.target.hasAttribute("contentEditable"))}),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(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},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)),J(e,"pointer")}done(){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(()=>_(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Pe(e))),this.updateAllowDefault(e),this.allowDefault||!n?J(this.view,"pointer"):Po(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||x&&this.mightDrag&&!this.mightDrag.node.isAtom||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)?(ue(this.view,ee.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):J(this.view,"pointer")}move(e){this.updateAllowDefault(e),J(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}k.touchstart=t=>{t.input.lastTouch=Date.now(),ot(t),J(t,"pointer")},k.touchmove=t=>{t.input.lastTouch=Date.now(),J(t,"pointer")},k.contextmenu=t=>ot(t);function sn(t,e){return t.composing?!0:x&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const Fo=H?5e3:-1;T.compositionstart=T.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof C&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(o=>o.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),Ve(t,!0),t.markCursor=null;else if(Ve(t,!e.selection.empty),F&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let o=t.domSelectionRange();for(let i=o.focusNode,s=o.focusOffset;i&&i.nodeType==1&&s!=0;){let r=s<0?i.lastChild:i.childNodes[s-1];if(!r)break;if(r.nodeType==3){let l=t.domSelection();l&&l.collapse(r,r.nodeValue.length);break}else i=r,s=-1}}t.input.composing=!0}rn(t,Fo)},T.compositionend=(t,e)=>{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++,rn(t,20))};function rn(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Ve(t),e))}function ln(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Lo());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function zo(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=Tn(e.focusNode,e.focusOffset),o=An(e.focusNode,e.focusOffset);if(n&&o&&n!=o){let i=o.pmViewDesc,s=t.domObserver.lastChangedTextNode;if(n==s||o==s)return s;if(!i||!i.isText(o.nodeValue))return o;if(t.input.compositionNode==o){let r=n.pmViewDesc;if(!(!r||!r.isText(n.nodeValue)))return o}}return n||o}function Lo(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Ve(t,e=!1){if(!(H&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),ln(t),e||t.docView&&t.docView.dirty){let n=Ye(t);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}return!1}}function $o(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let o=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),o.removeAllRanges(),o.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Ce=A&&U<15||de&&Bn<604;k.copy=T.cut=(t,e)=>{let n=e,o=t.state.selection,i=n.type=="cut";if(o.empty)return;let s=Ce?null:n.clipboardData,r=o.content(),{dom:l,text:a}=Qe(t,r);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"))};function qo(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function Ko(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,o=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(o.contentEditable="true"),o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus();let i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),o.parentNode&&o.parentNode.removeChild(o),n?Oe(t,o.value,null,i,e):Oe(t,o.textContent,o.innerHTML,i,e)},50)}function Oe(t,e,n,o,i){let s=Jt(t,e,n,o,t.state.selection.$from);if(t.someProp("handlePaste",a=>a(t,i,s||q.empty)))return!0;if(!s)return!1;let r=qo(s),l=r?t.state.tr.replaceSelectionWith(r,o):t.state.tr.replaceSelection(s);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function an(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}T.paste=(t,e)=>{let n=e;if(t.composing&&!H)return;let o=Ce?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;o&&Oe(t,an(o),o.getData("text/html"),i,n)?n.preventDefault():Ko(t,n)};class cn{constructor(e,n,o){this.slice=e,this.move=n,this.node=o}}const Ho=R?"altKey":"ctrlKey";function dn(t,e){let n=t.someProp("dragCopies",o=>!o(e));return n??!e[Ho]}k.dragstart=(t,e)=>{let n=e,o=t.input.mouseDown;if(o&&o.done(),!n.dataTransfer)return;let i=t.state.selection,s=i.empty?null:t.posAtCoords(Pe(n)),r;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof N?i.to-1:i.to))){if(o&&o.mightDrag)r=N.create(t.state.doc,o.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let f=t.docView.nearestDesc(n.target,!0);f&&f.node.type.spec.draggable&&f!=t.docView&&(r=N.create(t.state.doc,f.posBefore))}}let l=(r||t.state.selection).content(),{dom:a,text:c,slice:d}=Qe(t,l);(!n.dataTransfer.files.length||!O||mt>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Ce?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Ce||n.dataTransfer.setData("text/plain",c),t.dragging=new cn(d,dn(t,n),r)},k.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},T.dragover=T.dragenter=(t,e)=>e.preventDefault(),T.drop=(t,e)=>{let n=e,o=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let i=t.posAtCoords(Pe(n));if(!i)return;let s=t.state.doc.resolve(i.pos),r=o&&o.slice;r?t.someProp("transformPasted",h=>{r=h(r,t)}):r=Jt(t,an(n.dataTransfer),Ce?null:n.dataTransfer.getData("text/html"),!1,s);let l=!!(o&&dn(t,n));if(t.someProp("handleDrop",h=>h(t,n,r||q.empty,l))){n.preventDefault();return}if(!r)return;n.preventDefault();let a=r?ft(t.state.doc,s.pos,r):s.pos;a==null&&(a=s.pos);let c=t.state.tr;if(l){let{node:h}=o;h?h.replace(c):c.deleteSelection()}let d=c.mapping.map(a),f=r.openStart==0&&r.openEnd==0&&r.content.childCount==1,u=c.doc;if(f?c.replaceRangeWith(d,d,r.content.firstChild):c.replaceRange(d,d,r),c.doc.eq(u))return;let p=c.doc.resolve(d);if(f&&N.isSelectable(r.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(r.content.firstChild))c.setSelection(new N(p));else{let h=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((g,m,y,E)=>h=E),c.setSelection(Xe(t,p,c.doc.resolve(h)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))},k.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&_(t)},20))},k.blur=(t,e)=>{let n=e;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)},k.beforeinput=(t,e)=>{if(O&&H&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:o}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=o||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",s=>s(t,ne(8,"Backspace")))))return;let{$cursor:i}=t.state.selection;i&&i.pos>0&&t.dispatch(t.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let t in T)k[t]=T[t];function Me(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Re{constructor(e,n){this.toDOM=e,this.spec=n||re,this.side=this.spec.side||0}map(e,n,o,i){let{pos:s,deleted:r}=e.mapResult(n.from+i,this.side<0?-1:1);return r?null:new I(s-o,s-o,this)}valid(){return!0}eq(e){return this==e||e instanceof Re&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Me(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Z{constructor(e,n){this.attrs=e,this.spec=n||re}map(e,n,o,i){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;return s>=r?null:new I(s,r,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Z&&Me(this.attrs,e.attrs)&&Me(this.spec,e.spec)}static is(e){return e.type instanceof Z}destroy(){}}class it{constructor(e,n){this.attrs=e,this.spec=n||re}map(e,n,o,i){let s=e.mapResult(n.from+i,1);if(s.deleted)return null;let r=e.mapResult(n.to+i,-1);return r.deleted||r.pos<=s.pos?null:new I(s.pos-o,r.pos-o,this)}valid(e,n){let{index:o,offset:i}=e.content.findIndex(n.from),s;return i==n.from&&!(s=e.child(o)).isText&&i+s.nodeSize==n.to}eq(e){return this==e||e instanceof it&&Me(this.attrs,e.attrs)&&Me(this.spec,e.spec)}destroy(){}}class I{constructor(e,n,o){this.from=e,this.to=n,this.type=o}copy(e,n){return new I(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,o){return this.type.map(e,this,n,o)}static widget(e,n,o){return new I(e,e,new Re(n,o))}static inline(e,n,o,i){return new I(e,n,new Z(o,i))}static node(e,n,o,i){return new I(e,n,new it(o,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Z}get widget(){return this.type instanceof Re}}ze("D",I);const pe=[],re={};class S{constructor(e,n){this.local=e.length?e:pe,this.children=n.length?n:pe}static create(e,n){return n.length?Be(n,e,0,re):M}find(e,n,o){let i=[];return this.findInner(e??0,n??1e9,i,0,o),i}findInner(e,n,o,i,s){for(let r=0;r<this.local.length;r++){let l=this.local[r];l.from<=n&&l.to>=e&&(!s||s(l.spec))&&o.push(l.copy(l.from+i,l.to+i))}for(let r=0;r<this.children.length;r+=3)if(this.children[r]<n&&this.children[r+1]>e){let l=this.children[r]+1;this.children[r+2].findInner(e-l,n-l,o,i+l,s)}}map(e,n,o){return this==M||e.maps.length==0?this:this.mapInner(e,n,0,0,o||re)}mapInner(e,n,o,i,s){let r;for(let l=0;l<this.local.length;l++){let a=this.local[l].map(e,o,i);a&&a.type.valid(n,a)?(r||(r=[])).push(a):s.onRemove&&s.onRemove(this.local[l].spec)}return this.children.length?Wo(this.children,r||[],e,n,o,i,s):r?new S(r.sort(le),pe):M}add(e,n){return n.length?this==M?S.create(e,n):this.addInner(e,n,0):this}addInner(e,n,o){let i,s=0;e.forEach((l,a)=>{let c=a+o,d;if(d=hn(n,l,c)){for(i||(i=this.children.slice());s<i.length&&i[s]<a;)s+=3;i[s]==a?i[s+2]=i[s+2].addInner(l,d,c+1):i.splice(s,0,a,a+l.nodeSize,Be(d,l,c+1,re)),s+=3}});let r=fn(s?un(n):n,-o);for(let l=0;l<r.length;l++)r[l].type.valid(e,r[l])||r.splice(l--,1);return new S(r.length?this.local.concat(r).sort(le):this.local,i||this.children)}remove(e){return e.length==0||this==M?this:this.removeInner(e,0)}removeInner(e,n){let o=this.children,i=this.local;for(let s=0;s<o.length;s+=3){let r,l=o[s]+n,a=o[s+1]+n;for(let d=0,f;d<e.length;d++)(f=e[d])&&f.from>l&&f.to<a&&(e[d]=null,(r||(r=[])).push(f));if(!r)continue;o==this.children&&(o=this.children.slice());let c=o[s+2].removeInner(r,l+1);c!=M?o[s+2]=c:(o.splice(s,3),s-=3)}if(i.length){for(let s=0,r;s<e.length;s++)if(r=e[s])for(let l=0;l<i.length;l++)i[l].eq(r,n)&&(i==this.local&&(i=this.local.slice()),i.splice(l--,1))}return o==this.children&&i==this.local?this:i.length||o.length?new S(i,o):M}forChild(e,n){if(this==M)return this;if(n.isLeaf)return S.empty;let o,i;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(o=this.children[l+2]);break}let s=e+1,r=s+n.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<r&&a.to>s&&a.type instanceof Z){let c=Math.max(s,a.from)-s,d=Math.min(r,a.to)-s;c<d&&(i||(i=[])).push(a.copy(c,d))}}if(i){let l=new S(i.sort(le),pe);return o?new Q([l,o]):l}return o||M}eq(e){if(this==e)return!0;if(!(e instanceof S)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return st(this.localsInner(e))}localsInner(e){if(this==M)return pe;if(e.inlineContent||!this.local.some(Z.is))return this.local;let n=[];for(let o=0;o<this.local.length;o++)this.local[o].type instanceof Z||n.push(this.local[o]);return n}forEachSet(e){e(this)}}ze("a",S),S.empty=new S([],[]),S.removeOverlap=st;const M=S.empty;class Q{constructor(e){this.members=e}map(e,n){const o=this.members.map(i=>i.map(e,n,re));return Q.from(o)}forChild(e,n){if(n.isLeaf)return S.empty;let o=[];for(let i=0;i<this.members.length;i++){let s=this.members[i].forChild(e,n);s!=M&&(s instanceof Q?o=o.concat(s.members):o.push(s))}return Q.from(o)}eq(e){if(!(e instanceof Q)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,o=!0;for(let i=0;i<this.members.length;i++){let s=this.members[i].localsInner(e);if(s.length)if(!n)n=s;else{o&&(n=n.slice(),o=!1);for(let r=0;r<s.length;r++)n.push(s[r])}}return n?st(o?n:n.sort(le)):pe}static from(e){switch(e.length){case 0:return M;case 1:return e[0];default:return new Q(e.every(n=>n instanceof S)?e:e.reduce((n,o)=>n.concat(o instanceof S?o:o.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function Wo(t,e,n,o,i,s,r){let l=t.slice();for(let c=0,d=s;c<n.maps.length;c++){let f=0;n.maps[c].forEach((u,p,h,g)=>{let m=g-h-(p-u);for(let y=0;y<l.length;y+=3){let E=l[y+1];if(E<0||u>E+d-f)continue;let xe=l[y]+d-f;p>=xe?l[y+1]=u<=xe?-2:-1:u>=d&&m&&(l[y]+=m,l[y+1]+=m)}f+=m}),d=n.maps[c].map(d,-1)}let a=!1;for(let c=0;c<l.length;c+=3)if(l[c+1]<0){if(l[c+1]==-2){a=!0,l[c+1]=-1;continue}let d=n.map(t[c]+s),f=d-i;if(f<0||f>=o.content.size){a=!0;continue}let u=n.map(t[c+1]+s,-1),p=u-i,{index:h,offset:g}=o.content.findIndex(f),m=o.maybeChild(h);if(m&&g==f&&g+m.nodeSize==p){let y=l[c+2].mapInner(n,m,d+1,t[c]+s+1,r);y!=M?(l[c]=f,l[c+1]=p,l[c+2]=y):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=_o(l,t,e,n,i,s,r),d=Be(c,o,0,r);e=d.local;for(let f=0;f<l.length;f+=3)l[f+1]<0&&(l.splice(f,3),f-=3);for(let f=0,u=0;f<d.children.length;f+=3){let p=d.children[f];for(;u<l.length&&l[u]<p;)u+=3;l.splice(u,0,d.children[f],d.children[f+1],d.children[f+2])}}return new S(e.sort(le),l)}function fn(t,e){if(!e||!t.length)return t;let n=[];for(let o=0;o<t.length;o++){let i=t[o];n.push(new I(i.from+e,i.to+e,i.type))}return n}function _o(t,e,n,o,i,s,r){function l(a,c){for(let d=0;d<a.local.length;d++){let f=a.local[d].map(o,i,c);f?n.push(f):r.onRemove&&r.onRemove(a.local[d].spec)}for(let d=0;d<a.children.length;d+=3)l(a.children[d+2],a.children[d]+c+1)}for(let a=0;a<t.length;a+=3)t[a+1]==-1&&l(t[a+2],e[a]+s+1);return n}function hn(t,e,n){if(e.isLeaf)return null;let o=n+e.nodeSize,i=null;for(let s=0,r;s<t.length;s++)(r=t[s])&&r.from>n&&r.to<o&&((i||(i=[])).push(r),t[s]=null);return i}function un(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Be(t,e,n,o){let i=[],s=!1;e.forEach((l,a)=>{let c=hn(t,l,a+n);if(c){s=!0;let d=Be(c,l,n+a+1,o);d!=M&&i.push(a,a+l.nodeSize,d)}});let r=fn(s?un(t):t,-n).sort(le);for(let l=0;l<r.length;l++)r[l].type.valid(e,r[l])||(o.onRemove&&o.onRemove(r[l].spec),r.splice(l--,1));return r.length||i.length?new S(r,i):M}function le(t,e){return t.from-e.from||t.to-e.to}function st(t){let e=t;for(let n=0;n<e.length-1;n++){let o=e[n];if(o.from!=o.to)for(let i=n+1;i<e.length;i++){let s=e[i];if(s.from==o.from){s.to!=o.to&&(e==t&&(e=t.slice()),e[i]=s.copy(s.from,o.to),pn(e,i+1,s.copy(o.to,s.to)));continue}else{s.from<o.to&&(e==t&&(e=t.slice()),e[n]=o.copy(o.from,s.from),pn(e,i,o.copy(s.from,o.to)));break}}}return e}function pn(t,e,n){for(;e<t.length&&le(n,t[e])>0;)e++;t.splice(e,0,n)}function rt(t){let e=[];return t.someProp("decorations",n=>{let o=n(t.state);o&&o!=M&&e.push(o)}),t.cursorWrapper&&e.push(S.create(t.state.doc,[t.cursorWrapper.deco])),Q.from(e)}const jo={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Uo=A&&U<=11;class Yo{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Go{constructor(e,n){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=>{for(let i=0;i<o.length;i++)this.queue.push(o[i]);A&&U<=11&&o.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),Uo&&(this.onCharData=o=>{this.queue.push({target:o.target,type:"characterData",oldValue:o.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,jo)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Ht(this.view)){if(this.suppressingSelectionUpdates)return _(this.view);if(A&&U<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&te(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,o;for(let s=e.focusNode;s;s=ce(s))n.add(s);for(let s=e.anchorNode;s;s=ce(s))if(n.has(s)){o=s;break}let i=o&&this.view.docView.nearestDesc(o);if(i&&i.ignoreMutation({type:"selection",target:o.nodeType==3?o.parentNode:o}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let o=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(o)&&Ht(e)&&!this.ignoreSelectionChange(o),s=-1,r=-1,l=!1,a=[];if(e.editable)for(let d=0;d<n.length;d++){let f=this.registerMutation(n[d],a);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))}if(F&&a.length){let d=a.filter(f=>f.nodeName=="BR");if(d.length==2){let[f,u]=d;f.parentNode&&f.parentNode.parentNode==u.parentNode?u.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let u of d){let p=u.parentNode;p&&p.nodeName=="LI"&&(!f||Zo(e,f)!=p)&&u.remove()}}}let c=null;s<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&ke(o)&&(c=Ye(e))&&c.eq(ee.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,_(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)||_(e),this.currentSelection.set(o))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let o=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(o==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!o||o.ignoreMutation(e))return null;if(e.type=="childList"){for(let d=0;d<e.addedNodes.length;d++){let f=e.addedNodes[d];n.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(o.contentDOM&&o.contentDOM!=o.dom&&!o.contentDOM.contains(e.target))return{from:o.posBefore,to:o.posAfter};let i=e.previousSibling,s=e.nextSibling;if(A&&U<=11&&e.addedNodes.length)for(let d=0;d<e.addedNodes.length;d++){let{previousSibling:f,nextSibling:u}=e.addedNodes[d];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f),(!u||Array.prototype.indexOf.call(e.addedNodes,u)<0)&&(s=u)}let r=i&&i.parentNode==e.target?D(i)+1:0,l=o.localPosFromDOM(e.target,r,-1),a=s&&s.parentNode==e.target?D(s):e.target.childNodes.length,c=o.localPosFromDOM(e.target,a,1);return{from:l,to:c}}else return e.type=="attributes"?{from:o.posAtStart-o.border,to:o.posAtEnd+o.border}:(this.lastChangedTextNode=e.target,{from:o.posAtStart,to:o.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let mn=new WeakMap,gn=!1;function Xo(t){if(!mn.has(t)&&(mn.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=F,gn)return;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."),gn=!0}}function yn(t,e){let n=e.startContainer,o=e.startOffset,i=e.endContainer,s=e.endOffset,r=t.domAtPos(t.state.selection.anchor);return te(r.node,r.offset,i,s)&&([n,o,i,s]=[i,s,n,o]),{anchorNode:n,anchorOffset:o,focusNode:i,focusOffset:s}}function Jo(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return yn(t,i)}let n;function o(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",o,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",o,!0),n?yn(t,n):null}function Zo(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let o=t.docView.nearestDesc(n,!0);if(o&&o.node.isBlock)return n}return null}function Qo(t,e,n){let{node:o,fromOffset:i,toOffset:s,from:r,to:l}=t.docView.parseRange(e,n),a=t.domSelectionRange(),c,d=a.anchorNode;if(d&&t.dom.contains(d.nodeType==1?d:d.parentNode)&&(c=[{node:d,offset:a.anchorOffset}],ke(a)||c.push({node:a.focusNode,offset:a.focusOffset})),O&&t.input.lastKeyCode===8)for(let m=s;m>i;m--){let y=o.childNodes[m-1],E=y.pmViewDesc;if(y.nodeName=="BR"&&!E){s=m;break}if(!E||E.size)break}let f=t.state.doc,u=t.someProp("domParser")||Le.fromSchema(t.state.schema),p=f.resolve(r),h=null,g=u.parse(o,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:s,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:wo,context:p});if(c&&c[0].pos!=null){let m=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=m),h={anchor:m+r,head:y+r}}return{doc:g,sel:h,from:r,to:l}}function wo(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(x&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||x&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}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;function ei(t,e,n,o,i){let s=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let b=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,v=Ye(t,b);if(v&&!t.state.selection.eq(v)){if(O&&H&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",li=>li(t,ne(13,"Enter"))))return;let Fe=t.state.tr.setSelection(v);b=="pointer"?Fe.setMeta("pointer",!0):b=="key"&&Fe.scrollIntoView(),s&&Fe.setMeta("composition",s),t.dispatch(Fe)}return}let r=t.state.doc.resolve(e),l=r.sharedDepth(n);e=r.before(l+1),n=t.state.doc.resolve(n).after(l+1);let a=t.state.selection,c=Qo(t,e,n),d=t.state.doc,f=d.slice(c.from,c.to),u,p;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;let h=oi(f.content,c.doc.content,c.from,u,p);if(h&&t.input.domChangeCount++,(de&&t.input.lastIOSEnter>Date.now()-225||H)&&i.some(b=>b.nodeType==1&&!vo.test(b.nodeName))&&(!h||h.endA>=h.endB)&&t.someProp("handleKeyDown",b=>b(t,ne(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!h)if(o&&a instanceof C&&!a.empty&&a.$head.sameParent(a.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))h={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let b=bn(t,t.state.doc,c.sel);if(b&&!b.eq(t.state.selection)){let v=t.state.tr.setSelection(b);s&&v.setMeta("composition",s),t.dispatch(v)}}return}t.state.selection.from<t.state.selection.to&&h.start==h.endB&&t.state.selection instanceof C&&(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&&U<=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--);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,xe;if((de&&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,"",""))&&(xe=ee.findFrom(c.doc.resolve(g.pos+1),1,!0))&&xe.head>g.pos)&&t.someProp("handleKeyDown",b=>b(t,ne(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>h.start&&ni(d,h.start,h.endA,g,m)&&t.someProp("handleKeyDown",b=>b(t,ne(8,"Backspace")))){H&&O&&t.domObserver.suppressSelectionUpdates();return}O&&h.endB==h.start&&(t.input.lastChromeDelete=Date.now()),H&&!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(()=>{t.someProp("handleKeyDown",function(b){return b(t,ne(13,"Enter"))})},20));let w=h.start,ae=h.endA,P,at,Ie;if(E){if(g.pos==m.pos)A&&U<=11&&g.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>_(t),20)),P=t.state.tr.delete(w,ae),at=d.resolve(h.start).marksAcross(d.resolve(h.endA));else if(h.endA==h.endB&&(Ie=ti(g.parent.content.cut(g.parentOffset,m.parentOffset),y.parent.content.cut(y.parentOffset,h.endA-y.start()))))P=t.state.tr,Ie.type=="add"?P.addMark(w,ae,Ie.mark):P.removeMark(w,ae,Ie.mark);else if(g.parent.child(g.index()).isText&&g.index()==m.index()-(m.textOffset?0:1)){let b=g.parent.textBetween(g.parentOffset,m.parentOffset);if(t.someProp("handleTextInput",v=>v(t,w,ae,b)))return;P=t.state.tr.insertText(b,w,ae)}}if(P||(P=t.state.tr.replace(w,ae,c.doc.slice(h.start-c.from,h.endB-c.from))),c.sel){let b=bn(t,P.doc,c.sel);b&&!(O&&t.composing&&b.empty&&(h.start!=h.endB||t.input.lastChromeDelete<Date.now()-100)&&(b.head==w||b.head==P.mapping.map(ae)-1)||A&&b.empty&&b.head==w)&&P.setSelection(b)}at&&P.ensureMarks(at),s&&P.setMeta("composition",s),t.dispatch(P.scrollIntoView())}function bn(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Xe(t,e.resolve(n.anchor),e.resolve(n.head))}function ti(t,e){let n=t.firstChild.marks,o=e.firstChild.marks,i=n,s=o,r,l,a;for(let d=0;d<o.length;d++)i=o[d].removeFromSet(i);for(let d=0;d<n.length;d++)s=n[d].removeFromSet(s);if(i.length==1&&s.length==0)l=i[0],r="add",a=d=>d.mark(l.addToSet(d.marks));else if(i.length==0&&s.length==1)l=s[0],r="remove",a=d=>d.mark(l.removeFromSet(d.marks));else return null;let c=[];for(let d=0;d<e.childCount;d++)c.push(a(e.child(d)));if(z.from(c).eq(t))return{mark:l,type:r}}function ni(t,e,n,o,i){if(n-e<=i.pos-o.pos||lt(o,!0,!1)<i.pos)return!1;let s=t.resolve(e);if(!o.parent.isTextblock){let l=s.nodeAfter;return l!=null&&n==e+l.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let r=t.resolve(lt(s,!0,!0));return!r.parent.isTextblock||r.pos>n||lt(r,!0,!1)<n?!1:o.parent.content.cut(o.parentOffset).eq(r.parent.content)}function lt(t,e,n){let o=t.depth,i=e?t.end():t.pos;for(;o>0&&(e||t.indexAfter(o)==t.node(o).childCount);)o--,i++,e=!1;if(n){let s=t.node(o).maybeChild(t.indexAfter(o));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function oi(t,e,n,o,i){let s=t.findDiffStart(e,n);if(s==null)return null;let{a:r,b:l}=t.findDiffEnd(e,n+t.size,n+e.size);if(i=="end"){let a=Math.max(0,s-Math.min(r,l));o-=r+a-s}if(r<s&&t.size<e.size){let a=o<=s&&o>=r?s-o:0;s-=a,s&&s<e.size&&Dn(e.textBetween(s-1,s+1))&&(s+=a?1:-1),l=s+(l-r),r=s}else if(l<s){let a=o<=s&&o>=l?s-o:0;s-=a,s&&s<t.size&&Dn(t.textBetween(s-1,s+1))&&(s+=a?1:-1),r=s+(r-l),l=s}return{start:s,endA:r,endB:l}}function Dn(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class ii{constructor(e,n){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(Mn),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=Cn(this),Sn(this),this.nodeViews=On(this),this.docView=Et(this.state.doc,Nn(this),rt(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()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&et(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Mn),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let o in this._props)n[o]=this._props[o];n.state=this.state;for(let o in e)n[o]=e[o];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var o;let i=this.state,s=!1,r=!1;e.storedMarks&&this.composing&&(ln(this),r=!0),this.state=e;let l=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=On(this);ri(p,this.nodeViews)&&(this.nodeViews=p,s=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&et(this),this.editable=Cn(this),Sn(this);let a=rt(this),c=Nn(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);(f||!e.selection.eq(i.selection))&&(r=!0);let u=d=="preserve"&&r&&this.dom.style.overflowAnchor==null&&zn(this);if(r){this.domObserver.stop();let p=f&&(A||O)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&si(i.selection,e.selection);if(f){let h=O?this.trackWrites=this.domSelectionRange().focusNode:null;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=Et(e.doc,c,a,this.dom,this)),h&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&ro(this))?_(this,p):(qt(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}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)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof N){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&gt(this,n.getBoundingClientRect(),e)}else gt(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let o=this.directPlugins[n];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let o=this.state.plugins[n];o.spec.view&&this.pluginViews.push(o.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let o=this.pluginViews[n];o.update&&o.update(this,e)}}updateDraggedNode(e,n){let o=e.node,i=-1;if(this.state.doc.nodeAt(o.from)==o.node)i=o.from;else{let s=o.from+(this.state.doc.content.size-n.doc.content.size);(s>0&&this.state.doc.nodeAt(s))==o.node&&(i=s)}this.dragging=new cn(e.slice,e.move,i<0?void 0:N.create(this.state.doc,i))}someProp(e,n){let o=this._props&&this._props[e],i;if(o!=null&&(i=n?n(o):o))return i;for(let r=0;r<this.directPlugins.length;r++){let l=this.directPlugins[r].props[e];if(l!=null&&(i=n?n(l):l))return i}let s=this.state.plugins;if(s)for(let r=0;r<s.length;r++){let l=s[r].props[e];if(l!=null&&(i=n?n(l):l))return i}}hasFocus(){if(A){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&$n(this.dom),_(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return _n(this,e)}coordsAtPos(e,n=1){return Ct(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,o=-1){let i=this.docView.posFromDOM(e,n,o);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,n){return Xn(this,n||this.state,e)}pasteHTML(e,n){return Oe(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Oe(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return Qe(this,e)}destroy(){this.docView&&(Mo(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],rt(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,xn())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return ko(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();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}}domSelection(){return this.root.getSelection()}}ze("E",ii);function Nn(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let o in n)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]))}),e.translate||(e.translate="no"),[I.node(0,t.state.doc.content.size,e)]}function Sn(t){if(t.markCursor){let e=document.createElement("img");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})}}else t.cursorWrapper=null}function Cn(t){return!t.someProp("editable",e=>e(t.state)===!1)}function si(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function On(t){let e=Object.create(null);function n(o){for(let i in o)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=o[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function ri(t,e){let n=0,o=0;for(let i in t){if(t[i]!=e[i])return!0;n++}for(let i in e)o++;return n!=o}function Mn(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}}}});